MAX32665 Peripheral Driver API
Peripheral Driver API for the MAX32665
dma.h
1 
6 /* ****************************************************************************
7  * Copyright (C) 2017 Maxim Integrated Products, Inc., All Rights Reserved.
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a
10  * copy of this software and associated documentation files (the "Software"),
11  * to deal in the Software without restriction, including without limitation
12  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13  * and/or sell copies of the Software, and to permit persons to whom the
14  * Software is furnished to do so, subject to the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be included
17  * in all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22  * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
23  * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  * OTHER DEALINGS IN THE SOFTWARE.
26  *
27  * Except as contained in this notice, the name of Maxim Integrated
28  * Products, Inc. shall not be used except as stated in the Maxim Integrated
29  * Products, Inc. Branding Policy.
30  *
31  * The mere transfer of this software does not imply any licenses
32  * of trade secrets, proprietary technology, copyrights, patents,
33  * trademarks, maskwork rights, or any other form of intellectual
34  * property whatsoever. Maxim Integrated Products, Inc. retains all
35  * ownership rights.
36  *
37  *************************************************************************** */
38 
39 #ifndef _DMA_H_
40 #define _DMA_H_
41 
42 /* **** Includes **** */
43 #include "mxc_device.h"
44 #include "dma_regs.h"
45 #include <stdbool.h>
46 #include "mxc_errors.h"
47 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
58 /* **** Definitions **** */
59 
63 typedef enum {
69 
71 typedef enum {
81  MXC_DMA_REQUEST_I2C2RX = MXC_S_DMA_CFG_REQSEL_I2C2RX,
83  //MXC_DMA_REQSEL_SPI3RX = MXC_S_DMA_CFG_REQSEL_SPI3RX, /**< SPI3 Receive DMA Request Selection */
84  //MXC_DMA_REQSEL_SPI_MSS0RX = MXC_S_DMA_CFG_REQSEL_SPI_MSS0RX, /**< I2S Receive DMA Request Selection */
104  //MXC_DMA_REQUEST_SPI3TX = MXC_S_DMA_CFG_REQSEL_SPI3TX, /**< SPI3 Transmit DMA Request Selection */
105  //MXC_DMA_REQUEST_SPI_MSS0TX = MXC_S_DMA_CFG_REQSEL_SPI_MSS0TX, /**< I2S Transmit DMA Request Selection */
118 
120 typedef enum {
126 
128 typedef enum {
138 
140 typedef enum {
141  /* Using the '_V_' define instead of the '_S_' since these same values will be used to
142  specify the DSTWD also. The API functions will shift the value the correct amount
143  prior to writing the cfg register. */
148 
154 typedef struct {
155  int ch;
159  int srcinc_en;
160  int dstinc_en;
162 
167 typedef struct {
168  int ch;
169  void* source;
170  void* dest;
171  int len;
173 
180 typedef struct {
181  int ch;
183  unsigned int reqwait_en;
186  unsigned int burst_size;
188 
194 typedef void (*mxc_dma_complete_cb_t) (void* dest);
195 
208 
209 /* **** Function Prototypes **** */
210 /*************************/
211 /* Low Level Functions */
212 /*************************/
218 int MXC_DMA_Init (void);
219 
230 
240 
251 
260 
271 
281 
292 
302 
325 int MXC_DMA_SetCallback (int ch, void (*callback) (int, int));
326 
337 int MXC_DMA_SetChannelInterruptEn (int ch, bool chdis, bool ctz);
338 
347 int MXC_DMA_ChannelEnableInt (int ch, int flags);
348 
355 int MXC_DMA_ChannelDisableInt (int ch, int flags);
356 
363 
370 int MXC_DMA_ChannelClearFlags (int ch, int flags);
371 
379 int MXC_DMA_EnableInt (int ch);
380 
386 int MXC_DMA_DisableInt (int ch);
387 
394 int MXC_DMA_Start (int ch);
395 
401 int MXC_DMA_Stop (int ch);
402 
411 
418 
419 /*************************/
420 /* High Level Functions */
421 /*************************/
422 
435 int MXC_DMA_MemCpy (void* dest, void* src, int len, mxc_dma_complete_cb_t callback);
436 
454 #ifdef __cplusplus
455 }
456 #endif
457 
458 #endif /* _DMA_H_ */
mxc_dma_config_t::ch
int ch
The channel to load the configuration data into.
Definition: dma.h:155
mxc_dma_complete_cb_t
void(* mxc_dma_complete_cb_t)(void *dest)
The callback called on completion of a DMA_MemCpy() transfer.
Definition: dma.h:194
MXC_DMA_Stop
int MXC_DMA_Stop(int ch)
Stop DMA transfer, irrespective of status (complete or in-progress)
mxc_dma_adv_config_t
The advanced configuration options, these are optional but could be needed in cases where multiple DM...
Definition: dma.h:180
MXC_DMA_MemCpy
int MXC_DMA_MemCpy(void *dest, void *src, int len, mxc_dma_complete_cb_t callback)
Performs a memcpy, using DMA, optionally asynchronous.
mxc_dma_srcdst_t::source
void * source
Pointer to the source address, if applicable.
Definition: dma.h:169
MXC_S_DMA_CFG_REQSEL_UART2TX
#define MXC_S_DMA_CFG_REQSEL_UART2TX
Definition: dma_regs.h:242
mxc_dma_adv_config_t::burst_size
unsigned int burst_size
Number of bytes moved in a single burst.
Definition: dma.h:186
MXC_DMA_Init
int MXC_DMA_Init(void)
Initialize DMA resources.
MXC_S_DMA_CFG_TOSEL_TO4
#define MXC_S_DMA_CFG_TOSEL_TO4
Definition: dma_regs.h:274
MXC_S_DMA_CFG_REQSEL_USBTXEP8
#define MXC_S_DMA_CFG_REQSEL_USBTXEP8
Definition: dma_regs.h:260
MXC_S_DMA_CFG_PRI_MEDHIGH
#define MXC_S_DMA_CFG_PRI_MEDHIGH
Definition: dma_regs.h:177
mxc_dma_prescale_t
mxc_dma_prescale_t
Enumeration for the DMA prescaler.
Definition: dma.h:120
MXC_DMA_SetCallback
int MXC_DMA_SetCallback(int ch, void(*callback)(int, int))
Set channel interrupt callback.
MXC_DMA_SetChannelInterruptEn
int MXC_DMA_SetChannelInterruptEn(int ch, bool chdis, bool ctz)
Set channel interrupt.
MXC_DMA_ChannelEnableInt
int MXC_DMA_ChannelEnableInt(int ch, int flags)
Enable channel interrupt.
MXC_S_DMA_CFG_TOSEL_TO256
#define MXC_S_DMA_CFG_TOSEL_TO256
Definition: dma_regs.h:286
MXC_DMA_ConfigChannel
int MXC_DMA_ConfigChannel(mxc_dma_config_t config, mxc_dma_srcdst_t srcdst)
Configure the DMA channel.
MXC_DMA_REQUEST_UART1TX
@ MXC_DMA_REQUEST_UART1TX
Definition: dma.h:100
MXC_S_DMA_CFG_REQSEL_MEMTOMEM
#define MXC_S_DMA_CFG_REQSEL_MEMTOMEM
Definition: dma_regs.h:186
mxc_dma_srcdst_t::len
int len
Number of bytes to transfer.
Definition: dma.h:171
MXC_DMA_DisableInt
int MXC_DMA_DisableInt(int ch)
Disable channel interrupt.
MXC_DMA_REQUEST_USBTXEP11
@ MXC_DMA_REQUEST_USBTXEP11
Definition: dma.h:116
mxc_dma_adv_config_t::reqwait_en
unsigned int reqwait_en
Delay the timeout timer start until after first transfer.
Definition: dma.h:183
MXC_DMA_REQUEST_UART0RX
@ MXC_DMA_REQUEST_UART0RX
Definition: dma.h:76
MXC_S_DMA_CFG_REQSEL_USBTXEP5
#define MXC_S_DMA_CFG_REQSEL_USBTXEP5
Definition: dma_regs.h:254
MXC_DMA_REQUEST_USBRXEP2
@ MXC_DMA_REQUEST_USBRXEP2
Definition: dma.h:86
MXC_S_DMA_CFG_PSSEL_DIV64K
#define MXC_S_DMA_CFG_PSSEL_DIV64K
Definition: dma_regs.h:297
MXC_DMA_ChannelClearFlags
int MXC_DMA_ChannelClearFlags(int ch, int flags)
Clear channel interrupt flags.
MXC_S_DMA_CFG_PRI_MEDLOW
#define MXC_S_DMA_CFG_PRI_MEDLOW
Definition: dma_regs.h:179
MXC_DMA_TIMEOUT_32_CLK
@ MXC_DMA_TIMEOUT_32_CLK
Definition: dma.h:132
mxc_dma_adv_config_t::tosel
mxc_dma_timeout_t tosel
Number of prescaled clocks seen by the channel before a timeout.
Definition: dma.h:184
MXC_DMA_REQUEST_USBRXEP9
@ MXC_DMA_REQUEST_USBRXEP9
Definition: dma.h:93
MXC_DMA_TIMEOUT_4_CLK
@ MXC_DMA_TIMEOUT_4_CLK
Definition: dma.h:129
MXC_DMA_ChannelGetFlags
int MXC_DMA_ChannelGetFlags(int ch)
Read channel interrupt flags.
MXC_S_DMA_CFG_REQSEL_SPI0RX
#define MXC_S_DMA_CFG_REQSEL_SPI0RX
Definition: dma_regs.h:206
MXC_DMA_TIMEOUT_8_CLK
@ MXC_DMA_TIMEOUT_8_CLK
Definition: dma.h:130
MXC_DMA_REQUEST_SPI0TX
@ MXC_DMA_REQUEST_SPI0TX
Definition: dma.h:96
MXC_DMA_ReleaseChannel
int MXC_DMA_ReleaseChannel(int ch)
Release DMA channel.
MXC_S_DMA_CFG_REQSEL_USBRXEP5
#define MXC_S_DMA_CFG_REQSEL_USBRXEP5
Definition: dma_regs.h:216
MXC_DMA_WIDTH_HALFWORD
@ MXC_DMA_WIDTH_HALFWORD
Definition: dma.h:145
MXC_DMA_Handler
void MXC_DMA_Handler()
Interrupt handler function.
MXC_DMA_WIDTH_WORD
@ MXC_DMA_WIDTH_WORD
Definition: dma.h:146
MXC_S_DMA_CFG_TOSEL_TO8
#define MXC_S_DMA_CFG_TOSEL_TO8
Definition: dma_regs.h:276
MXC_DMA_SetSrcDst
int MXC_DMA_SetSrcDst(mxc_dma_srcdst_t srcdst)
Set channel source, destination, and count for the transfer.
MXC_DMA_REQUEST_I2C0RX
@ MXC_DMA_REQUEST_I2C0RX
Definition: dma.h:78
MXC_S_DMA_CFG_REQSEL_USBRXEP4
#define MXC_S_DMA_CFG_REQSEL_USBRXEP4
Definition: dma_regs.h:214
MXC_DMA_Start
int MXC_DMA_Start(int ch)
Start transfer.
MXC_DMA_REQUEST_USBRXEP3
@ MXC_DMA_REQUEST_USBRXEP3
Definition: dma.h:87
MXC_V_DMA_CFG_SRCWD_WORD
#define MXC_V_DMA_CFG_SRCWD_WORD
Definition: dma_regs.h:307
MXC_DMA_REQUEST_USBRXEP1
@ MXC_DMA_REQUEST_USBRXEP1
Definition: dma.h:85
MXC_DMA_REQUEST_SPI1TX
@ MXC_DMA_REQUEST_SPI1TX
Definition: dma.h:97
MXC_S_DMA_CFG_REQSEL_UART0RX
#define MXC_S_DMA_CFG_REQSEL_UART0RX
Definition: dma_regs.h:192
MXC_S_DMA_CFG_REQSEL_I2C0RX
#define MXC_S_DMA_CFG_REQSEL_I2C0RX
Definition: dma_regs.h:196
MXC_S_DMA_CFG_REQSEL_UART1TX
#define MXC_S_DMA_CFG_REQSEL_UART1TX
Definition: dma_regs.h:236
MXC_S_DMA_CFG_TOSEL_TO64
#define MXC_S_DMA_CFG_TOSEL_TO64
Definition: dma_regs.h:282
MXC_DMA_REQUEST_USBTXEP8
@ MXC_DMA_REQUEST_USBTXEP8
Definition: dma.h:113
mxc_dma_config_t::reqsel
mxc_dma_reqsel_t reqsel
The request select line to be used (mem2mem, peripheral)
Definition: dma.h:156
MXC_DMA_REQUEST_USBTXEP1
@ MXC_DMA_REQUEST_USBTXEP1
Definition: dma.h:106
MXC_S_DMA_CFG_REQSEL_SPI0TX
#define MXC_S_DMA_CFG_REQSEL_SPI0TX
Definition: dma_regs.h:244
MXC_S_DMA_CFG_TOSEL_TO32
#define MXC_S_DMA_CFG_TOSEL_TO32
Definition: dma_regs.h:280
MXC_DMA_PRIO_HIGH
@ MXC_DMA_PRIO_HIGH
Definition: dma.h:64
MXC_S_DMA_CFG_REQSEL_USBRXEP3
#define MXC_S_DMA_CFG_REQSEL_USBRXEP3
Definition: dma_regs.h:212
MXC_DMA_REQUEST_USBRXEP11
@ MXC_DMA_REQUEST_USBRXEP11
Definition: dma.h:95
MXC_S_DMA_CFG_REQSEL_USBRXEP9
#define MXC_S_DMA_CFG_REQSEL_USBRXEP9
Definition: dma_regs.h:224
MXC_S_DMA_CFG_REQSEL_USBTXEP11
#define MXC_S_DMA_CFG_REQSEL_USBTXEP11
Definition: dma_regs.h:266
MXC_DMA_REQUEST_UART2TX
@ MXC_DMA_REQUEST_UART2TX
Definition: dma.h:103
mxc_dma_config_t::srcwd
mxc_dma_width_t srcwd
The source width (could be dependent on FIFO width)
Definition: dma.h:157
MXC_S_DMA_CFG_PRI_LOW
#define MXC_S_DMA_CFG_PRI_LOW
Definition: dma_regs.h:181
MXC_S_DMA_CFG_REQSEL_SPI1TX
#define MXC_S_DMA_CFG_REQSEL_SPI1TX
Definition: dma_regs.h:230
MXC_S_DMA_CFG_PSSEL_DIV16M
#define MXC_S_DMA_CFG_PSSEL_DIV16M
Definition: dma_regs.h:299
MXC_DMA_TIMEOUT_64_CLK
@ MXC_DMA_TIMEOUT_64_CLK
Definition: dma.h:133
MXC_DMA_REQUEST_USBRXEP10
@ MXC_DMA_REQUEST_USBRXEP10
Definition: dma.h:94
MXC_DMA_WIDTH_BYTE
@ MXC_DMA_WIDTH_BYTE
Definition: dma.h:144
MXC_DMA_REQUEST_USBRXEP4
@ MXC_DMA_REQUEST_USBRXEP4
Definition: dma.h:88
MXC_S_DMA_CFG_REQSEL_SPI2RX
#define MXC_S_DMA_CFG_REQSEL_SPI2RX
Definition: dma_regs.h:190
MXC_DMA_PRIO_MEDLOW
@ MXC_DMA_PRIO_MEDLOW
Definition: dma.h:66
MXC_DMA_REQUEST_USBRXEP7
@ MXC_DMA_REQUEST_USBRXEP7
Definition: dma.h:91
MXC_S_DMA_CFG_REQSEL_I2C1RX
#define MXC_S_DMA_CFG_REQSEL_I2C1RX
Definition: dma_regs.h:198
MXC_S_DMA_CFG_REQSEL_I2C1TX
#define MXC_S_DMA_CFG_REQSEL_I2C1TX
Definition: dma_regs.h:240
MXC_S_DMA_CFG_REQSEL_USBRXEP11
#define MXC_S_DMA_CFG_REQSEL_USBRXEP11
Definition: dma_regs.h:228
MXC_DMA_PRESCALE_DISABLE
@ MXC_DMA_PRESCALE_DISABLE
Definition: dma.h:121
MXC_DMA_PRIO_LOW
@ MXC_DMA_PRIO_LOW
Definition: dma.h:67
MXC_DMA_PRESCALE_DIV64K
@ MXC_DMA_PRESCALE_DIV64K
Definition: dma.h:123
mxc_dma_config_t::dstwd
mxc_dma_width_t dstwd
The destination width (could be dependent on FIFO width)
Definition: dma.h:158
MXC_DMA_REQUEST_USBTXEP6
@ MXC_DMA_REQUEST_USBTXEP6
Definition: dma.h:111
MXC_DMA_GetCHRegs
mxc_dma_ch_regs_t * MXC_DMA_GetCHRegs(int ch)
Get a pointer to the DMA channel registers.
MXC_S_DMA_CFG_REQSEL_UART2RX
#define MXC_S_DMA_CFG_REQSEL_UART2RX
Definition: dma_regs.h:204
MXC_DMA_TIMEOUT_16_CLK
@ MXC_DMA_TIMEOUT_16_CLK
Definition: dma.h:131
MXC_DMA_REQUEST_USBTXEP4
@ MXC_DMA_REQUEST_USBTXEP4
Definition: dma.h:109
MXC_S_DMA_CFG_REQSEL_I2C0TX
#define MXC_S_DMA_CFG_REQSEL_I2C0TX
Definition: dma_regs.h:238
MXC_S_DMA_CFG_REQSEL_USBTXEP9
#define MXC_S_DMA_CFG_REQSEL_USBTXEP9
Definition: dma_regs.h:262
MXC_DMA_ChannelDisableInt
int MXC_DMA_ChannelDisableInt(int ch, int flags)
Disable channel interrupt.
MXC_S_DMA_CFG_PSSEL_DIV256
#define MXC_S_DMA_CFG_PSSEL_DIV256
Definition: dma_regs.h:295
MXC_V_DMA_CFG_SRCWD_HALFWORD
#define MXC_V_DMA_CFG_SRCWD_HALFWORD
Definition: dma_regs.h:305
MXC_DMA_REQUEST_SPI0RX
@ MXC_DMA_REQUEST_SPI0RX
Definition: dma.h:73
MXC_DMA_PRESCALE_DIV16M
@ MXC_DMA_PRESCALE_DIV16M
Definition: dma.h:124
MXC_DMA_REQUEST_ADC
@ MXC_DMA_REQUEST_ADC
Definition: dma.h:80
mxc_dma_ch_regs_t
Definition: dma_regs.h:88
MXC_DMA_AdvConfigChannel
int MXC_DMA_AdvConfigChannel(mxc_dma_adv_config_t advConfig)
Configure the DMA channel with more advanced parameters.
MXC_DMA_REQUEST_USBRXEP8
@ MXC_DMA_REQUEST_USBRXEP8
Definition: dma.h:92
mxc_dma_timeout_t
mxc_dma_timeout_t
Enumeration for the DMA timeout value.
Definition: dma.h:128
MXC_S_DMA_CFG_REQSEL_UART0TX
#define MXC_S_DMA_CFG_REQSEL_UART0TX
Definition: dma_regs.h:234
MXC_S_DMA_CFG_REQSEL_SPI2TX
#define MXC_S_DMA_CFG_REQSEL_SPI2TX
Definition: dma_regs.h:232
mxc_dma_width_t
mxc_dma_width_t
DMA transfer data width.
Definition: dma.h:140
MXC_DMA_SetSrcReload
int MXC_DMA_SetSrcReload(mxc_dma_srcdst_t srcdstReload)
Set channel reload source, destination, and count for the transfer.
MXC_DMA_REQUEST_USBTXEP3
@ MXC_DMA_REQUEST_USBTXEP3
Definition: dma.h:108
MXC_DMA_EnableInt
int MXC_DMA_EnableInt(int ch)
Enable channel interrupt.
MXC_S_DMA_CFG_REQSEL_UART1RX
#define MXC_S_DMA_CFG_REQSEL_UART1RX
Definition: dma_regs.h:194
MXC_DMA_PRIO_MEDHIGH
@ MXC_DMA_PRIO_MEDHIGH
Definition: dma.h:65
MXC_DMA_REQUEST_I2C1TX
@ MXC_DMA_REQUEST_I2C1TX
Definition: dma.h:102
MXC_S_DMA_CFG_REQSEL_USBTXEP10
#define MXC_S_DMA_CFG_REQSEL_USBTXEP10
Definition: dma_regs.h:264
mxc_dma_reqsel_t
mxc_dma_reqsel_t
DMA request select.
Definition: dma.h:71
MXC_S_DMA_CFG_TOSEL_TO16
#define MXC_S_DMA_CFG_TOSEL_TO16
Definition: dma_regs.h:278
MXC_S_DMA_CFG_PRI_HIGH
#define MXC_S_DMA_CFG_PRI_HIGH
Definition: dma_regs.h:175
MXC_DMA_AcquireChannel
int MXC_DMA_AcquireChannel(void)
Request DMA channel.
mxc_dma_adv_config_t::pssel
mxc_dma_prescale_t pssel
Prescaler for the timeout timer.
Definition: dma.h:185
MXC_S_DMA_CFG_REQSEL_USBTXEP6
#define MXC_S_DMA_CFG_REQSEL_USBTXEP6
Definition: dma_regs.h:256
MXC_DMA_REQUEST_UART1RX
@ MXC_DMA_REQUEST_UART1RX
Definition: dma.h:77
MXC_DMA_GetSrcDst
int MXC_DMA_GetSrcDst(mxc_dma_srcdst_t *srcdst)
Get channel source, destination, and count for transfer.
MXC_S_DMA_CFG_REQSEL_I2C2RX
#define MXC_S_DMA_CFG_REQSEL_I2C2RX
Definition: dma_regs.h:202
mxc_dma_priority_t
mxc_dma_priority_t
Definition: dma.h:63
MXC_DMA_REQUEST_USBTXEP5
@ MXC_DMA_REQUEST_USBTXEP5
Definition: dma.h:110
MXC_S_DMA_CFG_REQSEL_SPI1RX
#define MXC_S_DMA_CFG_REQSEL_SPI1RX
Definition: dma_regs.h:188
mxc_dma_srcdst_t::dest
void * dest
Pointer to the destination address, if applicable.
Definition: dma.h:170
mxc_dma_srcdst_t
The information needed to complete a DMA transfer.
Definition: dma.h:167
MXC_S_DMA_CFG_REQSEL_USBTXEP2
#define MXC_S_DMA_CFG_REQSEL_USBTXEP2
Definition: dma_regs.h:248
MXC_S_DMA_CFG_REQSEL_USBRXEP10
#define MXC_S_DMA_CFG_REQSEL_USBRXEP10
Definition: dma_regs.h:226
MXC_S_DMA_CFG_REQSEL_USBTXEP3
#define MXC_S_DMA_CFG_REQSEL_USBTXEP3
Definition: dma_regs.h:250
MXC_DMA_TIMEOUT_512_CLK
@ MXC_DMA_TIMEOUT_512_CLK
Definition: dma.h:136
MXC_DMA_REQUEST_USBRXEP5
@ MXC_DMA_REQUEST_USBRXEP5
Definition: dma.h:89
mxc_dma_config_t::srcinc_en
int srcinc_en
Whether to increment the source address during the transfer.
Definition: dma.h:159
MXC_S_DMA_CFG_REQSEL_USBRXEP2
#define MXC_S_DMA_CFG_REQSEL_USBRXEP2
Definition: dma_regs.h:210
MXC_S_DMA_CFG_REQSEL_USBRXEP6
#define MXC_S_DMA_CFG_REQSEL_USBRXEP6
Definition: dma_regs.h:218
MXC_DMA_GetSrcReload
int MXC_DMA_GetSrcReload(mxc_dma_srcdst_t *srcdstReload)
Get channel reload source, destination, and count for transfer.
MXC_DMA_REQUEST_USBTXEP10
@ MXC_DMA_REQUEST_USBTXEP10
Definition: dma.h:115
mxc_dma_config_t
The basic configuration information to set up a DMA channel and prepare it for transfers.
Definition: dma.h:154
MXC_DMA_REQUEST_USBRXEP6
@ MXC_DMA_REQUEST_USBRXEP6
Definition: dma.h:90
MXC_DMA_REQUEST_UART0TX
@ MXC_DMA_REQUEST_UART0TX
Definition: dma.h:99
MXC_DMA_REQUEST_I2C0TX
@ MXC_DMA_REQUEST_I2C0TX
Definition: dma.h:101
MXC_DMA_REQUEST_SPI2TX
@ MXC_DMA_REQUEST_SPI2TX
Definition: dma.h:98
mxc_dma_adv_config_t::prio
mxc_dma_priority_t prio
The DMA priority for the channel.
Definition: dma.h:182
MXC_S_DMA_CFG_REQSEL_USBTXEP7
#define MXC_S_DMA_CFG_REQSEL_USBTXEP7
Definition: dma_regs.h:258
MXC_DMA_REQUEST_MEMTOMEM
@ MXC_DMA_REQUEST_MEMTOMEM
Definition: dma.h:72
mxc_dma_trans_chain_t
mxc_dma_srcdst_t(* mxc_dma_trans_chain_t)(mxc_dma_srcdst_t dest)
The callback called on completion of a transfer,.
Definition: dma.h:207
MXC_S_DMA_CFG_REQSEL_USBRXEP7
#define MXC_S_DMA_CFG_REQSEL_USBRXEP7
Definition: dma_regs.h:220
mxc_dma_config_t::dstinc_en
int dstinc_en
Whether to increment the source address during the transfer.
Definition: dma.h:160
MXC_DMA_TIMEOUT_256_CLK
@ MXC_DMA_TIMEOUT_256_CLK
Definition: dma.h:135
MXC_DMA_REQUEST_UART2RX
@ MXC_DMA_REQUEST_UART2RX
Definition: dma.h:82
MXC_S_DMA_CFG_TOSEL_TO512
#define MXC_S_DMA_CFG_TOSEL_TO512
Definition: dma_regs.h:288
MXC_DMA_REQUEST_USBTXEP7
@ MXC_DMA_REQUEST_USBTXEP7
Definition: dma.h:112
MXC_S_DMA_CFG_PSSEL_DIS
#define MXC_S_DMA_CFG_PSSEL_DIS
Definition: dma_regs.h:293
MXC_S_DMA_CFG_REQSEL_USBRXEP1
#define MXC_S_DMA_CFG_REQSEL_USBRXEP1
Definition: dma_regs.h:208
MXC_DMA_REQUEST_USBTXEP9
@ MXC_DMA_REQUEST_USBTXEP9
Definition: dma.h:114
MXC_DMA_REQUEST_SPI2RX
@ MXC_DMA_REQUEST_SPI2RX
Definition: dma.h:75
MXC_S_DMA_CFG_REQSEL_USBTXEP4
#define MXC_S_DMA_CFG_REQSEL_USBTXEP4
Definition: dma_regs.h:252
MXC_S_DMA_CFG_REQSEL_USBRXEP8
#define MXC_S_DMA_CFG_REQSEL_USBRXEP8
Definition: dma_regs.h:222
MXC_S_DMA_CFG_TOSEL_TO128
#define MXC_S_DMA_CFG_TOSEL_TO128
Definition: dma_regs.h:284
MXC_S_DMA_CFG_REQSEL_USBTXEP1
#define MXC_S_DMA_CFG_REQSEL_USBTXEP1
Definition: dma_regs.h:246
MXC_V_DMA_CFG_SRCWD_BYTE
#define MXC_V_DMA_CFG_SRCWD_BYTE
Definition: dma_regs.h:303
MXC_DMA_REQUEST_SPI1RX
@ MXC_DMA_REQUEST_SPI1RX
Definition: dma.h:74
MXC_DMA_REQUEST_USBTXEP2
@ MXC_DMA_REQUEST_USBTXEP2
Definition: dma.h:107
MXC_DMA_REQUEST_I2C1RX
@ MXC_DMA_REQUEST_I2C1RX
Definition: dma.h:79
MXC_DMA_PRESCALE_DIV256
@ MXC_DMA_PRESCALE_DIV256
Definition: dma.h:122
MXC_DMA_TIMEOUT_128_CLK
@ MXC_DMA_TIMEOUT_128_CLK
Definition: dma.h:134
MXC_DMA_DoTransfer
int MXC_DMA_DoTransfer(mxc_dma_config_t config, mxc_dma_srcdst_t firstSrcDst, mxc_dma_trans_chain_t callback)
Performs a memcpy, using DMA, optionally asynchronous.
MXC_S_DMA_CFG_REQSEL_ADC
#define MXC_S_DMA_CFG_REQSEL_ADC
Definition: dma_regs.h:200