change error type to lower case for more consistency

change Error Enum to TUSB prefix for more consistency
start to add check for OS configure
This commit is contained in:
hathach
2013-01-19 00:57:58 +07:00
parent d8c8b9e38a
commit cfe7a3d23b
20 changed files with 55 additions and 48 deletions

View File

@@ -57,11 +57,11 @@ ErrorCode_t USB_Configure_Event (USBD_HANDLE_T hUsb)
if (pCtrl->config_value)
{
#if defined(DEVICE_CLASS_HID)
ASSERT( tERROR_NONE == tusb_hid_configured(hUsb), ERR_FAILED );
ASSERT( TUSB_ERROR_NONE == tusb_hid_configured(hUsb), ERR_FAILED );
#endif
#ifdef TUSB_CFG_DEVICE_CDC
ASSERT( tERROR_NONE == tusb_cdc_configured(hUsb), ERR_FAILED );
ASSERT( TUSB_ERROR_NONE == tusb_cdc_configured(hUsb), ERR_FAILED );
#endif
}
@@ -81,7 +81,7 @@ ErrorCode_t USB_Reset_Event (USBD_HANDLE_T hUsb)
return LPC_OK;
}
TUSB_Error_t dcd_init(uint8_t coreid)
tusb_error_t dcd_init(uint8_t coreid)
{
#ifdef DEVICE_ROMDRIVER // TODO refractor later
/* ROM DRIVER INIT */
@@ -138,7 +138,7 @@ TUSB_Error_t dcd_init(uint8_t coreid)
USBD_API->hw->Connect(g_hUsb, 1);
#endif
return tERROR_NONE;
return TUSB_ERROR_NONE;
}
/**************************************************************************/

View File

@@ -71,7 +71,7 @@
* \note
*/
TUSB_Error_t dcd_init(uint8_t coreid) ATTR_WARN_UNUSED_RESULT;
tusb_error_t dcd_init(uint8_t coreid) ATTR_WARN_UNUSED_RESULT;
#ifdef __cplusplus
}