From cd9c01cdecd1fb5c9d52954287eb90436bea06f0 Mon Sep 17 00:00:00 2001 From: Aido Date: Fri, 18 Oct 2024 22:47:48 +0100 Subject: [PATCH] Fix error when setting `DISABLE_STANDARD_USB = 1` in standard app Makefile Fixes #786 (cherry picked from commit 6a4c9477be84c6efd23e434ccd8b7b55102a0628) --- lib_standard_app/main.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib_standard_app/main.c b/lib_standard_app/main.c index a04b360e2..fc0b0fbb5 100644 --- a/lib_standard_app/main.c +++ b/lib_standard_app/main.c @@ -46,8 +46,10 @@ WEAK void common_app_init(void) io_seproxyhal_init(); +#ifdef HAVE_IO_USB USB_power(0); USB_power(1); +#endif #ifdef HAVE_BLE BLE_power(0, NULL); @@ -83,7 +85,9 @@ WEAK void standalone_app_main(void) // - the NanoX goes on battery power and display the lock screen // - the user plug the NanoX instead of entering its pin // - the device is frozen, battery should be removed +#ifdef HAVE_IO_USB USB_power(0); +#endif #ifdef HAVE_BLE BLE_power(0, NULL); #endif