aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUwe Hermann2009-07-25 18:53:50 +0200
committerUwe Hermann2009-07-25 18:53:50 +0200
commitcf69b51ee7ba9effc928af8550fc311536a394f4 (patch)
treee232dfa4824797ca4fdc3edc6fa6db472379965b
parent9a4a47fdeb393cd6cb5b0868c5c787db1aeb0e64 (diff)
Add AFIO register definitions.
-rw-r--r--include/libopenstm32/gpio.h45
1 files changed, 45 insertions, 0 deletions
diff --git a/include/libopenstm32/gpio.h b/include/libopenstm32/gpio.h
index 058c19d..07ae21c 100644
--- a/include/libopenstm32/gpio.h
+++ b/include/libopenstm32/gpio.h
@@ -253,6 +253,51 @@
#define GPIO_LCKK (1 << 16)
/* GPIO_LCKR[15:0]: LCKy: Port x lock bit y (y = 0..15) */
+/* --- AFIO registers ------------------------------------------------------ */
+
+/* Event control register (AFIO_EVCR) */
+#define AFIO_EVCR MMIO32(AFIO_BASE + 0x00)
+
+/* AF remap and debug I/O configuration register (AFIO_MAPR) */
+#define AFIO_MAPR MMIO32(AFIO_BASE + 0x04)
+
+/* External interrupt configuration register 1 (AFIO_EXTICR1) */
+#define AFIO_EXTICR1 MMIO32(AFIO_BASE + 0x08)
+
+/* External interrupt configuration register 2 (AFIO_EXTICR2) */
+#define AFIO_EXTICR2 MMIO32(AFIO_BASE + 0x0c)
+
+/* External interrupt configuration register 3 (AFIO_EXTICR3) */
+#define AFIO_EXTICR3 MMIO32(AFIO_BASE + 0x10)
+
+/* External interrupt configuration register 4 (AFIO_EXTICR4) */
+#define AFIO_EXTICR4 MMIO32(AFIO_BASE + 0x14)
+
+/* --- AFIO_EVCR values ---------------------------------------------------- */
+
+/* TODO */
+
+/* --- AFIO_MAPR values ---------------------------------------------------- */
+
+/* TODO */
+
+/* --- AFIO_EXTICR1 values ------------------------------------------------- */
+
+/* TODO */
+
+/* --- AFIO_EXTICR2 values ------------------------------------------------- */
+
+/* TODO */
+
+/* --- AFIO_EXTICR3 values ------------------------------------------------- */
+
+/* TODO */
+
+/* --- AFIO_EXTICR4 values ------------------------------------------------- */
+
+/* TODO */
+
+
/* --- Function prototypes ------------------------------------------------- */
void gpio_set_mode(u32 gpioport, u8 mode, u8 cnf, u16 gpios);