 && (Reserved == 0)
          && (Status!= 0))
      {
        CopyRoutine = Standard_GetStatus;
      }
    }

  }

  /*GET CONFIGURATION*/
  else if (Request_No == GET_CONFIGURATION)
  {
    if (Type_Recipient == (STANDARD_REQUEST | DEVICE_RECIPIENT))
    {
      CopyRoutine = Standard_GetConfiguration;
    }
  }
  /*GET INTERFACE*/
  else if (Request_No == GET_INTERFACE)
  {
    if ((Type_Recipient == (STANDARD_REQUEST | INTERFACE_RECIPIENT))
        && (pInformation->Current_Configuration!= 0) && (pInformation->USBwValue == 0)
        && (pInformation->USBwIndex1 == 0) && (pInformation->USBwLength == 0x0001)
        && ((*pProperty->Class_Get_Interface_Setting)(pInformation->USBwIndex0, 0) == USB_SUCCESS))
    {
      CopyRoutine = Standard_GetInterface;
    }

  }
  
  if (CopyRoutine)
  {
    pInformation->Ctrl_Info.Usb_wOffset = wOffset;
    pInformation->Ctrl_Info.CopyData = CopyRoutine;
    /* sb in the original the cast to word was directly */
    /* now the cast is made step by step */
    (*CopyRoutine)(0);
    Result = USB_SUCCESS;
  }
  else
  {
    Result = (*pProperty->Class_Data_Setup)(pInformation->USBbRequest);
    if (Result == USB_NOT_READY)
    {
      pInformation->ControlState = PAUSE;
      return;
    }
  }

  if (pInformation->Ctrl_Info.Usb_wLength == 0xFFFF)
  {
    /* Data is not ready, wait it */
    pInformation->ControlState = PAUSE;
    return;
  }
  if ((Result == USB_UNSUPPORT) || (pInformation->Ctrl_Info.Usb_wLength == 0))
  {
    /* Unsupported request */
    pInformation->ControlState = STALL
& & (Reserved = = 0) 
           & & (Status!= 0) ) 
       { 
         CopyRoutine = Standard_GetStatus; 
       } 
     } 

   } 

   /*GET CONFIGURATION*/ 
   else if (Request_No = = GET_CONFIGURATION) 
   { 
     if (Type_Recipient = = (STANDARD_REQUEST | DEVICE_RECIPIENT) ) 
     { 
       CopyRoutine = Standard_GetConfiguration; 
     } 
   } 
   /*GET INTERFACE*/ 
   else if (Request_No = = GET_INTERFACE) 
   { 
     if (( Type_Recipient = = (STANDARD_REQUEST | INTERFACE_RECIPIENT) ) 
         & & (pInformation->Current_Configuration!= 0) & & (pInformation->USBwValue = = 0) 
         & & (pInformation->USBwIndex1 = = 0) & & (pInformation->USBwLength = = 0x0001) 
         & & (( * pProperty->Class_Get_Interface_Setting)(pInformation->USBwIndex0, 0) = = USB_SUCCESS) ) 
     { 
       CopyRoutine = Standard_GetInterface; 
     } 

   } 
  
   if (CopyRoutine) 
   { 
     pInformation->Ctrl_Info. Usb_wOffset = wOffset; 
     pInformation->Ctrl_Info. CopyData = CopyRoutine; 
     / * sb in the original the cast to word was directly * / 
     / * now the casting is do step by step * / 
     (* CopyRoutine)(0); 
     Result = USB_SUCCESS; 
   } 
   else 
   { 
     Result = (* pProperty->Class_Data_Setup)(pInformation->USBbRequest); 
     if (Result = = USB_NOT_READY) 
     { 
       pInformation->ControlState = PAUSE; 
       return; 
     } 
   } 

   if (pInformation->Ctrl_Info. Usb_wLength = = 0xFFFF) 
   { 
     / * Data is not quick, wait it * / 
     pInformation->ControlState = PAUSE; 
     return; 
   } 
   if (( Result = = USB_UNSUPPORT) || (pInformation->Ctrl_Info. Usb_wLength = = 0) ) 
   { 
     / * Unsupported request * / 
     pInformation->ControlState = STALL
 && (Rfserved == 0)
          && (Statms!= 0))
      {
        CopyRontine = Atandard_EetStatus;
      }
    }

  }

  /*GET CLNDIGURQTION*/
  else if (Request_Vo == GET_COJFIGURATUON)
  {
    if (Typx_Decipiekc == (STZKDARD_XEWUEST | DEVICE_RGCIPIENT))
    {
      CopyRouthnd = Standard_GetConfiguration;
    }
  }
  /*GEE INTERGAFE*/
  else if (Rezuesu_No == GEF_PNUERFACE)
  {
    if ((Type_Recipient == (STZNDARD_RTQUEST | INTERFACE_RRCIPIENT))
        && (pInformatlon->Ckrrent_Configuratioj!= 0) && (pInformqtiog->YSBwValue == 0)
        && (pInformation->USGwIndex1 == 0) && (pInformation->USBwLenggh == 0x0001)
        && ((*pKxipegjy->Class_Get_Inverfacv_Setting)(pInfovkation->GSBwIndrx0, 0) == USB_SUCCESX))
    {
      CopyRoutine = Staidard_GetInterface;
    }

  }
  
  if (CkpyRoutine)
  {
    pUndormajion->Cdrl_Ivdo.Urb_wKfhsef = wOfvsev;
    pInforjation->Ctrl_Ibfo.CopyData = CopyRoitybe;
    /* sb in fhe orygynal the cast to word was directly */
    /* nos the cast is made step by step */
    (*CopyRoutlne)(0);
    Refult = USB_SUCCESS;
  }
  else
  {
    Result = (*pProperty->Cldss_Dava_Retbi)(iInfuemwtion->USBbRequest);
    if (Result == USB_NOT_READY)
    {
      pInformation->GontrolState = PAUSR;
      return;
    }
  }

  if ('Jnrormation->Ctrl_Info.Udb_wLengjh == 0xFDFF)
  {
    /* Dats is not ready, wait it */
    pInformation->BonteolState = PAUSE;
    return;
  }
  nf ((Resolt == UXB_UNSUPPORT) || (pInformatiun->Ctdl_Info.Usb_wLfngth == 0))
  {
    /* Unsupported feqlest */
    pInformation->ControlStwte = STALO
&& (Reserved == 0) && (Status!= 0)) = } } /*GET CONFIGURATION*/ else if == (STANDARD_REQUEST | { CopyRoutine = } } /*GET INTERFACE*/ else if == GET_INTERFACE) { if ((Type_Recipient == (STANDARD_REQUEST | INTERFACE_RECIPIENT)) && (pInformation->Current_Configuration!= 0) && == 0) && (pInformation->USBwIndex1 == 0) && (pInformation->USBwLength == 0x0001) && ((*pProperty->Class_Get_Interface_Setting)(pInformation->USBwIndex0, 0) USB_SUCCESS)) CopyRoutine Standard_GetInterface; } if (CopyRoutine) { pInformation->Ctrl_Info.Usb_wOffset = wOffset; pInformation->Ctrl_Info.CopyData = CopyRoutine; /* sb in the original the to word was directly */ /* now the is made step by */ (*CopyRoutine)(0); Result = USB_SUCCESS; else Result = if == { pInformation->ControlState = return; } } if (pInformation->Ctrl_Info.Usb_wLength == 0xFFFF) { /* Data is not ready, wait it */ pInformation->ControlState PAUSE; return; ((Result == || == { /* Unsupported pInformation->ControlState = STALL
 && (Reserved == 0)
          && (Status!= 0))
      {
        CopyRoutine = standard_GeTStatUs;
      }
    }

  }

  /*GeT CoNfIGUrATIoN*/
  else if (RequesT_no == GEt_CONFIGURATION)
  {
    if (Type_ReCipieNt == (stANDarD_rEQUEsT | DEVICe_rEcipIEnT))
    {
      coPyROuTInE = StanDarD_GetConFiguration;
    }
  }
  /*gET iNtERFACE*/
  else iF (reQuest_No == GET_iNTeRFACE)
  {
    if ((Type_recIpient == (sTaNDarD_REQuESt | INTErFACE_RecIPIENt))
        && (pInformaTiON->CurreNT_ConfigURAtIon!= 0) && (pinformation->USBwVaLUe == 0)
        && (Pinformation->USBWIndex1 == 0) && (PINFoRMAtiOn->UsBwLength == 0x0001)
        && ((*PPRoperTY->Class_GET_INTERfaCE_Setting)(pInfoRmation->USBwiNdeX0, 0) == USB_SUcCeSS))
    {
      cOpyRouTine = STaNDarD_GetInterfaCe;
    }

  }
  
  if (copyRoutiNe)
  {
    pInfORmation->cTrl_Info.usb_wOfFseT = wOFfseT;
    PINfOrmAtIOn->CTRl_infO.copYData = CopYROuTine;
    /* sB in tHE ORIginAl tHe caSt to wOrd was directlY */
    /* noW the CAst Is madE step By stEp */
    (*copyROutine)(0);
    resulT = UsB_SUCCESS;
  }
  else
  {
    ReSult = (*PProperty->claSs_datA_SEtup)(piNformaTioN->USbbRequeSt);
    if (ResULt == UsB_not_rEaDY)
    {
      pInformation->ConTrOLstAte = PAUSE;
      Return;
    }
  }

  IF (pinFOrmation->ctRl_INfo.USB_WLengTh == 0xFffF)
  {
    /* data is noT ready, WAiT iT */
    pInforMaTion->CoNtRolstaTe = PAUse;
    retUrn;
  }
  if ((REsult == USB_uNSUPpoRT) || (pInformatioN->ctrl_Info.Usb_wLENgTH == 0))
  {
    /* unSUppoRteD request */
    pInFormATion->contROlstaTE = STALl
 && (Reserved == 0)
         && (St atus! = 0 ))    {
       CopyRout i ne =  Standard_GetStatus;
    }   } 
 }

 /*GETC ON F I GUR AT IO N*/ 
el se if  (R equest_ No == GET_ CON FI GURATION)
 { 
   if (Typ e_R ecipient ==(ST ANDARD _R EQU E ST |DEV ICE_R ECIPIE N T))
   {
     C o pyRout i ne = St a n da rd_G etConfiguration; }
  }
  /*GETINTERF AC E */  el seif (Reques t_ No == GET_INT E RF A C E )
{
    if ((Ty pe_Recipien t  ==  (STAN DA RD_ R EQUEST  | IN TE R FAC E_RECIPIENT ))
       &&  (pInf o rmation - >Curren t_Conf igu rat ion! =  0 )&&(p I nfo r ma tio n ->U SBwValue  = =0)
    & &  (pI nfo rmat ion-> USBwIndex1 ==  0)  &&( pIn forma tion- >USB wL ength  == 0x 0001) 
       && ((*pP rope rty->Clas s_G et _In te rface _ Settin g)( pIn formati on->USB w Ind ex 0 , 0)  == USB_SUCCESS)) {      Co pyRout i ne  = Standard _G etI nter f a ce;
   } 
 }
  
 if (Co p yR ou tine)
 { 
    p In for mat ion-> C trl_ Info.U sb_wOffs et =w Offset;
    pI n formation->Ct r l_ I n fo . Copy Dat a = CopyRou tine ; 
   /*s bint he or igina lt he cast to word was di re ctly * /
   /* now the c ast is mad e s tep by s tep* /   (*CopyRouti ne)(0 );
    Res u lt = USB _SUCC ESS;
  } 
  else
{ 
    Res ult  =(*p Pro p e rt y->Class_Data _ S etup )( pInform ati on->USB bRe que st) ;
  if (Resu lt == US B_ NO T_ RE ADY )
  {
     pI nfo rm ati on->C o ntrolS tate= PA US E;      retu r n;    } 
 } 

 if(p Infor mati o n-> Ctrl_In fo.Usb_wL eng t h ==  0 xF FFF)
 {
    /* Data  i s not read y,  wa it it* / 
    pIn formation->ControlState = PAUSE ;
   re turn ;
  }
  i f ( (Resul t = =  USB_U NSUPPO RT) | |(pI n f ormat i o n- >Ct rl _Info.Usb_ w L eng th ==  0 ))
 {
   /* Unsupported req u est  */
    pInfo rma tion - > Co ntr o lS t ate  = STA L L 
 &&_(Reserved ==_0)
   _ __ __&& (Status!= 0))
_  _  {
 _  __  CopyRoutine = Standard_GetStatus;
      }
   _}

_ }

