drivers: watchdog: Watchdog API redesign
New API enables setting watchdog timeout in the unit of microseconds. It is possible to configure watchdog timer behavior in CPU sleep state as well as when it is halted by the debugger. It supports watchdogs with multiple reload channels. Jira: ZEP-2564 Signed-off-by: Michał Kruszewski <michal.kruszewski@nordicsemi.no> Signed-off-by: Karol Lasończyk <karol.lasonczyk@nordicsemi.no>
This commit is contained in:
parent
aec465968c
commit
0c2ef4ea3d
10 changed files with 333 additions and 34 deletions
|
@ -48,7 +48,7 @@ static void wdt_esp32_enable(struct device *dev)
|
|||
wdt_esp32_seal();
|
||||
}
|
||||
|
||||
static void wdt_esp32_disable(struct device *dev)
|
||||
static int wdt_esp32_disable(struct device *dev)
|
||||
{
|
||||
volatile u32_t *reg = (u32_t *)TIMG_WDTCONFIG0_REG(1);
|
||||
|
||||
|
@ -57,6 +57,8 @@ static void wdt_esp32_disable(struct device *dev)
|
|||
wdt_esp32_unseal();
|
||||
*reg &= ~BIT(TIMG_WDT_EN_S);
|
||||
wdt_esp32_seal();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void adjust_timeout(u32_t timeout)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue