made spi_init() called from mcu_init() when PERIPHERALS_AUTO_INIT is defined

This commit is contained in:
Antoine Drouin
2010-12-06 01:40:33 +01:00
parent eea4e8c6ea
commit 357a1eaa13
3 changed files with 8 additions and 18 deletions
+8 -2
View File
@@ -45,6 +45,9 @@
#ifdef USE_USB_SERIAL
#include "mcu_periph/usb_serial.h"
#endif
#ifdef USE_SPI
#include "mcu_periph/spi.h"
#endif
#endif /* PERIPHERALS_AUTO_INIT */
void mcu_init(void) {
@@ -86,11 +89,14 @@ void mcu_init(void) {
#ifdef USE_I2C2
i2c2_init();
#endif
#ifdef USE_ADC
adc_init();
#endif
#ifdef USE_USB_SERIAL
VCOM_init();
#endif
#ifdef USE_ADC
adc_init();
#ifdef USE_SPI
spi_init();
#endif
#endif /* PERIPHERALS_AUTO_INIT */