diff --git a/nuttx-configs/auav-x21/include/board.h b/nuttx-configs/auav-x21/include/board.h index c5ba583ac6a8..215f5e8fa132 100755 --- a/nuttx-configs/auav-x21/include/board.h +++ b/nuttx-configs/auav-x21/include/board.h @@ -261,6 +261,10 @@ #define GPIO_I2C1_SDA GPIO_I2C1_SDA_2 #define GPIO_I2C1_SCL_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN8) #define GPIO_I2C1_SDA_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN9) +#define GPIO_I2C2_SCL GPIO_I2C2_SCL_1 +#define GPIO_I2C2_SDA GPIO_I2C2_SDA_1 +#define GPIO_I2C2_SCL_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN10) +#define GPIO_I2C2_SDA_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN11) /* * SPI diff --git a/nuttx-configs/auav-x21/nsh/defconfig b/nuttx-configs/auav-x21/nsh/defconfig index db2bd5d314b8..010de67c5f6b 100644 --- a/nuttx-configs/auav-x21/nsh/defconfig +++ b/nuttx-configs/auav-x21/nsh/defconfig @@ -423,7 +423,7 @@ CONFIG_STM32_DMA2=y # CONFIG_STM32_FSMC is not set # CONFIG_STM32_HASH is not set CONFIG_STM32_I2C1=y -# CONFIG_STM32_I2C2 is not set +CONFIG_STM32_I2C2=y # CONFIG_STM32_I2C3 is not set # CONFIG_STM32_OPAMP is not set CONFIG_STM32_OTGFS=y diff --git a/src/drivers/boards/auav-x21/board_config.h b/src/drivers/boards/auav-x21/board_config.h index e10976462b9e..56f8f90f8af1 100644 --- a/src/drivers/boards/auav-x21/board_config.h +++ b/src/drivers/boards/auav-x21/board_config.h @@ -109,9 +109,10 @@ /* I2C busses */ -/* There is no I2C2 so there is not notion of internal / external*/ -#define PX4_I2C_BUS_EXPANSION 1 -#define PX4_I2C_BUS_LED PX4_I2C_BUS_EXPANSION +/* I2C busses */ +#define PX4_I2C_BUS_EXPANSION 1 +#define PX4_I2C_BUS_ONBOARD 2 +#define PX4_I2C_BUS_LED PX4_I2C_BUS_ONBOARD /* Devices not on the onboard bus. *