![]() |
SyterKit 0.4.0.x
SyterKit is a bare-metal framework
|
#include <stdarg.h>#include <stdbool.h>#include <stddef.h>#include <stdint.h>#include <types.h>#include "reg/reg-usb.h"

Go to the source code of this file.
Functions | |
| static void | usb_device_transfer_type_default (uint32_t addr) |
| Disable all transfer types for the USB device. | |
| static void | usb_device_transfer_type_ctrl (uint32_t addr) |
| Set the control transfer type for the USB device. | |
| static void | usb_device_transfer_type_iso (uint32_t addr) |
| Set the ISO transfer type for the USB device. | |
| static void | usb_device_transfer_type_int (uint32_t addr) |
| Set the interrupt transfer type for the USB device. | |
| static void | usb_device_transfer_type_bulk (uint32_t addr) |
| Set the bulk transfer type for the USB device. | |
| static void | usb_device_transfer_mode_default (uint32_t addr) |
| Disable all transfer modes for the USB device. | |
| static void | usb_device_transfer_mode_hs (uint32_t addr) |
| Set the mode to High Speed (HS) for the USB device. | |
| static void | usb_device_transfer_mode_fs (uint32_t addr) |
| Set the mode to Full Speed (FS) for the USB device. | |
| static void | usb_device_transfer_mode_ls (uint32_t addr) |
| Set the mode to Low Speed (LS) for the USB device. | |
| static void | usb_device_ep0_config_ep0_default (uint32_t addr) |
| Configure Endpoint 0 (EP0) in default mode for the USB device. | |
| static void | usb_device_ep0_config_ep0 (uint32_t addr) |
| Configure Endpoint 0 (EP0) for the USB device. | |
| static uint32_t | usb_device_ep0_get_read_data_ready (uint32_t addr) |
| Check if Endpoint 0 (EP0) has received data ready flag for the USB device. | |
| static uint32_t | usb_device_ep0_get_write_data_ready (uint32_t addr) |
| Check if Endpoint 0 (EP0) has write data ready flag for the USB device. | |
| static void | usb_device_ep0_read_data_half (uint32_t addr) |
| Clear the read data half flag for Endpoint 0 (EP0) of the USB device. | |
| static void | usb_device_ep0_read_data_complete (uint32_t addr) |
| Clear the read data complete flag for Endpoint 0 (EP0) of the USB device. | |
| static void | usb_device_ep0_write_data_half (uint32_t addr) |
| Clear the write data half flag for Endpoint 0 (EP0) of the USB device. | |
| static void | usb_device_ep0_write_data_complete (uint32_t addr) |
| Set the write data complete flag for Endpoint 0 (EP0) of the USB device. | |
| static uint32_t | usb_device_ep0_get_stall (uint32_t addr) |
| Check if Endpoint 0 (EP0) has the stall flag set for the USB device. | |
| static void | usb_device_ep0_send_stall (uint32_t addr) |
| Set the send stall flag for Endpoint 0 (EP0) of the USB device. | |
| static void | usb_device_ep0_clear_stall (uint32_t addr) |
| Clear the stall flag for Endpoint 0 (EP0) of the USB device. | |
| static uint32_t | usb_device_ep0_get_setup_end (uint32_t addr) |
| Check if Endpoint 0 (EP0) has the setup end flag set for the USB device. | |
| static void | usb_device_ep0_clear_setup_end (uint32_t addr) |
| Clear the setup end flag for Endpoint 0 (EP0) of the USB device. | |
| static void | usb_device_tx_iso_ep_enable (uint32_t addr) |
| Enable ISO transfer for the USB device. | |
| static void | usb_device_tx_int_ep_enable (uint32_t addr) |
| Enable interrupt transfer for the USB device. | |
| static void | usb_device_tx_bulk_ep_enable (uint32_t addr) |
| Enable bulk transfer for the USB device. | |
| static void | usb_device_tx_config_ep_default (uint32_t addr) |
| Configure the default settings for the transmit endpoint (EP) of the USB device. | |
| static void | usb_device_clear_dma_trans (uint32_t addr) |
| Clear the DMA transfer flag for the USB device. | |
| static void | usb_device_config_dma_trans (uint32_t addr) |
| Configure the DMA transfer settings for the USB device. | |
| static void | usb_device_tx_config_ep (uint32_t addr, uint32_t ts_type, uint32_t is_double_fifo, uint32_t ep_maxpkt) |
| Configure the transmit endpoint (EP) of the USB device. | |
| static void | usb_device_tx_config_ep_dma (uint32_t addr) |
| Configure the DMA transfer settings for the transmit endpoint (EP) of the USB device. | |
| static void | usb_device_tx_clear_ep_dma (uint32_t addr) |
| Clear the DMA transfer flag for the transmit endpoint (EP) of the USB device. | |
| static uint32_t | usb_device_tx_get_write_data_ready (uint32_t addr) |
| Check if the transmit endpoint (EP) is ready to write data for the USB device. | |
| static uint32_t | usb_device_tx_get_write_data_ready_fifo_empty (uint32_t addr) |
| Check if the FIFO of the transmit endpoint (EP) is empty for the USB device. | |
| static void | usb_device_tx_write_data_half (uint32_t addr) |
| Write half of the data to the transmit endpoint (EP) of the USB device. | |
| static void | usb_device_tx_write_data_complete (uint32_t addr) |
| Write all of the data to the transmit endpoint (EP) of the USB device. | |
| static void | usb_device_tx_send_stall (uint32_t addr) |
| Send a stall signal and flush the FIFO of the transmit endpoint (EP) of the USB device. | |
| static uint32_t | usb_device_tx_get_ep_stall (uint32_t addr) |
| Check if the transmit endpoint (EP) of the USB device is stalled. | |
| static void | usb_device_tx_clear_stall (uint32_t addr) |
| Clear the stall signal and reset the FIFO of the transmit endpoint (EP) of the USB device. | |
| static void | usb_device_rx_enable_iso_ep (uint32_t addr) |
| Enable the isochronous transfer type for the receive endpoint (EP) of the USB device. | |
| static void | usb_device_rx_enable_int_ep (uint32_t addr) |
| Enable the interrupt transfer type for the receive endpoint (EP) of the USB device. | |
| static void | usb_device_rx_enable_bulk_ep (uint32_t addr) |
| Enable the bulk transfer type for the receive endpoint (EP) of the USB device. | |
| static void | usb_device_rx_config_ep_default (uint32_t addr) |
| Configure the default settings for the receive endpoint (EP) of the USB device. | |
| static void | usb_device_rx_config_ep (uint32_t addr, uint32_t ts_type, uint32_t is_double_fifo, uint32_t ep_maxpkt) |
| Configures the receive endpoint of the USB device. | |
| static void | usb_device_rx_config_ep_dma (uint32_t addr) |
| Configures the DMA for the receive endpoint of the USB device. | |
| static void | usb_device_rx_clear_ep_dma (uint32_t addr) |
| Clears the DMA configuration for the receive endpoint of the USB device. | |
| static uint32_t | usb_device_rx_get_read_data_ready (uint32_t addr) |
| Checks if there is data ready to be read from the receive endpoint of the USB device. | |
| static void | usb_device_rx_read_data_half (uint32_t addr) |
| Reads half of the data from the receive endpoint of the USB device. | |
| static void | usb_device_rx_read_data_complete (uint32_t addr) |
| Reads the rest of the data from the receive endpoint of the USB device. | |
| static int | usb_device_write_data_half (uint32_t addr, uint32_t ep_type) |
| Writes half of the data to the specified endpoint of the USB device. | |
| static int | usb_device_write_data_complete (uint32_t addr, uint32_t ep_type) |
| Writes the rest of the data to the specified endpoint of the USB device. | |
| static int | usb_device_read_data_half (uint32_t addr, uint32_t ep_type) |
| Reads half of the data from the specified endpoint of the USB device. | |
| static int | usb_device_read_data_complete (uint32_t addr, uint32_t ep_type) |
| Reads the rest of the data from the specified endpoint of the USB device. | |
| static void | usb_device_rx_send_stall (uint32_t addr) |
| Sends a stall on the receive endpoint of the USB device. | |
| static uint32_t | usb_device_rx_get_ep_stall (uint32_t addr) |
| Gets the stall status of the specified endpoint of the USB device. | |
| static void | usb_device_rx_clear_stall (uint32_t addr) |
| Clears the stall on the specified endpoint of the USB device. | |
| static void | usb_device_ep0_flush_fifo (uint32_t addr) |
| Flushes the FIFO for endpoint 0 of the USB device. | |
| static void | usb_device_tx_flush_fifo (uint32_t addr) |
| Flushes the transmit FIFO for the specified endpoint of the USB device. | |
| static void | usb_device_rx_flush_fifo (uint32_t addr) |
| Flushes the receive FIFO for the specified endpoint of the USB device. | |
| void | usb_device_set_address_default (uint64_t husb) |
| Set the default address for the USB device. | |
| void | usb_device_set_address (uint64_t husb, uint8_t address) |
| Set the address for the USB device. | |
| uint32_t | usb_device_query_transfer_mode (uint64_t husb) |
| Query the transfer mode of the USB device. | |
| void | usb_device_config_transfer_mode (uint64_t husb, uint8_t ts_type, uint8_t speed_mode) |
| Configure the transfer mode of the USB device. | |
| void | usb_device_connect_switch (uint64_t husb, uint32_t is_on) |
| Switch the USB device connection on or off. | |
| uint32_t | usb_device_query_power_status (uint64_t husb) |
| Query the power status of the USB device. | |
| int | usb_device_config_ep (uint64_t husb, uint32_t ts_type, uint32_t ep_type, uint32_t is_double_fifo, uint32_t ep_maxpkt) |
| Configure an endpoint of the USB device. | |
| int | usb_device_config_ep_default (uint64_t husb, uint32_t ep_type) |
| Configure a default endpoint of the USB device. | |
| int | usb_device_config_ep_dma (uint64_t husb, uint32_t ep_type) |
| Configure an endpoint of the USB device to use DMA. | |
| int | usb_device_clear_ep_dma (uint64_t husb, uint32_t ep_type) |
| Clear the DMA configuration for an endpoint of the USB device. | |
| int | usb_device_get_ep_stall (uint64_t husb, uint32_t ep_type) |
| Get the stall status of an endpoint of the USB device. | |
| int | usb_device_ep_send_stall (uint64_t husb, uint32_t ep_type) |
| Send a stall condition on an endpoint of the USB device. | |
| int | usb_device_ep_clear_stall (uint64_t husb, uint32_t ep_type) |
| Clear the stall condition on an endpoint of the USB device. | |
| uint32_t | usb_device_ctrl_get_setup_end (uint64_t husb) |
| Get the setup end status of the control endpoint of the USB device. | |
| void | usb_device_ctrl_clear_setup_end (uint64_t husb) |
| Clear the setup end status of the control endpoint of the USB device. | |
| int | usb_device_write_data_status (uint64_t husb, uint32_t ep_type, uint32_t complete) |
| Check the write data status of an endpoint of the USB device. | |
| int | usb_device_read_data_status (uint64_t husb, uint32_t ep_type, uint32_t complete) |
| Check the read data status of an endpoint of the USB device. | |
| uint32_t | usb_device_get_read_data_ready (uint64_t husb, uint32_t ep_type) |
| Check if there is ready data to be read from an endpoint of the USB device. | |
| uint32_t | usb_device_get_write_data_ready (uint64_t husb, uint32_t ep_type) |
| Check if an endpoint of the USB device is ready to write data. | |
| uint32_t | usb_device_get_write_data_ready_fifo_empty (uint64_t husb, uint32_t ep_type) |
| Check if the FIFO of an endpoint of the USB device is empty and ready to write data. | |
| int | usb_device_iso_update_enable (uint64_t husb) |
| Enable ISO update for the USB device. | |
| void | usb_device_flush_fifo (uint64_t husb, uint32_t ep_type) |
| Flush the FIFO of an endpoint of the USB device. | |
| #define USB_BCD_VERSION 0x0110 |
| #define USB_CLASS_APP_SPEC 0xfe |
| #define USB_CLASS_AUDIO 1 |
| #define USB_CLASS_COMM 2 |
| #define USB_CLASS_DATA 10 |
| #define USB_CLASS_HID 3 |
| #define USB_CLASS_HUB 9 |
| #define USB_CLASS_MASS_STORAGE 8 |
| #define USB_CLASS_PER_INTERFACE 0 /* for DeviceClass */ |
| #define USB_CLASS_PHYSICAL 5 |
| #define USB_CLASS_PRINTER 7 |
| #define USB_CLASS_VENDOR_SPEC 0xff |
| #define USB_DESCRIPTOR_TYPE_CONFIGURATION 0x02 |
| #define USB_DESCRIPTOR_TYPE_DEVICE 0x01 |
| #define USB_DESCRIPTOR_TYPE_DEVICE_QUALIFIER 0x06 |
| #define USB_DESCRIPTOR_TYPE_ENDPOINT 0x05 |
| #define USB_DESCRIPTOR_TYPE_HID 0x21 |
| #define USB_DESCRIPTOR_TYPE_INTERFACE 0x04 |
| #define USB_DESCRIPTOR_TYPE_INTERFACE_POWER 0x08 |
| #define USB_DESCRIPTOR_TYPE_OTHER_SPEED_CONFIGURATION 0x07 |
| #define USB_DESCRIPTOR_TYPE_REPORT 0x22 |
| #define USB_DESCRIPTOR_TYPE_STRING 0x03 |
| #define USB_DEVICE_REMOTE_WAKEUP 0x01 |
| #define USB_DIR_IN 0x80 |
| #define USB_DIR_OUT 0 |
| #define USB_DT_CONFIG 0x02 |
| #define USB_DT_CONFIG_SIZE 9 |
| #define USB_DT_DEVICE 0x01 |
| #define USB_DT_DEVICE_QUALIFIER 0x06 |
| #define USB_DT_DEVICE_SIZE 18 |
| #define USB_DT_ENDPOINT 0x05 |
| #define USB_DT_ENDPOINT_AUDIO_SIZE 9 /* Audio extension */ |
| #define USB_DT_ENDPOINT_SIZE 7 |
| #define USB_DT_HID (USB_TYPE_CLASS | 0x01) |
| #define USB_DT_HID_SIZE 9 |
| #define USB_DT_HUB (USB_TYPE_CLASS | 0x09) |
| #define USB_DT_HUB_NONVAR_SIZE 7 |
| #define USB_DT_INTERFACE 0x04 |
| #define USB_DT_INTERFACE_SIZE 9 |
| #define USB_DT_PHYSICAL (USB_TYPE_CLASS | 0x03) |
| #define USB_DT_REPORT (USB_TYPE_CLASS | 0x02) |
| #define USB_DT_STRING 0x03 |
| #define USB_ENDPOINT_DIR_MASK 0x80 |
| #define USB_ENDPOINT_HALT 0x00 |
| #define USB_ENDPOINT_NUMBER_MASK 0x0f /* in bEndpointAddress */ |
| #define USB_ENDPOINT_XFER_BULK 2 |
| #define USB_ENDPOINT_XFER_CONTROL 0 |
| #define USB_ENDPOINT_XFER_INT 3 |
| #define USB_ENDPOINT_XFER_ISOC 1 |
| #define USB_ENDPOINT_XFERTYPE_MASK 0x03 /* in bmAttributes */ |
| #define USB_PID_ACK 0xd2 |
| #define USB_PID_DATA0 0xc3 |
| #define USB_PID_DATA1 0x4b |
| #define USB_PID_DATA2 0x87 /* USB 2.0 */ |
| #define USB_PID_ERR 0x3c /* USB 2.0: handshake mode */ |
| #define USB_PID_IN 0x69 |
| #define USB_PID_MDATA 0x0f /* USB 2.0 */ |
| #define USB_PID_NAK 0x5a |
| #define USB_PID_NYET 0x96 /* USB 2.0 */ |
| #define USB_PID_OUT 0xe1 |
| #define USB_PID_PING 0xb4 /* USB 2.0 */ |
| #define USB_PID_PREAMBLE 0x3c /* Token mode */ |
| #define USB_PID_SETUP 0x2d |
| #define USB_PID_SOF 0xa5 |
| #define USB_PID_SPLIT 0x78 /* USB 2.0 */ |
| #define USB_PID_STALL 0x1e |
| #define USB_PID_UNDEF_0 0xf0 |
| #define USB_RECIP_DEVICE 0x00 |
| #define USB_RECIP_ENDPOINT 0x02 |
| #define USB_RECIP_INTERFACE 0x01 |
| #define USB_RECIP_OTHER 0x03 |
| #define USB_REQ_CLEAR_FEATURE 0x01 |
| #define USB_REQ_DEVICE2HOST 0x80 |
| #define USB_REQ_DIRECTION_MASK 0x80 |
| #define USB_REQ_GET_CONFIGURATION 0x08 |
| #define USB_REQ_GET_DESCRIPTOR 0x06 |
| #define USB_REQ_GET_IDLE 0x02 |
| #define USB_REQ_GET_INTERFACE 0x0A |
| #define USB_REQ_GET_PROTOCOL 0x03 |
| #define USB_REQ_GET_REPORT 0x01 |
| #define USB_REQ_GET_STATUS 0x00 |
| #define USB_REQ_HOST2DEVICE 0x00 |
| #define USB_REQ_RECIPIENT_DEVICE 0x00 |
| #define USB_REQ_RECIPIENT_ENDPOINT 0x02 |
| #define USB_REQ_RECIPIENT_INTERFACE 0x01 |
| #define USB_REQ_RECIPIENT_MASK 0x1f |
| #define USB_REQ_RECIPIENT_OTHER 0x03 |
| #define USB_REQ_SET_ADDRESS 0x05 |
| #define USB_REQ_SET_CONFIGURATION 0x09 |
| #define USB_REQ_SET_DESCRIPTOR 0x07 |
| #define USB_REQ_SET_FEATURE 0x03 |
| #define USB_REQ_SET_IDLE 0x0A |
| #define USB_REQ_SET_INTERFACE 0x0B |
| #define USB_REQ_SET_PROTOCOL 0x0B |
| #define USB_REQ_SET_REPORT 0x09 |
| #define USB_REQ_SYNCH_FRAME 0x0C |
| #define USB_REQ_TYPE_CLASS 0x20 |
| #define USB_REQ_TYPE_MASK 0x60 |
| #define USB_REQ_TYPE_STANDARD 0x00 |
| #define USB_REQ_TYPE_VENDOR 0x40 |
| #define USB_STATUS_HALT 0x01 |
| #define USB_STATUS_REMOTEWAKEUP 0x02 |
| #define USB_STATUS_SELFPOWERED 0x01 |
| #define USB_TEST_MODE 0x02 |
| #define USB_TYPE_CLASS (0x01 << 5) |
| #define USB_TYPE_RESERVED (0x03 << 5) |
| #define USB_TYPE_STANDARD (0x00 << 5) |
| #define USB_TYPE_VENDOR (0x02 << 5) |
| #define USBD_DEVICE_DESCRIPTORS | ( | x | ) | (((unsigned int) x <= USB_DESCRIPTOR_TYPE_INTERFACE_POWER) ? usbd_device_descriptors[x] : "UNKNOWN") |
| #define USBD_DEVICE_REQUESTS | ( | x | ) | (((unsigned int) x <= USB_REQ_SYNCH_FRAME) ? usbd_device_requests[x] : "UNKNOWN") |
|
inlinestatic |
Clear the DMA transfer flag for the USB device.
| addr | The address of the USB device. |
Clear the DMA configuration for an endpoint of the USB device.
| husb | The USB device handle. |
| ep_type | The endpoint type. |
|
inlinestatic |
Configure the DMA transfer settings for the USB device.
| addr | The address of the USB device. |
| int usb_device_config_ep | ( | uint64_t | husb, |
| uint32_t | ts_type, | ||
| uint32_t | ep_type, | ||
| uint32_t | is_double_fifo, | ||
| uint32_t | ep_maxpkt | ||
| ) |
Configure an endpoint of the USB device.
| husb | The USB device handle. |
| ts_type | The transfer mode type. |
| ep_type | The endpoint type. |
| is_double_fifo | Whether to use double FIFO or not. |
| ep_maxpkt | The maximum packet size of the endpoint. |
Configure a default endpoint of the USB device.
| husb | The USB device handle. |
| ep_type | The endpoint type. |
Configure an endpoint of the USB device to use DMA.
| husb | The USB device handle. |
| ep_type | The endpoint type. |
Configure the transfer mode of the USB device.
| husb | The USB device handle. |
| ts_type | The transfer mode type. |
| speed_mode | The speed mode. |
Switch the USB device connection on or off.
| husb | The USB device handle. |
| is_on | Whether to turn the connection on (1) or off (0). |
| void usb_device_ctrl_clear_setup_end | ( | uint64_t | husb | ) |
Clear the setup end status of the control endpoint of the USB device.
| husb | The USB device handle. |
Get the setup end status of the control endpoint of the USB device.
| husb | The USB device handle. |
|
inlinestatic |
Clear the setup end flag for Endpoint 0 (EP0) of the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Clear the stall flag for Endpoint 0 (EP0) of the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Configure Endpoint 0 (EP0) for the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Configure Endpoint 0 (EP0) in default mode for the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Flushes the FIFO for endpoint 0 of the USB device.
| addr | The address of the device. |
Check if Endpoint 0 (EP0) has received data ready flag for the USB device.
| addr | The address of the USB device. |
Check if Endpoint 0 (EP0) has the setup end flag set for the USB device.
| addr | The address of the USB device. |
Check if Endpoint 0 (EP0) has the stall flag set for the USB device.
| addr | The address of the USB device. |
Check if Endpoint 0 (EP0) has write data ready flag for the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Clear the read data complete flag for Endpoint 0 (EP0) of the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Clear the read data half flag for Endpoint 0 (EP0) of the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Set the send stall flag for Endpoint 0 (EP0) of the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Set the write data complete flag for Endpoint 0 (EP0) of the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Clear the write data half flag for Endpoint 0 (EP0) of the USB device.
| addr | The address of the USB device. |
Clear the stall condition on an endpoint of the USB device.
| husb | The USB device handle. |
| ep_type | The endpoint type. |
Send a stall condition on an endpoint of the USB device.
| husb | The USB device handle. |
| ep_type | The endpoint type. |
Flush the FIFO of an endpoint of the USB device.
| husb | The USB device handle. |
| ep_type | The endpoint type. |
Get the stall status of an endpoint of the USB device.
| husb | The USB device handle. |
| ep_type | The endpoint type. |
Check if there is ready data to be read from an endpoint of the USB device.
| husb | The USB device handle. |
| ep_type | The endpoint type. |
Check if an endpoint of the USB device is ready to write data.
| husb | The USB device handle. |
| ep_type | The endpoint type. |
Check if the FIFO of an endpoint of the USB device is empty and ready to write data.
| husb | The USB device handle. |
| ep_type | The endpoint type. |
| int usb_device_iso_update_enable | ( | uint64_t | husb | ) |
Enable ISO update for the USB device.
| husb | The USB device handle. |
Query the power status of the USB device.
| husb | The USB device handle. |
Query the transfer mode of the USB device.
| husb | The USB device handle. |
Reads the rest of the data from the specified endpoint of the USB device.
| addr | The address of the usb device. |
| ep_type | The type of endpoint to read from. |
Reads half of the data from the specified endpoint of the USB device.
| addr | The address of the usb device. |
| ep_type | The type of endpoint to read from. |
Check the read data status of an endpoint of the USB device.
| husb | The USB device handle. |
| ep_type | The endpoint type. |
| complete | Whether the read operation is complete (1) or not (0). |
|
inlinestatic |
Clears the DMA configuration for the receive endpoint of the USB device.
| addr | The address of the usb device. |
|
inlinestatic |
Clears the stall on the specified endpoint of the USB device.
| addr | The address of the usb device. |
|
inlinestatic |
Configures the receive endpoint of the USB device.
| addr | The address of the usb device. |
| ts_type | The transfer type of the endpoint. |
| is_double_fifo | Flag indicating whether the endpoint has a double FIFO. |
| ep_maxpkt | The maximum packet size of the endpoint. |
|
inlinestatic |
Configure the default settings for the receive endpoint (EP) of the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Configures the DMA for the receive endpoint of the USB device.
| addr | The address of the usb device. |
|
inlinestatic |
Enable the bulk transfer type for the receive endpoint (EP) of the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Enable the interrupt transfer type for the receive endpoint (EP) of the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Enable the isochronous transfer type for the receive endpoint (EP) of the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Flushes the receive FIFO for the specified endpoint of the USB device.
| addr | The address of the usb device. |
Gets the stall status of the specified endpoint of the USB device.
| addr | The address of the usb device. |
Checks if there is data ready to be read from the receive endpoint of the USB device.
| addr | The address of the usb device. |
|
inlinestatic |
Reads the rest of the data from the receive endpoint of the USB device.
| addr | The address of the usb device. |
|
inlinestatic |
Reads half of the data from the receive endpoint of the USB device.
| addr | The address of the usb device. |
|
inlinestatic |
Sends a stall on the receive endpoint of the USB device.
| addr | The address of the usb device. |
Set the address for the USB device.
| husb | The USB device handle. |
| address | The address to set. |
| void usb_device_set_address_default | ( | uint64_t | husb | ) |
Set the default address for the USB device.
| husb | The USB device handle. |
|
inlinestatic |
Disable all transfer modes for the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Set the mode to Full Speed (FS) for the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Set the mode to High Speed (HS) for the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Set the mode to Low Speed (LS) for the USB device.
Notice: This is Fake LS, we use it as FS
| addr | The address of the USB device. |
|
inlinestatic |
Set the bulk transfer type for the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Set the control transfer type for the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Disable all transfer types for the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Set the interrupt transfer type for the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Set the ISO transfer type for the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Enable bulk transfer for the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Clear the DMA transfer flag for the transmit endpoint (EP) of the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Clear the stall signal and reset the FIFO of the transmit endpoint (EP) of the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Configure the transmit endpoint (EP) of the USB device.
| addr | The address of the USB device. |
| ts_type | The transfer type of the EP. |
| is_double_fifo | Indicates if the EP has double buffer FIFO. |
| ep_maxpkt | The maximum packet size of the EP. |
|
inlinestatic |
Configure the default settings for the transmit endpoint (EP) of the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Configure the DMA transfer settings for the transmit endpoint (EP) of the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Flushes the transmit FIFO for the specified endpoint of the USB device.
| addr | The address of the usb device. |
Check if the transmit endpoint (EP) of the USB device is stalled.
| addr | The address of the USB device. |
Check if the transmit endpoint (EP) is ready to write data for the USB device.
| addr | The address of the USB device. |
Check if the FIFO of the transmit endpoint (EP) is empty for the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Enable interrupt transfer for the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Enable ISO transfer for the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Send a stall signal and flush the FIFO of the transmit endpoint (EP) of the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Write all of the data to the transmit endpoint (EP) of the USB device.
| addr | The address of the USB device. |
|
inlinestatic |
Write half of the data to the transmit endpoint (EP) of the USB device.
| addr | The address of the USB device. |
Writes the rest of the data to the specified endpoint of the USB device.
| addr | The address of the usb device. |
| ep_type | The type of endpoint to write to. |
Writes half of the data to the specified endpoint of the USB device.
| addr | The address of the usb device. |
| ep_type | The type of endpoint to write to. |
Check the write data status of an endpoint of the USB device.
| husb | The USB device handle. |
| ep_type | The endpoint type. |
| complete | Whether the write operation is complete (1) or not (0). |