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:
hathach
2013-03-24 16:44:59 +07:00
parent ea04815bbc
commit 92c137243d
15 changed files with 145 additions and 144 deletions
@@ -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 hub_addr = 2;
uint8_t const hub_port = 2;
@@ -60,7 +60,7 @@ ehci_qhd_t *period_head;
//--------------------------------------------------------------------+
void setUp(void)
{
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));
hcd_init();
@@ -69,10 +69,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;
}
period_head = get_period_head( hostid );