From 9a21969189ab74669f4471f3a233b464e8295bd5 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Mon, 7 Aug 2017 15:41:52 -1000 Subject: [PATCH] px4_micro_hal:Define PX4_NUMBER_I2C_BUSES based on the arch/chip PX4_NUMBER_I2C_BUSES number of busses that the HW can support not all of them my be usesd. I.E. The STM32F427 has 3 I2C busses but only I2C1 and I2C3 are used. --- src/platforms/px4_micro_hal.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/platforms/px4_micro_hal.h b/src/platforms/px4_micro_hal.h index e50deaad1f..cd2e4ce5dd 100644 --- a/src/platforms/px4_micro_hal.h +++ b/src/platforms/px4_micro_hal.h @@ -48,12 +48,14 @@ __BEGIN_DECLS # define PX4_BBSRAM_SIZE STM32_BBSRAM_SIZE # define PX4_BBSRAM_GETDESC_IOCTL STM32_BBSRAM_GETDESC_IOCTL # define PX4_FLASH_BASE STM32_FLASH_BASE +# define PX4_NUMBER_I2C_BUSES STM32_NI2C # endif # if defined(CONFIG_ARCH_CHIP_STM32F7) # include # define PX4_BBSRAM_SIZE STM32F7_BBSRAM_SIZE # define PX4_BBSRAM_GETDESC_IOCTL STM32F7_BBSRAM_GETDESC_IOCTL # define PX4_FLASH_BASE 0x08000000 +# define PX4_NUMBER_I2C_BUSES STM32F7_NI2C # endif # include # include