Skip to content

Commit 3adb56f

Browse files
committed
create reset.py script to test REQ_RESET usb command
1 parent ca6479b commit 3adb56f

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

scripts/reset.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import sys
2+
import usb.core
3+
4+
REQ_RESET = 0xBD
5+
6+
dev = usb.core.find(idVendor=0x1209, idProduct=0x7551)
7+
if dev is None:
8+
raise ValueError('device is not connected')
9+
10+
dev.ctrl_transfer(0x40, REQ_RESET, 0, 0, '')

0 commit comments

Comments
 (0)