1
0
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:
Gunar Schorcht 2023-03-24 07:40:23 +01:00
parent 9405bf7a26
commit f979730730

View File

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