mbed library sources. Supersedes mbed-src.

Dependents:   Nucleo_Hello_Encoder BLE_iBeaconScan AM1805_DEMO DISCO-F429ZI_ExportTemplate1 ... more

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers dma_api.h Source File

dma_api.h

00001 
00002 /** \addtogroup hal */
00003 /** @{*/
00004 /* mbed Microcontroller Library
00005  * Copyright (c) 2014-2015 ARM Limited
00006  * SPDX-License-Identifier: Apache-2.0
00007  *
00008  * Licensed under the Apache License, Version 2.0 (the "License");
00009  * you may not use this file except in compliance with the License.
00010  * You may obtain a copy of the License at
00011  *
00012  *     http://www.apache.org/licenses/LICENSE-2.0
00013  *
00014  * Unless required by applicable law or agreed to in writing, software
00015  * distributed under the License is distributed on an "AS IS" BASIS,
00016  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00017  * See the License for the specific language governing permissions and
00018  * limitations under the License.
00019  */
00020 #ifndef MBED_DMA_API_H
00021 #define MBED_DMA_API_H
00022 
00023 #include <stdint.h>
00024 
00025 #define DMA_ERROR_OUT_OF_CHANNELS (-1)
00026 
00027 typedef enum {
00028     DMA_USAGE_NEVER,
00029     DMA_USAGE_OPPORTUNISTIC,
00030     DMA_USAGE_ALWAYS,
00031     DMA_USAGE_TEMPORARY_ALLOCATED,
00032     DMA_USAGE_ALLOCATED
00033 } DMAUsage;
00034 
00035 #ifdef __cplusplus
00036 extern "C" {
00037 #endif
00038 
00039 void dma_init(void);
00040 
00041 int dma_channel_allocate(uint32_t capabilities);
00042 
00043 int dma_channel_free(int channelid);
00044 
00045 #ifdef __cplusplus
00046 }
00047 #endif
00048 
00049 #endif
00050 
00051 /** @}*/