mirror of
https://github.com/espressif/esp-idf.git
synced 2025-10-04 20:40:00 +00:00
refactor(spi_slave_hd): replace part of dma_ll in hd hal layer
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2023 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2023-2024 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@@ -21,8 +21,30 @@ void spi_dma_enable_burst(spi_dma_chan_handle_t chan_handle, bool data_burst, bo
|
||||
}
|
||||
}
|
||||
|
||||
#if SOC_SPI_SUPPORT_SLAVE_HD_VER2
|
||||
void spi_dma_append(spi_dma_chan_handle_t chan_handle)
|
||||
{
|
||||
spi_dma_dev_t *spi_dma = SPI_LL_GET_HW(chan_handle.host_id);
|
||||
|
||||
if (chan_handle.dir == DMA_CHANNEL_DIRECTION_TX) {
|
||||
spi_dma_ll_tx_restart(spi_dma, chan_handle.chan_id);
|
||||
} else {
|
||||
spi_dma_ll_rx_restart(spi_dma, chan_handle.chan_id);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************* IRAM CONTEXT **************************************/
|
||||
|
||||
uint32_t spi_dma_get_eof_desc(spi_dma_chan_handle_t chan_handle)
|
||||
{
|
||||
spi_dma_dev_t *spi_dma = SPI_LL_GET_HW(chan_handle.host_id);
|
||||
|
||||
return (chan_handle.dir == DMA_CHANNEL_DIRECTION_TX) ?
|
||||
spi_dma_ll_get_out_eof_desc_addr(spi_dma, chan_handle.chan_id) :
|
||||
spi_dma_ll_get_in_suc_eof_desc_addr(spi_dma, chan_handle.chan_id);
|
||||
}
|
||||
#endif //SOC_SPI_SUPPORT_SLAVE_HD_VER2
|
||||
|
||||
void spi_dma_reset(spi_dma_chan_handle_t chan_handle)
|
||||
{
|
||||
spi_dma_dev_t *spi_dma = SPI_LL_GET_HW(chan_handle.host_id);
|
||||
|
Reference in New Issue
Block a user