diff options
Diffstat (limited to 'app/src/power.c')
-rw-r--r-- | app/src/power.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/app/src/power.c b/app/src/power.c index 73b3f12..bad54d2 100644 --- a/app/src/power.c +++ b/app/src/power.c @@ -23,14 +23,7 @@ static u32_t power_last_uptime; bool is_usb_power_present() { #ifdef CONFIG_USB - enum usb_dc_status_code usb_status = zmk_usb_get_status(); - switch (usb_status) { - case USB_DC_DISCONNECTED: - case USB_DC_UNKNOWN: - return false; - default: - return true; - } + return zmk_usb_is_powered(); #else return false; #endif /* CONFIG_USB */ |