Functions | |
| cy_en_tcpwm_status_t | Cy_TCPWM_Counter_Init (TCPWM_Type *base, uint32_t cntNum, cy_stc_tcpwm_counter_config_t const *config) |
| Initializes the counter in the TCPWM block for the Counter operation. More... | |
| void | Cy_TCPWM_Counter_DeInit (TCPWM_Type *base, uint32_t cntNum, cy_stc_tcpwm_counter_config_t const *config) |
| De-initializes the counter in the TCPWM block, returns register values to default. More... | |
| __STATIC_INLINE void | Cy_TCPWM_Counter_Enable (TCPWM_Type *base, uint32_t cntNum) |
| Enables the counter in the TCPWM block for the Counter operation. More... | |
| __STATIC_INLINE void | Cy_TCPWM_Counter_Disable (TCPWM_Type *base, uint32_t cntNum) |
| Disables the counter in the TCPWM block. More... | |
| __STATIC_INLINE uint32_t | Cy_TCPWM_Counter_GetStatus (TCPWM_Type const *base, uint32_t cntNum) |
| Returns the status of the Counter Timer whether it is running or not. More... | |
| __STATIC_INLINE uint32_t | Cy_TCPWM_Counter_GetCapture0Val (TCPWM_Type const *base, uint32_t cntNum) |
| Returns the capture 0 value when the capture mode is enabled. More... | |
| __STATIC_INLINE uint32_t | Cy_TCPWM_Counter_GetCapture0BufVal (TCPWM_Type const *base, uint32_t cntNum) |
| Returns the buffered capture 0 value when the capture mode is enabled. More... | |
| __STATIC_INLINE void | Cy_TCPWM_Counter_SetCompare0Val (TCPWM_Type *base, uint32_t cntNum, uint32_t compare0) |
| Sets the compare value for Compare0 when the compare mode is enabled. More... | |
| __STATIC_INLINE uint32_t | Cy_TCPWM_Counter_GetCompare0Val (TCPWM_Type const *base, uint32_t cntNum) |
| Returns compare 0 value. More... | |
| __STATIC_INLINE void | Cy_TCPWM_Counter_SetCompare0BufVal (TCPWM_Type *base, uint32_t cntNum, uint32_t compare1) |
| Sets the compare value for Compare1 when the compare mode is enabled. More... | |
| __STATIC_INLINE uint32_t | Cy_TCPWM_Counter_GetCompare0BufVal (TCPWM_Type const *base, uint32_t cntNum) |
| Returns the buffered compare 0 value. More... | |
| __STATIC_INLINE void | Cy_TCPWM_Counter_EnableCompare0Swap (TCPWM_Type *base, uint32_t cntNum, bool enable) |
| Enables the comparison swap when the comparison value is true. More... | |
| __STATIC_INLINE void | Cy_TCPWM_Counter_SetCounter (TCPWM_Type *base, uint32_t cntNum, uint32_t count) |
| Sets the value of the counter. More... | |
| __STATIC_INLINE uint32_t | Cy_TCPWM_Counter_GetCounter (TCPWM_Type const *base, uint32_t cntNum) |
| Returns the value in the counter. More... | |
| __STATIC_INLINE void | Cy_TCPWM_Counter_SetPeriod (TCPWM_Type *base, uint32_t cntNum, uint32_t period) |
| Sets the value of the period register. More... | |
| __STATIC_INLINE uint32_t | Cy_TCPWM_Counter_GetPeriod (TCPWM_Type const *base, uint32_t cntNum) |
| Returns the value in the period register. More... | |
| __STATIC_INLINE uint32_t | Cy_TCPWM_Counter_GetCapture1Val (TCPWM_Type const *base, uint32_t cntNum) |
| Returns capture 1 value when capture mode is enabled. More... | |
| __STATIC_INLINE uint32_t | Cy_TCPWM_Counter_GetCapture1BufVal (TCPWM_Type const *base, uint32_t cntNum) |
| Returns the buffered capture1 value when capture mode is enabled. More... | |
| __STATIC_INLINE uint32_t | Cy_TCPWM_Counter_GetCompare1Val (TCPWM_Type const *base, uint32_t cntNum) |
| Returns compare 1 value. More... | |
| __STATIC_INLINE uint32_t | Cy_TCPWM_Counter_GetCompare1BufVal (TCPWM_Type const *base, uint32_t cntNum) |
| Returns the buffered compare1 value. More... | |
| __STATIC_INLINE void | Cy_TCPWM_Counter_SetCompare1Val (TCPWM_Type *base, uint32_t cntNum, uint32_t compare1) |
| Sets the compare value for Compare1 when the compare mode enabled. More... | |
| __STATIC_INLINE void | Cy_TCPWM_Counter_SetCompare1BufVal (TCPWM_Type *base, uint32_t cntNum, uint32_t compareBuf1) |
| Sets the buffered compare value for Compare1 when the compare mode enabled. More... | |
| __STATIC_INLINE void | Cy_TCPWM_Counter_EnableCompare1Swap (TCPWM_Type *base, uint32_t cntNum, bool enable) |
| Enables the comparison swap of compare1 and compareBuf1 when the comparison value is true. More... | |
| __STATIC_INLINE void | Cy_TCPWM_Counter_EnableSwap (TCPWM_Type *base, uint32_t cntNum, bool enable) |
| Enables/disables swapping mechanism between CC0 and buffered CC0, CC1 and buffered CC1, PERIOD and buffered PERIOD, DT and buffered DT. More... | |
| __STATIC_INLINE void | Cy_TCPWM_Counter_SetDirection_Change_Mode (TCPWM_Type *base, uint32_t cntNum, cy_en_counter_direction_t direction_mode) |
| Direction change mode Based on falling/rising edge of capture0 input. More... | |
| cy_en_tcpwm_status_t Cy_TCPWM_Counter_Init | ( | TCPWM_Type * | base, |
| uint32_t | cntNum, | ||
| cy_stc_tcpwm_counter_config_t const * | config | ||
| ) |
Initializes the counter in the TCPWM block for the Counter operation.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| config | The pointer to configuration structure. See cy_stc_tcpwm_counter_config_t. |
| void Cy_TCPWM_Counter_DeInit | ( | TCPWM_Type * | base, |
| uint32_t | cntNum, | ||
| cy_stc_tcpwm_counter_config_t const * | config | ||
| ) |
De-initializes the counter in the TCPWM block, returns register values to default.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| config | The pointer to configuration structure. See cy_stc_tcpwm_counter_config_t. |
| __STATIC_INLINE void Cy_TCPWM_Counter_Enable | ( | TCPWM_Type * | base, |
| uint32_t | cntNum | ||
| ) |
Enables the counter in the TCPWM block for the Counter operation.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| __STATIC_INLINE void Cy_TCPWM_Counter_Disable | ( | TCPWM_Type * | base, |
| uint32_t | cntNum | ||
| ) |
Disables the counter in the TCPWM block.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| __STATIC_INLINE uint32_t Cy_TCPWM_Counter_GetStatus | ( | TCPWM_Type const * | base, |
| uint32_t | cntNum | ||
| ) |
Returns the status of the Counter Timer whether it is running or not.
In case the Counter is running, status will also provide information on counting up/down. This is useful when the counter mode is set to UP_DOWN_1 or UP_DOWN_2.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| __STATIC_INLINE uint32_t Cy_TCPWM_Counter_GetCapture0Val | ( | TCPWM_Type const * | base, |
| uint32_t | cntNum | ||
| ) |
Returns the capture 0 value when the capture mode is enabled.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| __STATIC_INLINE uint32_t Cy_TCPWM_Counter_GetCapture0BufVal | ( | TCPWM_Type const * | base, |
| uint32_t | cntNum | ||
| ) |
Returns the buffered capture 0 value when the capture mode is enabled.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| __STATIC_INLINE void Cy_TCPWM_Counter_SetCompare0Val | ( | TCPWM_Type * | base, |
| uint32_t | cntNum, | ||
| uint32_t | compare0 | ||
| ) |
Sets the compare value for Compare0 when the compare mode is enabled.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| compare0 | The Compare0 value. |
| __STATIC_INLINE uint32_t Cy_TCPWM_Counter_GetCompare0Val | ( | TCPWM_Type const * | base, |
| uint32_t | cntNum | ||
| ) |
Returns compare 0 value.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| __STATIC_INLINE void Cy_TCPWM_Counter_SetCompare0BufVal | ( | TCPWM_Type * | base, |
| uint32_t | cntNum, | ||
| uint32_t | compare1 | ||
| ) |
Sets the compare value for Compare1 when the compare mode is enabled.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| compare1 | The Compare1 value. |
| __STATIC_INLINE uint32_t Cy_TCPWM_Counter_GetCompare0BufVal | ( | TCPWM_Type const * | base, |
| uint32_t | cntNum | ||
| ) |
Returns the buffered compare 0 value.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| __STATIC_INLINE void Cy_TCPWM_Counter_EnableCompare0Swap | ( | TCPWM_Type * | base, |
| uint32_t | cntNum, | ||
| bool | enable | ||
| ) |
Enables the comparison swap when the comparison value is true.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| enable | true = swap enabled, false = swap disabled |
| __STATIC_INLINE void Cy_TCPWM_Counter_SetCounter | ( | TCPWM_Type * | base, |
| uint32_t | cntNum, | ||
| uint32_t | count | ||
| ) |
Sets the value of the counter.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| count | The value to write into the counter. |
| __STATIC_INLINE uint32_t Cy_TCPWM_Counter_GetCounter | ( | TCPWM_Type const * | base, |
| uint32_t | cntNum | ||
| ) |
Returns the value in the counter.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| __STATIC_INLINE void Cy_TCPWM_Counter_SetPeriod | ( | TCPWM_Type * | base, |
| uint32_t | cntNum, | ||
| uint32_t | period | ||
| ) |
Sets the value of the period register.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| period | The value to write into a period. |
| __STATIC_INLINE uint32_t Cy_TCPWM_Counter_GetPeriod | ( | TCPWM_Type const * | base, |
| uint32_t | cntNum | ||
| ) |
Returns the value in the period register.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| __STATIC_INLINE uint32_t Cy_TCPWM_Counter_GetCapture1Val | ( | TCPWM_Type const * | base, |
| uint32_t | cntNum | ||
| ) |
Returns capture 1 value when capture mode is enabled.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| __STATIC_INLINE uint32_t Cy_TCPWM_Counter_GetCapture1BufVal | ( | TCPWM_Type const * | base, |
| uint32_t | cntNum | ||
| ) |
Returns the buffered capture1 value when capture mode is enabled.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| __STATIC_INLINE uint32_t Cy_TCPWM_Counter_GetCompare1Val | ( | TCPWM_Type const * | base, |
| uint32_t | cntNum | ||
| ) |
Returns compare 1 value.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| __STATIC_INLINE uint32_t Cy_TCPWM_Counter_GetCompare1BufVal | ( | TCPWM_Type const * | base, |
| uint32_t | cntNum | ||
| ) |
Returns the buffered compare1 value.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| __STATIC_INLINE void Cy_TCPWM_Counter_SetCompare1Val | ( | TCPWM_Type * | base, |
| uint32_t | cntNum, | ||
| uint32_t | compare1 | ||
| ) |
Sets the compare value for Compare1 when the compare mode enabled.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| compare1 | The Compare1 value. |
| __STATIC_INLINE void Cy_TCPWM_Counter_SetCompare1BufVal | ( | TCPWM_Type * | base, |
| uint32_t | cntNum, | ||
| uint32_t | compareBuf1 | ||
| ) |
Sets the buffered compare value for Compare1 when the compare mode enabled.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| compareBuf1 | The buffered Compare1 value. |
| __STATIC_INLINE void Cy_TCPWM_Counter_EnableCompare1Swap | ( | TCPWM_Type * | base, |
| uint32_t | cntNum, | ||
| bool | enable | ||
| ) |
Enables the comparison swap of compare1 and compareBuf1 when the comparison value is true.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| enable | true = swap enabled; false = swap disabled |
| __STATIC_INLINE void Cy_TCPWM_Counter_EnableSwap | ( | TCPWM_Type * | base, |
| uint32_t | cntNum, | ||
| bool | enable | ||
| ) |
Enables/disables swapping mechanism between CC0 and buffered CC0, CC1 and buffered CC1, PERIOD and buffered PERIOD, DT and buffered DT.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| enable | true = swap enabled; false = swap disabled |
| __STATIC_INLINE void Cy_TCPWM_Counter_SetDirection_Change_Mode | ( | TCPWM_Type * | base, |
| uint32_t | cntNum, | ||
| cy_en_counter_direction_t | direction_mode | ||
| ) |
Direction change mode Based on falling/rising edge of capture0 input.
| base | The pointer to a TCPWM instance. |
| cntNum | The Counter instance number in the selected TCPWM. |
| direction_mode | Direction change mode Based on falling/rising edge of capture0 input cy_en_counter_direction_t |