1.10.17.1 QEIx_VelocityGet Function
C
/* x = QEI instance number */ uint32_t QEIx_VelocityGet ( void )
Summary
Reads the velocity counter from the quadrature encoder.
Description
This function reads the velocity counter. The contents of the counter represent the distance traveled during the time between samples.
Precondition
QEIx_Initialize function must have been called first for the given channel.
Parameters
None.
Returns
uint32_t - number of samples since the last read
Example
uint32_t velocity; QEI1_Initialize(); QEI1_Start(); velocity = QEI1_VelocityGet();
Remarks
The velocity counter is automatically cleared after every processor read of the velocity counter.