XilinxProcessorIPLib/drivers/usbpsu/examples/xusb_intr_example.c
void BulkOutHandler(void *CallBackRef, u32 RequestedBytes,
							u32 BytesTxed)
{
	struct Usb_DevData *InstancePtr = (struct Usb_DevData *)CallBackRef;

	if (Phase == USB_EP_STATE_COMMAND) {
		ParseCBW(InstancePtr);
	} else if (Phase == USB_EP_STATE_DATA_OUT) {
		/* WRITE command */
		switch (CBW.CBWCB[0]) {
		case USB_RBC_WRITE:
			VirtFlashWritePointer += BytesTxed;
			rxBytesLeft -= BytesTxed;
			break;
		default:
			break;
		}
		SendCSW(InstancePtr, 0);
	}
}
/****************************************************************************/
/**
* This function is Bulk Out Endpoint handler/Callback called by driver when
* data is received.
*
* @param	CallBackRef is pointer to Usb_DevData instance.
* @param	RequestedBytes is number of bytes requested for reception.
* @param	BytesTxed is actual number of bytes received from Host.
*
* @return	None
*
* @note		None.
*
*****************************************************************************/
This function is Bulk Out Endpoint handler/Callback called by driver when
data is received.
This function is Bulk Out Endpoint handler / Callback called by driver when data is received .
void BulkOutHandler(void *CallBackRef, u32 RequestedBytes,
							u32 BytesTxed)
{
	struct Usb_DevData *InstancePtr = (struct Usb_DevData *)CallBackRef;
	if (Phase == USB_EP_STATE_COMMAND) {
		ParseCBW(InstancePtr);
	} else if (Phase == USB_EP_STATE_DATA_OUT) {
		switch (CBW.CBWCB[0]) {
		case USB_RBC_WRITE:
			VirtFlashWritePointer += BytesTxed;
			rxBytesLeft -= BytesTxed;
			break;
		default:
			break;
		}
		SendCSW(InstancePtr, 0);
	}
}
void BulkOutHandler ( void * CallBackRef , u32 RequestedBytes , u32 BytesTxed ) { struct Usb_DevData * InstancePtr = ( struct Usb_DevData * ) CallBackRef ; if ( Phase == USB_EP_STATE_COMMAND ) { ParseCBW ( InstancePtr ) ; } else if ( Phase == USB_EP_STATE_DATA_OUT ) { switch ( CBW . CBWCB [ 0 ] ) { case USB_RBC_WRITE : VirtFlashWritePointer += BytesTxed ; rxBytesLeft -= BytesTxed ; break ; default : break ; } SendCSW ( InstancePtr , 0 ) ; } }
This function is Bulk Out Endpoint handler/Callback called by driver when
data is received.
This function is Bulk Out Endpoint handler / Callback called by driver when data is received .
/* WRITE command */