Gadget: gadget mouse
This commit is contained in:
parent
6258164c72
commit
cf149a85e1
@ -8,6 +8,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/mass_storage.disk1
|
rm configs/c.1/mass_storage.disk1
|
||||||
rm configs/c.1/mass_storage.cdrom1
|
rm configs/c.1/mass_storage.cdrom1
|
||||||
|
|
||||||
@ -16,6 +17,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/mass_storage.disk1
|
rmdir functions/mass_storage.disk1
|
||||||
rmdir functions/mass_storage.cdrom1
|
rmdir functions/mass_storage.cdrom1
|
||||||
|
|
||||||
|
@ -34,6 +34,13 @@ 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\\x65\\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\\x65\\x05\\x07\\x19\\x00\\x29\\x65\\x81\\x00\\xc0 > functions/hid.kbd0/report_desc
|
||||||
|
|
||||||
|
echo " HID Mouse"
|
||||||
|
mkdir -p functions/hid.mouse0
|
||||||
|
echo 2 > functions/hid.mouse0/protocol
|
||||||
|
echo 0 > functions/hid.mouse0/subclass
|
||||||
|
echo 8 > functions/hid.mouse0/report_length
|
||||||
|
echo -ne \\x05\\x01\\x09\\x02\\xa1\\x01\\x09\\x01\\xa1\\x00\\x85\\x01\\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\\x95\\x02\\x75\\x08\\x81\\x01\\xc0\\xc0\\x05\\x01\\x09\\x02\\xa1\\x01\\x09\\x01\\xa1\\x00\\x85\\x02\\x05\\x09\\x19\\x01\\x29\\x03\\x15\\x00\\x25\\x01\\x95\\x03\\x75\\x01\\x81\\x02\\x95\\x01\\x75\\x05\\x81\\x01\\x05\\x01\\x09\\x30\\x09\\x31\\x15\\x00\\x26\\xff\\x7f\\x95\\x02\\x75\\x10\\x81\\x02\\xc0\\xc0 > functions/hid.mouse0/report_desc
|
||||||
|
|
||||||
|
|
||||||
echo " Mass storage"
|
echo " Mass storage"
|
||||||
mkdir -p functions/mass_storage.disk1
|
mkdir -p functions/mass_storage.disk1
|
||||||
@ -46,6 +53,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/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