From 4bf58ea0c22eb5f0069364b16aebbbea9b662559 Mon Sep 17 00:00:00 2001 From: Xu Si Yu Date: Tue, 24 Sep 2024 14:17:21 +0800 Subject: [PATCH] fix(ieee802154): fix a bug in the usage of a macro --- components/ieee802154/driver/esp_ieee802154_dev.c | 2 +- components/ieee802154/driver/esp_ieee802154_util.c | 2 +- components/ieee802154/private_include/esp_ieee802154_util.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/ieee802154/driver/esp_ieee802154_dev.c b/components/ieee802154/driver/esp_ieee802154_dev.c index b2a00dc23a..609af48a58 100644 --- a/components/ieee802154/driver/esp_ieee802154_dev.c +++ b/components/ieee802154/driver/esp_ieee802154_dev.c @@ -773,7 +773,7 @@ esp_err_t ieee802154_mac_init(void) ieee802154_ll_enable_rx_abort_events(BIT(IEEE802154_RX_ABORT_BY_TX_ACK_TIMEOUT - 1) | BIT(IEEE802154_RX_ABORT_BY_TX_ACK_COEX_BREAK - 1)); ieee802154_ll_set_ed_sample_mode(IEEE802154_ED_SAMPLE_AVG); -#if !CONFIG_IEEE802154_TEST && CONFIG_ESP_COEX_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE +#if !CONFIG_IEEE802154_TEST && (CONFIG_ESP_COEX_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE) esp_coex_ieee802154_ack_pti_set(IEEE802154_MIDDLE); IEEE802154_SET_TXRX_PTI(IEEE802154_SCENE_IDLE); #else diff --git a/components/ieee802154/driver/esp_ieee802154_util.c b/components/ieee802154/driver/esp_ieee802154_util.c index bb486fdea9..c3ffed0a94 100644 --- a/components/ieee802154/driver/esp_ieee802154_util.c +++ b/components/ieee802154/driver/esp_ieee802154_util.c @@ -21,7 +21,7 @@ uint8_t ieee802154_channel_to_freq(uint8_t channel) return (channel - 11) * 5 + 3; } -#if !CONFIG_IEEE802154_TEST && CONFIG_ESP_COEX_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE +#if !CONFIG_IEEE802154_TEST && (CONFIG_ESP_COEX_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE) void ieee802154_set_txrx_pti(ieee802154_txrx_scene_t txrx_scene) { diff --git a/components/ieee802154/private_include/esp_ieee802154_util.h b/components/ieee802154/private_include/esp_ieee802154_util.h index 7949e5286d..c1e843055a 100644 --- a/components/ieee802154/private_include/esp_ieee802154_util.h +++ b/components/ieee802154/private_include/esp_ieee802154_util.h @@ -265,7 +265,7 @@ typedef enum { IEEE802154_SCENE_RX_AT, /*!< IEEE802154 radio coexistence scene RX AT */ } ieee802154_txrx_scene_t; -#if !CONFIG_IEEE802154_TEST && CONFIG_ESP_COEX_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE +#if !CONFIG_IEEE802154_TEST && (CONFIG_ESP_COEX_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE) /** * @brief Set the IEEE802154 radio coexistence scene during transmitting or receiving.