From 988ec8be560e3fa527945e201d3a08ecd3e3d99f Mon Sep 17 00:00:00 2001 From: xiaqilin Date: Tue, 14 Sep 2021 13:24:30 +0800 Subject: [PATCH] ieee802154: add zigbee pending mode and config coordinator function --- components/ieee802154/include/esp_ieee802154.h | 18 ++++++++++++++++++ .../ieee802154/include/esp_ieee802154_types.h | 1 + 2 files changed, 19 insertions(+) diff --git a/components/ieee802154/include/esp_ieee802154.h b/components/ieee802154/include/esp_ieee802154.h index a8d4678e92..e31a5ca37e 100644 --- a/components/ieee802154/include/esp_ieee802154.h +++ b/components/ieee802154/include/esp_ieee802154.h @@ -192,6 +192,24 @@ void esp_ieee802154_get_extended_address(uint8_t *ext_addr); */ void esp_ieee802154_set_extended_address(const uint8_t *ext_addr); +/** + * @brief Get the device coordinator. + * + * @return + * - True The coordinator is enabled. + * - False The coordinator is disabled. + * + */ +bool esp_ieee802154_get_coordinator(void); + +/** + * @brief Set the device coordinator role. + * + * @param[in] enable The coordinator role to be set. + * + */ +void esp_ieee802154_set_coordinator(bool enable); + /** * @brief Get the auto frame pending mode. * diff --git a/components/ieee802154/include/esp_ieee802154_types.h b/components/ieee802154/include/esp_ieee802154_types.h index 1407563171..823e3cdcf3 100644 --- a/components/ieee802154/include/esp_ieee802154_types.h +++ b/components/ieee802154/include/esp_ieee802154_types.h @@ -62,6 +62,7 @@ typedef enum { ESP_IEEE802154_AUTO_PENDING_DISABLE, /*!< Frame pending bit always set to 1 in the ack to Data Request */ ESP_IEEE802154_AUTO_PENDING_ENABLE, /*!< Frame pending bit set to 1 if src address matches, in the ack to Data Request */ ESP_IEEE802154_AUTO_PENDING_ENHANCED, /*!< Frame pending bit set to 1 if src address matches, in all ack frames */ + ESP_IEEE802154_AUTO_PENDING_ZIGBEE, /*!< Frame pending bit set to 0 only if src address is short address and matches in table, in the ack to Data Request */ } esp_ieee802154_pending_mode_t; /**