1.10.22.3 1.11.22.3 1.12.23.3 1.13.21.3 1.14.16.3 1.15.17.3 1.16.23.3 1.17.19.3 1.18.19.3 1.19.19.3 1.20.23.3 1.21.24.3 1.22.27.3 1.23.25.3 1.24.22.3 TMRx_CounterGet Function
C
/* x = TMR instance number */
uint16_t TMRx_CounterGet(void);
Summary
Reads the timer counter value.
Description
This function reads the timer counter value.
Precondition
TMRx_Initialize() function must have been called first.
Parameters
None.
Returns
The timer's current count value.
Example
uint16_t counter; TMR2_Initialize(); TMR2_Start(); counter = TMR2_CounterGet();
Remarks
If timer is operating on 32 bit mode then return value should be uint32_t type.