mirror of
https://github.com/paparazzi/paparazzi.git
synced 2026-06-01 21:07:40 +08:00
[spi][stm32] get rid of stupid remapping, SPI3 is now really spi3 (spi0 doesn't exist on stm32)
This commit is contained in:
+11
-3
@@ -49,7 +49,7 @@
|
||||
#ifdef USE_USB_SERIAL
|
||||
#include "mcu_periph/usb_serial.h"
|
||||
#endif
|
||||
#if USE_SPI0 || USE_SPI1 || USE_SPI2 || USE_SPI0_SLAVE || USE_SPI1_SLAVE || USE_SPI2_SLAVE
|
||||
#if USE_SPI
|
||||
#include "mcu_periph/spi.h"
|
||||
#endif
|
||||
#ifdef USE_DAC
|
||||
@@ -103,6 +103,10 @@ void mcu_init(void) {
|
||||
#ifdef USE_USB_SERIAL
|
||||
VCOM_init();
|
||||
#endif
|
||||
|
||||
#if USE_SPI
|
||||
#if SPI_MASTER
|
||||
|
||||
#if USE_SPI0
|
||||
spi0_init();
|
||||
#endif
|
||||
@@ -112,9 +116,10 @@ void mcu_init(void) {
|
||||
#if USE_SPI2
|
||||
spi2_init();
|
||||
#endif
|
||||
#if USE_SPI0 || USE_SPI1 || USE_SPI2
|
||||
spi_init_slaves();
|
||||
#endif
|
||||
#endif // SPI_MASTER
|
||||
|
||||
#if SPI_SLAVE
|
||||
#if USE_SPI0_SLAVE
|
||||
spi0_slave_init();
|
||||
#endif
|
||||
@@ -124,6 +129,9 @@ void mcu_init(void) {
|
||||
#if USE_SPI2_SLAVE
|
||||
spi2_slave_init();
|
||||
#endif
|
||||
#endif // SPI_SLAVE
|
||||
#endif // USE_SPI
|
||||
|
||||
#ifdef USE_DAC
|
||||
dac_init();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user