www.pudn.com > RC522.zip > global.h, change:2015-04-14,size:1777b


#ifndef _GLOBAL_H_ 
#define _GLOBAL_H_ 
 
#include "stm32f10x.h" 
 
 
typedef enum tag_BOOL 
{ 
	FALSE=0, 
	TRUE=1 
} BOOL; 
 
#ifdef GLOBALS 
   #define EXT    
#else 
   #define EXT  extern 
#endif 
// 7, 23控制快死掉   
 
#define USE_SECTOR           24 
#define MIMA_SECTOR          USE_SECTOR+3 
 
#define POWER_KEY             162 
#define UP_KEY                98                  
#define DOWN_KEY              168 
#define PLAY_KEY              2 
#define LEFT_KEY              34 
#define RIGHT_KEY             194 
#define VOLINC_KEY            144 
#define VOLDEC_KEY            224 
#define DEXCHANGE             66 
#define SHEZHIMIMA            104  //按键1 
#define RESET_SYSYTERM        226 
 
#define  CHONGZHI      0 
#define  KOUKUAN       1 
#define  DUKA          3 
#define  GAIMI         4 
#define  LOCK          5 
#define  UNLOCK        6 
 
 
//	if(key==0) index=15;//CHONGZHI 
//	else if(key==1)  index=17;//KOUKUAN 
//	else if(key==2)  index=19;// 
//	else if(key==3)  index=21;//DUKA 
//	else if(key==4)  index=23;//GAIMI 
//	 else if(key==5)  index=25;//LOCK 
//	 else if(key==6)  index=27;//LOCK 
 
EXT  BOOL decimal; 
EXT  BOOL  pass_mode; 
EXT  BOOL  lock; 
 
	//M1卡的某一块写为如下格式,则该块为钱包,可接收扣款和充值命令 
	//4字节金额(低字节在前)+4字节金额取反+4字节金额+1字节块地址+1字节块地址取反+1字节块地址+1字节块地址取反  
//	u8 data1[16] = {0x12,0x34,0x56,0x78,~(0x12),0xCB,0xA9,0x87,0x12,0x34,0x56,0x78,USE_SECTOR,~(USE_SECTOR),USE_SECTOR,~(USE_SECTOR)}; 
EXT	u8 data2[4] ; 
EXT	u8 Card_Type1[2]; 
EXT	u8 Card_ID[4]; 
EXT	u8	pasword[6]; 
EXT	u8	savepas[6]; 
EXT	u8 Card_Data[16]; 
EXT	u8 Read_Card[16]; 
EXT u8 Default_pass[16]; 
EXT u8 status; 
 
EXT u8 key; 
EXT u8 pre_bit; 
EXT u8 temp_data; 
 
#endif