mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-17 02:03:35 +08:00
distance sensors: remove bus_option array and add it to i2c.h header
This commit is contained in:
committed by
Beat Küng
parent
e15d390f65
commit
6cb17839ee
@@ -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]))
|
||||
Reference in New Issue
Block a user