39 lines
844 B
C
39 lines
844 B
C
|
/*
|
|||
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
|||
|
*
|
|||
|
* SPDX-License-Identifier: Apache-2.0
|
|||
|
*
|
|||
|
* Change Logs:
|
|||
|
* Date Author Notes
|
|||
|
* 2022-06-14 <EFBFBD><EFBFBD>С<EFBFBD><EFBFBD> the first version
|
|||
|
*/
|
|||
|
#ifndef APPLICATIONS_USER_UART_USER_UART_H_
|
|||
|
#define APPLICATIONS_USER_UART_USER_UART_H_
|
|||
|
|
|||
|
#include <rtthread.h>
|
|||
|
#include <rtdevice.h>
|
|||
|
#include <ulog.h>
|
|||
|
#include <rtdef.h>
|
|||
|
|
|||
|
#define USER_UART_NAME "uart3"
|
|||
|
|
|||
|
#define READ_SERIAL3(args...) rt_device_read(serial3,0,args,args)
|
|||
|
|
|||
|
rt_device_t serial3;
|
|||
|
|
|||
|
struct uart_simpack
|
|||
|
{
|
|||
|
rt_size_t rx_num;
|
|||
|
rt_size_t tx_num;
|
|||
|
struct rt_semaphore rx_sem; /* <20><><EFBFBD>ڽ<EFBFBD><DABD><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD>ź<EFBFBD><C5BA><EFBFBD> */
|
|||
|
struct rt_semaphore tx_sem; /* <20><><EFBFBD>ڷ<EFBFBD><DAB7><EFBFBD><EFBFBD><EFBFBD>Ϣ<EFBFBD><CFA2><EFBFBD>ź<EFBFBD><C5BA><EFBFBD> */
|
|||
|
};
|
|||
|
typedef struct uart_simpack uart_simpack;
|
|||
|
|
|||
|
|
|||
|
uart_simpack uart3_simpack;
|
|||
|
|
|||
|
rt_device_t uart3_init(void);
|
|||
|
|
|||
|
#endif /* APPLICATIONS_USER_UART_USER_UART_H_ */
|