server fix
This commit is contained in:
parent
33765d5468
commit
d6d5db7f50
@ -50,12 +50,42 @@ printf '\x05\x01\x09\x06\xa1\x01\x05\x07\x19\xe0\x29\xe7\x15\x00\x25\x01'\
|
||||
|
||||
# ----------------------- HID mouse (usb1) --------------------------
|
||||
mkdir -p "$G/functions/hid.usb1"
|
||||
echo 2 > "$G/functions/hid.usb1/protocol"
|
||||
echo 2 > "$G/functions/hid.usb1/protocol" # Boot mouse
|
||||
echo 1 > "$G/functions/hid.usb1/subclass"
|
||||
echo 4 > "$G/functions/hid.usb1/report_length"
|
||||
printf '\x05\x01\x09\x02\xa1\x01\x09\x01\xa1\x00\x05\x09\x19\x01\x29\x03'\
|
||||
'\x15\x00\x25\x01\x95\x03\x75\x01\x81\x02\x95\x01\x75\x05\x81\x03\x05'\
|
||||
'\x01\x09\x30\x09\x31\x15\x81\x25\x7f\x75\x08\x95\x02\x81\x06\xc0\xc0' \
|
||||
|
||||
# 3 buttons, X, Y, Wheel → total 4 bytes
|
||||
printf '\x05\x01' # Usage Page (Generic Desktop)
|
||||
printf '\x09\x02' # Usage (Mouse)
|
||||
printf '\xA1\x01' # Collection (Application)
|
||||
printf '\x09\x01' # Usage (Pointer)
|
||||
printf '\xA1\x00' # Collection (Physical)
|
||||
printf '\x05\x09' # Usage Page (Button)
|
||||
printf '\x19\x01' # Usage Min (1)
|
||||
printf '\x29\x03' # Usage Max (3)
|
||||
printf '\x15\x00' # Logical Min (0)
|
||||
printf '\x25\x01' # Logical Max (1)
|
||||
printf '\x95\x03' # Report Count (3)
|
||||
printf '\x75\x01' # Report Size (1)
|
||||
printf '\x81\x02' # Input (Data,Var,Abs) – 3 button bits
|
||||
printf '\x95\x01' # Report Count (1)
|
||||
printf '\x75\x05' # Report Size (5)
|
||||
printf '\x81\x03' # Input (Cnst,Var,Abs) – 5 pad bits
|
||||
printf '\x05\x01' # Usage Page (Generic Desktop)
|
||||
printf '\x09\x30' # Usage (X)
|
||||
printf '\x09\x31' # Usage (Y)
|
||||
printf '\x15\x81' # Logical Min (-127)
|
||||
printf '\x25\x7F' # Logical Max (127)
|
||||
printf '\x75\x08' # Report Size (8)
|
||||
printf '\x95\x02' # Report Count (2)
|
||||
printf '\x81\x06' # Input (Data,Var,Rel) – X, Y
|
||||
printf '\x09\x38' # Usage (Wheel)
|
||||
printf '\x15\x81' # Logical Min (-127)
|
||||
printf '\x25\x7F' # Logical Max (127)
|
||||
printf '\x75\x08' # Report Size (8)
|
||||
printf '\x95\x01' # Report Count (1)
|
||||
printf '\x81\x06' # Input (Data,Var,Rel) – Wheel
|
||||
printf '\xC0\xC0' # End collections
|
||||
>"$G/functions/hid.usb1/report_desc"
|
||||
|
||||
# # -- UAC2 Audio
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user