1
0
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:
Marian Buschsieweke 2024-01-23 13:59:15 +01:00
parent 6028097132
commit 1351c61c6a
No known key found for this signature in database
GPG Key ID: 77AA882EC78084E6

View File

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