/**
 * @brief  USBH_MSC_BOT_Abort 
 *         This function manages the different Error handling for STALL
 * @param  direction : IN / OUT 
 * @retval None
 */
USBH_Status USBH_MSC_BOT_Abort(USB_OTG_CORE_HANDLE *pdev, USBH_HOST *phost,
        uint8_t direction) {
    USBH_Status status;

    status = USBH_BUSY;

    switch (direction) {
    case USBH_MSC_DIR_IN:
        /* send ClrFeture on Bulk IN endpoint */
        status = USBH_ClrFeature(pdev, phost, MSC_Machine.MSBulkInEp,
                MSC_Machine.hc_num_in);

        break;

    case USBH_MSC_DIR_OUT:
        /*send ClrFeature on Bulk OUT endpoint */
        status = USBH_ClrFeature(pdev, phost, MSC_Machine.MSBulkOutEp,
                MSC_Machine.hc_num_out);
        break;

    default:
        break;
    }

    BOTStallErrorCount++; /* Check Continous Number of times, STALL has Occured */
    if (BOTStallErrorCount > MAX_BULK_STALL_COUNT_LIMIT) {
        status = USBH_UNRECOVERED_ERROR;
    }

    return status;
}
/**
  * @brief  USBH_MSC_BOT_Abort 
  *         The function handle the BOT Abort process.
  * @param  phost: Host handle
  * @param  lun: Logical Unit Number
  * @param  dir: direction (0: out / 1 : in)
  * @retval USBH Status
  */
static USBH_StatusTypeDef USBH_MSC_BOT_Abort(USBH_HandleTypeDef *phost, uint8_t lun, uint8_t dir)
{
  USBH_StatusTypeDef status = USBH_FAIL;
  MSC_HandleTypeDef *MSC_Handle =  (MSC_HandleTypeDef *) phost->pActiveClass->pData;
  
  switch (dir)
  {
  case BOT_DIR_IN :
    /* send ClrFeture on Bulk IN endpoint */
    status = USBH_ClrFeature(phost, MSC_Handle->InEp);
    
    break;
    
  case BOT_DIR_OUT :
    /*send ClrFeature on Bulk OUT endpoint */
    status = USBH_ClrFeature(phost, MSC_Handle->OutEp);
    break;
    
  default:
    break;
  }
  return status;
}
Beispiel #3
0
/**
  * @brief  USBH_MSC_ClassRequest 
  *         The function is responsible for handling Standard requests
  *         for MSC class.
  * @param  phost: Host handle
  * @retval USBH Status
  */
