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

View File

@@ -112,7 +112,7 @@ tusb_error_t usbh_init(void)
ASSERT_STATUS( hcd_init() );
//------------- Semaphore for Control Pipe -------------//
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++) // including address zero
{
usbh_device_info_pool[i].sem_hdl = osal_semaphore_create( OSAL_SEM_REF(usbh_device_info_pool[i].semaphore) );
ASSERT_PTR(usbh_device_info_pool[i].sem_hdl, TUSB_ERROR_OSAL_SEMAPHORE_FAILED);