mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-11-17 07:05:31 +08:00
[BSP][N32G45XVL]适配串口v2驱动 (#10222)
This commit is contained in:
1 parent
8382a40a90
commit
9b6438dfec
5 files changed
+1999
-7
No files matched your search
@@ -17,6 +17,8 @@ n32g45x_std_periph_driver/src/misc.c
|
||||
|
||||
if GetDepend(['RT_USING_SERIAL']):
|
||||
src += ['n32g45x_std_periph_driver/src/n32g45x_usart.c']
|
||||
if GetDepend(['RT_SERIAL_USING_DMA']):
|
||||
src += ['n32g45x_std_periph_driver/src/n32g45x_dma.c']
|
||||
|
||||
if GetDepend(['RT_USING_I2C']):
|
||||
src += ['n32g45x_std_periph_driver/src/n32g45x_i2c.c']
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright (c) 2006-2021, RT-Thread Development Team
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*
|
||||
* Change Logs:
|
||||
* Date Author Notes
|
||||
* 2025-04-23 koudaiNEW first version
|
||||
*/
|
||||
|
||||
#ifndef __DRV_USART_V2_H__
|
||||
#define __DRV_USART_V2_H__
|
||||
|
||||
#include <rtthread.h>
|
||||
#include <rtdevice.h>
|
||||
#include <rthw.h>
|
||||
|
||||
#define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__) \
|
||||
do{ \
|
||||
(__HANDLE__)->__PPP_DMA_FIELD__ = &(__DMA_HANDLE__); \
|
||||
(__DMA_HANDLE__).Parent = (__HANDLE__); \
|
||||
} while(0U)
|
||||
#define UART_RX_DMA_IT_IDLE_FLAG 0x00
|
||||
#define UART_RX_DMA_IT_HT_FLAG 0x01
|
||||
#define UART_RX_DMA_IT_TC_FLAG 0x02
|
||||
|
||||
#endif /* __DRV_USART_V2_H__ */
|
||||
@@ -0,0 +1,23 @@
|
||||
scons.args: &scons
|
||||
scons_arg:
|
||||
- '--strict'
|
||||
# ------ kernel CI ------
|
||||
|
||||
# ------ online-packages CI ------
|
||||
|
||||
# ------ peripheral CI ------
|
||||
peripheral.uartv2:
|
||||
kconfig:
|
||||
- CONFIG_RT_USING_SERIAL_V1=n
|
||||
- CONFIG_RT_USING_SERIAL_V2=y
|
||||
- CONFIG_RT_SERIAL_USING_DMA=y
|
||||
- CONFIG_BSP_USART1_AFIO_MODE_PA9_PA10=y
|
||||
- CONFIG_BSP_UART1_RX_BUFSIZE=1024
|
||||
- CONFIG_BSP_UART1_TX_BUFSIZE=1024
|
||||
- CONFIG_BSP_USART2_AFIO_MODE_PD5_PD6=y
|
||||
- CONFIG_BSP_UART2_RX_USING_DMA=y
|
||||
- CONFIG_BSP_UART2_TX_USING_DMA=y
|
||||
- CONFIG_BSP_UART2_RX_BUFSIZE=1024
|
||||
- CONFIG_BSP_UART2_TX_BUFSIZE=1024
|
||||
|
||||
|
||||
File diff suppressed because it is too large.
Load diff
Reference in new issue
Block a user