def send_data_hid(self, cmd, data): if not isinstance(data, bytes): data = struct.pack("%dB" % len(data), *[ord(x) for x in data]) with helpers.Timeout(1.0) as event: return self.dev.call(cmd, data, event)
def recv_raw(self,): with helpers.Timeout(1.0): cmd, payload = self.dev._dev.InternalRecv() return cmd, payload