MTB CAT1 Peripheral driver library

General Description

Functions

__STATIC_INLINE void Cy_EvtGen_Enable (EVTGEN_Type *base)
 Enable the Event Generator. More...
 
__STATIC_INLINE void Cy_EvtGen_Disable (EVTGEN_Type *base)
 Disable event generator. More...
 
__STATIC_INLINE void Cy_EvtGen_SetStructInterrupt (EVTGEN_Type *base, uint8_t structNumber)
 Set interrupt factor of corresponding structure. More...
 
__STATIC_INLINE void Cy_EvtGen_ClearInterrupt (EVTGEN_Type *base, uint32_t mask)
 Clear the interrupt factor. More...
 
__STATIC_INLINE void Cy_EvtGen_ClearStructInterrupt (EVTGEN_Type *base, uint8_t structNumber)
 Clear interrupt factor of corresponding structure. More...
 
__STATIC_INLINE void Cy_EvtGen_SetStructInterruptMask (EVTGEN_Type *base, uint8_t structNumber)
 Set interrupt mask bit of a corresponding structure. More...
 
__STATIC_INLINE bool Cy_EvtGen_GetStructInterrupt (EVTGEN_Type *base, uint8_t structNumber)
 Get interrupt bit of corresponding structure. More...
 
__STATIC_INLINE bool Cy_EvtGen_GetStructInterruptMasked (EVTGEN_Type *base, uint8_t structNumber)
 Get interrupt masked bit of corresponding structure. More...
 
__STATIC_INLINE void Cy_EvtGen_SetStructInterruptDeepSleep (EVTGEN_Type *base, uint8_t structNumber)
 Set deep sleep interrupt factor of corresponding structure. More...
 
__STATIC_INLINE void Cy_EvtGen_ClearInterruptDeepSleep (EVTGEN_Type *base, uint32_t mask)
 Clear the deep sleep interrupt factor. More...
 
__STATIC_INLINE void Cy_EvtGen_ClearStructInterruptDeepSleep (EVTGEN_Type *base, uint8_t structNumber)
 Clear deep sleep interrupt factor of corresponding structure. More...
 
__STATIC_INLINE void Cy_EvtGen_SetStructInterruptDeepSleepMask (EVTGEN_Type *base, uint8_t structNumber)
 Set deep sleep interrupt mask bit of a corresponding structure. More...
 
__STATIC_INLINE bool Cy_EvtGen_GetStructInterruptDeepSleep (EVTGEN_Type *base, uint8_t structNumber)
 Get deep sleep interrupt bit of corresponding structure. More...
 
__STATIC_INLINE bool Cy_EvtGen_GetStructInterruptDeepSleepMasked (EVTGEN_Type *base, uint8_t structNumber)
 Get deep sleep interrupt masked bit of corresponding structure. More...
 
__STATIC_INLINE uint32_t Cy_EvtGen_GetComp0Status (EVTGEN_Type *base)
 Get comparator 0 status. More...
 
__STATIC_INLINE uint32_t Cy_EvtGen_GetComp1Status (EVTGEN_Type *base)
 Get comparator 1 status. More...
 
__STATIC_INLINE cy_en_evtgen_counter_status_t Cy_EvtGen_GetCounterStatus (EVTGEN_Type *base)
 Get active counter status. More...
 
__STATIC_INLINE uint32_t Cy_EvtGen_GetCounterValue (EVTGEN_Type *base)
 Get counter value. More...
 
__STATIC_INLINE bool Cy_EvtGen_GetRatioStatus (EVTGEN_Type *base)
 Get status ratio value. More...
 
__STATIC_INLINE bool Cy_EvtGen_GetCompActiveEnabledStatus (EVTGEN_Type *base, uint8_t structNum)
 Get status active struct comparator enable. More...
 
__STATIC_INLINE bool Cy_EvtGen_GetCompDeepSleepEnabledStatus (EVTGEN_Type *base, uint8_t structNum)
 Get status Deep Sleep struct comparator enable. More...
 
