mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:12:57 +01:00
cpu/efm32: expose pull up on GPIO_DISCONNECT
Allow enabling the pull on on `GPIO_DISCONNECT` and query that correctly.
This commit is contained in:
parent
6028097132
commit
1351c61c6a
@ -34,8 +34,8 @@ int gpio_ll_init(gpio_port_t port, uint8_t pin, gpio_conf_t conf)
|
||||
|
||||
switch (conf.state) {
|
||||
case GPIO_DISCONNECT:
|
||||
/* ignoring pull */
|
||||
mode = gpioModeDisabled;
|
||||
initial = (conf.pull == GPIO_PULL_UP);
|
||||
break;
|
||||
case GPIO_INPUT:
|
||||
switch (conf.pull) {
|
||||
@ -135,6 +135,9 @@ gpio_conf_t gpio_ll_query_conf(gpio_port_t port, uint8_t pin)
|
||||
/* Fall-through: There is no error reporting here */
|
||||
default:
|
||||
result.state = GPIO_DISCONNECT;
|
||||
if (GPIO_PinOutGet(port, pin)) {
|
||||
result.pull = GPIO_PULL_UP;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user