74 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 75 #if defined ( __ICCARM__ ) 76 #pragma data_alignment=4 81 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 82 #if defined ( __ICCARM__ ) 83 #pragma data_alignment=4 88 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 89 #if defined ( __ICCARM__ ) 90 #pragma data_alignment=4 95 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 96 #if defined ( __ICCARM__ ) 97 #pragma data_alignment=4 253 if ((ep_addr != 0x00) && (ep_addr != 0x80))
262 if ((ep_addr != 0x00) && (ep_addr != 0x80))
284 if ((ep_addr != 0x00) && (ep_addr != 0x80))
293 if ((ep_addr != 0x00) && (ep_addr != 0x80))
312 if ((ep_addr != 0x00) && (ep_addr != 0x80))
321 if ((ep_addr & 0x80)== 0x80)
325 USBD_ep_status = 0x0001;
329 USBD_ep_status = 0x0000;
332 else if ((ep_addr & 0x80)== 0x00)
336 USBD_ep_status = 0x0001;
341 USBD_ep_status = 0x0000;
345 (uint8_t *)&USBD_ep_status,
386 #ifdef USB_OTG_HS_CORE 398 switch ((uint8_t)(req->
wValue))
425 #ifdef USB_SUPPORT_USER_STRING_DESC 435 #ifdef USB_OTG_HS_CORE 460 #ifdef USB_OTG_HS_CORE 484 if((len != 0)&& (req->
wLength != 0))
510 dev_addr = (uint8_t)(req->
wValue) & 0x7F;
549 static uint8_t cfgidx;
551 cfgidx = (uint8_t)(req->
wValue);
629 (uint8_t *)&USBD_default_cfg,
664 #ifdef USBD_SELF_POWERED 667 USBD_cfg_status = 0x00;
676 (uint8_t *)&USBD_cfg_status,
699 uint8_t test_mode = 0;
709 ((req->
wIndex & 0xFF) == 0))
713 test_mode = req->
wIndex >> 8;
825 unicode[idx++] = *len;
828 while (*desc !=
NULL) {
829 unicode[idx++] = *desc++;
830 unicode[idx++] = 0x00;
845 while (*buf !=
NULL) {
uint8_t * pConfig_descriptor
USBD_Status USBD_StdItfReq(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_StdItfReq Handle standard usb interface requests.
header file for the usbd_req.c file
#define USB_LEN_DEV_QUALIFIER_DESC
#define USBD_IDX_CONFIG_STR
static void USBD_GetStatus(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_GetStatus Handle Get Status request.
void USB_OTG_EP0_OutStart(USB_OTG_CORE_HANDLE *pdev)
configures EPO to receive SETUP packets
#define USB_DESC_TYPE_DEVICE_QUALIFIER
#define USB_OTG_EP0_SETUP
#define USB_REQ_SET_ADDRESS
USBD_Status USBD_CtlSendData(USB_OTG_CORE_HANDLE *pdev, const uint8_t *pbuf, uint16_t len)
USBD_CtlSendData send data on the ctl pipe.
uint8_t setup_packet[8 *3]
#define USB_CONFIG_REMOTE_WAKEUP
#define USB_REQ_GET_STATUS
__ALIGN_BEGIN uint32_t USBD_ep_status __ALIGN_END
static void USBD_GetDescriptor(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_GetDescriptor Handle Get Descriptor requests.
USBD_Status USBD_ClrCfg(USB_OTG_CORE_HANDLE *pdev, uint8_t cfgidx)
USBD_ClrCfg Clear current configuration.
#define USB_FEATURE_EP_HALT
__IO USB_OTG_DCTL_TypeDef SET_TEST_MODE
#define USBD_IDX_PRODUCT_STR
#define USB_REQ_SET_FEATURE
#define USB_REQ_SET_CONFIGURATION
#define USBD_IDX_SERIAL_STR
#define USB_OTG_SPEED_FULL
uint8_t *(* GetLangIDStrDescriptor)(uint8_t speed, uint16_t *length)
#define USB_OTG_SPEED_HIGH
USB_OTG_EP in_ep[USB_OTG_MAX_TX_FIFOS]
#define USBD_IDX_LANGID_STR
uint8_t *(* GetConfigurationStrDescriptor)(uint8_t speed, uint16_t *length)
uint8_t USBD_StrDesc[USB_MAX_STR_DESC_SIZ]
#define USB_MAX_STR_DESC_SIZ
void USBD_ParseSetupRequest(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_ParseSetupRequest Copy buffer into setup structure.
uint8_t *(* GetProductStrDescriptor)(uint8_t speed, uint16_t *length)
#define USB_OTG_READ_REG32(reg)
struct _USB_OTG_DCTL_TypeDef::@66 b
static void USBD_SetAddress(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_SetAddress Set device address.
#define USB_REQ_GET_DESCRIPTOR
static uint8_t USBD_GetLen(const uint8_t *buf)
USBD_GetLen return the string length.
uint8_t *(* GetConfigDescriptor)(uint8_t speed, uint16_t *length)
#define USB_FEATURE_REMOTE_WAKEUP
#define USB_OTG_ADDRESSED
uint8_t *(* GetSerialStrDescriptor)(uint8_t speed, uint16_t *length)
const USBD_DEVICE * usr_device
void USBD_CtlError(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_CtlError Handle USB low level Error.
uint32_t DCD_EP_Stall(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
Stall an endpoint.
header file for the usbd_ioreq.c file
uint8_t *(* GetManufacturerStrDescriptor)(uint8_t speed, uint16_t *length)
uint8_t *(* GetDeviceDescriptor)(uint8_t speed, uint16_t *length)
#define USB_REQ_CLEAR_FEATURE
static void USBD_GetConfig(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_GetConfig Handle Get device configuration request.
USB_OTG_EP out_ep[USB_OTG_MAX_TX_FIFOS]
#define USB_FEATURE_TEST_MODE
#define USB_REQ_GET_CONFIGURATION
uint8_t *(* GetInterfaceStrDescriptor)(uint8_t speed, uint16_t *length)
#define USBD_IDX_INTERFACE_STR
const uint8_t USBD_DeviceQualifierDesc[USB_LEN_DEV_QUALIFIER_DESC]
USBD_Status USBD_CtlSendStatus(USB_OTG_CORE_HANDLE *pdev)
USBD_CtlSendStatus send zero lzngth packet on the ctl pipe.
static void USBD_ClrFeature(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_ClrFeature Handle clear device feature request.
const USBD_Class_cb_TypeDef * class_cb
void USBD_GetString(const uint8_t *desc, uint8_t *unicode, uint16_t *len)
USBD_GetString Convert Ascii string into unicode one.
static void USBD_SetFeature(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_SetFeature Handle Set device feature request.
#define USB_OTG_CONFIGURED
#define USB_DESC_TYPE_OTHER_SPEED_CONFIGURATION
USBD_Status USBD_SetCfg(USB_OTG_CORE_HANDLE *pdev, uint8_t cfgidx)
USBD_SetCfg Configure device and start the interface.
#define USB_DESC_TYPE_CONFIGURATION
void DCD_EP_SetAddress(USB_OTG_CORE_HANDLE *pdev, uint8_t address)
This Function set USB device address.
#define USB_DESC_TYPE_DEVICE
uint8_t(* Setup)(void *pdev, USB_SETUP_REQ *req)
USBD_Status USBD_StdEPReq(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_StdEPReq Handle standard usb endpoint requests.
#define USB_DESC_TYPE_STRING
#define USB_CONFIG_SELF_POWERED
USBD_Status USBD_StdDevReq(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_StdDevReq Handle standard usb device requests.
header file for the usbd_desc.c file
uint32_t DCD_EP_ClrStall(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
Clear stall condition on endpoints.
static void USBD_SetConfig(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_SetConfig Handle Set device configuration request.