Пример #1
0
 def stop(self):
     """Allows stopping the device, restart using start()"""
     if self._running:
         ret = hid.hid_close(self._hid)
         if ret != hid.HID_RET_SUCCESS:
             sys.stderr.write("hid_close failed with return code %d.\n" % ret)
           
         self._running = False
         
         hid.hid_cleanup()
Пример #2
0
    def stop(self):
        """Allows stopping the device, restart using start()"""
        if self._running:
            ret = hid.hid_close(self._hid)
            if ret != hid.HID_RET_SUCCESS:
                sys.stderr.write("hid_close failed with return code %d.\n" %
                                 ret)

            self._running = False

            hid.hid_cleanup()
Пример #3
0
 def close(self):
     '''Close the Interface. Called automatically by __del__().'''
     _hid_raise("close", hid.hid_close(self.interface))
Пример #4
0
 def close(self):
     '''Close the Interface. Called automatically by __del__().'''
     _hid_raise("close", hid.hid_close(self.interface))
Пример #5
0
 def close(self):
     _hid_raise("close", hid.hid_close(self.interface))
Пример #6
0
 def close(self):
     _hid_raise("close", hid.hid_close(self.interface))