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.
This commit is contained in:
parent
dfb69d8727
commit
1d369ffa73
7 changed files with 190 additions and 45 deletions
10
app/src/events/usb_conn_state_changed.c
Normal file
10
app/src/events/usb_conn_state_changed.c
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
/*
|
||||
* Copyright (c) 2020 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include <kernel.h>
|
||||
#include <zmk/events/usb-conn-state-changed.h>
|
||||
|
||||
ZMK_EVENT_IMPL(usb_conn_state_changed);
|
||||
Loading…
Add table
Add a link
Reference in a new issue