summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Didron <fdidron@users.noreply.github.com>2019-05-15 09:51:01 +0900
committerGitHub <noreply@github.com>2019-05-15 09:51:01 +0900
commit8ca41899d25aa028e2fab1024c7498716ecb04e9 (patch)
treeb9036772ee9261300e32b004cc5b279e817fae8c
parentff3e430970fb38940598ae96e2c85d1cb9e15ad9 (diff)
parent51cc6f398d33a85251733fd1f76607fdccb6d898 (diff)
Merge pull request #49 from zsa/fix/planck_ez_a5_high
make a5 high when not in use
-rw-r--r--quantum/audio/audio_arm.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/quantum/audio/audio_arm.c b/quantum/audio/audio_arm.c
index de0cd15c58..e5164f2abb 100644
--- a/quantum/audio/audio_arm.c
+++ b/quantum/audio/audio_arm.c
@@ -85,10 +85,13 @@ static void gpt_cb8(GPTDriver *gptp);
#endif
#define START_CHANNEL_1() gptStart(&GPTD6, &gpt6cfg1); \
- gptStartContinuous(&GPTD6, 2U)
+ gptStartContinuous(&GPTD6, 2U); \
+ palSetPadMode(GPIOA, 5, PAL_MODE_INPUT_ANALOG);
#define START_CHANNEL_2() gptStart(&GPTD7, &gpt7cfg1); \
gptStartContinuous(&GPTD7, 2U)
-#define STOP_CHANNEL_1() gptStopTimer(&GPTD6)
+#define STOP_CHANNEL_1() gptStopTimer(&GPTD6); \
+ palSetPadMode(GPIOA, 5, PAL_MODE_OUTPUT_PUSHPULL); \
+ palSetPad(GPIOA, 5);
#define STOP_CHANNEL_2() gptStopTimer(&GPTD7)
#define RESTART_CHANNEL_1() STOP_CHANNEL_1(); \
START_CHANNEL_1()
@@ -298,6 +301,8 @@ void audio_init() {
*/
palSetPadMode(GPIOA, 4, PAL_MODE_INPUT_ANALOG);
palSetPadMode(GPIOA, 5, PAL_MODE_INPUT_ANALOG);
+ palSetPad(GPIOA, 5);
+
dacStart(&DACD1, &dac1cfg1);
dacStart(&DACD2, &dac1cfg2);