add provision for multiple configurations
This commit is contained in:
@@ -62,8 +62,8 @@ enum
|
||||
|
||||
uint8_t const data_desc_configuration[] =
|
||||
{
|
||||
// Interface count, string index, total length, attribute, power in mA
|
||||
TUD_CONFIG_DESCRIPTOR(ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100),
|
||||
// Interface count, string index, total length, attribute, power in mA, config number
|
||||
TUD_CONFIG_DESCRIPTOR(ITF_NUM_TOTAL, 0, CONFIG_TOTAL_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100, 1),
|
||||
|
||||
// Interface number, string index, EP Out & EP In address, EP size
|
||||
TUD_MSC_DESCRIPTOR(ITF_NUM_MSC, 0, EDPT_MSC_OUT, EDPT_MSC_IN, (CFG_TUSB_RHPORT0_MODE & OPT_MODE_HIGH_SPEED) ? 512 : 64),
|
||||
|
@@ -73,8 +73,8 @@ tusb_desc_device_t const data_desc_device =
|
||||
|
||||
uint8_t const data_desc_configuration[] =
|
||||
{
|
||||
// Interface count, string index, total length, attribute, power in mA
|
||||
TUD_CONFIG_DESCRIPTOR(0, 0, TUD_CONFIG_DESC_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100),
|
||||
// Interface count, string index, total length, attribute, power in mA, config number
|
||||
TUD_CONFIG_DESCRIPTOR(0, 0, TUD_CONFIG_DESC_LEN, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100, 1),
|
||||
};
|
||||
|
||||
tusb_control_request_t const req_get_desc_device =
|
||||
@@ -211,8 +211,8 @@ void test_usbd_control_in_zlp(void)
|
||||
// ZLP must be return
|
||||
uint8_t zlp_desc_configuration[CFG_TUD_ENDOINT0_SIZE*2] =
|
||||
{
|
||||
// Interface count, string index, total length, attribute, power in mA
|
||||
TUD_CONFIG_DESCRIPTOR(0, 0, CFG_TUD_ENDOINT0_SIZE*2, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100),
|
||||
// Interface count, string index, total length, attribute, power in mA, config number
|
||||
TUD_CONFIG_DESCRIPTOR(0, 0, CFG_TUD_ENDOINT0_SIZE*2, TUSB_DESC_CONFIG_ATT_REMOTE_WAKEUP, 100, 1),
|
||||
};
|
||||
|
||||
desc_configuration = zlp_desc_configuration;
|
||||
|
Reference in New Issue
Block a user