diff options
Diffstat (limited to 'embassy-boot/nrf/src/lib.rs')
| -rw-r--r-- | embassy-boot/nrf/src/lib.rs | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/embassy-boot/nrf/src/lib.rs b/embassy-boot/nrf/src/lib.rs index 205bbd6df..f40ae62d6 100644 --- a/embassy-boot/nrf/src/lib.rs +++ b/embassy-boot/nrf/src/lib.rs | |||
| @@ -149,11 +149,7 @@ pub struct WatchdogFlash<'d> { | |||
| 149 | 149 | ||
| 150 | impl<'d> WatchdogFlash<'d> { | 150 | impl<'d> WatchdogFlash<'d> { |
| 151 | /// Start a new watchdog with a given flash and WDT peripheral and a timeout | 151 | /// Start a new watchdog with a given flash and WDT peripheral and a timeout |
| 152 | pub fn start(flash: Nvmc<'d>, wdt: WDT, timeout: u32) -> Self { | 152 | pub fn start(flash: Nvmc<'d>, wdt: WDT, config: wdt::Config) -> Self { |
| 153 | let mut config = wdt::Config::default(); | ||
| 154 | config.timeout_ticks = 32768 * timeout; // timeout seconds | ||
| 155 | config.run_during_sleep = true; | ||
| 156 | config.run_during_debug_halt = false; | ||
| 157 | let (_wdt, [wdt]) = match wdt::Watchdog::try_new(wdt, config) { | 153 | let (_wdt, [wdt]) = match wdt::Watchdog::try_new(wdt, config) { |
| 158 | Ok(x) => x, | 154 | Ok(x) => x, |
| 159 | Err(_) => { | 155 | Err(_) => { |
