summaryrefslogtreecommitdiff
path: root/reset_dev.py
diff options
context:
space:
mode:
authoriximeow <me@iximeow.net>2019-03-14 23:04:31 -0700
committeriximeow <me@iximeow.net>2019-03-14 23:04:31 -0700
commit7ab1ab5f8d923eceda77e0913900a5abec4b4c15 (patch)
tree245c31266a0a3306e8611b4e33f164004f746811 /reset_dev.py
parentba471ad83a65c42a4fc92ca49c7ecddf40514653 (diff)
add qhy control software
Diffstat (limited to 'reset_dev.py')
-rw-r--r--reset_dev.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/reset_dev.py b/reset_dev.py
new file mode 100644
index 0000000..5215d30
--- /dev/null
+++ b/reset_dev.py
@@ -0,0 +1,6 @@
+import fcntl
+import os
+
+# USBDEVFS_RESET
+fd = os.open("/dev/bus/usb/004/006", os.O_WRONLY)
+fcntl.ioctl(fd, (ord('U') << (4 * 2)) | 20, 0)