Hello,
I believe the following code available in NfcrdlibEx4_MIFAREClassic example of the NFC Reader Library may help you. It is basically an infinite loop checking for card presence (WakeUpA and HaltA commands are sent continuously).
Code (NfcrdlibEx4_MIFAREClassic.c -> starting at line 305):
/* Make sure that example application is not detecting the same card continuously */
do
{
/* Send WakeUpA */
status = phpalI14443p3a_WakeUpA(pDiscLoop->pPal1443p3aDataParams,
pDiscLoop->sTypeATargetInfo.aTypeA_I3P3[0].aAtqa);
/* Check for Status */
if (status != PH_ERR_SUCCESS)
{
break; /* Card Removed, break from the loop */
}
/* Send HaltA */
status = phpalI14443p3a_HaltA(pDiscLoop->pPal1443p3aDataParams);
CHECK_STATUS(status);
/* Delay - 5 milli seconds*/
status = phhalHw_Wait(pDiscLoop->pHalDataParams, PHHAL_HW_TIME_MILLISECONDS, 5);
CHECK_STATUS(status);
}while(1);
Hope it helps!
BR,
Ivan.