(self, numBytes = 8)
| 532 | return writeBuffer |
| 533 | |
| 534 | def read(self, numBytes = 8): |
| 535 | if ON_WINDOWS: |
| 536 | pass |
| 537 | else: |
| 538 | if self.handle is None: |
| 539 | raise U12Exception("The U12's handle is None. Please open a U12 with open()") |
| 540 | newA = (ctypes.c_byte*numBytes)() |
| 541 | readBytes = staticLib.LJUSB_Read(self.handle, ctypes.byref(newA), numBytes) |
| 542 | # return a list of integers in command/response mode |
| 543 | result = [(newA[i] & 0xff) for i in range(readBytes)] |
| 544 | if self.debug: print("Received:", hexWithoutQuotes(result)) |
| 545 | return result |
| 546 | |
| 547 | |
| 548 | # Low-level helpers |
no test coverage detected