1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

cpu/esp32: add ESP-IDF interface API

Implements an interface for ESP-IDF types and functions that are required by RIOT-OS but cannot be included directly due to name conflicts.
f
This commit is contained in:
Gunar Schorcht 2022-06-19 08:19:26 +02:00
parent 45aa420c42
commit de96a31e1f
6 changed files with 58 additions and 0 deletions

View File

@ -136,5 +136,6 @@ endmenu
rsource "bootloader/Kconfig"
rsource "esp-idf/Kconfig"
rsource "esp-idf-api/Kconfig"
rsource "periph/Kconfig"
source "$(RIOTCPU)/esp_common/Kconfig"

View File

@ -7,6 +7,7 @@ SRC = irq_arch.c startup.c syscalls.c
DIRS += $(RIOTCPU)/esp_common
DIRS += periph
DIRS += esp-idf
DIRS += esp-idf-api
ifneq (, $(filter esp_bootloader, $(USEMODULE)))
DIRS += bootloader

View File

@ -4,6 +4,7 @@ include $(RIOTCPU)/esp_common/Makefile.dep
USEPKG += esp32_sdk
USEMODULE += esp_idf_api
USEMODULE += esp_idf_common
USEMODULE += esp_bootloader

View File

@ -0,0 +1,14 @@
# Copyright (c) 2022 Gunar Schorcht
#
# This file is subject to the terms and conditions of the GNU Lesser
# General Public License v2.1. See the file LICENSE in the top level
# directory for more details.
#
config MODULE_ESP_IDF_API
bool
depends on TEST_KCONFIG
depends on HAS_ARCH_ESP32
default y
help
ESP-IDF interface API

View File

@ -0,0 +1,18 @@
MODULE = esp_idf_api
# ESP-IDF header files must be found first in this module. Therefore,
# the ESP-IDF include paths must come before the RIOT include paths.
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/driver/include
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_common/include
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_hw_support/include
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/esp_rom/include
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/hal/include
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/hal/platform_port/include
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/soc/include
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/hal/$(CPU)/include
PRE_INCLUDES += -I$(ESP32_SDK_DIR)/components/soc/$(CPU)/include
include $(RIOTBASE)/Makefile.base
INCLUDES := $(PRE_INCLUDES) $(INCLUDES)

View File

@ -0,0 +1,23 @@
/*
* Copyright (C) 2022 Gunar Schorcht
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @defgroup cpu_esp32_esp_idf_api ESP-IDF Interface API
* @ingroup cpu_esp32
* @brief ESP-IDF Interface API
*
* This module implements an interface for ESP-IDF types and functions that are
* required by RIOT-OS but cannot be included directly due to name conflicts.
*
* For this purpose, the header files of this module declare all the types and
* functions that are required from the ESP-IDF, but without using the ESP-IDF
* header files with conflicting names. The implementation of the module then
* uses the ESP-IDF. In most cases, simple wrapper functions are sufficient.
*
* @author Gunar Schorcht <gunar@schorcht.net>
*/