aboutsummaryrefslogtreecommitdiff
path: root/include/libopencm3/efm32/vector.h
diff options
context:
space:
mode:
authorchrysn2012-02-27 13:21:40 +0100
committerchrysn2012-02-27 13:21:40 +0100
commitf6025af859b4a2b27a01aaf314c66b531f3dbc21 (patch)
tree81b45c9a973af3ee8a3179bb53b611d4bdd4c4d6 /include/libopencm3/efm32/vector.h
parentbe62115f007cba85db361b4235ec23da446d7803 (diff)
efm32 tinygecko: defined interrupts
there seems not to be anything family specific about the interrupt vectors of m3 based efm32 systems, thus renaming vector.h to irq.h
Diffstat (limited to 'include/libopencm3/efm32/vector.h')
-rw-r--r--include/libopencm3/efm32/vector.h11
1 files changed, 8 insertions, 3 deletions
diff --git a/include/libopencm3/efm32/vector.h b/include/libopencm3/efm32/vector.h
index 8a385ec..ae6b9ba 100644
--- a/include/libopencm3/efm32/vector.h
+++ b/include/libopencm3/efm32/vector.h
@@ -7,6 +7,9 @@
* The structure of the vector table is implemented independently of the system
* vector table starting at memory position 0x0, as it can be relocated to
* other memory locations too.
+ *
+ * The exact size of a vector interrupt table depends on the number of
+ * interrupts IRQ_COUNT, which is defined per family.
*/
#ifndef LIBOPENCM3_EFM32_VECTOR_H
@@ -15,12 +18,14 @@
#include <libopencm3/cm3/common.h>
#ifdef TINYGECKO
-# include <libopencm3/efm32/tinygecko/vector.h>
+# include <libopencm3/efm32/tinygecko/irq.h>
#else
# error "efm32 family not defined."
#endif
-typedef void (*efm32_vector_table_entry_t)(void); /**< Type of an interrupt function. Only used to avoid hard-to-read function pointers in the efm32_vector_table_t struct. */
+/** Type of an interrupt function. Only used to avoid hard-to-read function
+ * pointers in the efm32_vector_table_t struct. */
+typedef void (*efm32_vector_table_entry_t)(void);
typedef struct {
unsigned int *initial_sp_value; /**< The value the stack pointer is set to initially */
@@ -36,7 +41,7 @@ typedef struct {
efm32_vector_table_entry_t reserved_x0034;
efm32_vector_table_entry_t pend_sv;
efm32_vector_table_entry_t systick;
- efm32_vector_table_entry_t irq[EFM32_VECTOR_NIRQ];
+ efm32_vector_table_entry_t irq[IRQ_COUNT];
} efm32_vector_table_t;
#endif