Skip to content

Commit b4854de

Browse files
mniestrojnashif
authored andcommitted
drivers: wifi: esp_at: rename driver from esp
Recently WiFi ESP32 driver (utilizing WiFi radio in ESP32 SoC) was introduced into drivers/wifi/esp32/ and it already caused confusion as there was existing drivers/wifi/esp/ directory for ESP-AT driver (utilizing external WiFi chip, by communicating using AT commands from any serial capable platform). So question has arisen whether it is good to merge both, while they are totally different drivers. Rename ESP-AT driver to be placed in drivers/wifi/esp_at/, so that it is easier to figure out difference between "esp32" and "esp_at" just by looking at driver name. Rename also DT compatible and all Kconfig options for the same reason. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com>
1 parent 84f599b commit b4854de

File tree

15 files changed

+65
-61
lines changed

15 files changed

+65
-61
lines changed

CODEOWNERS

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@
327327
/drivers/watchdog/wdt_handlers.c @dcpleung @nashif
328328
/drivers/watchdog/*cc32xx* @pavlohamov
329329
/drivers/wifi/ @jukkar @tbursztyka @pfalcon
330-
/drivers/wifi/esp/ @mniestroj
330+
/drivers/wifi/esp_at/ @mniestroj
331331
/drivers/wifi/eswifi/ @loicpoulain @nandojve
332332
/drivers/wifi/winc1500/ @kludentwo
333333
/drivers/virtualization/ @tbursztyka
@@ -385,7 +385,7 @@
385385
/dts/bindings/adc/st*stm32-adc.yaml @cybertale
386386
/dts/bindings/modem/*hl7800.yaml @rerickson1
387387
/dts/bindings/serial/ns16550.yaml @dcpleung @nashif
388-
/dts/bindings/wifi/*esp.yaml @mniestroj
388+
/dts/bindings/wifi/*esp-at.yaml @mniestroj
389389
/dts/bindings/*/*npcx* @MulinChao @WealianLiao @ChiHuaL
390390
/dts/bindings/*/*psoc6* @nandojve
391391
/dts/bindings/*/nordic* @anangl

boards/arm/arduino_nano_33_iot/arduino_nano_33_iot.dts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
txpo = <0>;
8585

8686
nina_prog {
87-
compatible = "espressif,esp";
87+
compatible = "espressif,esp-at";
8888
label = "NINA_PROG";
8989
reset-gpios = <&porta 8 GPIO_ACTIVE_LOW>;
9090
};

boards/shields/esp_8266/Kconfig.defconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ if SHIELD_ESP_8266 || \
77

88
if NETWORKING
99

10-
config WIFI_ESP
10+
config WIFI_ESP_AT
1111
default y
1212
depends on WIFI
1313

1414
choice WIFI_ESP_AT_VERSION
1515
default WIFI_ESP_AT_VERSION_1_7
16-
depends on WIFI_ESP
16+
depends on WIFI_ESP_AT
1717
endchoice
1818

1919
orsource "boards/*.defconfig"

boards/shields/esp_8266/boards/sam4e_xpro.overlay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
pinctrl-0 = <&pa21a_usart1_rxd1 &pa22a_usart1_txd1>;
1212

1313
esp8266 {
14-
compatible = "espressif,esp";
14+
compatible = "espressif,esp-at";
1515
label = "esp8266";
1616
status = "okay";
1717
};

boards/shields/esp_8266/esp_8266_arduino.overlay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
current-speed = <115200>;
1010

1111
esp8266 {
12-
compatible = "espressif,esp";
12+
compatible = "espressif,esp-at";
1313
label = "esp8266";
1414
status = "okay";
1515
};

boards/shields/esp_8266/esp_8266_mikrobus.overlay

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
current-speed = <115200>;
1010

1111
esp8266 {
12-
compatible = "espressif,esp";
12+
compatible = "espressif,esp-at";
1313
label = "esp8266";
1414
status = "okay";
1515
};

drivers/wifi/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,5 @@
33
add_subdirectory_ifdef(CONFIG_WIFI_WINC1500 winc1500)
44
add_subdirectory_ifdef(CONFIG_WIFI_SIMPLELINK simplelink)
55
add_subdirectory_ifdef(CONFIG_WIFI_ESWIFI eswifi)
6-
add_subdirectory_ifdef(CONFIG_WIFI_ESP esp)
6+
add_subdirectory_ifdef(CONFIG_WIFI_ESP_AT esp_at)
77
add_subdirectory_ifdef(CONFIG_WIFI_ESP32 esp32)

drivers/wifi/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ config WIFI_OFFLOAD
3232
source "drivers/wifi/winc1500/Kconfig.winc1500"
3333
source "drivers/wifi/simplelink/Kconfig.simplelink"
3434
source "drivers/wifi/eswifi/Kconfig.eswifi"
35-
source "drivers/wifi/esp/Kconfig.esp"
35+
source "drivers/wifi/esp_at/Kconfig.esp_at"
3636
source "drivers/wifi/esp32/Kconfig.esp32"
3737

3838
endif # WIFI

drivers/wifi/esp/CMakeLists.txt renamed to drivers/wifi/esp_at/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# SPDX-License-Identifier: Apache-2.0
22

3-
if(CONFIG_WIFI_ESP)
3+
if(CONFIG_WIFI_ESP_AT)
44

