refractor
- rename usbh_device_info_pool to usbh_devices - create a struct for control pipe in usbh_device_info_t
This commit is contained in:
@@ -47,7 +47,7 @@
|
||||
#include "ehci.h"
|
||||
#include "ehci_controller.h"
|
||||
|
||||
usbh_device_info_t usbh_device_info_pool[TUSB_CFG_HOST_DEVICE_MAX+1];
|
||||
usbh_device_info_t usbh_devices[TUSB_CFG_HOST_DEVICE_MAX+1];
|
||||
|
||||
uint8_t const control_max_packet_size = 64;
|
||||
uint8_t const hub_addr = 2;
|
||||
@@ -89,7 +89,7 @@ void setUp(void)
|
||||
memclr_(&lpc_usb0, sizeof(LPC_USB0_Type));
|
||||
memclr_(&lpc_usb1, sizeof(LPC_USB1_Type));
|
||||
|
||||
memclr_(usbh_device_info_pool, sizeof(usbh_device_info_t)*(TUSB_CFG_HOST_DEVICE_MAX+1));
|
||||
memclr_(usbh_devices, sizeof(usbh_device_info_t)*(TUSB_CFG_HOST_DEVICE_MAX+1));
|
||||
memclr_(xfer_data, sizeof(xfer_data));
|
||||
|
||||
hcd_init();
|
||||
@@ -99,10 +99,10 @@ void setUp(void)
|
||||
hostid = RANDOM(CONTROLLER_HOST_NUMBER) + TEST_CONTROLLER_HOST_START_INDEX;
|
||||
for (uint8_t i=0; i<TUSB_CFG_HOST_DEVICE_MAX+1; i++)
|
||||
{
|
||||
usbh_device_info_pool[i].core_id = hostid;
|
||||
usbh_device_info_pool[i].hub_addr = hub_addr;
|
||||
usbh_device_info_pool[i].hub_port = hub_port;
|
||||
usbh_device_info_pool[i].speed = TUSB_SPEED_HIGH;
|
||||
usbh_devices[i].core_id = hostid;
|
||||
usbh_devices[i].hub_addr = hub_addr;
|
||||
usbh_devices[i].hub_port = hub_port;
|
||||
usbh_devices[i].speed = TUSB_SPEED_HIGH;
|
||||
}
|
||||
|
||||
async_head = get_async_head( hostid );
|
||||
@@ -149,7 +149,7 @@ void verify_qtd(ehci_qtd_t *p_qtd, uint8_t p_data[], uint16_t length)
|
||||
|
||||
void test_bulk_xfer_hs_ping_out(void)
|
||||
{
|
||||
usbh_device_info_pool[dev_addr].speed = TUSB_SPEED_HIGH;
|
||||
usbh_devices[dev_addr].speed = TUSB_SPEED_HIGH;
|
||||
|
||||
pipe_handle_t pipe_hdl = hcd_pipe_open(dev_addr, &desc_ept_bulk_out, TUSB_CLASS_MSC);
|
||||
ehci_qhd_t *p_qhd = qhd_get_from_pipe_handle(pipe_hdl);
|
||||
|
||||
Reference in New Issue
Block a user