Advertisement
Guest User

Untitled

a guest
Feb 25th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. #import usb stuff
  2. import usb.core
  3. import usb.util
  4.  
  5. #find device
  6. dev = usb.core.find(idVendor=0x04f2,idProduct=0x0939)
  7.  
  8. # was it found?
  9. if dev is None:
  10. raise ValueError('Device not found')
  11.  
  12. # set the active configuration. With no arguments, the first
  13. # configuration will be the active one
  14. dev.set_configuration()
  15.  
  16.  
  17. bmRqueType=0x80;
  18. bRque=0x0;
  19. wVal=0x0;
  20. wIndex=0x0;
  21. wLength=0x0;
  22.  
  23. ret = dev.ctrl_transfer(bmRqueType,bRque,wVal,wIndex,wLength)
  24. print ret
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement