Function rc_encoder_pru_init#

Function Documentation#

int rc_encoder_pru_init(void)#

Initializes the pru encoder counter for channel 4.

This also resets the encoder position to 0 so the first position read is consistent. Note this does NOT initialize the eqep-accelerated encoder counters on channels 1-3. To use channels 1-3 you must use <rc/encoder_eqep.h>

Returns:

0 on success or -1 on failure