| usbpsu Vitis Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

- Data Structures
- Data Fields

Data Fields
XUsbPsu_Ep Struct Reference
USBPSU APIs

struct XUsbPsu_Ep - Endpoint representation Endpoint representation More...

## Data Fields
void(* | Handler )(void *, u32, u32)
| User handler called when data is sent for IN Ep and received for OUT Ep. More...
struct XUsbPsu_Trb EpTrb[NO_OF_TRB_PER_EP+1U] | ALIGNMENT_CACHELINE
| TRB used by endpoint One extra Link TRB. More...
u32 | EpStatus
| Flags to represent Endpoint status. More...
u32 | EpSavedState
| Endpoint status saved at the time of hibernation. More...
u32 | RequestedBytes
| RequestedBytes for transfer. More...
u32 | BytesTxed
| Actual Bytes transferred. More...
u32 | Interval
| Data transfer service interval. More...
u32 | TrbEnqueue
| number of TRB enqueue More...
u32 | TrbDequeue
| number of TRB dequeue More...
u16 | MaxSize
| Size of endpoint. More...
u16 | CurUf
| current microframe More...
u8 * | BufferPtr
| Buffer location. More...
u8 | ResourceIndex
| Resource Index assigned to Endpoint by core. More...
u8 | PhyEpNum
| Physical Endpoint Number in core. More...
u8 | UsbEpNum
| USB Endpoint Number. More...
u8 | Type
| Type of Endpoint - Control/BULK/INTERRUPT/ISOC. More...
u8 | Direction
| Direction - EP_DIR_OUT/EP_DIR_IN. More...
u8 | UnalignedTx
| Unaligned Tx flag - 0/1. More...

## Detailed Description

struct XUsbPsu_Ep - Endpoint representation Endpoint representation

Parameters

  Handler,: | User handler
  EpTrb,: | TRB used by endpoint
  EpStatus,: | Flags to represent Endpoint status
  EpSavedState,: | Endpoint status saved at the time of hibernation
  RequestedBytes,: | RequestedBytes for transfer
  BytesTxed,: | Actual Bytes transferred
  Interval,: | Data transfer service interval
  TrbEnqueue,: | number of TRB enqueue
  TrbDequeue,: | number of TRB dequeue
  MaxSize,: | Size of endpoint
  CurUf,: | current microframe
  BufferPtr,: | Buffer location
  ResourceIndex,: | Resource Index assigned to Endpoint by core
  PhyEpNum,: | Physical Endpoint Number in core
  UsbEpNum,: | USB Endpoint Number
  Type,: | Type of Endpoint - Control/BULK/INTERRUPT/ISOC
  Direction,: | Direction - EP_DIR_OUT/EP_DIR_IN
  UnalignedTx,: | Unaligned Tx flag - 0/1

## Field Documentation

struct XUsbPsu_Trb EpTrb [NO_OF_TRB_PER_EP + 1U] XUsbPsu_Ep::ALIGNMENT_CACHELINE

TRB used by endpoint One extra Link TRB.

u8* XUsbPsu_Ep::BufferPtr

Buffer location.

Referenced by XUsbPsu_Ep0DataDone(), XUsbPsu_Ep0Recv(), XUsbPsu_Ep0Send(), XUsbPsu_EpBufferRecv(), XUsbPsu_EpBufferSend(), and XUsbPsu_EpXferComplete().

u32 XUsbPsu_Ep::BytesTxed

Actual Bytes transferred.

Referenced by XUsbPsu_Ep0DataDone(), XUsbPsu_Ep0Recv(), XUsbPsu_Ep0Send(), XUsbPsu_EpBufferRecv(), XUsbPsu_EpBufferSend(), and XUsbPsu_EpXferComplete().

u16 XUsbPsu_Ep::CurUf

current microframe

Referenced by XUsbPsu_EpBufferRecv(), XUsbPsu_EpBufferSend(), XUsbPsu_EpEnable(), and XUsbPsu_EpXferNotReady().

u8 XUsbPsu_Ep::Direction

Direction - EP_DIR_OUT/EP_DIR_IN.

Referenced by XUsbPsu_ClearStallAllEp(), XUsbPsu_ClearStalls(), XUsbPsu_Ep0_EndControlData(), XUsbPsu_Ep0Recv(), XUsbPsu_Ep0Send(), XUsbPsu_Ep0StartStatus(), XUsbPsu_EpBufferRecv(), XUsbPsu_EpBufferSend(), XUsbPsu_EpClearStall(), XUsbPsu_EpDisable(), XUsbPsu_EpEnable(), XUsbPsu_EpSetStall(), XUsbPsu_EpXferComplete(), XUsbPsu_RecvSetup(), XUsbPsu_SaveEndpointState(), XUsbPsu_StopActiveTransfers(), and XUsbPsu_StopTransfer().

u32 XUsbPsu_Ep::EpSavedState

Endpoint status saved at the time of hibernation.

Referenced by XUsbPsu_SaveEndpointState(), and XUsbPsu_SetEpConfig().

u32 XUsbPsu_Ep::EpStatus

Flags to represent Endpoint status.

