diff --git a/chid.pxd b/chid.pxd index 977e47e..fcd8a5d 100644 --- a/chid.pxd +++ b/chid.pxd @@ -23,6 +23,7 @@ cdef extern from "hidapi.h": hid_device* hid_open(unsigned short, unsigned short, const wchar_t*) hid_device* hid_open_path(char *path) void hid_close(hid_device *) + int hid_init() int hid_exit() int hid_write(hid_device* device, unsigned char *data, int length) nogil int hid_read(hid_device* device, unsigned char* data, int max_length) nogil diff --git a/hid.pyx b/hid.pyx index a74ee64..f779143 100644 --- a/hid.pyx +++ b/hid.pyx @@ -8,6 +8,9 @@ from libc.stddef cimport wchar_t, size_t __version__ = "0.13.1" +hid_init() + + cdef extern from "ctype.h": int wcslen(wchar_t*)