drivers: wifi: esp_at: add support for firmware
V2.1 for ESP At and make it to coexist with the current versions. Signed-off-by: Felipe Neves <felipe.neves@linaro.org>
This commit is contained in:
parent
ddfceb6ad5
commit
44631ebada
|
@ -130,7 +130,7 @@ endif
|
|||
|
||||
choice WIFI_ESP_AT_VERSION
|
||||
prompt "AT version"
|
||||
default WIFI_ESP_AT_VERSION_2_0
|
||||
default WIFI_ESP_AT_VERSION_2_1
|
||||
help
|
||||
Select which version of AT command set should be used.
|
||||
|
||||
|
@ -144,6 +144,11 @@ config WIFI_ESP_AT_VERSION_2_0
|
|||
help
|
||||
Use AT command set version 2.0.
|
||||
|
||||
config WIFI_ESP_AT_VERSION_2_1
|
||||
bool "AT version 2.1"
|
||||
help
|
||||
Use AT command set version 2.1.
|
||||
|
||||
endchoice
|
||||
|
||||
config WIFI_ESP_AT_DNS_USE
|
||||
|
|
|
@ -970,7 +970,7 @@ static void esp_init_work(struct k_work *work)
|
|||
SETUP_CMD_NOHANDLE(
|
||||
ESP_CMD_CWLAPOPT(ESP_CMD_CWLAPOPT_ORDERED, ESP_CMD_CWLAPOPT_MASK)),
|
||||
|
||||
#if defined(CONFIG_WIFI_ESP_AT_VERSION_2_0)
|
||||
#if !defined(CONFIG_WIFI_ESP_AT_VERSION_1_7)
|
||||
SETUP_CMD_NOHANDLE(ESP_CMD_CWMODE(STA)),
|
||||
SETUP_CMD_NOHANDLE("AT+CWAUTOCONN=0"),
|
||||
SETUP_CMD_NOHANDLE(ESP_CMD_CWMODE(NONE)),
|
||||
|
|
|
@ -107,7 +107,7 @@ extern "C" {
|
|||
#define ESP_MODE_AP 2
|
||||
#define ESP_MODE_STA_AP 3
|
||||
|
||||
#if defined(CONFIG_WIFI_ESP_AT_VERSION_1_7)
|
||||
#if defined(CONFIG_WIFI_ESP_AT_VERSION_1_7) || defined(CONFIG_WIFI_ESP_AT_VERSION_2_0)
|
||||
#define ESP_CMD_CWMODE(mode) "AT+"_CWMODE"="STRINGIFY(_CONCAT(ESP_MODE_, mode))
|
||||
#else
|
||||
#define ESP_CMD_CWMODE(mode) "AT+"_CWMODE"="STRINGIFY(_CONCAT(ESP_MODE_, mode))",0"
|
||||
|
|
Loading…
Reference in a new issue