STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
usbd_hid.h
Go to the documentation of this file.
1 
28 /* Define to prevent recursive inclusion -------------------------------------*/
29 #ifndef __USB_HID_H
30 #define __USB_HID_H
31 
32 #ifdef __cplusplus
33  extern "C" {
34 #endif
35 
36 /* Includes ------------------------------------------------------------------*/
37 #include "usbd_ioreq.h"
38 
52 #define HID_EPIN_ADDR 0x81
53 #define HID_EPIN_SIZE 0x04
54 
55 #define USB_HID_CONFIG_DESC_SIZ 34
56 #define USB_HID_DESC_SIZ 9
57 #define HID_MOUSE_REPORT_DESC_SIZE 74
58 
59 #define HID_DESCRIPTOR_TYPE 0x21
60 #define HID_REPORT_DESC 0x22
61 
62 #define HID_HS_BINTERVAL 0x07
63 #define HID_FS_BINTERVAL 0x0A
64 #define HID_POLLING_INTERVAL 0x0A
65 
66 #define HID_REQ_SET_PROTOCOL 0x0B
67 #define HID_REQ_GET_PROTOCOL 0x03
68 
69 #define HID_REQ_SET_IDLE 0x0A
70 #define HID_REQ_GET_IDLE 0x02
71 
72 #define HID_REQ_SET_REPORT 0x09
73 #define HID_REQ_GET_REPORT 0x01
74 
82 typedef enum
83 {
84  HID_IDLE = 0,
86 }
88 
89 
90 typedef struct
91 {
92  uint32_t Protocol;
93  uint32_t IdleState;
94  uint32_t AltSetting;
95  HID_StateTypeDef state;
96 }
117 #define USBD_HID_CLASS &USBD_HID
118 
126  uint8_t *report,
127  uint16_t len);
128 
130 
135 #ifdef __cplusplus
136 }
137 #endif
138 
139 #endif /* __USB_HID_H */
140 
148 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
uint8_t USBD_HID_SendReport(USBD_HandleTypeDef *pdev, uint8_t *report, uint16_t len)
USBD_HID_SendReport Send HID Report.
Definition: usbd_hid.c:419
uint32_t USBD_HID_GetPollingInterval(USBD_HandleTypeDef *pdev)
USBD_HID_GetPollingInterval return polling interval from endpoint descriptor.
Definition: usbd_hid.c:445
Header file for the usbd_ioreq.c file.
HID_StateTypeDef state
Definition: usbd_hid.h:95
USBD_ClassTypeDef USBD_HID
Definition: usbd_hid.c:119
HID_StateTypeDef
Definition: usbd_hid.h:82