1 /* This tests the case where the hub has multiple TTs. Specific test case
2    is in ux_host_class_hub_descriptor_get.c. */
3 
4 #include "usbx_ux_test_hub.h"
5 
6 static unsigned char framework_multiple_tts[] = {
7 
8     /* Device Descriptor */
9     0x12, /* bLength */
10     0x01, /* bDescriptorType */
11     0x00, 0x02, /* bcdUSB */
12     0x09, /* bDeviceClass - Hub */
13     0x00, /* bDeviceSubClass */
14     0x02, /* bDeviceProtocol - multiple TTs */
15     0x40, /* bMaxPacketSize0 */
16     0x24, 0x04, /* idVendor */
17     0x12, 0x24, /* idProduct */
18     0xb2, 0x0b, /* bcdDevice */
19     0x00, /* iManufacturer */
20     0x00, /* iProduct */
21     0x00, /* iSerialNumber */
22     0x01, /* bNumConfigurations */
23 
24     /* Configuration Descriptor */
25     0x09, /* bLength */
26     0x02, /* bDescriptorType */
27     0x19, 0x00, /* wTotalLength */
28     0x01, /* bNumInterfaces */
29     0x01, /* bConfigurationValue */
30     0x00, /* iConfiguration */
31     0xe0, /* bmAttributes - Self-powered */
32     0x01, /* bMaxPower */
33 
34     /* Interface Descriptor */
35     0x09, /* bLength */
36     0x04, /* bDescriptorType */
37     0x00, /* bInterfaceNumber */
38     0x00, /* bAlternateSetting */
39     0x01, /* bNumEndpoints */
40     0x09, /* bInterfaceClass - Hub */
41     0x00, /* bInterfaceSubClass */
42     0x01, /* bInterfaceProtocol */
43     0x00, /* iInterface */
44 
45     /* Endpoint Descriptor */
46     0x07, /* bLength */
47     0x05, /* bDescriptorType */
48     0x81, /* bEndpointAddress */
49     0x03, /* bmAttributes - Interrupt */
50     0x02, 0x00, /* wMaxPacketSize */
51     0x0c, /* bInterval */
52 
53 };
54 
55 static DEVICE_INIT_DATA device_init_data = {
56     .framework = framework_multiple_tts,
57     .framework_length = sizeof(framework_multiple_tts),
58 };
59 
60 #ifdef CTEST
test_application_define(void * first_unused_memory)61 void test_application_define(void *first_unused_memory)
62 #else
63 void usbx_hub_multiple_tt_test_application_define(void *first_unused_memory)
64 #endif
65 {
66 
67     /* Inform user.  */
68     printf("Running Hub With Multiple TT Test................................... ");
69 
70     stepinfo("\n");
71 
72     initialize_hub_with_device_init_data(first_unused_memory, &device_init_data);
73 }
74 
post_init_host()75 static void post_init_host()
76 {
77 }
78 
post_init_device()79 static void post_init_device()
80 {
81 }