From e6c9b83eac395d739731d2bda9ae1fc66e077868 Mon Sep 17 00:00:00 2001 From: Drashna Jael're Date: Tue, 26 May 2020 10:30:23 -0700 Subject: Pull A5 High when channel is stopped --- quantum/audio/audio_chibios.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'quantum') diff --git a/quantum/audio/audio_chibios.c b/quantum/audio/audio_chibios.c index fba7c59873..c21c117f7d 100644 --- a/quantum/audio/audio_chibios.c +++ b/quantum/audio/audio_chibios.c @@ -89,9 +89,15 @@ static void gpt_cb8(GPTDriver *gptp); gptStartContinuous(&GPTD6, 2U) #define START_CHANNEL_2() \ gptStart(&GPTD7, &gpt7cfg1); \ - gptStartContinuous(&GPTD7, 2U) + gptStartContinuous(&GPTD7, 2U); \ + palSetPadMode(GPIOA, 5, PAL_MODE_INPUT_ANALOG) + #define STOP_CHANNEL_1() gptStopTimer(&GPTD6) -#define STOP_CHANNEL_2() gptStopTimer(&GPTD7) +#define STOP_CHANNEL_2() \ + gptStopTimer(&GPTD7); \ + palSetPadMode(GPIOA, 5, PAL_MODE_OUTPUT_PUSHPULL); \ + palSetPad(GPIOA, 5) + #define RESTART_CHANNEL_1() \ STOP_CHANNEL_1(); \ START_CHANNEL_1() -- cgit v1.2.3