Skip to content

Commit cedb104

Browse files
committed
STM32F0 astyle
1 parent c02cb71 commit cedb104

File tree

5 files changed

+11
-9
lines changed

5 files changed

+11
-9
lines changed

targets/TARGET_STM/TARGET_STM32F0/TARGET_STM32F070xB/system_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ MBED_WEAK uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
9595
//Select HSI as system clock source to allow modification of the PLL configuration
9696
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK;
9797
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
98-
if(HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
98+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
9999
return 0; // FAIL
100100
}
101101

targets/TARGET_STM/TARGET_STM32F0/TARGET_STM32F072xB/system_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ MBED_WEAK uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
9595
//Select HSI as system clock source to allow modification of the PLL configuration
9696
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK;
9797
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
98-
if(HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
98+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
9999
return 0; // FAIL
100100
}
101101

targets/TARGET_STM/TARGET_STM32F0/TARGET_STM32F091xC/system_clock.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ MBED_WEAK uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
9595
//Select HSI as system clock source to allow modification of the PLL configuration
9696
RCC_ClkInitStruct.ClockType = RCC_CLOCKTYPE_SYSCLK;
9797
RCC_ClkInitStruct.SYSCLKSource = RCC_SYSCLKSOURCE_HSI;
98-
if(HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
98+
if (HAL_RCC_ClockConfig(&RCC_ClkInitStruct, FLASH_LATENCY_1) != HAL_OK) {
9999
return 0; // FAIL
100100
}
101101

targets/TARGET_STM/TARGET_STM32F0/cmsis_nvic.c

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,26 @@
1818

1919
#define NVIC_USER_IRQ_OFFSET 16
2020

21-
void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
21+
void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector)
22+
{
2223
int i;
2324

2425
// Copy and switch to dynamic vectors if first time called
2526
if ((SYSCFG->CFGR1 & SYSCFG_CFGR1_MEM_MODE) != SYSCFG_CFGR1_MEM_MODE) {
2627
uint32_t *old_vectors = (uint32_t *)NVIC_FLASH_VECTOR_ADDRESS;
2728
for (i = 0; i < NVIC_NUM_VECTORS; i++) {
28-
*((uint32_t *)(NVIC_RAM_VECTOR_ADDRESS + (i*4))) = old_vectors[i];
29+
*((uint32_t *)(NVIC_RAM_VECTOR_ADDRESS + (i * 4))) = old_vectors[i];
2930
}
3031
SYSCFG->CFGR1 |= SYSCFG_CFGR1_MEM_MODE; // Embedded SRAM mapped at 0x00000000
3132
}
3233

3334
// Set the vector
34-
*((uint32_t *)(NVIC_RAM_VECTOR_ADDRESS + (IRQn*4) + (NVIC_USER_IRQ_OFFSET*4))) = vector;
35+
*((uint32_t *)(NVIC_RAM_VECTOR_ADDRESS + (IRQn * 4) + (NVIC_USER_IRQ_OFFSET * 4))) = vector;
3536
}
3637

37-
uint32_t NVIC_GetVector(IRQn_Type IRQn) {
38-
uint32_t *vectors = (uint32_t*)NVIC_RAM_VECTOR_ADDRESS;
38+
uint32_t NVIC_GetVector(IRQn_Type IRQn)
39+
{
40+
uint32_t *vectors = (uint32_t *)NVIC_RAM_VECTOR_ADDRESS;
3941
// Return the vector
4042
return vectors[IRQn + 16];
4143
}

targets/TARGET_STM/TARGET_STM32F0/us_ticker_data.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#define __US_TICKER_DATA_H
1818

1919
#ifdef __cplusplus
20-
extern "C" {
20+
extern "C" {
2121
#endif
2222

2323
#include "stm32f0xx.h"

0 commit comments

Comments
 (0)