aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarti Bolivar <mbolivar@leaflabs.com>2012-06-04 00:15:40 -0400
committerMarti Bolivar <mbolivar@leaflabs.com>2012-06-04 00:17:01 -0400
commit8558b62e06f19f58015ebf281c2507609c9e83bb (patch)
tree275e5dfb0793df5d755145d2289b942833c8d4f2
parent3cc2ff5f504c594d97769b1d0608c441f297fc69 (diff)
STM32F1: gpio.h: Add hack mode macro, for F2 compatibility.
I'm sure we can work the compatible subset of F1/F2 GPIO functionality into the F1 gpio.h interface in a clean way. This is not that clean way, but I'm short on time. Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
-rw-r--r--libmaple/stm32f1/include/series/gpio.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/libmaple/stm32f1/include/series/gpio.h b/libmaple/stm32f1/include/series/gpio.h
index ec4a39c..2f96a08 100644
--- a/libmaple/stm32f1/include/series/gpio.h
+++ b/libmaple/stm32f1/include/series/gpio.h
@@ -135,6 +135,9 @@ typedef enum gpio_pin_mode {
GPIO_INPUT_PU, /* (treated a special case, for ODR twiddling) */
} gpio_pin_mode;
+/* Hacks for F2: */
+#define GPIO_MODE_ANALOG GPIO_INPUT_ANALOG
+
/*
* AFIO register map
*/