__STATIC_INLINE bool Cy_EvtGen_IsCompStructEnabled (EVTGEN_Type *base, uint8_t structNum)
 Get status struct comparator enable. More...
 
cy_en_evtgen_status_t Cy_EvtGen_Init (EVTGEN_Type *base, const cy_stc_evtgen_config_t *config)
 Initialize the event generator. More...
 
void Cy_EvtGen_DeInit (EVTGEN_Type *base)
 Deinitialize event generator. More...
 
cy_en_evtgen_status_t Cy_EvtGen_InitStruct (EVTGEN_Type *base, uint8_t structNum, const cy_stc_evtgen_struct_config_t *configStruct)
 Initialize a comparator structure. More...
 
void Cy_EvtGen_DeinitStruct (EVTGEN_Type *base, uint8_t structNum)
 Deinitialize event generator struct. More...
 
void Cy_EvtGen_UpdateActiveCompValue (EVTGEN_Type *base, uint8_t structNum, uint32_t newCompareValue)
 Update active comparator value corresponding comparator structure. More...
 
void Cy_EvtGen_UpdateDeepSleepCompValue (EVTGEN_Type *base, uint8_t structNum, uint32_t newCompareValue)
 Update Deep Sleep comparator value corresponding comparator structure. More...
 

Function Documentation

◆ Cy_EvtGen_Enable()

__STATIC_INLINE void Cy_EvtGen_Enable ( EVTGEN_Type *  base)

Enable the Event Generator.

Parameters
basePointer to structure describing registers
Note
Check the ratio status Cy_EvtGen_GetRatioStatus after enabling the Event Generator during hardware control ratio. Set a valid value takes to 625 microseconds.

◆ Cy_EvtGen_Disable()

__STATIC_INLINE void Cy_EvtGen_Disable ( EVTGEN_Type *  base)

Disable event generator.

Parameters
basePointer to structure describing registers

◆ Cy_EvtGen_SetStructInterrupt()

__STATIC_INLINE void Cy_EvtGen_SetStructInterrupt ( EVTGEN_Type *  base,
uint8_t  structNumber 
)

Set interrupt factor of corresponding structure.

Parameters
basePointer to structure describing registers
structNumberNumber of structure. The interrupt factor of that is to be set. Valid range from 0 to 15.

◆ Cy_EvtGen_ClearInterrupt()

__STATIC_INLINE void Cy_EvtGen_ClearInterrupt ( EVTGEN_Type *  base,
uint32_t  mask 
)

Clear the interrupt factor.

Parameters
basePointer to structure describing registers
maskEach bit of this parameter corresponds to each structure factor to be clear

◆ Cy_EvtGen_ClearStructInterrupt()

__STATIC_INLINE void Cy_EvtGen_ClearStructInterrupt ( EVTGEN_Type *  base,
uint8_t  structNumber 
)

Clear interrupt factor of corresponding structure.

Parameters
basePointer to structure describing registers
structNumberNumber of structure. The factor of that is to be clear. Valid range from 0 to 15.

◆ Cy_EvtGen_SetStructInterruptMask()

__STATIC_INLINE void Cy_EvtGen_SetStructInterruptMask ( EVTGEN_Type *  base,
uint8_t  structNumber 
)

Set interrupt mask bit of a corresponding structure.

Parameters
basePointer to structure describing registers
structNumberNumber of structure. The mask bit of that is to be set. Valid range from 0 to 15.

◆ Cy_EvtGen_GetStructInterrupt()

__STATIC_INLINE bool Cy_EvtGen_GetStructInterrupt ( EVTGEN_Type *  base,
uint8_t  structNumber 
)

Get interrupt bit of corresponding structure.

Parameters
basePointer to structure describing registers
structNumberNumber of structure. The interrupt factor of the structure is to be returned. Valid range from 0 to 15.
Returns
The interrupt bit

◆ Cy_EvtGen_GetStructInterruptMasked()

__STATIC_INLINE bool Cy_EvtGen_GetStructInterruptMasked ( EVTGEN_Type *  base,
uint8_t  structNumber 
)

