diff --git a/docs/ChangeLog/20200530/PR8974.md b/docs/ChangeLog/20200530/PR8974.md new file mode 100644 index 000000000000..269636d1b1be --- /dev/null +++ b/docs/ChangeLog/20200530/PR8974.md @@ -0,0 +1,2 @@ +## fixing wrong configuration of AUDIO feature +add a compile-time error to alert the user to a missing pin-configuration (on AVR boards) when AUDIO_ENABLE=yes is set diff --git a/quantum/audio/audio_avr.c b/quantum/audio/audio_avr.c index 781378788c63..5a96bf64393c 100644 --- a/quantum/audio/audio_avr.c +++ b/quantum/audio/audio_avr.c @@ -110,6 +110,11 @@ # define TIMER_1_DUTY_CYCLE OCR1C # define TIMER1_AUDIO_vect TIMER1_COMPC_vect #endif + +#if !defined(BPIN_AUDIO) && !defined(CPIN_AUDIO) +# error "Audio feature enabled, but no suitable pin selected - see docs/feature_audio.md under the AVR settings for available options." +#endif + // ----------------------------------------------------------------------------- int voices = 0;