add usb serial for debug firmware

Code by gpt5.5-xhigh
This commit is contained in:
awalol
2026-05-08 13:54:07 +08:00
parent b2b92959ca
commit be01dc439e
5 changed files with 97 additions and 16 deletions
+4
View File
@@ -298,7 +298,9 @@ static void hci_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t *p
}
case HCI_EVENT_DISCONNECTION_COMPLETE: {
#ifndef ENABLE_SERIAL
tud_disconnect();
#endif
gap_connectable_control(1);
gap_discoverable_control(1);
const uint8_t reason = hci_event_disconnection_complete_get_reason(packet);
@@ -345,7 +347,9 @@ static void l2cap_packet_handler(uint8_t packet_type, uint16_t channel, uint8_t
}else if (size > 1){
is_dse = true;
}
#ifndef ENABLE_SERIAL
tud_connect();
#endif
}
if (packet[0] == 0xA3) {
uint8_t report_id = packet[1];