⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 复件 uart.h

📁 ARM7芯片EP7312串口驱动源码
💻 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 + -