diff options
Diffstat (limited to 'embassy-usb-dfu/src/lib.rs')
| -rw-r--r-- | embassy-usb-dfu/src/lib.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/embassy-usb-dfu/src/lib.rs b/embassy-usb-dfu/src/lib.rs index eaa4b6e33..54ffa7276 100644 --- a/embassy-usb-dfu/src/lib.rs +++ b/embassy-usb-dfu/src/lib.rs | |||
| @@ -26,10 +26,10 @@ compile_error!("usb-dfu must be compiled with exactly one of `dfu`, or `applicat | |||
| 26 | /// This crate exposes `ResetImmediate` when compiled with cortex-m or esp32c3 support, which immediately issues a | 26 | /// This crate exposes `ResetImmediate` when compiled with cortex-m or esp32c3 support, which immediately issues a |
| 27 | /// reset request without interfacing with any other peripherals. | 27 | /// reset request without interfacing with any other peripherals. |
| 28 | /// | 28 | /// |
| 29 | /// If alternate behaviour is desired, a custom implementation of Reset can be provided as a type argument to the usb_dfu function. | 29 | /// If alternate behaviour is desired, a custom implementation of Reset can be provided as an argument to the usb_dfu function. |
| 30 | pub trait Reset { | 30 | pub trait Reset { |
| 31 | /// Reset the device. | 31 | /// Reset the device. |
| 32 | fn sys_reset() -> !; | 32 | fn sys_reset(&self); |
| 33 | } | 33 | } |
| 34 | 34 | ||
| 35 | /// Reset immediately. | 35 | /// Reset immediately. |
| @@ -38,7 +38,7 @@ pub struct ResetImmediate; | |||
| 38 | 38 | ||
| 39 | #[cfg(feature = "esp32c3-hal")] | 39 | #[cfg(feature = "esp32c3-hal")] |
| 40 | impl Reset for ResetImmediate { | 40 | impl Reset for ResetImmediate { |
| 41 | fn sys_reset() -> ! { | 41 | fn sys_reset(&self) { |
| 42 | esp32c3_hal::reset::software_reset(); | 42 | esp32c3_hal::reset::software_reset(); |
| 43 | loop {} | 43 | loop {} |
| 44 | } | 44 | } |
| @@ -50,7 +50,7 @@ pub struct ResetImmediate; | |||
| 50 | 50 | ||
| 51 | #[cfg(feature = "cortex-m")] | 51 | #[cfg(feature = "cortex-m")] |
| 52 | impl Reset for ResetImmediate { | 52 | impl Reset for ResetImmediate { |
| 53 | fn sys_reset() -> ! { | 53 | fn sys_reset(&self) { |
| 54 | cortex_m::peripheral::SCB::sys_reset() | 54 | cortex_m::peripheral::SCB::sys_reset() |
| 55 | } | 55 | } |
| 56 | } | 56 | } |
