🔧 Sanity-check AVR D9 Fan PWM / SPEAKER Timer2 (#23672)

This commit is contained in:
Mike La Spina
2022-02-04 10:45:34 -06:00
committed by Scott Lahteine
parent f8571fc18f
commit f42c1b4cae
2 changed files with 10 additions and 2 deletions

View File

@ -29,7 +29,15 @@
* Checks for FAST PWM
*/
#if ALL(FAST_PWM_FAN, USE_OCR2A_AS_TOP, HAS_TCCR2)
#error "USE_OCR2A_AS_TOP does not apply to devices with a single output TIMER2"
#error "USE_OCR2A_AS_TOP does not apply to devices with a single output TIMER2."
#endif
/**
* Checks for SOFT PWM
*/
#if HAS_FAN0 && FAN_PIN == 9 && DISABLED(FAN_SOFT_PWM) && ENABLED(SPEAKER)
#error "FAN_PIN 9 Hardware PWM uses Timer 2 which conflicts with Arduino AVR Tone Timer (for SPEAKER)."
#error "Disable SPEAKER or enable FAN_SOFT_PWM."
#endif
/**