aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorPerry Hung <iperry@alum.mit.edu>2010-03-30 22:50:18 -0400
committerPerry Hung <iperry@alum.mit.edu>2010-03-30 22:51:28 -0400
commit869ed39e4c28ebb9813a8b28192d4ca92f72bf22 (patch)
tree6293c34e1dc96ae3f7c0bfdd926a714c03062ae2 /core
parent2c33d55bae8f9e0e009634072ab05302fc734a65 (diff)
downloadlibrambutan-869ed39e4c28ebb9813a8b28192d4ca92f72bf22.tar.gz
librambutan-869ed39e4c28ebb9813a8b28192d4ca92f72bf22.zip
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.
Diffstat (limited to 'core')
-rw-r--r--core/wiring.c16
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
}
-