1.14.2.10 CCPx_Timer32bitCounterGet Function

C

/* x = CCP instance number */

uint32_t CCPx_Timer32bitCounterGet( void );

Summary

Reads the timer current count value.

Description

This function reads the timer count value.

Precondition

CCPx_TimerInitialize() function must have been called first.

Parameters

None.

Returns

uint32_t - The timer's current count value.

Example

uint32_t counter = 0;
CCP1_TimerInitialize();
CCP1_TimerStart();
counter = CCP1_Timer32bitCounterGet();

Remarks

The caller must know the number of significant bytes of timer. Period value is right-aligned.