PcdConfigRestore.c
资源名称:RC500.rar [点击查看]
上传用户:hbtfgg
上传日期:2021-12-10
资源大小:16k
文件大小:1k
源码类别:
RFID编程
开发平台:
C/C++
- #include<reg52.h>
- #include<rc500.h>
- char PcdConfigRestore()
- {
- uchar code rc500config[32]=
- {0x00,0x58,0x3f,0x3f,0x19,0x13,0x00,0x00,0x00,0x73,0x08,0xad,0xff,0x00,0x41,0x00,
- 0x00,0x06,0x03,0x63,0x63,0x00,0x00,0x00,0x00,0x08,0x07,0x06,0x0a,0x02,0x00,0x00};
- char status;
- uchar i;
- char idata congfigdata[16];
- uchar *pa;
- pa=&congfigdata[0];
- for(i=0;i<16;i++)
- {
- *(pa+i)=rc500config[i];
- }
- status=PcdWriteE2(0x0010,0x10,pa);
- if(status==MI_OK)
- {
- for(i=0;i<16;i++)
- {
- *(pa+i)=rc500config[i+16];
- }
- }
- status=PcdWriteE2(0x0020,0x10,pa);
- return status;
- }