summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2017-06-05 12:05:04 +0200
committerVegard Storheil Eriksen <zyp@jvnv.net>2017-06-05 12:05:44 +0200
commitd81982edb1c4abf9a38da742f81bb648ce6882c5 (patch)
tree16886554eb95cc42dd99a83a600eecec05a5032f
parent18721cff00415071769de4bd1674296dcc2b25d2 (diff)
GPIO: Fix shift in PinArray::get().
-rw-r--r--gpio/gpio.h2
1 files changed, 1 insertions, 1 deletions
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;
}
};