Nuvo-2500 Series User’s Manual
Copyright © 2015 Neousys Technology Inc. All Right Reserved.
Page 148 of 154
5.8.1.6 QEI_GetPosition
Gets the current encoder position.
Syntax
BOOL QEI_GetPosition(DWORD idx, DWORD *lpPosition);
Description
This function gets the current position of the encoder.
Parameter
idx
[in]
Specifies the index of QEI controllers. Currently there is only one QEI
controller.
lpPosition
[out]
Points to the DWORD value specifies current position of the encoder.
Return Value
Returns TRUE if operation successes, FALSE if operation failed.
Usage
DWORD pos = 0;
BOOL ret = QEI_GetPosition(0, &pos);