mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-09 20:41:14 +00:00
refactor(spi_master): replace dma_ll in spi hal layer (part 2.1)
This commit is contained in:
@@ -288,6 +288,7 @@ static inline void spi_ll_dma_rx_fifo_reset(spi_dev_t *hw)
|
||||
*
|
||||
* @param hw Beginning address of the peripheral registers.
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline void spi_ll_infifo_full_clr(spi_dev_t *hw)
|
||||
{
|
||||
//This is not used in esp32
|
||||
@@ -298,6 +299,7 @@ static inline void spi_ll_infifo_full_clr(spi_dev_t *hw)
|
||||
*
|
||||
* @param hw Beginning address of the peripheral registers.
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline void spi_ll_outfifo_empty_clr(spi_dev_t *hw)
|
||||
{
|
||||
//This is not used in esp32
|
||||
@@ -313,6 +315,7 @@ static inline void spi_ll_outfifo_empty_clr(spi_dev_t *hw)
|
||||
* @param hw Beginning address of the peripheral registers.
|
||||
* @param enable 1: enable; 2: disable
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline void spi_ll_dma_rx_enable(spi_dev_t *hw, bool enable)
|
||||
{
|
||||
//This is not used in esp32
|
||||
@@ -324,6 +327,7 @@ static inline void spi_ll_dma_rx_enable(spi_dev_t *hw, bool enable)
|
||||
* @param hw Beginning address of the peripheral registers.
|
||||
* @param enable 1: enable; 2: disable
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline void spi_ll_dma_tx_enable(spi_dev_t *hw, bool enable)
|
||||
{
|
||||
//This is not used in esp32
|
||||
@@ -1090,6 +1094,7 @@ static inline void spi_dma_ll_reset_register(spi_host_device_t host_id) {
|
||||
* @param dma_in Beginning address of the DMA peripheral registers which stores the data received from a peripheral into RAM.
|
||||
* @param channel DMA channel, for chip version compatibility, not used.
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline void spi_dma_ll_rx_reset(spi_dma_dev_t *dma_in, uint32_t channel)
|
||||
{
|
||||
//Reset RX DMA peripheral
|
||||
@@ -1104,6 +1109,7 @@ static inline void spi_dma_ll_rx_reset(spi_dma_dev_t *dma_in, uint32_t channel)
|
||||
* @param channel DMA channel, for chip version compatibility, not used.
|
||||
* @param addr Address of the beginning DMA descriptor.
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline void spi_dma_ll_rx_start(spi_dma_dev_t *dma_in, uint32_t channel, lldesc_t *addr)
|
||||
{
|
||||
dma_in->dma_in_link.addr = (int) addr & 0xFFFFF;
|
||||
@@ -1140,6 +1146,7 @@ static inline void spi_dma_ll_rx_enable_burst_desc(spi_dma_dev_t *dma_in, uint32
|
||||
* @param dma_out Beginning address of the DMA peripheral registers which transmits the data from RAM to a peripheral.
|
||||
* @param channel DMA channel, for chip version compatibility, not used.
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline void spi_dma_ll_tx_reset(spi_dma_dev_t *dma_out, uint32_t channel)
|
||||
{
|
||||
//Reset TX DMA peripheral
|
||||
@@ -1154,6 +1161,7 @@ static inline void spi_dma_ll_tx_reset(spi_dma_dev_t *dma_out, uint32_t channel)
|
||||
* @param channel DMA channel, for chip version compatibility, not used.
|
||||
* @param addr Address of the beginning DMA descriptor.
|
||||
*/
|
||||
__attribute__((always_inline))
|
||||
static inline void spi_dma_ll_tx_start(spi_dma_dev_t *dma_out, uint32_t channel, lldesc_t *addr)
|
||||
{
|
||||
dma_out->dma_out_link.addr = (int) addr & 0xFFFFF;
|
||||
|
Reference in New Issue
Block a user