summaryrefslogtreecommitdiff
path: root/hw/bsp/stm32f4discovery/include/bsp/cmsis_nvic.h
diff options
context:
space:
mode:
Diffstat (limited to 'hw/bsp/stm32f4discovery/include/bsp/cmsis_nvic.h')
-rw-r--r--hw/bsp/stm32f4discovery/include/bsp/cmsis_nvic.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/hw/bsp/stm32f4discovery/include/bsp/cmsis_nvic.h b/hw/bsp/stm32f4discovery/include/bsp/cmsis_nvic.h
new file mode 100644
index 00000000..008b247d
--- /dev/null
+++ b/hw/bsp/stm32f4discovery/include/bsp/cmsis_nvic.h
@@ -0,0 +1,29 @@
+/* mbed Microcontroller Library - cmsis_nvic
+ * Copyright (c) 2009-2011 ARM Limited. All rights reserved.
+ *
+ * CMSIS-style functionality to support dynamic vectors
+ */
+
+#ifndef MBED_CMSIS_NVIC_H
+#define MBED_CMSIS_NVIC_H
+
+#include <stdint.h>
+
+#define NVIC_NUM_VECTORS (16 + 81) // CORE + MCU Peripherals
+#define NVIC_USER_IRQ_OFFSET 16
+
+#include "mcu/stm32f4xx.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+void NVIC_Relocate(void);
+void NVIC_SetVector(IRQn_Type IRQn, uint32_t vector);
+uint32_t NVIC_GetVector(IRQn_Type IRQn);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif