mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-10-07 00:59:00 +08:00
[serial]增加at32的serial_v2驱动
This commit is contained in:
@@ -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__ */
|
||||
Reference in New Issue
Block a user