objc

watchdog.h
Go to the documentation of this file.
1 
25 #pragma once
26 #include <stdbool.h>
27 #include <stdint.h>
28 
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32 
39 
53 
62 void hw_watchdog_finalize(hw_watchdog_t *watchdog);
63 
70 uint32_t hw_watchdog_maxtimeout(void);
71 
78 bool hw_watchdog_valid(hw_watchdog_t *watchdog);
79 
91 bool hw_watchdog_did_reset(hw_watchdog_t *watchdog);
92 
103 void hw_watchdog_enable(hw_watchdog_t *watchdog, bool enable);
104 
116 void hw_watchdog_reset(hw_watchdog_t *watchdog, uint32_t delay_ms);
117 
118 #ifdef __cplusplus
119 }
120 #endif
uint32_t hw_watchdog_maxtimeout(void)
Return the maximum supported watchdog timeout.
struct hw_watchdog_t hw_watchdog_t
Watchdog adapter.
Definition: watchdog.h:38
void hw_watchdog_finalize(hw_watchdog_t *watchdog)
Finalize the watchdog timer subsystem.
hw_watchdog_t * hw_watchdog_init()
Initialize the watchdog timer subsystem.
void hw_watchdog_enable(hw_watchdog_t *watchdog, bool enable)
Enable or disable the watchdog timer.
void hw_watchdog_reset(hw_watchdog_t *watchdog, uint32_t delay_ms)
Cause a reset after a delay.
bool hw_watchdog_did_reset(hw_watchdog_t *watchdog)
Check if the watchdog triggered a system reset.
bool hw_watchdog_valid(hw_watchdog_t *watchdog)
Check if the watchdog is in a valid state.