libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
dma_common_l1f013.h
Go to the documentation of this file.
1/** @addtogroup dma_defines
2
3@author @htmlonly © @endhtmlonly 2010
4Thomas Otto <tommi@viadmin.org>
5@author @htmlonly &copy; @endhtmlonly 2012
6Piotr Esden-Tempski <piotr@esden.net>
7
8*/
9
10/*
11 * This file is part of the libopencm3 project.
12 *
13 * Copyright (C) 2010 Thomas Otto <tommi@viadmin.org>
14 * Copyright (C) 2012 Piotr Esden-Tempski <piotr@esden.net>
15 *
16 * This library is free software: you can redistribute it and/or modify
17 * it under the terms of the GNU Lesser General Public License as published by
18 * the Free Software Foundation, either version 3 of the License, or
19 * (at your option) any later version.
20 *
21 * This library is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU Lesser General Public License for more details.
25 *
26 * You should have received a copy of the GNU Lesser General Public License
27 * along with this library. If not, see <http://www.gnu.org/licenses/>.
28 */
29
30/**@{*/
31
32/* THIS FILE SHOULD NOT BE INCLUDED DIRECTLY, BUT ONLY VIA DMA.H
33The order of header inclusion is important. dma.h includes the device
34specific memorymap.h header before including this header file.*/
35
36/** @cond */
37#ifdef LIBOPENCM3_DMA_H
38/** @endcond */
39#ifndef LIBOPENCM3_DMA_COMMON_F13_H
40#define LIBOPENCM3_DMA_COMMON_F13_H
41
42/* --- Convenience macros -------------------------------------------------- */
43
44/* DMA register base adresses (for convenience) */
45#define DMA1 DMA1_BASE
46#define DMA2 DMA2_BASE
47
48/* --- DMA registers ------------------------------------------------------- */
49
50/* DMA interrupt status register (DMAx_ISR) */
51#define DMA_ISR(dma_base) MMIO32((dma_base) + 0x00)
52#define DMA1_ISR DMA_ISR(DMA1)
53#define DMA2_ISR DMA_ISR(DMA2)
54
55/* DMA interrupt flag clear register (DMAx_IFCR) */
56#define DMA_IFCR(dma_base) MMIO32((dma_base) + 0x04)
57#define DMA1_IFCR DMA_IFCR(DMA1)
58#define DMA2_IFCR DMA_IFCR(DMA2)
59
60/* DMA channel configuration register (DMAx_CCRy) */
61#define DMA_CCR(dma_base, channel) MMIO32((dma_base) + 0x08 + \
62 (0x14 * ((channel) - 1)))
63
64#define DMA1_CCR(channel) DMA_CCR(DMA1, channel)
65#define DMA1_CCR1 DMA1_CCR(DMA_CHANNEL1)
66#define DMA1_CCR2 DMA1_CCR(DMA_CHANNEL2)
67#define DMA1_CCR3 DMA1_CCR(DMA_CHANNEL3)
68#define DMA1_CCR4 DMA1_CCR(DMA_CHANNEL4)
69#define DMA1_CCR5 DMA1_CCR(DMA_CHANNEL5)
70#define DMA1_CCR6 DMA1_CCR(DMA_CHANNEL6)
71#define DMA1_CCR7 DMA1_CCR(DMA_CHANNEL7)
72
73#define DMA2_CCR(channel) DMA_CCR(DMA2, channel)
74#define DMA2_CCR1 DMA2_CCR(DMA_CHANNEL1)
75#define DMA2_CCR2 DMA2_CCR(DMA_CHANNEL2)
76#define DMA2_CCR3 DMA2_CCR(DMA_CHANNEL3)
77#define DMA2_CCR4 DMA2_CCR(DMA_CHANNEL4)
78#define DMA2_CCR5 DMA2_CCR(DMA_CHANNEL5)
79
80/* DMA number of data register (DMAx_CNDTRy) */
81#define DMA_CNDTR(dma_base, channel) MMIO32((dma_base) + 0x0C + \
82 (0x14 * ((channel) - 1)))
83
84#define DMA1_CNDTR(channel) DMA_CNDTR(DMA1, channel)
85#define DMA1_CNDTR1 DMA1_CNDTR(DMA_CHANNEL1)
86#define DMA1_CNDTR2 DMA1_CNDTR(DMA_CHANNEL2)
87#define DMA1_CNDTR3 DMA1_CNDTR(DMA_CHANNEL3)
88#define DMA1_CNDTR4 DMA1_CNDTR(DMA_CHANNEL4)
89#define DMA1_CNDTR5 DMA1_CNDTR(DMA_CHANNEL5)
90#define DMA1_CNDTR6 DMA1_CNDTR(DMA_CHANNEL6)
91#define DMA1_CNDTR7 DMA1_CNDTR(DMA_CHANNEL7)
92
93#define DMA2_CNDTR(channel) DMA_CNDTR(DMA2, channel)
94#define DMA2_CNDTR1 DMA2_CNDTR(DMA_CHANNEL1)
95#define DMA2_CNDTR2 DMA2_CNDTR(DMA_CHANNEL2)
96#define DMA2_CNDTR3 DMA2_CNDTR(DMA_CHANNEL3)
97#define DMA2_CNDTR4 DMA2_CNDTR(DMA_CHANNEL4)
98#define DMA2_CNDTR5 DMA2_CNDTR(DMA_CHANNEL5)
99
100/* DMA peripheral address register (DMAx_CPARy) */
101#define DMA_CPAR(dma_base, channel) MMIO32((dma_base) + 0x10 + \
102 (0x14 * ((channel) - 1)))
103
104#define DMA1_CPAR(channel) DMA_CPAR(DMA1, channel)
105#define DMA1_CPAR1 DMA1_CPAR(DMA_CHANNEL1)
106#define DMA1_CPAR2 DMA1_CPAR(DMA_CHANNEL2)
107#define DMA1_CPAR3 DMA1_CPAR(DMA_CHANNEL3)
108#define DMA1_CPAR4 DMA1_CPAR(DMA_CHANNEL4)
109#define DMA1_CPAR5 DMA1_CPAR(DMA_CHANNEL5)
110#define DMA1_CPAR6 DMA1_CPAR(DMA_CHANNEL6)
111#define DMA1_CPAR7 DMA1_CPAR(DMA_CHANNEL7)
112
113#define DMA2_CPAR(channel) DMA_CPAR(DMA2, channel)
114#define DMA2_CPAR1 DMA2_CPAR(DMA_CHANNEL1)
115#define DMA2_CPAR2 DMA2_CPAR(DMA_CHANNEL2)
116#define DMA2_CPAR3 DMA2_CPAR(DMA_CHANNEL3)
117#define DMA2_CPAR4 DMA2_CPAR(DMA_CHANNEL4)
118#define DMA2_CPAR5 DMA2_CPAR(DMA_CHANNEL5)
119
120/* DMA memory address register (DMAx_CMARy) */
121
122#define DMA_CMAR(dma_base, channel) MMIO32((dma_base) + 0x14 + \
123 (0x14 * ((channel) - 1)))
124
125#define DMA1_CMAR(channel) DMA_CMAR(DMA1, channel)
126#define DMA1_CMAR1 DMA1_CMAR(DMA_CHANNEL1)
127#define DMA1_CMAR2 DMA1_CMAR(DMA_CHANNEL2)
128#define DMA1_CMAR3 DMA1_CMAR(DMA_CHANNEL3)
129#define DMA1_CMAR4 DMA1_CMAR(DMA_CHANNEL4)
130#define DMA1_CMAR5 DMA1_CMAR(DMA_CHANNEL5)
131#define DMA1_CMAR6 DMA1_CMAR(DMA_CHANNEL6)
132#define DMA1_CMAR7 DMA1_CMAR(DMA_CHANNEL7)
133
134#define DMA2_CMAR(channel) DMA_CMAR(DMA2, channel)
135#define DMA2_CMAR1 DMA2_CMAR(DMA_CHANNEL1)
136#define DMA2_CMAR2 DMA2_CMAR(DMA_CHANNEL2)
137#define DMA2_CMAR3 DMA2_CMAR(DMA_CHANNEL3)
138#define DMA2_CMAR4 DMA2_CMAR(DMA_CHANNEL4)
139#define DMA2_CMAR5 DMA2_CMAR(DMA_CHANNEL5)
140
141/* --- DMA_ISR values ------------------------------------------------------ */
142
143/* --- DMA Interrupt Flag offset values ------------------------------------- */
144/* These are based on every interrupt flag and flag clear being at the same
145 * relative location
146 */
147/** @defgroup dma_if_offset DMA Interrupt Flag Offsets within channel flag
148group.
149@ingroup dma_defines
150
151@{*/
152/** Transfer Error Interrupt Flag */
153#define DMA_TEIF (1 << 3)
154/** Half Transfer Interrupt Flag */
155#define DMA_HTIF (1 << 2)
156/** Transfer Complete Interrupt Flag */
157#define DMA_TCIF (1 << 1)
158/** Global Interrupt Flag */
159#define DMA_GIF (1 << 0)
160/**@}*/
161
162/* Offset within interrupt status register to start of channel interrupt flag
163 * field
164 */
165#define DMA_FLAG_OFFSET(channel) (4*((channel) - 1))
166#define DMA_FLAGS (DMA_TEIF | DMA_TCIF | DMA_HTIF | \
167 DMA_GIF)
168#define DMA_ISR_MASK(channel) (DMA_FLAGS << DMA_FLAG_OFFSET(channel))
169
170/* TEIF: Transfer error interrupt flag */
171#define DMA_ISR_TEIF_BIT DMA_TEIF
172#define DMA_ISR_TEIF(channel) (DMA_ISR_TEIF_BIT << \
173 (DMA_FLAG_OFFSET(channel)))
174
175#define DMA_ISR_TEIF1 DMA_ISR_TEIF(DMA_CHANNEL1)
176#define DMA_ISR_TEIF2 DMA_ISR_TEIF(DMA_CHANNEL2)
177#define DMA_ISR_TEIF3 DMA_ISR_TEIF(DMA_CHANNEL3)
178#define DMA_ISR_TEIF4 DMA_ISR_TEIF(DMA_CHANNEL4)
179#define DMA_ISR_TEIF5 DMA_ISR_TEIF(DMA_CHANNEL5)
180#define DMA_ISR_TEIF6 DMA_ISR_TEIF(DMA_CHANNEL6)
181#define DMA_ISR_TEIF7 DMA_ISR_TEIF(DMA_CHANNEL7)
182
183/* HTIF: Half transfer interrupt flag */
184#define DMA_ISR_HTIF_BIT DMA_HTIF
185#define DMA_ISR_HTIF(channel) (DMA_ISR_HTIF_BIT << \
186 (DMA_FLAG_OFFSET(channel)))
187
188#define DMA_ISR_HTIF1 DMA_ISR_HTIF(DMA_CHANNEL1)
189#define DMA_ISR_HTIF2 DMA_ISR_HTIF(DMA_CHANNEL2)
190#define DMA_ISR_HTIF3 DMA_ISR_HTIF(DMA_CHANNEL3)
191#define DMA_ISR_HTIF4 DMA_ISR_HTIF(DMA_CHANNEL4)
192#define DMA_ISR_HTIF5 DMA_ISR_HTIF(DMA_CHANNEL5)
193#define DMA_ISR_HTIF6 DMA_ISR_HTIF(DMA_CHANNEL6)
194#define DMA_ISR_HTIF7 DMA_ISR_HTIF(DMA_CHANNEL7)
195
196/* TCIF: Transfer complete interrupt flag */
197#define DMA_ISR_TCIF_BIT DMA_TCIF
198#define DMA_ISR_TCIF(channel) (DMA_ISR_TCIF_BIT << \
199 (DMA_FLAG_OFFSET(channel)))
200
201#define DMA_ISR_TCIF1 DMA_ISR_TCIF(DMA_CHANNEL1)
202#define DMA_ISR_TCIF2 DMA_ISR_TCIF(DMA_CHANNEL2)
203#define DMA_ISR_TCIF3 DMA_ISR_TCIF(DMA_CHANNEL3)
204#define DMA_ISR_TCIF4 DMA_ISR_TCIF(DMA_CHANNEL4)
205#define DMA_ISR_TCIF5 DMA_ISR_TCIF(DMA_CHANNEL5)
206#define DMA_ISR_TCIF6 DMA_ISR_TCIF(DMA_CHANNEL6)
207#define DMA_ISR_TCIF7 DMA_ISR_TCIF(DMA_CHANNEL7)
208
209/* GIF: Global interrupt flag */
210#define DMA_ISR_GIF_BIT DMA_GIF
211#define DMA_ISR_GIF(channel) (DMA_ISR_GIF_BIT << \
212 (DMA_FLAG_OFFSET(channel)))
213
214#define DMA_ISR_GIF1 DMA_ISR_GIF(DMA_CHANNEL1)
215#define DMA_ISR_GIF2 DMA_ISR_GIF(DMA_CHANNEL2)
216#define DMA_ISR_GIF3 DMA_ISR_GIF(DMA_CHANNEL3)
217#define DMA_ISR_GIF4 DMA_ISR_GIF(DMA_CHANNEL4)
218#define DMA_ISR_GIF5 DMA_ISR_GIF(DMA_CHANNEL5)
219#define DMA_ISR_GIF6 DMA_ISR_GIF(DMA_CHANNEL6)
220#define DMA_ISR_GIF7 DMA_ISR_GIF(DMA_CHANNEL7)
221
222/* --- DMA_IFCR values ----------------------------------------------------- */
223
224/* CTEIF: Transfer error clear */
225#define DMA_IFCR_CTEIF_BIT DMA_TEIF
226#define DMA_IFCR_CTEIF(channel) (DMA_IFCR_CTEIF_BIT << \
227 (DMA_FLAG_OFFSET(channel)))
228
229#define DMA_IFCR_CTEIF1 DMA_IFCR_CTEIF(DMA_CHANNEL1)
230#define DMA_IFCR_CTEIF2 DMA_IFCR_CTEIF(DMA_CHANNEL2)
231#define DMA_IFCR_CTEIF3 DMA_IFCR_CTEIF(DMA_CHANNEL3)
232#define DMA_IFCR_CTEIF4 DMA_IFCR_CTEIF(DMA_CHANNEL4)
233#define DMA_IFCR_CTEIF5 DMA_IFCR_CTEIF(DMA_CHANNEL5)
234#define DMA_IFCR_CTEIF6 DMA_IFCR_CTEIF(DMA_CHANNEL6)
235#define DMA_IFCR_CTEIF7 DMA_IFCR_CTEIF(DMA_CHANNEL7)
236
237/* CHTIF: Half transfer clear */
238#define DMA_IFCR_CHTIF_BIT DMA_HTIF
239#define DMA_IFCR_CHTIF(channel) (DMA_IFCR_CHTIF_BIT << \
240 (DMA_FLAG_OFFSET(channel)))
241
242#define DMA_IFCR_CHTIF1 DMA_IFCR_CHTIF(DMA_CHANNEL1)
243#define DMA_IFCR_CHTIF2 DMA_IFCR_CHTIF(DMA_CHANNEL2)
244#define DMA_IFCR_CHTIF3 DMA_IFCR_CHTIF(DMA_CHANNEL3)
245#define DMA_IFCR_CHTIF4 DMA_IFCR_CHTIF(DMA_CHANNEL4)
246#define DMA_IFCR_CHTIF5 DMA_IFCR_CHTIF(DMA_CHANNEL5)
247#define DMA_IFCR_CHTIF6 DMA_IFCR_CHTIF(DMA_CHANNEL6)
248#define DMA_IFCR_CHTIF7 DMA_IFCR_CHTIF(DMA_CHANNEL7)
249
250/* CTCIF: Transfer complete clear */
251#define DMA_IFCR_CTCIF_BIT DMA_TCIF
252#define DMA_IFCR_CTCIF(channel) (DMA_IFCR_CTCIF_BIT << \
253 (DMA_FLAG_OFFSET(channel)))
254
255#define DMA_IFCR_CTCIF1 DMA_IFCR_CTCIF(DMA_CHANNEL1)
256#define DMA_IFCR_CTCIF2 DMA_IFCR_CTCIF(DMA_CHANNEL2)
257#define DMA_IFCR_CTCIF3 DMA_IFCR_CTCIF(DMA_CHANNEL3)
258#define DMA_IFCR_CTCIF4 DMA_IFCR_CTCIF(DMA_CHANNEL4)
259#define DMA_IFCR_CTCIF5 DMA_IFCR_CTCIF(DMA_CHANNEL5)
260#define DMA_IFCR_CTCIF6 DMA_IFCR_CTCIF(DMA_CHANNEL6)
261#define DMA_IFCR_CTCIF7 DMA_IFCR_CTCIF(DMA_CHANNEL7)
262
263/* CGIF: Global interrupt clear */
264#define DMA_IFCR_CGIF_BIT DMA_GIF
265#define DMA_IFCR_CGIF(channel) (DMA_IFCR_CGIF_BIT << \
266 (DMA_FLAG_OFFSET(channel)))
267
268#define DMA_IFCR_CGIF1 DMA_IFCR_CGIF(DMA_CHANNEL1)
269#define DMA_IFCR_CGIF2 DMA_IFCR_CGIF(DMA_CHANNEL2)
270#define DMA_IFCR_CGIF3 DMA_IFCR_CGIF(DMA_CHANNEL3)
271#define DMA_IFCR_CGIF4 DMA_IFCR_CGIF(DMA_CHANNEL4)
272#define DMA_IFCR_CGIF5 DMA_IFCR_CGIF(DMA_CHANNEL5)
273#define DMA_IFCR_CGIF6 DMA_IFCR_CGIF(DMA_CHANNEL6)
274#define DMA_IFCR_CGIF7 DMA_IFCR_CGIF(DMA_CHANNEL7)
275
276/* Clear interrupts mask */
277#define DMA_IFCR_CIF_BIT 0xF
278#define DMA_IFCR_CIF(channel) (DMA_IFCR_CIF_BIT << \
279 (DMA_FLAG_OFFSET(channel)))
280
281#define DMA_IFCR_CIF1 DMA_IFCR_CIF(DMA_CHANNEL1)
282#define DMA_IFCR_CIF2 DMA_IFCR_CIF(DMA_CHANNEL2)
283#define DMA_IFCR_CIF3 DMA_IFCR_CIF(DMA_CHANNEL3)
284#define DMA_IFCR_CIF4 DMA_IFCR_CIF(DMA_CHANNEL4)
285#define DMA_IFCR_CIF5 DMA_IFCR_CIF(DMA_CHANNEL5)
286#define DMA_IFCR_CIF6 DMA_IFCR_CIF(DMA_CHANNEL6)
287#define DMA_IFCR_CIF7 DMA_IFCR_CIF(DMA_CHANNEL7)
288
289/* --- DMA_CCRx generic values --------------------------------------------- */
290
291/* MEM2MEM: Memory to memory mode */
292#define DMA_CCR_MEM2MEM (1 << 14)
293
294/* PL[13:12]: Channel priority level */
295/** @defgroup dma_ch_pri DMA Channel Priority Levels
296@ingroup dma_defines
297
298@{*/
299#define DMA_CCR_PL_LOW (0x0 << 12)
300#define DMA_CCR_PL_MEDIUM (0x1 << 12)
301#define DMA_CCR_PL_HIGH (0x2 << 12)
302#define DMA_CCR_PL_VERY_HIGH (0x3 << 12)
303/**@}*/
304#define DMA_CCR_PL_MASK (0x3 << 12)
305#define DMA_CCR_PL_SHIFT 12
306
307/* MSIZE[11:10]: Memory size */
308/** @defgroup dma_ch_memwidth DMA Channel Memory Word Width
309@ingroup dma_defines
310
311@{*/
312#define DMA_CCR_MSIZE_8BIT (0x0 << 10)
313#define DMA_CCR_MSIZE_16BIT (0x1 << 10)
314#define DMA_CCR_MSIZE_32BIT (0x2 << 10)
315/**@}*/
316#define DMA_CCR_MSIZE_MASK (0x3 << 10)
317#define DMA_CCR_MSIZE_SHIFT 10
318
319/* PSIZE[9:8]: Peripheral size */
320/** @defgroup dma_ch_perwidth DMA Channel Peripheral Word Width
321@ingroup dma_defines
322
323@{*/
324#define DMA_CCR_PSIZE_8BIT (0x0 << 8)
325#define DMA_CCR_PSIZE_16BIT (0x1 << 8)
326#define DMA_CCR_PSIZE_32BIT (0x2 << 8)
327/**@}*/
328#define DMA_CCR_PSIZE_MASK (0x3 << 8)
329#define DMA_CCR_PSIZE_SHIFT 8
330
331/* MINC: Memory increment mode */
332#define DMA_CCR_MINC (1 << 7)
333
334/* PINC: Peripheral increment mode */
335#define DMA_CCR_PINC (1 << 6)
336
337/* CIRC: Circular mode */
338#define DMA_CCR_CIRC (1 << 5)
339
340/* DIR: Data transfer direction */
341#define DMA_CCR_DIR (1 << 4)
342
343/* TEIE: Transfer error interrupt enable */
344#define DMA_CCR_TEIE (1 << 3)
345
346/* HTIE: Half transfer interrupt enable */
347#define DMA_CCR_HTIE (1 << 2)
348
349/* TCIE: Transfer complete interrupt enable */
350#define DMA_CCR_TCIE (1 << 1)
351
352/* EN: Channel enable */
353#define DMA_CCR_EN (1 << 0)
354
355/* --- DMA_CNDTRx values --------------------------------------------------- */
356
357/* NDT[15:0]: Number of data to transfer */
358
359/* --- DMA_CPARx values ---------------------------------------------------- */
360
361/* PA[31:0]: Peripheral address */
362
363/* --- DMA_CMARx values ---------------------------------------------------- */
364
365/* MA[31:0]: Memory address */
366
367/* --- Generic values ------------------------------------------------------ */
368
369/** @defgroup dma_ch DMA Channel Number
370@ingroup dma_defines
371
372@{*/
373#define DMA_CHANNEL1 1
374#define DMA_CHANNEL2 2
375#define DMA_CHANNEL3 3
376#define DMA_CHANNEL4 4
377#define DMA_CHANNEL5 5
378#define DMA_CHANNEL6 6
379#define DMA_CHANNEL7 7
380/**@}*/
381
382/* --- function prototypes ------------------------------------------------- */
383
385
386void dma_channel_reset(uint32_t dma, uint8_t channel);
387void dma_clear_interrupt_flags(uint32_t dma, uint8_t channel,
388 uint32_t interrupts);
389bool dma_get_interrupt_flag(uint32_t dma, uint8_t channel, uint32_t interrupts);
390void dma_enable_mem2mem_mode(uint32_t dma, uint8_t channel);
391void dma_set_priority(uint32_t dma, uint8_t channel, uint32_t prio);
392void dma_set_memory_size(uint32_t dma, uint8_t channel, uint32_t mem_size);
393void dma_set_peripheral_size(uint32_t dma, uint8_t channel,
394 uint32_t peripheral_size);
395void dma_enable_memory_increment_mode(uint32_t dma, uint8_t channel);
396void dma_disable_memory_increment_mode(uint32_t dma, uint8_t channel);
397void dma_enable_peripheral_increment_mode(uint32_t dma, uint8_t channel);
398void dma_disable_peripheral_increment_mode(uint32_t dma, uint8_t channel);
399void dma_enable_circular_mode(uint32_t dma, uint8_t channel);
400void dma_set_read_from_peripheral(uint32_t dma, uint8_t channel);
401void dma_set_read_from_memory(uint32_t dma, uint8_t channel);
402void dma_enable_transfer_error_interrupt(uint32_t dma, uint8_t channel);
403void dma_disable_transfer_error_interrupt(uint32_t dma, uint8_t channel);
404void dma_enable_half_transfer_interrupt(uint32_t dma, uint8_t channel);
405void dma_disable_half_transfer_interrupt(uint32_t dma, uint8_t channel);
406void dma_enable_transfer_complete_interrupt(uint32_t dma, uint8_t channel);
407void dma_disable_transfer_complete_interrupt(uint32_t dma, uint8_t channel);
408void dma_enable_channel(uint32_t dma, uint8_t channel);
409void dma_disable_channel(uint32_t dma, uint8_t channel);
410void dma_set_peripheral_address(uint32_t dma, uint8_t channel,
411 uint32_t address);
412void dma_set_memory_address(uint32_t dma, uint8_t channel, uint32_t address);
413uint16_t dma_get_number_of_data(uint32_t dma, uint8_t channel);
414void dma_set_number_of_data(uint32_t dma, uint8_t channel, uint16_t number);
415
417
418#endif
419/** @cond */
420#else
421#warning "dma_common_f13.h should not be included explicitly, only via dma.h"
422#endif
423/** @endcond */
424
425/**@}*/
426
#define END_DECLS
Definition: common.h:34
#define BEGIN_DECLS
Definition: common.h:33
void dma_set_read_from_memory(uint32_t dma, uint8_t channel)
DMA Channel Enable Transfers from Memory.
void dma_disable_transfer_complete_interrupt(uint32_t dma, uint8_t channel)
DMA Channel Disable Interrupt on Transfer Complete.
void dma_set_priority(uint32_t dma, uint8_t channel, uint32_t prio)
DMA Channel Set Priority.
void dma_enable_transfer_complete_interrupt(uint32_t dma, uint8_t channel)
DMA Channel Enable Interrupt on Transfer Complete.
void dma_set_memory_address(uint32_t dma, uint8_t channel, uint32_t address)
DMA Channel Set the Base Memory Address.
void dma_disable_memory_increment_mode(uint32_t dma, uint8_t channel)
DMA Channel Disable Memory Increment after Transfer.
void dma_set_number_of_data(uint32_t dma, uint8_t channel, uint16_t number)
DMA Channel Set the Transfer Block Size.
uint16_t dma_get_number_of_data(uint32_t dma, uint8_t channel)
DMA Channel Get the Transfer Block Size.
void dma_enable_memory_increment_mode(uint32_t dma, uint8_t channel)
DMA Channel Enable Memory Increment after Transfer.
void dma_disable_transfer_error_interrupt(uint32_t dma, uint8_t channel)
DMA Channel Disable Interrupt on Transfer Error.
void dma_set_read_from_peripheral(uint32_t dma, uint8_t channel)
DMA Channel Enable Transfers from a Peripheral.
void dma_disable_channel(uint32_t dma, uint8_t channel)
DMA Channel Disable.
void dma_disable_half_transfer_interrupt(uint32_t dma, uint8_t channel)
DMA Channel Disable Interrupt on Transfer Half Complete.
void dma_enable_peripheral_increment_mode(uint32_t dma, uint8_t channel)
DMA Channel Enable Peripheral Increment after Transfer.
void dma_enable_channel(uint32_t dma, uint8_t channel)
DMA Channel Enable.
void dma_enable_circular_mode(uint32_t dma, uint8_t channel)
DMA Channel Enable Memory Circular Mode.
void dma_enable_transfer_error_interrupt(uint32_t dma, uint8_t channel)
DMA Channel Enable Interrupt on Transfer Error.
void dma_channel_reset(uint32_t dma, uint8_t channel)
DMA Channel Reset.
void dma_disable_peripheral_increment_mode(uint32_t dma, uint8_t channel)
DMA Channel Disable Peripheral Increment after Transfer.
bool dma_get_interrupt_flag(uint32_t dma, uint8_t channel, uint32_t interrupts)
DMA Channel Read Interrupt Flag.
void dma_clear_interrupt_flags(uint32_t dma, uint8_t channel, uint32_t interrupts)
DMA Channel Clear Interrupt Flag.
void dma_enable_mem2mem_mode(uint32_t dma, uint8_t channel)
DMA Channel Enable Memory to Memory Transfers.
void dma_enable_half_transfer_interrupt(uint32_t dma, uint8_t channel)
DMA Channel Enable Interrupt on Transfer Half Complete.
void dma_set_peripheral_size(uint32_t dma, uint8_t channel, uint32_t peripheral_size)
DMA Channel Set Peripheral Word Width.
void dma_set_peripheral_address(uint32_t dma, uint8_t channel, uint32_t address)
DMA Channel Set the Peripheral Address.
void dma_set_memory_size(uint32_t dma, uint8_t channel, uint32_t mem_size)
DMA Channel Set Memory Word Width.