54 #include "common/utils.h" 132 #ifdef USB_OTG_HS_CORE 137 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 138 #if defined ( __ICCARM__ ) 139 #pragma data_alignment=4 144 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 145 #if defined ( __ICCARM__ ) 146 #pragma data_alignment=4 151 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 152 #if defined ( __ICCARM__ ) 153 #pragma data_alignment=4 158 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 159 #if defined ( __ICCARM__ ) 160 #pragma data_alignment=4 213 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 214 #if defined ( __ICCARM__ ) 215 #pragma data_alignment=4 234 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 235 #if defined ( __ICCARM__ ) 236 #pragma data_alignment=4 319 uint8_t *pbuf =
NULL;
327 USBD_HID_Protocol = (uint8_t)(req->
wValue);
332 (uint8_t *)&USBD_HID_Protocol,
337 USBD_HID_IdleState = (uint8_t)(req->
wValue >> 8);
342 (uint8_t *)&USBD_HID_IdleState,
359 pbuf = HID_MOUSE_ReportDesc;
364 #ifdef USB_OTG_HS_INTERNAL_DMA_ENABLED 365 pbuf = USBD_HID_Desc;
367 pbuf = USBD_HID_CfgDesc + 0x12;
384 (uint8_t *)&USBD_HID_AltSet,
389 USBD_HID_AltSet = (uint8_t)(req->
wValue);
393 USBD_HID_AltSet = (uint8_t)(req->
wValue);
400 (uint8_t *)&USBD_HID_AltSet,
435 *length =
sizeof (USBD_HID_CfgDesc);
436 return USBD_HID_CfgDesc;
465 uint32_t polling_interval = 0;
482 return ((uint32_t)(polling_interval));
void USBD_CtlError(USB_OTG_CORE_HANDLE *pdev, USB_SETUP_REQ *req)
USBD_CtlError Handle USB low level Error.
#define USB_REQ_TYPE_STANDARD
header file for the usbd_req.c file
uint32_t DCD_EP_Tx(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint8_t *pbuf, uint32_t buf_len)
Transmit data over USB.
uint32_t DCD_EP_Close(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr)
called when an EP is disabled
uint8_t USBD_HID_Setup(void *pdev, USB_SETUP_REQ *req)
USBD_HID_Setup Handle the HID specific requests.
#define USB_REQ_TYPE_CLASS
USBD_Status USBD_CtlSendData(USB_OTG_CORE_HANDLE *pdev, uint8_t *buf, uint16_t len)
USBD_CtlSendData send data on the ctl pipe.
#define USB_REQ_SET_INTERFACE
#define USB_REQ_GET_INTERFACE
uint32_t DCD_EP_Flush(USB_OTG_CORE_HANDLE *pdev, uint8_t epnum)
This Function flushes the FIFOs.
static uint8_t * USBD_HID_GetCfgDesc(uint8_t speed, uint16_t *length)
USBD_HID_GetCfgDesc return configuration descriptor.
USBD_Class_cb_TypeDef USBD_HID_cb
header file for the usbd_hid_core.c file.
#define HID_REQ_SET_PROTOCOL
#define USB_CONFIGURATION_DESCRIPTOR_TYPE
#define USB_OTG_SPEED_HIGH
uint8_t USBD_HID_DeInit(void *pdev, uint8_t cfgidx)
USBD_HID_Init DeInitialize the HID layer.
uint32_t DCD_EP_Open(USB_OTG_CORE_HANDLE *pdev, uint8_t ep_addr, uint16_t ep_mps, uint8_t ep_type)
Configure an EP.
#define USB_INTERFACE_DESCRIPTOR_TYPE
#define USB_REQ_GET_DESCRIPTOR
uint8_t USBD_HID_Init(void *pdev, uint8_t cfgidx)
USBD_HID_Init Initialize the HID interface.
uint8_t USBD_HID_DataIn(void *pdev, uint8_t epnum)
USBD_HID_DataIn handle data IN Stage.
static __ALIGN_BEGIN uint32_t USBD_HID_AltSet __ALIGN_END
#define HID_REQ_GET_PROTOCOL
uint8_t USBD_HID_SendReport(USB_OTG_CORE_HANDLE *pdev, uint8_t *report, uint16_t len)
USBD_HID_SendReport Send HID Report.
#define USB_HID_CONFIG_DESC_SIZ
#define HID_DESCRIPTOR_TYPE
uint32_t USBD_HID_GetPollingInterval(USB_OTG_CORE_HANDLE *pdev)
USBD_HID_GetPollingInterval return polling interval from endpoint descriptor.
#define USB_ENDPOINT_DESCRIPTOR_TYPE
#define HID_MOUSE_REPORT_DESC_SIZE
#define USB_OTG_CONFIGURED
#define USB_REQ_TYPE_MASK
header file for the usbd_desc.c file