aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-05-26 20:41:20 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-05-26 20:41:20 +0000
commit98cd082507c203ac6155e0847389550d31e541c2 (patch)
tree5055b4909784ffdfeec3eb0fe1337ef18cc76194 /os/hal
parent6c6bc48fd6ce57afebf20a4c513770af15100c84 (diff)
downloadChibiOS-98cd082507c203ac6155e0847389550d31e541c2.tar.gz
ChibiOS-98cd082507c203ac6155e0847389550d31e541c2.tar.bz2
ChibiOS-98cd082507c203ac6155e0847389550d31e541c2.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4239 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal')
-rw-r--r--os/hal/platforms/STM32/ext_lld.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/os/hal/platforms/STM32/ext_lld.c b/os/hal/platforms/STM32/ext_lld.c
index 225fc854d..59aae5520 100644
--- a/os/hal/platforms/STM32/ext_lld.c
+++ b/os/hal/platforms/STM32/ext_lld.c
@@ -578,7 +578,7 @@ void ext_lld_channel_enable(EXTDriver *extp, expchannel_t channel) {
/* Setting the associated GPIO for external channels.*/
if (channel < 16) {
uint32_t n = channel >> 2;
- uint32_t mask = ~(0xF << (channel & 3));
+ uint32_t mask = ~(0xF << ((channel & 3) * 4));
uint32_t port = ((extp->config->channels[channel].mode &
EXT_MODE_GPIO_MASK) >>
EXT_MODE_GPIO_OFF) << ((channel & 3) * 4);