static USBH_StatusTypeDef USBH_MSC_ClassRequest(USBH_HandleTypeDef *phost)
{   
  MSC_HandleTypeDef *MSC_Handle =  (MSC_HandleTypeDef *) phost->pActiveClass->pData;  
  USBH_StatusTypeDef status = USBH_BUSY;
  uint8_t i;
  
  /* Switch MSC REQ state machine */
  switch (MSC_Handle->req_state)
  {
  case MSC_REQ_IDLE:
  case MSC_REQ_GET_MAX_LUN:   
    /* Issue GetMaxLUN request */
    status = USBH_MSC_BOT_REQ_GetMaxLUN(phost, (uint8_t *)&MSC_Handle->max_lun);
    
    /* When devices do not support the GetMaxLun request, this should
       be considred as only one logical unit is supported */
    if(status == USBH_NOT_SUPPORTED)
    {
      MSC_Handle->max_lun = 0;
      status = USBH_OK;
    }
    
    if(status == USBH_OK)
    {
      MSC_Handle->max_lun = (uint8_t )(MSC_Handle->max_lun) + 1;
      USBH_UsrLog ("Number of supported LUN: %lu", (int32_t)(MSC_Handle->max_lun));
      
      for(i = 0; i < MSC_Handle->max_lun; i++)
      {
        MSC_Handle->unit[i].prev_ready_state = USBH_FAIL;
        MSC_Handle->unit[i].state_changed = 0;
      }
    }
    break;
    
  case MSC_REQ_ERROR :
    /* a Clear Feature should be issued here */
    if(USBH_ClrFeature(phost, 0x00) == USBH_OK)
    {
      MSC_Handle->req_state = MSC_Handle->prev_req_state; 
    }    
    break;
    
  default:
    break;
  }
  
  return status; 
}
static USBH_Status USBH_MSC_Handle(USB_OTG_CORE_HANDLE *pdev , 
								   void   *phost)
{
	USBH_HOST *pphost = phost;

	USBH_Status status = USBH_BUSY;
	uint8_t mscStatus = USBH_MSC_BUSY;
	uint8_t appliStatus = 0;

	static uint8_t maxLunExceed = FALSE;


	if(HCD_IsDeviceConnected(pdev))
	{   
		//static uint8_t MSCState_old = -1;
		//if (USBH_MSC_BOTXferParam.MSCState != MSCState_old){
		//	USBH_SetState(1, USBH_MSC_BOTXferParam.MSCState);
		//	MSCState_old = USBH_MSC_BOTXferParam.MSCState;
		//}

		switch(USBH_MSC_BOTXferParam.MSCState)
		{
		case USBH_MSC_BOT_INIT_STATE:
			USBH_MSC_Init(pdev);
			USBH_MSC_BOTXferParam.MSCState = USBH_MSC_BOT_RESET;  
			break;

		case USBH_MSC_BOT_RESET:   
			/* Issue BOT RESET request */
			status = USBH_MSC_BOTReset(pdev, phost);
			if(status == USBH_OK )
			{
				USBH_MSC_BOTXferParam.MSCState = USBH_MSC_GET_MAX_LUN;
			}

			if(status == USBH_NOT_SUPPORTED )
			{
				/* If the Command has failed, then we need to move to Next State, after
				STALL condition is cleared by Control-Transfer */
				USBH_MSC_BOTXferParam.MSCStateBkp = USBH_MSC_GET_MAX_LUN; 

				/* a Clear Feature should be issued here */
				USBH_MSC_BOTXferParam.MSCState = USBH_MSC_CTRL_ERROR_STATE;
			}  
			break;

		case USBH_MSC_GET_MAX_LUN:
			/* Issue GetMaxLUN request */
			status = USBH_MSC_GETMaxLUN(pdev, phost);

			if(status == USBH_OK )
			{
				MSC_Machine.maxLun = *(MSC_Machine.buff) ;

				/* If device has more that one logical unit then it is not supported */
				if((MSC_Machine.maxLun > 0) && (maxLunExceed == FALSE))
				{
					maxLunExceed = TRUE;
					pphost->usr_cb->DeviceNotSupported();

					break;
				}
				USBH_MSC_BOTXferParam.MSCState = USBH_MSC_TEST_UNIT_READY;
			}

			if(status == USBH_NOT_SUPPORTED )
			{
				/* If the Command has failed, then we need to move to Next State, after
				STALL condition is cleared by Control-Transfer */
				USBH_MSC_BOTXferParam.MSCStateBkp = USBH_MSC_TEST_UNIT_READY; 

				/* a Clear Feature should be issued here */
				USBH_MSC_BOTXferParam.MSCState = USBH_MSC_CTRL_ERROR_STATE;
			}    
			break;

		case USBH_MSC_CTRL_ERROR_STATE:
			/* Issue Clearfeature request */
			status = USBH_ClrFeature(pdev,
				phost,
				0x00,
				pphost->Control.hc_num_out);
			if(status == USBH_OK )
			{
				/* If GetMaxLun Request not support, assume Single LUN configuration */
				MSC_Machine.maxLun = 0;  

				USBH_MSC_BOTXferParam.MSCState = USBH_MSC_BOTXferParam.MSCStateBkp;     
			}
			break;  

		case USBH_MSC_TEST_UNIT_READY:
			/* Issue SCSI command TestUnitReady */ 
			mscStatus = USBH_MSC_TestUnitReady(pdev);

			if(mscStatus == USBH_MSC_OK )
			{
				USBH_MSC_BOTXferParam.MSCState = USBH_MSC_READ_CAPACITY10;
				MSCErrorCount = 0;
				status = USBH_OK;
			}
			else
			{
				USBH_MSC_ErrorHandle(mscStatus);
			} 
			break;

		case USBH_MSC_READ_CAPACITY10:
			/* Issue READ_CAPACITY10 SCSI command */
			mscStatus = USBH_MSC_ReadCapacity10(pdev);
			if(mscStatus == USBH_MSC_OK )
			{
				USBH_MSC_BOTXferParam.MSCState = USBH_MSC_MODE_SENSE6;
				MSCErrorCount = 0;
				status = USBH_OK;
			}
			else
			{
				USBH_MSC_ErrorHandle(mscStatus);
			}
			break;

		case USBH_MSC_MODE_SENSE6:
			/* Issue ModeSense6 SCSI command for detecting if device is write-protected */
			mscStatus = USBH_MSC_ModeSense6(pdev);
			if(mscStatus == USBH_MSC_OK )
			{
				USBH_MSC_BOTXferParam.MSCState = USBH_MSC_DEFAULT_APPLI_STATE;
				MSCErrorCount = 0;
				status = USBH_OK;
			}
			else
			{
				USBH_MSC_ErrorHandle(mscStatus);
			}
			break;

		case USBH_MSC_REQUEST_SENSE:
			/* Issue RequestSense SCSI command for retreiving error code */
			mscStatus = USBH_MSC_RequestSense(pdev);
			if(mscStatus == USBH_MSC_OK )
			{
				USBH_MSC_BOTXferParam.MSCState = USBH_MSC_BOTXferParam.MSCStateBkp;
				status = USBH_OK;
			}
			else
			{
				USBH_MSC_ErrorHandle(mscStatus);
			}  
			break;

		case USBH_MSC_BOT_USB_TRANSFERS:
			/* Process the BOT state machine */
			USBH_MSC_HandleBOTXfer(pdev , phost);
			break;

		case USBH_MSC_DEFAULT_APPLI_STATE:
			/* Process Application callback for MSC */
			appliStatus = pphost->usr_cb->UserApplication();
			if(appliStatus == 0)
			{
				USBH_MSC_BOTXferParam.MSCState = USBH_MSC_DEFAULT_APPLI_STATE;
			}
			else if (appliStatus == 1) 
			{
				/* De-init requested from application layer */
				status =  USBH_APPLY_DEINIT;
			}
			break;

		case USBH_MSC_UNRECOVERED_STATE:

			status = USBH_UNRECOVERED_ERROR;

			break;

		default:
			break; 

		}
	}
	return status;
}
Beispiel #5
0
/**
  * @brief  USBH_CDC_Process 
  *         The function is for managing state machine for CDC data transfers 
  * @param  phost: Host handle
  * @retval USBH Status
  */
