diff options
Diffstat (limited to 'core/wiring_digital.c')
-rw-r--r-- | core/wiring_digital.c | 3 |
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) { |