aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/protocol/vusb/protocol.c
diff options
context:
space:
mode:
authorNick Brassel <nick@tzarc.org>2024-05-28 14:39:23 +1000
committerNick Brassel <nick@tzarc.org>2024-05-28 14:39:23 +1000
commitf76cc320fd9f3365a80cc0d8af2990bc28d76bde (patch)
tree3c5330bbc9ab254424ac57335510de341b4ada11 /tmk_core/protocol/vusb/protocol.c
parent7620c64b99dc5bec480bfaa2708cb3fae709e2b3 (diff)
parent465ab5a20643722c9b712c6b6924472b7345dd64 (diff)
Merge branch 'develop'
Diffstat (limited to 'tmk_core/protocol/vusb/protocol.c')
-rw-r--r--tmk_core/protocol/vusb/protocol.c30
1 files changed, 6 insertions, 24 deletions
diff --git a/tmk_core/protocol/vusb/protocol.c b/tmk_core/protocol/vusb/protocol.c
index 6178d48ef2..41ccf451fd 100644
--- a/tmk_core/protocol/vusb/protocol.c
+++ b/tmk_core/protocol/vusb/protocol.c
@@ -31,14 +31,6 @@
# include "sleep_led.h"
#endif
-#ifdef CONSOLE_ENABLE
-void console_task(void);
-#endif
-
-#ifdef RAW_ENABLE
-void raw_hid_task(void);
-#endif
-
/* This is from main.c of USBaspLoader */
static void initForUsbConnectivity(void) {
uint8_t i = 0;
@@ -136,7 +128,7 @@ static inline bool should_do_suspend(void) {
return vusb_suspended;
}
-void protocol_task(void) {
+void protocol_pre_task(void) {
#if !defined(NO_USB_STARTUP_CHECK)
if (should_do_suspend()) {
dprintln("suspending keyboard");
@@ -159,7 +151,9 @@ void protocol_task(void) {
vusb_wakeup();
}
#endif
+}
+void protocol_keyboard_task(void) {
usbPoll();
// TODO: configuration process is inconsistent. it sometime fails.
@@ -167,20 +161,8 @@ void protocol_task(void) {
if (usbConfiguration && usbInterruptIsReady()) {
keyboard_task();
}
+}
-#ifdef RAW_ENABLE
- usbPoll();
-
- if (usbConfiguration && usbInterruptIsReady4()) {
- raw_hid_task();
- }
-#endif
-
-#ifdef CONSOLE_ENABLE
- usbPoll();
-
- if (usbConfiguration && usbInterruptIsReady3()) {
- console_task();
- }
-#endif
+void protocol_post_task(void) {
+ // do nothing
}