CDY version that shares functionality with Counter

Dependencies:   SDFileSystem_HelloWorld mbed FATFileSystem

Committer:
Charles David Young
Date:
Sun Nov 04 18:44:51 2018 -0700
Revision:
0:aa13e1c335cd
create new repo for show2me

Who changed what in which revision?

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