mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
EFM32 port and pin decoding backward in every case. From Pierre-Noel Bouteville
This commit is contained in:
@@ -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 */
|
||||
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user