From cd66f64dc66040e8668404f2e7cac934fde5c827 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sun, 18 Oct 2009 17:56:20 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1239 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/io/platforms/LPC214x/pal_lld.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'os/io/platforms') 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; \ } -- cgit v1.2.3