mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-26 20:53:11 +00:00
mesh: add duty cycle control and support only transmit/receive in actve duty cycle
This commit is contained in:
@@ -16,6 +16,7 @@
|
||||
#define __ESP_MESH_INTERNAL_H__
|
||||
|
||||
#include "esp_err.h"
|
||||
#include "esp_mesh.h"
|
||||
#include "esp_wifi.h"
|
||||
#include "esp_wifi_types.h"
|
||||
#include "esp_private/wifi.h"
|
||||
@@ -96,6 +97,19 @@ typedef struct {
|
||||
uint8_t toDS; /**< toDS state */
|
||||
} __attribute__((packed)) mesh_assoc_t;
|
||||
|
||||
/**
|
||||
* @brief Mesh PS duties
|
||||
*/
|
||||
typedef struct {
|
||||
uint8_t device;
|
||||
uint8_t parent;
|
||||
struct {
|
||||
bool used;
|
||||
uint8_t duty;
|
||||
uint8_t mac[6];
|
||||
} child[ESP_WIFI_MAX_CONN_NUM];
|
||||
} esp_mesh_ps_duties_t;
|
||||
|
||||
/*******************************************************
|
||||
* Function Definitions
|
||||
*******************************************************/
|
||||
@@ -263,6 +277,14 @@ esp_err_t esp_mesh_set_announce_interval(int short_ms, int long_ms);
|
||||
*/
|
||||
esp_err_t esp_mesh_get_announce_interval(int *short_ms, int *long_ms);
|
||||
|
||||
/**
|
||||
* @brief Get the running duties of device, parent and children
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK
|
||||
*/
|
||||
esp_err_t esp_mesh_ps_get_duties(esp_mesh_ps_duties_t* ps_duties);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user