aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-06-07 13:40:36 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-06-07 13:40:36 +0000
commite1ce26043955f6354af12bafa87c62ef9328440e (patch)
tree0cb80abd418fcb6aa05085b1b874d136be523364 /src
parent4fc5b696fad6b10620dcd49149bf64b829e38f77 (diff)
downloadChibiOS-e1ce26043955f6354af12bafa87c62ef9328440e.tar.gz
ChibiOS-e1ce26043955f6354af12bafa87c62ef9328440e.tar.bz2
ChibiOS-e1ce26043955f6354af12bafa87c62ef9328440e.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1020 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'src')
-rw-r--r--src/lib/pal.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/lib/pal.h b/src/lib/pal.h
index 11137c6cb..cac306c43 100644
--- a/src/lib/pal.h
+++ b/src/lib/pal.h
@@ -32,6 +32,16 @@
#endif
/**
+ * @brief Logical low state.
+ */
+#define PAL_LOW 0
+
+/**
+ * @brief Logical high state.
+ */
+#define PAL_HIGH 1
+
+/**
* @brief Port bit helper macro.
* @details This macro calculates the mask of a bit within a port.
*
@@ -241,7 +251,7 @@ typedef struct {
*
* @param[in] port the port identifier
* @param[in] pad the pad number within the port
- * @param[out] value the logical value, the value must be @p 0 or @p 1
+ * @param[out] bit the logical value, the value must be @p 0 or @p 1
*
* @note The operation is not guaranteed to be atomic on all the architectures,
* for atomicity and/or portability reasons you may need to enclose port
@@ -253,12 +263,12 @@ typedef struct {
* @p palWritePort().
*/
#if !defined(pal_lld_writepad) || defined(__DOXYGEN__)
-#define palWritePad(port, pad, value) { \
+#define palWritePad(port, pad, bit) { \
palWritePort(port, (palReadLatch(port) & ~PAL_PORT_BIT(pad)) | \
- (((value) & 1) << pad)); \
+ (((bit) & 1) << pad)); \
}
#else
-#define palWritePad(port, pad, value) pal_lld_writepad(port, pad, value)
+#define palWritePad(port, pad, bit) pal_lld_writepad(port, pad, bit)
#endif
/**