From 1d369ffa73ae63af821d012b1c2ab4a07a5dc9c7 Mon Sep 17 00:00:00 2001 From: Joel Spadin Date: Sun, 11 Oct 2020 17:03:21 -0500 Subject: feat: only send HID reports to one endpoint Added some utility functions and an event for tracking the state of the USB connection. Updated endpoints.c to select a single endpoint to send HID reports to based on the status of the USB and BLE connections. Partially fixes #206. Future commits will add a user setting to control which endpoint is used if both USB and BLE are ready. --- app/src/events/usb_conn_state_changed.c | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 app/src/events/usb_conn_state_changed.c (limited to 'app/src/events') diff --git a/app/src/events/usb_conn_state_changed.c b/app/src/events/usb_conn_state_changed.c new file mode 100644 index 0000000..d845f6d --- /dev/null +++ b/app/src/events/usb_conn_state_changed.c @@ -0,0 +1,10 @@ +/* + * Copyright (c) 2020 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include +#include + +ZMK_EVENT_IMPL(usb_conn_state_changed); \ No newline at end of file -- cgit v1.2.3