fix: preserve current runtime debug state

This commit is contained in:
2026-04-18 05:29:11 +08:00
parent 6aba77df9a
commit cd48a8af68
11 changed files with 138 additions and 265 deletions
+7 -5
View File
@@ -406,6 +406,7 @@ bool uart_mux_encode_frame(uint8_t src_id,
void UartRxTask(void *argument)
{
uint32_t notify_value;
BaseType_t notified;
route_msg_t *msg;
uart_mux_frame_t frame;
const device_config_t *cfg;
@@ -418,18 +419,19 @@ void UartRxTask(void *argument)
debug_log_boot("uart-task-started");
for (;;) {
(void)xTaskNotifyWait(0u, 0xFFFFFFFFu, &notify_value, pdMS_TO_TICKS(10));
notify_value = 0u;
notified = xTaskNotifyWait(0u, 0xFFFFFFFFu, &notify_value, pdMS_TO_TICKS(10));
if ((notify_value & UART_NOTIFY_RX_U0) != 0u) {
if ((notified == pdTRUE) && ((notify_value & UART_NOTIFY_RX_U0) != 0u)) {
process_rx_snapshot(UART_CHANNEL_U0);
}
if ((notify_value & UART_NOTIFY_RX_U1) != 0u) {
if ((notified == pdTRUE) && ((notify_value & UART_NOTIFY_RX_U1) != 0u)) {
process_rx_snapshot(UART_CHANNEL_U1);
}
if ((notify_value & UART_NOTIFY_TX_U0) != 0u) {
if ((notified == pdTRUE) && ((notify_value & UART_NOTIFY_TX_U0) != 0u)) {
g_channels[UART_CHANNEL_U0].tx_busy = 0u;
}
if ((notify_value & UART_NOTIFY_TX_U1) != 0u) {
if ((notified == pdTRUE) && ((notify_value & UART_NOTIFY_TX_U1) != 0u)) {
g_channels[UART_CHANNEL_U1].tx_busy = 0u;
}