Brian Silverman | 4987694 | 2013-10-11 17:50:26 -0700 | [diff] [blame^] | 1 | #ifndef GYRO_BOARD_SRC_USB_GYRO_H_ |
| 2 | #define GYRO_BOARD_SRC_USB_GYRO_H_ |
| 3 | |
| 4 | #include <stdint.h> |
| 5 | |
| 6 | // Does everything to set up the gyro code, including starting a task which |
| 7 | // reads and integrates the gyro values and blinks the LEDs etc. |
| 8 | void gyro_init(void); |
| 9 | |
| 10 | struct GyroOutput { |
| 11 | int64_t angle; |
| 12 | int last_reading_bad; |
| 13 | int gyro_bad; |
| 14 | }; |
| 15 | // This gets updated in a portENTER_CRITICAL/portEXIT_CRITICAL() block so all of |
| 16 | // the values will be in sync. |
| 17 | extern struct GyroOutput gyro_output; |
| 18 | |
| 19 | #endif // GYRO_BOARD_SRC_USB_GYRO_H_ |