Skip to content

Commit

Permalink
create reset.py script to test REQ_RESET usb command
Browse files Browse the repository at this point in the history
  • Loading branch information
dbuentello committed Sep 9, 2016
1 parent ca6479b commit 3adb56f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/reset.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import sys
import usb.core

REQ_RESET = 0xBD

dev = usb.core.find(idVendor=0x1209, idProduct=0x7551)
if dev is None:
raise ValueError('device is not connected')

dev.ctrl_transfer(0x40, REQ_RESET, 0, 0, '')

0 comments on commit 3adb56f

Please sign in to comment.