1.8.22.35 1.25.23.35 1.26.20.35 1.27.23.35 1.28.25.35 1.34.23.35 1.35.16.35 1.36.18.35 1.41.21.35 1.42.20.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.