EFM32 port and pin decoding backward in every case. From Pierre-Noel Bouteville

This commit is contained in:
Gregory Nutt
2014-10-23 18:16:57 -06:00
parent 1841895042
commit 9b13710e39
2 changed files with 8 additions and 8 deletions
+6 -6
View File
@@ -293,9 +293,9 @@ int efm32_configgpio(gpio_pinset_t cfgset)
/* Get basic pin configuration information */
port = efm32_getpin(cfgset);
port = efm32_getport(cfgset);
base = EFM32_GPIO_Pn_BASE(port);
pin = efm32_getport(cfgset);
pin = efm32_getpin(cfgset);
mode = efm32_getmode(cfgset);
/* Set the drive strength in the GPIO control register */
@@ -330,9 +330,9 @@ void efm32_gpiowrite(gpio_pinset_t pinset, bool value)
/* Get basic pin configuration information */
port = efm32_getpin(pinset);
port = efm32_getport(cfgset);
base = EFM32_GPIO_Pn_BASE(port);
pin = efm32_getport(pinset);
pin = efm32_getpin(cfgset);
/* And set the output value */
@@ -355,9 +355,9 @@ bool efm32_gpioread(gpio_pinset_t pinset)
/* Get basic pin configuration information */
port = efm32_getpin(pinset);
port = efm32_getport(cfgset);
base = EFM32_GPIO_Pn_BASE(port);
pin = efm32_getport(pinset);
pin = efm32_getpin(cfgset);
/* And return the input value of the pin */
+2 -2
View File
@@ -201,8 +201,8 @@ void efm32_gpioirq(gpio_pinset_t pinset)
/* Get basic pin configuration information */
port = efm32_getpin(pinset);
pin = efm32_getport(pinset);
port = efm32_getport(pinset);
pin = efm32_getpin(pinset);
bit = ((uint32_t)1 << pin);
/* Make sure that the pin interrupt is disabled */