-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlh_hidapi.h
More file actions
32 lines (27 loc) · 1.38 KB
/
lh_hidapi.h
File metadata and controls
32 lines (27 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#pragma once
#include <hidapi.h>
#ifdef __cplusplus
extern "C"{
#endif
int lh_hid_init();
int lh_hid_exit();
struct hid_device_info* lh_hid_enumerate(unsigned short vendor_id, unsigned short product_id);
void lh_hid_free_enumeration(struct hid_device_info* devs);
hid_device* lh_hid_open(unsigned short vendor_id, unsigned short product_id, const wchar_t* serial_number);
hid_device* lh_hid_open_path(const char* path);
int lh_hid_write(hid_device* dev, const unsigned char* data, size_t length);
int lh_hid_read_timeout(hid_device* dev, unsigned char* data, size_t length, int milliseconds);
int lh_hid_read(hid_device* dev, unsigned char* data, size_t length);
//const wchar_t* lh_hid_read_error(hid_device* dev);
int lh_hid_set_nonblocking(hid_device* dev, int nonblock);
int lh_hid_send_feature_report(hid_device* dev, const unsigned char* data, size_t length);
int lh_hid_get_feature_report(hid_device* dev, unsigned char* data, size_t length);
void lh_hid_close(hid_device* dev);
int lh_hid_get_manufacturer_string(hid_device* dev, wchar_t* string, size_t maxlen);
int lh_hid_get_product_string(hid_device* dev, wchar_t* string, size_t maxlen);
int lh_hid_get_serial_number_string(hid_device* dev, wchar_t* string, size_t maxlen);
int lh_hid_get_indexed_string(hid_device* dev, int string_index, wchar_t* string, size_t maxlen);
const wchar_t* lh_hid_error(hid_device* dev);
#ifdef __cplusplus
}
#endif