Procházet zdrojové kódy

ieee802154: add zigbee pending mode and config coordinator function

xiaqilin před 4 roky
rodič
revize
988ec8be56

+ 18 - 0
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.
  *

+ 1 - 0
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;
 
 /**