diff options
author | Perry Hung <iperry@alum.mit.edu> | 2010-04-25 18:14:43 -0400 |
---|---|---|
committer | Perry Hung <iperry@alum.mit.edu> | 2010-04-25 18:14:43 -0400 |
commit | 4ccbeb08e64b6bc7cee1f54a04001eff778b4282 (patch) | |
tree | 05f71e01c98ac341c029b2a050b796f1be3de8b5 /libmaple/nvic.c | |
parent | b41eb846ca60559cff242d0c550699eb8f309909 (diff) | |
parent | 62552a6f3f93223682f9df2df2614411f7e3d54c (diff) | |
download | librambutan-4ccbeb08e64b6bc7cee1f54a04001eff778b4282.tar.gz librambutan-4ccbeb08e64b6bc7cee1f54a04001eff778b4282.zip |
Merge branch 'master' into spi
Diffstat (limited to 'libmaple/nvic.c')
-rw-r--r-- | libmaple/nvic.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libmaple/nvic.c b/libmaple/nvic.c index 91e572e..6603d42 100644 --- a/libmaple/nvic.c +++ b/libmaple/nvic.c @@ -64,3 +64,18 @@ void nvic_enable_interrupt(uint32 n) { } + +/** + * @brief Initialice the NVIC at address addr + * @param addr Address to set the vector table at + */ +void nvic_init(void) { +#ifdef VECT_TAB_ROM + nvic_set_vector_table(USER_ADDR_ROM, 0x0); +#elif defined VECT_TAB_RAM + nvic_set_vector_table(USER_ADDR_RAM, 0x0); +#else // VECT_TAB_BASE + /* Set the Vector Table base location at 0x08000000 */ + nvic_set_vector_table(((uint32)0x08000000), 0x0); +#endif +} |