37 #include "hal_platform.h" 39 #ifdef HAL_WDT_MODULE_ENABLED 170 #define HAL_WDT_ENABLE_MAGIC (3405691582) 176 #define HAL_WDT_DISABLE_MAGIC (3405643877) 182 #define HAL_WDT_FEED_MAGIC (3735931646) hal_wdt_status_t hal_wdt_deinit(void)
De-initialize the watchdog.
The WDT reset/interrupt occurred because the timer counts down to 0 .
Definition: hal_wdt.h:203
hal_wdt_status_t hal_wdt_feed(uint32_t magic)
This function is used to feed the watchdog(restart the watchdog timer).
hal_wdt_status_t hal_wdt_enable(uint32_t magic)
Enable the watchdog timer.
The no WDT reset/interrupt occurred.
Definition: hal_wdt.h:205
void(* hal_wdt_callback_t)(hal_wdt_reset_status_t wdt_reset_status)
This defines the callback function prototype.
Definition: hal_wdt.h:246
This structure defines the init config structure.
Definition: hal_wdt.h:225
hal_wdt_mode_t hal_wdt_get_mode(void)
Get the current mode of the WDT.
The WDT reset/interrupt occurred because the software reset register is set .
Definition: hal_wdt.h:204
hal_wdt_reset_status_t hal_wdt_get_reset_status(void)
Get the status of last watchdog reset/interrupt.
hal_wdt_reset_status_t
This enum define the WDT reset status.
Definition: hal_wdt.h:202
hal_wdt_mode_t mode
Specify watchdog to reset mode or interrupt mode.
Definition: hal_wdt.h:226
uint32_t seconds
Specify the watchdog timer timeout value in seconds.
Definition: hal_wdt.h:227
hal_wdt_status_t
This enum define the API return type.
Definition: hal_wdt.h:194
WDT reset mode.
Definition: hal_wdt.h:211
A wrong parameter is given.
Definition: hal_wdt.h:195
No error occurred during the function call.
Definition: hal_wdt.h:197
hal_wdt_status_t hal_wdt_software_reset(void)
This function is used to trigger a watchdog reset manually.
hal_wdt_status_t hal_wdt_disable(uint32_t magic)
Disable the watchdog timer.
hal_wdt_status_t hal_wdt_init(hal_wdt_config_t *wdt_config)
This function is mainly used to initialize the watchdog hardware.
hal_wdt_mode_t
This enum defines the WDT mode.
Definition: hal_wdt.h:210
WDT interrupt mode.
Definition: hal_wdt.h:212
A wrong magic number is given.
Definition: hal_wdt.h:196
hal_wdt_callback_t hal_wdt_register_callback(hal_wdt_callback_t wdt_callback)
Register a callback function while using interrupt mode.
bool hal_wdt_get_enable_status(void)
Get the enable status of the WDT.