Referenced by XUsbPsu_ClearStallAllEp(), XUsbPsu_ClearStalls(), XUsbPsu_Ep0Recv(), XUsbPsu_Ep0Send(), XUsbPsu_Ep0StallRestart(), XUsbPsu_Ep0StartStatus(), XUsbPsu_Ep0XferComplete(), XUsbPsu_EpBufferRecv(), XUsbPsu_EpBufferSend(), XUsbPsu_EpClearStall(), XUsbPsu_EpDisable(), XUsbPsu_EpEnable(), XUsbPsu_EpEvent(), XUsbPsu_EpSetStall(), XUsbPsu_EpTransferDeactive(), XUsbPsu_EpXferComplete(), XUsbPsu_IsEpStalled(), XUsbPsu_RecvSetup(), XUsbPsu_ResetIntr(), XUsbPsu_StopActiveTransfers(), and XUsbPsu_StopTransfer().

void(* XUsbPsu_Ep::Handler)(void *, u32, u32)

User handler called when data is sent for IN Ep and received for OUT Ep.

Referenced by XUsbPsu_Ep0DataDone(), XUsbPsu_EpXferComplete(), XUsbPsu_EpXferNotReady(), and XUsbPsu_SetEpHandler().

u32 XUsbPsu_Ep::Interval

Data transfer service interval.

Referenced by SetEpInterval(), XUsbPsu_EpXferNotReady(), and XUsbPsu_SetEpConfig().

u16 XUsbPsu_Ep::MaxSize

Size of endpoint.

Referenced by XUsbPsu_Ep0Recv(), XUsbPsu_EpBufferRecv(), XUsbPsu_EpDisable(), XUsbPsu_EpEnable(), XUsbPsu_EpTransferDeactive(), and XUsbPsu_EpXferComplete().

u8 XUsbPsu_Ep::PhyEpNum

Physical Endpoint Number in core.

Referenced by XUsbPsu_EpBufferSend(), XUsbPsu_EpDisable(), XUsbPsu_EpEnable(), XUsbPsu_EpTransferDeactive(), XUsbPsu_IsEpStalled(), XUsbPsu_SaveEndpointState(), XUsbPsu_SendEpCmd(), and XUsbPsu_SetEpHandler().

u32 XUsbPsu_Ep::RequestedBytes

RequestedBytes for transfer.

Referenced by XUsbPsu_Ep0DataDone(), XUsbPsu_Ep0Recv(), XUsbPsu_Ep0Send(), XUsbPsu_EpBufferRecv(), XUsbPsu_EpBufferSend(), and XUsbPsu_EpXferComplete().

u8 XUsbPsu_Ep::ResourceIndex

Resource Index assigned to Endpoint by core.

Referenced by XUsbPsu_Ep0_EndControlData(), XUsbPsu_Ep0Recv(), XUsbPsu_Ep0Send(), XUsbPsu_Ep0StartStatus(), XUsbPsu_Ep0XferComplete(), XUsbPsu_EpBufferRecv(), XUsbPsu_EpBufferSend(), XUsbPsu_EpXferComplete(), XUsbPsu_RecvSetup(), and XUsbPsu_StopTransfer().

u32 XUsbPsu_Ep::TrbDequeue

number of TRB dequeue

Referenced by XUsbPsu_EpDisable(), XUsbPsu_EpEnable(), XUsbPsu_EpTransferDeactive(), and XUsbPsu_EpXferComplete().

u32 XUsbPsu_Ep::TrbEnqueue

number of TRB enqueue

Referenced by XUsbPsu_EpBufferRecv(), XUsbPsu_EpBufferSend(), XUsbPsu_EpDisable(), XUsbPsu_EpEnable(), and XUsbPsu_EpTransferDeactive().

u8 XUsbPsu_Ep::Type

Type of Endpoint - Control/BULK/INTERRUPT/ISOC.

Referenced by XUsbPsu_EpBufferRecv(), XUsbPsu_EpBufferSend(), XUsbPsu_EpDisable(), XUsbPsu_EpEnable(), XUsbPsu_EpTransferDeactive(), XUsbPsu_EpXferNotReady(), and XUsbPsu_SetEpConfig().

u8 XUsbPsu_Ep::UnalignedTx

Unaligned Tx flag - 0/1.

Referenced by XUsbPsu_Ep0DataDone(), XUsbPsu_Ep0Recv(), XUsbPsu_EpBufferRecv(), and XUsbPsu_EpXferComplete().

u8 XUsbPsu_Ep::UsbEpNum

USB Endpoint Number.

Referenced by XUsbPsu_ClearStallAllEp(), XUsbPsu_ClearStalls(), XUsbPsu_Ep0_EndControlData(), XUsbPsu_Ep0Recv(), XUsbPsu_Ep0Send(), XUsbPsu_Ep0StartStatus(), XUsbPsu_EpBufferRecv(), XUsbPsu_EpBufferSend(), XUsbPsu_EpClearStall(), XUsbPsu_EpDisable(), XUsbPsu_EpEnable(), XUsbPsu_EpSetStall(), XUsbPsu_RecvSetup(), XUsbPsu_SaveEndpointState(), XUsbPsu_SendEpCmd(), XUsbPsu_StopActiveTransfers(), and XUsbPsu_StopTransfer().