mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-05-30 03:27:33 +08:00
[spi] add spi_init_slaves back and fix makefile for b2
This commit is contained in:
@@ -46,11 +46,11 @@ imu_srcs += peripherals/max1168.c
|
||||
imu_srcs += $(SRC_ARCH)/peripherals/max1168_arch.c
|
||||
|
||||
include $(CFG_SHARED)/spi.makefile
|
||||
imu.CFLAGS += -DUSE_SPI_SLAVE0
|
||||
imu.CFLAGS += -DSPI_MASTER
|
||||
imu_CFLAGS += -DUSE_SPI_SLAVE0
|
||||
imu_CFLAGS += -DSPI_MASTER
|
||||
|
||||
ifeq ($(ARCH), lpc21)
|
||||
imu.CFLAGS += -DUSE_SPI1
|
||||
imu_CFLAGS += -DUSE_SPI1
|
||||
imu_CFLAGS += -DSSP_VIC_SLOT=9
|
||||
imu_CFLAGS += -DMAX1168_EOC_VIC_SLOT=8
|
||||
else ifeq ($(ARCH), stm32)
|
||||
|
||||
@@ -109,6 +109,9 @@ void mcu_init(void) {
|
||||
#if USE_SPI2
|
||||
spi2_init();
|
||||
#endif
|
||||
#if USE_SPI0 || USE_SPI1 || USE_SPI2
|
||||
spi_init_slaves();
|
||||
#endif
|
||||
#if USE_SPI0_SLAVE
|
||||
spi0_slave_init();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user