rfLPC
A low level library for using NXP's LPC17xx SoC. Config is given for MBED prototyping board
dma.h
Go to the documentation of this file.
1 /* This file is part of rflpc. Copyright 2010-2011 Michael Hauspie
2  *
3  * rflpc is free software: you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation, either version 3 of the License, or
6  * (at your option) any later version.
7  *
8  * rflpc is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with rflpc. If not, see <http://www.gnu.org/licenses/>.
15  */
16 /*
17  * Author: Michael Hauspie <michael.hauspie@univ-lille1.fr>
18  * Created: 2011-10-14
19  * Time-stamp: <2012-03-19 16:05:08 (hauspie)>
20  */
24 #ifndef __RFLPC_DMA_H__
25 #define __RFLPC_DMA_H__
26 
27 
28 
29 #ifdef RFLPC_CONFIG_ENABLE_DMA
30 
36 typedef enum
37 {
38  RFLPC_DMAC0,
39  RFLPC_DMAC1,
40  RFLPC_DMAC2,
41  RFLPC_DMAC3,
42  RFLPC_DMAC4,
43  RFLPC_DMAC5,
44  RFLPC_DMAC6,
45  RFLPC_DMAC7,
47 
53 extern void rflpc_dma_init(void);
54 
59 
72 extern int rflpc_dma_start(rflpc_dma_channel_t channel, void *dest, const void *src, uint32_t size);
73 
75 #endif /* ENABLE_DMA */
76 
77 #endif
int rflpc_dma_channel_ready(rflpc_dma_channel_t channel)
Tells if a DMA channel is ready to be used.
rflpc_dma_channel_t
Enum to identify DMA channels.
Definition: dma.h:36
void rflpc_dma_init(void)
Inits the DMA Peripheral.
int rflpc_dma_start(rflpc_dma_channel_t channel, void *dest, const void *src, uint32_t size)
Starts a DMA copy.