(device, data)
| 41 | #print 'Caught exception during port reset; should still work.' |
| 42 | |
| 43 | def send_data(device, data): |
| 44 | #print 'Sending 0x%x of data to device.' % len(data) |
| 45 | index = 0 |
| 46 | while index < len(data): |
| 47 | amount = min(len(data) - index, MAX_PACKET_SIZE) |
| 48 | assert device.ctrl_transfer(0x21, 1, 0, 0, data[index:index + amount], 5000) == amount |
| 49 | index += amount |
| 50 | |
| 51 | def get_data(device, amount): |
| 52 | #print 'Getting 0x%x of data from device.' % amount |
nothing calls this directly
no test coverage detected