diff options
author | angweekiat <[email protected]> | 2024-10-15 07:15:45 +0800 |
---|---|---|
committer | GitHub <[email protected]> | 2024-10-14 19:15:45 -0400 |
commit | 0adb80c02b846e9fae9b53ff71df3b1071c05573 (patch) | |
tree | 3eef0ebab44be9096186ce7bd528a2115d1836b2 /app/include | |
parent | 6cbf25f04a275cb68cddae4846d46fb66824f349 (diff) | |
download | zmk-0adb80c02b846e9fae9b53ff71df3b1071c05573.tar.gz zmk-0adb80c02b846e9fae9b53ff71df3b1071c05573.zip |
fix(usb): detect USB power mode to fallback to BLE
* Add tracking to see if we ever hit a configured status before
suspend, so we can properly track "is connected" even when
connected to a suspended/asleep host.
Diffstat (limited to 'app/include')
-rw-r--r-- | app/include/zmk/usb.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/app/include/zmk/usb.h b/app/include/zmk/usb.h index 540cdd9c7e..a5e5089f88 100644 --- a/app/include/zmk/usb.h +++ b/app/include/zmk/usb.h @@ -24,6 +24,4 @@ enum zmk_usb_conn_state zmk_usb_get_conn_state(void); static inline bool zmk_usb_is_powered(void) { return zmk_usb_get_conn_state() != ZMK_USB_CONN_NONE; } -static inline bool zmk_usb_is_hid_ready(void) { - return zmk_usb_get_conn_state() == ZMK_USB_CONN_HID; -} +bool zmk_usb_is_hid_ready(void); |