File tree Expand file tree Collapse file tree 5 files changed +11
-9
lines changed
targets/TARGET_STM/TARGET_STM32F0 Expand file tree Collapse file tree 5 files changed +11
-9
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ MBED_WEAK uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
95
95
//Select HSI as system clock source to allow modification of the PLL configuration
96
96
RCC_ClkInitStruct .ClockType = RCC_CLOCKTYPE_SYSCLK ;
97
97
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 ) {
99
99
return 0 ; // FAIL
100
100
}
101
101
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ MBED_WEAK uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
95
95
//Select HSI as system clock source to allow modification of the PLL configuration
96
96
RCC_ClkInitStruct .ClockType = RCC_CLOCKTYPE_SYSCLK ;
97
97
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 ) {
99
99
return 0 ; // FAIL
100
100
}
101
101
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ MBED_WEAK uint8_t SetSysClock_PLL_HSE(uint8_t bypass)
95
95
//Select HSI as system clock source to allow modification of the PLL configuration
96
96
RCC_ClkInitStruct .ClockType = RCC_CLOCKTYPE_SYSCLK ;
97
97
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 ) {
99
99
return 0 ; // FAIL
100
100
}
101
101
Original file line number Diff line number Diff line change 18
18
19
19
#define NVIC_USER_IRQ_OFFSET 16
20
20
21
- void NVIC_SetVector (IRQn_Type IRQn , uint32_t vector ) {
21
+ void NVIC_SetVector (IRQn_Type IRQn , uint32_t vector )
22
+ {
22
23
int i ;
23
24
24
25
// Copy and switch to dynamic vectors if first time called
25
26
if ((SYSCFG -> CFGR1 & SYSCFG_CFGR1_MEM_MODE ) != SYSCFG_CFGR1_MEM_MODE ) {
26
27
uint32_t * old_vectors = (uint32_t * )NVIC_FLASH_VECTOR_ADDRESS ;
27
28
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 ];
29
30
}
30
31
SYSCFG -> CFGR1 |= SYSCFG_CFGR1_MEM_MODE ; // Embedded SRAM mapped at 0x00000000
31
32
}
32
33
33
34
// 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 ;
35
36
}
36
37
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 ;
39
41
// Return the vector
40
42
return vectors [IRQn + 16 ];
41
43
}
Original file line number Diff line number Diff line change 17
17
#define __US_TICKER_DATA_H
18
18
19
19
#ifdef __cplusplus
20
- extern "C" {
20
+ extern "C" {
21
21
#endif
22
22
23
23
#include "stm32f0xx.h"
You can’t perform that action at this time.
0 commit comments