2.91.13 QEIx_ModuloRangeSet Function

C

/* x refers to the instance number */

inline static void QEIx_ModuloRangeSet(uint32_t countsPerRevolution)

Summary

Sets the 32bit modulo count value.

Description

This function sets the 32 bit modulo count value when QEIx is configured to operate in 'Modulo Count' mode. The lower bound controlled by the QEILEC register is set to 0.

Precondition

QEI peripheral should be initialized and enabled properly.

Parameters

ParamDescription
countsPerRevolutionModulus number of counts per wraparound

Returns

None.

Example

QEI1_Initialize();
QEI1_Enable();
QEI1_ModuloRangeSet(0xA);

Remarks

QEIx should be operating in Modulo Count mode.