cpu/esp32: cleanup esp_wifi config parameters
This commit is contained in:
parent
c0d4706bf8
commit
e83a8679b4
@ -168,34 +168,16 @@ static esp_err_t IRAM_ATTR _esp_system_event_handler(void *ctx, system_event_t *
|
|||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** TODO better place
|
|
||||||
* Default WiFi configuration, overwrite them with your configs
|
|
||||||
*/
|
|
||||||
#ifndef CONFIG_WIFI_STA_SSID
|
|
||||||
#define CONFIG_WIFI_STA_SSID "RIOT_AP"
|
|
||||||
#endif
|
|
||||||
#ifndef CONFIG_WIFI_STA_PASSWORD
|
|
||||||
#define CONFIG_WIFI_STA_PASSWORD "ThisistheRIOTporttoESP"
|
|
||||||
#endif
|
|
||||||
#ifndef CONFIG_WIFI_STA_CHANNEL
|
|
||||||
#define CONFIG_WIFI_STA_CHANNEL 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define CONFIG_WIFI_STA_SCAN_METHOD WIFI_ALL_CHANNEL_SCAN
|
|
||||||
#define CONFIG_WIFI_STA_SORT_METHOD WIFI_CONNECT_AP_BY_SIGNAL
|
|
||||||
#define CONFIG_WIFI_STA_RSSI -127
|
|
||||||
#define CONFIG_WIFI_STA_AUTHMODE WIFI_AUTH_WPA_WPA2_PSK
|
|
||||||
|
|
||||||
/* we use predefined station configuration */
|
/* we use predefined station configuration */
|
||||||
static wifi_config_t wifi_config_sta = {
|
static wifi_config_t wifi_config_sta = {
|
||||||
.sta = {
|
.sta = {
|
||||||
.ssid = CONFIG_WIFI_STA_SSID,
|
.ssid = ESP_WIFI_SSID,
|
||||||
.password = CONFIG_WIFI_STA_PASSWORD,
|
.password = ESP_WIFI_PASS,
|
||||||
.channel = CONFIG_WIFI_STA_CHANNEL,
|
.channel = 0,
|
||||||
.scan_method = CONFIG_WIFI_STA_SCAN_METHOD,
|
.scan_method = WIFI_ALL_CHANNEL_SCAN,
|
||||||
.sort_method = CONFIG_WIFI_STA_SORT_METHOD,
|
.sort_method = WIFI_CONNECT_AP_BY_SIGNAL,
|
||||||
.threshold.rssi = CONFIG_WIFI_STA_RSSI,
|
.threshold.rssi = -127,
|
||||||
.threshold.authmode = CONFIG_WIFI_STA_AUTHMODE
|
.threshold.authmode = WIFI_AUTH_WPA_WPA2_PSK
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@ -25,14 +25,33 @@
|
|||||||
* @name Set default configuration parameters for the ESP WiFi netdev driver
|
* @name Set default configuration parameters for the ESP WiFi netdev driver
|
||||||
* @{
|
* @{
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The size of the stack used for the ESP WIFI netdev driver thread.
|
||||||
|
*/
|
||||||
#ifndef ESP_WIFI_STACKSIZE
|
#ifndef ESP_WIFI_STACKSIZE
|
||||||
/** The size of the stack used for the ESP WiFi netdev driver thread */
|
#define ESP_WIFI_STACKSIZE (THREAD_STACKSIZE_DEFAULT)
|
||||||
#define ESP_WIFI_STACKSIZE THREAD_STACKSIZE_DEFAULT
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The priority of the ESP WiFi netdev driver thread. Should not be changed.
|
||||||
|
*/
|
||||||
#ifndef ESP_WIFI_PRIO
|
#ifndef ESP_WIFI_PRIO
|
||||||
/** The priority of the ESP WiFi netdev driver thread */
|
#define ESP_WIFI_PRIO (GNRC_NETIF_PRIO)
|
||||||
#define ESP_WIFI_PRIO GNRC_NETIF_PRIO
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief SSID of the AP to be used.
|
||||||
|
*/
|
||||||
|
#ifndef ESP_WIFI_SSID
|
||||||
|
#define ESP_WIFI_SSID "RIOT_AP"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Passphrase used for the AP as clear text (max. 64 chars).
|
||||||
|
*/
|
||||||
|
#ifndef ESP_WIFI_PASS
|
||||||
|
#define ESP_WIFI_PASS "ThisistheRIOTporttoESP"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/**@}*/
|
/**@}*/
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user