aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/platforms/STM32/GPIOv2
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-17 08:45:43 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-09-17 08:45:43 +0000
commit4ff96215eddade6e541f1a97af5364e754ccee7c (patch)
tree28b310e8dc99a8a4714d59cd8b73327ef66c3054 /os/hal/platforms/STM32/GPIOv2
parenteea844796a2cdbea9f4ddf51f9766ff3964984b6 (diff)
downloadChibiOS-4ff96215eddade6e541f1a97af5364e754ccee7c.tar.gz
ChibiOS-4ff96215eddade6e541f1a97af5364e754ccee7c.tar.bz2
ChibiOS-4ff96215eddade6e541f1a97af5364e754ccee7c.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3323 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/platforms/STM32/GPIOv2')
-rw-r--r--os/hal/platforms/STM32/GPIOv2/pal_lld.h30
1 files changed, 28 insertions, 2 deletions
diff --git a/os/hal/platforms/STM32/GPIOv2/pal_lld.h b/os/hal/platforms/STM32/GPIOv2/pal_lld.h
index 0f9f22441..aa8dc2d73 100644
--- a/os/hal/platforms/STM32/GPIOv2/pal_lld.h
+++ b/os/hal/platforms/STM32/GPIOv2/pal_lld.h
@@ -96,6 +96,32 @@
PAL_STM32_PUDR_PULLDOWN)
/**
+ * @brief Alternate input high-Z pad.
+ *
+ * @param[in] n alternate function selector
+ */
+#define PAL_MODE_ALT_INPUT(n) (PAL_STM32_MODE_INPUT | \
+ PAL_STM32_ALTERNATE(n))
+
+/**
+ * @brief Alternate input pad with weak pull up resistor.
+ *
+ * @param[in] n alternate function selector
+ */
+#define PAL_MODE_ALT_INPUT_PULLUP(n) (PAL_STM32_MODE_INPUT | \
+ PAL_STM32_PUDR_PULLUP | \
+ PAL_STM32_ALTERNATE(n))
+
+/**
+ * @brief Alternate input pad with weak pull down resistor.
+ *
+ * @param[in] n alternate function selector
+ */
+#define PAL_MODE_ALT_INPUT_PULLDOWN(n) (PAL_STM32_MODE_INPUT | \
+ PAL_STM32_PUDR_PULLDOWN | \
+ PAL_STM32_ALTERNATE(n))
+
+/**
* @brief Analog input mode.
*/
#define PAL_MODE_INPUT_ANALOG PAL_STM32_MODE_ANALOG
@@ -117,7 +143,7 @@
*
* @param[in] n alternate function selector
*/
-#define PAL_MODE_ALTERNATE_PUSHPULL(n) (PAL_STM32_MODE_ALTERNATE | \
+#define PAL_MODE_ALT_OUTPUT_PUSHPULL(n) (PAL_STM32_MODE_ALTERNATE | \
PAL_STM32_OTYPE_PUSHPULL | \
PAL_STM32_ALTERNATE(n))
@@ -126,7 +152,7 @@
*
* @param[in] n alternate function selector
*/
-#define PAL_MODE_ALTERNATE_OPENDRAIN(n) (PAL_STM32_MODE_ALTERNATE | \
+#define PAL_MODE_ALT_OUTPUT_OPENDRAIN(n) (PAL_STM32_MODE_ALTERNATE | \
PAL_STM32_OTYPE_OPENDRAIN | \
PAL_STM32_ALTERNATE(n))