git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4239 35acf78f-673a-0410-8e92-d51de3d6d3f4

This commit is contained in:
gdisirio 2012-05-26 20:41:20 +00:00
parent 6c6bc48fd6
commit 98cd082507
1 changed files with 1 additions and 1 deletions

View File

@ -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);