1.14.2.31 1.15.2.31 CCPx_Compare16bitPeriodValueGet Function
C
/* x = CCP instance number */
uint16_t CCPx_Compare16bitPeriodValueGet( void )
Summary
Reads the period value of given timer.
Description
This function reads the value of period.
Precondition
CCPx_CompareInitialize() function must have been called first.
Parameters
None.
Returns
uint16_t - The timer's period value.
Example
uint16_t period = 0;
CCP1_CompareInitialize();
period = CCP1_Compare16bitPeriodValueGet();
Remarks
The caller must know the number of significant bytes of timer. Period value is right-aligned.