From 668b1ac1dd2fdd0934ae1f92bea8e266e8319f4f Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Mon, 26 Jan 2026 01:27:07 +0100 Subject: [PATCH] Fix emulation build Signed-off-by: Pol Henarejos --- src/usb/usb.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/usb/usb.c b/src/usb/usb.c index 35e8da1..9bdd08c 100644 --- a/src/usb/usb.c +++ b/src/usb/usb.c @@ -73,8 +73,8 @@ queue_t card_to_usb_q = {0}; #ifndef ENABLE_EMULATION extern tusb_desc_device_t desc_device; -#endif extern char *string_desc_itf[4], *string_desc_arr[]; +#endif void usb_init() { #ifndef ENABLE_EMULATION @@ -110,24 +110,32 @@ void usb_init() if (enabled_usb_itf & PHY_USB_ITF_HID) { ITF_HID_CTAP = ITF_HID_TOTAL++; ITF_HID = ITF_TOTAL++; +#ifndef ENABLE_EMULATION string_desc_itf[ITF_TOTAL - 1] = string_desc_arr[5]; +#endif } if (enabled_usb_itf & PHY_USB_ITF_KB) { ITF_HID_KB = ITF_HID_TOTAL++; ITF_KEYBOARD = ITF_TOTAL++; +#ifndef ENABLE_EMULATION string_desc_itf[ITF_TOTAL - 1] = string_desc_arr[6]; +#endif } #endif #ifdef USB_ITF_CCID if (enabled_usb_itf & PHY_USB_ITF_CCID) { ITF_SC_CCID = ITF_SC_TOTAL++; ITF_CCID = ITF_TOTAL++; +#ifndef ENABLE_EMULATION string_desc_itf[ITF_TOTAL - 1] = string_desc_arr[7]; +#endif } if (enabled_usb_itf & PHY_USB_ITF_WCID) { ITF_SC_WCID = ITF_SC_TOTAL++; ITF_WCID = ITF_TOTAL++; +#ifndef ENABLE_EMULATION string_desc_itf[ITF_TOTAL - 1] = string_desc_arr[8]; +#endif } #endif card_locked_itf = ITF_TOTAL;