From d81982edb1c4abf9a38da742f81bb648ce6882c5 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Mon, 5 Jun 2017 12:05:04 +0200 Subject: GPIO: Fix shift in PinArray::get(). --- gpio/gpio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gpio') diff --git a/gpio/gpio.h b/gpio/gpio.h index 3ac9b6d..d764194 100644 --- a/gpio/gpio.h +++ b/gpio/gpio.h @@ -181,7 +181,7 @@ class GPIO_t { } uint16_t get() { - return g.reg.IDR & mask1(); + return (g.reg.IDR & mask1()) >> f; } }; -- cgit v1.2.3