LPC2xxx ARM7 串口 FIFO中断方式 的源代码的头文件
[url=http://www.glorywork.com/][/url]/* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Copyright (c) $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$ 肖遥电子(广州)研发中心
$ Shawyoo Electronics (GuangZhou) R&D Center
$
[url=http://www.shawyoo.com/][u]http://www.shawyoo.com[/u][/url]
Email:
[url=mailto:autoele@qq.com][u]autoele@qq.com[/u][/url]
$ QQ群:9069471/9069433/9524253 All rights reserved.
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ Copyright (c) $$$$$$$$$$$$$$$$$$$$$$$$$$$ */
/*
文件描述
文件名:
功能描述:
编译环境:
目标CPU:
作者:
创建时间:
建议编辑环境:UltraEdit 11.00a 制表符宽度为三个字符,程序可读性更好。
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
*/
#ifndef __UART0_H__
#define __UART0_H__
#include "RTOS.h"
#include
#include "UserGlobals.h"
// $$$$$$$$$$$$$$$$$$ <<< Use Configuration Wizard in Context Menu >>> $$$$$$$$$$$$$$$$$
//
/* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
//
// Default: 使用
*/
#define USE_UART 0
//
/* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
//
// Default: 9600
*/
#define UART0_BPS 9600
/* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
//
// Default: 3
*/
#define U0_DATA_BIT 3
//
/* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
//
// Default: 1
*/
#define U0_CHECK_BIT_EN 1
/* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
//
// Default: 0
*/
#define U0_CHECK_BIT 0
//
/* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
//
// Default: 0
*/
#define U0_STOP_BIT 0
/* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
//
// Default: 1
*/
#define U0_PROIRITY 1
/* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
//
// Default: 100
*/
#define UART0_REC_LENGTH 150
/* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
//
// Default: 100
*/
#define UART0_TXD_LENGTH 1500
//
//
// $$$$$$$$$$$$$$$$$$$ <<< end of configuration section >>> $$$$$$$$$$$$$$$$$$$$$$$$$$$$
#ifdef UART0_GLOBALS
#define UART0_EXT
#else
#define UART0_EXT extern
#endif
#define OWN_ADDRESS 1
#define LEAD_OK 0x55
#define LENGTH_OK 0xaa
#define FIFO_LENGTH 14
#define DATA_START_ADDR 6
/* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
接收相关变量定义
*/
UART0_EXT struct
{
uchar Buffer[UART0_REC_LENGTH];
uchar CheckSum,OverTime;
uchar Command,Error,Receiving;
uint16 Counter,Length;
} Rec;
/* $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
*/
UART0_EXT struct
{
uchar Buffer[UART0_TXD_LENGTH 12];
uchar CheckSum,Sending;
uint16 Length;
} Txd;
UART0_EXT uchar *TxdP;
uchar PutString(uchar *);
uchar PutBuffer(uchar,uint16,uchar *);
void Uart0_SendChar(uchar data);
void ClearReceiveFlag(uint16);
void ClearTransmitFlag(void);
void TaskUART0_ReceiveOK(void) __task;
#endif
/*
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ End of File $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
*/
[url=http://www.glorywork.com/][/url]