📄 复件 uart.h
字号:
/****************************************************************************/
/* */
/* 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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -