1.2.24.3 1.3.24.3 1.4.25.3 1.5.23.3 1.6.25.3 1.7.26.3 1.29.27.3 1.30.17.3 1.31.17.3 1.33.19.3 1.37.17.3 1.40.24.3 TCCx_Timer16bitCounterGet Function
C
/* x = TCC instance number */
uint16_t TCCx_Timer16bitCounterGet( void );
Summary
Reads the timer current count value.
Description
This function reads the timer count value.
Precondition
TCCx_TimerInitialize() function must have been called first.
Parameters
None.
Returns
Timer's current count value.
Example
uint16_t counter = 0;
TCC0_TimerInitialize();
TCC0_TimerStart();
counter = TCC0_Timer16bitCounterGet();
Remarks
The caller must know the number of significant bytes of timer. Period value is right-aligned.