Skip to content

Commit

Permalink
Fix F303 audio output on A4 with the dac_basic driver (qmk#12480)
Browse files Browse the repository at this point in the history
The dac_basic driver did not work properly with `#define AUDIO_PIN A4`
(instead of configuring the A4 pin, the driver actually was switching
the A5 pin to analog mode, breaking any other usage of that pin in
addition to emitting a distorted signal on the improperly configured
A4 pin).  Fix the code to configure the A4 pin as intended.
  • Loading branch information
sigprof committed Apr 19, 2021
1 parent 17c880b commit fe9bd0a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion quantum/audio/driver_chibios_dac_basic.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ static const DACConversionGroup dac_conv_grp_ch2 = {.num_channels = 1U, .trigger
void channel_1_start(void) {
gptStart(&GPTD6, &gpt6cfg1);
gptStartContinuous(&GPTD6, 2U);
palSetPadMode(GPIOA, 5, PAL_MODE_INPUT_ANALOG);
palSetPadMode(GPIOA, 4, PAL_MODE_INPUT_ANALOG);
}

void channel_1_stop(void) {
Expand Down

0 comments on commit fe9bd0a

Please sign in to comment.