static USBH_StatusTypeDef USBH_CDC_Process (USBH_HandleTypeDef *phost)
{
  USBH_StatusTypeDef status = USBH_BUSY;
  USBH_StatusTypeDef req_status = USBH_OK;
  CDC_HandleTypeDef *CDC_Handle =  (CDC_HandleTypeDef*) phost->pActiveClass->pData; 
  
  switch(CDC_Handle->state)
  {
    
  case CDC_IDLE_STATE:
    status = USBH_OK;
    break;
    
  case CDC_SET_LINE_CODING_STATE:
    req_status = SetLineCoding(phost, CDC_Handle->pUserLineCoding);
    
    if(req_status == USBH_OK)
    {
      CDC_Handle->state = CDC_GET_LAST_LINE_CODING_STATE; 
    }
    
    else if(req_status != USBH_BUSY)
    {
      CDC_Handle->state = CDC_ERROR_STATE; 
    }
    break;
    
    
  case CDC_GET_LAST_LINE_CODING_STATE:
    req_status = GetLineCoding(phost, &(CDC_Handle->LineCoding));
    
    if(req_status == USBH_OK)
    {
      CDC_Handle->state = CDC_IDLE_STATE; 
      
      if((CDC_Handle->LineCoding.b.bCharFormat == CDC_Handle->pUserLineCoding->b.bCharFormat) && 
         (CDC_Handle->LineCoding.b.bDataBits == CDC_Handle->pUserLineCoding->b.bDataBits) &&
         (CDC_Handle->LineCoding.b.bParityType == CDC_Handle->pUserLineCoding->b.bParityType) &&
         (CDC_Handle->LineCoding.b.dwDTERate == CDC_Handle->pUserLineCoding->b.dwDTERate))
      {
        USBH_CDC_LineCodingChanged(phost);
      }
    }
    
    else if(req_status != USBH_BUSY)
    {
      CDC_Handle->state = CDC_ERROR_STATE; 
    }   

    break;
    
  case CDC_TRANSFER_DATA:
    CDC_ProcessTransmission(phost);
    CDC_ProcessReception(phost);
    break;   
    
  case CDC_ERROR_STATE:
    req_status = USBH_ClrFeature(phost, 0x00); 
    
    if(req_status == USBH_OK )
    {        
      /*Change the state to waiting*/
      CDC_Handle->state = CDC_IDLE_STATE ;
    }    
    break;
    
  default:
    break;
    
  }
  
  return status;
}
/**
  * @brief  USBH_HID_Process 
  *         The function is for managing state machine for HID data transfers 
  * @param  phost: Host handle
  * @retval USBH Status
  */
