blob: 912abb182cea77af373c36f95a2f356774b46ba7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2022-11-09 shelton first version
* 2023-01-31 shelton add support f421/f425
*/
#ifndef __DRV_DMA_H__
#define __DRV_DMA_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <rtdevice.h>
#include <rtthread.h>
#include "drv_common.h"
#define DMA_GLO_FLAG 0x0001U
#define DMA_FDT_FLAG 0x0002U
#define DMA_HDT_FLAG 0x0004U
#define DMA_DTE_FLAG 0x0008U
struct dma_config {
dma_type *dma_x;
rt_uint8_t channel_index;
rt_bool_t dma_done;
dma_channel_type *dma_channel;
crm_periph_clock_type dma_clock;
IRQn_Type dma_irqn;
#if defined (SOC_SERIES_AT32F425)
rt_uint8_t flex_channel;
rt_uint32_t request_id;
#endif
#if defined (SOC_SERIES_AT32F435) || defined (SOC_SERIES_AT32F437)
dmamux_channel_type *dmamux_channel;
rt_uint32_t request_id;
#endif
};
#ifdef __cplusplus
}
#endif
#endif /*__DRV_DMA_H__ */
/************************** end of file ******************/
|