fix bug with dma setting

This commit is contained in:
zhouchuanfu 2019-01-12 11:21:31 +08:00
parent 0007615320
commit e7f6952d15
1 changed files with 5 additions and 5 deletions

View File

@ -293,8 +293,8 @@ static const struct rt_uart_ops stm32_uart_ops =
struct stm32_uart uart1 = struct stm32_uart uart1 =
{ {
USART1, USART1,
#ifdef RT_SERIAL_USING_DMA
USART1_IRQn, USART1_IRQn,
#ifdef RT_SERIAL_USING_DMA
{ {
DMA1_Channel5, DMA1_Channel5,
DMA1_FLAG_GL5, DMA1_FLAG_GL5,
@ -335,8 +335,8 @@ void DMA1_Channel5_IRQHandler(void) {
struct stm32_uart uart2 = struct stm32_uart uart2 =
{ {
USART2, USART2,
#ifdef RT_SERIAL_USING_DMA
USART2_IRQn, USART2_IRQn,
#ifdef RT_SERIAL_USING_DMA
{ {
DMA1_Channel6, DMA1_Channel6,
DMA1_FLAG_GL6, DMA1_FLAG_GL6,
@ -377,8 +377,8 @@ void DMA1_Channel6_IRQHandler(void) {
struct stm32_uart uart3 = struct stm32_uart uart3 =
{ {
USART3, USART3,
#ifdef RT_SERIAL_USING_DMA
USART3_IRQn, USART3_IRQn,
#ifdef RT_SERIAL_USING_DMA
{ {
DMA1_Channel3, DMA1_Channel3,
DMA1_FLAG_GL3, DMA1_FLAG_GL3,
@ -419,8 +419,8 @@ void DMA1_Channel3_IRQHandler(void) {
struct stm32_uart uart4 = struct stm32_uart uart4 =
{ {
UART4, UART4,
#ifdef RT_SERIAL_USING_DMA
UART4_IRQn, UART4_IRQn,
#ifdef RT_SERIAL_USING_DMA
{ {
DMA2_Channel3, DMA2_Channel3,
DMA2_FLAG_GL3, DMA2_FLAG_GL3,