1.14.2.25 1.15.2.25 CCPx_Compare16bitValueGet Function
C
/* x = CCP instance number */
uint16_t CCPx_Compare16bitValueGet( void )
Summary
Reads the timer current count value.
Description
This function reads the timer count value.
Precondition
CCPx_CompareInitialize() function must have been called first.
Parameters
None.
Returns
uint16_t - The timer's current count value.
Example
uint16_t counter = 0;
CCP1_CompareInitialize();
CCP1_CompareStart();
counter = CCP1_Compare16bitValueGet();
Remarks
The caller must know the number of significant bytes of timer. Period value is right-aligned.