AM261x MCU+ SDK  11.00.00

Introduction

These are miscellaneous routines that don't fit into any of the other categories.

Functions

volatile dwc_usb3_pcd_ep_tdwc_usb3_pcd_get_ep_by_addr (volatile dwc_usb3_pcd_t *pcd, u16 idx)
 This routine gets a pointer to an EP from the wIndex address value of the control request. More...
 
int dwc_usb3_pcd_get_frame_number (volatile dwc_usb3_pcd_t *pcd)
 Gets the current USB frame number. More...
 
int dwc_usb3_pcd_isoc_ep_hiber_restart (volatile dwc_usb3_pcd_t *pcd, volatile dwc_usb3_pcd_ep_t *ep)
 After hibernation, this function restarts the transfer using the TRB address that was active before hibernation. The address is stored in the hiber_desc_idx field of the dwc_ep structure during the wakeup process. More...
 
void dwc_usb3_pcd_stop (volatile dwc_usb3_pcd_t *pcd)
 This routine is called when the Device is disconnected. It stops any active requests and informs the Function Driver of the disconnect. More...
 
u32 dwc_usb3_pcd_get_link_state (volatile dwc_usb3_pcd_t *pcd)
 This function retrieves the current link state. More...
 
void dwc_usb3_pcd_set_link_state (volatile dwc_usb3_pcd_t *pcd, u32 state)
 This function sets state of USB link. More...
 
void dwc_usb3_pcd_remote_wake (volatile dwc_usb3_pcd_t *pcd, int function)
 This function sends a Remote Wakeup to the host. More...
 
void dwc_usb3_pcd_do_test_mode (unsigned long data)
 This routine is called when the SET_FEATURE TEST_MODE Setup packet is sent from the host. The Device Control register is written with the Test Mode bits set to the specified Test Mode. This is done as a tasklet so that the "Status" phase of the control transfer completes before transmitting the TEST packets. More...
 
void dwc_queueInit (dwc_queue_t *queue)
 This routine initializes the queue. More...
 
bool dwc_queuePut (dwc_queue_t *queue, uint32_t data)
 This routine adds an element to the queue. More...
 
bool dwc_queueGet (dwc_queue_t *queue, uint32_t *data)
 This routine retrieves an elements from the queue. More...
 

Function Documentation

◆ dwc_usb3_pcd_get_ep_by_addr()

volatile dwc_usb3_pcd_ep_t* dwc_usb3_pcd_get_ep_by_addr ( volatile dwc_usb3_pcd_t pcd,
u16  idx 
)

This routine gets a pointer to an EP from the wIndex address value of the control request.

Parameters
pcdProgramming view of DWC_usb3 peripheral controller.
idxThe wIndex address value of the control request.
Returns
Pointer to the EP struct corresponding to the address.

◆ dwc_usb3_pcd_get_frame_number()

int dwc_usb3_pcd_get_frame_number ( volatile dwc_usb3_pcd_t pcd)

Gets the current USB frame number.

Parameters
pcdProgramming view of DWC_usb3 peripheral controller.
Returns
Current USB frame number.

◆ dwc_usb3_pcd_isoc_ep_hiber_restart()

int dwc_usb3_pcd_isoc_ep_hiber_restart ( volatile dwc_usb3_pcd_t pcd,
volatile dwc_usb3_pcd_ep_t ep 
)

After hibernation, this function restarts the transfer using the TRB address that was active before hibernation. The address is stored in the hiber_desc_idx field of the dwc_ep structure during the wakeup process.

Parameters
pcdProgramming view of DWC_usb3 peripheral controller.
epThe EP to restart the transfer on.
Returns
1 if a transfer was restarted, 0 if not.

◆ dwc_usb3_pcd_stop()

void dwc_usb3_pcd_stop ( volatile dwc_usb3_pcd_t pcd)

This routine is called when the Device is disconnected. It stops any active requests and informs the Function Driver of the disconnect.

Parameters
pcdProgramming view of DWC_usb3 peripheral controller.

◆ dwc_usb3_pcd_get_link_state()

u32 dwc_usb3_pcd_get_link_state ( volatile dwc_usb3_pcd_t pcd)

This function retrieves the current link state.

Parameters
pcdProgramming view of DWC_usb3 peripheral controller.
Returns
The current link state.

◆ dwc_usb3_pcd_set_link_state()

void dwc_usb3_pcd_set_link_state ( volatile dwc_usb3_pcd_t pcd,
u32  state 
)

This function sets state of USB link.

Parameters
pcdProgramming view of DWC_usb3 peripheral controller.
stateLink state to set.

◆ dwc_usb3_pcd_remote_wake()

void dwc_usb3_pcd_remote_wake ( volatile dwc_usb3_pcd_t pcd,
int  function 
)

This function sends a Remote Wakeup to the host.

Parameters
pcdProgramming view of DWC_usb3 peripheral controller.
functionFunction that caused the remote wakeup.

◆ dwc_usb3_pcd_do_test_mode()

void dwc_usb3_pcd_do_test_mode ( unsigned long  data)

This routine is called when the SET_FEATURE TEST_MODE Setup packet is sent from the host. The Device Control register is written with the Test Mode bits set to the specified Test Mode. This is done as a tasklet so that the "Status" phase of the control transfer completes before transmitting the TEST packets.

Parameters
dataPointer to the programming view of DWC_usb3 peripheral controller.

◆ dwc_queueInit()

void dwc_queueInit ( dwc_queue_t queue)

This routine initializes the queue.

Parameters
queuePointer to the instance of queue

◆ dwc_queuePut()

bool dwc_queuePut ( dwc_queue_t queue,
uint32_t  data 
)

This routine adds an element to the queue.

Parameters
queuePointer to the instance of queue
dataData to be inserted in the queue
Returns
true if the element was successfully added, false if the queue is full

◆ dwc_queueGet()

bool dwc_queueGet ( dwc_queue_t queue,
uint32_t *  data 
)

This routine retrieves an elements from the queue.

Parameters
queuePointer to the instance of queue
dataPointer to a variable where the data will be stored
Returns
true if an element was successfully retrieved, false if the queue is empty