Functions | |
cy_en_wdc_status_t | Cy_WDC_Init (WCO_Type *base, cy_stc_wdc_config_t const *config) |
Initializes the WDC block. More... | |
void | Cy_WDC_DeInit (WCO_Type *base) |
De-initializes the WDC block, returns register values to their default state. More... | |
__STATIC_INLINE void | Cy_WDC_Enable (WCO_Type *base, uint32_t counters, uint16_t waitUs) |
Enables all specified counters. More... | |
__STATIC_INLINE void | Cy_WDC_Disable (WCO_Type *base, uint32_t counters, uint16_t waitUs) |
Disables all specified counters. More... | |
__STATIC_INLINE uint32_t | Cy_WDC_GetEnabledStatus (WCO_Type const *base, cy_en_wdc_ctr_t counter) |
Reports the enabled status of the specified counter. More... | |
__STATIC_INLINE void | Cy_WDC_InterruptEnable (WCO_Type *base, cy_en_wdc_ctr_t counter) |
Enables interrupt generation for the specified counter. More... | |
__STATIC_INLINE void | Cy_WDC_InterruptDisable (WCO_Type *base, cy_en_wdc_ctr_t counter) |
Disables interrupt generation for the specified counter. More... | |
__STATIC_INLINE bool | Cy_WDC_GetInterruptSetting (WCO_Type const *base, cy_en_wdc_ctr_t counter) |
Reports interrupt setting for specified counter. More... | |
__STATIC_INLINE void | Cy_WDC_SetClearOnMatch (WCO_Type *base, cy_en_wdc_ctr_t counter, uint32_t enable) |
Sets the Clear on match option for the specified counter. More... | |
__STATIC_INLINE uint32_t | Cy_WDC_GetClearOnMatch (WCO_Type const *base, cy_en_wdc_ctr_t counter) |
Reports the Clear on match setting for the specified counter. More... | |
__STATIC_INLINE void | Cy_WDC_SetCascade (WCO_Type *base, uint32_t cascade) |
Sets all the counter cascade options. More... | |
__STATIC_INLINE uint32_t | Cy_WDC_GetCascade (WCO_Type const *base) |
Reports all the counter cascade option settings. More... | |
__STATIC_INLINE void | Cy_WDC_SetMatch (WCO_Type *base, cy_en_wdc_ctr_t counter, uint32_t match, uint16_t waitUs) |
Sets the match comparison value for the specified counter (0 or 1). More... | |
__STATIC_INLINE uint32_t | Cy_WDC_GetMatch (WCO_Type const *base, cy_en_wdc_ctr_t counter) |
Reports the match comparison value for the specified counter (0 or 1). More... | |
__STATIC_INLINE void | Cy_WDC_SetToggleBit (WCO_Type *base, uint32_t bit) |
Sets a bit in Counter 2 to monitor for a toggle. More... | |
__STATIC_INLINE uint32_t | Cy_WDC_GetToggleBit (WCO_Type const *base) |
Reports which bit in Counter 2 is monitored for a toggle. More... | |
__STATIC_INLINE uint32_t | Cy_WDC_GetCount (WCO_Type const *base, cy_en_wdc_ctr_t counter) |
Reports the current counter value of the specified counter. More... | |
__STATIC_INLINE void | Cy_WDC_ResetCounters (WCO_Type *base, uint32_t counters, uint16_t waitUs) |
Resets all specified counters. More... | |
__STATIC_INLINE uint32_t | Cy_WDC_GetInterruptStatus (WCO_Type const *base) |
Reports the state of all WDC interrupts. More... | |
__STATIC_INLINE void | Cy_WDC_ClearInterrupt (WCO_Type *base, uint32_t counters) |
Clears all specified WDC interrupts. More... | |
uint32_t | Cy_WDC_GetCountCascaded (WCO_Type const *base) |
Reports the current value of combined C1-C0 cascaded counters. More... | |
__STATIC_INLINE cy_en_wdc_clock_t | Cy_WDC_GetClockSource (WCO_Type const *base) |
Returns the clock source for WDC timers. More... | |
void | Cy_WDC_SetClockSource (WCO_Type *base, cy_en_wdc_clock_t source) |
Sets the clock source for WDC timers. More... | |
cy_en_wdc_status_t Cy_WDC_Init | ( | WCO_Type * | base, |
cy_stc_wdc_config_t const * | config | ||
) |
Initializes the WDC block.
base | The base pointer to a structure that describes the registers. |
config | The pointer to a structure that contains component configuration data. |
void Cy_WDC_DeInit | ( | WCO_Type * | base | ) |
De-initializes the WDC block, returns register values to their default state.
base | The base pointer to a structure that describes the registers. |
__STATIC_INLINE void Cy_WDC_Enable | ( | WCO_Type * | base, |
uint32_t | counters, | ||
uint16_t | waitUs | ||
) |
Enables all specified counters.
base | The base pointer to a structure that describes registers. |
counters | OR of all counters to enable. See the CY_WDC_COUNTER0_Msk, CY_WDC_COUNTER1_Msk, and CY_WDC_COUNTER2_Msk macros. |
waitUs | The function waits for some delay in microseconds before returning, because the counter begins counting after three WDC clock-source cycles pass. The recommended waitUs parameter value is defined by CY_WDC_CLK_ILO_3CYCLES_US and CY_WDC_CLK_WCO_3CYCLES_US macros. |
__STATIC_INLINE void Cy_WDC_Disable | ( | WCO_Type * | base, |
uint32_t | counters, | ||
uint16_t | waitUs | ||
) |
Disables all specified counters.
base | The base pointer to a structure describing registers. |
counters | OR of all counters to disable. See the CY_WDC_COUNTER0_Msk, CY_WDC_COUNTER1_Msk, and CY_WDC_COUNTER2_Msk macros. |
waitUs | The function waits for some delay in microseconds before returning, because the counter stops counting after three WDC clock source cycles pass. The recommended waitUs parameter value is defined by CY_WDC_CLK_ILO_3CYCLES_US and CY_WDC_CLK_WCO_3CYCLES_US macros. |
__STATIC_INLINE uint32_t Cy_WDC_GetEnabledStatus | ( | WCO_Type const * | base, |
cy_en_wdc_ctr_t | counter | ||
) |
Reports the enabled status of the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. See cy_en_wdc_ctr_t |
__STATIC_INLINE void Cy_WDC_InterruptEnable | ( | WCO_Type * | base, |
cy_en_wdc_ctr_t | counter | ||
) |
Enables interrupt generation for the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. See cy_en_wdc_ctr_t |
__STATIC_INLINE void Cy_WDC_InterruptDisable | ( | WCO_Type * | base, |
cy_en_wdc_ctr_t | counter | ||
) |
Disables interrupt generation for the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. See cy_en_wdc_ctr_t |
__STATIC_INLINE bool Cy_WDC_GetInterruptSetting | ( | WCO_Type const * | base, |
cy_en_wdc_ctr_t | counter | ||
) |
Reports interrupt setting for specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. See cy_en_wdc_ctr_t |
__STATIC_INLINE void Cy_WDC_SetClearOnMatch | ( | WCO_Type * | base, |
cy_en_wdc_ctr_t | counter, | ||
uint32_t | enable | ||
) |
Sets the Clear on match option for the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. See cy_en_wdc_ctr_t |
enable | Set 0 to disable; 1 to enable. |
__STATIC_INLINE uint32_t Cy_WDC_GetClearOnMatch | ( | WCO_Type const * | base, |
cy_en_wdc_ctr_t | counter | ||
) |
Reports the Clear on match setting for the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. See cy_en_wdc_ctr_t |
__STATIC_INLINE void Cy_WDC_SetCascade | ( | WCO_Type * | base, |
uint32_t | cascade | ||
) |
Sets all the counter cascade options.
base | The base pointer to a structure that describes registers. |
cascade | Sets or clears each of the cascade options Cascading Masks. |
__STATIC_INLINE uint32_t Cy_WDC_GetCascade | ( | WCO_Type const * | base | ) |
Reports all the counter cascade option settings.
base | The base pointer to a structure that describes registers. |
__STATIC_INLINE void Cy_WDC_SetMatch | ( | WCO_Type * | base, |
cy_en_wdc_ctr_t | counter, | ||
uint32_t | match, | ||
uint16_t | waitUs | ||
) |
Sets the match comparison value for the specified counter (0 or 1).
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. See cy_en_wdc_ctr_t |
match | The value to match against the counter. The valid range is [0-65535] for c0ClearOnMatch (or c1ClearOnMatch) = 0 and [1-65535] for c0ClearOnMatch (or c1ClearOnMatch) = 1. |
waitUs | The function waits for some delay in microseconds before returning, because the match affects after three WDC clock source cycles pass. The recommended waitUs parameter value is defined by CY_WDC_CLK_ILO_3CYCLES_US and CY_WDC_CLK_WCO_3CYCLES_US macros. |
__STATIC_INLINE uint32_t Cy_WDC_GetMatch | ( | WCO_Type const * | base, |
cy_en_wdc_ctr_t | counter | ||
) |
Reports the match comparison value for the specified counter (0 or 1).
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. See cy_en_wdc_ctr_t |
__STATIC_INLINE void Cy_WDC_SetToggleBit | ( | WCO_Type * | base, |
uint32_t | bit | ||
) |
Sets a bit in Counter 2 to monitor for a toggle.
base | The base pointer to a structure that describes registers. |
bit | The Counter 2 bit is set to monitor for a toggle. The valid range [0-31]. |
__STATIC_INLINE uint32_t Cy_WDC_GetToggleBit | ( | WCO_Type const * | base | ) |
Reports which bit in Counter 2 is monitored for a toggle.
base | The base pointer to a structure that describes registers. |
__STATIC_INLINE uint32_t Cy_WDC_GetCount | ( | WCO_Type const * | base, |
cy_en_wdc_ctr_t | counter | ||
) |
Reports the current counter value of the specified counter.
base | The base pointer to a structure that describes registers. |
counter | The number of the WDT counter. See cy_en_wdc_ctr_t |
__STATIC_INLINE void Cy_WDC_ResetCounters | ( | WCO_Type * | base, |
uint32_t | counters, | ||
uint16_t | waitUs | ||
) |
Resets all specified counters.
base | The base pointer to a structure that describes registers. |
counters | OR of all counters to reset. See the CY_WDC_COUNTER0_Msk, CY_WDC_COUNTER1_Msk, and CY_WDC_COUNTER2_Msk macros. |
waitUs | The function waits for some delay in microseconds before returning, because a reset occurs after three WDC clock source cycle passes. The recommended waitUs parameter value is defined by CY_WDC_CLK_ILO_3CYCLES_US and CY_WDC_CLK_WCO_3CYCLES_US macros. |
__STATIC_INLINE uint32_t Cy_WDC_GetInterruptStatus | ( | WCO_Type const * | base | ) |
Reports the state of all WDC interrupts.
base | The base pointer to a structure that describes registers. |
__STATIC_INLINE void Cy_WDC_ClearInterrupt | ( | WCO_Type * | base, |
uint32_t | counters | ||
) |
Clears all specified WDC interrupts.
All the WDT interrupts must be cleared by the firmware; otherwise interrupts are generated continuously.
base | The base pointer to a structure describes registers. |
counters | OR of all interrupt sources to clear. See the CY_WDC_COUNTER0_Msk, CY_WDC_COUNTER1_Msk, and CY_WDC_COUNTER2_Msk macros. |
uint32_t Cy_WDC_GetCountCascaded | ( | WCO_Type const * | base | ) |
Reports the current value of combined C1-C0 cascaded counters.
base | The base pointer to a structure that describes the registers. |
__STATIC_INLINE cy_en_wdc_clock_t Cy_WDC_GetClockSource | ( | WCO_Type const * | base | ) |
Returns the clock source for WDC timers.
base | The base pointer to a structure describes registers. |
void Cy_WDC_SetClockSource | ( | WCO_Type * | base, |
cy_en_wdc_clock_t | source | ||
) |
Sets the clock source for WDC timers.
base | The base pointer to a structure describes registers. |
source | WDC timers clock source. See cy_en_wdc_clock_t |