forked from RT-Thread/rt-thread
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request RT-Thread#2280 from sunshine0824/stm32l053
Stm32l053
- Loading branch information
Showing
43 changed files
with
11,778 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
/* | ||
* Copyright (c) 2006-2018, RT-Thread Development Team | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Change Logs: | ||
* Date Author Notes | ||
* 2018-01-05 zylx first version | ||
* 2019-01-08 SummerGift clean up the code | ||
*/ | ||
|
||
#ifndef __DMA_CONFIG_H__ | ||
#define __DMA_CONFIG_H__ | ||
|
||
#include <rtthread.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/* DMA1 channel1 */ | ||
|
||
/* DMA1 channel5 */ | ||
#if defined(BSP_UART1_RX_USING_DMA) && !defined(UART1_RX_DMA_INSTANCE) | ||
#define UART1_DMA_RX_IRQHandler DMA1_Channel4_5_6_7_IRQHandler | ||
#define UART1_RX_DMA_RCC RCC_AHBENR_DMA1EN | ||
#define UART1_RX_DMA_INSTANCE DMA1_Channel5 | ||
#define UART1_RX_DMA_IRQ DMA1_Channel4_5_6_7_IRQn | ||
#endif | ||
/* DMA1 channel5 */ | ||
|
||
/* DMA1 channel6 */ | ||
#if defined(BSP_UART2_RX_USING_DMA) && !defined(UART2_RX_DMA_INSTANCE) | ||
#define UART2_DMA_RX_IRQHandler DMA1_Channel4_5_6_7_IRQHandler | ||
#define UART2_RX_DMA_RCC RCC_AHBENR_DMA1EN | ||
#define UART2_RX_DMA_INSTANCE DMA1_Channel6 | ||
#define UART2_RX_DMA_IRQ DMA1_Channel4_5_6_7_IRQn | ||
#endif | ||
/* DMA1 channel6 */ | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* __DMA_CONFIG_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
/* | ||
* Copyright (c) 2006-2018, RT-Thread Development Team | ||
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* Change Logs: | ||
* Date Author Notes | ||
* 2018-10-30 zylx first version | ||
*/ | ||
|
||
#ifndef __UART_CONFIG_H__ | ||
#define __UART_CONFIG_H__ | ||
|
||
#include <rtthread.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
#if defined(BSP_USING_UART1) | ||
#ifndef UART1_CONFIG | ||
#define UART1_CONFIG \ | ||
{ \ | ||
.name = "uart1", \ | ||
.Instance = USART1, \ | ||
.irq_type = USART1_IRQn, \ | ||
} | ||
#endif /* UART1_CONFIG */ | ||
#endif /* BSP_USING_UART1 */ | ||
|
||
#if defined(BSP_UART1_RX_USING_DMA) | ||
#ifndef UART1_DMA_CONFIG | ||
#define UART1_DMA_CONFIG \ | ||
{ \ | ||
.Instance = UART1_RX_DMA_INSTANCE, \ | ||
.dma_rcc = UART1_RX_DMA_RCC, \ | ||
.dma_irq = UART1_RX_DMA_IRQ, \ | ||
} | ||
#endif /* UART1_DMA_CONFIG */ | ||
#endif /* BSP_UART1_RX_USING_DMA */ | ||
|
||
#if defined(BSP_USING_UART2) | ||
#ifndef UART2_CONFIG | ||
#define UART2_CONFIG \ | ||
{ \ | ||
.name = "uart2", \ | ||
.Instance = USART2, \ | ||
.irq_type = USART2_IRQn, \ | ||
} | ||
#endif /* UART2_CONFIG */ | ||
#endif /* BSP_USING_UART2 */ | ||
|
||
#if defined(BSP_UART2_RX_USING_DMA) | ||
#ifndef UART2_DMA_CONFIG | ||
#define UART2_DMA_CONFIG \ | ||
{ \ | ||
.Instance = UART2_RX_DMA_INSTANCE, \ | ||
.dma_rcc = UART2_RX_DMA_RCC, \ | ||
.dma_irq = UART2_RX_DMA_IRQ, \ | ||
} | ||
#endif /* UART2_DMA_CONFIG */ | ||
#endif /* BSP_UART2_RX_USING_DMA */ | ||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* __UART_CONFIG_H__ */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.