MTB CAT5 Peripheral driver library
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages

General Description

Functions

cy_en_tcpwm_status_t Cy_TCPWM_QuadDec_Init (TCPWM_Type *base, uint32_t cntNum, cy_stc_tcpwm_quaddec_config_t const *config)
 
void Cy_TCPWM_QuadDec_DeInit (TCPWM_Type *base, uint32_t cntNum, cy_stc_tcpwm_quaddec_config_t const *config)
 
__STATIC_INLINE void Cy_TCPWM_QuadDec_Enable (TCPWM_Type *base, uint32_t cntNum)
 Enables the counter in the TCPWM block for the QuadDec operation. More...
 
__STATIC_INLINE void Cy_TCPWM_QuadDec_Disable (TCPWM_Type *base, uint32_t cntNum)
 Disables the counter in the TCPWM block. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetStatus (TCPWM_Type const *base, uint32_t cntNum)
 Returns the status of the QuadDec whether it is running or not. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCapture0Val (TCPWM_Type const *base, uint32_t cntNum)
 Returns the capture value. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCapture0BufVal (TCPWM_Type const *base, uint32_t cntNum)
 Returns the buffered capture value. More...
 
__STATIC_INLINE void Cy_TCPWM_QuadDec_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_QuadDec_GetCompare0Val (TCPWM_Type const *base, uint32_t cntNum)
 Returns compare 0 value. More...
 
__STATIC_INLINE void Cy_TCPWM_QuadDec_SetCompare0BufVal (TCPWM_Type *base, uint32_t cntNum, uint32_t compareBuf0)
 Sets the Buffered Compare 0 value when the compare mode is enabled. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCompare0BufVal (TCPWM_Type const *base, uint32_t cntNum)
 Returns Buffered Compare 0 Value. More...
 
__STATIC_INLINE void Cy_TCPWM_QuadDec_EnableCompare0Swap (TCPWM_Type *base, uint32_t cntNum, BOOL8 enable)
 Enables the comparison swap of compare 0 and compareBuf 0 when the comparision value is TRUE. More...
 
__STATIC_INLINE void Cy_TCPWM_QuadDec_SetCounter (TCPWM_Type *base, uint32_t cntNum, uint32_t count)
 Sets the value of the counter. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCounter (TCPWM_Type const *base, uint32_t cntNum)
 Returns the value in the counter. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCapture1Val (TCPWM_Type const *base, uint32_t cntNum)
 Returns capture 1 value when capture mode is enabled. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCapture1BufVal (TCPWM_Type const *base, uint32_t cntNum)
 Returns the buffered capture 1 value when capture mode is enabled. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCompare1Val (TCPWM_Type const *base, uint32_t cntNum)
 Returns compare 1 value. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCompare1BufVal (TCPWM_Type const *base, uint32_t cntNum)
 Returns the buffered compare 1 value. More...
 
__STATIC_INLINE void Cy_TCPWM_QuadDec_SetCompare1Val (TCPWM_Type *base, uint32_t cntNum, uint32_t compare1)
 Sets the compare value for Compare 1 when the compare mode enabled. More...
 
__STATIC_INLINE void Cy_TCPWM_QuadDec_SetCompare1BufVal (TCPWM_Type *base, uint32_t cntNum, uint32_t compareBuf1)
 Sets the buffered compare value for Compare 1 when the compare mode enabled. More...
 
__STATIC_INLINE void Cy_TCPWM_QuadDec_EnableCompare1Swap (TCPWM_Type *base, uint32_t cntNum, BOOL8 enable)
 Enables the comparison swap of compare 1 and compareBuf 1 when the comparision value is TRUE. More...
 
__STATIC_INLINE void Cy_TCPWM_QuadDec_SetPeriod0 (TCPWM_Type *base, uint32_t cntNum, uint32_t period0)
 Sets the value of the period register. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetPeriod0 (TCPWM_Type const *base, uint32_t cntNum)
 Returns the value in the period 0 register. More...
 
__STATIC_INLINE void Cy_TCPWM_QuadDec_SetPeriod1 (TCPWM_Type *base, uint32_t cntNum, uint32_t period1)
 Sets the value of the period register. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetPeriod1 (TCPWM_Type const *base, uint32_t cntNum)
 Returns the value in the period 1 register. More...
 
__STATIC_INLINE void Cy_TCPWM_QuadDec_TriggerIndex1 (TCPWM_Type *base, uint32_t cntNum)
 Triggers a software index 1. More...
 

Function Documentation

__STATIC_INLINE void Cy_TCPWM_QuadDec_Enable ( TCPWM_Type base,
uint32_t  cntNum 
)

Enables the counter in the TCPWM block for the QuadDec operation.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Function Usage
__STATIC_INLINE void Cy_TCPWM_QuadDec_Disable ( TCPWM_Type base,
uint32_t  cntNum 
)

Disables the counter in the TCPWM block.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Function Usage
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetStatus ( TCPWM_Type const *  base,
uint32_t  cntNum 
)

Returns the status of the QuadDec whether it is running or not.

