Skip to content

Commit 19d4c68

Browse files
committed
【添加】dma_config 文件
1 parent b5fbaa2 commit 19d4c68

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright (c) 2006-2021, RT-Thread Development Team
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2019-01-02 zylx first version
9+
* 2019-01-08 SummerGift clean up the code
10+
*/
11+
12+
#ifndef __DMA_CONFIG_H__
13+
#define __DMA_CONFIG_H__
14+
15+
#include <rtthread.h>
16+
17+
#ifdef __cplusplus
18+
extern "C" {
19+
#endif
20+
21+
#if defined(BSP_UART2_RX_USING_DMA) && !defined(UART2_RX_DMA_INSTANCE)
22+
#define UART2_DMA_RX_IRQHandler DMA1_Channel5_IRQHandler
23+
#define UART2_RX_DMA_RCC RCC_AHBENR_DMA1EN
24+
#define UART2_RX_DMA_INSTANCE DMA1_Channel5
25+
#define UART2_RX_DMA_CHANNEL DMA1_Channel5_BASE
26+
#define UART2_RX_DMA_IRQ DMA1_Channel5_IRQn
27+
#endif
28+
29+
#if defined(BSP_UART2_TX_USING_DMA) && !defined(UART2_TX_DMA_INSTANCE)
30+
#define UART2_DMA_TX_IRQHandler DMA1_Channel6_IRQHandler
31+
#define UART2_TX_DMA_RCC RCC_AHBENR_DMA1EN
32+
#define UART2_TX_DMA_INSTANCE DMA1_Channel6
33+
#define UART2_TX_DMA_CHANNEL DMA1_Channel6_BASE
34+
#define UART2_TX_DMA_IRQ DMA1_Channel6_IRQn
35+
#endif
36+
37+
#ifdef __cplusplus
38+
}
39+
#endif
40+
41+
#endif /* __DMA_CONFIG_H__ */

0 commit comments

Comments
 (0)