Skip to content

Commit

Permalink
Audio enable corrections (Part 4) (#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 May 14, 2020
1 parent e658fd2 commit a8f4dca
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 a8f4dca

Please sign in to comment.