PcdConfigRestore.c
上传用户:hbtfgg
上传日期:2021-12-10
资源大小:16k
文件大小:1k
源码类别:

RFID编程

开发平台:

C/C++

  1. #include<reg52.h>
  2. #include<rc500.h>
  3. char PcdConfigRestore()
  4. {
  5.     uchar code rc500config[32]=
  6.     {0x00,0x58,0x3f,0x3f,0x19,0x13,0x00,0x00,0x00,0x73,0x08,0xad,0xff,0x00,0x41,0x00,
  7.      0x00,0x06,0x03,0x63,0x63,0x00,0x00,0x00,0x00,0x08,0x07,0x06,0x0a,0x02,0x00,0x00};
  8.     char status;
  9.     uchar i;
  10.     char idata congfigdata[16];
  11.     uchar *pa;
  12.     pa=&congfigdata[0];
  13.     for(i=0;i<16;i++)
  14.     {
  15.      *(pa+i)=rc500config[i];
  16.     }
  17.     status=PcdWriteE2(0x0010,0x10,pa);
  18.     if(status==MI_OK)
  19.     {
  20.         for(i=0;i<16;i++)
  21.         {
  22.          *(pa+i)=rc500config[i+16];
  23.         }
  24.     }
  25.     status=PcdWriteE2(0x0020,0x10,pa);
  26.     return status;
  27. }