mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
esp_http_client: remove dependency of esp_stubs from esp_http_client. Add esp_event stubs in linux
component
This commit is contained in:
parent
674fd8feb8
commit
0cc243a8cc
@ -1,7 +1,7 @@
|
||||
if(NOT ${IDF_TARGET} STREQUAL "linux")
|
||||
set(req lwip esp_event)
|
||||
else()
|
||||
set(req esp_stubs)
|
||||
set(req linux)
|
||||
endif()
|
||||
|
||||
idf_component_register(SRCS "esp_http_client.c"
|
||||
|
@ -3,5 +3,6 @@ if(NOT "${target}" STREQUAL "linux")
|
||||
return()
|
||||
endif()
|
||||
|
||||
idf_component_register(INCLUDE_DIRS include
|
||||
idf_component_register(SRCS esp_event_stubs.c
|
||||
INCLUDE_DIRS include ${IDF_PATH}/components/esp_event/include
|
||||
REQUIRED_IDF_TARGETS linux)
|
||||
|
18
components/linux/esp_event_stubs.c
Normal file
18
components/linux/esp_event_stubs.c
Normal file
@ -0,0 +1,18 @@
|
||||
/*
|
||||
* 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;
|
||||
}
|
@ -10,17 +10,6 @@
|
||||
|
||||
extern void app_main(void);
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
esp_err_t esp_netif_init(void)
|
||||
{
|
||||
return ESP_OK;
|
||||
|
@ -5,13 +5,4 @@
|
||||
*/
|
||||
#include "esp_err.h"
|
||||
|
||||
typedef const char* esp_event_base_t; /**< unique pointer to a subsystem that exposes events */
|
||||
typedef unsigned long TickType_t;
|
||||
|
||||
#define ESP_EVENT_DECLARE_BASE(id) extern esp_event_base_t id
|
||||
#define ESP_EVENT_DEFINE_BASE(id) esp_event_base_t id = #id
|
||||
|
||||
esp_err_t esp_event_loop_create_default(void);
|
||||
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user