30 #ifndef _FSL_WDOG32_H_ 31 #define _FSL_WDOG32_H_ 33 #include "fsl_common.h" 44 #define FSL_WDOG32_DRIVER_VERSION (MAKE_VERSION(2, 0, 0)) 47 typedef enum _wdog32_clock_source 56 typedef enum _wdog32_clock_prescaler
63 typedef struct _wdog32_work_mode
71 typedef enum _wdog32_test_mode
80 typedef struct _wdog32_config
119 #if defined(__cplusplus) 202 base->CS |= WDOG_CS_EN_MASK;
216 base->CS &= ~WDOG_CS_EN_MASK;
270 return (base->CS & (WDOG_CS_EN_MASK | WDOG_CS_FLG_MASK));
301 base->TOVAL = timeoutCount;
316 base->WIN = windowValue;
332 base->CNT = WDOG_UPDATE_KEY;
345 base->CNT = WDOG_REFRESH_KEY;
363 #if defined(__cplusplus) Definition: fsl_wdog32.h:49
Describes WDOG32 configuration structure.
Definition: fsl_wdog32.h:80
void WDOG32_GetDefaultConfig(wdog32_config_t *config)
Initializes WDOG32 configure sturcture.
Definition: fsl_wdog32.c:45
Definition: fsl_wdog32.h:101
bool enableWdog32
Definition: fsl_wdog32.h:82
Definition: fsl_wdog32.h:76
wdog32_test_mode_t testMode
Definition: fsl_wdog32.h:86
Definition: fsl_wdog32.h:112
uint16_t windowValue
Definition: fsl_wdog32.h:90
static void WDOG32_SetWindowValue(WDOG_Type *base, uint16_t windowValue)
Sets the WDOG32 window value.
Definition: fsl_wdog32.h:314
bool enableWindowMode
Definition: fsl_wdog32.h:89
static uint16_t WDOG32_GetCounterValue(WDOG_Type *base)
Gets WDOG32 counter value.
Definition: fsl_wdog32.h:356
bool enableInterrupt
Definition: fsl_wdog32.h:88
bool enableUpdate
Definition: fsl_wdog32.h:87
wdog32_clock_source_t
Describes WDOG32 clock source.
Definition: fsl_wdog32.h:47
wdog32_work_mode_t workMode
Definition: fsl_wdog32.h:85
static void WDOG32_Unlock(WDOG_Type *base)
Unlocks the WDOG32 register written.
Definition: fsl_wdog32.h:330
static void WDOG32_SetTimeoutValue(WDOG_Type *base, uint16_t timeoutCount)
Set the WDOG32 timeout value.
Definition: fsl_wdog32.h:299
_wdog32_status_flags_t
WDOG32 status flags.
Definition: fsl_wdog32.h:109
Definition: fsl_wdog32.h:74
Definition: fsl_wdog32.h:52
Definition: fsl_wdog32.h:73
uint32_t WDOG32_GetStatusFlags(WDOG_Type *base)
Gets WDOG32 all status flags.
Definition: fsl_wdog32.h:268
_wdog32_interrupt_enable_t
WDOG32 interrupt configuration structure.
Definition: fsl_wdog32.h:99
Definition: fsl_wdog32.h:111
bool enableDebug
Definition: fsl_wdog32.h:67
Definition: fsl_wdog32.h:58
Definition: fsl_wdog32.h:50
wdog32_clock_prescaler_t
Describes the selection of the clock prescaler.
Definition: fsl_wdog32.h:56
wdog32_clock_source_t clockSource
Definition: fsl_wdog32.h:83
wdog32_test_mode_t
Describes WDOG32 test mode.
Definition: fsl_wdog32.h:71
Definition: fsl_wdog32.h:51
static void WDOG32_Disable(WDOG_Type *base)
Disables WDOG32 module.
Definition: fsl_wdog32.h:214
bool enableStop
Definition: fsl_wdog32.h:66
Definition: fsl_wdog32.h:59
wdog32_clock_prescaler_t prescaler
Definition: fsl_wdog32.h:84
static void WDOG32_Refresh(WDOG_Type *base)
Refreshes the WDOG32 timer.
Definition: fsl_wdog32.h:343
Defines WDOG32 work mode.
Definition: fsl_wdog32.h:63
bool enableWait
Definition: fsl_wdog32.h:65
void WDOG32_Deinit(WDOG_Type *base)
De-initializes WDOG32 module.
Definition: fsl_wdog32.c:85
Definition: fsl_wdog32.h:75
static void WDOG32_Enable(WDOG_Type *base)
Enables WDOG32 module.
Definition: fsl_wdog32.h:200
void WDOG32_Init(WDOG_Type *base, const wdog32_config_t *config)
Initializes WDOG32 module.
Definition: fsl_wdog32.c:63
uint16_t timeoutValue
Definition: fsl_wdog32.h:91
void WDOG32_ClearStatusFlags(WDOG_Type *base, uint32_t mask)
Clear WDOG32 flag.
Definition: fsl_wdog32.c:37
static void WDOG32_EnableInterrupts(WDOG_Type *base, uint32_t mask)
Enable WDOG32 interrupt.
Definition: fsl_wdog32.h:231
static void WDOG32_DisableInterrupts(WDOG_Type *base, uint32_t mask)
Disable WDOG32 interrupt.
Definition: fsl_wdog32.h:248