Get interrupt masked bit of corresponding structure.

Parameters
basePointer to structure describing registers
structNumberNumber of structure. The masked bit of the structure is to be returned. Valid range from 0 to 15.
Returns
The interrupt masked bit

◆ Cy_EvtGen_SetStructInterruptDeepSleep()

__STATIC_INLINE void Cy_EvtGen_SetStructInterruptDeepSleep ( EVTGEN_Type *  base,
uint8_t  structNumber 
)

Set deep sleep interrupt factor of corresponding structure.

Parameters
basePointer to structure describing registers
structNumberNumber of structure. The interrupt factor of that is to be set. Valid range from 0 to 15.

◆ Cy_EvtGen_ClearInterruptDeepSleep()

__STATIC_INLINE void Cy_EvtGen_ClearInterruptDeepSleep ( EVTGEN_Type *  base,
uint32_t  mask 
)

Clear the deep sleep interrupt factor.

Parameters
basePointer to structure describing registers
maskEach bit of this parameter corresponds to each structure factor to be clear.

◆ Cy_EvtGen_ClearStructInterruptDeepSleep()

__STATIC_INLINE void Cy_EvtGen_ClearStructInterruptDeepSleep ( EVTGEN_Type *  base,
uint8_t  structNumber 
)

Clear deep sleep interrupt factor of corresponding structure.

Parameters
basePointer to structure describing registers
structNumberNumber of structure. The factor of that is to be clear. Valid range from 0 to 15.

◆ Cy_EvtGen_SetStructInterruptDeepSleepMask()

__STATIC_INLINE void Cy_EvtGen_SetStructInterruptDeepSleepMask ( EVTGEN_Type *  base,
uint8_t  structNumber 
)

Set deep sleep interrupt mask bit of a corresponding structure.

Parameters
basePointer to structure describing registers
structNumberNumber of structure. The deep sleep mask bit of that is to be set. Valid range from 0 to 15.

◆ Cy_EvtGen_GetStructInterruptDeepSleep()

__STATIC_INLINE bool Cy_EvtGen_GetStructInterruptDeepSleep ( EVTGEN_Type *  base,
uint8_t  structNumber 
)

Get deep sleep interrupt bit of corresponding structure.

Parameters
basePointer to structure describing registers.
structNumberNumber of structure. The deep sleep interrupt factor of the structure is to be returned. Valid range from 0 to 15.
Returns
Returns the interrupt bit.

◆ Cy_EvtGen_GetStructInterruptDeepSleepMasked()

__STATIC_INLINE bool Cy_EvtGen_GetStructInterruptDeepSleepMasked ( EVTGEN_Type *  base,
uint8_t  structNumber 
)

Get deep sleep interrupt masked bit of corresponding structure.

Parameters
basePointer to structure describing registers.
structNumberNumber of structure. The deep sleep masked bit of the structure is to be returned. Valid range from 0 to 15.
Returns
Returns the interrupt masked bit.

◆ Cy_EvtGen_GetComp0Status()

__STATIC_INLINE uint32_t Cy_EvtGen_GetComp0Status ( EVTGEN_Type *  base)

Get comparator 0 status.

Parameters
basePointer to structure describing registers.
Returns
Returns comparator 0 Status.

◆ Cy_EvtGen_GetComp1Status()

__STATIC_INLINE uint32_t Cy_EvtGen_GetComp1Status ( EVTGEN_Type *  base)

Get comparator 1 status.

Parameters
basePointer to structure describing registers.
Returns
Returns comparator 1 Status.

◆ Cy_EvtGen_GetCounterStatus()

__STATIC_INLINE cy_en_evtgen_counter_status_t Cy_EvtGen_GetCounterStatus ( EVTGEN_Type *  base)

Get active counter status.

Parameters
basePointer to structure describing registers.
Returns
Returns counter status.
Note
If this status is CY_EVTGEN_COUNTER_STATUS_VALID, the counter completed initialization and is ready to be read.

◆ Cy_EvtGen_GetCounterValue()

