keil_examples/USBHostLite/UsbHost/Host/usbhost_lpc17xx.c
/*
**************************************************************************************************************
*                                         SEND THE CONTROL INFORMATION
*
* Description: This function is used to send the control information
*
* Arguments  : None
*
* Returns    : OK		              if Success
*              ERR_INVALID_BOOTSIG    if Failed
*
**************************************************************************************************************
*/
SEND THE CONTROL INFORMATION
Description: This function is used to send the control information

Arguments  : None

Returns    : OK                              if Success
ERR_INVALID_BOOTSIG    if Failed
SEND THE CONTROL INFORMATION Description : This function is used to send the control information Arguments : None Returns : OK if Success ERR_INVALID_BOOTSIG if Failed
int32_t  Host_CtrlSend (          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_OUT, TDBuffer, w_length);
        }
        if (rc == OK) {
            rc = Host_ProcessTD(EDCtrl, TD_IN, NULL, 0);
        }
    }
    return (rc);
}
int32_t Host_CtrlSend ( 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_OUT , TDBuffer , w_length ) ; } if ( rc == OK ) { rc = Host_ProcessTD ( EDCtrl , TD_IN , NULL , 0 ) ; } } return ( rc ) ; }
SEND THE CONTROL INFORMATION
Description: This function is used to send the control information
SEND THE CONTROL INFORMATION Description : This function is used to send the control information