ModusToolbox USBFXStack
Data Structures

General Description

Data Structures

struct  cy_stc_hbdma_context_t
 Structure encapsulating the context information for the High BandWidth DMA driver. More...
 
struct  cy_stc_hbdma_desc_t
 Structure representing the High BandWidth DMA descriptor structure which is maintained in the device RAM memory. More...
 
struct  cy_stc_hbdma_sock_t
 Structure representing the control and status registers associated with a High BandWidth DMA socket. More...
 
struct  cy_stc_hbdma_sockconfig_t
 Structure used to provide the configuration settings associated with a High BandWidth DMA socket. More...
 
struct  cy_stc_hbdma_chn_config_t
 Structure encapsulating the configuration parameters for a High BandWidth DMA channel to be created. More...
 
struct  cy_stc_hbdma_dw_descriptor_t
 Context structure used by the HBW DW descriptor list allocator. More...
 
struct  cy_stc_hbdma_channel_t
 Structure encapsulation all configuration and state information associated with a High BandWidth DMA channel. More...
 
struct  cy_stc_hbdma_buff_status_t
 Structure encapsulating the status of the current DMA buffer associated with a HBW DMA channel. More...
 
struct  cy_stc_hbdma_dscr_list_t
 Context structure used by the HBW DMA descriptor list allocator. More...
 
struct  cy_stc_hbdma_buf_mgr_t
 Context structure used by the HBW DMA buffer allocator. More...
 
struct  cy_stc_hbdma_mgr_context_t
 Context structure for the HBWSS DMA manager middleware library. More...
 
struct  cy_stc_hbdma_intr_msg_t
 Structure holding HbDma interrupt information. More...
 

Data Structure Documentation

◆ cy_stc_hbdma_context_t

struct cy_stc_hbdma_context_t
Data Fields
HBDMA_SCK_Type * LVDSAD0_SCK Pointer to LVDS DMA Adapter 0 Socket array.
HBDMA_SCK_GBL_Type * LVDSAD0_SCK_GBL Pointer to LVDS DMA Adapter 0 SCK_GBL structure.
HBDMA_SCK_Type * LVDSAD1_SCK Pointer to LVDS DMA Adapter 1 Socket array.
HBDMA_SCK_GBL_Type * LVDSAD1_SCK_GBL Pointer to LVDS DMA Adapter 1 SCK_GBL structure.
HBDMA_SCK_Type * USBIN_SCK Pointer to USB Ingress Socket array.
HBDMA_SCK_GBL_Type * USBIN_SCK_GBL Pointer to USB Ingress SCK_GBL structure.
HBDMA_SCK_Type * USBEG_SCK Pointer to USB Egress Socket array.
HBDMA_SCK_GBL_Type * USBEG_SCK_GBL Pointer to USB Egress SCK_GBL structure.
cy_cb_hbdma_intr_callback_t intrCallback Callback function pointer for interrupt notification.
void * cbContext Caller context to be passed to the callback function.
bool usb3Enabled Whether USB32DEV adapter is supported.
bool lvdsEnabled Whether LVDS adapter is supported.

◆ cy_stc_hbdma_desc_t

struct cy_stc_hbdma_desc_t
Data Fields
uint8_t * pBuffer Pointer to RAM buffer used.
uint32_t sync Points to the producer and consumer sockets.
uint32_t chain Next descriptor links.
uint32_t size Buffer size and current data count.

◆ cy_stc_hbdma_sock_t

struct cy_stc_hbdma_sock_t
Data Fields
uint32_t actDscrIndex Index of active descriptor.
uint32_t reqXferSize The transfer size requested for this socket.
uint32_t compXferCount The completed transfer count for this socket.
uint32_t status Socket configuration and status register.
uint32_t intrStatus Interrupt status register.
uint32_t intrMask Interrupt mask register.
cy_stc_hbdma_desc_t actDscr Copy of active descriptor.
uint32_t sckEvent Register to generate DMA event triggers.

◆ cy_stc_hbdma_sockconfig_t

struct cy_stc_hbdma_sockconfig_t
Data Fields
uint32_t actDscrIndex Index of first descriptor to be used.
uint32_t reqXferSize The transfer size requested for this socket.
uint32_t intrMask Interrupt mask register.
uint32_t status Socket status to be set.

◆ cy_stc_hbdma_chn_config_t

struct cy_stc_hbdma_chn_config_t
Data Fields
uint32_t size Size of DMA buffers to be used.
uint16_t count Number of DMA buffers to be used.
uint16_t prodHdrSize Size of header associated with the channel.
uint32_t prodBufSize Buffer size to be configured on producer side.
cy_en_hbdma_chn_type_t chType Type of DMA channel to be created.
bool bufferMode Whether unit of data transfer is a buffer.
bool eventEnable Enable for DMA event triggers.
uint8_t prodSckCount Number of producer sockets: 0, 1 or 2.
uint8_t consSckCount Number of consumer sockets: 0, 1 or 2.
uint8_t endpAddr USB endpoint associated with the channel (optional).
cy_hbdma_socket_id_t prodSck[2] ID of the producer socket(s).
cy_hbdma_socket_id_t consSck[2] ID of the consumer socket(s).
uint16_t usbMaxPktSize Maximum packet size of the associated USB endpoint.
uint32_t intrEnable Enable for DMA interrupts.
cy_cb_hbdma_event_callback_t cb Event callback function pointer.
void * userCtx User context for the callback.

◆ cy_stc_hbdma_dw_descriptor_t

struct cy_stc_hbdma_dw_descriptor_t
Data Fields
uint32_t padding[2] 8 byte padding for 32 byte alignment
cy_stc_dma_descriptor_t dwDscr DataWire descriptors.

◆ cy_stc_hbdma_channel_t

