Functions | |
__STATIC_INLINE void | Cy_TCPWM_Enable_Multiple (TCPWM_Type *base, uint32_t counters) |
Enables the counter(s) in the TCPWM block. More... | |
__STATIC_INLINE void | Cy_TCPWM_Disable_Multiple (TCPWM_Type *base, uint32_t counters) |
Disables the counter(s) in the TCPWM block. More... | |
__STATIC_INLINE void | Cy_TCPWM_TriggerStart (TCPWM_Type *base, uint32_t counters) |
Triggers a software start on the selected TCPWMs. More... | |
__STATIC_INLINE void | Cy_TCPWM_TriggerReloadOrIndex (TCPWM_Type *base, uint32_t counters) |
Triggers a software reload event (or index in QuadDec mode). More... | |
__STATIC_INLINE void | Cy_TCPWM_TriggerStopOrKill (TCPWM_Type *base, uint32_t counters) |
Triggers a stop in the Timer Counter mode, or a kill in the PWM mode. More... | |
__STATIC_INLINE void | Cy_TCPWM_TriggerCaptureOrSwap (TCPWM_Type *base, uint32_t counters) |
Triggers a Capture in the Timer Counter mode, and a Swap in the PWM mode. More... | |
__STATIC_INLINE void | Cy_TCPWM_Enable_Single (TCPWM_Type *base, uint32_t cntNum) |
Enables specified counter. More... | |
__STATIC_INLINE void | Cy_TCPWM_Disable_Single (TCPWM_Type *base, uint32_t cntNum) |
Disable specified counter. More... | |
__STATIC_INLINE uint32_t | Cy_TCPWM_GetInterruptStatus (TCPWM_Type const *base, uint32_t cntNum) |
Returns which event triggered the interrupt. More... | |
__STATIC_INLINE void | Cy_TCPWM_ClearInterrupt (TCPWM_Type *base, uint32_t cntNum, uint32_t source) |
Clears Active Interrupt Source. More... | |
__STATIC_INLINE void | Cy_TCPWM_SetInterrupt (TCPWM_Type *base, uint32_t cntNum, uint32_t source) |
Triggers an interrupt via a software write. More... | |
__STATIC_INLINE void | Cy_TCPWM_SetInterruptMask (TCPWM_Type *base, uint32_t cntNum, uint32_t mask) |
Sets an interrupt mask. More... | |
__STATIC_INLINE uint32_t | Cy_TCPWM_GetInterruptMask (TCPWM_Type const *base, uint32_t cntNum) |
Returns the interrupt mask. More... | |
__STATIC_INLINE uint32_t | Cy_TCPWM_GetInterruptStatusMasked (TCPWM_Type const *base, uint32_t cntNum) |
Returns which masked interrupt triggered the interrupt. More... | |
__STATIC_INLINE void | Cy_TCPWM_TriggerStart_Single (TCPWM_Type *base, uint32_t cntNum) |
Triggers a software start on the selected TCPWM. More... | |
__STATIC_INLINE void | Cy_TCPWM_TriggerReloadOrIndex_Single (TCPWM_Type *base, uint32_t cntNum) |
Triggers a software reload event (or index 0 in QuadDec mode) on selected TCPWM. More... | |
__STATIC_INLINE void | Cy_TCPWM_TriggerStopOrKill_Single (TCPWM_Type *base, uint32_t cntNum) |
Triggers a stop in the Timer Counter mode, or a kill in the PWM mode on selected TCPWM. More... | |
__STATIC_INLINE void | Cy_TCPWM_TriggerCaptureOrSwap_Single (TCPWM_Type *base, uint32_t cntNum) |
Triggers a Capture 0 in the Timer Counter mode, and a Swap in the PWM mode on selected TCPWM. More... | |
__STATIC_INLINE void | Cy_TCPWM_TriggerCapture0 (TCPWM_Type *base, uint32_t cntNum) |
Triggers a Capture 0 on the selected counter. More... | |
__STATIC_INLINE void | Cy_TCPWM_TriggerCapture1 (TCPWM_Type *base, uint32_t cntNum) |
Triggers a Capture 1 in Timer Counter and QuadDec Mode. More... | |
__STATIC_INLINE bool | Cy_TCPWM_GetTrigPinLevel (TCPWM_Type const *base, uint32_t cntNum, cy_en_tcpwm_trigselect_t triggerSelect) |
Returns the current level of the selected input trigger. More... | |
__STATIC_INLINE void | Cy_TCPWM_InputTriggerSetup (TCPWM_Type *base, uint32 cntNum, cy_en_tcpwm_trigselect_t triggerSelect, uint32_t edgeSelect, uint32_t triggerSignal) |
Sets up a trigger input signal for a specific TCPWM counter. More... | |
__STATIC_INLINE void | Cy_TCPWM_OutputTriggerSetup (TCPWM_Type *base, uint32 cntNum, cy_en_tcpwm_output_trigselect_t trigger0event, cy_en_tcpwm_output_trigselect_t trigger1event) |
Sets up a trigger output signal for a specific TCPWM counter event. More... | |
__STATIC_INLINE cy_en_tcpwm_status_t | Cy_TCPWM_SetDebugFreeze (TCPWM_Type *base, uint32 cntNum, bool enable) |
Enables/disables the Debug Freeze feature for the specified counter. More... | |
__STATIC_INLINE void | Cy_TCPWM_Block_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_InputTriggerSetupWithGF (TCPWM_Type *base, uint32 cntNum, cy_en_tcpwm_trigselect_t triggerSelect, uint32_t edgeSelect, uint32_t triggerSignal, cy_en_gf_depth_value_t dsvalue) |
Sets up a trigger input signal for a specific TCPWM counter and Glitch filter configuration for that trigger. More... | |
__STATIC_INLINE void Cy_TCPWM_Enable_Multiple | ( | TCPWM_Type * | base, |
uint32_t | counters | ||
) |
Enables the counter(s) in the TCPWM block.
Multiple blocks can be started simultaneously.
base | The pointer to a TCPWM instance. |
counters | A bit field representing each counter in the TCPWM block. |
__STATIC_INLINE void Cy_TCPWM_Disable_Multiple | ( | TCPWM_Type * | base, |
uint32_t | counters | ||
) |
Disables the counter(s) in the TCPWM block.
Multiple TCPWM can be disabled simultaneously.
base | The pointer to a TCPWM instance. |
counters | A bit field representing each counter in the TCPWM block. |
__STATIC_INLINE void Cy_TCPWM_TriggerStart | ( | TCPWM_Type * | base, |
uint32_t | counters | ||
) |
Triggers a software start on the selected TCPWMs.
base | The pointer to a TCPWM instance. |
counters | A bit field representing each counter in the TCPWM block. |
__STATIC_INLINE void Cy_TCPWM_TriggerReloadOrIndex | ( | TCPWM_Type * | base, |
uint32_t | counters | ||
) |
Triggers a software reload event (or index in QuadDec mode).
base | The pointer to a TCPWM instance |
counters | A bit field representing each counter in the TCPWM block. |
__STATIC_INLINE void Cy_TCPWM_TriggerStopOrKill | ( | TCPWM_Type * | base, |
uint32_t | counters | ||
) |
Triggers a stop in the Timer Counter mode, or a kill in the PWM mode.
base | The pointer to a TCPWM instance. |
counters | A bit field representing each counter in the TCPWM block. |
__STATIC_INLINE void Cy_TCPWM_TriggerCaptureOrSwap | ( | TCPWM_Type * | base, |
uint32_t | counters | ||
) |
Triggers a Capture in the Timer Counter mode, and a Swap in the PWM mode.
base | The pointer to a TCPWM instance. |
counters | A bit field representing each counter in the TCPWM block. |
__STATIC_INLINE void Cy_TCPWM_Enable_Single | ( | TCPWM_Type * | base, |
uint32_t | cntNum | ||
) |
Enables specified counter.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
__STATIC_INLINE void Cy_TCPWM_Disable_Single | ( | TCPWM_Type * | base, |
uint32_t | cntNum | ||
) |
Disable specified counter.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
__STATIC_INLINE uint32_t Cy_TCPWM_GetInterruptStatus | ( | TCPWM_Type const * | base, |
uint32_t | cntNum | ||
) |
Returns which event triggered the interrupt.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
__STATIC_INLINE void Cy_TCPWM_ClearInterrupt | ( | TCPWM_Type * | base, |
uint32_t | cntNum, | ||
uint32_t | source | ||
) |
Clears Active Interrupt Source.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
source | source to clear. See Interrupt Sources |
__STATIC_INLINE void Cy_TCPWM_SetInterrupt | ( | TCPWM_Type * | base, |
uint32_t | cntNum, | ||
uint32_t | source | ||
) |
Triggers an interrupt via a software write.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
source | The source to set an interrupt. See Interrupt Sources. |
__STATIC_INLINE void Cy_TCPWM_SetInterruptMask | ( | TCPWM_Type * | base, |
uint32_t | cntNum, | ||
uint32_t | mask | ||
) |
Sets an interrupt mask.
A 1 means that when the event occurs, it will cause an interrupt; a 0 means no interrupt will be triggered.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
mask | . See Interrupt Sources |
__STATIC_INLINE uint32_t Cy_TCPWM_GetInterruptMask | ( | TCPWM_Type const * | base, |
uint32_t | cntNum | ||
) |
Returns the interrupt mask.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
__STATIC_INLINE uint32_t Cy_TCPWM_GetInterruptStatusMasked | ( | TCPWM_Type const * | base, |
uint32_t | cntNum | ||
) |
Returns which masked interrupt triggered the interrupt.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
__STATIC_INLINE void Cy_TCPWM_TriggerStart_Single | ( | TCPWM_Type * | base, |
uint32_t | cntNum | ||
) |
Triggers a software start on the selected TCPWM.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
__STATIC_INLINE void Cy_TCPWM_TriggerReloadOrIndex_Single | ( | TCPWM_Type * | base, |
uint32_t | cntNum | ||
) |
Triggers a software reload event (or index 0 in QuadDec mode) on selected TCPWM.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
__STATIC_INLINE void Cy_TCPWM_TriggerStopOrKill_Single | ( | TCPWM_Type * | base, |
uint32_t | cntNum | ||
) |
Triggers a stop in the Timer Counter mode, or a kill in the PWM mode on selected TCPWM.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
__STATIC_INLINE void Cy_TCPWM_TriggerCaptureOrSwap_Single | ( | TCPWM_Type * | base, |
uint32_t | cntNum | ||
) |
Triggers a Capture 0 in the Timer Counter mode, and a Swap in the PWM mode on selected TCPWM.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
__STATIC_INLINE void Cy_TCPWM_TriggerCapture0 | ( | TCPWM_Type * | base, |
uint32_t | cntNum | ||
) |
Triggers a Capture 0 on the selected counter.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
__STATIC_INLINE void Cy_TCPWM_TriggerCapture1 | ( | TCPWM_Type * | base, |
uint32_t | cntNum | ||
) |
Triggers a Capture 1 in Timer Counter and QuadDec Mode.
In PWM mode this acts as a second kill input.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
__STATIC_INLINE bool Cy_TCPWM_GetTrigPinLevel | ( | TCPWM_Type const * | base, |
uint32_t | cntNum, | ||
cy_en_tcpwm_trigselect_t | triggerSelect | ||
) |
Returns the current level of the selected input trigger.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
triggerSelect | Defines which trigger status is being checked, Start, Reload, Stop/Kill, Count, Capture 0 or Capture 1 |
__STATIC_INLINE void Cy_TCPWM_InputTriggerSetup | ( | TCPWM_Type * | base, |
uint32 | cntNum, | ||
cy_en_tcpwm_trigselect_t | triggerSelect, | ||
uint32_t | edgeSelect, | ||
uint32_t | triggerSignal | ||
) |
Sets up a trigger input signal for a specific TCPWM counter.
This API is used to handle software triggering of multiple counters synchronously.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
triggerSelect | Defines which trigger is being setup, Start, Reload, Stop/Kill, Count, Capture 0 or Capture 1 see cy_en_tcpwm_trigselect_t |
edgeSelect | Sets the trigger edge detection, Rising, Falling, Both, No edge detect. see Input Modes |
triggerSignal | Selects what trigger signal is connected to the selected input trigger. |
__STATIC_INLINE void Cy_TCPWM_OutputTriggerSetup | ( | TCPWM_Type * | base, |
uint32 | cntNum, | ||
cy_en_tcpwm_output_trigselect_t | trigger0event, | ||
cy_en_tcpwm_output_trigselect_t | trigger1event | ||
) |
Sets up a trigger output signal for a specific TCPWM counter event.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
trigger0event | Selects internal events for output trigger out0 generation. see cy_en_tcpwm_output_trigselect_t |
trigger1event | Selects internal events for output trigger out1 generation. see cy_en_tcpwm_output_trigselect_t |
__STATIC_INLINE cy_en_tcpwm_status_t Cy_TCPWM_SetDebugFreeze | ( | TCPWM_Type * | base, |
uint32 | cntNum, | ||
bool | enable | ||
) |
Enables/disables the Debug Freeze feature for the specified counter.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
enable | true: The Debug Free feature is enabled false: The Debug Freeze feature is disabled |
__STATIC_INLINE void Cy_TCPWM_Block_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: Swapping mechanism is enabled false: Swapping mechanism is disabled |
__STATIC_INLINE void Cy_TCPWM_InputTriggerSetupWithGF | ( | TCPWM_Type * | base, |
uint32 | cntNum, | ||
cy_en_tcpwm_trigselect_t | triggerSelect, | ||
uint32_t | edgeSelect, | ||
uint32_t | triggerSignal, | ||
cy_en_gf_depth_value_t | dsvalue | ||
) |
Sets up a trigger input signal for a specific TCPWM counter and Glitch filter configuration for that trigger.
This API is used to handle software triggering of multiple counters synchronously.
base | The pointer to a TCPWM instance. |
cntNum | The Counter instance number in the selected TCPWM. |
triggerSelect | Defines which trigger is being setup, Start, Reload, Stop/Kill, Count, Capture 0 or Capture 1 see cy_en_tcpwm_trigselect_t |
edgeSelect | Sets the trigger edge detection, Rising, Falling, Both, No edge detect. see Input Modes |
triggerSignal | Selects what trigger signal is connected to the selected input trigger. |
dsvalue | Glitch filter depth. cy_en_gf_depth_value_t |