Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47123896 authored by Zhengping Jiang's avatar Zhengping Jiang
Browse files

floss: reduce descriptor of uhid

The uhid device is created to help suspend. It does not need to be a
fully functional device.

Bug: 309017352
Bug: 330782760
Test: mma -j32
Test: suspend and check wake type
Flag: EXEMPT floss only change
Change-Id: Idd4d5da4df482a13a03aa993dca6b195aa6ed734
parent 31beac83
Loading
Loading
Loading
Loading
+4 −12
Original line number Diff line number Diff line
@@ -11,7 +11,7 @@ const PID_DEFAULT: u32 = 0x0000;
pub const BD_ADDR_DEFAULT: &str = "00:00:00:00:00:00";

// Report descriptor for a standard mouse
const RDESC: [u8; 50] = [
const RDESC: [u8; 34] = [
    0x05, 0x01, // USAGE_PAGE (Generic Desktop)
    0x09, 0x02, // USAGE (Mouse)
    0xa1, 0x01, // COLLECTION (Application)
@@ -19,23 +19,15 @@ const RDESC: [u8; 50] = [
    0xa1, 0x00, //   COLLECTION (Physical)
    0x05, 0x09, //     USAGE_PAGE (Button)
    0x19, 0x01, //     USAGE_MINIMUM (Button 1)
    0x29, 0x03, //     USAGE_MAXIMUM (Button 3)
    0x29, 0x01, //     USAGE_MAXIMUM (Button 1)
    0x15, 0x00, //     LOGICAL_MINIMUM (0)
    0x25, 0x01, //     LOGICAL_MAXIMUM (1)
    0x95, 0x03, //     REPORT_COUNT (3)
    0x95, 0x01, //     REPORT_COUNT (1)
    0x75, 0x01, //     REPORT_SIZE (1)
    0x81, 0x02, //     INPUT (Data,Var,Abs)
    0x95, 0x01, //     REPORT_COUNT (1)
    0x75, 0x05, //     REPORT_SIZE (5)
    0x75, 0x07, //     REPORT_SIZE (7)
    0x81, 0x03, //     INPUT (Cnst,Var,Abs)
    0x05, 0x01, //     USAGE_PAGE (Generic Desktop)
    0x09, 0x30, //     USAGE (X)
    0x09, 0x31, //     USAGE (Y)
    0x15, 0x81, //     LOGICAL_MINIMUM (-127)
    0x25, 0x7f, //     LOGICAL_MAXIMUM (127)
    0x75, 0x08, //     REPORT_SIZE (8)
    0x95, 0x02, //     REPORT_COUNT (2)
    0x81, 0x06, //     INPUT (Data,Var,Rel)
    0xc0, //   END_COLLECTION
    0xc0, // END_COLLECTION
];