/* USBH_ErrorHandle This function handles the Error on Host side.  */
void USBH_ErrorHandle(USBH_HOST *phost, USBH_Status errType)
/* USBH_ErrorHandle This function handles the Error on Host side.  */
void USBH_ErrorHandle(USBH_HOST *phost, USBH_Status errType)
{
  if ( (errType == USBH_ERROR_SPEED_UNKNOWN) ||
       (errType == USBH_UNRECOVERED_ERROR) )
  {
    phost->usr_cb->UnrecoveredError(); 
    phost->gState = HOST_ERROR_STATE;   
  }
  else if(errType == USBH_APPLY_DEINIT)
  {
    phost->gState = HOST_ERROR_STATE;
    phost->usr_cb->Init();
  } 
}