(timeout=1000)
| 21 | dev.ctrl_transfer(0x21, 0x09, 0x200, 0x04, bytes(data) + bytes(64 - len(data))) |
| 22 | |
| 23 | def recv(timeout=1000): |
| 24 | try: |
| 25 | return dev.read(0x85, 64, timeout=timeout).tobytes() |
| 26 | except usb.core.USBTimeoutError: |
| 27 | return None |
| 28 | |
| 29 | def recv_all(timeout=500): |
| 30 | responses = [] |