From e35be68fd48fbb79af50c4ce38dec19d31dc4576 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Thu, 21 Jun 2018 13:01:30 -1000 Subject: [PATCH] NXPhlite work arround to internal i2c routed to external connector. Since the only device on the bus is the barro, int or ext does not apply. This will be fixed on the rev > RC15. This defines an alias that can be used to condition the buss logic connection logic px4_i2c_bus_external to return external. --- ROMFS/px4fmu_common/init.d/rc.sensors | 7 +++++-- src/drivers/boards/nxphlite-v3/board_config.h | 6 +++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/rc.sensors b/ROMFS/px4fmu_common/init.d/rc.sensors index a764dfa5a0..2413933c69 100644 --- a/ROMFS/px4fmu_common/init.d/rc.sensors +++ b/ROMFS/px4fmu_common/init.d/rc.sensors @@ -107,8 +107,11 @@ fi if ver hwcmp NXPHLITE_V3 then - # Internal I2C (baro) - mpl3115a2 -I start + # External I2C bus + hmc5883 -C -X start + + # Onboard I2C (baro) but an external bus on V3 RC15 + mpl3115a2 -X start # Internal SPI (accel + mag) fxos8701cq start -a 8 -R 0 diff --git a/src/drivers/boards/nxphlite-v3/board_config.h b/src/drivers/boards/nxphlite-v3/board_config.h index 894ef99e24..a58b4f8987 100644 --- a/src/drivers/boards/nxphlite-v3/board_config.h +++ b/src/drivers/boards/nxphlite-v3/board_config.h @@ -259,9 +259,9 @@ __BEGIN_DECLS /* I2C busses */ #define PX4_I2C_BUS_EXPANSION PX4_BUS_NUMBER_TO_PX4(0) -#define PX4_I2C_BUS_ONBOARD PX4_BUS_NUMBER_TO_PX4(1) - -#define PX4_I2C_BUS_LED PX4_I2C_BUS_EXPANSION +#define PX4_I2C_BUS_EXPANSION1 PX4_BUS_NUMBER_TO_PX4(1) // V3 RC15 has mpl3115a2 on onboard but this goes to a connector +// So it is treated as external. +#define PX4_I2C_BUS_LED PX4_I2C_BUS_EXPANSION1 /* * ADC channels