Skip to content

Commit 5b574ad

Browse files
committed
Merge branch 'feature/add_webserver' into 'master'
feat: add webserver command See merge request application/esp-at!727
2 parents cf5c761 + f70ab64 commit 5b574ad

39 files changed

+2462
-4
lines changed

components/at/CMakeLists.txt

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22
set(require_components ${IDF_TARGET} mqtt mdns esp_http_client json freertos spiffs
3-
bootloader_support app_update openssl wpa_supplicant spi_flash)
3+
bootloader_support app_update openssl wpa_supplicant spi_flash esp_http_server)
44

55
if ("${IDF_TARGET}" STREQUAL "esp32")
66
list(APPEND require_components bt fatfs)
@@ -12,11 +12,18 @@ endif()
1212

1313
file(GLOB_RECURSE srcs src/*.c)
1414

15+
if (CONFIG_AT_WEB_SERVER_SUPPORT)
16+
if(NOT CONFIG_AT_WEB_USE_FATFS)
17+
set(embed_txt_files ../fs_image/index.html)
18+
endif()
19+
endif()
20+
1521
idf_component_register (
1622
SRCS ${srcs}
1723
INCLUDE_DIRS include
1824
PRIV_INCLUDE_DIRS private_include
19-
REQUIRES ${require_components})
25+
REQUIRES ${require_components}
26+
EMBED_TXTFILES ${embed_txt_files})
2027

2128
if (${SILENCE} EQUAL 1)
2229
set(LIB_NAME _at_core_silence)

components/at/component.mk

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,9 @@ COMPONENT_ADD_LINKER_DEPS := $(patsubst %,$(COMPONENT_PATH)/lib/lib%.a,$(LIBS))
1717

1818
ALL_LIB_FILES := $(patsubst %,$(COMPONENT_PATH)/lib/lib%.a,$(LIBS))
1919
$(COMPONENT_LIBRARY): $(ALL_LIB_FILES)
20+
21+
ifdef CONFIG_AT_WEB_SERVER_SUPPORT
22+
ifndef CONFIG_AT_WEB_USE_FATFS
23+
COMPONENT_EMBED_TXTFILES := ../fs_image/index.html
24+
endif
25+
endif

components/at/include/esp_at.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,4 +69,9 @@ uint32_t esp_at_get_module_id(void);
6969
*/
7070
void esp_at_board_init(void);
7171

72+
/**
73+
* @brief regist WiFi config via web command. If not,you can not use web server to config wifi connect
74+
*
75+
*/
76+
bool esp_at_web_server_cmd_regist(void);
7277
#endif

0 commit comments

Comments
 (0)