Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

idf 5.x support #153

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ Module.symvers
Mkfile.old
dkms.conf

#esp idf
sdkconfig
sdkconfig.old
managed_components/
dependencies.lock
**/build/

# Eclipse
.metadata/
RemoteSystemsTempFiles/.project
Expand All @@ -60,9 +67,7 @@ RemoteSystemsTempFiles/.project
*.d
wifi_manager/.cproject
wifi_manager/.project
sdkconfig
sdkconfig.old
**/build/

#doxygen
Doxyfile
wifi_manager/doc/
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
if(IDF_VERSION_MAJOR GREATER_EQUAL 4)
idf_component_register(SRC_DIRS src
REQUIRES log nvs_flash mdns wpa_supplicant lwip esp_http_server
REQUIRES log nvs_flash mdns wpa_supplicant lwip esp_http_server esp_wifi
INCLUDE_DIRS src
EMBED_FILES src/style.css src/code.js src/index.html)
else()
set(COMPONENT_SRCDIRS src)
set(COMPONENT_ADD_INCLUDEDIRS src)
set(COMPONENT_REQUIRES log nvs_flash mdns wpa_supplicant lwip esp_http_server)
set(COMPONENT_REQUIRES log nvs_flash mdns wpa_supplicant lwip esp_http_server esp_wifi)
set(COMPONENT_EMBED_FILES src/style.css src/code.js src/index.html)
register_component()
endif()
6 changes: 6 additions & 0 deletions examples/default_demo/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## IDF Component Manager Manifest File
dependencies:
espressif/mdns:
version: "^1.0.3"
rules:
- if: "idf_version >=5.0"
11 changes: 6 additions & 5 deletions examples/default_demo/main/user_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,11 @@ SOFTWARE.
#include <string.h>
#include <esp_wifi.h>
#include <esp_netif.h>
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include "esp_log.h"
#include <freertos/FreeRTOS.h>
#include <freertos/task.h>
#include <esp_system.h>
#include <esp_log.h>
#include <lwip/ip4_addr.h>

#include "wifi_manager.h"

Expand All @@ -47,7 +48,7 @@ static const char TAG[] = "main";
void monitoring_task(void *pvParameter)
{
for(;;){
ESP_LOGI(TAG, "free heap: %d",esp_get_free_heap_size());
ESP_LOGI(TAG, "free heap: %"PRIu32, esp_get_free_heap_size());
vTaskDelay( pdMS_TO_TICKS(10000) );
}
}
Expand Down
6 changes: 6 additions & 0 deletions examples/http_hook/main/idf_component.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## IDF Component Manager Manifest File
dependencies:
espressif/mdns:
version: "^1.0.3"
rules:
- if: "idf_version >=5.0"
26 changes: 13 additions & 13 deletions src/wifi_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,25 +34,25 @@ Contains the freeRTOS task and all necessary support
#include <string.h>
#include <stdbool.h>
#include <stdint.h>
#include "esp_system.h"
#include <esp_system.h>
#include <freertos/FreeRTOS.h>
#include <freertos/queue.h>
#include <freertos/task.h>
#include <freertos/event_groups.h>
#include <freertos/timers.h>
#include <http_app.h>
#include "esp_wifi.h"
#include "esp_event.h"
#include "esp_netif.h"
#include "esp_wifi_types.h"
#include "esp_log.h"
#include "nvs.h"
#include "nvs_flash.h"
#include "mdns.h"
#include "lwip/api.h"
#include "lwip/err.h"
#include "lwip/netdb.h"
#include "lwip/ip4_addr.h"
#include <esp_wifi.h>
#include <esp_event.h>
#include <esp_netif.h>
#include <esp_wifi_types.h>
#include <esp_log.h>
#include <nvs.h>
#include <nvs_flash.h>
#include <mdns.h>
#include <lwip/api.h>
#include <lwip/err.h>
#include <lwip/netdb.h>
#include <lwip/ip4_addr.h>


#include "json.h"
Expand Down