[rtems commit] bsp/stm32f4: Header for f10xxx EXTI.

Sebastian Huber sebh at rtems.org
Thu Oct 24 14:23:38 UTC 2013


Module:    rtems
Branch:    master
Commit:    c6f0efe29733681b2154bcd989e3d3ac22ec0e01
Changeset: http://git.rtems.org/rtems/commit/?id=c6f0efe29733681b2154bcd989e3d3ac22ec0e01

Author:    Christian Mauderer <Christian.Mauderer at embedded-brains.de>
Date:      Thu Oct 24 16:17:35 2013 +0200

bsp/stm32f4: Header for f10xxx EXTI.

---

 c/src/lib/libbsp/arm/stm32f4/Makefile.am           |    1 +
 .../libbsp/arm/stm32f4/include/stm32f10xxx_exti.h  |   35 ++++++++++++++++++++
 c/src/lib/libbsp/arm/stm32f4/include/stm32f4.h     |    3 ++
 c/src/lib/libbsp/arm/stm32f4/preinstall.am         |    4 ++
 4 files changed, 43 insertions(+), 0 deletions(-)

diff --git a/c/src/lib/libbsp/arm/stm32f4/Makefile.am b/c/src/lib/libbsp/arm/stm32f4/Makefile.am
index ef2c232..e451234 100644
--- a/c/src/lib/libbsp/arm/stm32f4/Makefile.am
+++ b/c/src/lib/libbsp/arm/stm32f4/Makefile.am
@@ -49,6 +49,7 @@ include_bsp_HEADERS += include/usart.h
 include_bsp_HEADERS += include/stm32f4.h
 include_bsp_HEADERS += include/stm32f10xxx_gpio.h
 include_bsp_HEADERS += include/stm32f10xxx_rcc.h
+include_bsp_HEADERS += include/stm32f10xxx_exti.h
 include_bsp_HEADERS += include/stm32f4xxxx_gpio.h
 include_bsp_HEADERS += include/stm32f4xxxx_rcc.h
 include_bsp_HEADERS += include/stm32_usart.h
diff --git a/c/src/lib/libbsp/arm/stm32f4/include/stm32f10xxx_exti.h b/c/src/lib/libbsp/arm/stm32f4/include/stm32f10xxx_exti.h
new file mode 100644
index 0000000..107f024
--- /dev/null
+++ b/c/src/lib/libbsp/arm/stm32f4/include/stm32f10xxx_exti.h
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2013 Christian Mauderer.  All rights reserved.
+ *
+ *  embedded brains GmbH
+ *  Obere Lagerstr. 30
+ *  82178 Puchheim
+ *  Germany
+ *  <rtems at embedded-brains.de>
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#ifndef LIBBSP_ARM_STM32F4_STM32F10XXX_EXTI_H
+#define LIBBSP_ARM_STM32F4_STM32F10XXX_EXTI_H
+
+#include <bsp/utility.h>
+
+typedef struct {
+	uint32_t imr;
+#define STM32F4_EXTI_IMR(line) BSP_BIT32(line)
+	uint32_t emr;
+#define STM32F4_EXTI_EMR(line) BSP_BIT32(line)
+	uint32_t rtsr;
+#define STM32F4_EXTI_RTSR(line) BSP_BIT32(line)
+	uint32_t ftsr;
+#define STM32F4_EXTI_FTSR(line) BSP_BIT32(line)
+	uint32_t swier;
+#define STM32F4_EXTI_SWIER(line) BSP_BIT32(line)
+	uint32_t pr;
+#define STM32F4_EXTI_PR(line) BSP_BIT32(line)
+} stm32f4_exti;
+
+#endif /* LIBBSP_ARM_STM32F4_STM32F10XXX_EXTI_H */
diff --git a/c/src/lib/libbsp/arm/stm32f4/include/stm32f4.h b/c/src/lib/libbsp/arm/stm32f4/include/stm32f4.h
index 37547fc..19df011 100644
--- a/c/src/lib/libbsp/arm/stm32f4/include/stm32f4.h
+++ b/c/src/lib/libbsp/arm/stm32f4/include/stm32f4.h
@@ -40,6 +40,9 @@
 
 #ifdef STM32F4_FAMILY_F10XXX
 
+#include <bsp/stm32f10xxx_exti.h>
+#define STM32F4_EXTI ((volatile stm32f4_exti *) (STM32F4_BASE + 0x40010400))
+
 #include <bsp/stm32f10xxx_gpio.h>
 #define STM32F4_GPIO(i) ((volatile stm32f4_gpio *) (STM32F4_BASE + 0x40010800 + i * 0x400))
 #define STM32F4_AFIO ((volatile stm32f4_afio *) (STM32F4_BASE + 0x40010000))
diff --git a/c/src/lib/libbsp/arm/stm32f4/preinstall.am b/c/src/lib/libbsp/arm/stm32f4/preinstall.am
index 388d510..8be8956 100644
--- a/c/src/lib/libbsp/arm/stm32f4/preinstall.am
+++ b/c/src/lib/libbsp/arm/stm32f4/preinstall.am
@@ -113,6 +113,10 @@ $(PROJECT_INCLUDE)/bsp/stm32f10xxx_rcc.h: include/stm32f10xxx_rcc.h $(PROJECT_IN
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/stm32f10xxx_rcc.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/stm32f10xxx_rcc.h
 
+$(PROJECT_INCLUDE)/bsp/stm32f10xxx_exti.h: include/stm32f10xxx_exti.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
+	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/stm32f10xxx_exti.h
+PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/stm32f10xxx_exti.h
+
 $(PROJECT_INCLUDE)/bsp/stm32f4xxxx_gpio.h: include/stm32f4xxxx_gpio.h $(PROJECT_INCLUDE)/bsp/$(dirstamp)
 	$(INSTALL_DATA) $< $(PROJECT_INCLUDE)/bsp/stm32f4xxxx_gpio.h
 PREINSTALL_FILES += $(PROJECT_INCLUDE)/bsp/stm32f4xxxx_gpio.h




More information about the vc mailing list