aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/wiring.h
diff options
context:
space:
mode:
authorDavid A. Mellis <d.mellis@arduino.cc>2011-02-18 10:40:56 -0500
committerDavid A. Mellis <d.mellis@arduino.cc>2011-02-18 10:40:56 -0500
commit63515122ca28d9a60e6aba2948fb01765ca1138e (patch)
tree4fc54101c58590a6c1c7225a60d223797f4e198b /cores/arduino/wiring.h
parentcd050d05d1fa7ae87da68574a9e50edf6ac1ed8f (diff)
Revert "Adding noAnalogWrite() function to disable PWM."
This reverts commit 38d4a34fec6925b29a732d13e200f54ee4b42025.
Diffstat (limited to 'cores/arduino/wiring.h')
-rwxr-xr-xcores/arduino/wiring.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/cores/arduino/wiring.h b/cores/arduino/wiring.h
index 2915b63..66ce2f7 100755
--- a/cores/arduino/wiring.h
+++ b/cores/arduino/wiring.h
@@ -114,7 +114,6 @@ int digitalRead_lookup(uint8_t);
int analogRead(uint8_t);
void analogReference(uint8_t mode);
void analogWrite(uint8_t, int);
-void noAnalogWrite(uint8_t);
unsigned long millis(void);
unsigned long micros(void);
@@ -146,7 +145,10 @@ INLINED uint8_t digitalPinToBitMask(uint8_t pin) {
}
INLINED uint8_t digitalPinToTimer(uint8_t pin) {
- return pgm_read_byte( digital_pin_to_timer_PGM + pin );
+ if (__builtin_constant_p(pin))
+ return inlined_digitalPinToTimer(pin);
+ else
+ return pgm_read_byte( digital_pin_to_timer_PGM + pin );
}
INLINED volatile uint8_t *portOutputRegister(uint8_t index) {