mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-23 09:13:11 +00:00
spi_slave: support spi slave hd append mode on chips other than s2
This commit is contained in:
@@ -13,6 +13,10 @@
|
||||
#include "freertos/FreeRTOS.h"
|
||||
#include "hal/spi_types.h"
|
||||
#include "esp_pm.h"
|
||||
#if SOC_GDMA_SUPPORTED
|
||||
#include "esp_private/gdma.h"
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
@@ -130,6 +134,22 @@ esp_err_t spicommon_dma_chan_alloc(spi_host_device_t host_id, spi_dma_chan_t dma
|
||||
*/
|
||||
esp_err_t spicommon_dma_chan_free(spi_host_device_t host_id);
|
||||
|
||||
#if SOC_GDMA_SUPPORTED
|
||||
/**
|
||||
* @brief Get SPI GDMA Handle for GMDA Supported Chip
|
||||
*
|
||||
* @param host_id SPI host ID
|
||||
* @param gdma_handle GDMA Handle to Return
|
||||
* @param gdma_direction GDMA Channel Direction in Enum
|
||||
* - GDMA_CHANNEL_DIRECTION_TX
|
||||
* - GDMA_CHANNEL_DIRECTION_RX
|
||||
*
|
||||
* @return
|
||||
* - ESP_OK: On success
|
||||
*/
|
||||
esp_err_t spicommon_gdma_get_handle(spi_host_device_t host_id, gdma_channel_handle_t *gdma_handle, gdma_channel_direction_t gdma_direction);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Connect a SPI peripheral to GPIO pins
|
||||
*
|
||||
|
Reference in New Issue
Block a user