From 26f8c972fcb09b1da42129d3a40e23ca6f379797 Mon Sep 17 00:00:00 2001 From: Johannes Date: Wed, 29 Apr 2020 16:23:09 +0200 Subject: [PATCH 1/3] audio-configuration: throw a compile error on AUDIO_ENABLE=yes with no output pin configured relevant for avr boards, arm currently implicitly uses A4/A5 --- quantum/audio/audio_avr.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/quantum/audio/audio_avr.c b/quantum/audio/audio_avr.c index 781378788c63..52bb92c18903 100644 --- a/quantum/audio/audio_avr.c +++ b/quantum/audio/audio_avr.c @@ -110,6 +110,12 @@ # 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 s +ettings for available options." +#endif + // ----------------------------------------------------------------------------- int voices = 0; From fbd85dd48bae825e7ac356c8771a8f71453a6538 Mon Sep 17 00:00:00 2001 From: Johannes Date: Wed, 29 Apr 2020 16:39:37 +0200 Subject: [PATCH 2/3] audio-configuration: add Changelog entry --- docs/ChangeLog/20200530/PR8974.md | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 docs/ChangeLog/20200530/PR8974.md 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 From bdb338cf8aecc2028ca038530d0f6984db53bcf6 Mon Sep 17 00:00:00 2001 From: JohSchneider Date: Thu, 30 Apr 2020 13:34:21 +0000 Subject: [PATCH 3/3] audio-configuration: remove stray newline Co-authored-by: Drashna Jaelre --- quantum/audio/audio_avr.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/quantum/audio/audio_avr.c b/quantum/audio/audio_avr.c index 52bb92c18903..5a96bf64393c 100644 --- a/quantum/audio/audio_avr.c +++ b/quantum/audio/audio_avr.c @@ -112,8 +112,7 @@ #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 s -ettings for available options." +# error "Audio feature enabled, but no suitable pin selected - see docs/feature_audio.md under the AVR settings for available options." #endif // -----------------------------------------------------------------------------