![]() |
usbpsu
Vitis Drivers API Documentation
|
Data Structures | |
| struct | XUsbPsu_EvtBuffer |
| struct XUsbPsu_EvtBuffer - Software Event buffer representation Software Event buffer representation More... | |
| struct | XUsbPsu_Trb |
| struct XUsbPsu_Trb - Transfer Request Block - Hardware format More... | |
| struct | XUsbPsu_EpParams |
| struct XUsbPsu_EpParams - Endpoint Parameters More... | |
| struct | __attribute__ |
| struct SetupPacket - USB Standard Control Request More... | |
| struct | XUsbPsu_Ep |
| struct XUsbPsu_Ep - Endpoint representation Endpoint representation More... | |
| struct | XUsbPsu_Config |
| struct XUsbPsu_Config - Configuration information for the USB More... | |
| struct | Usb_DevData |
| struct Usb_DevData - Application device data Application Data More... | |
| struct | XUsbPsu |
| USB Device Controller representation USB Device Controller representation. More... | |
| struct | XUsbPsu_Event_Type |
| struct XUsbPsu_Event_Type - Device Endpoint Events type More... | |
| struct | XUsbPsu_Event_Epevt |
| struct XUsbPsu_event_depvt - Device Endpoint Events More... | |
| struct | XUsbPsu_Event_Devt |
| struct XUsbPsu_event_devt - Device Events More... | |
| struct | XUsbPsu_Event_Gevt |
| struct XUsbPsu_event_gevt - Other Core Events More... | |
| union | XUsbPsu_Event |
| union XUsbPsu_event - representation of Event Buffer contents More... | |
Macros | |
| #define | XUSBPSU_H |
| by using protection macros More... | |
| #define | XUSBPSU_EP_DIR_IN 1U |
| Direction IN. More... | |
| #define | XUSBPSU_EP_DIR_OUT 0U |
| Direction OUT. More... | |
| #define | XUSBPSU_USB_DIR_OUT 0U |
| Direction to device. More... | |
| #define | XUSBPSU_USB_DIR_IN 0x80U |
| Direction to host. More... | |
| #define | XUSBPSU_ENDPOINT_XFERTYPE_MASK 0x03 |
| Transfer type mask. More... | |
| #define | XUSBPSU_ENDPOINT_XFER_CONTROL 0U |
| Control EP. More... | |
| #define | XUSBPSU_ENDPOINT_XFER_ISOC 1U |
| ISO EP. More... | |
| #define | XUSBPSU_ENDPOINT_XFER_BULK 2U |
| Bulk EP. More... | |
| #define | XUSBPSU_ENDPOINT_XFER_INT 3U |
| Interrupt EP. More... | |
| #define | XUSBPSU_ENDPOINT_MAX_ADJUSTABLE 0x80 |
| Max EP. More... | |
| #define | XUSBPSU_TEST_J 1U |
| Test Mode J. More... | |
| #define | XUSBPSU_TEST_K 2U |
| Test Mode K. More... | |
| #define | XUSBPSU_TEST_SE0_NAK 3U |
| Test Mode SE0_NAK. More... | |
| #define | XUSBPSU_TEST_PACKET 4U |
| Test Mode TEST PACKET. More... | |
| #define | XUSBPSU_TEST_FORCE_ENABLE 5U |
| Test Mode FORCE ENABLE. More... | |
| #define | XUSBPSU_STATE_ATTACHED 0U |
| Device State Attach. More... | |
| #define | XUSBPSU_STATE_POWERED 1U |
| Device State Power. More... | |
| #define | XUSBPSU_STATE_DEFAULT 2U |
| Device State Default. More... | |
| #define | XUSBPSU_STATE_ADDRESS 3U |
| Device State Address. More... | |
| #define | XUSBPSU_STATE_CONFIGURED 4U |
| Device State Configure. More... | |
| #define | XUSBPSU_STATE_SUSPENDED 5U |
| Device State Suspend. More... | |
| #define | XUSBPSU_SPEED_UNKNOWN 0U |
| Device Speed Unknown. More... | |
| #define | XUSBPSU_SPEED_LOW 1U |
| Device Speed Low. More... | |
| #define | XUSBPSU_SPEED_FULL 2U |
| Device Speed Full. More... | |
| #define | XUSBPSU_SPEED_HIGH 3U |
| Device Speed High. More... | |
| #define | XUSBPSU_SPEED_SUPER 4U |
| Device Speed Speed. More... | |
Typedefs | |
| typedef XUsbPsu_Config | Usb_Config |
| typedef configuration structure More... | |
Enumerations | |
| enum | XusbPsuLinkState { XUSBPSU_LINK_STATE_U0 = 0x00U, XUSBPSU_LINK_STATE_U1 = 0x01U, XUSBPSU_LINK_STATE_U2 = 0x02U, XUSBPSU_LINK_STATE_U3 = 0x03U, XUSBPSU_LINK_STATE_SS_DIS = 0x04U, XUSBPSU_LINK_STATE_RX_DET = 0x05U, XUSBPSU_LINK_STATE_SS_INACT = 0x06U, XUSBPSU_LINK_STATE_POLL = 0x07U, XUSBPSU_LINK_STATE_RECOV = 0x08U, XUSBPSU_LINK_STATE_HRESET = 0x09U, XUSBPSU_LINK_STATE_CMPLY = 0x0AU, XUSBPSU_LINK_STATE_LPBK = 0x0BU, XUSBPSU_LINK_STATE_RESET = 0x0EU, XUSBPSU_LINK_STATE_RESUME = 0x0FU } |
| enum | XusbPsuLinkStateChange { XUSBPSU_LINK_STATE_CHANGE_U0 = 0x00U, XUSBPSU_LINK_STATE_CHANGE_SS_DIS = 0x04U, XUSBPSU_LINK_STATE_CHANGE_RX_DET = 0x05U, XUSBPSU_LINK_STATE_CHANGE_SS_INACT = 0x06U, XUSBPSU_LINK_STATE_CHANGE_RECOV = 0x08U, XUSBPSU_LINK_STATE_CHANGE_CMPLY = 0x0AU } |
Functions | |
| struct XUsbPsu_Trb | __attribute__ ((packed)) |
| Transfer Request Block - Hardware format. More... | |
| s32 | XUsbPsu_CfgInitialize (struct XUsbPsu *InstancePtr, XUsbPsu_Config *ConfigPtr, u32 BaseAddress) |
| This function does the following: More... | |
| s32 | XUsbPsu_Start (struct XUsbPsu *InstancePtr) |
| Starts the controller so that host can detect this device. More... | |
| s32 | XUsbPsu_Stop (struct XUsbPsu *InstancePtr) |
| Stops the controller so that the device disconnects from the host. More... | |
| s32 | XUsbPsu_SetU1SleepTimeout (struct XUsbPsu *InstancePtr, u8 Timeout) |
| Sets U1 sleep timeout. More... | |
| s32 | XUsbPsu_SetU2SleepTimeout (struct XUsbPsu *InstancePtr, u8 Timeout) |
| Sets U2 sleep timeout. More... | |
| s32 | XUsbPsu_AcceptU1U2Sleep (struct XUsbPsu *InstancePtr) |
| Enable Accept U1 and U2 sleep enable. More... | |
| s32 | XUsbPsu_U1SleepEnable (struct XUsbPsu *InstancePtr) |
| Enables U1 enable sleep. More... | |
| s32 | XUsbPsu_U2SleepEnable (struct XUsbPsu *InstancePtr) |
| Enables U2 enable sleep. More... | |
| s32 | XUsbPsu_U1SleepDisable (struct XUsbPsu *InstancePtr) |
| Enables U1 disable sleep. More... | |
| s32 | XUsbPsu_U2SleepDisable (struct XUsbPsu *InstancePtr) |
| Enables U2 disable sleep. More... | |
| s32 | XUsbPsu_IsSuperSpeed (struct XUsbPsu *InstancePtr) |
| Checks if the current speed is super speed or not. More... | |
| s32 | XUsbPsu_EpEnable (struct XUsbPsu *InstancePtr, u8 UsbEpNum, u8 Dir, u16 Maxsize, u8 Type, u8 Restore) |
| Enables endpoint for sending/receiving data. More... | |
| s32 | XUsbPsu_EpDisable (struct XUsbPsu *InstancePtr, u8 UsbEpNum, u8 Dir) |
| Disables Endpoint. More... | |
| void | XUsbPsu_ClearStalls (struct XUsbPsu *InstancePtr) |
| Clears stall on all endpoints. More... | |
| s32 | XUsbPsu_EpBufferSend (struct XUsbPsu *InstancePtr, u8 UsbEp, u8 *BufferPtr, u32 BufferLen) |
| Initiates DMA to send data on endpoint to the host. More... | |
| s32 | XUsbPsu_EpBufferRecv (struct XUsbPsu *InstancePtr, u8 UsbEp, u8 *BufferPtr, u32 Length) |
| Initiates DMA to receive data on endpoint from host. More... | |
| void | XUsbPsu_EpSetStall (struct XUsbPsu *InstancePtr, u8 Epnum, u8 Dir) |
| Stalls an endpoint. More... | |
| void | XUsbPsu_EpClearStall (struct XUsbPsu *InstancePtr, u8 Epnum, u8 Dir) |
| Clears stall on an endpoint. More... | |
| void | XUsbPsu_SetEpHandler (struct XUsbPsu *InstancePtr, u8 Epnum, u8 Dir, void(*Handler)(void *, u32, u32)) |
| Sets an user handler to be called after data is sent/received by an endpoint. More... | |
| s32 | XUsbPsu_IsEpStalled (struct XUsbPsu *InstancePtr, u8 Epnum, u8 Dir) |
| Returns status of endpoint whether it is stalled or not. More... | |
| void | XUsbPsu_StopTransfer (struct XUsbPsu *InstancePtr, u8 UsbEpNum, u8 Dir, u8 Force) |
| Stops transfer on Endpoint. More... | |
| void | XUsbPsu_IntrHandler (void *XUsbPsuInstancePtr) |
| Main interrupt handler. More... | |
| void | XUsbPsu_EnableIntr (struct XUsbPsu *InstancePtr, u32 Mask) |
| Enables an interrupt in event enable RegValister. More... | |
| void | XUsbPsu_DisableIntr (struct XUsbPsu *InstancePtr, u32 Mask) |
| Disables an interrupt in event enable RegValister. More... | |
| s32 | XUsbPsu_SetDeviceAddress (struct XUsbPsu *InstancePtr, u16 Addr) |
| Sets the device address of the core. More... | |
| void | XUsbPsu_Idle (struct XUsbPsu *InstancePtr) |
| This function puts the controller into idle state by stopping the transfers for all endpoints, stopping the usb core, and clearing the event buffers. More... | |
| void | XUsbPsu_SetSpeed (struct XUsbPsu *InstancePtr, u32 Speed) |
| Sets speed of the core for connecting to host. More... | |
| void | XUsbPsu_Sleep (u32 USeconds) |
| API for Sleep routine. More... | |
| void | XUsbPsu_Ep0StallRestart (struct XUsbPsu *InstancePtr) |
| Stalls control endpoint and restarts to receive setup packet. More... | |
| XUsbPsu_Config * | XUsbPsu_LookupConfig (u16 DeviceId) |
| Looks up the device configuration based on the unique device ID. More... | |
Variables | |
| u32 | BufferPtrLow |
| Data buffer pointer to low 32 bits. More... | |
| u32 | BufferPtrHigh |
| Data buffer pointer to high 32-bits. More... | |
| u32 | Size |
| Buffer Size. More... | |
| u32 | Ctrl |
| Transfer Request Block Control parameter. More... | |
| struct XUsbPsu_EpParams | __attribute__ |
| Endpoint Parameters. More... | |
| u32 | Is_DevEvt |
| Device specific event. More... | |
| u32 | Type |
| Event types. More... | |
| u32 | Reserved8_31 |
| Reserved, not used. More... | |
| u32 | Is_EpEvt |
| indicates this is an endpoint event More... | |
| u32 | Epnumber |
| number of the endpoint More... | |
| u32 | Endpoint_Event |
| endpoint event More... | |
| u32 | Reserved11_10 |
| Reserved, not used. More... | |
| u32 | Status |
| Indicates the status of the event. More... | |
| u32 | Parameters |
| Parameters of the current event. More... | |
| u32 | Device_Event |
| device event More... | |
| u32 | Reserved15_12 |
| Reserved, not used. More... | |
| u32 | Event_Info |
| Information about this event. More... | |
| u32 | Reserved31_25 |
| Reserved, not used. More... | |
| u32 | Is_GlobalEvt |
| non-endpoint event (not used) More... | |
| u32 | Phy_Port_Number |
| Phy_Port_Number:4. More... | |
| u32 | Reserved31_12 |
| reserved31_12 More... | |
| XUsbPsu_Config | XUsbPsu_ConfigTable [] |
| Configuration table. More... | |
| u32 BufferPtrHigh |
Data buffer pointer to high 32-bits.
| u32 BufferPtrLow |
Data buffer pointer to low 32 bits.
| u32 Ctrl |
Transfer Request Block Control parameter.
Referenced by XUsbPsu_Ep0XferComplete().
| u32 Device_Event |
device event
it's (0x03) Carkit or (0x04) I2C event
| u32 Endpoint_Event |
endpoint event
| u32 Epnumber |
number of the endpoint
| u32 Event_Info |
Information about this event.
| u32 Is_DevEvt |
Device specific event.
non-endpoint event
| u32 Is_EpEvt |
indicates this is an endpoint event
| u32 Is_GlobalEvt |
non-endpoint event (not used)
| u32 Parameters |
Parameters of the current event.
| u32 Phy_Port_Number |
Phy_Port_Number:4.
| u32 Reserved11_10 |
Reserved, not used.
| u32 Reserved15_12 |
Reserved, not used.
| u32 Reserved31_12 |
reserved31_12
| u32 Reserved31_25 |
Reserved, not used.
| u32 Reserved8_31 |
Reserved, not used.
| u32 Size |
Buffer Size.
Referenced by prvRecordTask(), XUsbPsu_ConnDoneIntr(), XUsbPsu_Ep0Recv(), and XUsbPsu_EpBufferRecv().
| u32 Status |
Indicates the status of the event.
Referenced by main(), ParseCBW(), Usb_Ch9SetupCfgDescReply(), Usb_Ch9SetupDevDescReply(), Usb_Ch9SetupStrDescReply(), XUsbPsu_CfgInitialize(), XUsbPsu_Ep0DataDone(), XUsbPsu_SetTestMode(), XUsbPsu_WaitClearTimeout(), and XUsbPsu_WaitSetTimeout().
| u32 Type |