diff --git a/hid/__init__.py b/hid/__init__.py index 69d82eb..e0969c0 100644 --- a/hid/__init__.py +++ b/hid/__init__.py @@ -128,6 +128,9 @@ def as_dict(self): hidapi.hid_set_nonblocking.restype = ctypes.c_int hidapi.hid_send_feature_report.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_int] hidapi.hid_send_feature_report.restype = ctypes.c_int +if version >= (0, 15, 0): + hidapi.hid_send_output_report.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_size_t] + hidapi.hid_send_output_report.restype = ctypes.c_int hidapi.hid_get_feature_report.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_size_t] hidapi.hid_get_feature_report.restype = ctypes.c_int if version >= (0, 14, 0): @@ -223,6 +226,10 @@ def get_input_report(self, report_id, size): hidapi.hid_get_input_report, self.__dev, data, size) return data.raw[:size] + def send_output_report(self, data): + return self.__hidcall(hidapi.hid_send_output_report, + self.__dev, data, len(data)) + def send_feature_report(self, data): return self.__hidcall(hidapi.hid_send_feature_report, self.__dev, data, len(data))