1.8.22.14 1.25.23.14 1.26.20.14 1.27.23.14 1.28.25.14 1.34.23.14 1.35.16.14 1.36.18.14 1.41.21.14 1.42.20.14 TCx_CHy_CompareStatusGet Function
C
/* x = TC instance number, y= channel number */ TCx_COMPARE_STATUS TCx_CHy_CompareStatusGet ( void )
Summary
Identifies status of the compare events
Description
This function returns the status of the events that occur in compare mode.
Precondition
TCx_CHy_CompareInitialize() function must have been called first for the given channel to configure channel in capture mode.
Parameters
None
Returns
Status of the capture events as TCx_COMPARE_STATUS type
Example
if ((TC0_CH1_CompareStatusGet() & TC_COMPARE_C) == true) { TC0_CH1_CompareASet(0x1000U); TC0_CH1_CompareBSet(0x500U); }
Remarks
This function is applicable only for compare mode. Event status bits are cleared after reading the status register.