core: NO_KEYBOARD build option

disables USB keyboard interface
This commit is contained in:
tmk 2021-07-16 23:56:02 +09:00
parent 86b4d082d9
commit 4964617a31
8 changed files with 104 additions and 21 deletions

View file

@ -115,21 +115,25 @@ void suspend_power_down(void)
bool suspend_wakeup_condition(void)
{
#ifndef NO_KEYBOARD
matrix_power_up();
matrix_scan();
matrix_power_down();
for (uint8_t r = 0; r < MATRIX_ROWS; r++) {
if (matrix_get_row(r)) return true;
}
#endif
return false;
}
// run immediately after wakeup
void suspend_wakeup_init(void)
{
#ifndef NO_KEYBOARD
// clear keyboard state
matrix_clear();
clear_keyboard();
#endif
#ifdef BACKLIGHT_ENABLE
backlight_init();
#endif