Improve and Cleanup Shutdown callbacks (#21060)
Co-authored-by: Dasky <32983009+daskygit@users.noreply.github.com>
This commit is contained in:
parent
4601f339e4
commit
3ef06aa732
79 changed files with 277 additions and 1684 deletions
|
@ -1,18 +1,18 @@
|
|||
/**
|
||||
* Copyright (C) 2021 Jerrell, Jacob <@jjerrell>
|
||||
*
|
||||
*
|
||||
* This file is part of qmk_firmware.
|
||||
*
|
||||
*
|
||||
* qmk_firmware is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* qmk_firmware is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with qmk_firmware. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
@ -114,12 +114,16 @@ void startup_user(void)
|
|||
startup_keymap();
|
||||
}
|
||||
|
||||
__attribute__((weak)) void shutdown_keymap(void) {}
|
||||
void shutdown_user(void)
|
||||
{
|
||||
__attribute__((weak)) bool shutdown_keymap(bool jump_to_bootloader) {
|
||||
return true;
|
||||
}
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
if (!shutdown_keymap(jump_to_bootloader)) {
|
||||
return false;
|
||||
}
|
||||
wait_ms(TAP_CODE_DELAY);
|
||||
stop_all_notes();
|
||||
shutdown_keymap();
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__((weak)) void music_on_keymap(void) {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue