11#ifndef _HID_REPORT_DESC_H_
12#define _HID_REPORT_DESC_H_
15#include <zephyr/types.h>
16#include <zephyr/toolchain.h>
17#include <zephyr/sys/util.h>
88#define _REPORT_BUFFER_SIZE_MOUSE \
89 (IS_ENABLED(CONFIG_DESKTOP_HID_REPORT_MOUSE_SUPPORT) ? (REPORT_SIZE_MOUSE) : (0))
90#define _REPORT_BUFFER_SIZE_KEYBOARD_KEYS \
91 (IS_ENABLED(CONFIG_DESKTOP_HID_REPORT_KEYBOARD_SUPPORT) ? (REPORT_SIZE_KEYBOARD_KEYS) : (0))
92#define _REPORT_BUFFER_SIZE_SYSTEM_CTRL \
93 (IS_ENABLED(CONFIG_DESKTOP_HID_REPORT_SYSTEM_CTRL_SUPPORT) ? \
94 (REPORT_SIZE_SYSTEM_CTRL) : (0))
95#define _REPORT_BUFFER_SIZE_CONSUMER_CTRL \
96 (IS_ENABLED(CONFIG_DESKTOP_HID_REPORT_CONSUMER_CTRL_SUPPORT) ? \
97 (REPORT_SIZE_CONSUMER_CTRL) : (0))
98#define _REPORT_BUFFER_SIZE_BOOT_MOUSE \
99 (IS_ENABLED(CONFIG_DESKTOP_HID_BOOT_INTERFACE_MOUSE) ? (REPORT_SIZE_MOUSE_BOOT) : (0))
100#define _REPORT_BUFFER_SIZE_BOOT_KEYBOARD \
101 (IS_ENABLED(CONFIG_DESKTOP_HID_BOOT_INTERFACE_KEYBOARD) ? (REPORT_SIZE_KEYBOARD_BOOT) : (0))
102#define _MAX6(a, b, c, d, e, f) MAX(MAX(a, b), MAX(MAX(c, d), MAX(e, f)))
105#define REPORT_BUFFER_SIZE_INPUT_REPORT \
106 _MAX6(_REPORT_BUFFER_SIZE_MOUSE, _REPORT_BUFFER_SIZE_KEYBOARD_KEYS, \
107 _REPORT_BUFFER_SIZE_SYSTEM_CTRL, _REPORT_BUFFER_SIZE_CONSUMER_CTRL, \
108 _REPORT_BUFFER_SIZE_BOOT_MOUSE, _REPORT_BUFFER_SIZE_BOOT_KEYBOARD)
111#define _REPORT_BUFFER_SIZE_KEYBOARD_LEDS \
112 (IS_ENABLED(CONFIG_DESKTOP_HID_REPORT_KEYBOARD_SUPPORT) ? (REPORT_SIZE_KEYBOARD_LEDS) : (0))
115#define REPORT_BUFFER_SIZE_OUTPUT_REPORT _REPORT_BUFFER_SIZE_KEYBOARD_LEDS
const uint8_t hid_report_desc[]
static const uint8_t output_reports[]
Output reports map.
Definition hid_report_desc.h:83
report_id
Identification numbers of HID reports.
Definition hid_report_desc.h:37
@ REPORT_ID_COUNT
Definition hid_report_desc.h:69
@ REPORT_ID_MOUSE
Definition hid_report_desc.h:42
@ REPORT_ID_CONSUMER_CTRL
Definition hid_report_desc.h:48
@ REPORT_ID_USER_CONFIG_OUT
Definition hid_report_desc.h:56
@ REPORT_ID_BOOT_MOUSE
Definition hid_report_desc.h:64
@ REPORT_ID_BOOT_KEYBOARD
Definition hid_report_desc.h:66
@ REPORT_ID_KEYBOARD_LEDS
Definition hid_report_desc.h:51
@ REPORT_ID_USER_CONFIG
Definition hid_report_desc.h:54
@ REPORT_ID_VENDOR_OUT
Definition hid_report_desc.h:61
@ REPORT_ID_KEYBOARD_KEYS
Definition hid_report_desc.h:44
@ REPORT_ID_RESERVED
Definition hid_report_desc.h:39
@ REPORT_ID_SYSTEM_CTRL
Definition hid_report_desc.h:46
@ REPORT_ID_VENDOR_IN
Definition hid_report_desc.h:59
static const uint8_t input_reports[]
Input reports map.
Definition hid_report_desc.h:73
const size_t hid_report_desc_size