![]() |
nRF5 SDK
v16.0.0
|
| Choose documentation: | nRF5 SDK | S112 SoftDevice API | S113 SoftDevice API | S132 SoftDevice API | S140 SoftDevice API | S212 SoftDevice API | S312 SoftDevice API | S332 SoftDevice API | S340 SoftDevice API |
nRF52840 only: Module with types and definitions used by HID modules. More...
Data Structures | |
| union | app_usbd_hid_descriptor_t |
| HID descriptor, binary layout. More... | |
Macros | |
| #define | APP_USBD_HID_CLASS 0x03 |
| HID class definition in interface descriptor. More... | |
| #define | APP_USBD_HID_REPORT_ITEM(size) APP_USBD_HID_DESCRIPTOR_REPORT, ((size) & 0xFF), ((size) / 256) |
| HID report descriptor entry at the end of HID descriptor. More... | |
| #define | APP_USBD_HID_PHYSICAL_ITEM(size) APP_USBD_HID_DESCRIPTOR_PHYSICAL, ((size) & 0xFF), ((size) / 256) |
| HID physical descriptor entry at the end of HID descriptor. More... | |
| #define | APP_USBD_HID_BCD_VER APP_USBD_BCD_VER_MAKE(1, 1, 1) |
| Hid version BCD value definition. More... | |
| #define | APP_USBD_HID_BCD_VER_BYTES LSB_16(APP_USBD_HID_BCD_VER), MSB_16(APP_USBD_HID_BCD_VER) |
| HID version BCD value definition distributed into bytes. More... | |
| #define | APP_USBD_HID_INTERFACE_DSC(interface_number, endpoints_num, subclass, protocol) |
| Initializer of interface descriptor for HID classes. More... | |
| #define | APP_USBD_HID_HID_DSC(...) |
| Initializer of HID descriptor for HID classes. More... | |
| #define | APP_USBD_HID_EP_DSC(endpoint, ep_size, ep_interval) |
| Initializer of endpoint descriptor for HID classes. More... | |
nRF52840 only: Module with types and definitions used by HID modules.
| #define APP_USBD_HID_BCD_VER APP_USBD_BCD_VER_MAKE(1, 1, 1) |
Hid version BCD value definition.
The version of the HID descriptors used.
| #define APP_USBD_HID_BCD_VER_BYTES LSB_16(APP_USBD_HID_BCD_VER), MSB_16(APP_USBD_HID_BCD_VER) |
HID version BCD value definition distributed into bytes.
This is a value written directly into app_usbd_hid_descriptor_t::bcdHID.
| #define APP_USBD_HID_CLASS 0x03 |
HID class definition in interface descriptor.
| #define APP_USBD_HID_EP_DSC | ( | endpoint, | |
| ep_size, | |||
| ep_interval | |||
| ) |
Initializer of endpoint descriptor for HID classes.
| endpoint | Endpoint number. |
| ep_size | Endpoint size. |
| ep_interval | Endpoint interval (milliseconds). |
| #define APP_USBD_HID_HID_DSC | ( | ... | ) |
Initializer of HID descriptor for HID classes.
| ... | Report/physical item list. |
| #define APP_USBD_HID_INTERFACE_DSC | ( | interface_number, | |
| endpoints_num, | |||
| subclass, | |||
| protocol | |||
| ) |
Initializer of interface descriptor for HID classes.
| interface_number | Interface number. |
| endpoints_num | Number of endpoints. |
| subclass | Subclass type app_usbd_hid_subclass_t. |
| protocol | Protocol type app_usbd_hid_protocol_t. |
| #define APP_USBD_HID_PHYSICAL_ITEM | ( | size | ) | APP_USBD_HID_DESCRIPTOR_PHYSICAL, ((size) & 0xFF), ((size) / 256) |
HID physical descriptor entry at the end of HID descriptor.
| size | Physical descriptor size. |
| #define APP_USBD_HID_REPORT_ITEM | ( | size | ) | APP_USBD_HID_DESCRIPTOR_REPORT, ((size) & 0xFF), ((size) / 256) |
HID report descriptor entry at the end of HID descriptor.
| size | Report descriptor size. |
HID country code ID.
Look into app_usbd_hid_descriptor_t::bCountryCode.
HID descriptor types.
app_usbd_hid_descriptor_t::bRDescriptorType
| Enumerator | |
|---|---|
| APP_USBD_HID_DESCRIPTOR_HID |
HID descriptor. |
| APP_USBD_HID_DESCRIPTOR_REPORT |
REPORT descriptor. |
| APP_USBD_HID_DESCRIPTOR_PHYSICAL |
PHYSICAL descriptor. |
HID selected protocol.
These values are used for Get_Protocol and Set_Protocol requests. Changing protocol is only allowed when protocol type (app_usbd_hid_protocol_t) is set to APP_USBD_HID_PROTO_KEYBOARD or APP_USBD_HID_PROTO_MOUSE and interface uses boot subclass (APP_USBD_HID_SUBCLASS_BOOT).
| Enumerator | |
|---|---|
| APP_USBD_HID_PROTO_BOOT |
Boot protocol. |
| APP_USBD_HID_PROTO_REPORT |
Report protocol. |
HID protocol types defined by specification.
Value needs to be filled in interface descriptor. app_usbd_descriptor_iface_t::bInterfaceProtocol
| Enumerator | |
|---|---|
| APP_USBD_HID_PROTO_GENERIC |
GENERIC protocol. |
| APP_USBD_HID_PROTO_KEYBOARD |
KEYBOARD protocol. |
| APP_USBD_HID_PROTO_MOUSE |
MOUSE protocol. |
| APP_USBD_HID_PROTO_MULTITOUCH |
MULTITOUCH protocol. |
| enum app_usbd_hid_req_t |
HID requests defined by specification.
HID subclass definition.
| Enumerator | |
|---|---|
| APP_USBD_HID_SUBCLASS_NONE |
Undefined subclass. |
| APP_USBD_HID_SUBCLASS_BOOT |
Boot subclass. |