+
+ printf("%s", CFG_PRINTF_NEWLINE);
+ printf("%-12s: ", "Received");
+ pn532PrintHex(response, responseLen);
+
+ // Try to handle some potential frame errors
+ // Unhandled errors are caught further down
+ switch (error)
+ {
+ case (PN532_ERROR_PREAMBLEMISMATCH):
+ // Frame should start with 0x00 0x00 0xFF!
+ printf("Response frame doesn't start with expected preamble (00 00 FF)%s", CFG_PRINTF_NEWLINE);
+ break;
+ case (PN532_ERROR_APPLEVELERROR):
+ printf("Application level error reported by PN532%s", CFG_PRINTF_NEWLINE);
+ break;
+ case (PN532_ERROR_LENCHECKSUMMISMATCH):
+ printf("Frame length check/checksum mismatch%s", CFG_PRINTF_NEWLINE);
+ break;
+ }