Jump to main content

##

# 2.91.6 QEIx_RevolutionsGet Function

## C

    /* x = QEI instance number */

    uint32_t QEIx_RevolutionsGet ( void )

## Summary

Reads the number of revolutions tracked by the quadrature encoder.

## Description

This function reads the revolution counter. The contents of the counter represent the number of revolutions tracked by the quadrature encoder.

## Precondition

QEIx_Initialize function must have been called first for the given channel.

## Parameters

None.

## Returns

revolutions - number of revolutions

## Example

    uint32_t velocity;

    QEI1_Initialize();
    QEI1_Start();
    velocity = QEI1_RevolutionsGet();

## Remarks

Revolution counter is updated every index signal.