aboutsummaryrefslogtreecommitdiffstats
path: root/libmaple
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
commit0873e4fc167f08fbac4b188a755a61f5afb03d20 (patch)
tree275e5dfb0793df5d755145d2289b942833c8d4f2 /libmaple
parentd036d2f4e2d4475037294304e7c04a6db6b3167d (diff)
downloadlibrambutan-0873e4fc167f08fbac4b188a755a61f5afb03d20.tar.gz
librambutan-0873e4fc167f08fbac4b188a755a61f5afb03d20.zip
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>
Diffstat (limited to 'libmaple')
-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
*/