usbpsu
Vitis Drivers API Documentation
xusb_wrapper.h File Reference

Overview

This file contains declarations for USBPSU Driver wrappers.

MODIFICATION HISTORY:
Ver   Who       Date     Changes


1.0 BK 12/01/18 First release MYK 12/01/18 Added hibernation support for device mode vak 22/01/18 Added Microblaze support for usbpsu driver vak 13/03/18 Moved the setup interrupt system calls from driver to example. 1.5 vak 02/06/19 Add UsbPollHandler and UsbEnableEvent API's 1.7 pm 02/03/20 Add closure bracket for "extern c" c++ compilation 1.14 pm 21/06/23 Added support for system device-tree flow.

 

Macros

#define XUSBPSU_REQ_REPLY_LEN   1024
 Max size of reply buffer. More...
 
Endpoint Address
#define USB_EP1_IN   0x81
 
#define USB_EP1_OUT   0x01
 
#define USB_EP2_IN   0x82
 
#define USB_EP2_OUT   0x02
 
Endpoint Type
#define USB_EP_TYPE_CONTROL   XUSBPSU_ENDPOINT_XFER_CONTROL
 
#define USB_EP_TYPE_ISOCHRONOUS   XUSBPSU_ENDPOINT_XFER_ISOC
 
#define USB_EP_TYPE_BULK   XUSBPSU_ENDPOINT_XFER_BULK
 
#define USB_EP_TYPE_INTERRUPT   XUSBPSU_ENDPOINT_XFER_INT
 

Functions

void UsbPollHandler (struct XUsbPsu *InstancePtr)
 Handler called from polled mode for handling usb events. More...
 
void UsbEnableEvent (struct XUsbPsu *InstancePtr, u32 Mask)
 Enables the events specified in the mask. More...
 
s32 IsSuperSpeed (struct Usb_DevData *InstancePtr)
 Sets speed of the Core for connecting to Host. More...
 
void SetConfigDone (void *InstancePtr, u8 Flag)
 Set the Config state. More...
 
u8 GetConfigDone (void *InstancePtr)
 Get the Config state. More...
 
void SetEpInterval (void *InstancePtr, u8 UsbEpNum, u8 Dir, u32 Interval)
 This function sets Endpoint Interval. More...
 

Macro Definition Documentation

#define XUSBPSU_REQ_REPLY_LEN   1024

Max size of reply buffer.

Function Documentation

u8 GetConfigDone ( void *  InstancePtr)

Get the Config state.

Parameters
InstancePtris a private member of Usb_DevData instance.
Returns
Current configuration value
Note
None.

References XUsbPsu::IsConfigDone.

s32 IsSuperSpeed ( struct Usb_DevData InstancePtr)

Sets speed of the Core for connecting to Host.

Parameters
InstancePtris a pointer to the Usb_DevData instance.
Returns
XST_SUCCESS else XST_FAILURE
Note
None.

References Usb_DevData::PrivateData, and XUsbPsu_IsSuperSpeed().

Referenced by ParseCBW(), Usb_Ch9SetupCfgDescReply(), Usb_Ch9SetupDevDescReply(), and Usb_Ch9SetupStrDescReply().

void SetConfigDone ( void *  InstancePtr,
u8  Flag 
)

Set the Config state.

Parameters
InstancePtris a private member of Usb_DevData instance.
Flagis the config value.
Returns
None.
Note
None.

Referenced by Usb_SetConfiguration(), and Usb_SetConfigurationApp().

void SetEpInterval ( void *  InstancePtr,
u8  UsbEpNum,
u8  Dir,
u32  Interval 
)

This function sets Endpoint Interval.

Parameters
InstancePtris a private member of Usb_DevData instance.
UsbEpnumis Endpoint Number.
Diris Endpoint Direction(In/Out).
Intervalis the data transfer service interval
Returns
None.
Note
None.

References XUsbPsu_Ep::Interval.

Referenced by prvPlayBackTask(), prvRecordTask(), and Usb_SetIntf().

void UsbEnableEvent ( struct XUsbPsu InstancePtr,
u32  Mask 
)

Enables the events specified in the mask.

Parameters
InstancePtris a pointer to the XUsbPsu instance.
Returns
None.
Note
None.

References XUsbPsu_EnableIntr().

Referenced by main().

void UsbPollHandler ( struct XUsbPsu InstancePtr)

Handler called from polled mode for handling usb events.

Parameters
InstancePtris a pointer to the XUsbPsu instance.
Returns
None.
Note
None.

References XUsbPsu_IntrHandler().

Referenced by main().