summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--firmware/usb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/firmware/usb.c b/firmware/usb.c
index 8f80070c24..5157eeec63 100644
--- a/firmware/usb.c
+++ b/firmware/usb.c
@@ -599,7 +599,11 @@ void usb_start_monitoring(void)
bool usb_inserted(void)
{
+#ifdef HAVE_USB_POWER
return usb_state == USB_INSERTED || usb_state == USB_POWERED;
+#else
+ return usb_state == USB_INSERTED;
+#endif
}
#ifdef HAVE_USB_POWER