diff options
author | Zach Eveland <zeveland@blacklabel-development.com> | 2012-04-19 15:46:32 -0400 |
---|---|---|
committer | Zach Eveland <zeveland@blacklabel-development.com> | 2012-04-19 15:46:32 -0400 |
commit | 56ddc4637de1b8b0e21840519ed0b94966395ff5 (patch) | |
tree | cefa036d7648d2480214d80ff1763a9c3f37879d /cores/arduino/wiring_analog.c | |
parent | 764f94d0f121df3b2db3faac08097cd3975e1c23 (diff) |
bugfix for boards with a timer 4 but no channel D
compilation failed for Mega because the COM4D1 and OCR4D registers are defined for 32U4 but not for Mega
Diffstat (limited to 'cores/arduino/wiring_analog.c')
-rw-r--r-- | cores/arduino/wiring_analog.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cores/arduino/wiring_analog.c b/cores/arduino/wiring_analog.c index 40a3363..c06cad4 100644 --- a/cores/arduino/wiring_analog.c +++ b/cores/arduino/wiring_analog.c @@ -230,7 +230,7 @@ void analogWrite(uint8_t pin, int val) break; #endif - #if defined(TCCR4C) + #if defined(TCCR4C) && defined(COM4D1) case TIMER4D: // connect pwm to pin on timer 4, channel D sbi(TCCR4C, COM4D1); |