aboutsummaryrefslogtreecommitdiff
path: root/embassy-boot-rp/src
diff options
context:
space:
mode:
authorDario Nieuwenhuis <[email protected]>2025-03-26 16:01:37 +0100
committerDario Nieuwenhuis <[email protected]>2025-03-27 15:18:06 +0100
commitd41eeeae79388f219bf6a84e2f7bde9f6b532516 (patch)
tree678b6fc732216e529dc38e6f65b72a309917ac32 /embassy-boot-rp/src
parent9edf5b7f049f95742b60b041e4443967d8a6b708 (diff)
Remove Peripheral trait, rename PeripheralRef->Peri.
Diffstat (limited to 'embassy-boot-rp/src')
-rw-r--r--embassy-boot-rp/src/lib.rs3
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::{
10use embassy_rp::flash::{Blocking, Flash, ERASE_SIZE}; 10use embassy_rp::flash::{Blocking, Flash, ERASE_SIZE};
11use embassy_rp::peripherals::{FLASH, WATCHDOG}; 11use embassy_rp::peripherals::{FLASH, WATCHDOG};
12use embassy_rp::watchdog::Watchdog; 12use embassy_rp::watchdog::Watchdog;
13use embassy_rp::Peri;
13use embassy_time::Duration; 14use embassy_time::Duration;
14use embedded_storage::nor_flash::{ErrorType, NorFlash, ReadNorFlash}; 15use embedded_storage::nor_flash::{ErrorType, NorFlash, ReadNorFlash};
15 16
@@ -68,7 +69,7 @@ pub struct WatchdogFlash<'d, const SIZE: usize> {
68 69
69impl<'d, const SIZE: usize> WatchdogFlash<'d, SIZE> { 70impl<'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);