i2c_spi_buses: respect CONFIG_I2C and CONFIG_SPI

- bmp280, dps310, and ms5611 barometers support boards without I2C
This commit is contained in:
Daniel Agar
2021-09-20 12:06:45 -04:00
parent eade2915c1
commit 7b7b7acd36
54 changed files with 529 additions and 282 deletions
@@ -48,11 +48,16 @@
// I2C
#define CONFIG_I2C 1
#define PX4_NUMBER_I2C_BUSES 2
#define PX4_I2C_OBDEV_MPU9250 0x68
// SPI
#define CONFIG_SPI 1
// ADC channels:
#define ADC_CHANNELS (1 << 5)
#define BOARD_ADC_POS_REF_V (1.8f)
+4
View File
@@ -35,4 +35,8 @@
#include <drivers/drv_sensor.h>
constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
initSPIBus(1, {
initSPIDevice(DRV_DEVTYPE_UNUSED, 1), // spidev1.1
initSPIDevice(DRV_DEVTYPE_UNUSED, 2), // spidev1.2
}),
};