summaryrefslogtreecommitdiff
path: root/src/class/hid/hid_device.c
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2025-04-11 23:07:22 +0200
committerHiFiPhile <[email protected]>2025-04-11 23:07:22 +0200
commit459e2cd39ece797eb35f74ccace0db0a588b795a (patch)
tree68e0f398392eb001ab64857575a2b76934519021 /src/class/hid/hid_device.c
parent8d2310247c47160bf8de6e5f754284360ad7e937 (diff)
parent865e3488f99209c57b73953428dccf2bc666f0be (diff)
Merge remote-tracking branch 'upstream/master' into async_io
Signed-off-by: HiFiPhile <[email protected]>
Diffstat (limited to 'src/class/hid/hid_device.c')
-rw-r--r--src/class/hid/hid_device.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/class/hid/hid_device.c b/src/class/hid/hid_device.c
index eedcba984..b4f24902b 100644
--- a/src/class/hid/hid_device.c
+++ b/src/class/hid/hid_device.c
@@ -194,6 +194,16 @@ bool tud_hid_n_gamepad_report(uint8_t instance, uint8_t report_id,
return tud_hid_n_report(instance, report_id, &report, sizeof(report));
}
+bool tud_hid_n_stylus_report(uint8_t instance, uint8_t report_id, uint8_t attrs, uint16_t x, uint16_t y) {
+ hid_stylus_report_t report = {
+ .attr = attrs,
+ .x = x,
+ .y = y,
+ };
+
+ return tud_hid_n_report(instance, report_id, &report, sizeof(report));
+}
+
//--------------------------------------------------------------------+
// USBD-CLASS API
//--------------------------------------------------------------------+