From: Bdale Garbee Date: Sun, 22 May 2022 18:42:59 +0000 (-0600) Subject: Merge branch 'ads131' into telestatic-v4 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=2b7a6a5fbe3840b789ea246953de13f0b9500362;p=fw%2Faltos Merge branch 'ads131' into telestatic-v4 --- 2b7a6a5fbe3840b789ea246953de13f0b9500362 diff --cc src/kernel/ao.h index 9ca2c60e,a02b74e4..e140d6c9 --- a/src/kernel/ao.h +++ b/src/kernel/ao.h @@@ -80,9 -75,8 +80,9 @@@ 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 */ + #define AO_PANIC_SELF_TEST_ADS 0x40 | 5 /* Self test failure */ /* Stop the operating system, beeping and blinking the reason */ void diff --cc src/kernel/ao_data.h index 0f96cb89,7c5c20d0..6237982c --- a/src/kernel/ao_data.h +++ b/src/kernel/ao_data.h @@@ -83,29 -76,19 +83,36 @@@ #define AO_DATA_MAX6691 0 #endif +#if HAS_BMX160 +#include +#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 +#endif +#endif + +#if HAS_SENSOR_ERRORS +extern uint8_t ao_sensor_errors; +#endif + + #if HAS_ADS131A0X + #include + #define AO_DATA_ADS131A0X (1 << 4) + #else + #define AO_DATA_ADS131A0X 0 + #endif + #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|AO_DATA_MMC5983) struct ao_data { - uint16_t tick; + AO_TICK_TYPE tick; #if HAS_ADC struct ao_adc adc; #endif