Zephyr Project API 4.0.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
dma_silabs_ldma.h File Reference

Go to the source code of this file.

Macros

#define SILABS_LDMA_SOURCE_MASK   GENMASK(21, 16)
 
#define SILABS_LDMA_SIG_MASK   GENMASK(3, 0)
 
#define SILABS_DMA_SLOT_SOURCE_MASK   GENMASK(7, 3)
 
#define SILABS_DMA_SLOT_SIG_MASK   GENMASK(2, 0)
 
#define SILABS_LDMA_REQSEL_TO_SLOT(signal)
 
#define SILABS_LDMA_SLOT_TO_REQSEL(slot)
 

Functions

int silabs_ldma_append_block (const struct device *dev, uint32_t channel, struct dma_config *config)
 Append a new block to the current channel.
 

Macro Definition Documentation

◆ SILABS_DMA_SLOT_SIG_MASK

#define SILABS_DMA_SLOT_SIG_MASK   GENMASK(2, 0)

◆ SILABS_DMA_SLOT_SOURCE_MASK

#define SILABS_DMA_SLOT_SOURCE_MASK   GENMASK(7, 3)

◆ SILABS_LDMA_REQSEL_TO_SLOT

#define SILABS_LDMA_REQSEL_TO_SLOT (   signal)
Value:
#define SILABS_LDMA_SOURCE_MASK
Definition dma_silabs_ldma.h:12
#define SILABS_DMA_SLOT_SOURCE_MASK
Definition dma_silabs_ldma.h:15
#define SILABS_LDMA_SIG_MASK
Definition dma_silabs_ldma.h:13
#define SILABS_DMA_SLOT_SIG_MASK
Definition dma_silabs_ldma.h:16
#define FIELD_PREP(mask, value)
Prepare a bitfield element using value with mask representing its field position and width.
Definition util_macro.h:118
#define FIELD_GET(mask, value)
Extract a bitfield element from value corresponding to the field mask mask.
Definition util_macro.h:111
sighandler_t signal(int signo, sighandler_t handler)

◆ SILABS_LDMA_SIG_MASK

#define SILABS_LDMA_SIG_MASK   GENMASK(3, 0)

◆ SILABS_LDMA_SLOT_TO_REQSEL

#define SILABS_LDMA_SLOT_TO_REQSEL (   slot)

◆ SILABS_LDMA_SOURCE_MASK

#define SILABS_LDMA_SOURCE_MASK   GENMASK(21, 16)

Function Documentation

◆ silabs_ldma_append_block()

int silabs_ldma_append_block ( const struct device dev,
uint32_t  channel,
struct dma_config config 
)

Append a new block to the current channel.

This function allows to append a block to the current DMA transfer. It allows a user/driver to register the next DMA transfer while a transfer in being held without stopping or restarting DMA engine. It is very suitable for Zephyr Uart API where user gives buffers while the DMA engine is running. Because this function changes dynamically the link to the block that DMA engine would load as the next transfer, it is only working with channel that didn't have linked block list.

In the case that the DMA engine naturally stopped because the previous transfer is finished, this function simply restart the DMA engine with the given block. If the DMA engine stopped while reconfiguring the next transfer, the DMA engine will restart too.

Parameters
devdma device
channelchannel
configconfiguration of the channel with the block to append as the head_block.