复件 uart.h
来自「ARM7芯片EP7312串口驱动源码」· C头文件 代码 · 共 71 行
H
71 行
/****************************************************************************/
/* */
/* FILE NAME VERSION */
/* */
/* Uart.h */
/* */
/* COMPONENT */
/* */
/* UART */
/* */
/* DESCRIPTION */
/* */
/* This file contains constant definitions and */
/* function prototypes for the UART and card reader driver. */
/* */
/* AUTHOR */
/* */
/* */
/* */
/* DATA STRUCTURES */
/* */
/* none */
/* */
/* */
/* HISTORY */
/* */
/* NAME DATE REMARKS */
/* */
/****************************************************************************/
#ifndef UART
#define UART
/* this target.h below is similar to the file cogent.h, registers descriptor,
not needed here */
/* #include "target.h" */
// reader using UART number 2
#define readerPort 2
// return value definition
#define FAIL -3
#define SUCCEED 0
#define OPENED 1
#define NOT_OPENED -1
#define NO_CONTENT -2
#define COMPLETED 1
#define UNCOMPLETED 0
//*************************************************************************
//
// UART drive function prototypes
//
//****************************************************************************
static void UART2_LISR( int vector );
int readerOpen( int BaudRate, int DataBits, int StopBits,int Parity, int EvenParity );
int readerClose( void );
int readerRead( unsigned char * response );
int readerWrite( unsigned char * command, int command_Len );
void readerTest( void );
#endif /* EOF for Uart.h */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?