aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/protocol/report.h
diff options
context:
space:
mode:
authorStefan Kerkmann <karlk90@pm.me>2024-02-28 12:00:27 +0100
committerGitHub <noreply@github.com>2024-02-28 22:00:27 +1100
commit0e02b0c41e47d5f5ad799a9860869b9d30ab881a (patch)
tree4b9cf95e22162db622ea049ea96bc0d15358cf9f /tmk_core/protocol/report.h
parentb43f6cb7ef33f38ee494f639e2704a25c1e68332 (diff)
[Core] Refactor ChibiOS USB endpoints to be fully async (#21656)
Diffstat (limited to 'tmk_core/protocol/report.h')
-rw-r--r--tmk_core/protocol/report.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/tmk_core/protocol/report.h b/tmk_core/protocol/report.h
index 47bc4f2f2b..0e4f6e9def 100644
--- a/tmk_core/protocol/report.h
+++ b/tmk_core/protocol/report.h
@@ -29,7 +29,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// clang-format off
/* HID report IDs */
-enum hid_report_ids {
+enum hid_report_ids {
+ REPORT_ID_ALL = 0,
REPORT_ID_KEYBOARD = 1,
REPORT_ID_MOUSE,
REPORT_ID_SYSTEM,
@@ -37,9 +38,12 @@ enum hid_report_ids {
REPORT_ID_PROGRAMMABLE_BUTTON,
REPORT_ID_NKRO,
REPORT_ID_JOYSTICK,
- REPORT_ID_DIGITIZER
+ REPORT_ID_DIGITIZER,
+ REPORT_ID_COUNT = REPORT_ID_DIGITIZER
};
+#define IS_VALID_REPORT_ID(id) ((id) >= REPORT_ID_ALL && (id) <= REPORT_ID_COUNT)
+
/* Mouse buttons */
#define MOUSE_BTN_MASK(n) (1 << (n))
enum mouse_buttons {