diff options
| author | Ulf Lilleengen <[email protected]> | 2025-09-17 11:52:36 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-09-17 11:52:36 +0200 |
| commit | 12cb85c54c97e8d8081611018c065be2957171c5 (patch) | |
| tree | 71e84122a1703c99dee227a9f2e76f919fe41163 /embassy-usb-dfu | |
| parent | 40f5161c326166380b1af19170e7db15644b92b1 (diff) | |
| parent | 90f6497959adf6f0f0a65f1c53be0bd6b0e3f1a7 (diff) | |
Merge branch 'main' into usb_dfu_reset
Diffstat (limited to 'embassy-usb-dfu')
| -rw-r--r-- | embassy-usb-dfu/CHANGELOG.md | 1 | ||||
| -rw-r--r-- | embassy-usb-dfu/src/application.rs | 1 | ||||
| -rw-r--r-- | embassy-usb-dfu/src/dfu.rs | 1 | ||||
| -rw-r--r-- | embassy-usb-dfu/src/lib.rs | 14 |
4 files changed, 7 insertions, 10 deletions
diff --git a/embassy-usb-dfu/CHANGELOG.md b/embassy-usb-dfu/CHANGELOG.md index 7e5adb1f2..0088e66fe 100644 --- a/embassy-usb-dfu/CHANGELOG.md +++ b/embassy-usb-dfu/CHANGELOG.md | |||
| @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 | |||
| 9 | ## Unreleased - ReleaseDate | 9 | ## Unreleased - ReleaseDate |
| 10 | 10 | ||
| 11 | - changed: Do not reset in the GetStatus request | 11 | - changed: Do not reset in the GetStatus request |
| 12 | - Allow enabling the `application` and `dfu` feature at the same time | ||
| 12 | 13 | ||
| 13 | ## 0.2.0 - 2025-08-27 | 14 | ## 0.2.0 - 2025-08-27 |
| 14 | 15 | ||
diff --git a/embassy-usb-dfu/src/application.rs b/embassy-usb-dfu/src/application.rs index 4b7b72073..78eb2c083 100644 --- a/embassy-usb-dfu/src/application.rs +++ b/embassy-usb-dfu/src/application.rs | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | //! Application part of DFU logic | ||
| 1 | use embassy_boot::BlockingFirmwareState; | 2 | use embassy_boot::BlockingFirmwareState; |
| 2 | use embassy_time::{Duration, Instant}; | 3 | use embassy_time::{Duration, Instant}; |
| 3 | use embassy_usb::control::{InResponse, OutResponse, Recipient, RequestType}; | 4 | use embassy_usb::control::{InResponse, OutResponse, Recipient, RequestType}; |
diff --git a/embassy-usb-dfu/src/dfu.rs b/embassy-usb-dfu/src/dfu.rs index 3a390a37a..7c28d04cf 100644 --- a/embassy-usb-dfu/src/dfu.rs +++ b/embassy-usb-dfu/src/dfu.rs | |||
| @@ -1,3 +1,4 @@ | |||
| 1 | //! DFU bootloader part of DFU logic | ||
| 1 | use embassy_boot::{AlignedBuffer, BlockingFirmwareUpdater, FirmwareUpdaterError}; | 2 | use embassy_boot::{AlignedBuffer, BlockingFirmwareUpdater, FirmwareUpdaterError}; |
| 2 | use embassy_usb::control::{InResponse, OutResponse, Recipient, RequestType}; | 3 | use embassy_usb::control::{InResponse, OutResponse, Recipient, RequestType}; |
| 3 | use embassy_usb::driver::Driver; | 4 | use embassy_usb::driver::Driver; |
diff --git a/embassy-usb-dfu/src/lib.rs b/embassy-usb-dfu/src/lib.rs index 54ffa7276..e9f4278b6 100644 --- a/embassy-usb-dfu/src/lib.rs +++ b/embassy-usb-dfu/src/lib.rs | |||
| @@ -6,21 +6,15 @@ mod fmt; | |||
| 6 | pub mod consts; | 6 | pub mod consts; |
| 7 | 7 | ||
| 8 | #[cfg(feature = "dfu")] | 8 | #[cfg(feature = "dfu")] |
| 9 | mod dfu; | 9 | pub mod dfu; |
| 10 | #[cfg(feature = "dfu")] | 10 | #[cfg(all(feature = "dfu", not(feature = "application")))] |
| 11 | pub use self::dfu::*; | 11 | pub use self::dfu::*; |
| 12 | 12 | ||
| 13 | #[cfg(feature = "application")] | 13 | #[cfg(feature = "application")] |
| 14 | mod application; | 14 | pub mod application; |
| 15 | #[cfg(feature = "application")] | 15 | #[cfg(all(feature = "application", not(feature = "dfu")))] |
| 16 | pub use self::application::*; | 16 | pub use self::application::*; |
| 17 | 17 | ||
| 18 | #[cfg(any( | ||
| 19 | all(feature = "dfu", feature = "application"), | ||
| 20 | not(any(feature = "dfu", feature = "application")) | ||
| 21 | ))] | ||
| 22 | compile_error!("usb-dfu must be compiled with exactly one of `dfu`, or `application` features"); | ||
| 23 | |||
| 24 | /// Provides a platform-agnostic interface for initiating a system reset. | 18 | /// Provides a platform-agnostic interface for initiating a system reset. |
| 25 | /// | 19 | /// |
| 26 | /// This crate exposes `ResetImmediate` when compiled with cortex-m or esp32c3 support, which immediately issues a | 20 | /// This crate exposes `ResetImmediate` when compiled with cortex-m or esp32c3 support, which immediately issues a |
