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

📄 basetype.h

📁 ARM7x256开发板的了LED测试程序
💻 H
字号:
//------------------------------------------------------------------------------
// BaseType.h
// Fn: Basic device and data type definitions
//------------------------------------------------------------------------------

#ifndef BASETYPE_H
#define BASETYPE_H

typedef unsigned short 			ushort;
typedef unsigned char 			uchar;
typedef unsigned int 			uint;
typedef unsigned long 			ulong;

typedef	enum					BOOLtag	{ FALSE=0, TRUE=1 } Bool;

typedef	char					Int8;
typedef	char*					PInt8;

typedef	unsigned char			UInt8;
typedef	unsigned char*			PUInt8;
typedef	volatile unsigned char*	PVUInt8;

typedef	short int				Int16;
typedef	short int*				PInt16;
typedef	unsigned short 			UInt16;
typedef	unsigned short* 		PUInt16;
typedef	unsigned short 			BOOL;

typedef	long int				Int32;
typedef	long int*				PInt32;
typedef	unsigned long 			UInt32;
typedef	unsigned long*			PUInt32;
typedef	unsigned long 			DWORD;

typedef	char					Char;
typedef	char*					String;

typedef	unsigned char			Buffer;
typedef	unsigned char*			PBuffer;

#define OK	   	  				0x00		// OK, Ack
#define ON						1			
#define OFF						0			
#define FALSE					0
#define TRUE					1

#define MCK             		47923200    // MCK (PLLRC div by 2)
#define MCKKHz          		(MCK/1000)  // MCK in kHz

#define RF_PWR_OFF				0			// CHANGE LATER
#define RF_PWR_ON				1			// CHANGE LATER


// stateMachine Definition
#define STATE0					0			// USB Generic reader mode
#define STATE0_1				0x01		// Start new bill???
#define STATE0_2				0x02		// wait for PDA reply on WiFi status
#define STATE0_3				0x03		// PDA reply on WiFi status
#define STATE1					0x10		// Scanning/entry for table tag
#define STATE2					0x20		// enter number of customers
#define STATE3					0x30		// plate count
#define STATE3_1				0x31		// scanning plates...
#define STATE4					0x40		// summarise bill on LCD

// sending bill information STATE5
#define STATE5_1				0x51		// sending data to PDA
#define STATE5_2				0x52		// wait for message from PDA
#define STATE5_3				0x53		// transaction successful
#define STATE5_4				0x54		// transaction fail
#define STATE6					0x60		// writing bill to tag
#define STATE6_1				0x61		// transaction fail, discarding bill
#define STATEI_0				0xF0		// powering on state
#define STATEI_1				0xF1		// initializing state
#define STATEI_2				0xF2		// reader ready state
#define STATEI_3				0xF3		// connecting BT state
#define STATEI_4				0xF4		// Invalid state
#define STATEI_5				0xF5		// Loading BT state

// Testing buttons
#define BP1						0x81		// "BP1"
#define BP2						0x82		// "BP2"
#define BP3						0x83		// "BP3"
#define BP4						0x84		// "BP4"

#endif

⌨️ 快捷键说明

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