diff options
| author | Dario Nieuwenhuis <[email protected]> | 2025-03-26 16:01:37 +0100 |
|---|---|---|
| committer | Dario Nieuwenhuis <[email protected]> | 2025-03-27 15:18:06 +0100 |
| commit | d41eeeae79388f219bf6a84e2f7bde9f6b532516 (patch) | |
| tree | 678b6fc732216e529dc38e6f65b72a309917ac32 /embassy-boot-rp | |
| parent | 9edf5b7f049f95742b60b041e4443967d8a6b708 (diff) | |
Remove Peripheral trait, rename PeripheralRef->Peri.
Diffstat (limited to 'embassy-boot-rp')
| -rw-r--r-- | embassy-boot-rp/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/embassy-boot-rp/src/lib.rs b/embassy-boot-rp/src/lib.rs index 6ec33a580..f704380ef 100644 --- a/embassy-boot-rp/src/lib.rs +++ b/embassy-boot-rp/src/lib.rs | |||
| @@ -10,6 +10,7 @@ pub use embassy_boot::{ | |||
| 10 | use embassy_rp::flash::{Blocking, Flash, ERASE_SIZE}; | 10 | use embassy_rp::flash::{Blocking, Flash, ERASE_SIZE}; |
| 11 | use embassy_rp::peripherals::{FLASH, WATCHDOG}; | 11 | use embassy_rp::peripherals::{FLASH, WATCHDOG}; |
| 12 | use embassy_rp::watchdog::Watchdog; | 12 | use embassy_rp::watchdog::Watchdog; |
| 13 | use embassy_rp::Peri; | ||
| 13 | use embassy_time::Duration; | 14 | use embassy_time::Duration; |
| 14 | use embedded_storage::nor_flash::{ErrorType, NorFlash, ReadNorFlash}; | 15 | use embedded_storage::nor_flash::{ErrorType, NorFlash, ReadNorFlash}; |
| 15 | 16 | ||
| @@ -68,7 +69,7 @@ pub struct WatchdogFlash<'d, const SIZE: usize> { | |||
| 68 | 69 | ||
| 69 | impl<'d, const SIZE: usize> WatchdogFlash<'d, SIZE> { | 70 | impl<'d, const SIZE: usize> WatchdogFlash<'d, SIZE> { |
| 70 | /// Start a new watchdog with a given flash and watchdog peripheral and a timeout | 71 | /// Start a new watchdog with a given flash and watchdog peripheral and a timeout |
| 71 | pub fn start(flash: FLASH, watchdog: WATCHDOG, timeout: Duration) -> Self { | 72 | pub fn start(flash: Peri<'static, FLASH>, watchdog: Peri<'static, WATCHDOG>, timeout: Duration) -> Self { |
| 72 | let flash = Flash::<_, Blocking, SIZE>::new_blocking(flash); | 73 | let flash = Flash::<_, Blocking, SIZE>::new_blocking(flash); |
| 73 | let mut watchdog = Watchdog::new(watchdog); | 74 | let mut watchdog = Watchdog::new(watchdog); |
| 74 | watchdog.start(timeout); | 75 | watchdog.start(timeout); |
