ChibiOS/HAL 9.0.0
|
Generic WDG Driver. More...
Generic WDG Driver.
This module defines an abstract interface for a watchdog timer.
HAL_USE_WDG
option must be enabled in halconf.h
.Configuration options | |
#define | PLATFORM_WDG_USE_WDG1 FALSE |
WDG1 driver enable switch. |
Data Structures | |
struct | WDGConfig |
Driver configuration structure. More... | |
struct | WDGDriver |
Structure representing an WDG driver. More... |
Macros | |
#define | wdgResetI(wdgp) |
Resets WDG's counter. |
Typedefs | |
typedef struct WDGDriver | WDGDriver |
Type of a structure representing an WDG driver. |
Enumerations | |
enum | wdgstate_t { WDG_UNINIT = 0 , WDG_STOP = 1 , WDG_READY = 2 } |
Driver state machine possible states. More... |
Functions | |
void | wdgInit (void) |
WDG Driver initialization. | |
msg_t | wdgStart (WDGDriver *wdgp, const WDGConfig *config) |
Configures and activates the WDG peripheral. | |
void | wdgStop (WDGDriver *wdgp) |
Deactivates the WDG peripheral. | |
void | wdgReset (WDGDriver *wdgp) |
Resets WDG's counter. | |
void | wdg_lld_init (void) |
Low level WDG driver initialization. | |
void | wdg_lld_start (WDGDriver *wdgp) |
Configures and activates the WDG peripheral. | |
void | wdg_lld_stop (WDGDriver *wdgp) |
Deactivates the WDG peripheral. | |
void | wdg_lld_reset (WDGDriver *wdgp) |
Reloads WDG's counter. |
Variables | |
WDGDriver | WDGD1 |
#define wdgResetI | ( | wdgp | ) |
Resets WDG's counter.
[in] | wdgp | pointer to the WDGDriver object |
Definition at line 68 of file hal_wdg.h.
Referenced by wdgReset().
#define PLATFORM_WDG_USE_WDG1 FALSE |
typedef struct WDGDriver WDGDriver |
Type of a structure representing an WDG driver.
Definition at line 62 of file hal_wdg_lld.h.
enum wdgstate_t |
void wdgInit | ( | void | ) |
WDG Driver initialization.
halInit()
, there is no need to explicitly initialize the driver.Definition at line 56 of file hal_wdg.c.
References wdg_lld_init().
Referenced by halInit().
Configures and activates the WDG peripheral.
Definition at line 70 of file hal_wdg.c.
References WDGDriver::config, HAL_RET_SUCCESS, osalDbgAssert, osalDbgCheck, osalSysLock(), osalSysUnlock(), WDGDriver::state, wdg_lld_start(), WDG_READY, and WDG_STOP.
void wdgStop | ( | WDGDriver * | wdgp | ) |
Deactivates the WDG peripheral.
[in] | wdgp | pointer to the WDGDriver object |
Definition at line 107 of file hal_wdg.c.
References WDGDriver::config, osalDbgAssert, osalDbgCheck, osalSysLock(), osalSysUnlock(), WDGDriver::state, wdg_lld_stop(), WDG_READY, and WDG_STOP.
void wdgReset | ( | WDGDriver * | wdgp | ) |
Resets WDG's counter.
[in] | wdgp | pointer to the WDGDriver object |
Definition at line 130 of file hal_wdg.c.
References osalDbgAssert, osalDbgCheck, osalSysLock(), osalSysUnlock(), WDGDriver::state, WDG_READY, and wdgResetI.
void wdg_lld_init | ( | void | ) |
Low level WDG driver initialization.
Definition at line 62 of file hal_wdg_lld.c.
Referenced by wdgInit().
void wdg_lld_start | ( | WDGDriver * | wdgp | ) |
Configures and activates the WDG peripheral.
[in] | wdgp | pointer to the WDGDriver object |
Definition at line 73 of file hal_wdg_lld.c.
Referenced by wdgStart().
void wdg_lld_stop | ( | WDGDriver * | wdgp | ) |
Deactivates the WDG peripheral.
[in] | wdgp | pointer to the WDGDriver object |
Definition at line 85 of file hal_wdg_lld.c.
Referenced by wdgStop().
void wdg_lld_reset | ( | WDGDriver * | wdgp | ) |
Reloads WDG's counter.
[in] | wdgp | pointer to the WDGDriver object |
Definition at line 97 of file hal_wdg_lld.c.
WDGDriver WDGD1 |
Definition at line 38 of file hal_wdg_lld.c.