Mistake on this page?
Report an issue in GitHub or email us
dma_api.h
1 
2 /** \addtogroup hal */
3 /** @{*/
4 /* mbed Microcontroller Library
5  * Copyright (c) 2014-2015 ARM Limited
6  * SPDX-License-Identifier: Apache-2.0
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  */
20 #ifndef MBED_DMA_API_H
21 #define MBED_DMA_API_H
22 
23 #include <stdint.h>
24 
25 #define DMA_ERROR_OUT_OF_CHANNELS (-1)
26 
27 typedef enum {
28  DMA_USAGE_NEVER,
29  DMA_USAGE_OPPORTUNISTIC,
30  DMA_USAGE_ALWAYS,
31  DMA_USAGE_TEMPORARY_ALLOCATED,
32  DMA_USAGE_ALLOCATED
33 } DMAUsage;
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
39 void dma_init(void);
40 
41 int dma_channel_allocate(uint32_t capabilities);
42 
43 int dma_channel_free(int channelid);
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49 #endif
50 
51 /** @}*/
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.