diff --git a/components/driver/adc.c b/components/driver/adc.c index 077942a051..1fd2ae0e78 100644 --- a/components/driver/adc.c +++ b/components/driver/adc.c @@ -35,7 +35,7 @@ #include "esp_private/gdma.h" #elif CONFIG_IDF_TARGET_ESP32S2 #include "hal/spi_types.h" -#include "driver/spi_common_internal.h" +#include "esp_private/spi_common_internal.h" #elif CONFIG_IDF_TARGET_ESP32 #include "hal/i2s_types.h" #include "driver/i2s_types.h" diff --git a/components/driver/include/driver/spi_common_internal.h b/components/driver/include/esp_private/spi_common_internal.h similarity index 97% rename from components/driver/include/driver/spi_common_internal.h rename to components/driver/include/esp_private/spi_common_internal.h index baa12ad06d..e3127d4831 100644 --- a/components/driver/include/driver/spi_common_internal.h +++ b/components/driver/include/esp_private/spi_common_internal.h @@ -83,8 +83,6 @@ typedef esp_err_t (*spi_destroy_func_t)(void*); * @param host Peripheral to claim * @param source The caller indentification string. * - * @note This public API is deprecated. - * * @return True if peripheral is claimed successfully; false if peripheral already is claimed. */ bool spicommon_periph_claim(spi_host_device_t host, const char* source); @@ -94,8 +92,6 @@ bool spicommon_periph_claim(spi_host_device_t host, const char* source); * * @param host Peripheral to check. * - * @note This public API is deprecated. - * * @return True if in use, otherwise false. */ bool spicommon_periph_in_use(spi_host_device_t host); @@ -105,8 +101,6 @@ bool spicommon_periph_in_use(spi_host_device_t host); * * @param host Peripheral to return * - * @note This public API is deprecated. - * * @return True if peripheral is returned successfully; false if peripheral was free to claim already. */ bool spicommon_periph_free(spi_host_device_t host); @@ -143,9 +137,6 @@ esp_err_t spicommon_dma_chan_free(spi_host_device_t host_id); * the arguments. Depending on the IO-pads requested, the routing is done either using the * IO_mux or using the GPIO matrix. * - * @note This public API is deprecated. Please call ``spi_bus_initialize`` for master - * bus initialization and ``spi_slave_initialize`` for slave initialization. - * * @param host SPI peripheral to be routed * @param bus_config Pointer to a spi_bus_config struct detailing the GPIO pins * @param flags Combination of SPICOMMON_BUSFLAG_* flags, set to ensure the pins set are capable with some functions: @@ -178,9 +169,6 @@ esp_err_t spicommon_bus_initialize_io(spi_host_device_t host, const spi_bus_conf /** * @brief Free the IO used by a SPI peripheral * - * @note This public API is deprecated. Please call ``spi_bus_free`` for master - * bus deinitialization and ``spi_slave_free`` for slave deinitialization. - * * @param bus_cfg Bus config struct which defines which pins to be used. * * @return @@ -192,9 +180,6 @@ esp_err_t spicommon_bus_free_io_cfg(const spi_bus_config_t *bus_cfg); /** * @brief Initialize a Chip Select pin for a specific SPI peripheral * - * @note This public API is deprecated. Please call corresponding device initialization - * functions. - * * @param host SPI peripheral * @param cs_io_num GPIO pin to route * @param cs_num CS id to route @@ -207,8 +192,6 @@ void spicommon_cs_initialize(spi_host_device_t host, int cs_io_num, int cs_num, * @brief Free a chip select line * * @param cs_gpio_num CS gpio num to free - * - * @note This public API is deprecated. */ void spicommon_cs_free_io(int cs_gpio_num); @@ -217,8 +200,6 @@ void spicommon_cs_free_io(int cs_gpio_num); * * @param host SPI peripheral * - * @note This public API is deprecated. - * * @return false if any pins are through the GPIO matrix, otherwise true. */ bool spicommon_bus_using_iomux(spi_host_device_t host); @@ -228,8 +209,6 @@ bool spicommon_bus_using_iomux(spi_host_device_t host); * * @param host The SPI host * - * @note This public API is deprecated. - * * @return The hosts IRQ source */ int spicommon_irqsource_for_host(spi_host_device_t host); @@ -239,8 +218,6 @@ int spicommon_irqsource_for_host(spi_host_device_t host); * * @param host The SPI host * - * @note This public API is deprecated. - * * @return The hosts IRQ source */ int spicommon_irqdma_source_for_host(spi_host_device_t host); @@ -267,8 +244,6 @@ typedef void(*dmaworkaround_cb_t)(void *arg); * @param cb Callback to call in case DMA channel cannot be reset immediately * @param arg Argument to the callback * - * @note This public API is deprecated. - * * @return True when a DMA reset could be executed immediately. False when it could not; in this * case the callback will be called with the specified argument when the logic can execute * a reset, after that reset. @@ -279,8 +254,6 @@ bool spicommon_dmaworkaround_req_reset(int dmachan, dmaworkaround_cb_t cb, void /** * @brief Check if a DMA reset is requested but has not completed yet * - * @note This public API is deprecated. - * * @return True when a DMA reset is requested but hasn't completed yet. False otherwise. */ bool spicommon_dmaworkaround_reset_in_progress(void); @@ -291,8 +264,6 @@ bool spicommon_dmaworkaround_reset_in_progress(void); * * A call to this function tells the workaround logic that this channel will * not be affected by a global SPI DMA reset. - * - * @note This public API is deprecated. */ void spicommon_dmaworkaround_idle(int dmachan); @@ -301,8 +272,6 @@ void spicommon_dmaworkaround_idle(int dmachan); * * A call to this function tells the workaround logic that this channel will * be affected by a global SPI DMA reset, and a reset like that should not be attempted. - * - * @note This public API is deprecated. */ void spicommon_dmaworkaround_transfer_active(int dmachan); diff --git a/components/driver/spi_bus_lock.c b/components/driver/spi_bus_lock.c index 1b0318a90a..299d1b6562 100644 --- a/components/driver/spi_bus_lock.c +++ b/components/driver/spi_bus_lock.c @@ -8,7 +8,7 @@ #include "freertos/semphr.h" #include #include "sdkconfig.h" -#include "spi_common_internal.h" +#include "esp_private/spi_common_internal.h" #include "esp_intr_alloc.h" #include "soc/soc_caps.h" #include "stdatomic.h" diff --git a/components/driver/spi_common.c b/components/driver/spi_common.c index 01d5b8a649..aa2c05dd61 100644 --- a/components/driver/spi_common.c +++ b/components/driver/spi_common.c @@ -20,7 +20,7 @@ #include "driver/gpio.h" #include "esp_private/periph_ctrl.h" #include "esp_heap_caps.h" -#include "driver/spi_common_internal.h" +#include "esp_private/spi_common_internal.h" #include "stdatomic.h" #include "hal/spi_hal.h" #include "hal/gpio_hal.h" diff --git a/components/driver/spi_master.c b/components/driver/spi_master.c index 30d5a2fb5c..0a7cac3523 100644 --- a/components/driver/spi_master.c +++ b/components/driver/spi_master.c @@ -111,7 +111,7 @@ We have two bits to control the interrupt: */ #include -#include "driver/spi_common_internal.h" +#include "esp_private/spi_common_internal.h" #include "driver/spi_master.h" #include "esp_log.h" diff --git a/components/driver/spi_slave.c b/components/driver/spi_slave.c index ca7409a72d..12d98d38f5 100644 --- a/components/driver/spi_slave.c +++ b/components/driver/spi_slave.c @@ -26,7 +26,7 @@ #include "sdkconfig.h" #include "driver/gpio.h" -#include "driver/spi_common_internal.h" +#include "esp_private/spi_common_internal.h" #include "driver/spi_slave.h" #include "hal/spi_slave_hal.h" diff --git a/components/driver/spi_slave_hd.c b/components/driver/spi_slave_hd.c index dda2e5297d..65ab728d34 100644 --- a/components/driver/spi_slave_hd.c +++ b/components/driver/spi_slave_hd.c @@ -10,7 +10,7 @@ #include "freertos/queue.h" #include "freertos/ringbuf.h" #include "driver/gpio.h" -#include "driver/spi_common_internal.h" +#include "esp_private/spi_common_internal.h" #include "driver/spi_slave_hd.h" #include "hal/spi_slave_hd_hal.h" diff --git a/components/driver/test/test_spi_master.c b/components/driver/test/test_spi_master.c index 8cbe974048..734cb029d3 100644 --- a/components/driver/test/test_spi_master.c +++ b/components/driver/test/test_spi_master.c @@ -28,7 +28,7 @@ #include "sdkconfig.h" #include "../cache_utils.h" #include "soc/soc_memory_layout.h" -#include "driver/spi_common_internal.h" +#include "esp_private/spi_common_internal.h" #include "esp_private/esp_clk.h" #include "test_utils.h" diff --git a/components/esp_hw_support/test/test_4mpsram.c b/components/esp_hw_support/test/test_4mpsram.c index cd03821884..cf41310873 100644 --- a/components/esp_hw_support/test/test_4mpsram.c +++ b/components/esp_hw_support/test/test_4mpsram.c @@ -6,7 +6,7 @@ #include "esp_heap_caps.h" #include "unity.h" #include "esp_log.h" -#include "driver/spi_common_internal.h" +#include "esp_private/spi_common_internal.h" #include "sdkconfig.h" #if CONFIG_IDF_TARGET_ESP32 diff --git a/components/esp_psram/esp32/esp_psram_impl_quad.c b/components/esp_psram/esp32/esp_psram_impl_quad.c index b8b17a1940..3ab8e48658 100644 --- a/components/esp_psram/esp32/esp_psram_impl_quad.c +++ b/components/esp_psram/esp32/esp_psram_impl_quad.c @@ -27,7 +27,7 @@ #include "soc/spi_periph.h" #include "driver/gpio.h" #include "hal/gpio_hal.h" -#include "driver/spi_common_internal.h" +#include "esp_private/spi_common_internal.h" #include "esp_private/periph_ctrl.h" #include "bootloader_common.h" #include "esp_rom_gpio.h" diff --git a/components/esp_system/port/soc/esp32/clk.c b/components/esp_system/port/soc/esp32/clk.c index 0c14307c58..cde38a8073 100644 --- a/components/esp_system/port/soc/esp32/clk.c +++ b/components/esp_system/port/soc/esp32/clk.c @@ -13,7 +13,7 @@ #include "bootloader_clock.h" #include "hal/wdt_hal.h" -#include "driver/spi_common_internal.h" // [refactor-todo]: for spicommon_periph_in_use +#include "esp_private/spi_common_internal.h" // [refactor-todo]: for spicommon_periph_in_use #include "esp_log.h" diff --git a/components/spi_flash/esp_flash_spi_init.c b/components/spi_flash/esp_flash_spi_init.c index 773150e495..cd367cf0b1 100644 --- a/components/spi_flash/esp_flash_spi_init.c +++ b/components/spi_flash/esp_flash_spi_init.c @@ -14,7 +14,7 @@ #include "esp_log.h" #include "esp_heap_caps.h" #include "hal/spi_types.h" -#include "driver/spi_common_internal.h" +#include "esp_private/spi_common_internal.h" #include "hal/spi_flash_hal.h" #include "hal/gpio_hal.h" #include "esp_flash_internal.h" diff --git a/components/spi_flash/include/esp_flash_internal.h b/components/spi_flash/include/esp_flash_internal.h index 1ab1f49a05..31dd6d8b1a 100644 --- a/components/spi_flash/include/esp_flash_internal.h +++ b/components/spi_flash/include/esp_flash_internal.h @@ -8,7 +8,7 @@ #include "esp_err.h" #include #include -#include +#include "esp_private/spi_common_internal.h" #include "sdkconfig.h" #include "esp_flash.h" diff --git a/components/spi_flash/spi_flash_os_func_app.c b/components/spi_flash/spi_flash_os_func_app.c index f5642d4ec1..01e2ecd7d6 100644 --- a/components/spi_flash/spi_flash_os_func_app.c +++ b/components/spi_flash/spi_flash_os_func_app.c @@ -20,7 +20,7 @@ #include "esp_rom_sys.h" #include "esp_private/spi_flash_os.h" -#include "driver/spi_common_internal.h" +#include "esp_private/spi_common_internal.h" static const char TAG[] = "spi_flash"; diff --git a/components/spi_flash/test/test_esp_flash.c b/components/spi_flash/test/test_esp_flash.c index ad0c3aef65..5e11e1d9dc 100644 --- a/components/spi_flash/test/test_esp_flash.c +++ b/components/spi_flash/test/test_esp_flash.c @@ -6,7 +6,7 @@ #include #include "esp_flash.h" -#include "driver/spi_common_internal.h" +#include "esp_private/spi_common_internal.h" #include "esp_flash_spi_init.h" #include "memspi_host_driver.h" #include diff --git a/docs/en/migration-guides/peripherals.rst b/docs/en/migration-guides/peripherals.rst index 8f7c49c0c8..ee4715dd06 100644 --- a/docs/en/migration-guides/peripherals.rst +++ b/docs/en/migration-guides/peripherals.rst @@ -109,6 +109,8 @@ SPI | ``spi_cal_clock()`` | :cpp:func:`spi_get_actual_clock` | Get SPI real working frequency. | +--------------------------+----------------------------------+---------------------------------+ +- The internal header file ``spi_common_internal.h`` has been moved to ``esp_private/spi_common_internal.h``. + .. only:: SOC_SDMMC_HOST_SUPPORTED SDMMC