fix(ieee802154): fix ieee802154 include header file issue and unused value issue

pull/13557/merge
xiaqilin 2024-03-25 15:50:48 +08:00 zatwierdzone przez BOT
rodzic e169a5592c
commit 34dacbb6ac
2 zmienionych plików z 9 dodań i 6 usunięć

Wyświetl plik

@ -764,8 +764,9 @@ esp_err_t ieee802154_mac_deinit(void)
if (s_ieee802154_isr_handle) {
ret = esp_intr_free(s_ieee802154_isr_handle);
s_ieee802154_isr_handle = NULL;
ESP_RETURN_ON_FALSE(ret == ESP_OK, ESP_FAIL, IEEE802154_TAG, "IEEE802154 MAC ISR deinit failed");
}
ret = ieee802154_sleep_deinit();
ESP_RETURN_ON_FALSE(ieee802154_sleep_deinit() == ESP_OK, ESP_FAIL, IEEE802154_TAG, "IEEE802154 MAC sleep deinit failed");
return ret;
}

Wyświetl plik

@ -8,6 +8,8 @@
#include <stdint.h>
#include <stdbool.h>
#include "sdkconfig.h"
#include "soc/soc_caps.h"
#include "esp_ieee802154_dev.h"
#include "hal/ieee802154_ll.h"
#include "esp_timer.h"
@ -172,7 +174,7 @@ extern ieee802154_probe_info_t g_ieee802154_probe;
*/
void ieee802154_assert_print(void);
#define IEEE802154_ASSERT(a) do { \
if(!(a)) { \
if(unlikely(!(a))) { \
ieee802154_assert_print(); \
assert(a); \
} \
@ -280,9 +282,9 @@ void ieee802154_set_txrx_pti(ieee802154_txrx_scene_t txrx_scene);
#endif // !CONFIG_IEEE802154_TEST && CONFIG_ESP_COEX_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE
/**
* @brief Convert the frequence to the index of channel.
* @brief Convert the frequency to the index of channel.
*
* @param[in] freq The frequence where the radio is processing.
* @param[in] freq The frequency where the radio is processing.
*
* @return
* The channel index.
@ -291,12 +293,12 @@ void ieee802154_set_txrx_pti(ieee802154_txrx_scene_t txrx_scene);
uint8_t ieee802154_freq_to_channel(uint8_t freq);
/**
* @brief Convert the index of channel to the frequence.
* @brief Convert the index of channel to the frequency.
*
* @param[in] channel The index of channel where the radio is processing.
*
* @return
* The frequence.
* The frequency.
*
*/
uint8_t ieee802154_channel_to_freq(uint8_t channel);