Added WiFi channel selection
This commit is contained in:
@ -51,7 +51,8 @@
|
||||
.max_waiting_time = 1000, \
|
||||
.id_vector_size = 100, \
|
||||
.route_vector_size = 100, \
|
||||
.wifi_interface = WIFI_IF_STA \
|
||||
.wifi_interface = WIFI_IF_STA, \
|
||||
.wifi_channel = 1 \
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
@ -76,6 +77,7 @@ extern "C"
|
||||
uint16_t id_vector_size; ///< Maximum size of unique ID of received messages. @note If the size is exceeded, the first value will be deleted. Minimum recommended value: number of planned nodes in the network + 10%.
|
||||
uint16_t route_vector_size; ///< The maximum size of the routing table. @note If the size is exceeded, the first route will be deleted. Minimum recommended value: number of planned nodes in the network + 10%.
|
||||
wifi_interface_t wifi_interface; ///< WiFi interface (STA or AP) used for ESP-NOW operation. @note The MAC address of the device depends on the selected WiFi interface.
|
||||
uint8_t wifi_channel; ///< Wi-Fi channel uses to send/receive ESPNOW data. @note Values from 1 to 14.
|
||||
} zh_network_init_config_t;
|
||||
|
||||
/// \cond
|
||||
@ -140,7 +142,7 @@ extern "C"
|
||||
* - ESP_ERR_WIFI_NOT_INIT if WiFi is not initialized
|
||||
* - ESP_FAIL if any internal error
|
||||
*/
|
||||
esp_err_t zh_network_init(zh_network_init_config_t *config);
|
||||
esp_err_t zh_network_init(const zh_network_init_config_t *config);
|
||||
|
||||
/**
|
||||
* @brief Deinitialize ESP-NOW interface.
|
||||
|
Reference in New Issue
Block a user