XilinxProcessorIPLib/drivers/usbps/examples/xusbps_ch9_audio.c
u32 XUsbPs_Ch9SetupCfgDescReply(u8 *BufPtr, u32 BufLen)
{
	u8 *config;
	u32 CfgDescLen;

	/* Check buffer pointer is OK and buffer is big enough. */
	if (!BufPtr) {
		return 0;
	}

	if (BufLen < sizeof(USB_STD_CFG_DESC)) {
		return 0;
	}

	/*
	 * USB 2.0
	 */
	config = (u8 *)&config2;
	CfgDescLen  = sizeof(USB_CONFIG);


	memcpy(BufPtr, config, CfgDescLen);

	return CfgDescLen;
}
/*****************************************************************************/
/**
 *
 * This function returns the configuration descriptor for the device.
 *
 * @param	InstancePtr is a pointer to the Usb_DevData instance.
 * @param	BufPtr is the pointer to the buffer that is to be filled with
 *			the descriptor.
 * @param	BufLen is the size of the provided buffer.
 *
 * @return 	Length of the descriptor in the buffer on success.
 *			0 on error.
 *
 ******************************************************************************/
This function returns the configuration descriptor for the device.
@param       InstancePtr is a pointer to the Usb_DevData instance.
@param       BufPtr is the pointer to the buffer that is to be filled with
the descriptor.
@param       BufLen is the size of the provided buffer.

@return      Length of the descriptor in the buffer on success.
0 on error.
This function returns the configuration descriptor for the device . @param InstancePtr is a pointer to the Usb_DevData instance . @param BufPtr is the pointer to the buffer that is to be filled with the descriptor . @param BufLen is the size of the provided buffer . @return Length of the descriptor in the buffer on success . 0 on error .
u32 XUsbPs_Ch9SetupCfgDescReply(u8 *BufPtr, u32 BufLen)
{
	u8 *config;
	u32 CfgDescLen;
	if (!BufPtr) {
		return 0;
	}
	if (BufLen < sizeof(USB_STD_CFG_DESC)) {
		return 0;
	}
	config = (u8 *)&config2;
	CfgDescLen  = sizeof(USB_CONFIG);
	memcpy(BufPtr, config, CfgDescLen);
	return CfgDescLen;
}
u32 XUsbPs_Ch9SetupCfgDescReply ( u8 * BufPtr , u32 BufLen ) { u8 * config ; u32 CfgDescLen ; if ( ! BufPtr ) { return 0 ; } if ( BufLen < sizeof ( USB_STD_CFG_DESC ) ) { return 0 ; } config = ( u8 * ) & config2 ; CfgDescLen = sizeof ( USB_CONFIG ) ; memcpy ( BufPtr , config , CfgDescLen ) ; return CfgDescLen ; }
This function returns the configuration descriptor for the device.
This function returns the configuration descriptor for the device .
/* Check buffer pointer is OK and buffer is big enough. */ /*
	 * USB 2.0
	 */