mirror of
https://github.com/esp8266/Arduino.git
synced 2025-08-01 03:47:23 +03: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:
@ -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);
|
||||||
|
Reference in New Issue
Block a user