static USBH_StatusTypeDef USBH_HID_Process(USBH_HandleTypeDef *phost)
{
  USBH_StatusTypeDef status = USBH_OK;
  HID_HandleTypeDef *HID_Handle =  (HID_HandleTypeDef *) phost->pActiveClass->pData;
  
  switch (HID_Handle->state)
  {
  case HID_INIT:
    HID_Handle->Init(phost); 
  case HID_IDLE:
    if(USBH_HID_GetReport (phost,
                           0x01,
                            0,
                            HID_Handle->pData,
                            HID_Handle->length) == USBH_OK)
    {
      
      fifo_write(&HID_Handle->fifo, HID_Handle->pData, HID_Handle->length);  
      HID_Handle->state = HID_SYNC;
    }
    
    break;
    
  case HID_SYNC:

    /* Sync with start of Even Frame */
    if(phost->Timer & 1)
    {
      HID_Handle->state = HID_GET_DATA; 
    }
#if (USBH_USE_OS == 1)
    osMessagePut ( phost->os_event, USBH_URB_EVENT, 0);
#endif   
    break;
    
  case HID_GET_DATA:

    USBH_InterruptReceiveData(phost, 
                              HID_Handle->pData,
                              HID_Handle->length,
                              HID_Handle->InPipe);
    
    HID_Handle->state = HID_POLL;
    HID_Handle->timer = phost->Timer;
    HID_Handle->DataReady = 0;
    break;
    
  case HID_POLL:
    
    if(USBH_LL_GetURBState(phost , HID_Handle->InPipe) == USBH_URB_DONE)
    {
      if(HID_Handle->DataReady == 0)
      {
        fifo_write(&HID_Handle->fifo, HID_Handle->pData, HID_Handle->length);
        HID_Handle->DataReady = 1;
        USBH_HID_EventCallback(phost);
#if (USBH_USE_OS == 1)
    osMessagePut ( phost->os_event, USBH_URB_EVENT, 0);
#endif          
      }
    }
    else if(USBH_LL_GetURBState(phost , HID_Handle->InPipe) == USBH_URB_STALL) /* IN Endpoint Stalled */
    {
      
      /* Issue Clear Feature on interrupt IN endpoint */ 
      if(USBH_ClrFeature(phost,
                         HID_Handle->ep_addr) == USBH_OK)
      {
        /* Change state to issue next IN token */
        HID_Handle->state = HID_GET_DATA;
      }
    } 
    

    break;
    
  default:
    break;
  }
  return status;
}
static USBH_StatusTypeDef USBH_AOA_OutHandle(USBH_HandleTypeDef *phost)
{
  USBH_URBStateTypeDef URB_Status;
  AOA_HandleTypeDef* aoa = phost->pActiveClass->pData;

  switch (aoa->outState)
  {
  case AOA_SEND_IDLE:
    break;
  case AOA_SEND_DATA:
      USBH_BulkSendData(phost, aoa->outbuff, aoa->outSize,
          aoa->hc_num_out, 0);
      aoa->outState = AOA_SEND_DATA_WAIT;
    break;
  case AOA_SEND_DATA_WAIT:
    URB_Status = USBH_LL_GetURBState(phost, aoa->hc_num_out);
    switch (URB_Status)
    {
    case USBH_URB_DONE:
      aoa->outbuff[aoa->outSize] = '\0';
      DEBUG_LOG("AOA: out %d bytes, \"%s\"", aoa->outSize, aoa->outbuff);

      if (aoa->sendDoneCallback)
      {
        aoa->sendDoneCallback(phost, aoa->outbuff, aoa->outSize);
      }

      aoa->outbuff = NULL;
      aoa->outSize = 0;
      aoa->outState = AOA_SEND_IDLE;
      break;

    case USBH_URB_NOTREADY:
      DEBUG_LOG("AOA: OUT URB_NOTREADY. Retry");
      aoa->outState = AOA_SEND_DATA;
      break;

    case USBH_URB_STALL:
      // TODO These codes are not tested
      /* Issue Clear Feature */
      if (USBH_ClrFeature(phost, aoa->BulkOutEp) == USBH_OK)
      {
        aoa->outState = AOA_SEND_DATA;
        DEBUG_LOG("AOA: OUT URB_STALL. Clear feature on EP. Retry.");
      }
      break;

    case USBH_URB_ERROR:
      aoa->outbuff[aoa->outSize] = '\0';
      DEBUG_LOG("AOA: SEND Fail");

      if (aoa->sendDoneCallback)
      {
        aoa->sendDoneCallback(phost, aoa->outbuff, -1);
      }

      aoa->outbuff = NULL;
      aoa->outSize = 0;
      aoa->outState = AOA_SEND_IDLE;

      break;
    default:
      break;
    }
    break;
  }

  return USBH_OK;
}
Beispiel #8
0
/**
* @brief  USBH_HID_Handle 
*         The function is for managing state machine for HID data transfers 
* @param  pdev: Selected device
* @param  hdev: Selected device property
* @retval USBH_Status
*/
static USBH_Status USBH_HID_Handle(USB_OTG_CORE_HANDLE *pdev , 
                                   void   *phost)
{
  USBH_HOST *pphost = phost;
  USBH_Status status = USBH_OK;
  
  switch (HID_Machine.state)
  {
    
  case HID_IDLE:
    HID_Machine.cb->Init();
    HID_Machine.state = HID_SYNC;
    
  case HID_SYNC:

    /* Sync with start of Even Frame */
    if(USB_OTG_IsEvenFrame(pdev) == TRUE)
    {
      HID_Machine.state = HID_GET_DATA;  
    }
    break;
    
  case HID_GET_DATA:

    USBH_InterruptReceiveData(pdev, 
                              HID_Machine.buff,
                              HID_Machine.length,
                              HID_Machine.hc_num_in);
    start_toggle = 1;
    
    HID_Machine.state = HID_POLL;
    HID_Machine.timer = HCD_GetCurrentFrame(pdev);
    break;
    
  case HID_POLL:
    if(( HCD_GetCurrentFrame(pdev) - HID_Machine.timer) >= HID_Machine.poll)
    {
      HID_Machine.state = HID_GET_DATA;
    }
    else if(HCD_GetURB_State(pdev , HID_Machine.hc_num_in) == URB_DONE)
    {
      if(start_toggle == 1) /* handle data once */
      {
        start_toggle = 0;
        HID_Machine.cb->Decode(HID_Machine.buff);
      }
    }
    else if(HCD_GetURB_State(pdev, HID_Machine.hc_num_in) == URB_STALL) /* IN Endpoint Stalled */
    {
      
      /* Issue Clear Feature on interrupt IN endpoint */ 
      if( (USBH_ClrFeature(pdev, 
                           pphost,
                           HID_Machine.ep_addr,
                           HID_Machine.hc_num_in)) == USBH_OK)
      {
        /* Change state to issue next IN token */
        HID_Machine.state = HID_GET_DATA;
        
      }
      
    }      
    break;
    
  default:
    break;
  }
  return status;
}
Beispiel #9
0
/**
* @brief  USBH_HID_Handle 
*         The function is for managing state machine for HID data transfers 
* @param  pdev: Selected device
* @param  hdev: Selected device property
* @retval USBH_Status
*/
static USBH_Status USBH_HID_Handle(USB_OTG_CORE_HANDLE *pdev , 
                                   void   *phost)
{
  USBH_HOST *pphost = phost;
  HID_Machine_TypeDef *HID_Machine = &HID_Machines[pdev->cfg.coreID];
  USBH_Status status = USBH_OK;
  
  switch (HID_Machine->state)
  {
    
  case HID_IDLE:
    HID_Machine->cb->Init(pdev->cfg.coreID,pphost->device_prop.Dev_Desc.idVendor,pphost->device_prop.Dev_Desc.idProduct);
    HID_Machine->state = HID_SYNC;
    
  case HID_SYNC:

    /* Sync with start of Even Frame */
    if(USB_OTG_IsEvenFrame(pdev) == TRUE)
    {
      HID_Machine->state = HID_GET_DATA;  
    }
    break;
    
  case HID_GET_DATA:

    USBH_InterruptReceiveData(pdev, 
                              HID_Machine->buff,
                              HID_Machine->length,
                              HID_Machine->hc_num_in);
    start_toggles[pdev->cfg.coreID] = 1;
    
    HID_Machine->state = HID_POLL;
    HID_Machine->timer = HCD_GetCurrentFrame(pdev);
    break;
    
  case HID_POLL:
    if(( HCD_GetCurrentFrame(pdev) - HID_Machine->timer) >= HID_Machine->poll)
    {
      HID_Machine->state = HID_GET_DATA;
    }
    else if(HCD_GetURB_State(pdev , HID_Machine->hc_num_in) == URB_DONE)
    {
      if(start_toggles[pdev->cfg.coreID] == 1) /* handle data once */
      {
        start_toggles[pdev->cfg.coreID] = 0;
        HID_Machine->cb->Decode(pdev->cfg.coreID,HID_Machine->buff);
      }
    }
    else if(HCD_GetURB_State(pdev, HID_Machine->hc_num_in) == URB_STALL) /* IN Endpoint Stalled */
    {
      
      /* Issue Clear Feature on interrupt IN endpoint */ 
      if( (USBH_ClrFeature(pdev, 
                           pphost,
                           HID_Machine->ep_addr,
                           HID_Machine->hc_num_in)) == USBH_OK)
      {
        /* Change state to issue next IN token */
        HID_Machine->state = HID_GET_DATA;
        
      }
      
    }      
    break;
    
  default:
    break;
  }
  return status;
}
/**
  * @brief  CDC_ClassRequest 
  *         The function is responsible for handling CDC Class requests
  *         for CDC class.
  * @param  pdev: Selected device
  * @param  hdev: Selected device property
  * @retval  USBH_Status :Response for USB Set Protocol request
  */
