make GPIOD init conditional as some stm32f0 don't have it
This commit is contained in:
parent
ef1469c75b
commit
6bf277e685
|
@ -25,6 +25,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "stm32f0xx_hal.h"
|
#include "stm32f0xx_hal.h"
|
||||||
|
#include "stm32f0xx_hal_def.h"
|
||||||
#include "bsp/board_api.h"
|
#include "bsp/board_api.h"
|
||||||
#include "board.h"
|
#include "board.h"
|
||||||
|
|
||||||
|
@ -47,7 +48,9 @@ void board_init(void) {
|
||||||
__HAL_RCC_GPIOA_CLK_ENABLE();
|
__HAL_RCC_GPIOA_CLK_ENABLE();
|
||||||
__HAL_RCC_GPIOB_CLK_ENABLE();
|
__HAL_RCC_GPIOB_CLK_ENABLE();
|
||||||
__HAL_RCC_GPIOC_CLK_ENABLE();
|
__HAL_RCC_GPIOC_CLK_ENABLE();
|
||||||
|
#if defined(GPIOD)
|
||||||
__HAL_RCC_GPIOD_CLK_ENABLE();
|
__HAL_RCC_GPIOD_CLK_ENABLE();
|
||||||
|
#endif
|
||||||
__HAL_RCC_GPIOF_CLK_ENABLE();
|
__HAL_RCC_GPIOF_CLK_ENABLE();
|
||||||
|
|
||||||
// Enable UART Clock
|
// Enable UART Clock
|
||||||
|
|
Loading…
Reference in New Issue