mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
cpu: stm32_common: always do gpio_read() from input register
This commit is contained in:
parent
b98227626d
commit
83bff5c643
@ -203,12 +203,7 @@ void gpio_irq_disable(gpio_t pin)
|
||||
|
||||
int gpio_read(gpio_t pin)
|
||||
{
|
||||
if (_port(pin)->MODER & (0x3 << (_pin_num(pin) * 2))) {
|
||||
return _port(pin)->ODR & (1 << _pin_num(pin));
|
||||
}
|
||||
else {
|
||||
return _port(pin)->IDR & (1 << _pin_num(pin));
|
||||
}
|
||||
return (_port(pin)->IDR & (1 << _pin_num(pin)));
|
||||
}
|
||||
|
||||
void gpio_set(gpio_t pin)
|
||||
|
Loading…
Reference in New Issue
Block a user