The official mbed C/C SDK provides the software platform and libraries to build your applications.

Fork of mbed by mbed official

Committer:
Mikchel
Date:
Sun May 03 16:04:42 2015 +0000
Revision:
99:7f6c6de930c0
Parent:
98:8ab26030e058
12

Who changed what in which revision?

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