[Keymap] Reorganization, cleanup and readmes for drashna code (#15617)

This commit is contained in:
Drashna Jaelre
2021-12-29 20:17:34 -08:00
committed by GitHub
parent 1a8a842cfb
commit c4551d7ef1
64 changed files with 1291 additions and 1163 deletions

View File

@ -1,18 +1,5 @@
/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
*
* This program 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 2 of the License, or
* (at your option) any later version.
*
* This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
// SPDX-License-Identifier: GPL-2.0-or-later
#include "drashna.h"
#include "version.h"
@ -22,6 +9,9 @@
#ifdef AUTOCORRECTION_ENABLE
# include "autocorrection/autocorrection.h"
#endif
#ifdef __AVR__
#include <avr/wdt.h>
#endif
uint16_t copy_paste_timer;
bool host_driver_disabled = false;
@ -212,6 +202,28 @@ bool process_record_user(uint16_t keycode, keyrecord_t *re
}
break;
}
case EEP_RST:
if (record->event.pressed) {
eeconfig_disable();
shutdown_user();
#ifdef __AVR__
wdt_enable(WDTO_250MS);
#else
NVIC_SystemReset();
#endif
}
return false;
case REBOOT:
if (record->event.pressed) {
shutdown_user();
#ifdef __AVR__
wdt_enable(WDTO_250MS);
#else
NVIC_SystemReset();
#endif
}
return false;
}
return true;
}