usbpsu
Vitis Drivers API Documentation
xusb_poll_example.c File Reference

Overview

This file implements the mass storage class poll example.

MODIFICATION HISTORY:
Ver   Who  Date     Changes


1.5 vak 06/02/19 First release 1.5 vak 03/25/19 Fixed incorrect data_alignment pragma directive for IAR 1.8 pm 15/09/20 Fixed C++ Compilation error. 1.14 pm 21/06/23 Added support for system device-tree flow.

 

Functions

void BulkOutHandler (void *CallBackRef, u32 RequestedBytes, u32 BytesTxed)
 This function is Bulk Out Endpoint handler/Callback called by driver when data is received. More...
 
void BulkInHandler (void *CallBackRef, u32 RequestedBytes, u32 BytesTxed)
 This function is Bulk In Endpoint handler/Callback called by driver when data is sent. More...
 
int main (void)
 This function is the main function of the USB mass storage example. More...
 

Function Documentation

void BulkInHandler ( void *  CallBackRef,
u32  RequestedBytes,
u32  BytesTxed 
)

This function is Bulk In Endpoint handler/Callback called by driver when data is sent.

Parameters
CallBackRefis pointer to Usb_DevData instance.
RequestedBytesis number of bytes requested to send.
BytesTxedis actual number of bytes sent to Host.
Returns
None
Note
None.
void BulkOutHandler ( void *  CallBackRef,
u32  RequestedBytes,
u32  BytesTxed 
)

This function is Bulk Out Endpoint handler/Callback called by driver when data is received.

Parameters
CallBackRefis pointer to Usb_DevData instance.
RequestedBytesis number of bytes requested for reception.
BytesTxedis actual number of bytes received from Host.
Returns
None
Note
None.
int main ( void  )

This function is the main function of the USB mass storage example.

Parameters
None.
Returns
  • XST_SUCCESS if successful,
  • XST_FAILURE if unsuccessful.
Note
None.

References XUsbPsu_Config::BaseAddress, BulkInHandler(), BulkOutHandler(), Ch9Handler(), Usb_DevData::PrivateData, Status, UsbEnableEvent(), UsbPollHandler(), XUSBPSU_DEVTEN_CONNECTDONEEN, XUSBPSU_DEVTEN_DISCONNEVTEN, XUSBPSU_DEVTEN_EVNTOVERFLOWEN, XUSBPSU_DEVTEN_ULSTCNGEN, XUSBPSU_DEVTEN_USBRSTEN, and XUSBPSU_DEVTEN_WKUPEVTEN.