mirror of
https://github.com/libratbag/libratbag.git
synced 2026-11-07 23:23:52 +01:00
Add ratbag_hidraw_output_report to send an output report
Still not fully implemented (should be just a write, but I have nothing to test right now). Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
This commit is contained in:
@@ -105,3 +105,11 @@ int ratbag_hidraw_raw_request(struct ratbag *ratbag, unsigned char reportnum,
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
int ratbag_hidraw_output_report(struct ratbag *ratbag, __u8 *buf, size_t len)
|
||||
{
|
||||
if (len < 1 || len > HID_MAX_BUFFER_SIZE || !buf || ratbag->hidraw_fd < 0)
|
||||
return -EINVAL;
|
||||
|
||||
return -ENOTSUP;
|
||||
}
|
||||
|
||||
@@ -52,4 +52,15 @@ int ratbag_open_hidraw(struct ratbag *ratbag);
|
||||
int ratbag_hidraw_raw_request(struct ratbag *ratbag, unsigned char reportnum,
|
||||
__u8 *buf, size_t len, unsigned char rtype, int reqtype);
|
||||
|
||||
/**
|
||||
* ratbag_hidraw_output_report - send output report to device
|
||||
*
|
||||
* @hdev: hid device
|
||||
* @buf: raw data to transfer
|
||||
* @len: length of buf
|
||||
*
|
||||
* @return: count of data transfered, negative if error
|
||||
*/
|
||||
int ratbag_hidraw_output_report(struct ratbag *ratbag, __u8 *buf, size_t len);
|
||||
|
||||
#endif /* LIBRATBAG_HIDRAW_H */
|
||||
|
||||
Reference in New Issue
Block a user