aboutsummaryrefslogtreecommitdiff
path: root/quantum
diff options
context:
space:
mode:
authorQMK Bot <hello@qmk.fm>2021-05-26 18:50:04 +0000
committerQMK Bot <hello@qmk.fm>2021-05-26 18:50:04 +0000
commita78964c91839e5bc682806b88635c3a1a3d01da5 (patch)
tree39e8cb0b9f9bb644e21701cf379beccaea4f06f0 /quantum
parentf461adbd1dffa178042a4805137918a4bec3c118 (diff)
parent8ba537fa23aa1520949981f1afe1a71338bf8a7a (diff)
downloadqmk_firmware-a78964c91839e5bc682806b88635c3a1a3d01da5.tar.gz
qmk_firmware-a78964c91839e5bc682806b88635c3a1a3d01da5.zip
Merge remote-tracking branch 'origin/master' into develop
Diffstat (limited to 'quantum')
-rw-r--r--quantum/audio/driver_avr_pwm_hardware.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/quantum/audio/driver_avr_pwm_hardware.c b/quantum/audio/driver_avr_pwm_hardware.c
index 492b9bfb0..df03a4558 100644
--- a/quantum/audio/driver_avr_pwm_hardware.c
+++ b/quantum/audio/driver_avr_pwm_hardware.c
@@ -40,7 +40,7 @@ extern uint8_t note_timbre;
40 alternatively, the PWM pins on PORTB can be used as only/primary speaker 40 alternatively, the PWM pins on PORTB can be used as only/primary speaker
41*/ 41*/
42 42
43#if defined(AUDIO_PIN) && (AUDIO_PIN != C4) && (AUDIO_PIN != C5) && (AUDIO_PIN != C6) && (AUDIO_PIN != B5) && (AUDIO_PIN != B6) && (AUDIO_PIN != B7) 43#if defined(AUDIO_PIN) && (AUDIO_PIN != C4) && (AUDIO_PIN != C5) && (AUDIO_PIN != C6) && (AUDIO_PIN != B5) && (AUDIO_PIN != B6) && (AUDIO_PIN != B7) && (AUDIO_PIN != D5)
44# error "Audio feature enabled, but no suitable pin selected as AUDIO_PIN - see docs/feature_audio under the AVR settings for available options." 44# error "Audio feature enabled, but no suitable pin selected as AUDIO_PIN - see docs/feature_audio under the AVR settings for available options."
45#endif 45#endif
46 46
@@ -94,7 +94,7 @@ extern uint8_t note_timbre;
94# error "Audio feature: the pin selected as AUDIO_PIN_ALT is not supported." 94# error "Audio feature: the pin selected as AUDIO_PIN_ALT is not supported."
95#endif 95#endif
96 96
97#if (AUDIO_PIN == B5) || (AUDIO_PIN == B6) || (AUDIO_PIN == B7) || (AUDIO_PIN_ALT == B5) || (AUDIO_PIN_ALT == B6) || (AUDIO_PIN_ALT == B7) 97#if (AUDIO_PIN == B5) || (AUDIO_PIN == B6) || (AUDIO_PIN == B7) || (AUDIO_PIN_ALT == B5) || (AUDIO_PIN_ALT == B6) || (AUDIO_PIN_ALT == B7) || (AUDIO_PIN == D5)
98# define AUDIO2_PIN_SET 98# define AUDIO2_PIN_SET
99# define AUDIO2_TIMSKx TIMSK1 99# define AUDIO2_TIMSKx TIMSK1
100# define AUDIO2_TCCRxA TCCR1A 100# define AUDIO2_TCCRxA TCCR1A
@@ -129,6 +129,16 @@ extern uint8_t note_timbre;
129# define AUDIO2_OCRxy OCR1C 129# define AUDIO2_OCRxy OCR1C
130# define AUDIO2_PIN B7 130# define AUDIO2_PIN B7
131# define AUDIO2_TIMERx_COMPy_vect TIMER1_COMPC_vect 131# define AUDIO2_TIMERx_COMPy_vect TIMER1_COMPC_vect
132# elif (AUDIO_PIN == D5) && defined(__AVR_ATmega32A__)
133# pragma message "Audio support for ATmega32A is experimental and can cause crashes."
134# undef AUDIO2_TIMSKx
135# define AUDIO2_TIMSKx TIMSK
136# define AUDIO2_COMxy0 COM1A0
137# define AUDIO2_COMxy1 COM1A1
138# define AUDIO2_OCIExy OCIE1A
139# define AUDIO2_OCRxy OCR1A
140# define AUDIO2_PIN D5
141# define AUDIO2_TIMERx_COMPy_vect TIMER1_COMPA_vect
132# endif 142# endif
133#endif 143#endif
134 144