lwip/linux: Add lwip support for networking component under linux

linux/lwip: Wrap some IO posix functions
* to workaourd the FreeRTOS EINTR issue (when building without lwip)
* to correctly choose the sub-system based on fd (when building with
lwip) -- passing control to either linux/system or to lwip
This commit also addapts tapio-if to provide DHCP client by default and
configurable settings for static IP
This commit is contained in:
David Cermak
2023-04-03 20:31:51 +02:00
committed by David Čermák
parent 0bfffa0160
commit b2af4d9689
31 changed files with 277 additions and 88 deletions
+1 -2
View File
@@ -3,6 +3,5 @@ if(NOT "${target}" STREQUAL "linux")
return()
endif()
idf_component_register(SRCS esp_event_stubs.c
INCLUDE_DIRS include ${IDF_PATH}/components/esp_event/include
idf_component_register(INCLUDE_DIRS include
REQUIRED_IDF_TARGETS linux)
-18
View File
@@ -1,18 +0,0 @@
/*
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#include "esp_err.h"
#include "esp_event.h"
esp_err_t esp_event_loop_create_default(void)
{
return ESP_OK;
}
esp_err_t esp_event_post(esp_event_base_t event_base, int32_t event_id,
const void* event_data, size_t event_data_size, TickType_t ticks_to_wait)
{
return ESP_OK;
}
+1 -1
View File
@@ -9,7 +9,7 @@
extern "C" {
#endif
#if CONFIG_IDF_TARGET_LINUX
#if CONFIG_IDF_TARGET_LINUX && !defined(__containerof)
#define __containerof(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})