From dc283fd4e68b3d5f19f8577195699b7d7e2801f8 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 14 Nov 2009 11:23:33 +0000 Subject: Fixed bug 2897636. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1289 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/io/platforms/STM32/pal_lld.c | 6 +++--- readme.txt | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/os/io/platforms/STM32/pal_lld.c b/os/io/platforms/STM32/pal_lld.c index 154fbf4a7..83428e8e1 100644 --- a/os/io/platforms/STM32/pal_lld.c +++ b/os/io/platforms/STM32/pal_lld.c @@ -141,15 +141,15 @@ void _pal_lld_setgroupmode(ioportid_t port, mh <<= 4; crl <<= 4; crh <<= 4; - if ((mask & 1) == 0) + if ((mask & 0x0080) == 0) ml |= 0xf; else crl |= cfg; - if ((mask & 0x10000) == 0) + if ((mask & 0x8000) == 0) mh |= 0xf; else crh |= cfg; - mask >>= 1; + mask <<= 1; } port->CRH = (port->CRH & mh) | crh; port->CRL = (port->CRL & ml) | crl; diff --git a/readme.txt b/readme.txt index a087b8462..da90a9c83 100644 --- a/readme.txt +++ b/readme.txt @@ -3,6 +3,7 @@ ***************************************************************************** *** 1.3.4 *** +- FIX: Fixed bug in STM32 PAL port driver (bug 2897636). - FIX: Fixed problem with ARM-CM3 context switch when compiled at level -O0 (bug 2890382). - FIX: Fixed wrong conditional in chschd.c (bug 2888836). -- cgit v1.2.3