Biomimetics MBED Library w/ Added Support for CAN3
Dependents: CAN_TEST SPIne_Plus_DYNO_SENSORS SPIne_Plus_v2 SPIne_Plus_Dyno_v2
hal/dma_api.h@3:993b4d6ff61e, 2021-03-09 (annotated)
- Committer:
- adimmit
- Date:
- Tue Mar 09 20:33:24 2021 +0000
- Revision:
- 3:993b4d6ff61e
- Parent:
- 0:083111ae2a11
added CAN3
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
saloutos | 0:083111ae2a11 | 1 | |
saloutos | 0:083111ae2a11 | 2 | /** \addtogroup hal */ |
saloutos | 0:083111ae2a11 | 3 | /** @{*/ |
saloutos | 0:083111ae2a11 | 4 | /* mbed Microcontroller Library |
saloutos | 0:083111ae2a11 | 5 | * Copyright (c) 2014-2015 ARM Limited |
saloutos | 0:083111ae2a11 | 6 | * |
saloutos | 0:083111ae2a11 | 7 | * Licensed under the Apache License, Version 2.0 (the "License"); |
saloutos | 0:083111ae2a11 | 8 | * you may not use this file except in compliance with the License. |
saloutos | 0:083111ae2a11 | 9 | * You may obtain a copy of the License at |
saloutos | 0:083111ae2a11 | 10 | * |
saloutos | 0:083111ae2a11 | 11 | * http://www.apache.org/licenses/LICENSE-2.0 |
saloutos | 0:083111ae2a11 | 12 | * |
saloutos | 0:083111ae2a11 | 13 | * Unless required by applicable law or agreed to in writing, software |
saloutos | 0:083111ae2a11 | 14 | * distributed under the License is distributed on an "AS IS" BASIS, |
saloutos | 0:083111ae2a11 | 15 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
saloutos | 0:083111ae2a11 | 16 | * See the License for the specific language governing permissions and |
saloutos | 0:083111ae2a11 | 17 | * limitations under the License. |
saloutos | 0:083111ae2a11 | 18 | */ |
saloutos | 0:083111ae2a11 | 19 | #ifndef MBED_DMA_API_H |
saloutos | 0:083111ae2a11 | 20 | #define MBED_DMA_API_H |
saloutos | 0:083111ae2a11 | 21 | |
saloutos | 0:083111ae2a11 | 22 | #include <stdint.h> |
saloutos | 0:083111ae2a11 | 23 | |
saloutos | 0:083111ae2a11 | 24 | #define DMA_ERROR_OUT_OF_CHANNELS (-1) |
saloutos | 0:083111ae2a11 | 25 | |
saloutos | 0:083111ae2a11 | 26 | typedef enum { |
saloutos | 0:083111ae2a11 | 27 | DMA_USAGE_NEVER, |
saloutos | 0:083111ae2a11 | 28 | DMA_USAGE_OPPORTUNISTIC, |
saloutos | 0:083111ae2a11 | 29 | DMA_USAGE_ALWAYS, |
saloutos | 0:083111ae2a11 | 30 | DMA_USAGE_TEMPORARY_ALLOCATED, |
saloutos | 0:083111ae2a11 | 31 | DMA_USAGE_ALLOCATED |
saloutos | 0:083111ae2a11 | 32 | } DMAUsage; |
saloutos | 0:083111ae2a11 | 33 | |
saloutos | 0:083111ae2a11 | 34 | #ifdef __cplusplus |
saloutos | 0:083111ae2a11 | 35 | extern "C" { |
saloutos | 0:083111ae2a11 | 36 | #endif |
saloutos | 0:083111ae2a11 | 37 | |
saloutos | 0:083111ae2a11 | 38 | void dma_init(void); |
saloutos | 0:083111ae2a11 | 39 | |
saloutos | 0:083111ae2a11 | 40 | int dma_channel_allocate(uint32_t capabilities); |
saloutos | 0:083111ae2a11 | 41 | |
saloutos | 0:083111ae2a11 | 42 | int dma_channel_free(int channelid); |
saloutos | 0:083111ae2a11 | 43 | |
saloutos | 0:083111ae2a11 | 44 | #ifdef __cplusplus |
saloutos | 0:083111ae2a11 | 45 | } |
saloutos | 0:083111ae2a11 | 46 | #endif |
saloutos | 0:083111ae2a11 | 47 | |
saloutos | 0:083111ae2a11 | 48 | #endif |
saloutos | 0:083111ae2a11 | 49 | |
saloutos | 0:083111ae2a11 | 50 | /** @}*/ |