Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cpu/esp32: cleanup of ESP-IDF interface API (module esp_idf_api) #19426

Merged
merged 5 commits into from
Mar 28, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 0 additions & 65 deletions cpu/esp32/esp-idf-api/adc.c

This file was deleted.

41 changes: 0 additions & 41 deletions cpu/esp32/esp-idf-api/dac.c

This file was deleted.

44 changes: 0 additions & 44 deletions cpu/esp32/esp-idf-api/ledc.c

This file was deleted.

30 changes: 0 additions & 30 deletions cpu/esp32/esp-idf-api/periph_ctrl.c

This file was deleted.

2 changes: 1 addition & 1 deletion cpu/esp32/esp-idf/esp_idf.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# common definitions for all ESP-IDF modules

# additional include pathes required by als ESP-IDF module
# additional include pathes required by ESP-IDF module
INCLUDES += -I$(ESP32_SDK_DIR)/components/bootloader_support/include
INCLUDES += -I$(ESP32_SDK_DIR)/components/bootloader_support/include_bootloader
INCLUDES += -I$(ESP32_SDK_DIR)/components/driver/$(CPU_FAM)/include
Expand Down
3 changes: 3 additions & 0 deletions cpu/esp32/esp-idf/esp_idf_cflags.mk
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# common definitions for all ESP-IDF modules

# indicate that ESP-IDF code is compiled
CFLAGS += -DESP_IDF_CODE

# shortcuts used by ESP-IDF
CFLAGS += -Dasm=__asm
CFLAGS += -Dtypeof=__typeof__
Expand Down
24 changes: 24 additions & 0 deletions cpu/esp32/esp-idf/include/driver/gpio.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef DRIVER_GPIO_H
#define DRIVER_GPIO_H

#ifdef ESP_IDF_CODE

#include_next "driver/gpio.h"

#else

#include "hal/gpio_types.h"

#define GPIO_PIN_COUNT (SOC_GPIO_PIN_COUNT)

#endif

#ifdef __cplusplus
extern "C" {
#endif

#ifdef __cplusplus
}
#endif

#endif /* DRIVER_GPIO_H */
7 changes: 3 additions & 4 deletions cpu/esp32/include/adc_arch.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,9 @@ extern "C" {
#include "periph/adc.h"
#include "periph/gpio.h"

#include "driver/adc.h"
#include "hal/adc_types.h"

#include "esp_idf_api/adc.h"

/**
* @brief Attenuations that can be set for ADC lines
*
Expand Down Expand Up @@ -112,9 +111,9 @@ int adc_line_vref_to_gpio(adc_t line, gpio_t gpio);
* @return 0 on success
* @return -1 on invalid ADC line
*/
static inline int adc_vref_to_gpio25 (void)
static inline int adc_vref_to_gpio25(void)
{
return esp_idf_adc_vref_to_gpio(ADC_UNIT_2, GPIO25);
return adc_vref_to_gpio(ADC_UNIT_2, GPIO25);
}
#endif

Expand Down
57 changes: 0 additions & 57 deletions cpu/esp32/include/esp_idf_api/adc.h

This file was deleted.

47 changes: 0 additions & 47 deletions cpu/esp32/include/esp_idf_api/dac.h

This file was deleted.

Loading