void RCC_Config(void) { /* -- Enable LED port clock -- */ LED_GPIO_CLK_ENABLE(); /* -- Enable GPIO clocks for UART/DEBUG -- */ UART_DBG_RX_GPIO_CLK_ENABLE(); UART_DBG_TX_GPIO_CLK_ENABLE(); UART_DBG_RCC_CLK_ENABLE(); }
void LED_Init() { LED_GPIO_CLK_ENABLE(); GPIO_InitTypeDef GPIO_InitStruct; GPIO_InitStruct.Pin = LED_PIN; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_PULLUP; GPIO_InitStruct.Speed = GPIO_SPEED_HIGH; HAL_GPIO_Init(LED_GPIO_PORT, &GPIO_InitStruct); }