diff options
author | David A. Mellis <d.mellis@arduino.cc> | 2011-03-03 18:46:45 -0500 |
---|---|---|
committer | David A. Mellis <d.mellis@arduino.cc> | 2011-03-03 18:46:45 -0500 |
commit | 58d683239d80d4620a3ab35c4eac53bbe2c35d50 (patch) | |
tree | e3182db54f944ec53d13e9fc222ee1484414d345 /cores/arduino/wiring_digital.c | |
parent | d7a87f18f06481f2ca3c342dfdd1268d934ecedb (diff) |
Removing optimized digitalWrite(), digitalRead(), pinMode().
Diffstat (limited to 'cores/arduino/wiring_digital.c')
-rwxr-xr-x | cores/arduino/wiring_digital.c | 22 |
1 files changed, 3 insertions, 19 deletions
diff --git a/cores/arduino/wiring_digital.c b/cores/arduino/wiring_digital.c index 95666b1..dd1b949 100755 --- a/cores/arduino/wiring_digital.c +++ b/cores/arduino/wiring_digital.c @@ -27,7 +27,7 @@ #include "wiring_private.h" #include "pins_arduino.h" -void pinMode_lookup(uint8_t pin, uint8_t mode) +void pinMode(uint8_t pin, uint8_t mode) { uint8_t bit = digitalPinToBitMask(pin); uint8_t port = digitalPinToPort(pin); @@ -121,23 +121,7 @@ static void turnOffPWM(uint8_t timer) } } -void __digitalWriteOR_locked(volatile uint8_t*out, uint8_t bit) -{ - uint8_t oldSREG = SREG; - cli(); - *out |= bit; - SREG=oldSREG; -} - -void __digitalWriteAND_locked(volatile uint8_t*out, uint8_t bit) -{ - uint8_t oldSREG = SREG; - cli(); - *out &= bit; // NOTE - no inversion here, invert before calling!!! - SREG=oldSREG; -} - -void digitalWrite_lookup(uint8_t pin, uint8_t val) +void digitalWrite(uint8_t pin, uint8_t val) { uint8_t timer = digitalPinToTimer(pin); uint8_t bit = digitalPinToBitMask(pin); @@ -164,7 +148,7 @@ void digitalWrite_lookup(uint8_t pin, uint8_t val) SREG = oldSREG; } -int digitalRead_lookup(uint8_t pin) +int digitalRead(uint8_t pin) { uint8_t timer = digitalPinToTimer(pin); uint8_t bit = digitalPinToBitMask(pin); |