1.3.23.38 1.4.24.38 1.5.22.38 1.6.24.38 1.7.25.38 1.29.26.38 1.30.16.38 1.31.16.38 1.32.29.38 1.33.18.38 1.37.16.38 1.38.24.38 1.39.21.38 1.40.23.38 TCx_Compare8bitCounterGet Function
C
/* x = TC instance number */
uint8_t TCx_Compare8bitCounterGet( void );
Summary
Reads the timer current count value.
Description
This function reads the timer count value.
Precondition
TCx_CompareInitialize() function must have been called first.
Parameters
None.
Returns
Timer's current count value.
Example
uint8_t counter = 0;
TC0_CompareInitialize();
TC0_CompareStart();
counter = TC0_Compare8bitCounterGet();
Remarks
The caller must know the number of significant bytes of timer. Period value is right-aligned.