go through all the enumeration (up to get full configuration)

- fix init_qhd for address 0 (clear queue head --> ehci controller halted)
- fix bug in usbh_init missing address0 for semaphore create

TUSB_CFG_DEBUG == 3: --> ATTR_ALWAYS_INLINE is null --> allow gcc to export "normal inline" function
This commit is contained in:
hathach
2013-03-13 00:02:45 +07:00
parent d2bd80109e
commit 79e277d323
6 changed files with 30 additions and 21 deletions
+3 -3
View File
@@ -87,7 +87,7 @@ void test_usbh_init_hcd_failed(void)
void test_usbh_init_enum_task_create_failed(void)
{
hcd_init_ExpectAndReturn(TUSB_ERROR_NONE);
for (uint8_t i=0; i<TUSB_CFG_HOST_DEVICE_MAX; i++)
for (uint8_t i=0; i<TUSB_CFG_HOST_DEVICE_MAX+1; i++)
{
osal_semaphore_handle_t sem_hdl_dummy = 0x2233;
osal_semaphore_create_IgnoreAndReturn(sem_hdl_dummy);
@@ -100,7 +100,7 @@ void test_usbh_init_enum_task_create_failed(void)
void test_usbh_init_enum_queue_create_failed(void)
{
hcd_init_ExpectAndReturn(TUSB_ERROR_NONE);
for (uint8_t i=0; i<TUSB_CFG_HOST_DEVICE_MAX; i++)
for (uint8_t i=0; i<TUSB_CFG_HOST_DEVICE_MAX+1; i++)
{
osal_semaphore_handle_t sem_hdl_dummy = 0x2233;
osal_semaphore_create_IgnoreAndReturn(sem_hdl_dummy);
@@ -139,7 +139,7 @@ void test_usbh_init_ok(void)
hcd_init_ExpectAndReturn(TUSB_ERROR_NONE);
for (uint8_t i=0; i<TUSB_CFG_HOST_DEVICE_MAX; i++)
for (uint8_t i=0; i<TUSB_CFG_HOST_DEVICE_MAX+1; i++)
{
osal_semaphore_handle_t sem_hdl_dummy = 0x2233;
osal_semaphore_create_IgnoreAndReturn(sem_hdl_dummy);