These are miscellaneous routines that don't fit into any of the other categories.
◆ dwc_usb3_pcd_get_ep_by_addr()
This routine gets a pointer to an EP from the wIndex address value of the control request.
- Parameters
-
| pcd | Programming view of DWC_usb3 peripheral controller. |
| idx | The wIndex address value of the control request. |
- Returns
- Pointer to the EP struct corresponding to the address.
◆ dwc_usb3_pcd_get_frame_number()
Gets the current USB frame number.
- Parameters
-
| pcd | Programming view of DWC_usb3 peripheral controller. |
- Returns
- Current USB frame number.
◆ dwc_usb3_pcd_isoc_ep_hiber_restart()
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
-
| pcd | Programming view of DWC_usb3 peripheral controller. |
| ep | The EP to restart the transfer on. |
- Returns
- 1 if a transfer was restarted, 0 if not.
◆ dwc_usb3_pcd_stop()
This routine is called when the Device is disconnected. It stops any active requests and informs the Function Driver of the disconnect.
- Parameters
-
| pcd | Programming view of DWC_usb3 peripheral controller. |
◆ dwc_usb3_pcd_get_link_state()
This function retrieves the current link state.
- Parameters
-
| pcd | Programming view of DWC_usb3 peripheral controller. |
- Returns
- The current link state.
◆ dwc_usb3_pcd_set_link_state()
This function sets state of USB link.
- Parameters
-
| pcd | Programming view of DWC_usb3 peripheral controller. |
| state | Link 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
-
| pcd | Programming view of DWC_usb3 peripheral controller. |
| function | Function 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
-
| data | Pointer to the programming view of DWC_usb3 peripheral controller. |
◆ dwc_queueInit()
This routine initializes the queue.
- Parameters
-
| queue | Pointer 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
-
| queue | Pointer to the instance of queue |
| data | Data 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
-
| queue | Pointer to the instance of queue |
| data | Pointer to a variable where the data will be stored |
- Returns
- true if an element was successfully retrieved, false if the queue is empty