summarylogtreecommitdiffstats
path: root/fixcontroller.py
diff options
context:
space:
mode:
authorRyan O'Beirne2019-08-09 15:47:44 -0400
committerRyan O'Beirne2019-08-09 15:47:44 -0400
commitb630fa0212e506303ba2c2a4f5cc5f82015940c7 (patch)
tree2b6dc27096c47df0f326cae7656fa18110316353 /fixcontroller.py
downloadaur-b630fa0212e506303ba2c2a4f5cc5f82015940c7.tar.gz
Initial commit
Diffstat (limited to 'fixcontroller.py')
-rwxr-xr-xfixcontroller.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/fixcontroller.py b/fixcontroller.py
new file mode 100755
index 00000000000..24e48edaf30
--- /dev/null
+++ b/fixcontroller.py
@@ -0,0 +1,12 @@
+#!/usr/bin/env python3
+
+# https://gist.github.com/dnmodder/de2df973323b7c6acf45f40dc66e8db3
+
+import usb.core
+
+dev = usb.core.find(idVendor=0x045e, idProduct=0x028e)
+
+if dev is None:
+ raise ValueError('Device not found')
+else:
+ dev.ctrl_transfer(0xc1, 0x01, 0x0100, 0x00, 0x14)