Skip to content

Commit 3936490

Browse files
authored
esp_wifi_remote/esp_hosted bindings. (#404)
Both the esp_wifi_remote and esp_hosted bindings have been added, along with a fix for a missing ESP_IDF_VERSION set that comes from the get_idf_version function in idf_tools.py, which is called by idf.py during build. Since we're not using idf.py directly, we're missing this environment variable and setting it here fixes this gap for modules that use it.
1 parent 64667a3 commit 3936490

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2525
- Add raw bindings for `esp_lcd_mipi_dsi.h` and `esp_ldo_regulator.h` (#398)
2626
- Pulse counter bindings for esp32p4
2727
- `impl core::error::Error for EspError`
28+
- Added bindings for esp_wifi_remote and esp_hosted
2829

2930
### Fixed
3031
- Fix the `esp_app_desc!` macro so the reserv3 field is correct for ESP IDF v5.4

resources/cmake_project/CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,14 @@ set(SDKCONFIG_DEFAULTS $ENV{SDKCONFIG_DEFAULTS})
99

1010
include($ENV{IDF_PATH}/tools/cmake/project.cmake)
1111

12+
# Set ESP_IDF_VERSION env var for components that need it (e.g. esp_wifi_remote Kconfig).
13+
# ESP-IDF's version.cmake only sets IDF_VERSION, not ESP_IDF_VERSION.
14+
# Use major.minor format to match component Kconfig filenames (e.g. Kconfig.idf_v5.3.in).
15+
# Looks like this is set in idf_tools.py in esp-idf, but since we're not using esp-idf's,
16+
# build system directly, and some components expect this env var to be set, we need to set it here. See
17+
# https://github.com/espressif/esp-wifi-remote/issues/85
18+
set(ENV{ESP_IDF_VERSION} "${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}")
19+
1220
set(dependencies_lock "${CMAKE_CURRENT_LIST_DIR}/dependencies.lock")
1321
set(components_lock "$ENV{PROJECT_DIR}/components_${IDF_TARGET}.lock")
1422

src/include/esp-idf/bindings.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,14 @@
136136
#endif
137137
#endif
138138

139+
#ifdef ESP_IDF_COMP_ESP_WIFI_REMOTE_ENABLED
140+
#include "esp_wifi_remote.h"
141+
#endif
142+
143+
#ifdef ESP_IDF_COMP_ESP_HOSTED_ENABLED
144+
#include "esp_hosted.h"
145+
#endif
146+
139147
#if defined(ESP_IDF_COMP_ESP_COEX_ENABLED) && (ESP_IDF_VERSION_MAJOR > 5 || ESP_IDF_VERSION_MAJOR == 5 && ESP_IDF_VERSION_MINOR >= 1)
140148
#include "esp_coexist.h"
141149
#ifdef CONFIG_SOC_IEEE802154_SUPPORTED

0 commit comments

Comments
 (0)