From 8c2d86d55cd670851527485765f8e0694374dc3d Mon Sep 17 00:00:00 2001 From: Pavel Kirienko Date: Sat, 10 Oct 2015 17:50:25 +0300 Subject: [PATCH] STM32 demo board init fix --- libuavcan_drivers/stm32/test_stm32f107/src/board/board.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libuavcan_drivers/stm32/test_stm32f107/src/board/board.cpp b/libuavcan_drivers/stm32/test_stm32f107/src/board/board.cpp index f1e3d7a923..3f9bdd86ba 100644 --- a/libuavcan_drivers/stm32/test_stm32f107/src/board/board.cpp +++ b/libuavcan_drivers/stm32/test_stm32f107/src/board/board.cpp @@ -88,12 +88,12 @@ void boardInit(void) * This is why we can't perform this initialization using ChibiOS GPIO configuration. */ RCC->APB1ENR |= RCC_APB1ENR_CAN1EN; + palSetPadMode(GPIOD, 1, PAL_MODE_STM32_ALTERNATE_PUSHPULL); + #if UAVCAN_STM32_NUM_IFACES > 1 RCC->APB1ENR |= RCC_APB1ENR_CAN2EN; -#endif - - palSetPadMode(GPIOD, 1, PAL_MODE_STM32_ALTERNATE_PUSHPULL); palSetPadMode(GPIOB, 6, PAL_MODE_STM32_ALTERNATE_PUSHPULL); +#endif } }