Gadget: added secondary mouse, prepare for absolute
This commit is contained in:
parent
5853ae6dda
commit
78463d1ac9
@ -9,6 +9,7 @@ echo "" > UDC
|
|||||||
echo "Clean up configs"
|
echo "Clean up configs"
|
||||||
rm configs/c.1/hid.kbd0
|
rm configs/c.1/hid.kbd0
|
||||||
rm configs/c.1/hid.mouse0
|
rm configs/c.1/hid.mouse0
|
||||||
|
rm configs/c.1/hid.mouse1
|
||||||
rm configs/c.1/mass_storage.disk1
|
rm configs/c.1/mass_storage.disk1
|
||||||
rm configs/c.1/mass_storage.cdrom1
|
rm configs/c.1/mass_storage.cdrom1
|
||||||
|
|
||||||
@ -18,6 +19,7 @@ rmdir configs/c.1
|
|||||||
echo "Clean up functions"
|
echo "Clean up functions"
|
||||||
rmdir functions/hid.kbd0
|
rmdir functions/hid.kbd0
|
||||||
rmdir functions/hid.mouse0
|
rmdir functions/hid.mouse0
|
||||||
|
rmdir functions/hid.mouse1
|
||||||
rmdir functions/mass_storage.disk1
|
rmdir functions/mass_storage.disk1
|
||||||
rmdir functions/mass_storage.cdrom1
|
rmdir functions/mass_storage.cdrom1
|
||||||
|
|
||||||
|
@ -34,13 +34,20 @@ echo 1 > functions/hid.kbd0/subclass
|
|||||||
echo 8 > functions/hid.kbd0/report_length
|
echo 8 > functions/hid.kbd0/report_length
|
||||||
echo -ne \\x05\\x01\\x09\\x06\\xa1\\x01\\x05\\x07\\x19\\xe0\\x29\\xe7\\x15\\x00\\x25\\x01\\x75\\x01\\x95\\x08\\x81\\x02\\x95\\x01\\x75\\x08\\x81\\x03\\x95\\x05\\x75\\x01\\x05\\x08\\x19\\x01\\x29\\x05\\x91\\x02\\x95\\x01\\x75\\x03\\x91\\x03\\x95\\x06\\x75\\x08\\x15\\x00\\x25\\xff\\x05\\x07\\x19\\x00\\x29\\x65\\x81\\x00\\xc0 > functions/hid.kbd0/report_desc
|
echo -ne \\x05\\x01\\x09\\x06\\xa1\\x01\\x05\\x07\\x19\\xe0\\x29\\xe7\\x15\\x00\\x25\\x01\\x75\\x01\\x95\\x08\\x81\\x02\\x95\\x01\\x75\\x08\\x81\\x03\\x95\\x05\\x75\\x01\\x05\\x08\\x19\\x01\\x29\\x05\\x91\\x02\\x95\\x01\\x75\\x03\\x91\\x03\\x95\\x06\\x75\\x08\\x15\\x00\\x25\\xff\\x05\\x07\\x19\\x00\\x29\\x65\\x81\\x00\\xc0 > functions/hid.kbd0/report_desc
|
||||||
|
|
||||||
echo " HID Mouse"
|
echo " HID Mouse Relative"
|
||||||
mkdir -p functions/hid.mouse0
|
mkdir -p functions/hid.mouse0
|
||||||
echo 2 > functions/hid.mouse0/protocol
|
echo 2 > functions/hid.mouse0/protocol
|
||||||
echo 1 > functions/hid.mouse0/subclass
|
echo 1 > functions/hid.mouse0/subclass
|
||||||
echo 8 > functions/hid.mouse0/report_length
|
echo 8 > functions/hid.mouse0/report_length
|
||||||
echo -ne \\x05\\x01\\x09\\x02\\xa1\\x01\\x09\\x01\\xa1\\x00\\x05\\x09\\x19\\x01\\x29\\x08\\x15\\x00\\x25\\x01\\x95\\x08\\x75\\x01\\x81\\x02\\x05\\x01\\x09\\x30\\x09\\x31\\x09\\x38\\x15\\x81\\x25\\x7f\\x75\\x08\\x95\\x03\\x81\\x06\\xc0\\xc0 > functions/hid.mouse0/report_desc
|
echo -ne \\x05\\x01\\x09\\x02\\xa1\\x01\\x09\\x01\\xa1\\x00\\x05\\x09\\x19\\x01\\x29\\x08\\x15\\x00\\x25\\x01\\x95\\x08\\x75\\x01\\x81\\x02\\x05\\x01\\x09\\x30\\x09\\x31\\x09\\x38\\x15\\x81\\x25\\x7f\\x75\\x08\\x95\\x03\\x81\\x06\\xc0\\xc0 > functions/hid.mouse0/report_desc
|
||||||
|
|
||||||
|
echo " HID Mouse Absolute"
|
||||||
|
mkdir -p functions/hid.mouse1
|
||||||
|
echo 2 > functions/hid.mouse1/protocol
|
||||||
|
echo 1 > functions/hid.mouse1/subclass
|
||||||
|
echo 8 > functions/hid.mouse1/report_length
|
||||||
|
echo -ne \\x05\\x01\\x09\\x02\\xa1\\x01\\x09\\x01\\xa1\\x00\\x05\\x09\\x19\\x01\\x29\\x08\\x15\\x00\\x25\\x01\\x95\\x08\\x75\\x01\\x81\\x02\\x05\\x01\\x09\\x30\\x09\\x31\\x09\\x38\\x15\\x81\\x25\\x7f\\x75\\x08\\x95\\x03\\x81\\x06\\xc0\\xc0 > functions/hid.mouse1/report_desc
|
||||||
|
|
||||||
|
|
||||||
echo " Mass storage"
|
echo " Mass storage"
|
||||||
mkdir -p functions/mass_storage.disk1
|
mkdir -p functions/mass_storage.disk1
|
||||||
@ -54,6 +61,7 @@ echo 1 > functions/mass_storage.cdrom1/lun.0/removable
|
|||||||
echo "Activating gadgeds"
|
echo "Activating gadgeds"
|
||||||
ln -s functions/hid.kbd0 configs/c.1/
|
ln -s functions/hid.kbd0 configs/c.1/
|
||||||
ln -s functions/hid.mouse0 configs/c.1/
|
ln -s functions/hid.mouse0 configs/c.1/
|
||||||
|
ln -s functions/hid.mouse1 configs/c.1/
|
||||||
ln -s functions/mass_storage.disk1 configs/c.1/
|
ln -s functions/mass_storage.disk1 configs/c.1/
|
||||||
ln -s functions/mass_storage.cdrom1 configs/c.1/
|
ln -s functions/mass_storage.cdrom1 configs/c.1/
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user