distance sensors: remove bus_option array and add it to i2c.h header

This commit is contained in:
DanielePettenuzzo
2018-07-03 17:33:18 +02:00
committed by Beat Küng
parent e15d390f65
commit 6cb17839ee
6 changed files with 28 additions and 100 deletions
+18
View File
@@ -37,3 +37,21 @@
#else
#include "posix/I2C.hpp"
#endif
static const int i2c_bus_options[] = {
#ifdef PX4_I2C_BUS_EXPANSION
PX4_I2C_BUS_EXPANSION,
#endif
#ifdef PX4_I2C_BUS_EXPANSION1
PX4_I2C_BUS_EXPANSION1,
#endif
#ifdef PX4_I2C_BUS_EXPANSION2
PX4_I2C_BUS_EXPANSION2,
#endif
#ifdef PX4_I2C_BUS_ONBOARD
PX4_I2C_BUS_ONBOARD,
#endif
};
#define NUM_I2C_BUS_OPTIONS (sizeof(i2c_bus_options)/sizeof(i2c_bus_options[0]))