add toggle button for USB and improve BLE polling rate

This commit is contained in:
2025-10-18 22:38:23 -04:00
parent a1a0723e89
commit cb7421eab7
14 changed files with 323 additions and 121 deletions
+6
View File
@@ -13,6 +13,8 @@ char cdc_buf[64];
uint16_t cdc_len;
size_t cdc_count;
device_state_t device_state;
void usb_device_init(void) {
// run TinyUSB device
tusb_rhport_init_t dev_init = {
@@ -46,6 +48,10 @@ uint16_t tud_hid_get_report_cb(uint8_t instance, uint8_t report_id, hid_report_t
return 0;
}
bool forward_report(uint8_t instance, uint8_t const* report, uint16_t len) {
return tud_hid_n_report(instance, 0, report, len);
}
// print message to CDC in raw hex
void cdc_print_hex(uint8_t const* msg, uint16_t msg_len) {
(void) msg;