shorten descriptor type
This commit is contained in:
@@ -157,9 +157,9 @@ void test_isr_disconnect_then_async_advance_control_pipe(void)
|
||||
|
||||
void test_bulk_pipe_close(void)
|
||||
{
|
||||
tusb_descriptor_endpoint_t const desc_ept_bulk_in =
|
||||
tusb_desc_endpoint_t const desc_ept_bulk_in =
|
||||
{
|
||||
.bLength = sizeof(tusb_descriptor_endpoint_t),
|
||||
.bLength = sizeof(tusb_desc_endpoint_t),
|
||||
.bDescriptorType = TUSB_DESC_TYPE_ENDPOINT,
|
||||
.bEndpointAddress = 0x81,
|
||||
.bmAttributes = { .xfer = TUSB_XFER_BULK },
|
||||
|
||||
@@ -107,9 +107,9 @@ void verify_open_qhd(ehci_qhd_t *p_qhd, uint8_t endpoint_addr, uint16_t max_pack
|
||||
//--------------------------------------------------------------------+
|
||||
// PIPE OPEN
|
||||
//--------------------------------------------------------------------+
|
||||
tusb_descriptor_endpoint_t const desc_ept_bulk_in =
|
||||
tusb_desc_endpoint_t const desc_ept_bulk_in =
|
||||
{
|
||||
.bLength = sizeof(tusb_descriptor_endpoint_t),
|
||||
.bLength = sizeof(tusb_desc_endpoint_t),
|
||||
.bDescriptorType = TUSB_DESC_TYPE_ENDPOINT,
|
||||
.bEndpointAddress = 0x81,
|
||||
.bmAttributes = { .xfer = TUSB_XFER_BULK },
|
||||
@@ -117,9 +117,9 @@ tusb_descriptor_endpoint_t const desc_ept_bulk_in =
|
||||
.bInterval = 0
|
||||
};
|
||||
|
||||
tusb_descriptor_endpoint_t const desc_ept_bulk_out =
|
||||
tusb_desc_endpoint_t const desc_ept_bulk_out =
|
||||
{
|
||||
.bLength = sizeof(tusb_descriptor_endpoint_t),
|
||||
.bLength = sizeof(tusb_desc_endpoint_t),
|
||||
.bDescriptorType = TUSB_DESC_TYPE_ENDPOINT,
|
||||
.bEndpointAddress = 0x01,
|
||||
.bmAttributes = { .xfer = TUSB_XFER_BULK },
|
||||
@@ -127,7 +127,7 @@ tusb_descriptor_endpoint_t const desc_ept_bulk_out =
|
||||
.bInterval = 0
|
||||
};
|
||||
|
||||
void verify_bulk_open_qhd(ehci_qhd_t *p_qhd, tusb_descriptor_endpoint_t const * desc_endpoint, uint8_t class_code)
|
||||
void verify_bulk_open_qhd(ehci_qhd_t *p_qhd, tusb_desc_endpoint_t const * desc_endpoint, uint8_t class_code)
|
||||
{
|
||||
verify_open_qhd(p_qhd, desc_endpoint->bEndpointAddress, desc_endpoint->wMaxPacketSize.size);
|
||||
|
||||
@@ -152,7 +152,7 @@ void test_open_bulk_qhd_data(void)
|
||||
{
|
||||
ehci_qhd_t *p_qhd;
|
||||
pipe_handle_t pipe_hdl;
|
||||
tusb_descriptor_endpoint_t const * desc_endpoint = &desc_ept_bulk_in;
|
||||
tusb_desc_endpoint_t const * desc_endpoint = &desc_ept_bulk_in;
|
||||
|
||||
//------------- Code Under TEST -------------//
|
||||
pipe_hdl = hcd_pipe_open(dev_addr, desc_endpoint, TUSB_CLASS_MSC);
|
||||
@@ -186,7 +186,7 @@ void test_open_bulk_hs_out_pingstate(void)
|
||||
//--------------------------------------------------------------------+
|
||||
void test_bulk_close(void)
|
||||
{
|
||||
tusb_descriptor_endpoint_t const * desc_endpoint = &desc_ept_bulk_in;
|
||||
tusb_desc_endpoint_t const * desc_endpoint = &desc_ept_bulk_in;
|
||||
pipe_handle_t pipe_hdl = hcd_pipe_open(dev_addr, desc_endpoint, TUSB_CLASS_MSC);
|
||||
ehci_qhd_t *p_qhd = &ehci_data.device[ pipe_hdl.dev_addr-1].qhd[ pipe_hdl.index ];
|
||||
|
||||
|
||||
@@ -64,9 +64,9 @@ static ehci_qhd_t *async_head;
|
||||
static ehci_qhd_t *p_qhd_bulk;
|
||||
static pipe_handle_t pipe_hdl_bulk;
|
||||
|
||||
tusb_descriptor_endpoint_t const desc_ept_bulk_in =
|
||||
tusb_desc_endpoint_t const desc_ept_bulk_in =
|
||||
{
|
||||
.bLength = sizeof(tusb_descriptor_endpoint_t),
|
||||
.bLength = sizeof(tusb_desc_endpoint_t),
|
||||
.bDescriptorType = TUSB_DESC_TYPE_ENDPOINT,
|
||||
.bEndpointAddress = 0x81,
|
||||
.bmAttributes = { .xfer = TUSB_XFER_BULK },
|
||||
@@ -74,9 +74,9 @@ tusb_descriptor_endpoint_t const desc_ept_bulk_in =
|
||||
.bInterval = 0
|
||||
};
|
||||
|
||||
tusb_descriptor_endpoint_t const desc_ept_bulk_out =
|
||||
tusb_desc_endpoint_t const desc_ept_bulk_out =
|
||||
{
|
||||
.bLength = sizeof(tusb_descriptor_endpoint_t),
|
||||
.bLength = sizeof(tusb_desc_endpoint_t),
|
||||
.bDescriptorType = TUSB_DESC_TYPE_ENDPOINT,
|
||||
.bEndpointAddress = 0x01,
|
||||
.bmAttributes = { .xfer = TUSB_XFER_BULK },
|
||||
|
||||
@@ -113,16 +113,16 @@ void verify_open_qhd(ehci_qhd_t *p_qhd, uint8_t endpoint_addr, uint16_t max_pack
|
||||
//--------------------------------------------------------------------+
|
||||
// PIPE OPEN
|
||||
//--------------------------------------------------------------------+
|
||||
tusb_descriptor_endpoint_t const desc_ept_interrupt_out =
|
||||
tusb_desc_endpoint_t const desc_ept_interrupt_out =
|
||||
{
|
||||
.bLength = sizeof(tusb_descriptor_endpoint_t),
|
||||
.bLength = sizeof(tusb_desc_endpoint_t),
|
||||
.bDescriptorType = TUSB_DESC_TYPE_ENDPOINT,
|
||||
.bEndpointAddress = 0x02,
|
||||
.bmAttributes = { .xfer = TUSB_XFER_INTERRUPT },
|
||||
.wMaxPacketSize = 16,
|
||||
.bInterval = 4
|
||||
};
|
||||
void verify_int_qhd(ehci_qhd_t *p_qhd, tusb_descriptor_endpoint_t const * desc_endpoint, uint8_t class_code)
|
||||
void verify_int_qhd(ehci_qhd_t *p_qhd, tusb_desc_endpoint_t const * desc_endpoint, uint8_t class_code)
|
||||
{
|
||||
verify_open_qhd(p_qhd, desc_endpoint->bEndpointAddress, desc_endpoint->wMaxPacketSize.size);
|
||||
|
||||
@@ -158,7 +158,7 @@ void test_open_interrupt_qhd_hs(void)
|
||||
|
||||
void test_open_interrupt_hs_interval_1(void)
|
||||
{
|
||||
tusb_descriptor_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
tusb_desc_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
int_edp_interval.bInterval = 1;
|
||||
|
||||
//------------- Code Under TEST -------------//
|
||||
@@ -173,7 +173,7 @@ void test_open_interrupt_hs_interval_1(void)
|
||||
|
||||
void test_open_interrupt_hs_interval_2(void)
|
||||
{
|
||||
tusb_descriptor_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
tusb_desc_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
int_edp_interval.bInterval = 2;
|
||||
|
||||
//------------- Code Under TEST -------------//
|
||||
@@ -187,7 +187,7 @@ void test_open_interrupt_hs_interval_2(void)
|
||||
|
||||
void test_open_interrupt_hs_interval_3(void)
|
||||
{
|
||||
tusb_descriptor_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
tusb_desc_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
int_edp_interval.bInterval = 3;
|
||||
|
||||
//------------- Code Under TEST -------------//
|
||||
@@ -201,7 +201,7 @@ void test_open_interrupt_hs_interval_3(void)
|
||||
|
||||
void test_open_interrupt_hs_interval_4(void)
|
||||
{
|
||||
tusb_descriptor_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
tusb_desc_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
int_edp_interval.bInterval = 4;
|
||||
|
||||
//------------- Code Under TEST -------------//
|
||||
@@ -215,7 +215,7 @@ void test_open_interrupt_hs_interval_4(void)
|
||||
|
||||
void test_open_interrupt_hs_interval_5(void)
|
||||
{
|
||||
tusb_descriptor_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
tusb_desc_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
int_edp_interval.bInterval = 5;
|
||||
|
||||
//------------- Code Under TEST -------------//
|
||||
@@ -229,7 +229,7 @@ void test_open_interrupt_hs_interval_5(void)
|
||||
|
||||
void test_open_interrupt_hs_interval_6(void)
|
||||
{
|
||||
tusb_descriptor_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
tusb_desc_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
int_edp_interval.bInterval = 6;
|
||||
|
||||
//------------- Code Under TEST -------------//
|
||||
@@ -243,7 +243,7 @@ void test_open_interrupt_hs_interval_6(void)
|
||||
|
||||
void test_open_interrupt_hs_interval_7(void)
|
||||
{
|
||||
tusb_descriptor_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
tusb_desc_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
int_edp_interval.bInterval = 7;
|
||||
|
||||
//------------- Code Under TEST -------------//
|
||||
@@ -257,7 +257,7 @@ void test_open_interrupt_hs_interval_7(void)
|
||||
|
||||
void test_open_interrupt_hs_interval_8(void)
|
||||
{
|
||||
tusb_descriptor_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
tusb_desc_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
int_edp_interval.bInterval = 16;
|
||||
|
||||
//------------- Code Under TEST -------------//
|
||||
@@ -291,7 +291,7 @@ void test_open_interrupt_qhd_non_hs(void)
|
||||
|
||||
void test_open_interrupt_qhd_non_hs_9(void)
|
||||
{
|
||||
tusb_descriptor_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
tusb_desc_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
int_edp_interval.bInterval = 32;
|
||||
|
||||
usbh_devices[dev_addr].speed = TUSB_SPEED_FULL;
|
||||
@@ -325,7 +325,7 @@ void test_interrupt_close(void)
|
||||
|
||||
void test_interrupt_256ms_close(void)
|
||||
{
|
||||
tusb_descriptor_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
tusb_desc_endpoint_t int_edp_interval = desc_ept_interrupt_out;
|
||||
int_edp_interval.bInterval = 9;
|
||||
|
||||
pipe_hdl = hcd_pipe_open(dev_addr, &int_edp_interval, TUSB_CLASS_HID);
|
||||
|
||||
@@ -64,9 +64,9 @@ static ehci_qhd_t *period_head_arr;
|
||||
static ehci_qhd_t *p_qhd_interrupt;
|
||||
static pipe_handle_t pipe_hdl_interrupt;
|
||||
|
||||
static tusb_descriptor_endpoint_t const desc_ept_interrupt_in =
|
||||
static tusb_desc_endpoint_t const desc_ept_interrupt_in =
|
||||
{
|
||||
.bLength = sizeof(tusb_descriptor_endpoint_t),
|
||||
.bLength = sizeof(tusb_desc_endpoint_t),
|
||||
.bDescriptorType = TUSB_DESC_TYPE_ENDPOINT,
|
||||
.bEndpointAddress = 0x81,
|
||||
.bmAttributes = { .xfer = TUSB_XFER_INTERRUPT },
|
||||
@@ -74,9 +74,9 @@ static tusb_descriptor_endpoint_t const desc_ept_interrupt_in =
|
||||
.bInterval = 2
|
||||
};
|
||||
|
||||
static tusb_descriptor_endpoint_t const desc_ept_interupt_out =
|
||||
static tusb_desc_endpoint_t const desc_ept_interupt_out =
|
||||
{
|
||||
.bLength = sizeof(tusb_descriptor_endpoint_t),
|
||||
.bLength = sizeof(tusb_desc_endpoint_t),
|
||||
.bDescriptorType = TUSB_DESC_TYPE_ENDPOINT,
|
||||
.bEndpointAddress = 0x01,
|
||||
.bmAttributes = { .xfer = TUSB_XFER_INTERRUPT },
|
||||
@@ -217,7 +217,7 @@ void test_interrupt_xfer_complete_isr_interval_less_than_1ms(void)
|
||||
|
||||
void test_interrupt_xfer_complete_isr_interval_2ms(void)
|
||||
{
|
||||
tusb_descriptor_endpoint_t desc_endpoint_2ms = desc_ept_interrupt_in;
|
||||
tusb_desc_endpoint_t desc_endpoint_2ms = desc_ept_interrupt_in;
|
||||
desc_endpoint_2ms.bInterval = 5;
|
||||
|
||||
pipe_handle_t pipe_hdl_2ms = hcd_pipe_open(dev_addr, &desc_endpoint_2ms, TUSB_CLASS_HID);
|
||||
|
||||
@@ -82,9 +82,9 @@ void tearDown(void)
|
||||
//--------------------------------------------------------------------+
|
||||
// TODO ISOCRHONOUS PIPE
|
||||
//--------------------------------------------------------------------+
|
||||
tusb_descriptor_endpoint_t const desc_ept_iso_in =
|
||||
tusb_desc_endpoint_t const desc_ept_iso_in =
|
||||
{
|
||||
.bLength = sizeof(tusb_descriptor_endpoint_t),
|
||||
.bLength = sizeof(tusb_desc_endpoint_t),
|
||||
.bDescriptorType = TUSB_DESC_TYPE_ENDPOINT,
|
||||
.bEndpointAddress = 0x83,
|
||||
.bmAttributes = { .xfer = TUSB_XFER_ISOCHRONOUS },
|
||||
|
||||
Reference in New Issue
Block a user