keil_examples/USBHostLite/UsbHost/Host/usbhost_lpc17xx.c
/*
**************************************************************************************************************
*                                          FILL SETUP PACKET
*
* Description: This function is used to fill the setup packet
*
* Arguments  : None
*
* Returns    : OK		              if Success
*              ERR_INVALID_BOOTSIG    if Failed
*
**************************************************************************************************************
*/
FILL SETUP PACKET
Description: This function is used to fill the setup packet

Arguments  : None

Returns    : OK                              if Success
ERR_INVALID_BOOTSIG    if Failed
FILL SETUP PACKET Description : This function is used to fill the setup packet Arguments : None Returns : OK if Success ERR_INVALID_BOOTSIG if Failed
void  Host_FillSetup (uint8_t   bm_request_type,
                      uint8_t   b_request,
                      uint16_t   w_value,
                      uint16_t   w_index,
                      uint16_t   w_length)
{
	int i;
	for (i=0;i<w_length;i++)
		TDBuffer[i] = 0;
    TDBuffer[0] = bm_request_type;
    TDBuffer[1] = b_request;
    WriteLE16U(&TDBuffer[2], w_value);
    WriteLE16U(&TDBuffer[4], w_index);
    WriteLE16U(&TDBuffer[6], w_length);
}
void Host_FillSetup ( uint8_t bm_request_type , uint8_t b_request , uint16_t w_value , uint16_t w_index , uint16_t w_length ) { int i ; for ( i = 0 ; i < w_length ; i ++ ) TDBuffer [ i ] = 0 ; TDBuffer [ 0 ] = bm_request_type ; TDBuffer [ 1 ] = b_request ; WriteLE16U ( & TDBuffer [ 2 ] , w_value ) ; WriteLE16U ( & TDBuffer [ 4 ] , w_index ) ; WriteLE16U ( & TDBuffer [ 6 ] , w_length ) ; }
FILL SETUP PACKET
Description: This function is used to fill the setup packet
FILL SETUP PACKET Description : This function is used to fill the setup packet