1.2.15.5 1.3.17.5 1.5.16.5 1.32.18.5 PDECx_QDECRevolutionsGet Function
C
uint16_t PDECx_QDECRevolutionsGet( void ) // x is instance of the peripheral and it is applicable only for devices having multiple instances of the peripheral.
Summary
Reads the number of revolutions.
Description
This function reads the number of revolutions by reading the revolution bits in the counter register
Precondition
PDECx_QDECInitialize function must have been called first for the given channel.
Parameters
None.
Returns
Returns Position of the encoder. This consists of the angular position and revolution counter.
Example
uint16_t position; PDEC_QDECInitialize(); PDEC_QDECStart(); position = PDEC_QDECRevolutionsGet();
Remarks
None