Quadrature Encoder Interface support driver for hardware abstraction layer.
rt_dev_t qei1;
int position;
// init
qei1 = qei(1);
qei_setConfig(qei1, QEI_X4MODE);
qei_enable(qei1);
// qei read
position = qei_getValue(qei1);
rt_dev_t qei_getFreeDevice();
Gives a free qei device number and opens it
int qei_open(rt_dev_t device);
Opens an qei
int qei_close(rt_dev_t device);
Closes an qei
int qei_enable(rt_dev_t device);
Enables the specified qei device
int qei_disable(rt_dev_t device);
Disables the specified qei device
int qei_setConfig(rt_dev_t device, uint16_t config);
Configures the specified QEI device with bits in config.
qei_type qei_getValue(rt_dev_t device);
Returns the actual position of the specified QEI.
Device assignation, configuration, write and read data are fully functional
Header file : qei.h