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:
parent
764f94d0f1
commit
56ddc4637d
|
@ -230,7 +230,7 @@ void analogWrite(uint8_t pin, int val)
|
||||||
break;
|
break;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(TCCR4C)
|
#if defined(TCCR4C) && defined(COM4D1)
|
||||||
case TIMER4D:
|
case TIMER4D:
|
||||||
// connect pwm to pin on timer 4, channel D
|
// connect pwm to pin on timer 4, channel D
|
||||||
sbi(TCCR4C, COM4D1);
|
sbi(TCCR4C, COM4D1);
|
||||||
|
|
Loading…
Reference in New Issue