summaryrefslogtreecommitdiff
path: root/bsp/ft32/libraries/Drivers/drv_dma.h
blob: cc1e39c6c919ac90d82763b0bbee3df29bcbc6e0 (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
/*
 * Copyright (c) 2006-2022, RT-Thread Development Team
 *
 * SPDX-License-Identifier: Apache-2.0
 *
 * Change Logs:
 * Date           Author       Notes
 * 2022-03-02     FMD-AE       first version
 */

#ifndef __DRV_DMA_H_
#define __DRV_DMA_H_

#include <rtthread.h>
#include <board.h>

#ifdef __cplusplus
extern "C" {
#endif

#if defined(SOC_SERIES_FT32F0)
#define DMA_INSTANCE_TYPE              DMA_Channel_TypeDef
#endif

#if defined(SOC_SERIES_FT32F4)
#define DMA_INSTANCE_TYPE              DMA_Channel_TypeDef
#endif

struct dma_config {
    DMA_INSTANCE_TYPE *Instance;
    rt_uint32_t dma_rcc;
    IRQn_Type dma_irq;
};

#ifdef __cplusplus
}
#endif

#endif /*__DRV_DMA_H_ */