EFR32 Mighty Gecko 1 Software Documentation
efr32mg1-doc-5.1.2
|
Direct memory access (LDMA) API.
Copyright 2016 Silicon Laboratories, Inc. http://www.silabs.com
Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions:
DISCLAIMER OF WARRANTY/LIMITATION OF REMEDIES: Silicon Labs has no obligation to support this Software. Silicon Labs is providing the Software "AS IS", with no express or implied warranties of any kind, including, but not limited to, any implied warranties of merchantability or fitness for any particular purpose or warranties against infringement of any proprietary rights of a third party.
Silicon Labs will not be liable for any consequential, incidental, or special damages, or any other relief, or for any claim by any third party, arising from your use of this Software.
Definition in file em_ldma.h.
Go to the source code of this file.
Data Structures | |
union | LDMA_Descriptor_t |
DMA descriptor. More... | |
struct | LDMA_Init_t |
LDMA initialization configuration structure. More... | |
struct | LDMA_TransferCfg_t |
DMA transfer configuration structure. More... | |
Macros | |
#define | LDMA_DESCRIPTOR_LINKABS_M2M_BYTE(src, dest, count) |
DMA descriptor initializer for linked memory to memory byte transfer. More... | |
#define | LDMA_DESCRIPTOR_LINKABS_M2M_HALF(src, dest, count) |
DMA descriptor initializer for linked memory to memory half-word transfer. More... | |
#define | LDMA_DESCRIPTOR_LINKABS_M2M_WORD(src, dest, count) |
DMA descriptor initializer for linked memory to memory word transfer. More... | |
#define | LDMA_DESCRIPTOR_LINKABS_SYNC(set, clr, matchValue, matchEnable) |
DMA descriptor initializer for SYNC transfer. More... | |
#define | LDMA_DESCRIPTOR_LINKABS_WRITE(value, address) |
DMA descriptor initializer for Immediate WRITE transfer. More... | |
#define | LDMA_DESCRIPTOR_LINKREL_M2M_BYTE(src, dest, count, linkjmp) |
DMA descriptor initializer for linked memory to memory byte transfer. More... | |
#define | LDMA_DESCRIPTOR_LINKREL_M2M_HALF(src, dest, count, linkjmp) |
DMA descriptor initializer for linked memory to memory half-word transfer. More... | |
#define | LDMA_DESCRIPTOR_LINKREL_M2M_WORD(src, dest, count, linkjmp) |
DMA descriptor initializer for linked memory to memory word transfer. More... | |
#define | LDMA_DESCRIPTOR_LINKREL_M2P_BYTE(src, dest, count, linkjmp) |
DMA descriptor initializer for byte transfers from memory to a peripheral. More... | |
#define | LDMA_DESCRIPTOR_LINKREL_P2M_BYTE(src, dest, count, linkjmp) |
DMA descriptor initializer for byte transfers from a peripheral to memory. More... | |
#define | LDMA_DESCRIPTOR_LINKREL_SYNC(set, clr, matchValue, matchEnable, linkjmp) |
DMA descriptor initializer for SYNC transfer. More... | |
#define | LDMA_DESCRIPTOR_LINKREL_WRITE(value, address, linkjmp) |
DMA descriptor initializer for Immediate WRITE transfer. More... | |
#define | LDMA_DESCRIPTOR_SINGLE_M2M_BYTE(src, dest, count) |
DMA descriptor initializer for single memory to memory byte transfer. More... | |
#define | LDMA_DESCRIPTOR_SINGLE_M2M_HALF(src, dest, count) |
DMA descriptor initializer for single memory to memory half-word transfer. More... | |
#define | LDMA_DESCRIPTOR_SINGLE_M2M_WORD(src, dest, count) |
DMA descriptor initializer for single memory to memory word transfer. More... | |
#define | LDMA_DESCRIPTOR_SINGLE_M2P_BYTE(src, dest, count) |
DMA descriptor initializer for byte transfers from memory to a peripheral. More... | |
#define | LDMA_DESCRIPTOR_SINGLE_P2M_BYTE(src, dest, count) |
DMA descriptor initializer for byte transfers from a peripheral to memory. More... | |
#define | LDMA_DESCRIPTOR_SINGLE_P2P_BYTE(src, dest, count) |
DMA descriptor initializer for byte transfers from a peripheral to a peripheral. More... | |
#define | LDMA_DESCRIPTOR_SINGLE_SYNC(set, clr, matchValue, matchEnable) |
DMA descriptor initializer for SYNC transfer. More... | |
#define | LDMA_DESCRIPTOR_SINGLE_WRITE(value, address) |
DMA descriptor initializer for Immediate WRITE transfer. More... | |
#define | LDMA_INIT_DEFAULT |
Default DMA initialization structure. More... | |
#define | LDMA_TRANSFER_CFG_MEMORY() |
Generic DMA transfer configuration for memory to memory transfers. More... | |
#define | LDMA_TRANSFER_CFG_MEMORY_LOOP(loopCnt) |
Generic DMA transfer configuration for looped memory to memory transfers. More... | |
#define | LDMA_TRANSFER_CFG_PERIPHERAL(signal) |
Generic DMA transfer configuration for memory to/from peripheral transfers. More... | |
#define | LDMA_TRANSFER_CFG_PERIPHERAL_LOOP(signal, loopCnt) |
Generic DMA transfer configuration for looped memory to/from peripheral transfers. More... | |
Enumerations | |
enum | LDMA_CfgArbSlots_t { ldmaCfgArbSlotsAs1 = _LDMA_CH_CFG_ARBSLOTS_ONE, ldmaCfgArbSlotsAs2 = _LDMA_CH_CFG_ARBSLOTS_TWO, ldmaCfgArbSlotsAs4 = _LDMA_CH_CFG_ARBSLOTS_FOUR, ldmaCfgArbSlotsAs8 = _LDMA_CH_CFG_ARBSLOTS_EIGHT } |
enum | LDMA_CfgDstIncSign_t { ldmaCfgDstIncSignPos = _LDMA_CH_CFG_DSTINCSIGN_POSITIVE, ldmaCfgDstIncSignNeg = _LDMA_CH_CFG_DSTINCSIGN_NEGATIVE } |
enum | LDMA_CfgSrcIncSign_t { ldmaCfgSrcIncSignPos = _LDMA_CH_CFG_SRCINCSIGN_POSITIVE, ldmaCfgSrcIncSignNeg = _LDMA_CH_CFG_SRCINCSIGN_NEGATIVE } |
enum | LDMA_CtrlBlockSize_t { ldmaCtrlBlockSizeUnit1 = _LDMA_CH_CTRL_BLOCKSIZE_UNIT1, ldmaCtrlBlockSizeUnit2 = _LDMA_CH_CTRL_BLOCKSIZE_UNIT2, ldmaCtrlBlockSizeUnit3 = _LDMA_CH_CTRL_BLOCKSIZE_UNIT3, ldmaCtrlBlockSizeUnit4 = _LDMA_CH_CTRL_BLOCKSIZE_UNIT4, ldmaCtrlBlockSizeUnit6 = _LDMA_CH_CTRL_BLOCKSIZE_UNIT6, ldmaCtrlBlockSizeUnit8 = _LDMA_CH_CTRL_BLOCKSIZE_UNIT8, ldmaCtrlBlockSizeUnit16 = _LDMA_CH_CTRL_BLOCKSIZE_UNIT16, ldmaCtrlBlockSizeUnit32 = _LDMA_CH_CTRL_BLOCKSIZE_UNIT32, ldmaCtrlBlockSizeUnit64 = _LDMA_CH_CTRL_BLOCKSIZE_UNIT64, ldmaCtrlBlockSizeUnit128 = _LDMA_CH_CTRL_BLOCKSIZE_UNIT128, ldmaCtrlBlockSizeUnit256 = _LDMA_CH_CTRL_BLOCKSIZE_UNIT256, ldmaCtrlBlockSizeUnit512 = _LDMA_CH_CTRL_BLOCKSIZE_UNIT512, ldmaCtrlBlockSizeUnit1024 = _LDMA_CH_CTRL_BLOCKSIZE_UNIT1024, ldmaCtrlBlockSizeAll = _LDMA_CH_CTRL_BLOCKSIZE_ALL } |
enum | LDMA_CtrlDstAddrMode_t { ldmaCtrlDstAddrModeAbs = _LDMA_CH_CTRL_DSTMODE_ABSOLUTE, ldmaCtrlDstAddrModeRel = _LDMA_CH_CTRL_DSTMODE_RELATIVE } |
enum | LDMA_CtrlDstInc_t { ldmaCtrlDstIncOne = _LDMA_CH_CTRL_DSTINC_ONE, ldmaCtrlDstIncTwo = _LDMA_CH_CTRL_DSTINC_TWO, ldmaCtrlDstIncFour = _LDMA_CH_CTRL_DSTINC_FOUR, ldmaCtrlDstIncNone = _LDMA_CH_CTRL_DSTINC_NONE } |
enum | LDMA_CtrlReqMode_t { ldmaCtrlReqModeBlock = _LDMA_CH_CTRL_REQMODE_BLOCK, ldmaCtrlReqModeAll = _LDMA_CH_CTRL_REQMODE_ALL } |
enum | LDMA_CtrlSize_t { ldmaCtrlSizeByte = _LDMA_CH_CTRL_SIZE_BYTE, ldmaCtrlSizeHalf = _LDMA_CH_CTRL_SIZE_HALFWORD, ldmaCtrlSizeWord = _LDMA_CH_CTRL_SIZE_WORD } |
enum | LDMA_CtrlSrcAddrMode_t { ldmaCtrlSrcAddrModeAbs = _LDMA_CH_CTRL_SRCMODE_ABSOLUTE, ldmaCtrlSrcAddrModeRel = _LDMA_CH_CTRL_SRCMODE_RELATIVE } |
enum | LDMA_CtrlSrcInc_t { ldmaCtrlSrcIncOne = _LDMA_CH_CTRL_SRCINC_ONE, ldmaCtrlSrcIncTwo = _LDMA_CH_CTRL_SRCINC_TWO, ldmaCtrlSrcIncFour = _LDMA_CH_CTRL_SRCINC_FOUR, ldmaCtrlSrcIncNone = _LDMA_CH_CTRL_SRCINC_NONE } |
enum | LDMA_CtrlStructType_t { ldmaCtrlStructTypeXfer = _LDMA_CH_CTRL_STRUCTTYPE_TRANSFER, ldmaCtrlStructTypeSync = _LDMA_CH_CTRL_STRUCTTYPE_SYNCHRONIZE, ldmaCtrlStructTypeWrite = _LDMA_CH_CTRL_STRUCTTYPE_WRITE } |
enum | LDMA_LinkMode_t { ldmaLinkModeAbs = _LDMA_CH_LINK_LINKMODE_ABSOLUTE, ldmaLinkModeRel = _LDMA_CH_LINK_LINKMODE_RELATIVE } |
enum | LDMA_PeripheralSignal_t { ldmaPeripheralSignal_NONE = LDMA_CH_REQSEL_SOURCESEL_NONE, ldmaPeripheralSignal_ADC0_SCAN = LDMA_CH_REQSEL_SIGSEL_ADC0SCAN | LDMA_CH_REQSEL_SOURCESEL_ADC0, ldmaPeripheralSignal_ADC0_SINGLE = LDMA_CH_REQSEL_SIGSEL_ADC0SINGLE | LDMA_CH_REQSEL_SOURCESEL_ADC0, ldmaPeripheralSignal_CRYPTO_DATA0RD = LDMA_CH_REQSEL_SIGSEL_CRYPTODATA0RD | LDMA_CH_REQSEL_SOURCESEL_CRYPTO, ldmaPeripheralSignal_CRYPTO_DATA0WR = LDMA_CH_REQSEL_SIGSEL_CRYPTODATA0WR | LDMA_CH_REQSEL_SOURCESEL_CRYPTO, ldmaPeripheralSignal_CRYPTO_DATA0XWR = LDMA_CH_REQSEL_SIGSEL_CRYPTODATA0XWR | LDMA_CH_REQSEL_SOURCESEL_CRYPTO, ldmaPeripheralSignal_CRYPTO_DATA1RD = LDMA_CH_REQSEL_SIGSEL_CRYPTODATA1RD | LDMA_CH_REQSEL_SOURCESEL_CRYPTO, ldmaPeripheralSignal_CRYPTO_DATA1WR = LDMA_CH_REQSEL_SIGSEL_CRYPTODATA1WR | LDMA_CH_REQSEL_SOURCESEL_CRYPTO, ldmaPeripheralSignal_I2C0_RXDATAV = LDMA_CH_REQSEL_SIGSEL_I2C0RXDATAV | LDMA_CH_REQSEL_SOURCESEL_I2C0, ldmaPeripheralSignal_I2C0_TXBL = LDMA_CH_REQSEL_SIGSEL_I2C0TXBL | LDMA_CH_REQSEL_SOURCESEL_I2C0, ldmaPeripheralSignal_LEUART0_RXDATAV = LDMA_CH_REQSEL_SIGSEL_LEUART0RXDATAV | LDMA_CH_REQSEL_SOURCESEL_LEUART0, ldmaPeripheralSignal_LEUART0_TXBL = LDMA_CH_REQSEL_SIGSEL_LEUART0TXBL | LDMA_CH_REQSEL_SOURCESEL_LEUART0, ldmaPeripheralSignal_LEUART0_TXEMPTY = LDMA_CH_REQSEL_SIGSEL_LEUART0TXEMPTY | LDMA_CH_REQSEL_SOURCESEL_LEUART0, ldmaPeripheralSignal_MSC_WDATA = LDMA_CH_REQSEL_SIGSEL_MSCWDATA | LDMA_CH_REQSEL_SOURCESEL_MSC, ldmaPeripheralSignal_PRS_REQ0 = LDMA_CH_REQSEL_SIGSEL_PRSREQ0 | LDMA_CH_REQSEL_SOURCESEL_PRS, ldmaPeripheralSignal_PRS_REQ1 = LDMA_CH_REQSEL_SIGSEL_PRSREQ1 | LDMA_CH_REQSEL_SOURCESEL_PRS, ldmaPeripheralSignal_TIMER0_CC0 = LDMA_CH_REQSEL_SIGSEL_TIMER0CC0 | LDMA_CH_REQSEL_SOURCESEL_TIMER0, ldmaPeripheralSignal_TIMER0_CC1 = LDMA_CH_REQSEL_SIGSEL_TIMER0CC1 | LDMA_CH_REQSEL_SOURCESEL_TIMER0, ldmaPeripheralSignal_TIMER0_CC2 = LDMA_CH_REQSEL_SIGSEL_TIMER0CC2 | LDMA_CH_REQSEL_SOURCESEL_TIMER0, ldmaPeripheralSignal_TIMER0_UFOF = LDMA_CH_REQSEL_SIGSEL_TIMER0UFOF | LDMA_CH_REQSEL_SOURCESEL_TIMER0, ldmaPeripheralSignal_TIMER1_CC0 = LDMA_CH_REQSEL_SIGSEL_TIMER1CC0 | LDMA_CH_REQSEL_SOURCESEL_TIMER1, ldmaPeripheralSignal_TIMER1_CC1 = LDMA_CH_REQSEL_SIGSEL_TIMER1CC1 | LDMA_CH_REQSEL_SOURCESEL_TIMER1, ldmaPeripheralSignal_TIMER1_CC2 = LDMA_CH_REQSEL_SIGSEL_TIMER1CC2 | LDMA_CH_REQSEL_SOURCESEL_TIMER1, ldmaPeripheralSignal_TIMER1_CC3 = LDMA_CH_REQSEL_SIGSEL_TIMER1CC3 | LDMA_CH_REQSEL_SOURCESEL_TIMER1, ldmaPeripheralSignal_TIMER1_UFOF = LDMA_CH_REQSEL_SIGSEL_TIMER1UFOF | LDMA_CH_REQSEL_SOURCESEL_TIMER1, ldmaPeripheralSignal_USART0_RXDATAV = LDMA_CH_REQSEL_SIGSEL_USART0RXDATAV | LDMA_CH_REQSEL_SOURCESEL_USART0, ldmaPeripheralSignal_USART0_TXBL = LDMA_CH_REQSEL_SIGSEL_USART0TXBL | LDMA_CH_REQSEL_SOURCESEL_USART0, ldmaPeripheralSignal_USART0_TXEMPTY = LDMA_CH_REQSEL_SIGSEL_USART0TXEMPTY | LDMA_CH_REQSEL_SOURCESEL_USART0, ldmaPeripheralSignal_USART1_RXDATAV = LDMA_CH_REQSEL_SIGSEL_USART1RXDATAV | LDMA_CH_REQSEL_SOURCESEL_USART1, ldmaPeripheralSignal_USART1_RXDATAVRIGHT = LDMA_CH_REQSEL_SIGSEL_USART1RXDATAVRIGHT | LDMA_CH_REQSEL_SOURCESEL_USART1, ldmaPeripheralSignal_USART1_TXBL = LDMA_CH_REQSEL_SIGSEL_USART1TXBL | LDMA_CH_REQSEL_SOURCESEL_USART1, ldmaPeripheralSignal_USART1_TXBLRIGHT = LDMA_CH_REQSEL_SIGSEL_USART1TXBLRIGHT | LDMA_CH_REQSEL_SOURCESEL_USART1, ldmaPeripheralSignal_USART1_TXEMPTY = LDMA_CH_REQSEL_SIGSEL_USART1TXEMPTY | LDMA_CH_REQSEL_SOURCESEL_USART1 } |
Functions | |
void | LDMA_DeInit (void) |
De-initialize the LDMA controller. More... | |
void | LDMA_EnableChannelRequest (int ch, bool enable) |
Enable or disable a LDMA channel request. More... | |
void | LDMA_Init (const LDMA_Init_t *init) |
Initialize the LDMA controller. More... | |
__STATIC_INLINE void | LDMA_IntClear (uint32_t flags) |
Clear one or more pending LDMA interrupts. More... | |
__STATIC_INLINE void | LDMA_IntDisable (uint32_t flags) |
Disable one or more LDMA interrupts. More... | |
__STATIC_INLINE void | LDMA_IntEnable (uint32_t flags) |
Enable one or more LDMA interrupts. More... | |
__STATIC_INLINE uint32_t | LDMA_IntGet (void) |
Get pending LDMA interrupt flags. More... | |
__STATIC_INLINE uint32_t | LDMA_IntGetEnabled (void) |
Get enabled and pending LDMA interrupt flags. Useful for handling more interrupt sources in the same interrupt handler. More... | |
__STATIC_INLINE void | LDMA_IntSet (uint32_t flags) |
Set one or more pending LDMA interrupts. More... | |
void | LDMA_StartTransfer (int ch, const LDMA_TransferCfg_t *transfer, const LDMA_Descriptor_t *descriptor) |
Start a DMA transfer. More... | |
void | LDMA_StopTransfer (int ch) |
Stop a DMA transfer. More... | |
bool | LDMA_TransferDone (int ch) |
Check if a DMA transfer has completed. More... | |
uint32_t | LDMA_TransferRemainingCount (int ch) |
Get number of items remaining in a transfer. More... | |