fix(core,led,usb): eliminate dual-core race conditions and correct RGB LED indicator behavior
- Unified key_engine_tick and key events on Core 0 with recursive mutex to eliminate stuck key race conditions - Added HID hardware report mutex lock in usb_composite to ensure 100% reliable report delivery - Fixed RGB LED logic: solid red on disconnect, solid green on standby, solid blue on voice record, yellow flash on HID press - Removed UAC endpoint enumeration false blue-light trigger
This commit is contained in:
1 parent
3889c9fc77
commit
3198c884a8
5 files changed
+78
-16
No files matched your search
+4
-6
@@ -21,6 +21,7 @@ static void ble_task_core0(void* param) {
|
||||
|
||||
while (true) {
|
||||
ble_remote_task();
|
||||
key_engine_tick(&g_key_engine, millis());
|
||||
vTaskDelay(pdMS_TO_TICKS(5));
|
||||
}
|
||||
}
|
||||
@@ -80,16 +81,13 @@ void loop() {
|
||||
// 1. Service TinyUSB & Audio push
|
||||
usb_composite_task();
|
||||
|
||||
// 2. Service Key State Machine timers (long press, double click, repeat)
|
||||
key_engine_tick(&g_key_engine, now);
|
||||
|
||||
// 3. Service Wi-Fi & DNS tasks
|
||||
// 2. Service Wi-Fi & DNS tasks
|
||||
wifi_manager_task();
|
||||
|
||||
// 4. Service HTTP Web Server
|
||||
// 3. Service HTTP Web Server
|
||||
web_server_task();
|
||||
|
||||
// 5. Service Serial / WebSerial CLI commands
|
||||
// 4. Service Serial / WebSerial CLI commands
|
||||
cli_manager_task();
|
||||
|
||||
// No delay here — USB audio task handles its own timing via vTaskDelayUntil
|
||||
|
||||
Reference in new issue
Block a user