start to support

- usbd host
- osal

some global define
#define TUSB_CFG_HOST_CONTROLLER_NUM
#define TUSB_CFG_HOST_DEVICE_MAX
#define TUSB_CFG_CONFIGURATION_MAX

rename & refractor HID type structure & enum

use CException to test asssertion library
add test for hid_host_keyboard with usbd configure get & osal queue get stubs
update test for assertion library
refractor ASSERT_STATUS in assertion library
update tusb_error_t values
rename usb basic type & enum in tusb_types.h and std_descriptors.h
This commit is contained in:
hathach
2013-01-22 17:41:06 +07:00
parent cfe7a3d23b
commit 38ce3f7534
25 changed files with 955 additions and 176 deletions

View File

@@ -287,10 +287,10 @@ tusb_error_t tusb_cdc_init(USBD_HANDLE_T hUsb, USB_INTERFACE_DESCRIPTOR const *c
ASSERT (pControlIntfDesc && pDataIntfDesc, ERR_FAILED);
/* register Bulk IN & OUT endpoint interrupt handler */
ASSERT ( LPC_OK == USBD_API->core->RegisterEpHandler (hUsb , ((CDC_DATA_EP_IN & 0x0F) << 1) +1 , CDC_BulkIn_Hdlr , NULL), tERROR_FAILED );
ASSERT ( LPC_OK == USBD_API->core->RegisterEpHandler (hUsb , (CDC_DATA_EP_OUT & 0x0F) << 1 , CDC_BulkOut_Hdlr , NULL), tERROR_FAILED );
ASSERT ( LPC_OK == USBD_API->core->RegisterEpHandler (hUsb , ((CDC_DATA_EP_IN & 0x0F) << 1) +1 , CDC_BulkIn_Hdlr , NULL), TUSB_ERROR_FAILED );
ASSERT ( LPC_OK == USBD_API->core->RegisterEpHandler (hUsb , (CDC_DATA_EP_OUT & 0x0F) << 1 , CDC_BulkOut_Hdlr , NULL), TUSB_ERROR_FAILED );
ASSERT ( LPC_OK == USBD_API->cdc->init(hUsb, &cdc_param, &g_hCdc), tERROR_FAILED);
ASSERT ( LPC_OK == USBD_API->cdc->init(hUsb, &cdc_param, &g_hCdc), TUSB_ERROR_FAILED);
/* update memory variables */
*mem_base = cdc_param.mem_base;