From 1cc206f3930eb2feccf8390e31db2e64c59ae72e Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Mon, 21 Dec 2020 10:22:18 +1100 Subject: [PATCH] driver: Only build dedic_gpio driver on supported chips --- components/driver/CMakeLists.txt | 1 - components/driver/component.mk | 2 +- components/driver/dedic_gpio.c | 2 -- 3 files changed, 1 insertion(+), 4 deletions(-) diff --git a/components/driver/CMakeLists.txt b/components/driver/CMakeLists.txt index c0b8b11c43..83d232bf6e 100644 --- a/components/driver/CMakeLists.txt +++ b/components/driver/CMakeLists.txt @@ -27,7 +27,6 @@ if(${target} STREQUAL "esp32") # SDMMC and MCPWM are in ESP32 only. list(APPEND srcs "adc_common.c" "dac_common.c" - "dedic_gpio.c" "mcpwm.c" "sdio_slave.c" "sdmmc_host.c" diff --git a/components/driver/component.mk b/components/driver/component.mk index 382e1b490d..6da3a56f15 100644 --- a/components/driver/component.mk +++ b/components/driver/component.mk @@ -2,7 +2,7 @@ # Component Makefile # COMPONENT_SRCDIRS := . $(IDF_TARGET) -COMPONENT_OBJEXCLUDE += spi_slave_hd.o +COMPONENT_OBJEXCLUDE += spi_slave_hd.o dedic_gpio.o COMPONENT_ADD_INCLUDEDIRS := include $(IDF_TARGET)/include $(IDF_TARGET)/include/driver diff --git a/components/driver/dedic_gpio.c b/components/driver/dedic_gpio.c index 89909821e1..118c9aa5d0 100644 --- a/components/driver/dedic_gpio.c +++ b/components/driver/dedic_gpio.c @@ -28,7 +28,6 @@ #include "driver/periph_ctrl.h" #include "esp_rom_gpio.h" #include "freertos/FreeRTOS.h" -#if SOC_DEDICATED_GPIO_SUPPORTED #include "driver/dedic_gpio.h" #include "soc/dedic_gpio_periph.h" #if SOC_DEDIC_GPIO_ALLOW_REG_ACCESS @@ -402,4 +401,3 @@ err: return ret_code; } #endif // SOC_DEDIC_GPIO_HAS_INTERRUPT -#endif // SOC_DEDICATED_GPIO_SUPPORTED