From c22ef7f5cc632558a5cbe63fac6f94ea52fd25bf Mon Sep 17 00:00:00 2001 From: Jacek Fedorynski Date: Fri, 19 Apr 2024 02:00:26 +0200 Subject: [PATCH] power down, sleep, wake up --- firmware/src/our_descriptor.cc | 14 ++++++++++++++ firmware/src/our_descriptor.h | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/firmware/src/our_descriptor.cc b/firmware/src/our_descriptor.cc index ba0773e..7471fef 100644 --- a/firmware/src/our_descriptor.cc +++ b/firmware/src/our_descriptor.cc @@ -136,6 +136,20 @@ const uint8_t our_report_descriptor_kb_mouse[] = { 0x95, 0x01, // Report Count (1) 0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) 0xC0, // End Collection + + 0x05, 0x01, // Usage Page (Generic Desktop Ctrls) + 0x09, 0x80, // Usage (Sys Control) + 0xA1, 0x01, // Collection (Application) + 0x85, 0x04, // Report ID (4) + 0x75, 0x01, // Report Size (1) + 0x95, 0x03, // Report Count (3) + 0x09, 0x81, // Usage (Sys Power Down) + 0x09, 0x82, // Usage (Sys Sleep) + 0x09, 0x83, // Usage (Sys Wake Up) + 0x81, 0x02, // Input (Data,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) + 0x95, 0x05, // Report Count (5) + 0x81, 0x03, // Input (Const,Var,Abs,No Wrap,Linear,Preferred State,No Null Position) + 0xC0, // End Collection }; const uint8_t our_report_descriptor_absolute[] = { diff --git a/firmware/src/our_descriptor.h b/firmware/src/our_descriptor.h index 3ceb8ca..aa64845 100644 --- a/firmware/src/our_descriptor.h +++ b/firmware/src/our_descriptor.h @@ -11,7 +11,7 @@ #define REPORT_ID_CONFIG 100 #define REPORT_ID_MONITOR 101 -#define MAX_INPUT_REPORT_ID 3 +#define MAX_INPUT_REPORT_ID 4 #define NOUR_DESCRIPTORS 5