55
zephyr_library_include_directories(
66
${ZEPHYR_BASE}/drivers/modem
Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,110 +1,114 @@
11
# Copyright (c) 2019 Tobias Svehagen
22
# SPDX-License-Identifier: Apache-2.0
33

4-
menuconfig WIFI_ESP
5-
bool "Espressif ESP8266 and ESP32 support"
4+
menuconfig WIFI_ESP_AT
5+
bool "Espressif AT Command support"
66
select MODEM
77
select MODEM_CONTEXT
88
select MODEM_CMD_HANDLER
99
select MODEM_IFACE_UART
1010
select NET_L2_WIFI_MGMT
1111
select WIFI_OFFLOAD
12+
help
13+
Enable Espressif AT Command offloaded WiFi driver. It is supported on
14+
any serial capable platform and communicates with Espressif chips
15+
running ESP-AT firmware (https://github.com/espressif/esp-at).
1216

13-
if WIFI_ESP
17+
if WIFI_ESP_AT
1418

15-
config WIFI_ESP_RX_STACK_SIZE
19+
config WIFI_ESP_AT_RX_STACK_SIZE
1620
int "Stack size for the Espressif esp wifi driver RX thread"
1721
default 1024
1822
help
1923
This stack is used by the Espressif ESP RX thread.
2024

21-
config WIFI_ESP_RX_THREAD_PRIORITY
25+
config WIFI_ESP_AT_RX_THREAD_PRIORITY
2226
int "Priority of RX thread"
2327
default 7
2428
help
2529
Priority of thread used for processing RX data.
2630

27-
config WIFI_ESP_WORKQ_STACK_SIZE
31+
config WIFI_ESP_AT_WORKQ_STACK_SIZE
2832
int "Stack size for the esp driver work queue"
2933
default 2048
3034
help
3135
This stack is used by the work queue to pass off net_pkt data
3236
to the rest of the network stack, letting the rx thread continue
3337
processing data.
3438

35-
config WIFI_ESP_WORKQ_THREAD_PRIORITY
39+
config WIFI_ESP_AT_WORKQ_THREAD_PRIORITY
3640
int "Priority of work queue thread"
3741
default 7
3842
help
3943
Priority of thread used for processing driver work queue items.
4044

41-
config WIFI_ESP_MDM_RING_BUF_SIZE
45+
config WIFI_ESP_AT_MDM_RING_BUF_SIZE
4246
int "Modem ring buffer size"
4347
default 1024
4448
help
4549
Ring buffer size used by modem UART interface handler.
4650

47-
config WIFI_ESP_MDM_RX_BUF_COUNT
51+
config WIFI_ESP_AT_MDM_RX_BUF_COUNT
4852
int "Modem RX buffer count"
4953
default 30
5054
help
5155
Number of preallocated RX buffers used by modem command handler.
5256

53-
config WIFI_ESP_MDM_RX_BUF_SIZE
57+
config WIFI_ESP_AT_MDM_RX_BUF_SIZE
5458
int "Modem RX buffer size"
5559
default 128
5660
help
5761
Size of preallocated RX buffers used by modem command handler.
5862

59-
config WIFI_ESP_PASSIVE_MODE
63+
config WIFI_ESP_AT_PASSIVE_MODE
6064
bool "Use passive mode"
6165
help
6266
This lets the ESP handle the TCP window so that data can flow
6367
at a rate that the driver can handle. Without this, data might get
6468
lost if the driver cannot empty the device buffer quickly enough.
6569

66-
config WIFI_ESP_RESET_TIMEOUT
70+
config WIFI_ESP_AT_RESET_TIMEOUT
6771
int "Reset timeout"
6872
default 3000
6973
help
7074
How long to wait for device to become ready after AT+RST has been
7175
sent. This can vary with chipset (ESP8266/ESP32) and firmware
7276
version. This is ignored if a reset pin is configured.
7377

74-
config WIFI_ESP_RX_NET_PKT_ALLOC_TIMEOUT
78+
config WIFI_ESP_AT_RX_NET_PKT_ALLOC_TIMEOUT
7579
int "Network interface RX packet allocation timeout"
7680
default 5000
7781
help
7882
Network interface RX net_pkt allocation timeout in milliseconds.
7983

8084
choice
8185
prompt "ESP IP Address configuration"
82-
default WIFI_ESP_IP_DHCP
86+
default WIFI_ESP_AT_IP_DHCP
8387
help
8488
Choose whether to use an IP assigned by DHCP Server or
8589
configure a static IP Address.
8690

87-
config WIFI_ESP_IP_DHCP
91+
config WIFI_ESP_AT_IP_DHCP
8892
bool "DHCP"
8993
help
9094
Use DHCP to get an IP Address.
9195

92-
config WIFI_ESP_IP_STATIC
96+
config WIFI_ESP_AT_IP_STATIC
9397
bool "Static"
9498
help
9599
Setup Static IP Address.
96100

97101
endchoice
98102

99-
if WIFI_ESP_IP_STATIC
103+
if WIFI_ESP_AT_IP_STATIC
100104

101-
config WIFI_ESP_IP_ADDRESS
105+
config WIFI_ESP_AT_IP_ADDRESS
102106
string "ESP Station mode IP Address"
103107

104-
config WIFI_ESP_IP_GATEWAY
108+
config WIFI_ESP_AT_IP_GATEWAY
105109
string "Gateway Address"
106110

107-
config WIFI_ESP_IP_MASK
111+
config WIFI_ESP_AT_IP_MASK
108112
string "Network Mask"
109113

110114
endif
@@ -127,11 +131,11 @@ config WIFI_ESP_AT_VERSION_2_0
127131

128132
endchoice
129133

130-
config WIFI_ESP_DNS_USE
134+
config WIFI_ESP_AT_DNS_USE
131135
bool "Use DNS from ESP"
132136
depends on DNS_RESOLVER
133137
help
134138
Fetch DNS servers from ESP chip with AT+CIPDNS? command and apply that
135139
list to system DNS resolver.
136140

137-
endif # WIFI_ESP
141+
endif # WIFI_ESP_AT

0 commit comments

Comments
 (0)