AM261x MCU+ SDK  11.00.00
ep0.c File Reference

Functions

static void dwc_usb3_do_setup (volatile dwc_usb3_pcd_t *pcd)
 This routine processes SETUP commands. The USB Command processing is done in two places - the first being the PCD and the second being the Gadget driver (for example, the File-Backed Storage Gadget driver). More...
 
static void ep0_do_stall (volatile dwc_usb3_pcd_t *pcd, int err_val)
 This routine stalls EP0. More...
 
static void do_clear_halt (volatile dwc_usb3_pcd_t *pcd, volatile dwc_usb3_pcd_ep_t *ep)
 Clear the EP halt (STALL), and if there are pending requests start the transfer. More...
 
static void do_get_status (volatile dwc_usb3_pcd_t *pcd)
 This routine processes the GET_STATUS Setup Commands. More...
 
static void do_clear_feature (volatile dwc_usb3_pcd_t *pcd)
 This routine processes the CLEAR_FEATURE Setup Commands. More...
 
static void do_set_feature (volatile dwc_usb3_pcd_t *pcd)
 This routine processes the SET_FEATURE Setup Commands. More...
 
static void do_set_address (volatile dwc_usb3_pcd_t *pcd)
 This routine processes the SET_ADDRESS Setup Commands. More...
 
static void do_get_descriptor (volatile dwc_usb3_pcd_t *pcd)
 This routine handles the Get Descriptor request for the BOS descriptor and the OTG descriptor, and passes all other requests to the Gadget driver. More...
 
static void ep0_continue_transfer (volatile dwc_usb3_pcd_t *pcd, volatile dwc_usb3_pcd_req_t *req)
 This routine continues control IN transfers started by ep0_start_transfer, when the transfer does not fit in a single request. More...
 
static int ep0_complete_request (volatile dwc_usb3_pcd_t *pcd, volatile dwc_usb3_pcd_req_t *req, dwc_usb3_dma_desc_t *desc, int status)
 This routine completes the ep0 control transfer. More...
 
static void setup_in_status_phase (volatile dwc_usb3_pcd_t *pcd, void *buf, dwc_dma_t dma)
 This routine starts the Zero-Length Packet for the IN status phase of a control write transfer. More...
 
static void setup_out_status_phase (volatile dwc_usb3_pcd_t *pcd, void *buf, dwc_dma_t dma)
 This routine starts the Zero-Length Packet for the OUT status phase of a control read transfer. More...
 
static void dwc_usb3_handle_ep0 (volatile dwc_usb3_pcd_t *pcd, volatile dwc_usb3_pcd_req_t *req, u32 event)
 This routine handles EP0 Control transfers. More...
 
void dwc_usb3_pcd_ep0_data_stage (volatile dwc_usb3_pcd_t *pcd, int length)
 This routine starts the data stage of a 3-stage control command. pcd->ep0state must be set to EP0_OUT_DATA_PHASE or EP0_IN_DATA_PHASE, and pcd->ep0->dwc_ep.is_in must be set to 0 or 1 before calling this routine. For IN, the data to be sent must be placed in pcd->ep0_status_buf before the call. More...
 
void dwc_usb3_handle_ep0_xfer (volatile dwc_usb3_pcd_t *pcd, u32 event)
 This routine handles EP0 transfers. More...
 

Variables

static const usb_dev_cap_20_ext_desc_t cap1_desc
 
static const usb_dev_cap_ss_usb_t cap2_desc
 
static const wusb_bos_desc_t bos_desc
 

Variable Documentation

◆ cap1_desc

◆ cap2_desc

◆ bos_desc

const wusb_bos_desc_t bos_desc
static
Initial value:
= {
sizeof(wusb_bos_desc_t),
+ sizeof(cap1_desc) + sizeof(cap2_desc)),
2,
}
UCONSTW
#define UCONSTW(x)
Definition: usb.h:63
usb_dev_cap_ss_usb_t
Definition: usb.h:859
USB_DC_SS_USB_SPEED_SUPPORT_FULL
#define USB_DC_SS_USB_SPEED_SUPPORT_FULL
Definition: usb.h:866
USB_20_EXT_LPM
#define USB_20_EXT_LPM
Definition: usb.h:847
USB_DC_SS_USB_SPEED_SUPPORT_SS
#define USB_DC_SS_USB_SPEED_SUPPORT_SS
Definition: usb.h:868
wusb_bos_desc_t
Definition: usb.h:835
cap1_desc
static const usb_dev_cap_20_ext_desc_t cap1_desc
Definition: ep0.c:48
USB_DC_SS_USB_SPEED_SUPPORT_HIGH
#define USB_DC_SS_USB_SPEED_SUPPORT_HIGH
Definition: usb.h:867
UDESC_DEVICE_CAPABILITY
#define UDESC_DEVICE_CAPABILITY
Definition: usb.h:186
UCONSTDW
#define UCONSTDW(x)
Definition: usb.h:64
usb_dev_cap_20_ext_desc_t
Definition: usb.h:843
USB_DEVICE_CAPABILITY_SS_USB
#define USB_DEVICE_CAPABILITY_SS_USB
Definition: usb.h:858
cap2_desc
static const usb_dev_cap_ss_usb_t cap2_desc
Definition: ep0.c:55
WUDESC_BOS
#define WUDESC_BOS
Definition: usb.h:182
USB_DEVICE_CAPABILITY_20_EXTENSION
#define USB_DEVICE_CAPABILITY_20_EXTENSION
Definition: usb.h:842