mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
feat(802.15.4): add multipan pending table support
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -10,6 +10,7 @@
|
||||
#include <stdbool.h>
|
||||
#include "sdkconfig.h"
|
||||
#include "esp_err.h"
|
||||
#include "esp_ieee802154_types.h"
|
||||
#include "esp_ieee802154_frame.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -40,7 +41,7 @@ typedef struct {
|
||||
* - ESP_FAIL on failure due to the table is full.
|
||||
*
|
||||
*/
|
||||
esp_err_t ieee802154_add_pending_addr(const uint8_t *addr, bool is_short);
|
||||
esp_err_t ieee802154_add_pending_addr(esp_ieee802154_multipan_index_t inf_index, const uint8_t *addr, bool is_short);
|
||||
|
||||
/**
|
||||
* @brief Remove an address in pending table.
|
||||
@@ -53,7 +54,7 @@ esp_err_t ieee802154_add_pending_addr(const uint8_t *addr, bool is_short);
|
||||
* - ESP_FAIL on failure if the given address is not present in the pending table.
|
||||
*
|
||||
*/
|
||||
esp_err_t ieee802154_clear_pending_addr(const uint8_t *addr, bool is_short);
|
||||
esp_err_t ieee802154_clear_pending_addr(esp_ieee802154_multipan_index_t inf_index, const uint8_t *addr, bool is_short);
|
||||
|
||||
/**
|
||||
* @brief Reset the pending table, only clear the mask bits for finishing the process quickly.
|
||||
@@ -61,7 +62,7 @@ esp_err_t ieee802154_clear_pending_addr(const uint8_t *addr, bool is_short);
|
||||
* @param[in] is_short The type of address, true for resetting short address table, false for extended.
|
||||
*
|
||||
*/
|
||||
void ieee802154_reset_pending_table(bool is_short);
|
||||
void ieee802154_reset_pending_table(esp_ieee802154_multipan_index_t inf_index, bool is_short);
|
||||
|
||||
/**
|
||||
* @brief Check whether the pending bit should be set or not in the ack frame.
|
||||
@@ -72,7 +73,7 @@ void ieee802154_reset_pending_table(bool is_short);
|
||||
* - True The pending bit should be set, otherwise False.
|
||||
*
|
||||
*/
|
||||
bool ieee802154_ack_config_pending_bit(const uint8_t *frame);
|
||||
bool ieee802154_ack_config_pending_bit(const uint8_t *frame, const esp_ieee802154_frame_info_t *frame_info);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2026 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2025 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -8,6 +8,7 @@
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdint.h>
|
||||
#include "sdkconfig.h"
|
||||
#include "hal/ieee802154_ll.h"
|
||||
#include "esp_ieee802154_frame.h"
|
||||
#include "esp_ieee802154_types.h"
|
||||
@@ -28,7 +29,7 @@ typedef struct {
|
||||
bool rx_when_idle; /*!< A flag indicates the device is rx on when idle or not */
|
||||
esp_ieee802154_txpower_table_t power_table; /*!< The power table configuration */
|
||||
uint8_t channel; /*!< Channel configuration */
|
||||
ieee802154_ll_pending_mode_t pending_mode; /*!< Pending mode configuration */
|
||||
ieee802154_ll_pending_mode_t pending_mode[CONFIG_IEEE802154_INTERFACE_NUM]; /*!< Pending mode configuration */
|
||||
int8_t cca_threshold; /*!< CCA threshold */
|
||||
ieee802154_ll_cca_mode_t cca_mode; /*!< CCA mode */
|
||||
} ieee802154_pib_t;
|
||||
@@ -248,7 +249,7 @@ bool ieee802154_pib_get_coordinator(void);
|
||||
* @param[in] pending_mode The pending mode.
|
||||
*
|
||||
*/
|
||||
void ieee802154_pib_set_pending_mode(ieee802154_ll_pending_mode_t pending_mode);
|
||||
void ieee802154_pib_set_pending_mode(esp_ieee802154_multipan_index_t inf_index, ieee802154_ll_pending_mode_t pending_mode);
|
||||
|
||||
/**
|
||||
* @brief Get the pending mode from the PIB.
|
||||
@@ -256,7 +257,7 @@ void ieee802154_pib_set_pending_mode(ieee802154_ll_pending_mode_t pending_mode);
|
||||
* @return
|
||||
* - The pending mode has been set in the PIB.
|
||||
*/
|
||||
ieee802154_ll_pending_mode_t ieee802154_pib_get_pending_mode(void);
|
||||
ieee802154_ll_pending_mode_t ieee802154_pib_get_pending_mode(esp_ieee802154_multipan_index_t inf_index);
|
||||
|
||||
/**
|
||||
* @brief Configure the radio mode when the radio is going to enter idle to the PIB.
|
||||
|
||||
Reference in New Issue
Block a user