diff options
| author | Keith Packard <keithp@keithp.com> | 2017-10-12 00:31:26 -0700 | 
|---|---|---|
| committer | Keith Packard <keithp@keithp.com> | 2017-10-12 00:31:26 -0700 | 
| commit | 4431f70044f4e1120d606f0ded1845349295d68e (patch) | |
| tree | 14eb2c3f210db3effa8bd85dd0cc4f5b007528f5 /src/kernel | |
| parent | 77d1aee917306ad59492c4c8352fe2125b430d0c (diff) | |
altos: Add MPU9250 support to self test and data
The remaining hooks to make the MPU9250 work in flight.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/kernel')
| -rw-r--r-- | src/kernel/ao.h | 1 | ||||
| -rw-r--r-- | src/kernel/ao_data.h | 12 | 
2 files changed, 12 insertions, 1 deletions
| diff --git a/src/kernel/ao.h b/src/kernel/ao.h index e56fbb2e..139050cf 100644 --- a/src/kernel/ao.h +++ b/src/kernel/ao.h @@ -78,6 +78,7 @@ typedef AO_PORT_TYPE ao_port_t;  #define AO_PANIC_SELF_TEST_CC1120	0x40 | 1	/* Self test failure */  #define AO_PANIC_SELF_TEST_HMC5883	0x40 | 2	/* Self test failure */  #define AO_PANIC_SELF_TEST_MPU6000	0x40 | 3	/* Self test failure */ +#define AO_PANIC_SELF_TEST_MPU9250	0x40 | 3	/* Self test failure */  #define AO_PANIC_SELF_TEST_MS5607	0x40 | 4	/* Self test failure */  /* Stop the operating system, beeping and blinking the reason */ diff --git a/src/kernel/ao_data.h b/src/kernel/ao_data.h index d62852ef..9a3b389c 100644 --- a/src/kernel/ao_data.h +++ b/src/kernel/ao_data.h @@ -41,6 +41,13 @@  #define AO_DATA_MPU6000	0  #endif +#if HAS_MPU9250 +#include <ao_mpu9250.h> +#define AO_DATA_MPU9250	(1 << 2) +#else +#define AO_DATA_MPU9250	0 +#endif +  #if HAS_HMC5883  #include <ao_hmc5883.h>  #define AO_DATA_HMC5883	(1 << 3) @@ -57,7 +64,7 @@  #ifdef AO_DATA_RING -#define AO_DATA_ALL	(AO_DATA_ADC|AO_DATA_MS5607|AO_DATA_MPU6000|AO_DATA_HMC5883|AO_DATA_MMA655X) +#define AO_DATA_ALL	(AO_DATA_ADC|AO_DATA_MS5607|AO_DATA_MPU6000|AO_DATA_HMC5883|AO_DATA_MMA655X|AO_DATA_MPU9250)  struct ao_data {  	uint16_t			tick; @@ -74,6 +81,9 @@ struct ao_data {  	int16_t				z_accel;  #endif  #endif +#if HAS_MPU9250 +	struct ao_mpu9250_sample	mpu9250; +#endif  #if HAS_HMC5883  	struct ao_hmc5883_sample	hmc5883;  #endif | 
