From 869ed39e4c28ebb9813a8b28192d4ca92f72bf22 Mon Sep 17 00:00:00 2001 From: Perry Hung Date: Tue, 30 Mar 2010 22:50:18 -0400 Subject: Removed STM32 flash code, replaced with barebones hacks for now. At this point, there shouldn't be any STM code being compiled and linked against. There are still a bunch of STM header includes, though. --- core/wiring.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'core') 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 } - -- cgit v1.2.3