From 1460eacf8adc604792de0fd612231b69aa4470e3 Mon Sep 17 00:00:00 2001 From: zhuanghang Date: Thu, 18 Jun 2026 14:25:09 +0800 Subject: [PATCH] feat(802.15.4): avoid missing abort reason for multievents in 154 debug --- .../ieee802154/private_include/esp_ieee802154_util.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/components/ieee802154/private_include/esp_ieee802154_util.h b/components/ieee802154/private_include/esp_ieee802154_util.h index f2881607c23..fbbea32e3d2 100644 --- a/components/ieee802154/private_include/esp_ieee802154_util.h +++ b/components/ieee802154/private_include/esp_ieee802154_util.h @@ -53,10 +53,10 @@ static inline bool ieee802154_is_valid_channel(uint8_t channel) #define IEEE802154_RECORD_EVENT(a) do { \ g_ieee802154_probe.event[g_ieee802154_probe.event_index].event = a; \ g_ieee802154_probe.event[g_ieee802154_probe.event_index].state = ieee802154_get_state(); \ - if (a == IEEE802154_EVENT_RX_ABORT) { \ + if (a & IEEE802154_EVENT_RX_ABORT) { \ g_ieee802154_probe.event[g_ieee802154_probe.event_index].abort_reason.rx \ = ieee802154_ll_get_rx_abort_reason(); \ - } else if (a == IEEE802154_EVENT_TX_ABORT) { \ + } else if (a & IEEE802154_EVENT_TX_ABORT) { \ g_ieee802154_probe.event[g_ieee802154_probe.event_index].abort_reason.tx \ = ieee802154_ll_get_tx_abort_reason(); \ } \ @@ -128,14 +128,14 @@ typedef struct { #if CONFIG_IEEE802154_RECORD_ABORT #define IEEE802154_ASSERT_RECORD_ABORT_SIZE CONFIG_IEEE802154_RECORD_ABORT_SIZE #define IEEE802154_RECORD_ABORT(a) do { \ - if (a == IEEE802154_EVENT_RX_ABORT) { \ + if (a & IEEE802154_EVENT_RX_ABORT) { \ g_ieee802154_probe.abort[g_ieee802154_probe.abort_index].abort_reason.rx \ = ieee802154_ll_get_rx_abort_reason(); \ g_ieee802154_probe.abort[g_ieee802154_probe.abort_index].is_tx_abort = 0; \ g_ieee802154_probe.abort[g_ieee802154_probe.abort_index++].timestamp = esp_timer_get_time(); \ g_ieee802154_probe.abort_index = (g_ieee802154_probe.abort_index == IEEE802154_ASSERT_RECORD_ABORT_SIZE) ? \ 0 : g_ieee802154_probe.abort_index; \ - } else if (a == IEEE802154_EVENT_TX_ABORT) { \ + } else if (a & IEEE802154_EVENT_TX_ABORT) { \ g_ieee802154_probe.abort[g_ieee802154_probe.abort_index].abort_reason.tx \ = ieee802154_ll_get_tx_abort_reason();\ g_ieee802154_probe.abort[g_ieee802154_probe.abort_index].is_tx_abort = 1; \