Download Stellaris Peripheral Driver Library User's Guide

Transcript
Quadrature Encoder (QEI)
22.2
API Functions
Functions
void QEIConfigure (unsigned long ulBase, unsigned long ulConfig, unsigned long ulMaxPosition)
long QEIDirectionGet (unsigned long ulBase)
void QEIDisable (unsigned long ulBase)
void QEIEnable (unsigned long ulBase)
tBoolean QEIErrorGet (unsigned long ulBase)
void QEIIntClear (unsigned long ulBase, unsigned long ulIntFlags)
void QEIIntDisable (unsigned long ulBase, unsigned long ulIntFlags)
void QEIIntEnable (unsigned long ulBase, unsigned long ulIntFlags)
void QEIIntRegister (unsigned long ulBase, void (∗pfnHandler)(void))
unsigned long QEIIntStatus (unsigned long ulBase, tBoolean bMasked)
void QEIIntUnregister (unsigned long ulBase)
unsigned long QEIPositionGet (unsigned long ulBase)
void QEIPositionSet (unsigned long ulBase, unsigned long ulPosition)
void QEIVelocityConfigure (unsigned long ulBase, unsigned long ulPreDiv, unsigned long
ulPeriod)
void QEIVelocityDisable (unsigned long ulBase)
void QEIVelocityEnable (unsigned long ulBase)
unsigned long QEIVelocityGet (unsigned long ulBase)
22.2.1 Detailed Description
The quadrature encoder API is broken into three groups of functions: those that deal with position
capture, those that deal with velocity capture, and those that deal with interrupt handling.
The position capture is managed with QEIEnable(), QEIDisable(), QEIConfigure(), and QEIPositionSet(). The positional information is retrieved with QEIPositionGet(), QEIDirectionGet(), and
QEIErrorGet().
The velocity capture is managed with QEIVelocityEnable(), QEIVelocityDisable(), and QEIVelocityConfigure(). The computed encoder velocity is retrieved with QEIVelocityGet().
The interrupt handler for the QEI interrupt is managed with QEIIntRegister() and QEIIntUnregister(). The individual interrupt sources within the QEI module are managed with QEIIntEnable(),
QEIIntDisable(), QEIIntStatus(), and QEIIntClear().
22.2.2 Function Documentation
22.2.2.1 QEIConfigure
Configures the quadrature encoder.
320
September 09, 2011