blob: 2c74aad3da2e9030d7ff50fc6d8bd3c638d5d706 [file] [log] [blame]
Brian Silverman49876942013-10-11 17:50:26 -07001#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.
8void gyro_init(void);
9
10struct GyroOutput {
11 int64_t angle;
12 int last_reading_bad;
13 int gyro_bad;
Brian Silvermand36b7d32013-10-24 15:56:47 -070014 int initialized;
Brian Silverman49876942013-10-11 17:50:26 -070015};
16// This gets updated in a portENTER_CRITICAL/portEXIT_CRITICAL() block so all of
17// the values will be in sync.
18extern struct GyroOutput gyro_output;
19
20#endif // GYRO_BOARD_SRC_USB_GYRO_H_