[serial]增加at32的serial_v2驱动

This commit is contained in:
jonas
2023-02-24 14:54:20 +08:00
committed by guo
parent 382e9bcac7
commit 7bf6648853
3 changed files with 480 additions and 2 deletions
+5 -2
View File
@@ -16,8 +16,11 @@ if GetDepend(['RT_USING_PIN']):
if GetDepend(['RT_USING_WDT']):
src += ['drv_wdt.c']
if GetDepend(['BSP_USING_SERIAL']):
src += ['drv_usart.c']
if GetDepend(['RT_USING_SERIAL']):
if GetDepend(['RT_USING_SERIAL_V2']):
src += ['drv_usart_v2.c']
else:
src += ['drv_usart.c']
if GetDepend(['BSP_USING_PWM']):
src += ['drv_pwm.c']
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2006-2021, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2023-02-23 Jonas first version
*/
#ifndef __DRV_USART_V2_H__
#define __DRV_USART_V2_H__
#include <rtthread.h>
#include <rtdevice.h>
#include <drv_common.h>
struct at32_usart
{
char *name;
usart_type *usart_x;
IRQn_Type irqn;
struct rt_serial_device serial;
};
int rt_hw_usart_init(void);
#endif /* __DRV_USART_V2_H__ */