mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'refactor/move_spi_necessary_private_headers' into 'master'
spi: move spi_common_internal to esp_private See merge request espressif/esp-idf!18146
This commit is contained in:
commit
4dbd2c7e30
@ -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"
|
||||
|
@ -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);
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "freertos/semphr.h"
|
||||
#include <stdatomic.h>
|
||||
#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"
|
||||
|
@ -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"
|
||||
|
@ -111,7 +111,7 @@ We have two bits to control the interrupt:
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
#include "driver/spi_common_internal.h"
|
||||
#include "esp_private/spi_common_internal.h"
|
||||
#include "driver/spi_master.h"
|
||||
|
||||
#include "esp_log.h"
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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
|
||||
|
@ -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"
|
||||
|
@ -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"
|
||||
|
||||
|
@ -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"
|
||||
|
@ -8,7 +8,7 @@
|
||||
#include "esp_err.h"
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#include <driver/spi_common_internal.h>
|
||||
#include "esp_private/spi_common_internal.h"
|
||||
#include "sdkconfig.h"
|
||||
|
||||
#include "esp_flash.h"
|
||||
|
@ -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";
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <unity.h>
|
||||
#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 <esp_attr.h>
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user