void Auto_Reader(void)
{
uint8_t i,j;
while(1)
{
if(PcdRequest(0x52,Temp)==MI_OK)
{
if(Temp[0]==0x04&&Temp[1]==0x00)
BSP_LCD_DisplayStringAt(0, 0, (uint8_t *)"MFOne-S50", LEFT_MODE);
else if(Temp[0]==0x02&&Temp[1]==0x00)
BSP_LCD_DisplayStringAt(0, 0, (uint8_t *)"MFOne-S70", LEFT_MODE);
else if(Temp[0]==0x44&&Temp[1]==0x00)
BSP_LCD_DisplayStringAt(0, 0, (uint8_t *)"MF-UltraLight", LEFT_MODE);
else if(Temp[0]==0x08&&Temp[1]==0x00)
BSP_LCD_DisplayStringAt(0, 0, (uint8_t *)"MF-Pro", LEFT_MODE);
else if(Temp[0]==0x44&&Temp[1]==0x03)
BSP_LCD_DisplayStringAt(0, 0, (uint8_t *)"MF Desire", LEFT_MODE);
else
BSP_LCD_DisplayStringAt(0, 0, (uint8_t *)"Unknown", LEFT_MODE);
if(PcdAnticoll(UID)==MI_OK)
{
BSP_LCD_DisplayStringAt(0, 30, (uint8_t *)"Card Id is:", LEFT_MODE);
for(i = 0; i < 4;i++)
changeid(UID,i);
for(j = 0;j < 10;j++)
BSP_LCD_DisplayChar(j*15,60,tochar(ID[j]));
}
}
}
}
void Find_Card(void)
{
if(PcdRequest(0x52,Temp)==MI_OK)
{
if(Temp[0]==0x04&&Temp[1]==0x00)
BSP_LCD_DisplayStringAt(0, 0, (uint8_t *)"MFOne-S50", LEFT_MODE);
else if(Temp[0]==0x02&&Temp[1]==0x00)
BSP_LCD_DisplayStringAt(0, 0, (uint8_t *)"MFOne-S70", LEFT_MODE);
else if(Temp[0]==0x44&&Temp[1]==0x00)
BSP_LCD_DisplayStringAt(0, 0, (uint8_t *)"MF-UltraLight", LEFT_MODE);
else if(Temp[0]==0x08&&Temp[1]==0x00)
BSP_LCD_DisplayStringAt(0, 0, (uint8_t *)"MF-Pro", LEFT_MODE);
else if(Temp[0]==0x44&&Temp[1]==0x03)
BSP_LCD_DisplayStringAt(0, 0, (uint8_t *)"MF Desire", LEFT_MODE);
else
BSP_LCD_DisplayStringAt(0, 0, (uint8_t *)"Unknown", LEFT_MODE);
BSP_LCD_DisplayStringAt(0, 20, (uint8_t *)"Success!", LEFT_MODE);
}
else
BSP_LCD_DisplayStringAt(0, 20, (uint8_t *)"Faile!", LEFT_MODE);
}
|