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

📄 814xapprogramv1.0.h

📁 本代码是串口扩展芯片GM814X在 Arm9—usos上使用的实例
💻 H
字号:
/***********************************************************
 Name:		814XAppProgram.h
 Descibe: 	Head file of 814XAppProgram.c
 Version:	       1.0
 Time:		2006.1
 Contents:	Include all operation and function of GM814x
 Copyright:	GMIC 2006
***********************************************************/
      
extern unsigned char   Flag1_T;     
extern unsigned char   Flag2_T;     
extern unsigned char   Flag3_T;    
extern unsigned char   Flag4_T;    
extern unsigned char   Revbuff1;   
extern unsigned char   Revbuff2;   
extern unsigned char   Revbuff3;   
extern unsigned char   Revbuff4;    


/***********************************************************
 Function:	Delay
 Describe:	Time delay
 Input:		int  formated time
 Output:	       void
***********************************************************/
void Delay(unsigned int nTime);


/***********************************************************
 Function:	SendTo814X
 Describe:	send 2 byte to 814x and receive 2 byte from 814x
 Input:		2 byte to be send
 Output:	       2 byte read from 814x
***********************************************************/
unsigned int SendTo814X(unsigned char chigh,unsigned char clow)	;


/***********************************************************
 Function:	Gm814XShutdown
 Describe:	Shutdown the chip
 Input:		void
 Output:	       void
***********************************************************/
void Gm814XShutdown(void);


/***********************************************************
 Function:	Gm814XWakeup
 Describe:	Wakeup the chip
 Input:		void
 Output:	       void
***********************************************************/
void Gm814XWakeup(void)	;


/***********************************************************
 Function:	Write814xConfig
 Describe:	Set the configure register of 814x 
 Input:		COM number and configure data
 Output:	       2 byte read from 814x
***********************************************************/
unsigned int Write814xConfig(unsigned char n,unsigned char high,unsigned char low) ;


/***********************************************************
 Function:	Read814xConfig
 Describe:	read out the configure register data  
 Input:		COM number 
 Output:	       configure register data
***********************************************************/
unsigned int Read814xConfig(unsigned char n) ;


/***********************************************************
 Function:	ReadTFIFOState
 Describe:	read all transmit FIFO status
 Input:		void
 Output:	       TFIFO state data
***********************************************************/
unsigned int ReadTFIFOState(void)  ;


/***********************************************************
 Function:	SendDataToCom
 Describe:	send data to UART Com and read out the data of receive FIFO
 Input:		COM number and data to be send
 Output:	       RFIFO data
***********************************************************/
unsigned int SendDataToCom(unsigned char n,unsigned char c,bit Pt);


/***********************************************************
 Function:	SendToAllCom
 Describe:	send data to all UART Com and read out the data of receive FIFO
 Input:		data to be send
 Output:	       RFIFO data
***********************************************************/
unsigned int SendToAllCom(unsigned char c,bit Pt) ;


/***********************************************************
 Function:	ReadRFIFOData
 Describe:	read out the data of receive FIFO
 Input:		void
 Output:	       RFIFO data
***********************************************************/
unsigned int  ReadRFIFOData(void);


/***********************************************************
 Function:	Managerevdata
 Describe:	Analyse the data received from 814X 
 Input:		void
 Output:	       void
***********************************************************/
void ManageRevData(unsigned int rdata);


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -