1.4.25.44 TCCx_Capture16bitCounterGet Function

C

/* x = TCC instance number */
uint16_t TCCx_Capture16bitCounterGet( void );

Summary

Reads the timer current count value.

Description

This function reads the timer count value.

Precondition

TCCx_CaptureInitialize() function must have been called first.

Parameters

None.

Returns

Timer's current count value.

Example

uint16_t counter = 0;
TCC0_CaptureInitialize();
TCC0_CaptureStart();
counter = TCC0_Capture16bitCounterGet();

Remarks

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