mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-06-11 04:48:15 +02:00
Fix emulation build
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -73,8 +73,8 @@ queue_t card_to_usb_q = {0};
|
|||||||
|
|
||||||
#ifndef ENABLE_EMULATION
|
#ifndef ENABLE_EMULATION
|
||||||
extern tusb_desc_device_t desc_device;
|
extern tusb_desc_device_t desc_device;
|
||||||
#endif
|
|
||||||
extern char *string_desc_itf[4], *string_desc_arr[];
|
extern char *string_desc_itf[4], *string_desc_arr[];
|
||||||
|
#endif
|
||||||
void usb_init()
|
void usb_init()
|
||||||
{
|
{
|
||||||
#ifndef ENABLE_EMULATION
|
#ifndef ENABLE_EMULATION
|
||||||
@@ -110,24 +110,32 @@ void usb_init()
|
|||||||
if (enabled_usb_itf & PHY_USB_ITF_HID) {
|
if (enabled_usb_itf & PHY_USB_ITF_HID) {
|
||||||
ITF_HID_CTAP = ITF_HID_TOTAL++;
|
ITF_HID_CTAP = ITF_HID_TOTAL++;
|
||||||
ITF_HID = ITF_TOTAL++;
|
ITF_HID = ITF_TOTAL++;
|
||||||
|
#ifndef ENABLE_EMULATION
|
||||||
string_desc_itf[ITF_TOTAL - 1] = string_desc_arr[5];
|
string_desc_itf[ITF_TOTAL - 1] = string_desc_arr[5];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (enabled_usb_itf & PHY_USB_ITF_KB) {
|
if (enabled_usb_itf & PHY_USB_ITF_KB) {
|
||||||
ITF_HID_KB = ITF_HID_TOTAL++;
|
ITF_HID_KB = ITF_HID_TOTAL++;
|
||||||
ITF_KEYBOARD = ITF_TOTAL++;
|
ITF_KEYBOARD = ITF_TOTAL++;
|
||||||
|
#ifndef ENABLE_EMULATION
|
||||||
string_desc_itf[ITF_TOTAL - 1] = string_desc_arr[6];
|
string_desc_itf[ITF_TOTAL - 1] = string_desc_arr[6];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifdef USB_ITF_CCID
|
#ifdef USB_ITF_CCID
|
||||||
if (enabled_usb_itf & PHY_USB_ITF_CCID) {
|
if (enabled_usb_itf & PHY_USB_ITF_CCID) {
|
||||||
ITF_SC_CCID = ITF_SC_TOTAL++;
|
ITF_SC_CCID = ITF_SC_TOTAL++;
|
||||||
ITF_CCID = ITF_TOTAL++;
|
ITF_CCID = ITF_TOTAL++;
|
||||||
|
#ifndef ENABLE_EMULATION
|
||||||
string_desc_itf[ITF_TOTAL - 1] = string_desc_arr[7];
|
string_desc_itf[ITF_TOTAL - 1] = string_desc_arr[7];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
if (enabled_usb_itf & PHY_USB_ITF_WCID) {
|
if (enabled_usb_itf & PHY_USB_ITF_WCID) {
|
||||||
ITF_SC_WCID = ITF_SC_TOTAL++;
|
ITF_SC_WCID = ITF_SC_TOTAL++;
|
||||||
ITF_WCID = ITF_TOTAL++;
|
ITF_WCID = ITF_TOTAL++;
|
||||||
|
#ifndef ENABLE_EMULATION
|
||||||
string_desc_itf[ITF_TOTAL - 1] = string_desc_arr[8];
|
string_desc_itf[ITF_TOTAL - 1] = string_desc_arr[8];
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
card_locked_itf = ITF_TOTAL;
|
card_locked_itf = ITF_TOTAL;
|
||||||
|
|||||||
Reference in New Issue
Block a user