1.27.23.26 TCx_CHy_CaptureStatusGet Function

C

/* x = TC instance number, y = channel number */
TCx_CAPTURE_STATUS TCx_CHy_CaptureStatusGet ( void )

Summary

Identifies status of the capture events

Description

This function returns the status of the events that occur in capture mode.

Precondition

TCx_CHy_TimerInitialize() function must have been called first for the given channel to configure channel in capture mode.

Parameters

None

Returns

TCx_CAPTURE_STATUS - status of the capture events

Example

uint16_t capture;

if ((TC0_CH1_CaptureStatusGet() & TC_CAPTURE_A_LOAD) == true)
{
    capture = TC0_CH1_CaptureAGet();
}

Remarks

This function is applicable only for capture mode. Event status bits are cleared after reading the status register.