mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-17 05:32:45 +01:00
cpu/gd32v: fix gpio_read in periph_gpio
This commit is contained in:
parent
9405bf7a26
commit
f979730730
@ -165,7 +165,7 @@ int gpio_read(gpio_t pin)
|
||||
GPIO_Type *port = _port(pin);
|
||||
unsigned pin_num = _pin_num(pin);
|
||||
|
||||
if (_pin_is_output(port, pin)) {
|
||||
if (_pin_is_output(port, pin_num)) {
|
||||
/* pin is output */
|
||||
return (port->OCTL & (1 << pin_num));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user