UoS³ Flight Computer Firmware
 All Data Structures Files Functions Groups Pages
imu.h
1 
11 #ifndef __IMU_H__
12 #define __IMU_H__
13 
14 #include <stdint.h>
15 #include <stdbool.h>
16 
17 typedef enum
18 {
19  IMU_BW_5HZ,
20  IMU_BW_10HZ,
21  IMU_BW_20HZ,
22  IMU_BW_41HZ,
23  IMU_BW_92HZ,
24  IMU_BW_184HZ,
25  IMU_BW_460HZ
26 } imu_bandwidth_t;
27 
28 typedef enum
29 {
30  IMU_ACCEL_2G,
31  IMU_ACCEL_4G,
32  IMU_ACCEL_8G,
33  IMU_ACCEL_16G
34 } imu_accel_sensitivity_t;
35 
36 typedef enum
37 {
38  IMU_GYRO_250DEG_S,
39  IMU_GYRO_500DEG_S,
40  IMU_GYRO_1000DEG_S,
41  IMU_GYRO_2000DEG_S
42 } imu_gyro_sensitivity_t;
43 
51 void IMU_Init(void);
52 
61 bool IMU_selftest(void);
62 
73 void IMU_read_accel(int16_t *accel_x, int16_t *accel_y, int16_t *accel_z);
74 
85 void IMU_read_gyro(int16_t *gyro_x, int16_t *gyro_y, int16_t *gyro_z);
86 
97 void IMU_read_magno(int16_t *magno_x, int16_t *magno_y, int16_t *magno_z);
98 
107 void IMU_read_temp(int16_t *temp_imu);
108 
109 void IMU_set_accel_sensitivity(imu_accel_sensitivity_t imu_accel_sensitivity);
110 void IMU_set_accel_bandwidth(imu_bandwidth_t imu_accel_bandwidth);
111 
112 void IMU_set_gyro_sensitivity(imu_gyro_sensitivity_t imu_gyro_sensitivity);
113 void IMU_set_gyro_bandwidth(imu_bandwidth_t imu_gyro_bandwidth);
114 
115 
116 
117 #endif /* __IMU_H__ */
void IMU_read_temp(int16_t *temp_imu)
Definition: imu.c:197
void IMU_Init(void)
Definition: imu.c:43
bool IMU_selftest(void)
Definition: imu.c:164
void IMU_read_magno(int16_t *magno_x, int16_t *magno_y, int16_t *magno_z)
Definition: imu.c:187
void IMU_read_gyro(int16_t *gyro_x, int16_t *gyro_y, int16_t *gyro_z)
Definition: imu.c:178
void IMU_read_accel(int16_t *accel_x, int16_t *accel_y, int16_t *accel_z)
Definition: imu.c:171