summaryrefslogtreecommitdiffstats
path: root/tmk_core/protocol/chibios/usb_main.c
diff options
context:
space:
mode:
Diffstat (limited to 'tmk_core/protocol/chibios/usb_main.c')
-rw-r--r--tmk_core/protocol/chibios/usb_main.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/tmk_core/protocol/chibios/usb_main.c b/tmk_core/protocol/chibios/usb_main.c
index 3e64ceab19..3fd34a604e 100644
--- a/tmk_core/protocol/chibios/usb_main.c
+++ b/tmk_core/protocol/chibios/usb_main.c
@@ -970,7 +970,7 @@ void send_extra(uint8_t report_id, uint16_t data) {
#endif
}
-void send_programmable_button(uint32_t data) {
+void send_programmable_button(report_programmable_button_t *report) {
#ifdef PROGRAMMABLE_BUTTON_ENABLE
osalSysLock();
if (usbGetDriverStateI(&USB_DRIVER) != USB_ACTIVE) {
@@ -988,13 +988,8 @@ void send_programmable_button(uint32_t data) {
return;
}
}
- static report_programmable_button_t report = {
- .report_id = REPORT_ID_PROGRAMMABLE_BUTTON,
- };
-
- report.usage = data;
- usbStartTransmitI(&USB_DRIVER, SHARED_IN_EPNUM, (uint8_t *)&report, sizeof(report));
+ usbStartTransmitI(&USB_DRIVER, SHARED_IN_EPNUM, (uint8_t *)report, sizeof(report_programmable_button_t));
osalSysUnlock();
#endif
}