Example #1
0
 def open(self):
     self._check(hid.hid_force_open(self._interface,
                                    0,
                                    self.__class__.MATCHER.matcher,
                                    3),
              'hid_force_open')
     self._id = self._interface.id
     with os.tmpfile() as tmpfile:
         hid.hid_write_identification(tmpfile, self._interface)
         tmpfile.flush()
         tmpfile.seek(0)
         details = tmpfile.read() + '\n'
     return details
Example #2
0
 def write_identification(self, stream):
     '''Print the vendor, model and serial number strings, as available.'''
     _hid_raise("write_identification", hid.hid_write_identification(
         stream, self.interface))
Example #3
0
 def write_identification(self, stream):
     _hid_raise("write_identification",
                hid.hid_write_identification(stream, self.interface))
Example #4
0
 def write_identification(self, stream):
     '''Print the vendor, model and serial number strings, as available.'''
     _hid_raise("write_identification",
                hid.hid_write_identification(stream, self.interface))
Example #5
0
 def write_identification(self, stream):
     _hid_raise("write_identification", hid.hid_write_identification(
         stream, self.interface))