Merge remote-tracking branch 'upstream/master' into develop
This commit is contained in:
commit
10fc6c4cd6
7 changed files with 53 additions and 11 deletions
|
@ -40,3 +40,28 @@ led_config_t g_led_config = { {
|
|||
} };
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
void keyboard_pre_init_kb(void) {
|
||||
// ensure pin is set and enabled pre-audio init
|
||||
setPinOutput(SPEAKER_SHUTDOWN);
|
||||
writePinHigh(SPEAKER_SHUTDOWN);
|
||||
keyboard_pre_init_user();
|
||||
}
|
||||
|
||||
void keyboard_post_init_kb(void) {
|
||||
// set pin based on active status
|
||||
writePin(SPEAKER_SHUTDOWN, audio_is_on());
|
||||
keyboard_post_init_user();
|
||||
}
|
||||
|
||||
void audio_on_user(void) {
|
||||
writePinHigh(SPEAKER_SHUTDOWN);
|
||||
}
|
||||
|
||||
void audio_off_user(void) {
|
||||
// needs a delay or it runs right after play note.
|
||||
wait_ms(200);
|
||||
writePinLow(SPEAKER_SHUTDOWN);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue