Download Stellaris Peripheral Driver Library User's Guide

Transcript
Quadrature Encoder
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)
12.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().
12.2.2 Function Documentation
12.2.2.1 QEIConfigure
Configures the quadrature encoder.
Prototype:
void
QEIConfigure(unsigned long ulBase,
unsigned long ulConfig,
unsigned long ulMaxPosition)
Parameters:
ulBase is the base address of the quadrature encoder module.
ulConfig is the configuration for the quadrature encoder. See below for a description of this
parameter.
ulMaxPosition specifies the maximum position value.
154
October 11, 2007