diff options
| author | Matthew Tran <[email protected]> | 2025-04-20 20:14:13 -0500 |
|---|---|---|
| committer | Matthew Tran <[email protected]> | 2025-04-20 20:23:26 -0500 |
| commit | f535acfca09b916554fa63550f9e12f18cbca25d (patch) | |
| tree | 4898f31f5ccbd67ee0be1f0e3647b2136b4c9990 /embassy-boot-nrf | |
| parent | 9d62fba7d2e6b5d3bcb54770ffd031c1f3dafc84 (diff) | |
nrf53: add WDT support
Diffstat (limited to 'embassy-boot-nrf')
| -rw-r--r-- | embassy-boot-nrf/src/lib.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/embassy-boot-nrf/src/lib.rs b/embassy-boot-nrf/src/lib.rs index 46c1994e2..f1c9da080 100644 --- a/embassy-boot-nrf/src/lib.rs +++ b/embassy-boot-nrf/src/lib.rs | |||
| @@ -8,7 +8,6 @@ pub use embassy_boot::{ | |||
| 8 | FirmwareUpdater, FirmwareUpdaterConfig, | 8 | FirmwareUpdater, FirmwareUpdaterConfig, |
| 9 | }; | 9 | }; |
| 10 | use embassy_nrf::nvmc::PAGE_SIZE; | 10 | use embassy_nrf::nvmc::PAGE_SIZE; |
| 11 | use embassy_nrf::peripherals::WDT; | ||
| 12 | use embassy_nrf::{wdt, Peri}; | 11 | use embassy_nrf::{wdt, Peri}; |
| 13 | use embedded_storage::nor_flash::{ErrorType, NorFlash, ReadNorFlash}; | 12 | use embedded_storage::nor_flash::{ErrorType, NorFlash, ReadNorFlash}; |
| 14 | 13 | ||
| @@ -113,7 +112,7 @@ pub struct WatchdogFlash<FLASH> { | |||
| 113 | 112 | ||
| 114 | impl<FLASH> WatchdogFlash<FLASH> { | 113 | impl<FLASH> WatchdogFlash<FLASH> { |
| 115 | /// Start a new watchdog with a given flash and WDT peripheral and a timeout | 114 | /// Start a new watchdog with a given flash and WDT peripheral and a timeout |
| 116 | pub fn start(flash: FLASH, wdt: Peri<'static, WDT>, config: wdt::Config) -> Self { | 115 | pub fn start(flash: FLASH, wdt: Peri<'static, impl wdt::Instance>, config: wdt::Config) -> Self { |
| 117 | let (_wdt, [wdt]) = match wdt::Watchdog::try_new(wdt, config) { | 116 | let (_wdt, [wdt]) = match wdt::Watchdog::try_new(wdt, config) { |
| 118 | Ok(x) => x, | 117 | Ok(x) => x, |
| 119 | Err(_) => { | 118 | Err(_) => { |