In case the QuadDec is running, status will also provide information on counting up/down.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Returns
The status. See QuadDec Status
Function Usage
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCapture0Val ( TCPWM_Type const *  base,
uint32_t  cntNum 
)

Returns the capture value.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Returns
The capture value.
Function Usage
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCapture0BufVal ( TCPWM_Type const *  base,
uint32_t  cntNum 
)

Returns the buffered capture value.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Returns
The buffered capture value.
Function Usage
__STATIC_INLINE void Cy_TCPWM_QuadDec_SetCompare0Val ( TCPWM_Type base,
uint32_t  cntNum,
uint32_t  compare0 
)

Sets the compare value for Compare0 when the compare mode is enabled.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
compare0The Compare 0 value.
Function Usage
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCompare0Val ( TCPWM_Type const *  base,
uint32_t  cntNum 
)

Returns compare 0 value.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Returns
Compare 0 value.
Function Usage
__STATIC_INLINE void Cy_TCPWM_QuadDec_SetCompare0BufVal ( TCPWM_Type base,
uint32_t  cntNum,
uint32_t  compareBuf0 
)

Sets the Buffered Compare 0 value when the compare mode is enabled.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
compareBuf0The Buffered Compare 0 value.
Function Usage
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCompare0BufVal ( TCPWM_Type const *  base,
uint32_t  cntNum 
)

Returns Buffered Compare 0 Value.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Returns
Buffered Compare 0 Value.
Function Usage
__STATIC_INLINE void Cy_TCPWM_QuadDec_EnableCompare0Swap ( TCPWM_Type base,
uint32_t  cntNum,
BOOL8  enable 
)

Enables the comparison swap of compare 0 and compareBuf 0 when the comparision value is TRUE.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
enableTRUE = swap enabled, FALSE = swap disabled
Function Usage
__STATIC_INLINE void Cy_TCPWM_QuadDec_SetCounter ( TCPWM_Type base,
uint32_t  cntNum,
uint32_t  count 
)

Sets the value of the counter.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
countThe value to write into the counter.
Function Usage
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCounter ( TCPWM_Type const *  base,
uint32_t  cntNum 
)

Returns the value in the counter.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Returns
The current counter value.
Function Usage
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCapture1Val ( TCPWM_Type const *  base,
uint32_t  cntNum 
)

Returns capture 1 value when capture mode is enabled.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Returns
Capture 1 value.
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCapture1BufVal ( TCPWM_Type const *  base,
uint32_t  cntNum 
)

Returns the buffered capture 1 value when capture mode is enabled.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Returns
Buffered capture 1 value.
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCompare1Val ( TCPWM_Type const *  base,
uint32_t  cntNum 
)

Returns compare 1 value.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Returns
Compare 1 value.
Function Usage
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetCompare1BufVal ( TCPWM_Type const *  base,
uint32_t  cntNum 
)

Returns the buffered compare 1 value.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Returns
Buffered compare 1 value.
Function Usage
__STATIC_INLINE void Cy_TCPWM_QuadDec_SetCompare1Val ( TCPWM_Type base,
uint32_t  cntNum,
uint32_t  compare1 
)

Sets the compare value for Compare 1 when the compare mode enabled.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
compare1The Compare 1 value.
Function Usage
__STATIC_INLINE void Cy_TCPWM_QuadDec_SetCompare1BufVal ( TCPWM_Type base,
uint32_t  cntNum,
uint32_t  compareBuf1 
)

Sets the buffered compare value for Compare 1 when the compare mode enabled.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
compareBuf1The buffered Compare 1 value.
Function Usage
__STATIC_INLINE void Cy_TCPWM_QuadDec_EnableCompare1Swap ( TCPWM_Type base,
uint32_t  cntNum,
BOOL8  enable 
)

Enables the comparison swap of compare 1 and compareBuf 1 when the comparision value is TRUE.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
enableTRUE = swap enabled; FALSE = swap disabled
Function Usage
__STATIC_INLINE void Cy_TCPWM_QuadDec_SetPeriod0 ( TCPWM_Type base,
uint32_t  cntNum,
uint32_t  period0 
)

Sets the value of the period register.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
period0The value to write into a period.
Function Usage
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetPeriod0 ( TCPWM_Type const *  base,
uint32_t  cntNum 
)

Returns the value in the period 0 register.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Returns
The current period value.
Function Usage
__STATIC_INLINE void Cy_TCPWM_QuadDec_SetPeriod1 ( TCPWM_Type base,
uint32_t  cntNum,
uint32_t  period1 
)

Sets the value of the period register.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
period1The value to write into a period 1.
Function Usage
Note
supported only in TCPWM_ver2
__STATIC_INLINE uint32_t Cy_TCPWM_QuadDec_GetPeriod1 ( TCPWM_Type const *  base,
uint32_t  cntNum 
)

Returns the value in the period 1 register.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Returns
The current period 1 value.
Function Usage
Note
supported only in TCPWM_ver2
__STATIC_INLINE void Cy_TCPWM_QuadDec_TriggerIndex1 ( TCPWM_Type base,
uint32_t  cntNum 
)

Triggers a software index 1.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Function Usage