Skip to content
Snippets Groups Projects
Unverified Commit e78b0557 authored by Hauke Petersen's avatar Hauke Petersen Committed by GitHub
Browse files

Merge pull request #8556 from kaspar030/stm32_gpio_read

cpu: stm32_common: always do gpio_read() from input register
parents fa6a83d5 83bff5c6
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment