From 7a6737f4713a15fae7c4850395615804a09c742b Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Sun, 31 Oct 2021 12:30:27 -0400 Subject: [PATCH] USB Events fix red on devices without HAVE_USB_POWER Change-Id: I112e6379d4bed019d7e047e5802f104e250d926e --- firmware/usb.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/firmware/usb.c b/firmware/usb.c index 9d071578b5..898df0d434 100644 --- a/firmware/usb.c +++ b/firmware/usb.c @@ -477,6 +477,9 @@ static void NORETURN_ATTR usb_thread(void) usb_stack_enable(true); #ifndef BOOTLOADER +#ifndef HAVE_USB_POWER + int usb_mode = 0; +#endif send_event(SYS_EVENT_USB_INSERTED, &usb_mode); #endif /* Power (charging-only) button */