struct cy_stc_hbdma_channel_t
Data Fields
struct cy_stc_hbdma_mgr_context * pContext HBWSS DMA manager context.
cy_en_hbdma_chn_type_t type The type of the DMA channel.
bool bufferMode Whether unit of data transfer is a buffer.
bool eventEnable Event enable for sockets associated with this channel.
uint8_t prodSckCount Number of producer sockets: 0, 1 or 2.
uint8_t consSckCount Number of consumer sockets: 0, 1 or 2.
uint16_t count Number of buffers for the channel.
uint32_t size The buffer size for the channel.
cy_hbdma_socket_id_t prodSckId[2] The producer (ingress) socket IDs.
cy_hbdma_socket_id_t consSckId[2] The consumer (egress) socket IDs.
uint16_t prodHdrSize Size of header associated with the channel.
uint32_t prodBufSize Buffer size to be configured on producer side.
uint16_t firstProdDscrIndex[2] Head of producer descriptor chain for each socket.
uint16_t firstConsDscrIndex[2] Head of consumer descriptor chain for each socket.
uint16_t curProdDscrIndex[2] Current descriptor for producer(s).
uint16_t curConsDscrIndex[2] Current descriptor for consumer(s).
uint16_t nextProdDscr Next produce descriptor to be updated.
uint16_t nextConsDscr Next consume descriptor to be updated.
uint16_t lastProdDscr The last active produce descriptor.
uint16_t overrideDscrIndex Descriptor for send/receive transfers.
uint32_t xferSize Current transfer size.
uint32_t notification Notifications enabled for this channel.
cy_cb_hbdma_event_callback_t cbFunc Function to be called on events.
void * cbCtx User context to pass to the callback.
cy_en_hbdma_chn_state_t state Current state of the DMA channel.
uint8_t activeSckIndex Socket Index which needs to be processed.
uint8_t pendingEvtCnt Number of pending consume events to be processed.
uint8_t nextProdSck Socket index on which next producer event for a 2:1 channel is expected.
uint16_t overrideCnt Count of override operations performed on this channel.
uint8_t commitCnt[2] Number of commit operations performed to each consumer socket.
uint8_t discardCnt[2] Number of pending discard operations on each consumer socket.
uint8_t endpAddr USB endpoint associated with the channel.
bool egressDWTrigDone[2] Whether DataWire trigger for each egress channel has been done.
bool ingressDWRqtQueued[2] Whether ingress DataWire request has been queued.
bool egressDWRqtQueued[2] Whether egress DataWire request has been queued.
uint16_t epMaxPktSize Maximum packet size for the USBHS endpoint.
cy_stc_hbdma_dw_descriptor_t * pProdDwDscr[2] Current DataWire descriptor pointer for producer channels.
cy_stc_hbdma_dw_descriptor_t * pConsDwDscr[2] Current DataWire descriptor pointer for consumer channels.
uint32_t curIngressXferSize[2] Current ingress DataWire transfer size in bytes.
uint8_t * pCurEgressDataBuf[2] Current buffer from which egress DataWire channel is reading.
uint32_t curEgressXferSize[2] Size of data in buffer from which egress channel is reading.

◆ cy_stc_hbdma_buff_status_t

struct cy_stc_hbdma_buff_status_t
Data Fields
uint8_t * pBuffer Pointer to the data buffer.
uint32_t size Actual size of the buffer in bytes.
uint32_t count Byte count of valid data in buffer.
uint16_t status Status fields associated with the descriptor.

◆ cy_stc_hbdma_dscr_list_t

struct cy_stc_hbdma_dscr_list_t
Data Fields
uint16_t availCount Count of available descriptors.
uint16_t totalCount Total number of descriptors.
uint32_t dscrStatus[CY_HBDMA_MAX_DSCR_CNT/32U] Bit map representing state of each descriptor.

◆ cy_stc_hbdma_buf_mgr_t

struct cy_stc_hbdma_buf_mgr_t
Data Fields
uint8_t * startAddr Start address of memory region available for allocation.
uint32_t regionSize Size of memory region available for allocation.
uint32_t * usedStatus Bit-map that stores the status of memory blocks.
uint32_t statusSize Size of the status array in 32 bit words.
uint32_t searchPos Word address from which to start searching for memory.

◆ cy_stc_hbdma_mgr_context_t

struct cy_stc_hbdma_mgr_context_t
Data Fields
cy_stc_hbdma_context_t * pDrvContext HBWSS DMA driver context structure.
cy_stc_hbdma_dscr_list_t * pDscrPool HBWSS DMA descriptor pool.
cy_stc_hbdma_buf_mgr_t * pBufMgr HBWSS DMA buffer manager.
uint32_t socketUsed[CY_HBDMA_MAX_ADAP_CNT] Bit-map showing the sockets in use.
cy_stc_hbdma_channel_t * sckChannelMap[CY_HBDMA_MAX_ADAP_CNT][CY_HBDMA_SOCK_PER_ADAPTER] Table used to map sockets to DMA channels.
cy_stc_hbdma_dw_descriptor_t * dwDscrList List of DataWire descriptors used across all channels.
uint16_t usbIngMultEnable Bit-mask providing mult enable setting for USB ingress sockets.
uint16_t usbEgrMultEnable Bit-mask providing mult enable setting for USB egress sockets.
bool en_64k Whether 64KB DMA buffer support is enabled.
void * pUsbStackCtx USB stack context pointer.

Needed for USB-HS operation.

◆ cy_stc_hbdma_intr_msg_t

struct cy_stc_hbdma_intr_msg_t
Data Fields
uint32_t socketId Socket on which interrupt was received.
uint32_t intrType Type of interrupt received.
uint32_t curDscr Active descriptor at the time of interrupt.