2020-07-01 23:44:57 +08:00
|
|
|
/*
|
2021-03-21 22:23:24 +08:00
|
|
|
* Copyright (c) 2006-2021, RT-Thread Development Team
|
2020-07-01 23:44:57 +08:00
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: Apache-2.0
|
|
|
|
*
|
|
|
|
* Change Logs:
|
|
|
|
* Date Author Notes
|
|
|
|
* 2020-06-27 AHTYDHD the first version
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __DRV_UART_H__
|
|
|
|
#define __DRV_UART_H__
|
2020-06-24 19:54:42 +08:00
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <rthw.h>
|
|
|
|
#include <rtthread.h>
|
|
|
|
#include "rtdevice.h"
|
|
|
|
|
|
|
|
/* tm4c123 config class */
|
|
|
|
struct tm4c123_uart_config
|
|
|
|
{
|
|
|
|
const char *name;
|
2020-07-01 23:44:57 +08:00
|
|
|
uint32_t uartbase;
|
|
|
|
uint32_t baudrate;
|
|
|
|
uint32_t mode;
|
2020-07-02 13:01:57 +08:00
|
|
|
|
2020-06-24 19:54:42 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
/* tm4c123 uart dirver class */
|
|
|
|
struct tm4c123_uart
|
2020-07-01 23:44:57 +08:00
|
|
|
{
|
2020-06-24 19:54:42 +08:00
|
|
|
struct tm4c123_uart_config *config;
|
2020-07-01 23:44:57 +08:00
|
|
|
uint32_t uartintbase;
|
|
|
|
|
2020-06-24 19:54:42 +08:00
|
|
|
#ifdef RT_SERIAL_USING_DMA
|
|
|
|
#endif
|
2020-07-01 23:44:57 +08:00
|
|
|
|
2020-06-24 19:54:42 +08:00
|
|
|
rt_uint16_t uart_dma_flag;
|
|
|
|
struct rt_serial_device serial;
|
|
|
|
};
|
|
|
|
|
|
|
|
extern int rt_hw_usart_init(void);
|
|
|
|
|
2020-07-01 23:44:57 +08:00
|
|
|
#endif /*__DRV_UART_H__*/
|
2020-06-24 19:54:42 +08:00
|
|
|
|
2021-03-21 22:23:24 +08:00
|
|
|
/************************** end of file ******************/
|