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_ShiftReg_Init (TCPWM_Type const *base, uint32_t cntNum, cy_stc_tcpwm_shiftreg_config_t const *config)
 
void Cy_TCPWM_ShiftReg_DeInit (TCPWM_Type const *base, uint32_t cntNum, cy_stc_tcpwm_shiftreg_config_t const *config)
 
__STATIC_INLINE void Cy_TCPWM_ShiftReg_Enable (TCPWM_Type *base, uint32_t cntNum)
 Enables the counter in the TCPWM block for the Shift Register operation. More...
 
__STATIC_INLINE void Cy_TCPWM_ShiftReg_Disable (TCPWM_Type *base, uint32_t cntNum)
 Disables the counter in the TCPWM block. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_ShiftReg_GetStatus (TCPWM_Type const *base, uint32_t cntNum)
 Returns the status of the Shift Register whether it is running or not. More...
 
__STATIC_INLINE void Cy_TCPWM_ShiftReg_SetCompare0Val (TCPWM_Type *base, uint32_t cntNum, uint32_t compare0)
 Sets the compare value for Compare 0 when the compare mode enabled. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_ShiftReg_GetCompare0Val (TCPWM_Type const *base, uint32_t cntNum)
 Returns compare 0 value. More...
 
__STATIC_INLINE void Cy_TCPWM_ShiftReg_SetCompare0BufVal (TCPWM_Type *base, uint32_t cntNum, uint32_t compareBuf0)
 Sets the buffered compare value for Compare 0 when the compare mode enabled. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_ShiftReg_GetCompare0BufVal (TCPWM_Type const *base, uint32_t cntNum)
 Returns the buffered compare 0 value. More...
 
__STATIC_INLINE void Cy_TCPWM_ShiftReg_EnableCompare0Swap (TCPWM_Type *base, uint32_t cntNum, BOOL8 enable)
 Enables the comparison swap of compare 0 and compareBuf 0 on corresponding command or external trigger. More...
 
__STATIC_INLINE void Cy_TCPWM_ShiftReg_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 uint32_t Cy_TCPWM_ShiftReg_GetCompare1Val (TCPWM_Type const *base, uint32_t cntNum)
 Returns compare 1 value. More...
 
__STATIC_INLINE void Cy_TCPWM_ShiftReg_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 uint32_t Cy_TCPWM_ShiftReg_GetCompare1BufVal (TCPWM_Type const *base, uint32_t cntNum)
 Returns the buffered compare 1 value. More...
 
__STATIC_INLINE void Cy_TCPWM_ShiftReg_EnableCompare1Swap (TCPWM_Type *base, uint32_t cntNum, BOOL8 enable)
 Enables the comparison swap of compare 1 and compareBuf 1 on corresponding command or external trigger. More...
 
__STATIC_INLINE void Cy_TCPWM_ShiftReg_SetCounter (TCPWM_Type *base, uint32_t cntNum, uint32_t count)
 Sets the value of the counter. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_ShiftReg_GetCounter (TCPWM_Type const *base, uint32_t cntNum)
 Returns the value in the counter. More...
 
__STATIC_INLINE void Cy_TCPWM_ShiftReg_SetTaps (TCPWM_Type *base, uint32_t cntNum, uint32_t taps)
 Sets which taps are enabled. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_ShiftReg_GetTaps (TCPWM_Type const *base, uint32_t cntNum)
 Returns which taps are enabled. More...
 
__STATIC_INLINE uint32_t Cy_TCPWM_ShiftReg_LineOutStatus (TCPWM_Type const *base, uint32_t cntNum, uint32_t shiftRegOutSelect)
 Returns the current level of the selected Shift Register output line. More...
 

Function Documentation

__STATIC_INLINE void Cy_TCPWM_ShiftReg_Enable ( TCPWM_Type base,
uint32_t  cntNum 
)

Enables the counter in the TCPWM block for the Shift Register operation.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
__STATIC_INLINE void Cy_TCPWM_ShiftReg_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.
__STATIC_INLINE uint32_t Cy_TCPWM_ShiftReg_GetStatus ( TCPWM_Type const *  base,
uint32_t  cntNum 
)

Returns the status of the Shift Register whether it is running or not.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Returns
The status. See Shift Register Status
__STATIC_INLINE void Cy_TCPWM_ShiftReg_SetCompare0Val ( TCPWM_Type base,
uint32_t  cntNum,
uint32_t  compare0 
)

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

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
compare0The Compare 0 value.
__STATIC_INLINE uint32_t Cy_TCPWM_ShiftReg_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.
__STATIC_INLINE void Cy_TCPWM_ShiftReg_SetCompare0BufVal ( TCPWM_Type base,
uint32_t  cntNum,
uint32_t  compareBuf0 
)

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

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

Returns the buffered compare 0 value.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Returns
Buffered compare 0 value.
__STATIC_INLINE void Cy_TCPWM_ShiftReg_EnableCompare0Swap ( TCPWM_Type base,
uint32_t  cntNum,
BOOL8  enable 
)

Enables the comparison swap of compare 0 and compareBuf 0 on corresponding command or external trigger.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
enableTRUE = swap enabled; FALSE = swap disabled
__STATIC_INLINE void Cy_TCPWM_ShiftReg_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.
__STATIC_INLINE uint32_t Cy_TCPWM_ShiftReg_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.
__STATIC_INLINE void Cy_TCPWM_ShiftReg_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.
__STATIC_INLINE uint32_t Cy_TCPWM_ShiftReg_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.
__STATIC_INLINE void Cy_TCPWM_ShiftReg_EnableCompare1Swap ( TCPWM_Type base,
uint32_t  cntNum,
BOOL8  enable 
)

Enables the comparison swap of compare 1 and compareBuf 1 on corresponding command or external trigger.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
enableTRUE = swap enabled; FALSE = swap disabled
__STATIC_INLINE void Cy_TCPWM_ShiftReg_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.
__STATIC_INLINE uint32_t Cy_TCPWM_ShiftReg_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.
__STATIC_INLINE void Cy_TCPWM_ShiftReg_SetTaps ( TCPWM_Type base,
uint32_t  cntNum,
uint32_t  taps 
)

Sets which taps are enabled.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
tapsThe taps that will be enabled.
__STATIC_INLINE uint32_t Cy_TCPWM_ShiftReg_GetTaps ( TCPWM_Type const *  base,
uint32_t  cntNum 
)

Returns which taps are enabled.

Parameters
baseThe pointer to a COUNTER PWM instance.
cntNumThe Counter instance number in the selected TCPWM.
Returns
Returns which taps are enabled.
__STATIC_INLINE uint32_t Cy_TCPWM_ShiftReg_LineOutStatus ( TCPWM_Type const *  base,
uint32_t  cntNum,
uint32_t  shiftRegOutSelect 
)

Returns the current level of the selected Shift Register output line.

Parameters
baseThe pointer to a TCPWM instance.
cntNumThe Counter instance number in the selected TCPWM.
shiftRegOutSelectDefines which Shift Register output line is being checked: line_out or line_out_inv.
Returns
The current Shift Register output line level.