DMADRV Serial Peripheral Interface module, see DMADRV Direct Memory Access page for detailed documentation. More...
![]() |
Defines | |
#define | ECODE_EMDRV_DMADRV_OK ( ECODE_OK ) |
Success return value. | |
#define | ECODE_EMDRV_DMADRV_PARAM_ERROR ( ECODE_EMDRV_DMADRV_BASE | 0x00000001 ) |
Illegal input parameter. | |
#define | ECODE_EMDRV_DMADRV_NOT_INITIALIZED ( ECODE_EMDRV_DMADRV_BASE | 0x00000002 ) |
DMA is not initialized. | |
#define | ECODE_EMDRV_DMADRV_ALREADY_INITIALIZED ( ECODE_EMDRV_DMADRV_BASE | 0x00000003 ) |
DMA has already been initialized. | |
#define | ECODE_EMDRV_DMADRV_CHANNELS_EXHAUSTED ( ECODE_EMDRV_DMADRV_BASE | 0x00000004 ) |
No DMA channels available. | |
#define | ECODE_EMDRV_DMADRV_IN_USE ( ECODE_EMDRV_DMADRV_BASE | 0x00000005 ) |
DMA is in use. | |
#define | ECODE_EMDRV_DMADRV_ALREADY_FREED ( ECODE_EMDRV_DMADRV_BASE | 0x00000006 ) |
DMA channel was free. | |
#define | ECODE_EMDRV_DMADRV_CH_NOT_ALLOCATED ( ECODE_EMDRV_DMADRV_BASE | 0x00000007 ) |
The channel is not reserved. | |
#define | DMADRV_MAX_XFER_COUNT ((int)((_DMA_CTRL_N_MINUS_1_MASK >> _DMA_CTRL_N_MINUS_1_SHIFT) + 1)) |
Maximum length of one DMA transfer. | |
#define | DMADRV_MAX_XFER_COUNT ((int)((_LDMA_CH_CTRL_XFERCNT_MASK >> _LDMA_CH_CTRL_XFERCNT_SHIFT) + 1)) |
Maximum length of one DMA transfer. | |
#define | EMDRV_DMADRV_DMA_CH_COUNT 4 |
DMADRV DMA interrupt priority configuration option. | |
#define | EMDRV_DMADRV_USE_NATIVE_API |
DMADRV native API configuration option. | |
Typedefs | |
typedef bool(* | DMADRV_Callback_t )(unsigned int channel, unsigned int sequenceNo, void *userParam) |
DMADRV transfer completion callback function. | |
Enumerations | |
enum | DMADRV_Peripheralsignal_t { dmadrvPeripheralSignal_NONE = 0, dmadrvPeripheralSignal_ADC0_SCAN = ((8 << 16) + 1), dmadrvPeripheralSignal_ADC0_SINGLE = ((8 << 16) + 0), dmadrvPeripheralSignal_AES_DATARD = ((49 << 16) + 2), dmadrvPeripheralSignal_AES_DATAWR = ((49 << 16) + 0), dmadrvPeripheralSignal_AES_KEYWR = ((49 << 16) + 3), dmadrvPeripheralSignal_AES_XORDATAWR = ((49 << 16) + 1), dmadrvPeripheralSignal_DAC0_CH0 = ((10 << 16) + 0), dmadrvPeripheralSignal_DAC0_CH1 = ((10 << 16) + 1), dmadrvPeripheralSignal_EBI_DDEMPTY = ((51 << 16) + 3), dmadrvPeripheralSignal_EBI_PXL0EMPTY = ((51 << 16) + 0), dmadrvPeripheralSignal_EBI_PXL1EMPTY = ((51 << 16) + 1), dmadrvPeripheralSignal_EBI_PXLFULL = ((51 << 16) + 2), dmadrvPeripheralSignal_I2C0_RXDATAV = ((20 << 16) + 0), dmadrvPeripheralSignal_I2C0_TXBL = ((20 << 16) + 1), dmadrvPeripheralSignal_I2C1_RXDATAV = ((21 << 16) + 0), dmadrvPeripheralSignal_I2C1_TXBL = ((21 << 16) + 1), dmadrvPeripheralSignal_LESENSE_BUFDATAV = ((50 << 16) + 0), dmadrvPeripheralSignal_LEUART0_RXDATAV = ((16 << 16) + 0), dmadrvPeripheralSignal_LEUART0_TXBL = ((16 << 16) + 1), dmadrvPeripheralSignal_LEUART0_TXEMPTY = ((16 << 16) + 2), dmadrvPeripheralSignal_LEUART1_RXDATAV = ((17 << 16) + 0), dmadrvPeripheralSignal_LEUART1_TXBL = ((17 << 16) + 1), dmadrvPeripheralSignal_LEUART1_TXEMPTY = ((17 << 16) + 2), dmadrvPeripheralSignal_MSC_WDATA = ((48 << 16) + 0), dmadrvPeripheralSignal_TIMER0_CC0 = ((24 << 16) + 1), dmadrvPeripheralSignal_TIMER0_CC1 = ((24 << 16) + 2), dmadrvPeripheralSignal_TIMER0_CC2 = ((24 << 16) + 3), dmadrvPeripheralSignal_TIMER0_UFOF = ((24 << 16) + 0), dmadrvPeripheralSignal_TIMER1_CC0 = ((25 << 16) + 1), dmadrvPeripheralSignal_TIMER1_CC1 = ((25 << 16) + 2), dmadrvPeripheralSignal_TIMER1_CC2 = ((25 << 16) + 3), dmadrvPeripheralSignal_TIMER1_UFOF = ((25 << 16) + 0), dmadrvPeripheralSignal_TIMER2_CC0 = ((26 << 16) + 1), dmadrvPeripheralSignal_TIMER2_CC1 = ((26 << 16) + 2), dmadrvPeripheralSignal_TIMER2_CC2 = ((26 << 16) + 3), dmadrvPeripheralSignal_TIMER2_UFOF = ((26 << 16) + 0), dmadrvPeripheralSignal_TIMER3_CC0 = ((27 << 16) + 1), dmadrvPeripheralSignal_TIMER3_CC1 = ((27 << 16) + 2), dmadrvPeripheralSignal_TIMER3_CC2 = ((27 << 16) + 3), dmadrvPeripheralSignal_TIMER3_UFOF = ((27 << 16) + 0), dmadrvPeripheralSignal_UART0_RXDATAV = ((44 << 16) + 0), dmadrvPeripheralSignal_UART0_TXBL = ((44 << 16) + 1), dmadrvPeripheralSignal_UART0_TXEMPTY = ((44 << 16) + 2), dmadrvPeripheralSignal_UART1_RXDATAV = ((45 << 16) + 0), dmadrvPeripheralSignal_UART1_TXBL = ((45 << 16) + 1), dmadrvPeripheralSignal_UART1_TXEMPTY = ((45 << 16) + 2), dmadrvPeripheralSignal_USART0_RXDATAV = ((12 << 16) + 0), dmadrvPeripheralSignal_USART0_TXBL = ((12 << 16) + 1), dmadrvPeripheralSignal_USART0_TXEMPTY = ((12 << 16) + 2), dmadrvPeripheralSignal_USART1_RXDATAV = ((13 << 16) + 0), dmadrvPeripheralSignal_USART1_RXDATAVRIGHT = ((13 << 16) + 3), dmadrvPeripheralSignal_USART1_TXBL = ((13 << 16) + 1), dmadrvPeripheralSignal_USART1_TXBLRIGHT = ((13 << 16) + 4), dmadrvPeripheralSignal_USART1_TXEMPTY = ((13 << 16) + 2), dmadrvPeripheralSignal_USART2_RXDATAV = ((14 << 16) + 0), dmadrvPeripheralSignal_USART2_RXDATAVRIGHT = ((14 << 16) + 3), dmadrvPeripheralSignal_USART2_TXBL = ((14 << 16) + 1), dmadrvPeripheralSignal_USART2_TXBLRIGHT = ((14 << 16) + 4), dmadrvPeripheralSignal_USART2_TXEMPTY = ((14 << 16) + 2) } |
Peripherals that can trigger UDMA transfers. More... | |
enum | DMADRV_Datasize_t { dmadrvDataSize1 = dmaDataSize1, dmadrvDataSize2 = dmaDataSize2, dmadrvDataSize4 = dmaDataSize4 } |
Data size of one UDMA transfer item. More... | |
enum | DMADRV_PeripheralSignal_t { dmadrvPeripheralSignal_NONE = 0 } |
Peripherals that can trigger LDMA transfers. More... | |
enum | DMADRV_DataSize_t { dmadrvDataSize1 = dmaDataSize1, dmadrvDataSize2 = dmaDataSize2, dmadrvDataSize4 = dmaDataSize4 } |
Data size of one LDMA transfer item. More... | |
Functions | |
Ecode_t | DMADRV_AllocateChannel (unsigned int *channelId, void *capabilities) |
Allocate (reserve) a DMA channel. | |
Ecode_t | DMADRV_DeInit (void) |
Deinitialize DMADRV. | |
Ecode_t | DMADRV_FreeChannel (unsigned int channelId) |
Free an allocate (reserved) DMA channel. | |
Ecode_t | DMADRV_Init (void) |
Initialize DMADRV. | |
Ecode_t | DMADRV_MemoryPeripheral (unsigned int channelId, DMADRV_PeripheralSignal_t peripheralSignal, void *dst, void *src, bool srcInc, int len, DMADRV_DataSize_t size, DMADRV_Callback_t callback, void *cbUserParam) |
Start a memory to peripheral DMA transfer. | |
Ecode_t | DMADRV_PeripheralMemory (unsigned int channelId, DMADRV_PeripheralSignal_t peripheralSignal, void *dst, void *src, bool dstInc, int len, DMADRV_DataSize_t size, DMADRV_Callback_t callback, void *cbUserParam) |
Start a peripheral to memory DMA transfer. | |
Ecode_t | DMADRV_MemoryPeripheralPingPong (unsigned int channelId, DMADRV_PeripheralSignal_t peripheralSignal, void *dst, void *src0, void *src1, bool srcInc, int len, DMADRV_DataSize_t size, DMADRV_Callback_t callback, void *cbUserParam) |
Start a memory to peripheral ping-pong DMA transfer. | |
Ecode_t | DMADRV_PeripheralMemoryPingPong (unsigned int channelId, DMADRV_PeripheralSignal_t peripheralSignal, void *dst0, void *dst1, void *src, bool dstInc, int len, DMADRV_DataSize_t size, DMADRV_Callback_t callback, void *cbUserParam) |
Start a peripheral to memory ping-pong DMA transfer. | |
Ecode_t | DMADRV_LdmaStartTransfer (int channelId, LDMA_TransferCfg_t *transfer, LDMA_Descriptor_t *descriptor, DMADRV_Callback_t callback, void *cbUserParam) |
Start a LDMA transfer. | |
Ecode_t | DMADRV_StopTransfer (unsigned int channelId) |
Stop an ongoing DMA transfer. | |
Ecode_t | DMADRV_TransferActive (unsigned int channelId, bool *active) |
Check if a transfer is running. | |
Ecode_t | DMADRV_TransferCompletePending (unsigned int channelId, bool *pending) |
Check if a transfer complete is pending. | |
Ecode_t | DMADRV_TransferDone (unsigned int channelId, bool *done) |
Check if a transfer has completed. | |
Ecode_t | DMADRV_TransferRemainingCount (unsigned int channelId, int *remaining) |
Get number of items remaining in a transfer. |
DMADRV Serial Peripheral Interface module, see DMADRV Direct Memory Access page for detailed documentation.
#define DMADRV_MAX_XFER_COUNT ((int)((_LDMA_CH_CTRL_XFERCNT_MASK >> _LDMA_CH_CTRL_XFERCNT_SHIFT) + 1)) |
#define DMADRV_MAX_XFER_COUNT ((int)((_DMA_CTRL_N_MINUS_1_MASK >> _DMA_CTRL_N_MINUS_1_SHIFT) + 1)) |
#define ECODE_EMDRV_DMADRV_ALREADY_FREED ( ECODE_EMDRV_DMADRV_BASE | 0x00000006 ) |
#define ECODE_EMDRV_DMADRV_ALREADY_INITIALIZED ( ECODE_EMDRV_DMADRV_BASE | 0x00000003 ) |
DMA has already been initialized.
Definition at line 56 of file dmadrv.h.
Referenced by DMADRV_Init().
#define ECODE_EMDRV_DMADRV_CH_NOT_ALLOCATED ( ECODE_EMDRV_DMADRV_BASE | 0x00000007 ) |
The channel is not reserved.
Definition at line 60 of file dmadrv.h.
Referenced by DMADRV_LdmaStartTransfer(), DMADRV_StopTransfer(), DMADRV_TransferActive(), DMADRV_TransferCompletePending(), DMADRV_TransferDone(), and DMADRV_TransferRemainingCount().
#define ECODE_EMDRV_DMADRV_CHANNELS_EXHAUSTED ( ECODE_EMDRV_DMADRV_BASE | 0x00000004 ) |
No DMA channels available.
Definition at line 57 of file dmadrv.h.
Referenced by DMADRV_AllocateChannel().
#define ECODE_EMDRV_DMADRV_IN_USE ( ECODE_EMDRV_DMADRV_BASE | 0x00000005 ) |
#define ECODE_EMDRV_DMADRV_NOT_INITIALIZED ( ECODE_EMDRV_DMADRV_BASE | 0x00000002 ) |
DMA is not initialized.
Definition at line 55 of file dmadrv.h.
Referenced by DMADRV_AllocateChannel(), DMADRV_FreeChannel(), DMADRV_LdmaStartTransfer(), DMADRV_StopTransfer(), DMADRV_TransferActive(), DMADRV_TransferCompletePending(), DMADRV_TransferDone(), and DMADRV_TransferRemainingCount().
#define ECODE_EMDRV_DMADRV_OK ( ECODE_OK ) |
Success return value.
Definition at line 53 of file dmadrv.h.
Referenced by DMADRV_AllocateChannel(), DMADRV_DeInit(), DMADRV_FreeChannel(), DMADRV_Init(), DMADRV_LdmaStartTransfer(), DMADRV_StopTransfer(), DMADRV_TransferActive(), DMADRV_TransferCompletePending(), DMADRV_TransferDone(), DMADRV_TransferRemainingCount(), SPIDRV_Init(), and UARTDRV_Init().
#define ECODE_EMDRV_DMADRV_PARAM_ERROR ( ECODE_EMDRV_DMADRV_BASE | 0x00000001 ) |
Illegal input parameter.
Definition at line 54 of file dmadrv.h.
Referenced by DMADRV_AllocateChannel(), DMADRV_FreeChannel(), DMADRV_Init(), DMADRV_LdmaStartTransfer(), DMADRV_StopTransfer(), DMADRV_TransferActive(), DMADRV_TransferCompletePending(), DMADRV_TransferDone(), and DMADRV_TransferRemainingCount().
#define EMDRV_DMADRV_DMA_CH_COUNT 4 |
DMADRV DMA interrupt priority configuration option.
Set DMA interrupt priority. Range is 0..7, 0 is highest priority. DMADRV channel count configuration option. Number of DMA channels to support. A lower DMA channel count will reduce ram memory footprint.
Definition at line 37 of file dmadrv_config.h.
Referenced by DMADRV_AllocateChannel(), DMADRV_DeInit(), DMADRV_FreeChannel(), DMADRV_Init(), DMADRV_LdmaStartTransfer(), DMADRV_StopTransfer(), DMADRV_TransferActive(), DMADRV_TransferCompletePending(), DMADRV_TransferDone(), and DMADRV_TransferRemainingCount().
#define EMDRV_DMADRV_USE_NATIVE_API |
DMADRV native API configuration option.
Use the native emlib api of the DMA controller, but still use DMADRV housekeeping functions as AllocateChannel/FreeChannel etc.
Definition at line 43 of file dmadrv_config.h.
typedef bool(* DMADRV_Callback_t)(unsigned int channel, unsigned int sequenceNo, void *userParam) |
DMADRV transfer completion callback function.
The callback function is called when a transfer has completed.
[in] | channel | The DMA channel number. |
[in] | sequenceNo | The number of times the callback had been called. Useful on long chains of linked transfers or on endless ping-pong type transfers. |
[in] | userParam | Optional user parameter supplied on DMA invocation. |
enum DMADRV_DataSize_t |
enum DMADRV_Datasize_t |
Peripherals that can trigger UDMA transfers.
Ecode_t DMADRV_AllocateChannel | ( | unsigned int * | channelId, | |
void * | capabilities | |||
) |
Allocate (reserve) a DMA channel.
[out] | channelId | The channel Id assigned by DMADRV. |
[in] | capabilities | Not used. |
Definition at line 131 of file dmadrv.c.
References ECODE_EMDRV_DMADRV_CHANNELS_EXHAUSTED, ECODE_EMDRV_DMADRV_NOT_INITIALIZED, ECODE_EMDRV_DMADRV_OK, ECODE_EMDRV_DMADRV_PARAM_ERROR, and EMDRV_DMADRV_DMA_CH_COUNT.
Referenced by SPIDRV_Init(), and UARTDRV_Init().
Ecode_t DMADRV_DeInit | ( | void | ) |
Deinitialize DMADRV.
If no DMA channels are currently allocated, it will disable DMA hardware and mask associated interrupts.
Definition at line 176 of file dmadrv.c.
References ECODE_EMDRV_DMADRV_IN_USE, ECODE_EMDRV_DMADRV_OK, and EMDRV_DMADRV_DMA_CH_COUNT.
Referenced by SPIDRV_DeInit(), and UARTDRV_DeInit().
Ecode_t DMADRV_FreeChannel | ( | unsigned int | channelId | ) |
Free an allocate (reserved) DMA channel.
[in] | channelId | The channel Id to free. |
Definition at line 223 of file dmadrv.c.
References ECODE_EMDRV_DMADRV_ALREADY_FREED, ECODE_EMDRV_DMADRV_NOT_INITIALIZED, ECODE_EMDRV_DMADRV_OK, ECODE_EMDRV_DMADRV_PARAM_ERROR, and EMDRV_DMADRV_DMA_CH_COUNT.
Referenced by SPIDRV_DeInit(), and UARTDRV_DeInit().
Ecode_t DMADRV_Init | ( | void | ) |
Initialize DMADRV.
The DMA hw is initialized.
Definition at line 258 of file dmadrv.c.
References ECODE_EMDRV_DMADRV_ALREADY_INITIALIZED, ECODE_EMDRV_DMADRV_OK, ECODE_EMDRV_DMADRV_PARAM_ERROR, and EMDRV_DMADRV_DMA_CH_COUNT.
Referenced by SPIDRV_Init(), and UARTDRV_Init().
Ecode_t DMADRV_LdmaStartTransfer | ( | int | channelId, | |
LDMA_TransferCfg_t * | transfer, | |||
LDMA_Descriptor_t * | descriptor, | |||
DMADRV_Callback_t | callback, | |||
void * | cbUserParam | |||
) |
Start a LDMA transfer.
This function can only be used on LDMA when EMDRV_DMADRV_USE_NATIVE_API is defined. It is a wrapper around similar emlib ldma function.
[in] | channelId | The channel Id to use. |
[in] | transfer | DMA transfer configuration data structure. |
[in] | descriptor | DMA transfer descriptor, can be an array of descriptors linked together. |
[in] | callback | Optional callback function for signalling completion. May be NULL if not needed. |
[in] | cbUserParam | Optional user parameter to feed to the callback function. May be NULL if not needed. |
Definition at line 330 of file dmadrv.c.
References ECODE_EMDRV_DMADRV_CH_NOT_ALLOCATED, ECODE_EMDRV_DMADRV_NOT_INITIALIZED, ECODE_EMDRV_DMADRV_OK, ECODE_EMDRV_DMADRV_PARAM_ERROR, and EMDRV_DMADRV_DMA_CH_COUNT.
Ecode_t DMADRV_MemoryPeripheral | ( | unsigned int | channelId, | |
DMADRV_PeripheralSignal_t | peripheralSignal, | |||
void * | dst, | |||
void * | src, | |||
bool | srcInc, | |||
int | len, | |||
DMADRV_DataSize_t | size, | |||
DMADRV_Callback_t | callback, | |||
void * | cbUserParam | |||
) |
Start a memory to peripheral DMA transfer.
[in] | channelId | Not used |
[in] | peripheralSignal | Selects which peripheral/peripheralsignal to use. |
[in] | dst | Destination (peripheral register) memory address. |
[in] | src | Source memory address. |
[in] | srcInc | Set to true to enable source address increment (increment is according to size parameter). |
[in] | len | Number if items (of size size) to transfer. |
[in] | size | Item size, byte, halfword or word. |
[in] | callback | Function to call on dma completion, use NULL if not needed. |
[in] | cbUserParam | Optional user parameter to feed to the callback function. Use NULL if not needed. |
Ecode_t DMADRV_MemoryPeripheralPingPong | ( | unsigned int | channelId, | |
DMADRV_PeripheralSignal_t | peripheralSignal, | |||
void * | dst, | |||
void * | src0, | |||
void * | src1, | |||
bool | srcInc, | |||
int | len, | |||
DMADRV_DataSize_t | size, | |||
DMADRV_Callback_t | callback, | |||
void * | cbUserParam | |||
) |
Start a memory to peripheral ping-pong DMA transfer.
[in] | channelId | Not used |
[in] | peripheralSignal | Selects which peripheral/peripheralsignal to use. |
[in] | dst | Destination (peripheral register) memory address. |
[in] | src0 | Source memory address of first (ping) buffer. |
[in] | src1 | Source memory address of second (pong) buffer. |
[in] | srcInc | Set to true to enable source address increment (increment is according to size parameter). |
[in] | len | Number if items (of size size) to transfer. |
[in] | size | Item size, byte, halfword or word. |
[in] | callback | Function to call on dma completion, use NULL if not needed. |
[in] | cbUserParam | Optional user parameter to feed to the callback function. Use NULL if not needed. |
Ecode_t DMADRV_PeripheralMemory | ( | unsigned int | channelId, | |
DMADRV_PeripheralSignal_t | peripheralSignal, | |||
void * | dst, | |||
void * | src, | |||
bool | dstInc, | |||
int | len, | |||
DMADRV_DataSize_t | size, | |||
DMADRV_Callback_t | callback, | |||
void * | cbUserParam | |||
) |
Start a peripheral to memory DMA transfer.
[in] | channelId | Not used |
[in] | peripheralSignal | Selects which peripheral/peripheralsignal to use. |
[in] | dst | Destination memory address. |
[in] | src | Source memory (peripheral register) address. |
[in] | dstInc | Set to true to enable destination address increment (increment is according to size parameter). |
[in] | len | Number if items (of size size) to transfer. |
[in] | size | Item size, byte, halfword or word. |
[in] | callback | Function to call on dma completion, use NULL if not needed. |
[in] | cbUserParam | Optional user parameter to feed to the callback function. Use NULL if not needed. |
Ecode_t DMADRV_PeripheralMemoryPingPong | ( | unsigned int | channelId, | |
DMADRV_PeripheralSignal_t | peripheralSignal, | |||
void * | dst0, | |||
void * | dst1, | |||
void * | src, | |||
bool | dstInc, | |||
int | len, | |||
DMADRV_DataSize_t | size, | |||
DMADRV_Callback_t | callback, | |||
void * | cbUserParam | |||
) |
Start a peripheral to memory ping-pong DMA transfer.
[in] | channelId | Not used |
[in] | peripheralSignal | Selects which peripheral/peripheralsignal to use. |
[in] | dst0 | Destination memory address of first (ping) buffer. |
[in] | dst1 | Destination memory address of second (pong) buffer. |
[in] | src | Source memory (peripheral register) address. |
[in] | dstInc | Set to true to enable destination address increment (increment is according to size parameter). |
[in] | len | Number if items (of size size) to transfer. |
[in] | size | Item size, byte, halfword or word. |
[in] | callback | Function to call on dma completion, use NULL if not needed. |
[in] | cbUserParam | Optional user parameter to feed to the callback function. Use NULL if not needed. |
Ecode_t DMADRV_StopTransfer | ( | unsigned int | channelId | ) |
Stop an ongoing DMA transfer.
[in] | channelId | The channel Id of the transfer to stop. |
Definition at line 640 of file dmadrv.c.
References ECODE_EMDRV_DMADRV_CH_NOT_ALLOCATED, ECODE_EMDRV_DMADRV_NOT_INITIALIZED, ECODE_EMDRV_DMADRV_OK, ECODE_EMDRV_DMADRV_PARAM_ERROR, and EMDRV_DMADRV_DMA_CH_COUNT.
Referenced by SPIDRV_AbortTransfer(), SPIDRV_DeInit(), UARTDRV_Abort(), and UARTDRV_DeInit().
Ecode_t DMADRV_TransferActive | ( | unsigned int | channelId, | |
bool * | active | |||
) |
Check if a transfer is running.
[in] | channelId | The channel Id of the transfer to check. |
[out] | active | True if transfer is running, false otherwise. |
Definition at line 680 of file dmadrv.c.
References ECODE_EMDRV_DMADRV_CH_NOT_ALLOCATED, ECODE_EMDRV_DMADRV_NOT_INITIALIZED, ECODE_EMDRV_DMADRV_OK, ECODE_EMDRV_DMADRV_PARAM_ERROR, and EMDRV_DMADRV_DMA_CH_COUNT.
Ecode_t DMADRV_TransferCompletePending | ( | unsigned int | channelId, | |
bool * | pending | |||
) |
Check if a transfer complete is pending.
Will check channel interrupt flag. This assumes that the DMA is configured to giva a completion interrupt.
[in] | channelId | The channel Id of the transfer to check. |
[out] | pending | True if a transfer complete is pending, false otherwise. |
Definition at line 732 of file dmadrv.c.
References ECODE_EMDRV_DMADRV_CH_NOT_ALLOCATED, ECODE_EMDRV_DMADRV_NOT_INITIALIZED, ECODE_EMDRV_DMADRV_OK, ECODE_EMDRV_DMADRV_PARAM_ERROR, and EMDRV_DMADRV_DMA_CH_COUNT.
Ecode_t DMADRV_TransferDone | ( | unsigned int | channelId, | |
bool * | done | |||
) |
Check if a transfer has completed.
[in] | channelId | The channel Id of the transfer to check. |
[out] | done | True if a transfer has completed, false otherwise. |
Definition at line 785 of file dmadrv.c.
References ECODE_EMDRV_DMADRV_CH_NOT_ALLOCATED, ECODE_EMDRV_DMADRV_NOT_INITIALIZED, ECODE_EMDRV_DMADRV_OK, ECODE_EMDRV_DMADRV_PARAM_ERROR, and EMDRV_DMADRV_DMA_CH_COUNT.
Ecode_t DMADRV_TransferRemainingCount | ( | unsigned int | channelId, | |
int * | remaining | |||
) |
Get number of items remaining in a transfer.
[in] | channelId | The channel Id of the transfer to check. |
[out] | remaining | Number of items remaining in the transfer. |
Definition at line 851 of file dmadrv.c.
References ECODE_EMDRV_DMADRV_CH_NOT_ALLOCATED, ECODE_EMDRV_DMADRV_NOT_INITIALIZED, ECODE_EMDRV_DMADRV_OK, ECODE_EMDRV_DMADRV_PARAM_ERROR, and EMDRV_DMADRV_DMA_CH_COUNT.
Referenced by SPIDRV_AbortTransfer(), SPIDRV_GetTransferStatus(), UARTDRV_Abort(), UARTDRV_GetReceiveStatus(), and UARTDRV_GetTransmitStatus().