STM32_USB_Device_Library
Select one of the symbols to view example projects that use it.
Symbol previews are coming soon...
Outline
#define __USB_CUSTOMHID_H
#include "usbd_ioreq.h"
#define CUSTOM_HID_EPIN_ADDR
#define CUSTOM_HID_EPIN_SIZE
#define CUSTOM_HID_EPOUT_ADDR
#define CUSTOM_HID_EPOUT_SIZE
#define USB_CUSTOM_HID_CONFIG_DESC_SIZ
#define USB_CUSTOM_HID_DESC_SIZ
#define CUSTOM_HID_HS_BINTERVAL
#define CUSTOM_HID_FS_BINTERVAL
#define USBD_CUSTOMHID_OUTREPORT_BUF_SIZE
#define USBD_CUSTOM_HID_REPORT_DESC_SIZE
#define CUSTOM_HID_DESCRIPTOR_TYPE
#define CUSTOM_HID_REPORT_DESC
#define CUSTOM_HID_REQ_SET_PROTOCOL
#define CUSTOM_HID_REQ_GET_PROTOCOL
#define CUSTOM_HID_REQ_SET_IDLE
#define CUSTOM_HID_REQ_GET_IDLE
#define CUSTOM_HID_REQ_SET_REPORT
#define CUSTOM_HID_REQ_GET_REPORT
CUSTOM_HID_StateTypeDef
CUSTOM_HID_IDLE
CUSTOM_HID_BUSY
_USBD_CUSTOM_HID_Itf
pReport
Init
DeInit
OutEvent
USBD_CUSTOM_HID_HandleTypeDef
Report_buf
Protocol
IdleState
AltSetting
IsReportAvailable
state
USBD_DescTypeDef
bLength
bDescriptorTypeCHID
bcdCUSTOM_HID
bCountryCode
bNumDescriptors
bDescriptorType
wItemLength
USBD_CUSTOM_HID;
#define USBD_CUSTOM_HID_CLASS
USBD_CUSTOM_HID_SendReport(USBD_HandleTypeDef *, uint8_t *, uint16_t);
USBD_CUSTOM_HID_ReceivePacket(USBD_HandleTypeDef *);
USBD_CUSTOM_HID_RegisterInterface(USBD_HandleTypeDef *, USBD_CUSTOM_HID_ItfTypeDef *);
Files
loading...
SourceVu
STM32 Libraries and Samples
STM32_USB_Device_Library
Class/CustomHID/Inc/usbd_customhid.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
/**
******************************************************************************
* @file usbd_customhid.h
* @author MCD Application Team
* @brief header file for the usbd_customhid.c file.
******************************************************************************
* @attention
*
* Copyright (c) 2015 STMicroelectronics.
* All rights reserved.
*
* This software is licensed under terms that can be found in the LICENSE file
* in the root directory of this software component.
* If no LICENSE file comes with this software, it is provided AS-IS.
*
******************************************************************************
*/
/* ... */
/* Define to prevent recursive inclusion -------------------------------------*/
#ifndef
__USB_CUSTOMHID_H
#define
__USB_CUSTOMHID_H
#ifdef
__cplusplus
extern
"C"
{
#endif
/* Includes ------------------------------------------------------------------*/
#include
"
usbd_ioreq.h"
/** @addtogroup STM32_USB_DEVICE_LIBRARY
* @{
*/
/* ... */
/** @defgroup USBD_CUSTOM_HID
* @brief This file is the Header file for USBD_customhid.c
* @{
*/
/* ... */
/** @defgroup USBD_CUSTOM_HID_Exported_Defines
* @{
*/
/* ... */
#ifndef
CUSTOM_HID_EPIN_ADDR
#define
CUSTOM_HID_EPIN_ADDR
0x81U
#endif
/* CUSTOM_HID_EPIN_ADDR */
#ifndef
CUSTOM_HID_EPIN_SIZE
#define
CUSTOM_HID_EPIN_SIZE
0x02U
#endif
/* CUSTOM_HID_EPIN_SIZE */
#ifndef
CUSTOM_HID_EPOUT_ADDR
#define
CUSTOM_HID_EPOUT_ADDR
0x01U
#endif
/* CUSTOM_HID_EPOUT_ADDR */
#ifndef
CUSTOM_HID_EPOUT_SIZE
#define
CUSTOM_HID_EPOUT_SIZE
0x02U
#endif
/* CUSTOM_HID_EPOUT_SIZE*/
#define
USB_CUSTOM_HID_CONFIG_DESC_SIZ
41U
#define
USB_CUSTOM_HID_DESC_SIZ
9U
#ifndef
CUSTOM_HID_HS_BINTERVAL
#define
CUSTOM_HID_HS_BINTERVAL
0x05U
#endif
/* CUSTOM_HID_HS_BINTERVAL */
#ifndef
CUSTOM_HID_FS_BINTERVAL
#define
CUSTOM_HID_FS_BINTERVAL
0x05U
#endif
/* CUSTOM_HID_FS_BINTERVAL */
#ifndef
USBD_CUSTOMHID_OUTREPORT_BUF_SIZE
#define
USBD_CUSTOMHID_OUTREPORT_BUF_SIZE
0x02U
#endif
/* USBD_CUSTOMHID_OUTREPORT_BUF_SIZE */
#ifndef
USBD_CUSTOM_HID_REPORT_DESC_SIZE
#define
USBD_CUSTOM_HID_REPORT_DESC_SIZE
163U
#endif
/* USBD_CUSTOM_HID_REPORT_DESC_SIZE */
#define
CUSTOM_HID_DESCRIPTOR_TYPE
0x21U
#define
CUSTOM_HID_REPORT_DESC
0x22U
#define
CUSTOM_HID_REQ_SET_PROTOCOL
0x0BU
#define
CUSTOM_HID_REQ_GET_PROTOCOL
0x03U
#define
CUSTOM_HID_REQ_SET_IDLE
0x0AU
#define
CUSTOM_HID_REQ_GET_IDLE
0x02U
#define
CUSTOM_HID_REQ_SET_REPORT
0x09U
#define
CUSTOM_HID_REQ_GET_REPORT
0x01U
8 defines
/**
* @}
*/
/* ... */
/** @defgroup USBD_CORE_Exported_TypesDefinitions
* @{
*/
/* ... */
typedef
enum
{
CUSTOM_HID_IDLE
=
0U
,
CUSTOM_HID_BUSY
,
...
}
CUSTOM_HID_StateTypeDef
;
typedef
struct
_USBD_CUSTOM_HID_Itf
{
uint8_t
*
pReport
;
int8_t
(
*
Init
)
(
void
)
;
int8_t
(
*
DeInit
)
(
void
)
;
int8_t
(
*
OutEvent
)
(
uint8_t
event_idx
,
uint8_t
state
)
;
#ifdef
USBD_CUSTOMHID_CTRL_REQ_COMPLETE_CALLBACK_ENABLED
int8_t
(
*
CtrlReqComplete
)
(
uint8_t
request
,
uint16_t
wLength
)
;
#endif
/* USBD_CUSTOMHID_CTRL_REQ_COMPLETE_CALLBACK_ENABLED */
#ifdef
USBD_CUSTOMHID_CTRL_REQ_GET_REPORT_ENABLED
uint8_t
*
(
*
GetReport
)
(
uint16_t
*
ReportLength
)
;
#endif
/* USBD_CUSTOMHID_CTRL_REQ_GET_REPORT_ENABLED */
...
}
USBD_CUSTOM_HID_ItfTypeDef
;
typedef
struct
{
uint8_t
Report_buf
[
USBD_CUSTOMHID_OUTREPORT_BUF_SIZE
]
;
uint32_t
Protocol
;
uint32_t
IdleState
;
uint32_t
AltSetting
;
uint32_t
IsReportAvailable
;
CUSTOM_HID_StateTypeDef
state
;
...
}
USBD_CUSTOM_HID_HandleTypeDef
;
/*
* HID Class specification version 1.1
* 6.2.1 HID Descriptor
*/
/* ... */
typedef
struct
{
uint8_t
bLength
;
uint8_t
bDescriptorTypeCHID
;
uint16_t
bcdCUSTOM_HID
;
uint8_t
bCountryCode
;
uint8_t
bNumDescriptors
;
uint8_t
bDescriptorType
;
uint16_t
wItemLength
;
...
}
__PACKED
USBD_DescTypeDef
;
/**
* @}
*/
/* ... */
/** @defgroup USBD_CORE_Exported_Macros
* @{
*/
/* ... */
/**
* @}
*/
/* ... */
/** @defgroup USBD_CORE_Exported_Variables
* @{
*/
/* ... */
extern
USBD_ClassTypeDef
USBD_CUSTOM_HID
;
#define
USBD_CUSTOM_HID_CLASS
&
USBD_CUSTOM_HID
/**
* @}
*/
/* ... */
/** @defgroup USB_CORE_Exported_Functions
* @{
*/
/* ... */
#ifdef
USE_USBD_COMPOSITE
uint8_t
USBD_CUSTOM_HID_SendReport
(
USBD_HandleTypeDef
*
pdev
,
uint8_t
*
report
,
uint16_t
len
,
uint8_t
ClassId
)
;
/* ... */
#else
uint8_t
USBD_CUSTOM_HID_SendReport
(
USBD_HandleTypeDef
*
pdev
,
uint8_t
*
report
,
uint16_t
len
)
;
/* ... */
#endif
/* USE_USBD_COMPOSITE */
uint8_t
USBD_CUSTOM_HID_ReceivePacket
(
USBD_HandleTypeDef
*
pdev
)
;
uint8_t
USBD_CUSTOM_HID_RegisterInterface
(
USBD_HandleTypeDef
*
pdev
,
USBD_CUSTOM_HID_ItfTypeDef
*
fops
)
;
/**
* @}
*/
/* ... */
#ifdef
__cplusplus
}
extern "C" { ... }
#endif
/* ... */
#endif
/* __USB_CUSTOMHID_H */
/**
* @}
*/
/* ... */
/**
* @}
*/
/* ... */
Details
Show:
from
Types:
Columns:
All items filtered out
All items filtered out
This file uses the notable symbols shown below. Click anywhere in the file to view more details.
USBD_CUSTOM_HID_SendReport()
USBD_CUSTOM_HID_ReceivePacket()
USBD_CUSTOM_HID_RegisterInterface()
__PACKED
_USBD_CUSTOM_HID_Itf
USBD_CUSTOM_HID_HandleTypeDef
CUSTOM_HID_FS_BINTERVAL
_USBD_CUSTOM_HID_Itf::OutEvent
USBD_CUSTOM_HID_HandleTypeDef::Report_buf
CUSTOM_HID_EPIN_SIZE
CUSTOM_HID_EPOUT_SIZE
USBD_CUSTOM_HID_ReceivePacket()::pdev
CUSTOM_HID_EPIN_ADDR
CUSTOM_HID_EPOUT_ADDR
_USBD_CUSTOM_HID_Itf::Init
_USBD_CUSTOM_HID_Itf::DeInit
USBD_CUSTOM_HID_SendReport()::pdev
CUSTOM_HID_HS_BINTERVAL
CUSTOM_HID_StateTypeDef
USBD_CUSTOM_HID_HandleTypeDef::state
USBD_CUSTOM_HID
USB_CUSTOM_HID_CONFIG_DESC_SIZ
CUSTOM_HID_DESCRIPTOR_TYPE
CUSTOM_HID_StateTypeDef::CUSTOM_HID_IDLE
USBD_CUSTOM_HID_HandleTypeDef::IsReportAvailable
USBD_CUSTOM_HID_RegisterInterface()::pdev
USBD_CUSTOM_HID_RegisterInterface()::fops
USB_CUSTOM_HID_DESC_SIZ
USBD_CUSTOM_HID_HandleTypeDef::Protocol
USBD_CUSTOM_HID_HandleTypeDef::IdleState
USBD_CUSTOM_HID_HandleTypeDef::AltSetting
USBD_DescTypeDef
USBD_CUSTOM_HID_SendReport()::report
USBD_CUSTOM_HID_SendReport()::len
CUSTOM_HID_REPORT_DESC
CUSTOM_HID_REQ_SET_PROTOCOL
CUSTOM_HID_REQ_GET_PROTOCOL
CUSTOM_HID_REQ_SET_IDLE
CUSTOM_HID_REQ_GET_IDLE
CUSTOM_HID_REQ_SET_REPORT
CUSTOM_HID_StateTypeDef::CUSTOM_HID_BUSY
_USBD_CUSTOM_HID_Itf::pReport
USBD_CUSTOM_HID_CLASS
__USB_CUSTOMHID_H
CUSTOM_HID_REQ_GET_REPORT
USBD_DescTypeDef::bLength
USBD_DescTypeDef::bDescriptorTypeCHID
USBD_DescTypeDef::bcdCUSTOM_HID
USBD_DescTypeDef::bCountryCode
USBD_DescTypeDef::bNumDescriptors
USBD_DescTypeDef::bDescriptorType
USBD_DescTypeDef::wItemLength
CUSTOM_HID_StateTypeDef
USBD_CUSTOM_HID_ItfTypeDef
USBD_CUSTOM_HID_HandleTypeDef
USBD_DescTypeDef
USBD_ClassTypeDef
USBD_HandleTypeDef