__STATIC_INLINE uint32_t Cy_EvtGen_GetCounterValue ( EVTGEN_Type *  base)

Get counter value.

Parameters
basePointer to structure describing registers.
Returns
Returns counter value.

◆ Cy_EvtGen_GetRatioStatus()

__STATIC_INLINE bool Cy_EvtGen_GetRatioStatus ( EVTGEN_Type *  base)

Get status ratio value.

Parameters
basePointer to structure describing registers.
Returns
Returns true if ratio value is valid.

◆ Cy_EvtGen_GetCompActiveEnabledStatus()

__STATIC_INLINE bool Cy_EvtGen_GetCompActiveEnabledStatus ( EVTGEN_Type *  base,
uint8_t  structNum 
)

Get status active struct comparator enable.

Parameters
basePointer to structure describing registers.
structNumStructure number for status active comparator enable. Valid range from 0 to 15.
Returns
Returns true if status active struct comparator enabled.

◆ Cy_EvtGen_GetCompDeepSleepEnabledStatus()

__STATIC_INLINE bool Cy_EvtGen_GetCompDeepSleepEnabledStatus ( EVTGEN_Type *  base,
uint8_t  structNum 
)

Get status Deep Sleep struct comparator enable.

Parameters
basePointer to structure describing registers.
structNumStructure number for status Deep Sleep comparator enable. Valid range from 0 to 15.
Returns
Returns true if status Deep Sleep struct comparator enabled.

◆ Cy_EvtGen_IsCompStructEnabled()

__STATIC_INLINE bool Cy_EvtGen_IsCompStructEnabled ( EVTGEN_Type *  base,
uint8_t  structNum 
)

Get status struct comparator enable.

Parameters
basePointer to structure describing registers.
structNumStructure number for status comparator enable. Valid range from 0 to 15.
Returns
Returns true if status struct comparator enabled.

◆ Cy_EvtGen_Init()

cy_en_evtgen_status_t Cy_EvtGen_Init ( EVTGEN_Type *  base,
const cy_stc_evtgen_config_t config 
)

Initialize the event generator.

Parameters
basePointer to structure describing registers
configPointer to the event generator config structure base address
Returns
Event generator initialization status

◆ Cy_EvtGen_DeInit()

void Cy_EvtGen_DeInit ( EVTGEN_Type *  base)

Deinitialize event generator.

Parameters
basePointer to structure describing registers

◆ Cy_EvtGen_InitStruct()

cy_en_evtgen_status_t Cy_EvtGen_InitStruct ( EVTGEN_Type *  base,
uint8_t  structNum,
const cy_stc_evtgen_struct_config_t configStruct 
)

Initialize a comparator structure.

Parameters
basePointer to structure describing registers
structNumNumber of structure to be initialized. Valid range from 0 to 16.
configStructPointer to the event generator structure config structure base address
Returns
Event generator initialization status

◆ Cy_EvtGen_DeinitStruct()

void Cy_EvtGen_DeinitStruct ( EVTGEN_Type *  base,
uint8_t  structNum 
)

Deinitialize event generator struct.

Parameters
basePointer to structure describing registers
structNumNumber of structure to be de-initialized. Valid range from 0 to 16.

◆ Cy_EvtGen_UpdateActiveCompValue()

void Cy_EvtGen_UpdateActiveCompValue ( EVTGEN_Type *  base,
uint8_t  structNum,
uint32_t  newCompareValue 
)

Update active comparator value corresponding comparator structure.

Parameters
basePointer to structure describing registers
structNumNumber of structure to be update value. Valid range from 0 to 15.
newCompareValueValue for update active comparator value.

◆ Cy_EvtGen_UpdateDeepSleepCompValue()

void Cy_EvtGen_UpdateDeepSleepCompValue ( EVTGEN_Type *  base,
uint8_t  structNum,
uint32_t  newCompareValue 
)

Update Deep Sleep comparator value corresponding comparator structure.

Parameters
basePointer to structure describing registers
structNumNumber of structure to be update value. Valid range from 0 to 15.
newCompareValueValue for update Deep Sleep comparator value.