Example #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()
Example #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()
Example #3
0
def cleanup():
    _hid_raise("cleanup", hid.hid_cleanup())
    IS_INITIALIZED[0] = False
Example #4
0
def cleanup():
    _hid_raise("cleanup", hid.hid_cleanup())
    IS_INITIALIZED[0] = False