aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorPerry Hung <iperry@alum.mit.edu>2010-04-19 22:25:49 -0400
committerPerry Hung <iperry@alum.mit.edu>2010-04-19 23:31:32 -0400
commita7b3786810ee93c81b65a431c04fd2f5d75354d2 (patch)
tree60228366992d21f28a0a28d4ca3b787c8a7bc8cd /core
parent9e6010339c47f62446c38a1f7deded8bc2647703 (diff)
downloadlibrambutan-a7b3786810ee93c81b65a431c04fd2f5d75354d2.tar.gz
librambutan-a7b3786810ee93c81b65a431c04fd2f5d75354d2.zip
Added libmaple gpio_read_bit
Diffstat (limited to 'core')
-rw-r--r--core/wiring_digital.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/core/wiring_digital.c b/core/wiring_digital.c
index 25433de..c1b7201 100644
--- a/core/wiring_digital.c
+++ b/core/wiring_digital.c
@@ -133,8 +133,7 @@ void pinMode(uint8 pin, WiringPinMode mode) {
uint32 digitalRead(uint8 pin) {
if (pin >= NR_MAPLE_PINS)
return 0;
-
- return (PIN_MAP[pin].port->IDR & BIT(PIN_MAP[pin].pin)) ? 1 : 0;
+ return gpio_read_bit(PIN_MAP[pin].port, PIN_MAP[pin].pin);
}
void digitalWrite(uint8 pin, uint8 val) {