mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-02 20:24:32 +02:00
feat(hal): unify hal cmake for spi_flash_hal_gpspi.c
This commit is contained in:
@@ -167,6 +167,10 @@ if(NOT BOOTLOADER_BUILD)
|
|||||||
list(APPEND srcs "spi_slave_hd_hal.c")
|
list(APPEND srcs "spi_slave_hd_hal.c")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_SOC_GPSPI_SUPPORTED AND NOT CONFIG_IDF_TARGET_ESP32)
|
||||||
|
list(APPEND srcs "spi_flash_hal_gpspi.c")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(CONFIG_SOC_SDIO_SLAVE_SUPPORTED)
|
if(CONFIG_SOC_SDIO_SLAVE_SUPPORTED)
|
||||||
list(APPEND srcs "sdio_slave_hal.c")
|
list(APPEND srcs "sdio_slave_hal.c")
|
||||||
endif()
|
endif()
|
||||||
@@ -198,7 +202,6 @@ if(NOT BOOTLOADER_BUILD)
|
|||||||
|
|
||||||
if(${target} STREQUAL "esp32s2")
|
if(${target} STREQUAL "esp32s2")
|
||||||
list(APPEND srcs
|
list(APPEND srcs
|
||||||
"spi_flash_hal_gpspi.c"
|
|
||||||
"touch_sensor_hal.c"
|
"touch_sensor_hal.c"
|
||||||
"usb_hal.c"
|
"usb_hal.c"
|
||||||
"usb_phy_hal.c"
|
"usb_phy_hal.c"
|
||||||
@@ -210,7 +213,6 @@ if(NOT BOOTLOADER_BUILD)
|
|||||||
|
|
||||||
if(${target} STREQUAL "esp32s3")
|
if(${target} STREQUAL "esp32s3")
|
||||||
list(APPEND srcs
|
list(APPEND srcs
|
||||||
"spi_flash_hal_gpspi.c"
|
|
||||||
"touch_sensor_hal.c"
|
"touch_sensor_hal.c"
|
||||||
"usb_hal.c"
|
"usb_hal.c"
|
||||||
"usb_phy_hal.c"
|
"usb_phy_hal.c"
|
||||||
@@ -222,34 +224,16 @@ if(NOT BOOTLOADER_BUILD)
|
|||||||
|
|
||||||
if(${target} STREQUAL "esp32c3")
|
if(${target} STREQUAL "esp32c3")
|
||||||
list(APPEND srcs
|
list(APPEND srcs
|
||||||
"spi_flash_hal_gpspi.c"
|
|
||||||
"xt_wdt_hal.c"
|
"xt_wdt_hal.c"
|
||||||
"esp32c3/rtc_cntl_hal.c")
|
"esp32c3/rtc_cntl_hal.c")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${target} STREQUAL "esp32c2")
|
if(${target} STREQUAL "esp32c2")
|
||||||
list(APPEND srcs
|
list(APPEND srcs
|
||||||
"spi_flash_hal_gpspi.c"
|
|
||||||
"esp32c2/rtc_cntl_hal.c")
|
"esp32c2/rtc_cntl_hal.c")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(${target} STREQUAL "esp32c6")
|
|
||||||
list(APPEND srcs
|
|
||||||
"spi_flash_hal_gpspi.c")
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(${target} STREQUAL "esp32p4")
|
|
||||||
list(APPEND srcs
|
|
||||||
"spi_flash_hal_gpspi.c")
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(${target} STREQUAL "esp32h2")
|
if(${target} STREQUAL "esp32h2")
|
||||||
list(APPEND srcs
|
|
||||||
"spi_flash_hal_gpspi.c"
|
|
||||||
)
|
|
||||||
|
|
||||||
list(REMOVE_ITEM srcs
|
list(REMOVE_ITEM srcs
|
||||||
"esp32h2/rtc_cntl_hal.c"
|
"esp32h2/rtc_cntl_hal.c"
|
||||||
)
|
)
|
||||||
|
@@ -34,6 +34,7 @@ extern uint32_t spi_flash_hal_gpspi_check_status(spi_flash_host_inst_t *host);
|
|||||||
extern bool spi_flash_hal_gpspi_supports_direct_write(spi_flash_host_inst_t *host, const void *p);
|
extern bool spi_flash_hal_gpspi_supports_direct_write(spi_flash_host_inst_t *host, const void *p);
|
||||||
extern bool spi_flash_hal_gpspi_supports_direct_read(spi_flash_host_inst_t *host, const void *p);
|
extern bool spi_flash_hal_gpspi_supports_direct_read(spi_flash_host_inst_t *host, const void *p);
|
||||||
|
|
||||||
|
#if SOC_GPSPI_SUPPORTED
|
||||||
/** Default configuration for GPSPI */
|
/** Default configuration for GPSPI */
|
||||||
static const spi_flash_host_driver_t esp_flash_gpspi_host = {
|
static const spi_flash_host_driver_t esp_flash_gpspi_host = {
|
||||||
.dev_config = spi_flash_hal_gpspi_device_config,
|
.dev_config = spi_flash_hal_gpspi_device_config,
|
||||||
@@ -58,6 +59,9 @@ static const spi_flash_host_driver_t esp_flash_gpspi_host = {
|
|||||||
.resume = spi_flash_hal_resume,
|
.resume = spi_flash_hal_resume,
|
||||||
.suspend = spi_flash_hal_suspend,
|
.suspend = spi_flash_hal_suspend,
|
||||||
};
|
};
|
||||||
|
#else
|
||||||
|
static const spi_flash_host_driver_t esp_flash_gpspi_host = {};
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
esp_err_t memspi_host_init_pointers(memspi_host_inst_t *host, const memspi_host_config_t *cfg)
|
esp_err_t memspi_host_init_pointers(memspi_host_inst_t *host, const memspi_host_config_t *cfg)
|
||||||
|
Reference in New Issue
Block a user