Add raw_hid support to host driver (#25255)

This commit is contained in:
Joel Challis 2025-05-11 23:38:48 +01:00 committed by GitHub
parent c045c3e00c
commit 88c094908b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 95 additions and 36 deletions

View file

@ -55,6 +55,9 @@ host_driver_t bt_driver = {
.send_nkro = bluetooth_send_nkro,
.send_mouse = bluetooth_send_mouse,
.send_extra = bluetooth_send_extra,
# ifdef RAW_ENABLE
.send_raw_hid = bluetooth_send_raw_hid,
# endif
};
#endif
@ -299,6 +302,15 @@ void host_programmable_button_send(uint32_t data) {
__attribute__((weak)) void send_programmable_button(report_programmable_button_t *report) {}
#ifdef RAW_ENABLE
void host_raw_hid_send(uint8_t *data, uint8_t length) {
host_driver_t *driver = host_get_active_driver();
if (!driver || !driver->send_raw_hid) return;
(*driver->send_raw_hid)(data, length);
}
#endif
uint16_t host_last_system_usage(void) {
return last_system_usage;
}