XilinxProcessorIPLib/drivers/usbps/examples/xusbps_ch9_audio.c
u32 XUsbPs_Ch9SetupDevDescReply(u8 *BufPtr, u32 BufLen)
{

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

	if (BufLen < sizeof(USB_STD_DEV_DESC)) {
		return 0;
	}
	memcpy(BufPtr, &deviceDesc, sizeof(USB_STD_DEV_DESC));

	return sizeof(USB_STD_DEV_DESC);
}
/*****************************************************************************/
/**
 *
 * This function returns the device descriptor for the device.
 *
 * @param	InstancePtr is a pointer to the Usb_DevData instance.
 * @param	BufPtr is 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 device descriptor for the device.
@param       InstancePtr is a pointer to the Usb_DevData instance.
@param       BufPtr is 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 device descriptor for the device . @param InstancePtr is a pointer to the Usb_DevData instance . @param BufPtr is 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_Ch9SetupDevDescReply(u8 *BufPtr, u32 BufLen)
{
	if (!BufPtr) {
		return 0;
	}
	if (BufLen < sizeof(USB_STD_DEV_DESC)) {
		return 0;
	}
	memcpy(BufPtr, &deviceDesc, sizeof(USB_STD_DEV_DESC));
	return sizeof(USB_STD_DEV_DESC);
}
u32 XUsbPs_Ch9SetupDevDescReply ( u8 * BufPtr , u32 BufLen ) { if ( ! BufPtr ) { return 0 ; } if ( BufLen < sizeof ( USB_STD_DEV_DESC ) ) { return 0 ; } memcpy ( BufPtr , & deviceDesc , sizeof ( USB_STD_DEV_DESC ) ) ; return sizeof ( USB_STD_DEV_DESC ) ; }
This function returns the device descriptor for the device.
This function returns the device descriptor for the device .
/* Check buffer pointer is there and buffer is big enough. */