mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-10 04:43:33 +00:00
examples: modify other examples and tests to use esp_netif instead of tcpip_adapter
This commit is contained in:
@@ -17,7 +17,7 @@
|
||||
#include "test_utils.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "tcpip_adapter.h"
|
||||
#include "esp_netif.h"
|
||||
#include "lwip/sockets.h"
|
||||
|
||||
const esp_partition_t *get_test_data_partition(void)
|
||||
@@ -32,7 +32,7 @@ const esp_partition_t *get_test_data_partition(void)
|
||||
void test_case_uses_tcpip(void)
|
||||
{
|
||||
// Can be called more than once, does nothing on subsequent calls
|
||||
tcpip_adapter_init();
|
||||
esp_netif_init();
|
||||
|
||||
// Allocate all sockets then free them
|
||||
// (First time each socket is allocated some one-time allocations happen.)
|
||||
@@ -49,7 +49,7 @@ void test_case_uses_tcpip(void)
|
||||
// Allow LWIP tasks to finish initialising themselves
|
||||
vTaskDelay(25 / portTICK_RATE_MS);
|
||||
|
||||
printf("Note: tcpip_adapter_init() has been called. Until next reset, TCP/IP task will periodicially allocate memory and consume CPU time.\n");
|
||||
printf("Note: esp_netif_init() has been called. Until next reset, TCP/IP task will periodicially allocate memory and consume CPU time.\n");
|
||||
|
||||
// Reset the leak checker as LWIP allocates a lot of memory on first run
|
||||
unity_reset_leak_checks();
|
||||
|
Reference in New Issue
Block a user