refractor string descriptors, allow one-stop configure descriptor for
- manufacturer, product etc ... (only english now)
This commit is contained in:
@@ -35,11 +35,7 @@
|
||||
|
||||
#include "tusb.h"
|
||||
|
||||
#define TUSB_CFG_DEVICE_STRING_MANUFACTURER "tinyUSB"
|
||||
#define TUSB_CFG_DEVICE_STRING_PRODUCT "Device Keyboard"
|
||||
#define TUSB_CFG_DEVICE_STRING_SERIAL "1234"
|
||||
#define TUSB_CFG_DEVICE_VENDORID 0x1FC9 // NXP
|
||||
//#define TUSB_CFG_DEVICE_PRODUCTID
|
||||
|
||||
|
||||
/* USB Serial uses the MCUs unique 128-bit chip ID via an IAP call = 32 hex chars */
|
||||
#define USB_STRING_SERIAL_LEN 32
|
||||
@@ -81,7 +77,7 @@ typedef ATTR_PACKED_STRUCT(struct)
|
||||
uint8_t const bLength;
|
||||
uint8_t const bDescriptorType;
|
||||
uint16_t unicode_string[sizeof(TUSB_CFG_DEVICE_STRING_SERIAL)-1]; // exclude null-character
|
||||
} serials;
|
||||
} serial;
|
||||
|
||||
//------------- more string index -------------//
|
||||
|
||||
@@ -180,11 +176,11 @@ typedef ATTR_PACKED_STRUCT(struct)
|
||||
uint8_t null_termination; // NXP rom driver requires this to work
|
||||
} app_descriptor_configuration_t;
|
||||
|
||||
extern const tusb_descriptor_device_t app_tusb_desc_device;
|
||||
extern const app_descriptor_configuration_t app_tusb_desc_configuration;
|
||||
extern const app_descriptor_string_t app_tusb_desc_strings;
|
||||
extern tusb_descriptor_device_t app_tusb_desc_device;
|
||||
extern app_descriptor_configuration_t app_tusb_desc_configuration;
|
||||
extern app_descriptor_string_t app_tusb_desc_strings;
|
||||
|
||||
extern const uint8_t app_tusb_keyboard_desc_report[];
|
||||
extern uint8_t app_tusb_keyboard_desc_report[];
|
||||
|
||||
//extern const uint8_t HID_MouseReportDescriptor[];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user