implement hcd_port_speed_get

move port reset & speed detection from isr context to usbh enumeration task
- decrease time in isr significantly from 50 ms to 580us
fix bug with osal_task_delay for freeRTOS buil
This commit is contained in:
hathach
2013-04-25 17:48:55 +07:00
parent 3763e22c9a
commit c0104b996e
7 changed files with 27 additions and 16 deletions

View File

@@ -68,7 +68,7 @@ void tearDown(void)
void test_isr_device_connect_highspeed(void)
{
usbh_device_plugged_isr_Expect(hostid, TUSB_SPEED_HIGH);
usbh_device_plugged_isr_Expect(hostid);
//------------- Code Under Test -------------//
ehci_controller_device_plug(hostid, TUSB_SPEED_HIGH);
@@ -76,7 +76,7 @@ void test_isr_device_connect_highspeed(void)
void test_isr_device_connect_fullspeed(void)
{
usbh_device_plugged_isr_Expect(hostid, TUSB_SPEED_FULL);
usbh_device_plugged_isr_Expect(hostid);
//------------- Code Under Test -------------//
ehci_controller_device_plug(hostid, TUSB_SPEED_FULL);
@@ -84,7 +84,7 @@ void test_isr_device_connect_fullspeed(void)
void test_isr_device_connect_slowspeed(void)
{
usbh_device_plugged_isr_Expect(hostid, TUSB_SPEED_LOW);
usbh_device_plugged_isr_Expect(hostid);
//------------- Code Under Test -------------//
ehci_controller_device_plug(hostid, TUSB_SPEED_LOW);