mirror of
https://github.com/qmk/qmk_firmware.git
synced 2024-11-22 03:19:24 +00:00
Fix NKRO and Mouse Emulation on arm_atsam (#23945)
This commit is contained in:
parent
45397a44e3
commit
40f2575b56
@ -88,7 +88,13 @@ void send_nkro(report_nkro_t *report) {
|
|||||||
__disable_irq();
|
__disable_irq();
|
||||||
__DMB();
|
__DMB();
|
||||||
|
|
||||||
memcpy(udi_hid_nkro_report, report, UDI_HID_NKRO_REPORT_SIZE);
|
/*
|
||||||
|
Skipping ahead `sizeof(report->report_id)` bytes
|
||||||
|
since `report_id` is not used by this driver
|
||||||
|
*/
|
||||||
|
void *report_no_report_id = (void *)((char *)report + sizeof(report->report_id));
|
||||||
|
|
||||||
|
memcpy(udi_hid_nkro_report, report_no_report_id, UDI_HID_NKRO_REPORT_SIZE);
|
||||||
udi_hid_nkro_b_report_valid = 1;
|
udi_hid_nkro_b_report_valid = 1;
|
||||||
udi_hid_nkro_send_report();
|
udi_hid_nkro_send_report();
|
||||||
|
|
||||||
@ -105,7 +111,17 @@ void send_mouse(report_mouse_t *report) {
|
|||||||
__disable_irq();
|
__disable_irq();
|
||||||
__DMB();
|
__DMB();
|
||||||
|
|
||||||
|
# ifdef MOUSE_SHARED_EP
|
||||||
|
/*
|
||||||
|
Skipping ahead `sizeof(report->report_id)` bytes
|
||||||
|
since `report_id` is not used by this driver
|
||||||
|
*/
|
||||||
|
void *report_no_report_id = (void *)((char *)report + sizeof(report->report_id));
|
||||||
|
|
||||||
|
memcpy(udi_hid_mou_report, report_no_report_id, UDI_HID_MOU_REPORT_SIZE);
|
||||||
|
# else
|
||||||
memcpy(udi_hid_mou_report, report, UDI_HID_MOU_REPORT_SIZE);
|
memcpy(udi_hid_mou_report, report, UDI_HID_MOU_REPORT_SIZE);
|
||||||
|
# endif
|
||||||
udi_hid_mou_b_report_valid = 1;
|
udi_hid_mou_b_report_valid = 1;
|
||||||
udi_hid_mou_send_report();
|
udi_hid_mou_send_report();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user