1.36.18.35 TCx_CHy_QuadratureStatusGet Function

C

/* x = TC instance number, y = channel number */
TC_QUADRATURE_STATUS TCx_QuadratureStatusGet (void)

Summary

Identifies status of the quadrature events

Description

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

Precondition

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

Parameters

None

Returns

status of the capture events as TC_QUADRATURE_STATUS type

Example

uint32_t position;

if ((TC0_QuadratureStatusGet() & TC_QUADRATURE_INDEX) == true)
{
    position = TC0_QuadraturePositionGet()
}

Remarks

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