mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
refactor(spi): move sleep retention config into driver layer
Move per-target GPSPI regdma retention descriptors out of esp_hal_gpspi and into esp_driver_spi so the driver owns its backup scope and restore sequence.
This commit is contained in:
@@ -183,7 +183,7 @@ int dac_dma_periph_get_intr_signal(void)
|
||||
|
||||
static void s_dac_dma_periph_reset(void)
|
||||
{
|
||||
spi_dma_ll_tx_reset(s_ddp->periph_dev, s_ddp->dma_chan);
|
||||
spi_ll_dma_tx_reset(s_ddp->periph_dev, s_ddp->dma_chan);
|
||||
spi_ll_dma_tx_fifo_reset(s_ddp->periph_dev);
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ void dac_dma_periph_enable(void)
|
||||
void dac_dma_periph_disable(void)
|
||||
{
|
||||
s_dac_dma_periph_reset();
|
||||
spi_dma_ll_tx_stop(s_ddp->periph_dev, s_ddp->dma_chan);
|
||||
spi_ll_dma_tx_stop(s_ddp->periph_dev, s_ddp->dma_chan);
|
||||
dac_ll_digi_trigger_output(false);
|
||||
}
|
||||
|
||||
@@ -212,17 +212,17 @@ uint32_t IRAM_ATTR dac_dma_periph_intr_get_mask(void)
|
||||
|
||||
void IRAM_ATTR dac_dma_periph_trans_start(uintptr_t desc_addr)
|
||||
{
|
||||
spi_dma_ll_tx_reset(s_ddp->periph_dev, s_ddp->dma_chan);
|
||||
spi_ll_dma_tx_reset(s_ddp->periph_dev, s_ddp->dma_chan);
|
||||
spi_ll_dma_tx_fifo_reset(s_ddp->periph_dev);
|
||||
spi_dma_ll_tx_start(s_ddp->periph_dev, s_ddp->dma_chan, (lldesc_t *)desc_addr);
|
||||
spi_ll_dma_tx_start(s_ddp->periph_dev, s_ddp->dma_chan, (lldesc_t *)desc_addr);
|
||||
}
|
||||
|
||||
void dac_dma_periph_trans_stop(void)
|
||||
{
|
||||
spi_dma_ll_tx_stop(s_ddp->periph_dev, s_ddp->dma_chan);
|
||||
spi_ll_dma_tx_stop(s_ddp->periph_dev, s_ddp->dma_chan);
|
||||
}
|
||||
|
||||
void dac_dma_periph_trans_append(void)
|
||||
{
|
||||
spi_dma_ll_tx_restart(s_ddp->periph_dev, s_ddp->dma_chan);
|
||||
spi_ll_dma_tx_restart(s_ddp->periph_dev, s_ddp->dma_chan);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user