From f22ffd6816bbb1aae903e5e0b521882b52867f07 Mon Sep 17 00:00:00 2001 From: sekigon-gonnoc <43873124+sekigon-gonnoc@users.noreply.github.com> Date: Mon, 24 Jan 2022 20:21:04 +0900 Subject: [PATCH] Send wakeup signal to host --- tmk_core/protocol/pico/iusb.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tmk_core/protocol/pico/iusb.c b/tmk_core/protocol/pico/iusb.c index 60eb754b4b..725a31e633 100644 --- a/tmk_core/protocol/pico/iusb.c +++ b/tmk_core/protocol/pico/iusb.c @@ -33,6 +33,10 @@ uint8_t keyboard_leds(void) { } void send_keyboard(report_keyboard_t *report) { + if (tud_ready() && tud_suspended()){ + tud_remote_wakeup(); + } + while (!tud_hid_n_ready(ITF_NUM_HID_KEYBOARD)) { tud_task(); if (!tud_ready()) { @@ -44,6 +48,10 @@ void send_keyboard(report_keyboard_t *report) { } void send_mouse(report_mouse_t *report) { + if (tud_ready() && tud_suspended()){ + tud_remote_wakeup(); + } + while (!tud_hid_n_ready(ITF_NUM_HID_MOUSE)) { tud_task(); if (!tud_ready()) {