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
This commit is contained in:
Zach Eveland 2012-04-19 15:46:32 -04:00
parent 764f94d0f1
commit 56ddc4637d
1 changed files with 1 additions and 1 deletions

View File

@ -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);