static USBH_Status CDC_ClassRequest(USB_OTG_CORE_HANDLE *pdev , 
                                    void *phost)
{   
  USBH_HOST *pphost = phost;
  
  USBH_Status status         = USBH_BUSY;
  USBH_Status ClassReqStatus = USBH_BUSY;
  
  switch(CDC_ReqState) 
  {
    
  case CDC_GET_LINE_CODING_RQUEST: 
    /*Issue the get line coding request*/
    ClassReqStatus = CDC_GETLineCoding(pdev, phost);
    if( ClassReqStatus == USBH_OK )
    {          /*Change the state */
      CDC_ReqState = CDC_SET_CONTROL_LINE_STATE_REQUEST;
    }
    break;
    
  case CDC_SET_LINE_CODING_RQUEST: 
    
    /*Issue the set line coding request*/
    ClassReqStatus = CDC_SETLineCoding(pdev, phost);
    if( ClassReqStatus == USBH_OK )
    {
      /*Change the state */
      CDC_ReqState = CDC_GET_LINE_CODING_RQUEST ;
    }
    if(ClassReqStatus == USBH_NOT_SUPPORTED )
    {
      /* a Clear Feature should be issued here */
      CDC_ReqState = CDC_ERROR_STATE;
    }
    break;
    
  case CDC_SET_CONTROL_LINE_STATE_REQUEST:
    /*Issue the set control line coding */
    ClassReqStatus = CDC_SETControlLineState(pdev, phost);
    if( ClassReqStatus == USBH_OK )
    {
      /*Change the state */
      CDC_ReqState = CDC_SET_CONTROL_LINE_STATE_REQUEST;
      /*Also set the state of receive CDCRxParam to IDLE*/
      CDC_RxParam.CDCState = CDC_IDLE; 
      
      status = USBH_OK; /*This return from class specific routinues request*/
    }
    break;
    
  case CDC_ERROR_STATE:
    
    ClassReqStatus = USBH_ClrFeature(pdev,
                                     phost,
                                     0x00,
                                     pphost->Control.hc_num_out);
    
    if(ClassReqStatus == USBH_OK )
    {        
      /*Change the state to waiting*/
      CDC_ReqState = CDC_GET_LINE_CODING_RQUEST ;
    }
    break;      
  }
  
  return status; 
}