Skip to content

Commit d1ad26f

Browse files
committed
EFM32: Make NVIC functions virtualizable
With CMSIS 5, the NVIC functions are virtualizable. Rename the EFM32 NVIC functions to support being virtualized.
1 parent 8f492a2 commit d1ad26f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32GG_STK3700/device/cmsis_nvic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extern uint32_t __start_vector_table__; // Dynamic vector positioning in GCC
1212
#define NVIC_RAM_VECTOR_ADDRESS (0x20000000) // Vectors positioned at start of RAM
1313
#define NVIC_FLASH_VECTOR_ADDRESS (0x0) // Initial vector position in flash
1414

15-
void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
15+
void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
1616
uint32_t *vectors = (uint32_t*)SCB->VTOR;
1717
uint32_t i;
1818

@@ -41,7 +41,7 @@ void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector) {
4141
vectors[IRQn + 16] = vector;
4242
}
4343

44-
uint32_t NVIC_GetVector(IRQn_Type IRQn) {
44+
uint32_t __NVIC_GetVector(IRQn_Type IRQn) {
4545
uint32_t *vectors = (uint32_t*)SCB->VTOR;
4646
return vectors[IRQn + 16];
4747
}

targets/TARGET_Silicon_Labs/TARGET_EFM32/TARGET_EFM32GG_STK3700/device/cmsis_nvic.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
extern "C" {
1717
#endif
1818

19-
void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector);
20-
uint32_t NVIC_GetVector(IRQn_Type IRQn);
19+
void __NVIC_SetVector(IRQn_Type IRQn, uint32_t vector);
20+
uint32_t __NVIC_GetVector(IRQn_Type IRQn);
2121

2222
#ifdef __cplusplus
2323
}

0 commit comments

Comments
 (0)