PcdHalt.c
上传用户:hbtfgg
上传日期:2021-12-10
资源大小:16k
文件大小:1k
- #include<reg52.h>
- #include<rc500.h>
- char PcdHalt(void)
- {
- char status=MI_OK;
- idata struct TranSciveBuffer{uchar MfCommand;
- uchar MfLength;
- uchar MfData[2];
- }MfComData;
- struct TranSciveBuffer *pi;
- pi=&MfComData;
- PcdSetTmo(106);
- MfComData.MfCommand=PCD_TRANSCEIVE;
- MfComData.MfLength=2;
- MfComData.MfData[0]=PICC_HALT;
- MfComData.MfData[1]=0;
- status=PcdComTransceive(pi);
- if (status)
- {
- if(status==MI_NOTAGERR||status==MI_ACCESSTIMEOUT)
- status = MI_OK;
- }
- WriteRC(RegCommand,PCD_IDLE);
- return status;
- }