mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-06-11 12:58:14 +02:00
Fix interface conditional builds.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -491,7 +491,9 @@ int driver_process_usb_packet_hid(uint16_t read) {
|
|||||||
(msg_packet.len == msg_packet.current_len && msg_packet.len > 0))) {
|
(msg_packet.len == msg_packet.current_len && msg_packet.len > 0))) {
|
||||||
if (last_cmd == CTAPHID_OTP) {
|
if (last_cmd == CTAPHID_OTP) {
|
||||||
is_nk = true;
|
is_nk = true;
|
||||||
|
#ifdef ENABLE_OATH_APP
|
||||||
select_app(oath_aid + 1, oath_aid[0]);
|
select_app(oath_aid + 1, oath_aid[0]);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
select_app(u2f_aid + 1, u2f_aid[0]);
|
select_app(u2f_aid + 1, u2f_aid[0]);
|
||||||
|
|||||||
@@ -267,3 +267,11 @@ int card_status(uint8_t itf) {
|
|||||||
}
|
}
|
||||||
return PICOKEY_ERR_FILE_NOT_FOUND;
|
return PICOKEY_ERR_FILE_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef USB_ITF_CCID
|
||||||
|
#include "device/usbd_pvt.h"
|
||||||
|
usbd_class_driver_t const *usbd_app_driver_get_cb(uint8_t *driver_count) {
|
||||||
|
*driver_count = 0;
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
@@ -103,8 +103,9 @@ uint8_t const desc_hid_report_kb[] = {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
|
EPNUM_DUMMY = 1,
|
||||||
#ifdef USB_ITF_CCID
|
#ifdef USB_ITF_CCID
|
||||||
EPNUM_CCID = 1,
|
EPNUM_CCID,
|
||||||
#if TUSB_SMARTCARD_CCID_EPS == 3
|
#if TUSB_SMARTCARD_CCID_EPS == 3
|
||||||
EPNUM_CCID_INT,
|
EPNUM_CCID_INT,
|
||||||
#endif
|
#endif
|
||||||
@@ -199,6 +200,8 @@ uint8_t const *tud_descriptor_configuration_cb(uint8_t index) {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef USB_ITF_WCID
|
||||||
|
|
||||||
#define BOS_TOTAL_LEN (TUD_BOS_DESC_LEN + TUD_BOS_WEBUSB_DESC_LEN + TUD_BOS_MICROSOFT_OS_DESC_LEN)
|
#define BOS_TOTAL_LEN (TUD_BOS_DESC_LEN + TUD_BOS_WEBUSB_DESC_LEN + TUD_BOS_MICROSOFT_OS_DESC_LEN)
|
||||||
#define MS_OS_20_DESC_LEN 0xB2
|
#define MS_OS_20_DESC_LEN 0xB2
|
||||||
|
|
||||||
@@ -302,6 +305,8 @@ uint8_t const *tud_descriptor_bos_cb(void) {
|
|||||||
return desc_bos;
|
return desc_bos;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
// String Descriptors
|
// String Descriptors
|
||||||
//--------------------------------------------------------------------+
|
//--------------------------------------------------------------------+
|
||||||
@@ -368,12 +373,16 @@ uint16_t const *tud_descriptor_string_cb(uint8_t index, uint16_t langid) {
|
|||||||
else if (itf_index == ITF_HID_KB) {
|
else if (itf_index == ITF_HID_KB) {
|
||||||
str = string_desc_arr[6];
|
str = string_desc_arr[6];
|
||||||
}
|
}
|
||||||
|
#ifdef USB_ITF_CCID
|
||||||
else if (itf_index == ITF_CCID) {
|
else if (itf_index == ITF_CCID) {
|
||||||
str = string_desc_arr[7];
|
str = string_desc_arr[7];
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
#ifdef USB_ITF_WCID
|
||||||
else if (itf_index == ITF_WCID) {
|
else if (itf_index == ITF_WCID) {
|
||||||
str = string_desc_arr[8];
|
str = string_desc_arr[8];
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t buff_avail = sizeof(_desc_str) / sizeof(_desc_str[0]) - 1;
|
uint8_t buff_avail = sizeof(_desc_str) / sizeof(_desc_str[0]) - 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user