mirror of
https://github.com/arduino/Arduino.git
synced 2025-02-20 14:54:31 +01:00
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
59f7f988d7
commit
9904a6f497
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user