Skip to content

Commit

Permalink
Minor format
Browse files Browse the repository at this point in the history
  • Loading branch information
HiFiPhile committed Apr 1, 2024
1 parent 4fcfb30 commit 4b99370
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 19 deletions.
17 changes: 4 additions & 13 deletions hw/bsp/stm32h5/boards/stm32h503nucleo/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ extern "C" {
//--------------------------------------------------------------------+
// RCC Clock
//--------------------------------------------------------------------+
static inline void SystemClock_Config(void)
{
static inline void SystemClock_Config(void) {
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};

Expand All @@ -81,10 +80,7 @@ static inline void SystemClock_Config(void)
RCC_OscInitStruct.PLL.PLLRGE = RCC_PLL1_VCIRANGE_1;
RCC_OscInitStruct.PLL.PLLVCOSEL = RCC_PLL1_VCORANGE_WIDE;
RCC_OscInitStruct.PLL.PLLFRACN = 0;
if (HAL_RCC_OscConfig(&RCC_OscInitStruct) != HAL_OK)
{
Error_Handler();
}
HAL_RCC_OscConfig(&RCC_OscInitStruct);

/** Initializes the CPU, AHB and APB buses clocks
*/
Expand All @@ -96,11 +92,7 @@ static inline void SystemClock_Config(void)
RCC_ClkInitStruct.APB1CLKDivider = RCC_HCLK_DIV1;
RCC_ClkInitStruct.APB2CLKDivider = RCC_HCLK_DIV1;
RCC_ClkInitStruct.APB3CLKDivider = RCC_HCLK_DIV1;

if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5) != HAL_OK)
{
Error_Handler();
}
HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_5);

// Configure CRS clock source
__HAL_RCC_CRS_CLK_ENABLE();
Expand All @@ -123,8 +115,7 @@ static inline void SystemClock_Config(void)
__HAL_RCC_USB_CLK_ENABLE();
}

static inline void board_enable_vdd_usb(void)
{
static inline void board_enable_vdd_usb(void) {
// USB in STM32H503RB does not require enabling VDD
}

Expand Down
6 changes: 2 additions & 4 deletions hw/bsp/stm32h5/boards/stm32h563nucleo/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ extern "C" {
//--------------------------------------------------------------------+
// RCC Clock
//--------------------------------------------------------------------+
static inline void SystemClock_Config(void)
{
static inline void SystemClock_Config(void) {
RCC_OscInitTypeDef RCC_OscInitStruct = {0};
RCC_ClkInitTypeDef RCC_ClkInitStruct = {0};

Expand Down Expand Up @@ -123,8 +122,7 @@ static inline void SystemClock_Config(void)
__HAL_RCC_USB_CLK_ENABLE();
}

static inline void board_enable_vdd_usb(void)
{
static inline void board_enable_vdd_usb(void) {
/* Enable VDDUSB to power on USB peripheral */
HAL_PWREx_EnableVddUSB();
}
Expand Down
3 changes: 1 addition & 2 deletions hw/bsp/stm32h5/boards/stm32h573i_dk/board.h
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,7 @@ static inline void SystemClock_Config(void) {
__HAL_RCC_USB_CLK_ENABLE();
}

static inline void board_enable_vdd_usb(void)
{
static inline void board_enable_vdd_usb(void) {
/* Enable VDDUSB to power on USB peripheral */
HAL_PWREx_EnableVddUSB();
}
Expand Down

0 comments on commit 4b99370

Please sign in to comment.