Merge remote-tracking branch 'upstream/develop' into xap

This commit is contained in:
Nick Brassel
2026-06-15 09:56:10 +10:00
14 changed files with 127 additions and 89 deletions
+6 -30
View File
@@ -68,10 +68,6 @@
# include "xap.h"
#endif
#ifdef PLOVER_HID_ENABLE
# include "plover_hid.h"
#endif
#ifdef WAIT_FOR_USB
// TODO: Remove backwards compatibility with old define
# define USB_WAIT_FOR_ENUMERATION
@@ -286,28 +282,6 @@ void xap_task(void) {
}
#endif // XAP_ENABLE
#ifdef PLOVER_HID_ENABLE
static bool plover_hid_report_updated = false;
static uint8_t plover_hid_current_report[PLOVER_HID_EPSIZE] = {0x50};
void plover_hid_update(uint8_t button, bool pressed) {
if (pressed) {
plover_hid_current_report[1 + button / 8] |= (1 << (7 - (button % 8)));
} else {
plover_hid_current_report[1 + button / 8] &= ~(1 << (7 - (button % 8)));
}
plover_hid_report_updated = true;
}
void plover_hid_task(void) {
if (!plover_hid_report_updated) {
return;
}
send_report(PLOVER_HID_IN_EPNUM, plover_hid_current_report, sizeof(plover_hid_current_report));
plover_hid_report_updated = false;
}
#endif
/*******************************************************************************
* Console
******************************************************************************/
@@ -711,6 +685,12 @@ void send_digitizer(report_digitizer_t *report) {
#endif
}
void send_plover_hid(report_plover_hid_t *report) {
#ifdef PLOVER_HID_ENABLE
send_report(PLOVER_HID_IN_EPNUM, report, sizeof(report_plover_hid_t));
#endif
}
/*******************************************************************************
* sendchar
******************************************************************************/
@@ -986,10 +966,6 @@ void protocol_post_task(void) {
MIDI_Device_USBTask(&USB_MIDI_Interface);
#endif
#ifdef PLOVER_HID_ENABLE
plover_hid_task();
#endif
#ifdef VIRTSER_ENABLE
virtser_task();
CDC_Device_USBTask(&cdc_device);