aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-10-18 17:56:20 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2009-10-18 17:56:20 +0000
commitcd66f64dc66040e8668404f2e7cac934fde5c827 (patch)
treea22ac3dd87e7c7e82d9218e88314ebd841792faa /os
parent6dfbaa34d96d3571fc28aba6179268c1df595b2f (diff)
downloadChibiOS-cd66f64dc66040e8668404f2e7cac934fde5c827.tar.gz
ChibiOS-cd66f64dc66040e8668404f2e7cac934fde5c827.tar.bz2
ChibiOS-cd66f64dc66040e8668404f2e7cac934fde5c827.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1239 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os')
-rw-r--r--os/io/pal.h12
-rw-r--r--os/io/platforms/LPC214x/pal_lld.h5
2 files changed, 10 insertions, 7 deletions
diff --git a/os/io/pal.h b/os/io/pal.h
index b75582ee1..2a1cbaf63 100644
--- a/os/io/pal.h
+++ b/os/io/pal.h
@@ -141,12 +141,12 @@
* not belonging to the bus.
*/
typedef struct {
- /** Port identifier. */
+ /** Port identifier.*/
ioportid_t bus_portid;
/** Bus mask aligned to port bit 0. The bus mask implicitly define the bus
- * width. */
+ width. A logical AND is performed on the bus data.*/
ioportmask_t bus_mask;
- /** Offset, within the port, of the least significant bit of the bus. */
+ /** Offset, within the port, of the least significant bit of the bus.*/
uint_fast8_t bus_offset;
} IOBus;
@@ -273,7 +273,8 @@ typedef struct {
* @brief Reads a group of bits.
*
* @param[in] port the port identifier
- * @param[in] mask the group mask
+ * @param[in] mask the group mask, a logical AND is performed on the input
+ * data
* @param[in] offset the group bit offset within the port
* @return The group logical states.
*/
@@ -288,7 +289,8 @@ typedef struct {
* @brief Writes a group of bits.
*
* @param[in] port the port identifier
- * @param[in] mask the group mask
+ * @param[in] mask the group mask, a logical AND is performed on the output
+ * data
* @param[in] offset the group bit offset within the port
* @param[in] bits the bits to be written. Values exceeding the group width
* are masked.
diff --git a/os/io/platforms/LPC214x/pal_lld.h b/os/io/platforms/LPC214x/pal_lld.h
index 4547abc61..565b3333a 100644
--- a/os/io/platforms/LPC214x/pal_lld.h
+++ b/os/io/platforms/LPC214x/pal_lld.h
@@ -183,7 +183,8 @@ typedef FIO * ioportid_t;
* accesses.
*
* @param[in] port the port identifier
- * @param[in] mask the group mask
+ * @param[in] mask the group mask, a logical AND is performed on the output
+ * data
* @param[in] offset the group bit offset within the port
* @param[in] bits the bits to be written. Values exceeding the group width
* are masked.
@@ -192,7 +193,7 @@ typedef FIO * ioportid_t;
* code.
*/
#define pal_lld_writegroup(port, mask, offset, bits) { \
- (port)->FIO_MASK = (mask) << (offset); \
+ (port)->FIO_MASK = ~((mask) << (offset)); \
(port)->FIO_PIN = (bits) << (offset); \
(port)->FIO_MASK = 0; \
}