diff options
author | Keith Packard <keithp@keithp.com> | 2019-09-16 12:39:09 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2019-09-16 12:39:09 -0700 |
commit | a87698663f8a5ced468755068a0468755d8f2746 (patch) | |
tree | 1624a1d0162d21a73e50e9d92675d0484368d9fa /src/kernel | |
parent | 99525a748e00406424b98a0952f0156437b30b6c (diff) |
altos: Add bmx160 driver
This just adds the driver, it doesn't hook it up yet
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 21ab2747..fb7af24d 100644 --- a/src/kernel/ao.h +++ b/src/kernel/ao.h @@ -75,6 +75,7 @@ typedef AO_PORT_TYPE ao_port_t; #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_BMX160 0x40 | 3 /* Self test failure */ #define AO_PANIC_SELF_TEST_MS5607 0x40 | 4 /* Self test failure */ #define AO_PANIC_SELF_TEST_ADS124S0X 0x40 | 5 /* Self test failure */ diff --git a/src/kernel/ao_data.h b/src/kernel/ao_data.h index 4fc9db8f..55d82e48 100644 --- a/src/kernel/ao_data.h +++ b/src/kernel/ao_data.h @@ -76,6 +76,13 @@ #define AO_DATA_MAX6691 0 #endif +#if HAS_BMX160 +#include <ao_bmx160.h> +#define AO_DATA_BMX160 (1 << 2) +#else +#define AO_DATA_BMX160 0 +#endif + #ifndef HAS_SENSOR_ERRORS #if HAS_IMU || HAS_MMA655X || HAS_MS5607 || HAS_MS5611 #define HAS_SENSOR_ERRORS 1 @@ -88,7 +95,7 @@ extern uint8_t ao_sensor_errors; #ifdef AO_DATA_RING -#define AO_DATA_ALL (AO_DATA_ADC|AO_DATA_MS5607|AO_DATA_MPU6000|AO_DATA_HMC5883|AO_DATA_MMA655X|AO_DATA_MPU9250|AO_DATA_ADXL375) +#define AO_DATA_ALL (AO_DATA_ADC|AO_DATA_MS5607|AO_DATA_MPU6000|AO_DATA_HMC5883|AO_DATA_MMA655X|AO_DATA_MPU9250|AO_DATA_ADXL375|AO_DATA_BMX160) struct ao_data { uint16_t tick; @@ -123,6 +130,9 @@ struct ao_data { #if HAS_ADS131A0X struct ao_ads131a0x_sample ads131a0x; #endif +#if HAS_BMX160 + struct ao_bmx160_sample bmx160; +#endif }; #define ao_data_ring_next(n) (((n) + 1) & (AO_DATA_RING - 1)) |