How to use the hidapi.hid_exit function in hidapi

To help you get started, we’ve selected a few hidapi examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github EmokitAlife / EmokitVisualizer / emokit / reader.py View on Github external
print("Reader stopping...")
                self.running = False
        if self.file is not None:
            self.file.close()
        if type(source) != int:
            source.close()
        if self.hid is not None:
            if type(self.hid) != int:
                self.hid.close()
        if system_platform != "Windows":
            try:
                hidapi.hid_close(source)
            except Exception:
                pass
            try:
                hidapi.hid_exit()
            except Exception:
                pass
        print("Reader stopped...")
        self.stopped = True
        return
github openyou / emokit / python / emokit / reader.py View on Github external
print("Reader stopping...")
                self.running = False
        if self.file is not None:
            self.file.close()
        if type(source) != int and type(source) != list:
            source.close()
        if self.hid is not None:
            if type(self.hid) != int:
                self.hid.close()
        if system_platform != "Windows":
            try:
                hidapi.hid_close(source)
            except Exception:
                pass
            try:
                hidapi.hid_exit()
            except Exception:
                pass
        print("Reader stopped...")
        self.stopped = True
        return