| 1023 | |
| 1024 | |
| 1025 | int HID_API_EXPORT hid_write(hid_device *dev, const unsigned char *data, size_t length) |
| 1026 | { |
| 1027 | int bytes_written; |
| 1028 | |
| 1029 | if (!data || (length == 0)) { |
| 1030 | errno = EINVAL; |
| 1031 | register_device_error(dev, strerror(errno)); |
| 1032 | return -1; |
| 1033 | } |
| 1034 | |
| 1035 | bytes_written = write(dev->device_handle, data, length); |
| 1036 | |
| 1037 | register_device_error(dev, (bytes_written == -1)? strerror(errno): NULL); |
| 1038 | |
| 1039 | return bytes_written; |
| 1040 | } |
| 1041 | |
| 1042 | |
| 1043 | int HID_API_EXPORT hid_read_timeout(hid_device *dev, unsigned char *data, size_t length, int milliseconds) |
nothing calls this directly
no test coverage detected