1.2.24.23 1.3.24.23 1.4.25.23 1.5.23.23 1.6.25.23 1.7.26.23 1.29.27.23 1.30.17.23 1.31.17.23 1.33.19.23 1.37.17.23 1.40.24.23 TCCx_Compare16bitCounterGet Function
C
/* x = TCC instance number */
uint16_t TCCx_Compare16bitCounterGet( void );
Summary
Reads the timer current count value.
Description
This function reads the timer count value.
Precondition
TCCx_CompareInitialize() function must have been called first.
Parameters
None.
Returns
Timer's current count value.
Example
uint16_t counter = 0;
TCC0_CompareInitialize();
TCC0_CompareStart();
counter = TCC0_Compare16bitCounterGet();
Remarks
The caller must know the number of significant bytes of timer. Period value is right-aligned.