File syn_hwwdt.c¶
FileList > src > syntropic > system > syn_hwwdt.c
Go to the source code of this file
Hardware Watchdog Timer driver implementation.
#include "../port/syn_port_wdt.h"#include "../util/syn_assert.h"#include "syn_hwwdt.h"
Public Functions¶
| Type | Name |
|---|---|
| void | syn_hwwdt_feed (void) Feed (reload) the hardware watchdog counter. |
| SYN_Status | syn_hwwdt_init (uint32_t timeout_ms) Start the hardware watchdog with the given timeout. |
Public Functions Documentation¶
function syn_hwwdt_feed¶
Feed (reload) the hardware watchdog counter.
Call this function from your main loop or scheduler idle hook to prevent the hardware from resetting the system.
function syn_hwwdt_init¶
Start the hardware watchdog with the given timeout.
On most MCUs the watchdog cannot be disabled once started. syn_hwwdt_feed() must be called more frequently than timeout_ms.
Parameters:
timeout_msDesired timeout in milliseconds.
Returns:
SYN_OK on success, SYN_ERROR if the hardware WDT cannot be started.
The documentation for this class was generated from the following file src/syntropic/system/syn_hwwdt.c