- error = pn532Read(response, &responseLen);
- systickDelay(25);
- }
- #ifdef PN532_UART
- while (error == PN532_ERROR_RESPONSEBUFFEREMPTY);
- #endif
- #ifdef PN532_SPI
- while ((error == PN532_ERROR_RESPONSEBUFFEREMPTY) || (error = PN532_ERROR_SPIREADYSTATUSTIMEOUT));
- #endif
-
- // Print the card details if possible
- if (!error)
- {
- /* Response for ISO14443A 106KBPS (Mifare Classic, etc.)
- See UM0701-02 section 7.3.5 for more information
-
- byte Description
- ------------- ------------------------------------------
- b7 Tags Found
- b8 Tag Number (only one used in this example)
- b9..10 SENS_RES
- b11 SEL_RES
- b12 NFCID Length
- b13..NFCIDLen NFCID
-
- SENS_RES SEL_RES Manufacturer/Card Type NFCID Len
- -------- ------- ----------------------- ---------
- 00 04 08 NXP Mifare Classic 1K 4 bytes */
-
- printf("%s", CFG_PRINTF_NEWLINE);
- printf("%-12s: %d %s", "Tags Found", response[7], CFG_PRINTF_NEWLINE);
- printf("%-12s: %02X %02X %s", "SENS_RES", response[9], response[10], CFG_PRINTF_NEWLINE);
- printf("%-12s: %02X %s", "SEL_RES", response[11], CFG_PRINTF_NEWLINE);
- printf("%-12s: ", "NFCID");
- size_t pos;
- for (pos=0; pos < response[12]; pos++)
- {
- printf("%02x ", response[13 + pos]);
- }
- printf(CFG_PRINTF_NEWLINE);
- }
- else
- {
- // Oops .... something bad happened. Check 'error'
- printf("Ooops! Error %02X %s", error, CFG_PRINTF_NEWLINE);