seed_dvs6446_uart.h
来自「TI的DM6446的硬件平台搭建的相关例子」· C头文件 代码 · 共 48 行
H
48 行
#include "davincievm.h"
/* ------------------------------------------------------------------------ *
* *
* UART regs *
* *
* ------------------------------------------------------------------------ */
typedef struct {
volatile Uint32 RBR;
volatile Uint32 IER;
volatile Uint32 IIR;
volatile Uint32 LCR;
volatile Uint32 MCR;
volatile Uint32 LSR;
Uint32 rsvd_18;
Uint32 rsvd_1c;
volatile Uint32 DLL;
volatile Uint32 DLH;
volatile Uint32 PID1;
volatile Uint32 PID2;
volatile Uint32 PWREMU_MGMT;
} UART_REGS;
#define THR RBR // THR & RBR occupy the same memory location
#define FCR IIR // FCR & IIR occupy the same memory location
typedef struct {
UART_REGS* regs;
} UART_OBJ;
static Uint8 rx[256];
static Uint8 tx[256];
static UART_OBJ UART_MODULE_0 = { ( UART_REGS* )UART0_BASE };
static UART_OBJ UART_MODULE_1 = { ( UART_REGS* )UART1_BASE };
typedef UART_OBJ* UART_HANDLE;
/* ------------------------------------------------------------------------ *
* Prototypes *
* ------------------------------------------------------------------------ */
UART_HANDLE DVS6446_UART_open( Uint16 id, Uint32 baudrate );
Int16 DVS6446_UART_close( UART_HANDLE UartHandle );
Int16 DVS6446_UART_xmtReady( UART_HANDLE UartHandle );
Int16 DVS6446_UART_rcvReady( UART_HANDLE UartHandle );
Int16 DVS6446_UART_putChar( UART_HANDLE UartHandle, Uint8 data );
Int16 DVS6446_UART_getChar( UART_HANDLE UartHandle, Uint8* data );
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?