- 17
- 0
- 约2.42万字
- 约 52页
- 2018-11-08 发布于广东
- 举报
嵌入式射频卡程序.doc
嵌入式射频卡程序
#include nkeyshell.hn
char shell_s[]=\nkeyshellgt;
/*int argc, char *argv[*/
#defineCMD_TPYE (0)
#define PHONE_NUMBER (1)
#define MAX_CMD_DEPTH (2)
extern volatile int STOP ;
extern char PHONE[];
void * keyshell()
{
int i;
char cmd[256]={0,};
/***
*与读卡相关的数据定义
*
木木木木木木木木木木木木木木木木木木木木木木木木木木木木木木木木木木木木木木木木
uchar CardNo[4],CardKey[6];
uchar CardData[16];
uchar Default一CardBlock=0x01;
uchar Choose_CardBlock=0x01;
for(i=0;ilt;6;i++) Card Key [i]=Oxff;
for(i=0;ilt;4;i++) CardNo[i]=0;
y 3^^ 3^^ 木木木木 木木 5^^ 木木木 5^^ 3^^ 3^^ 3^^ 木木 木木木 5^^ 3^^ 3^^ 木 y
kbd_init(); //键盘初始化 printf(\nkeyboard init over!!!!!!!};
//ICcard_init(); //读卡模块初始化 printf(\nlt;ICcardReader control shellgt;);
printf(\n [1] test the communicate with the ICcardModule*);
printf(\n [2] set defaule ICcardReader:searchmode); printf(\n [3]
set default block for read,and the key needed); printf(\n [4] Test it as
the Iccard used in the bus ticket system!); printf(\n [5] contorl with the
buzzer);
printf(\n [6] read defalt data};
printf(\n [7] read data in the block which you choose); printf(\n
[8] write defalt data);
printf(\n [9] write data in the block which you choose); printf(\n [/]
turn off the card);
printf(\n [-] request the card states);
printf(u\n [0] exit);
printf(H\n [**] help menu);
while(l){
printf(shell_s);
fflush(stdout);
getjine(cmd);
printf(\r\nwe get it!!!!!!!!!!!!); //显示必要的输出
if(strncmp(,,l,cmd,l)==O){
printf(*\nyou select to test the communicate with the ICcardModule);
fflush(stdout);
fflush(stdin);
tty_fflush();//05-22
Commu」est();
printf(\nwaiting for your next command!);
fflush(stdout);
} else if(strncmp(2,cmd,l)==0){
fflush(stdout);
fflush(stdin);
tty_fflush();//05-22
CLR_Set();
printf(\nwaiting for your next command!1);
} else if(strncmp(3,,,cmd/l)==0){
//设置读卡器读取默认数据块的块号和相应的块的密码
fflush(stdout);
fflush(stdin);
tty_fflush();//O5-22
Set_DefBlock(Default_CardBlock?CardKey);
printf(\nwe do success!);
printf(\nwaiting for your next command!);
}else if (strncmp(4,cmd,l)==0){
while(l){
//演示中只使用了
您可能关注的文档
最近下载
- (高清版)C-H-T 9012-2011 基础地理信息数字成果数据组织及文件命名规则.pdf VIP
- Unit6 Numbers in life A let's learn(课件) 人教PEP版(2024)英语三年级下册.pptx VIP
- 2026年重庆高考物理考试卷及答案.docx VIP
- 2025年新疆高考语文试卷及答案.docx VIP
- 工程断裂力学课件.ppt
- 部编版六年级语文下册导学案(全册).docx VIP
- 大足石刻宝顶山景区讲解词(完整版).pdf VIP
- 最新2026年时事政治题单招标准卷.docx VIP
- 伟思医疗公司2019年财务分析研究报告.docx
- 外国名家哲理短文40篇重点.doc
原创力文档

文档评论(0)