staticconst __u8 disabled_rdesc[] = { // Make sure we match our original report length
FixedSizeVendorReport(VENDOR_REPORT_LENGTH)
};
staticconst __u8 fixed_rdesc_vendor[] = {
UsagePage_GenericDesktop
Usage_GD_Keypad
CollectionApplication( // -- Byte 0 in report
ReportId(RAW_PAD_REPORT_ID) // Byte 1 in report - same than report ID
ReportCount(1)
ReportSize(8)
Input(Const) // padding (internal report ID)
LogicalMaximum_i8(0)
LogicalMaximum_i8(1)
UsagePage_Digitizers
Usage_Dig_TabletFunctionKeys
CollectionPhysical( // Byte 2-3 is the button state
UsagePage_Button
UsageMinimum_i8(0x01)
UsageMaximum_i8(0x0a)
LogicalMinimum_i8(0x0)
LogicalMaximum_i8(0x1)
ReportCount(10)
ReportSize(1)
Input(Var|Abs)
Usage_i8(0x31) // will be mapped as BTN_A / BTN_SOUTH
ReportCount(1)
Input(Var|Abs)
ReportCount(5) // padding
Input(Const) // Byte 4 in report - just exists so we get to be a tablet pad
UsagePage_Digitizers
Usage_Dig_BarrelSwitch // BTN_STYLUS
ReportCount(1)
ReportSize(1)
Input(Var|Abs)
ReportCount(7) // padding
Input(Const) // Bytes 5/6 in report - just exists so we get to be a tablet pad
UsagePage_GenericDesktop
Usage_GD_X
Usage_GD_Y
ReportCount(2)
ReportSize(8)
Input(Var|Abs) // Byte 7 in report is the dial
Usage_GD_Wheel
LogicalMinimum_i8(-1)
LogicalMaximum_i8(1)
ReportCount(1)
ReportSize(8)
Input(Var|Rel)
) // -- Byte 0 in report
ReportId(RAW_BATTERY_REPORT_ID) // Byte 1 in report - same than report ID
ReportCount(1)
ReportSize(8)
Input(Const) // padding (internal report ID) // Byte 2 in report - always 0x01
Input(Const) // padding (internal report ID)
UsagePage_Digitizers /* * We represent the device as a stylus to force the kernel to not * directly query its battery state. Instead the kernel will rely * only on the provided events.
*/
Usage_Dig_Stylus
CollectionPhysical( // Byte 3 in report - battery value
UsagePage_BatterySystem
Usage_BS_AbsoluteStateOfCharge
LogicalMinimum_i8(0)
LogicalMaximum_i8(100)
ReportCount(1)
ReportSize(8)
Input(Var|Abs) // Byte 4 in report - charging state
Usage_BS_Charging
LogicalMinimum_i8(0)
LogicalMaximum_i8(1)
ReportCount(1)
ReportSize(8)
Input(Var|Abs)
)
)
};
if (rdesc_size == VENDOR_DESCRIPTOR_LENGTH) { /* * The vendor fixed rdesc is appended after the current one, * to keep the output reports working.
*/
__builtin_memcpy(data + rdesc_size, fixed_rdesc_vendor, sizeof(fixed_rdesc_vendor)); returnsizeof(fixed_rdesc_vendor) + rdesc_size;
}
hid_set_name(hctx->hid, "Disabled by HID-BPF Hanvon Ugee Shortcut Remote");
/* * The proprietary driver sends the 3 following packets after the * above one. * These don't seem to have any effect, so we don't send them to save * some processing time. * * static __u8 magic_1[32] = {0x02, 0xb4, 0x01, 0x00, 0x01}; * static __u8 magic_2[32] = {0x02, 0xb4, 0x01, 0x00, 0xff}; * static __u8 magic_3[32] = {0x02, 0xb8, 0x04, 0x00, 0x00};
*/
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.