1.33.19.45 TCCx_Capture16bitValueGet Function

C

/* x = TCC instance number */
uint16_t TCCx_Capture16bitValueGet( TCCx_CHANNEL_NUM channel );

Summary

Reads capture value from given channel.

Description

This function reads the captured value stored in CC[x]. Value can be read from interrupt routine or by polling.

Precondition

TCCx_CaptureInitialize() function must have been called first.

Parameters

Param Description
channel capture channel number

Returns

Captured value from given channel

Example

uint16_t captureValue = 0;
TCC0_CaptureInitialize();
TCC0_CaptureStart();
captureValue = TCC0_Capture16bitValueGet(TCC0_CHANNEL0);

Remarks

None.