Bladeren bron

driver: Only build dedic_gpio driver on supported chips

Angus Gratton 5 jaren geleden
bovenliggende
commit
1cc206f393
3 gewijzigde bestanden met toevoegingen van 1 en 4 verwijderingen
  1. 0 1
      components/driver/CMakeLists.txt
  2. 1 1
      components/driver/component.mk
  3. 0 2
      components/driver/dedic_gpio.c

+ 0 - 1
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"

+ 1 - 1
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
 

+ 0 - 2
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