diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/wiring.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/core/wiring.c b/core/wiring.c index 488d15c..e125259 100644 --- a/core/wiring.c +++ b/core/wiring.c @@ -24,18 +24,15 @@ */ #include "wiring.h" -#include "stm32f10x_flash.h" -#include "stm32f10x_map.h" -#include "stm32f10x_nvic.h" #include "rcc.h" #include "systick.h" #include "gpio.h" -void NVIC_Configuration(void); +void nvic_init(void); void init(void) { rcc_init(); - NVIC_Configuration(); + nvic_init(); systick_init(); gpio_init(); adc_init(); @@ -45,16 +42,15 @@ void init(void) { timer_init(4, 1); } -void NVIC_Configuration(void) { +void nvic_init(void) { #ifdef VECT_TAB_ROM - NVIC_SetVectorTable(USER_ADDR_ROM, 0x0); + nvic_set_vector_table(USER_ADDR_ROM, 0x0); #warning writing to ROM #elif defined VECT_TAB_RAM - NVIC_SetVectorTable(USER_ADDR_RAM, 0x0); + nvic_set_vector_table(USER_ADDR_RAM, 0x0); #warning writing to RAM #else // VECT_TAB_BASE /* Set the Vector Table base location at 0x08000000 */ - NVIC_SetVectorTable(NVIC_VectTab_FLASH, 0x0); + nvic_set_vector_table(((uint32)0x08000000), 0x0); #endif } - |