Skip to content

Commit a8f4dca

Browse files
authored
Audio enable corrections (Part 4) (#8974)
* 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 * audio-configuration: add Changelog entry * audio-configuration: remove stray newline
1 parent e658fd2 commit a8f4dca

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

docs/ChangeLog/20200530/PR8974.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
## fixing wrong configuration of AUDIO feature
2+
add a compile-time error to alert the user to a missing pin-configuration (on AVR boards) when AUDIO_ENABLE=yes is set

quantum/audio/audio_avr.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,11 @@
110110
# define TIMER_1_DUTY_CYCLE OCR1C
111111
# define TIMER1_AUDIO_vect TIMER1_COMPC_vect
112112
#endif
113+
114+
#if !defined(BPIN_AUDIO) && !defined(CPIN_AUDIO)
115+
# error "Audio feature enabled, but no suitable pin selected - see docs/feature_audio.md under the AVR settings for available options."
116+
#endif
117+
113118
// -----------------------------------------------------------------------------
114119

115120
int voices = 0;

0 commit comments

Comments
 (0)