Brian Silverman | f92396c | 2013-09-12 20:13:13 -0700 | [diff] [blame] | 1 | #ifndef GYRO_BOARD_USB_ENCODER_H_ |
2 | #define GYRO_BOARD_USB_ENCODER_H_ | ||||
3 | |||||
4 | #include <stdint.h> | ||||
5 | |||||
6 | void encoder_init(void); | ||||
7 | |||||
8 | // For debugging only. | ||||
9 | // Returns the current values of the inputs for the given encoder (as the low 2 | ||||
10 | // bits). | ||||
11 | int encoder_bits(int channel); | ||||
12 | |||||
13 | // Returns the current position of the given encoder. | ||||
14 | int32_t encoder_val(int channel); | ||||
15 | |||||
16 | #endif // GYRO_BOARD_USB_ENCODER_H_ |