mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
refactor(gpio): split GPIO HAL into separate component
cleaned up some includes in GPIO peripheral files
This commit is contained in:
@@ -32,5 +32,6 @@ endif()
|
||||
idf_component_register(SRCS ${srcs}
|
||||
INCLUDE_DIRS ${public_include}
|
||||
PRIV_REQUIRES esp_pm
|
||||
REQUIRES esp_hal_gpio
|
||||
LDFRAGMENTS "linker.lf"
|
||||
)
|
||||
|
||||
@@ -7,7 +7,7 @@ entries:
|
||||
gpio: gpio_get_level (noflash)
|
||||
|
||||
[mapping:gpio_hal]
|
||||
archive: libhal.a
|
||||
archive: libesp_hal_gpio.a
|
||||
entries:
|
||||
if GPIO_CTRL_FUNC_IN_IRAM = y:
|
||||
gpio_hal: gpio_hal_intr_disable (noflash)
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include "esp_rom_gpio.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "driver/dedic_gpio.h"
|
||||
#include "soc/dedic_gpio_periph.h"
|
||||
#include "hal/dedic_gpio_periph.h"
|
||||
|
||||
#if DEDIC_GPIO_LL_ALLOW_REG_ACCESS
|
||||
#include "soc/dedic_gpio_struct.h"
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include "driver/rtc_io.h"
|
||||
#include "driver/lp_io.h"
|
||||
#include "hal/rtc_io_hal.h"
|
||||
#include "soc/rtc_io_periph.h"
|
||||
#include "hal/rtc_io_periph.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#if SOC_LP_GPIO_MATRIX_SUPPORTED
|
||||
#include "soc/lp_gpio_pins.h"
|
||||
|
||||
@@ -3,9 +3,12 @@
|
||||
components/esp_driver_gpio/test_apps:
|
||||
depends_components:
|
||||
- esp_driver_gpio
|
||||
- esp_hal_gpio
|
||||
|
||||
components/esp_driver_gpio/test_apps/gpio_extensions:
|
||||
enable:
|
||||
- if: SOC_DEDICATED_GPIO_SUPPORTED == 1
|
||||
- if: SOC_GPIO_SUPPORT_PIN_GLITCH_FILTER == 1 or SOC_GPIO_FLEX_GLITCH_FILTER_NUM > 0
|
||||
depends_components:
|
||||
- esp_driver_gpio
|
||||
- esp_hal_gpio
|
||||
|
||||
@@ -9,16 +9,23 @@ project(gpio_test)
|
||||
|
||||
idf_build_get_property(elf EXECUTABLE)
|
||||
if(CONFIG_COMPILER_DUMP_RTL_FILES)
|
||||
add_custom_target(check_test_app_sections ALL
|
||||
COMMAND ${PYTHON} $ENV{IDF_PATH}/tools/ci/check_callgraph.py
|
||||
--rtl-dirs ${CMAKE_BINARY_DIR}/esp-idf/esp_driver_gpio/,${CMAKE_BINARY_DIR}/esp-idf/hal/
|
||||
--elf-file ${CMAKE_BINARY_DIR}/gpio_test.elf
|
||||
find-refs
|
||||
--from-sections=.iram0.text
|
||||
--to-sections=.flash.text,.flash.rodata
|
||||
--exit-code
|
||||
DEPENDS ${elf}
|
||||
)
|
||||
set(GPIO_RTL_DIRS
|
||||
${CMAKE_BINARY_DIR}/esp-idf/esp_driver_gpio
|
||||
${CMAKE_BINARY_DIR}/esp-idf/esp_hal_gpio
|
||||
${CMAKE_BINARY_DIR}/esp-idf/hal
|
||||
)
|
||||
string(JOIN "," GPIO_RTL_DIRS_JOINED ${GPIO_RTL_DIRS})
|
||||
add_custom_target(
|
||||
check_test_app_sections ALL
|
||||
COMMAND ${PYTHON} $ENV{IDF_PATH}/tools/ci/check_callgraph.py
|
||||
--rtl-dirs ${GPIO_RTL_DIRS_JOINED}
|
||||
--elf-file ${CMAKE_BINARY_DIR}/gpio_test.elf
|
||||
find-refs
|
||||
--from-sections=.iram0.text
|
||||
--to-sections=.flash.text,.flash.rodata
|
||||
--exit-code
|
||||
DEPENDS ${elf}
|
||||
)
|
||||
endif()
|
||||
|
||||
include($ENV{IDF_PATH}/tools/ci/check_register_rw_half_word.cmake)
|
||||
|
||||
@@ -22,7 +22,6 @@
|
||||
#include "unity_test_utils.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "hal/gpio_ll.h"
|
||||
#include "soc/gpio_periph.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "freertos/task.h"
|
||||
#include "freertos/queue.h"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include "freertos/queue.h"
|
||||
#include "esp_err.h"
|
||||
#include "esp_log.h"
|
||||
#include "soc/rtc_io_periph.h"
|
||||
#include "hal/rtc_io_periph.h"
|
||||
#include "soc/soc_caps.h"
|
||||
#include "hal/rtc_io_ll.h"
|
||||
|
||||
|
||||
@@ -9,14 +9,21 @@ project(gpio_extension_test)
|
||||
|
||||
idf_build_get_property(elf EXECUTABLE)
|
||||
if(CONFIG_COMPILER_DUMP_RTL_FILES)
|
||||
add_custom_target(check_test_app_sections ALL
|
||||
COMMAND ${PYTHON} $ENV{IDF_PATH}/tools/ci/check_callgraph.py
|
||||
--rtl-dirs ${CMAKE_BINARY_DIR}/esp-idf/esp_driver_gpio/,${CMAKE_BINARY_DIR}/esp-idf/hal/
|
||||
--elf-file ${CMAKE_BINARY_DIR}/gpio_extension_test.elf
|
||||
find-refs
|
||||
--from-sections=.iram0.text
|
||||
--to-sections=.flash.text,.flash.rodata
|
||||
--exit-code
|
||||
DEPENDS ${elf}
|
||||
)
|
||||
set(GPIO_EXT_RTL_DIRS
|
||||
${CMAKE_BINARY_DIR}/esp-idf/esp_driver_gpio
|
||||
${CMAKE_BINARY_DIR}/esp-idf/esp_hal_gpio
|
||||
${CMAKE_BINARY_DIR}/esp-idf/hal
|
||||
)
|
||||
string(JOIN "," GPIO_EXT_RTL_DIRS_JOINED ${GPIO_EXT_RTL_DIRS})
|
||||
add_custom_target(
|
||||
check_test_app_sections ALL
|
||||
COMMAND ${PYTHON} $ENV{IDF_PATH}/tools/ci/check_callgraph.py
|
||||
--rtl-dirs ${GPIO_EXT_RTL_DIRS_JOINED}
|
||||
--elf-file ${CMAKE_BINARY_DIR}/gpio_extension_test.elf
|
||||
find-refs
|
||||
--from-sections=.iram0.text
|
||||
--to-sections=.flash.text,.flash.rodata
|
||||
--exit-code
|
||||
DEPENDS ${elf}
|
||||
)
|
||||
endif()
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "unity_test_utils.h"
|
||||
#include "esp_rom_sys.h"
|
||||
#include "soc/soc_caps_full.h"
|
||||
#include "soc/dedic_gpio_periph.h"
|
||||
#include "hal/dedic_gpio_periph.h"
|
||||
#include "hal/dedic_gpio_cpu_ll.h"
|
||||
#include "driver/gpio.h"
|
||||
#include "driver/dedic_gpio.h"
|
||||
|
||||
Reference in New Issue
Block a user