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.
This commit is contained in:
David Sidrane
2017-08-08 21:45:01 +02:00
committed by Lorenz Meier
parent 98396a0bc5
commit 9a21969189
+2
View File
@@ -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 <chip.h>
# 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 <stm32_tim.h>
# include <stm32_spi.h>