Fix interface conditional builds.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
6f6004c57b
commit
cff3f8f677
3 changed files with 20 additions and 1 deletions
|
|
@ -491,7 +491,9 @@ int driver_process_usb_packet_hid(uint16_t read) {
|
|||
(msg_packet.len == msg_packet.current_len && msg_packet.len > 0))) {
|
||||
if (last_cmd == CTAPHID_OTP) {
|
||||
is_nk = true;
|
||||
#ifdef ENABLE_OATH_APP
|
||||
select_app(oath_aid + 1, oath_aid[0]);
|
||||
#endif
|
||||
}
|
||||
else {
|
||||
select_app(u2f_aid + 1, u2f_aid[0]);
|
||||
|
|
|
|||
|
|
@ -267,3 +267,11 @@ int card_status(uint8_t itf) {
|
|||
}
|
||||
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
|
||||
|
||||
enum {
|
||||
EPNUM_DUMMY = 1,
|
||||
#ifdef USB_ITF_CCID
|
||||
EPNUM_CCID = 1,
|
||||
EPNUM_CCID,
|
||||
#if TUSB_SMARTCARD_CCID_EPS == 3
|
||||
EPNUM_CCID_INT,
|
||||
#endif
|
||||
|
|
@ -199,6 +200,8 @@ uint8_t const *tud_descriptor_configuration_cb(uint8_t index) {
|
|||
}
|
||||
#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 MS_OS_20_DESC_LEN 0xB2
|
||||
|
||||
|
|
@ -302,6 +305,8 @@ uint8_t const *tud_descriptor_bos_cb(void) {
|
|||
return desc_bos;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//--------------------------------------------------------------------+
|
||||
// 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) {
|
||||
str = string_desc_arr[6];
|
||||
}
|
||||
#ifdef USB_ITF_CCID
|
||||
else if (itf_index == ITF_CCID) {
|
||||
str = string_desc_arr[7];
|
||||
}
|
||||
#endif
|
||||
#ifdef USB_ITF_WCID
|
||||
else if (itf_index == ITF_WCID) {
|
||||
str = string_desc_arr[8];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
uint8_t buff_avail = sizeof(_desc_str) / sizeof(_desc_str[0]) - 1;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue