2 ******************************************************************************
4 * @author MCD Application Team
5 * @brief Header file for the usbd_hid_core.c file.
6 ******************************************************************************
9 * <h2><center>© Copyright (c) 2015 STMicroelectronics.
10 * All rights reserved.</center></h2>
12 * This software component is licensed by ST under Ultimate Liberty license
13 * SLA0044, the "License"; You may not use this file except in compliance with
14 * the License. You may obtain a copy of the License at:
17 ******************************************************************************
20 /* Define to prevent recursive inclusion -------------------------------------*/
28 /* Includes ------------------------------------------------------------------*/
29 #include "usbd_ioreq.h"
31 /** @addtogroup STM32_USB_DEVICE_LIBRARY
35 /** @defgroup USBD_HID
36 * @brief This file is the Header file for usbd_hid.c
41 /** @defgroup USBD_HID_Exported_Defines
44 #define HID_EPIN_ADDR 0x83U
45 #define HID_EPIN_SIZE 0x08U
47 #define USB_HID_CONFIG_DESC_SIZ 34U
48 #define USB_HID_DESC_SIZ 9U
49 #define HID_MOUSE_REPORT_DESC_SIZE 38U
51 #define HID_DESCRIPTOR_TYPE 0x21U
52 #define HID_REPORT_DESC 0x22U
54 #ifndef HID_HS_BINTERVAL
55 #define HID_HS_BINTERVAL 0x07U
56 #endif /* HID_HS_BINTERVAL */
58 #ifndef HID_FS_BINTERVAL
59 #define HID_FS_BINTERVAL 0x0AU
60 #endif /* HID_FS_BINTERVAL */
62 #define HID_REQ_SET_PROTOCOL 0x0BU
63 #define HID_REQ_GET_PROTOCOL 0x03U
65 #define HID_REQ_SET_IDLE 0x0AU
66 #define HID_REQ_GET_IDLE 0x02U
68 #define HID_REQ_SET_REPORT 0x09U
69 #define HID_REQ_GET_REPORT 0x01U
75 /** @defgroup USBD_CORE_Exported_TypesDefinitions
91 HID_StateTypeDef state
;
93 USBD_HID_HandleTypeDef
;
100 /** @defgroup USBD_CORE_Exported_Macros
108 /** @defgroup USBD_CORE_Exported_Variables
112 extern USBD_ClassTypeDef USBD_HID
;
113 #define USBD_HID_CLASS &USBD_HID
118 /** @defgroup USB_CORE_Exported_Functions
121 uint8_t USBD_HID_SendReport(USBD_HandleTypeDef
*pdev
,
125 uint32_t USBD_HID_GetPollingInterval(USBD_HandleTypeDef
*pdev
);
135 #endif /* __USB_HID_H */
144 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/