uart.h
来自「freescale i.mx31 BSP CE5.0全部源码」· C头文件 代码 · 共 65 行
H
65 行
//------------------------------------------------------------------------------
//
// Copyright (C) 2004, Motorola Inc. All Rights Reserved
//
//------------------------------------------------------------------------------
//
// Copyright (C) 2004, Freescale Semiconductor, Inc. All Rights Reserved
// THIS SOURCE CODE IS CONFIDENTIAL AND PROPRIETARY AND MAY NOT
// BE USED OR DISTRIBUTED WITHOUT THE WRITTEN PERMISSION OF
// Freescale Semiconductor, Inc.
//
//------------------------------------------------------------------------------
//------------------------------------------------------------------------------
//
// File: uart.h
//
// Header file for zeus serial device.
//
//------------------------------------------------------------------------------
#ifndef __UART_H__
#define __UART_H__
#ifdef __cplusplus
extern "C" {
#endif
//------------------------------------------------------------------------------
// Defines
#define UART_REF_FREQ 5500000
#define IRSC_BAUDRATE 38400
#define UART_BAUDRATE_DEFAULT 115200
#define UART_UBMR_MOD_DEFAULT 40000
#define UART_UBIR_INCREMENT( baud, UBMR, refFreq ) ((UINT32)(((UINT64)baud * 16*UBMR / refFreq)))
#define SER_FIFO_DEPTH 32
#define SER_FIFO_TXTL 0x10
#define SER_FIFO_RXTL 0x10
#define UART_URXD_RX_DATA_MSK 0xFF
//------------------------------------------------------------------------------
// Types
typedef enum uartType {
DCE,
DTE
}uartType_c;
typedef enum irMode {
SIR_MODE,
MIR_MODE,
FIR_MODE
}irMode_c;
//------------------------------------------------------------------------------
// Functions
#ifdef __cplusplus
}
#endif
#endif // __UART_H__
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?