Skip to content

Commit

Permalink
Audio enable corrections (Part 4) (qmk#8974)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
JohSchneider authored and noroadsleft committed May 28, 2020
1 parent 68938c8 commit 0a5c9ae
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/ChangeLog/20200530/PR8974.md
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions quantum/audio/audio_avr.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0a5c9ae

Please sign in to comment.