keil_examples/USBHostLite/UsbHost/Host/usbhost_lpc17xx.c
/*
**************************************************************************************************************
*                                        RECEIVE THE CONTROL INFORMATION
*
* Description: This function is used to receive the control information
*
* Arguments  : bm_request_type
*              b_request
*              w_value
*              w_index
*              w_length
*              buffer
*
* Returns    : OK       if Success
*              ERROR    if Failed
*
**************************************************************************************************************
*/
RECEIVE THE CONTROL INFORMATION
Description: This function is used to receive the control information



Returns    : OK       if Success
ERROR    if Failed
RECEIVE THE CONTROL INFORMATION Description : This function is used to receive the control information Returns : OK if Success ERROR if Failed
int32_t  Host_CtrlRecv (         uint8_t   bm_request_type,
                                    uint8_t   b_request,
                                    uint16_t   w_value,
                                    uint16_t   w_index,
                                    uint16_t   w_length,
                          volatile  uint8_t  *buffer)
{
    int32_t  rc;
    Host_FillSetup(bm_request_type, b_request, w_value, w_index, w_length);
    rc = Host_ProcessTD(EDCtrl, TD_SETUP, TDBuffer, 8);
    if (rc == OK) {
        if (w_length) {
            rc = Host_ProcessTD(EDCtrl, TD_IN, TDBuffer, w_length);
        }
        if (rc == OK) {
            rc = Host_ProcessTD(EDCtrl, TD_OUT, NULL, 0);
        }
    }
    return (rc);
}
int32_t Host_CtrlRecv ( uint8_t bm_request_type , uint8_t b_request , uint16_t w_value , uint16_t w_index , uint16_t w_length , volatile uint8_t * buffer ) { int32_t rc ; Host_FillSetup ( bm_request_type , b_request , w_value , w_index , w_length ) ; rc = Host_ProcessTD ( EDCtrl , TD_SETUP , TDBuffer , 8 ) ; if ( rc == OK ) { if ( w_length ) { rc = Host_ProcessTD ( EDCtrl , TD_IN , TDBuffer , w_length ) ; } if ( rc == OK ) { rc = Host_ProcessTD ( EDCtrl , TD_OUT , NULL , 0 ) ; } } return ( rc ) ; }
RECEIVE THE CONTROL INFORMATION
Description: This function is used to receive the control information
RECEIVE THE CONTROL INFORMATION Description : This function is used to receive the control information