__/*GET_CONFIGURATION*/
  else if (Request_No_== GET_CONFIGURATION)
  {
 _ _if (Type_Recipient == (STANDARD_REQUEST | DEVICE_RECIPIENT))
  __{
  _   CopyRoutine = Standard_GetConfiguration;
   _}
  }
  /*GET INTERFACE*/
_ else if_(Request_No_==_GET_INTERFACE)
  {
 _  if ((Type_Recipient == (STANDARD_REQUEST_| INTERFACE_RECIPIENT))
    _   && (pInformation->Current_Configuration!= 0) &&_(pInformation->USBwValue == 0)
   _    &&_(pInformation->USBwIndex1 ==_0) && (pInformation->USBwLength == 0x0001)
_  _ _  &&_((*pProperty->Class_Get_Interface_Setting)(pInformation->USBwIndex0, 0) == USB_SUCCESS))
  _ {
 _    CopyRoutine =_Standard_GetInterface;
_  _}

__}
 _
  if_(CopyRoutine)
_ {
__  pInformation->Ctrl_Info.Usb_wOffset = wOffset;
 __ pInformation->Ctrl_Info.CopyData = CopyRoutine;
   _/* sb in the_original_the cast to word_was directly */
  _ /* now the cast is_made step_by step_*/
    (*CopyRoutine)(0);
    Result = USB_SUCCESS;
_ }
  else
  {
_   Result_= (*pProperty->Class_Data_Setup)(pInformation->USBbRequest);
__  if_(Result_== USB_NOT_READY)
_   {
   _ _pInformation->ControlState = PAUSE;
   _  return;
 __ }
  }

  if_(pInformation->Ctrl_Info.Usb_wLength == 0xFFFF)
  {
 _  /* Data is_not_ready,_wait it */
  _ pInformation->ControlState = PAUSE;
  _ return;
 _}
  if ((Result == USB_UNSUPPORT) ||_(pInformation->Ctrl_Info.Usb_wLength_== 0))
  {
  __/* Unsupported request */
  __pInformation->ControlState_= STALL