summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--quantum/audio/audio_chibios.c10
1 files changed, 8 insertions, 2 deletions
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()