• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (C) 2022 Beken Corporation
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 //
15 
16 #pragma once
17 
18 #include <driver/hal/hal_dma_types.h>
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 /**
25  * @brief DMA defines
26  * @defgroup bk_api_dma_defs macos
27  * @ingroup bk_api_dma
28  * @{
29  */
30 #define BK_ERR_DMA_ID             (BK_ERR_DMA_BASE - 1) /**< DMA id is invalid */
31 #define BK_ERR_DMA_NOT_INIT       (BK_ERR_DMA_BASE - 2) /**< DMA driver not init */
32 #define BK_ERR_DMA_ID_NOT_INIT    (BK_ERR_DMA_BASE - 3) /**< DMA id not init */
33 #define BK_ERR_DMA_ID_NOT_START   (BK_ERR_DMA_BASE - 4) /**< DMA id not start */
34 #define BK_ERR_DMA_INVALID_ADDR   (BK_ERR_DMA_BASE - 5) /**< DMA addr is invalid */
35 
36 /**
37  * @brief DMA interrupt service routine
38  */
39 typedef void (*dma_isr_t)(dma_id_t dma_id);
40 
41 /**
42  * @}
43  */
44 
45 #ifdef __cplusplus
46 }
47 #endif
48 
49