diff options
author | Florian Didron <fdidron@users.noreply.github.com> | 2019-05-20 15:49:33 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-20 15:49:33 +0900 |
commit | 75eb50945246d2522c00c28159e32b6aaecd14e2 (patch) | |
tree | bc51a7453fe1979df04e40d13aa77ce5a47f5a97 /quantum/audio/audio_arm.c | |
parent | 9ab77d760cf309bb8b6ec17742c96ceae4de8965 (diff) | |
parent | 0cce8cbab0bc2cf5b4d07ca0918af3ec37fac8f6 (diff) |
Merge branch 'master' into add_python
Diffstat (limited to 'quantum/audio/audio_arm.c')
-rw-r--r-- | quantum/audio/audio_arm.c | 9 |
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); |