3#ifndef __USB_DEVICE_H__
4#define __USB_DEVICE_H__
17#define USB_CLASS_PER_INTERFACE 0
18#define USB_CLASS_AUDIO 1
19#define USB_CLASS_COMM 2
20#define USB_CLASS_HID 3
21#define USB_CLASS_PHYSICAL 5
22#define USB_CLASS_PRINTER 7
23#define USB_CLASS_MASS_STORAGE 8
24#define USB_CLASS_HUB 9
25#define USB_CLASS_DATA 10
26#define USB_CLASS_APP_SPEC 0xfe
27#define USB_CLASS_VENDOR_SPEC 0xff
32#define USB_TYPE_STANDARD (0x00 << 5)
33#define USB_TYPE_CLASS (0x01 << 5)
34#define USB_TYPE_VENDOR (0x02 << 5)
35#define USB_TYPE_RESERVED (0x03 << 5)
40#define USB_RECIP_DEVICE 0x00
41#define USB_RECIP_INTERFACE 0x01
42#define USB_RECIP_ENDPOINT 0x02
43#define USB_RECIP_OTHER 0x03
49#define USB_DIR_IN 0x80
54#define USB_DT_DEVICE 0x01
55#define USB_DT_CONFIG 0x02
56#define USB_DT_STRING 0x03
57#define USB_DT_INTERFACE 0x04
58#define USB_DT_ENDPOINT 0x05
59#define USB_DT_DEVICE_QUALIFIER 0x06
61#if defined(CONFIG_USBD_HS)
62#define USB_DT_QUAL 0x06
65#define USB_DT_HID (USB_TYPE_CLASS | 0x01)
66#define USB_DT_REPORT (USB_TYPE_CLASS | 0x02)
67#define USB_DT_PHYSICAL (USB_TYPE_CLASS | 0x03)
68#define USB_DT_HUB (USB_TYPE_CLASS | 0x09)
73#define USB_DT_DEVICE_SIZE 18
74#define USB_DT_CONFIG_SIZE 9
75#define USB_DT_INTERFACE_SIZE 9
76#define USB_DT_ENDPOINT_SIZE 7
77#define USB_DT_ENDPOINT_AUDIO_SIZE 9
78#define USB_DT_HUB_NONVAR_SIZE 7
79#define USB_DT_HID_SIZE 9
84#define USB_ENDPOINT_NUMBER_MASK 0x0f
85#define USB_ENDPOINT_DIR_MASK 0x80
87#define USB_ENDPOINT_XFERTYPE_MASK 0x03
88#define USB_ENDPOINT_XFER_CONTROL 0
89#define USB_ENDPOINT_XFER_ISOC 1
90#define USB_ENDPOINT_XFER_BULK 2
91#define USB_ENDPOINT_XFER_INT 3
96#define USB_PID_UNDEF_0 0xf0
97#define USB_PID_OUT 0xe1
98#define USB_PID_ACK 0xd2
99#define USB_PID_DATA0 0xc3
100#define USB_PID_PING 0xb4
101#define USB_PID_SOF 0xa5
102#define USB_PID_NYET 0x96
103#define USB_PID_DATA2 0x87
104#define USB_PID_SPLIT 0x78
105#define USB_PID_IN 0x69
106#define USB_PID_NAK 0x5a
107#define USB_PID_DATA1 0x4b
108#define USB_PID_PREAMBLE 0x3c
109#define USB_PID_ERR 0x3c
110#define USB_PID_SETUP 0x2d
111#define USB_PID_STALL 0x1e
112#define USB_PID_MDATA 0x0f
117#define USB_REQ_GET_STATUS 0x00
118#define USB_REQ_CLEAR_FEATURE 0x01
119#define USB_REQ_SET_FEATURE 0x03
120#define USB_REQ_SET_ADDRESS 0x05
121#define USB_REQ_GET_DESCRIPTOR 0x06
122#define USB_REQ_SET_DESCRIPTOR 0x07
123#define USB_REQ_GET_CONFIGURATION 0x08
124#define USB_REQ_SET_CONFIGURATION 0x09
125#define USB_REQ_GET_INTERFACE 0x0A
126#define USB_REQ_SET_INTERFACE 0x0B
127#define USB_REQ_SYNCH_FRAME 0x0C
129#define USBD_DEVICE_REQUESTS(x) (((unsigned int) x <= USB_REQ_SYNCH_FRAME) ? usbd_device_requests[x] : "UNKNOWN")
134#define USB_REQ_GET_REPORT 0x01
135#define USB_REQ_GET_IDLE 0x02
136#define USB_REQ_GET_PROTOCOL 0x03
137#define USB_REQ_SET_REPORT 0x09
138#define USB_REQ_SET_IDLE 0x0A
139#define USB_REQ_SET_PROTOCOL 0x0B
145#if defined(CONFIG_USBD_HS)
146#define USB_BCD_VERSION 0x0200
148#define USB_BCD_VERSION 0x0110
155#define USB_REQ_DIRECTION_MASK 0x80
156#define USB_REQ_TYPE_MASK 0x60
157#define USB_REQ_RECIPIENT_MASK 0x1f
159#define USB_REQ_DEVICE2HOST 0x80
160#define USB_REQ_HOST2DEVICE 0x00
162#define USB_REQ_TYPE_STANDARD 0x00
163#define USB_REQ_TYPE_CLASS 0x20
164#define USB_REQ_TYPE_VENDOR 0x40
166#define USB_REQ_RECIPIENT_DEVICE 0x00
167#define USB_REQ_RECIPIENT_INTERFACE 0x01
168#define USB_REQ_RECIPIENT_ENDPOINT 0x02
169#define USB_REQ_RECIPIENT_OTHER 0x03
175#define USB_STATUS_SELFPOWERED 0x01
176#define USB_STATUS_REMOTEWAKEUP 0x02
178#define USB_STATUS_HALT 0x01
184#define USB_DESCRIPTOR_TYPE_DEVICE 0x01
185#define USB_DESCRIPTOR_TYPE_CONFIGURATION 0x02
186#define USB_DESCRIPTOR_TYPE_STRING 0x03
187#define USB_DESCRIPTOR_TYPE_INTERFACE 0x04
188#define USB_DESCRIPTOR_TYPE_ENDPOINT 0x05
189#define USB_DESCRIPTOR_TYPE_DEVICE_QUALIFIER 0x06
190#define USB_DESCRIPTOR_TYPE_OTHER_SPEED_CONFIGURATION 0x07
191#define USB_DESCRIPTOR_TYPE_INTERFACE_POWER 0x08
192#define USB_DESCRIPTOR_TYPE_HID 0x21
193#define USB_DESCRIPTOR_TYPE_REPORT 0x22
195#define USBD_DEVICE_DESCRIPTORS(x) (((unsigned int) x <= USB_DESCRIPTOR_TYPE_INTERFACE_POWER) ? usbd_device_descriptors[x] : "UNKNOWN")
200#define USB_ENDPOINT_HALT 0x00
201#define USB_DEVICE_REMOTE_WAKEUP 0x01
202#define USB_TEST_MODE 0x02
458 reg_val &= ~(1 << 24);
471 reg_val |= (1 << 24);
493 if (is_double_fifo) {
500 reg_val &= ~(0x1fff);
703 if (is_double_fifo) {
710 reg_val &= ~(0x1fff);
u64_t uint64_t
Definition stdint.h:16
u32_t uint32_t
Definition stdint.h:13
u8_t uint8_t
Definition stdint.h:7
u16_t uint16_t
Definition stdint.h:10
#define writew(val, addr)
Write a 16-bit word value to the specified address.
Definition io.h:81
#define writeb(val, addr)
Write a byte value to the specified address.
Definition io.h:66
#define readb(addr)
Read a byte from the specified address.
Definition io.h:58
#define readw(addr)
Read a 16-bit word from the specified address.
Definition io.h:73
#define writel(val, addr)
Write a 32-bit double word value to the specified address.
Definition io.h:96
#define readl(addr)
Read a 32-bit double word from the specified address.
Definition io.h:88
#define USBC_BP_CSR0_D_SERVICED_SETUP_END
Definition reg-usb.h:329
#define USBC_BP_TXCSR_D_CLEAR_DATA_TOGGLE
Definition reg-usb.h:365
#define USBC_BP_RXCSR_D_FLUSH_FIFO
Definition reg-usb.h:410
#define USBC_BP_CSR0_D_SEND_STALL
Definition reg-usb.h:331
#define USBC_BP_TXCSR_D_FIFO_NOT_EMPTY
Definition reg-usb.h:370
#define USBC_BP_POWER_D_ISO_UPDATE_EN
Definition reg-usb.h:242
#define USBC_REG_PCTL(usbc_base_addr)
Definition reg-usb.h:109
#define USBC_BP_TXMAXP_PACKET_COUNT
Definition reg-usb.h:312
#define USBC_BP_CSR0_D_SETUP_END
Definition reg-usb.h:332
#define USBC_BP_RXCSR_D_AUTO_CLEAR
Definition reg-usb.h:400
#define USBC_BP_RXCSR_D_SENT_STALL
Definition reg-usb.h:408
#define USBC_BP_RXCSR_D_DATA_ERROR
Definition reg-usb.h:411
#define USBC_REG_TXMAXP(usbc_base_addr)
Definition reg-usb.h:119
#define USBC_REG_o_PCTL
Definition reg-usb.h:22
#define USBC_BP_TXCSR_D_DMA_REQ_EN
Definition reg-usb.h:361
#define USBC_BP_RXCSR_D_RX_PKT_READY
Definition reg-usb.h:414
#define USBC_BP_TXCSR_D_UNDER_RUN
Definition reg-usb.h:369
#define USBC_BP_CSR0_D_DATA_END
Definition reg-usb.h:333
#define USBC_BP_RXCSR_D_DMA_REQ_MODE
Definition reg-usb.h:404
#define USBC_BP_CSR0_D_FLUSH_FIFO
Definition reg-usb.h:328
#define USBC_REG_TXCSR(usbc_base_addr)
Definition reg-usb.h:122
#define USBC_BP_TXCSR_D_MODE
Definition reg-usb.h:360
#define USBC_BP_CSR0_D_RX_PKT_READY
Definition reg-usb.h:336
#define USBC_BP_CSR0_D_SERVICED_RX_PKT_READY
Definition reg-usb.h:330
#define USBC_BP_RXMAXP_PACKET_COUNT
Definition reg-usb.h:374
#define USBC_BP_CSR0_D_TX_PKT_READY
Definition reg-usb.h:335
#define USBC_BP_TXCSR_D_FLUSH_FIFO
Definition reg-usb.h:368
#define USBC_EP_TYPE_EP0
Definition reg-usb.h:529
#define USBC_BP_TXCSR_D_AUTOSET
Definition reg-usb.h:358
#define USBC_REG_RXMAXP(usbc_base_addr)
Definition reg-usb.h:124
#define USBC_EP_TYPE_TX
Definition reg-usb.h:530
#define USBC_BP_RXCSR_D_CLEAR_DATA_TOGGLE
Definition reg-usb.h:407
#define USBC_BP_TXCSR_D_DMA_REQ_MODE
Definition reg-usb.h:363
#define USBC_REG_RXCSR(usbc_base_addr)
Definition reg-usb.h:125
#define USBC_TS_TYPE_BULK
Definition reg-usb.h:509
#define USBC_BP_POWER_D_HIGH_SPEED_EN
Definition reg-usb.h:244
#define USBC_EP_TYPE_RX
Definition reg-usb.h:531
#define USBC_BP_RXCSR_D_SEND_STALL
Definition reg-usb.h:409
#define USBC_BP_TXCSR_D_ISO
Definition reg-usb.h:359
#define USBC_TS_TYPE_ISO
Definition reg-usb.h:507
#define USBC_TS_TYPE_INT
Definition reg-usb.h:508
#define USBC_BP_RXCSR_D_OVERRUN
Definition reg-usb.h:412
#define USBC_BP_TXCSR_D_SENT_STALL
Definition reg-usb.h:366
#define USBC_BP_TXCSR_D_TX_READY
Definition reg-usb.h:371
#define USBC_BP_TXCSR_D_SEND_STALL
Definition reg-usb.h:367
#define USBC_REG_CSR0(usbc_base_addr)
Definition reg-usb.h:121
#define USBC_BP_RXCSR_D_DMA_REQ_EN
Definition reg-usb.h:402
#define USBC_BP_RXCSR_D_ISO
Definition reg-usb.h:401
#define USBC_BP_CSR0_D_SENT_STALL
Definition reg-usb.h:334
#define usb_clear_bit16(bp, reg)
Definition usb.h:182
#define usb_set_bit16(bp, reg)
Definition usb.h:178
#define usb_get_bit16(bp, reg)
Definition usb.h:174
#define usb_set_bit8(bp, reg)
Definition usb.h:177
#define usb_clear_bit8(bp, reg)
Definition usb.h:181
static void usb_device_rx_send_stall(uint32_t addr)
Sends a stall on the receive endpoint of the USB device.
Definition usb_device.h:915
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.
Definition usb_device.h:696
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.
Definition usb_device.h:836
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.
Definition usb_device.h:312
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.
Definition usb_device.h:769
int usb_device_clear_ep_dma(uint64_t husb, uint32_t ep_type)
Clear the DMA configuration for an endpoint of the USB device.
Definition usb_device.c:208
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.
Definition usb_device.h:543
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.
Definition usb_device.h:579
static void usb_device_transfer_type_ctrl(uint32_t addr)
Set the control transfer type for the USB device.
Definition usb_device.h:218
static void usb_device_transfer_type_int(uint32_t addr)
Set the interrupt transfer type for the USB device.
Definition usb_device.h:236
static void usb_device_transfer_type_default(uint32_t addr)
Disable all transfer types for the USB device.
Definition usb_device.h:209
static void usb_device_transfer_mode_ls(uint32_t addr)
Set the mode to Low Speed (LS) for the USB device.
Definition usb_device.h:283
int usb_device_config_ep_dma(uint64_t husb, uint32_t ep_type)
Configure an endpoint of the USB device to use DMA.
Definition usb_device.c:180
static void usb_device_ep0_send_stall(uint32_t addr)
Set the send stall flag for Endpoint 0 (EP0) of the USB device.
Definition usb_device.h:377
static void usb_device_config_dma_trans(uint32_t addr)
Configure the DMA transfer settings for the USB device.
Definition usb_device.h:467
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.
Definition usb_device.h:621
static void usb_device_ep0_clear_stall(uint32_t addr)
Clear the stall flag for Endpoint 0 (EP0) of the USB device.
Definition usb_device.h:386
static void usb_device_rx_read_data_half(uint32_t addr)
Reads half of the data from the receive endpoint of the USB device.
Definition usb_device.h:778
static void usb_device_transfer_mode_default(uint32_t addr)
Disable all transfer modes for the USB device.
Definition usb_device.h:254
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.
Definition usb_device.c:364
static uint32_t usb_device_rx_get_ep_stall(uint32_t addr)
Gets the stall status of the specified endpoint of the USB device.
Definition usb_device.h:925
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.
Definition usb_device.c:413
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.
Definition usb_device.c:350
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.
Definition usb_device.h:526
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.
Definition usb_device.h:368
static void usb_device_rx_clear_stall(uint32_t addr)
Clears the stall on the specified endpoint of the USB device.
Definition usb_device.h:934
static void usb_device_tx_bulk_ep_enable(uint32_t addr)
Enable bulk transfer for the USB device.
Definition usb_device.h:433
int usb_device_iso_update_enable(uint64_t husb)
Enable ISO update for the USB device.
Definition usb_device.c:437
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.
Definition usb_device.h:340
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.
Definition usb_device.h:607
static void usb_device_transfer_type_iso(uint32_t addr)
Set the ISO transfer type for the USB device.
Definition usb_device.h:227
void usb_device_connect_switch(uint64_t husb, uint32_t is_on)
Switch the USB device connection on or off.
Definition usb_device.c:101
int usb_device_ep_send_stall(uint64_t husb, uint32_t ep_type)
Send a stall condition on an endpoint of the USB device.
Definition usb_device.c:263
void usb_device_ctrl_clear_setup_end(uint64_t husb)
Clear the setup end status of the control endpoint of the USB device.
Definition usb_device.c:327
static void usb_device_ep0_config_ep0_default(uint32_t addr)
Configure Endpoint 0 (EP0) in default mode for the USB device.
Definition usb_device.h:293
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.
Definition usb_device.h:593
uint32_t usb_device_query_transfer_mode(uint64_t husb)
Query the transfer mode of the USB device.
Definition usb_device.c:39
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.
Definition usb_device.h:358
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.
Definition usb_device.c:53
static void usb_device_rx_clear_ep_dma(uint32_t addr)
Clears the DMA configuration for the receive endpoint of the USB device.
Definition usb_device.h:752
static void usb_device_rx_config_ep_dma(uint32_t addr)
Configures the DMA for the receive endpoint of the USB device.
Definition usb_device.h:736
static void usb_device_rx_config_ep_default(uint32_t addr)
Configure the default settings for the receive endpoint (EP) of the USB device.
Definition usb_device.h:680
static void usb_device_transfer_mode_hs(uint32_t addr)
Set the mode to High Speed (HS) for the USB device.
Definition usb_device.h:263
static void usb_device_tx_config_ep_default(uint32_t addr)
Configure the default settings for the transmit endpoint (EP) of the USB device.
Definition usb_device.h:442
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.
Definition usb_device.c:336
static void usb_device_transfer_mode_fs(uint32_t addr)
Set the mode to Full Speed (FS) for the USB device.
Definition usb_device.h:272
uint32_t usb_device_query_power_status(uint64_t husb)
Query the power status of the USB device.
Definition usb_device.c:115
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.
Definition usb_device.c:389
static uint32_t usb_device_tx_get_ep_stall(uint32_t addr)
Check if the transmit endpoint (EP) of the USB device is stalled.
Definition usb_device.h:631
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.
Definition usb_device.h:331
static void usb_device_transfer_type_bulk(uint32_t addr)
Set the bulk transfer type for the USB device.
Definition usb_device.h:245
static void usb_device_ep0_flush_fifo(uint32_t addr)
Flushes the FIFO for endpoint 0 of the USB device.
Definition usb_device.h:944
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.
Definition usb_device.h:653
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.
Definition usb_device.h:671
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.
Definition usb_device.h:812
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.
Definition usb_device.c:126
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.
Definition usb_device.h:349
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.
Definition usb_device.h:794
static void usb_device_ep0_clear_setup_end(uint32_t addr)
Clear the setup end flag for Endpoint 0 (EP0) of the USB device.
Definition usb_device.h:406
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.
Definition usb_device.h:483
static void usb_device_tx_int_ep_enable(uint32_t addr)
Enable interrupt transfer for the USB device.
Definition usb_device.h:424
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.
Definition usb_device.h:322
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.
Definition usb_device.h:662
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.
Definition usb_device.h:890
static void usb_device_tx_flush_fifo(uint32_t addr)
Flushes the transmit FIFO for the specified endpoint of the USB device.
Definition usb_device.h:953
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.
Definition usb_device.h:863
int usb_device_config_ep_default(uint64_t husb, uint32_t ep_type)
Configure a default endpoint of the USB device.
Definition usb_device.c:153
static void usb_device_rx_flush_fifo(uint32_t addr)
Flushes the receive FIFO for the specified endpoint of the USB device.
Definition usb_device.h:962
static void usb_device_tx_iso_ep_enable(uint32_t addr)
Enable ISO transfer for the USB device.
Definition usb_device.h:415
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.
Definition usb_device.h:397
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.
Definition usb_device.h:564
uint32_t usb_device_ctrl_get_setup_end(uint64_t husb)
Get the setup end status of the control endpoint of the USB device.
Definition usb_device.c:317
void usb_device_flush_fifo(uint64_t husb, uint32_t ep_type)
Flush the FIFO of an endpoint of the USB device.
Definition usb_device.c:448
static void usb_device_ep0_config_ep0(uint32_t addr)
Configure Endpoint 0 (EP0) for the USB device.
Definition usb_device.h:302
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.
Definition usb_device.h:640
void usb_device_set_address_default(uint64_t husb)
Set the default address for the USB device.
Definition usb_device.c:19
int usb_device_get_ep_stall(uint64_t husb, uint32_t ep_type)
Get the stall status of an endpoint of the USB device.
Definition usb_device.c:236
static void usb_device_clear_dma_trans(uint32_t addr)
Clear the DMA transfer flag for the USB device.
Definition usb_device.h:454
void usb_device_set_address(uint64_t husb, uint8_t address)
Set the address for the USB device.
Definition usb_device.c:29
int usb_device_ep_clear_stall(uint64_t husb, uint32_t ep_type)
Clear the stall condition on an endpoint of the USB device.
Definition usb_device.c:290