aboutsummaryrefslogtreecommitdiff
path: root/platform
diff options
context:
space:
mode:
Diffstat (limited to 'platform')
-rw-r--r--platform/stm32f0xx/gpio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/platform/stm32f0xx/gpio.c b/platform/stm32f0xx/gpio.c
index 391f871a..c85b3a8a 100644
--- a/platform/stm32f0xx/gpio.c
+++ b/platform/stm32f0xx/gpio.c
@@ -187,7 +187,7 @@ void gpio_set(unsigned nr, unsigned on)
int gpio_get(unsigned nr)
{
- stm32_gpio_t *gpio = stm32_gpio_port_to_pointer(nr);
+ stm32_gpio_t *gpio = stm32_gpio_port_to_pointer(GPIO_PORT(nr));
return (gpio->IDR & (1 << GPIO_PIN(nr))) != 0;
}