From c457c45f556bb831af774527a1805f8365a63af4 Mon Sep 17 00:00:00 2001 From: Romuald Conty Date: Sun, 6 Mar 2011 18:48:25 +0000 Subject: [PATCH] examples/nfc-emulate-tag: minor comments improvements. --- examples/nfc-emulate-tag.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/examples/nfc-emulate-tag.c b/examples/nfc-emulate-tag.c index 6efe11d..c47f203 100644 --- a/examples/nfc-emulate-tag.c +++ b/examples/nfc-emulate-tag.c @@ -89,9 +89,9 @@ target_io( nfc_target_t * pnt, const byte_t * pbtInput, const size_t szInput, by strcpy((char*)pbtOutput, "You read block "); pbtOutput[15] = pbtInput[1]; break; - case 0x50: // Deselect / HALT + case 0x50: // HLTA (ISO14443-3) if (!quiet_output) { - printf("Target halted me. Bye!\n"); + printf("Initiator HLTA me. Bye!\n"); } loop = false; break; @@ -104,7 +104,7 @@ target_io( nfc_target_t * pnt, const byte_t * pbtInput, const size_t szInput, by // Next commands will be without CRC init_mfc_auth = true; break; - case 0xe0: // RATS + case 0xe0: // RATS (ISO14443-4) // Send ATS *pszOutput = pnt->nti.nai.szAtsLen + 1; pbtOutput[0] = pnt->nti.nai.szAtsLen + 1; // ISO14443-4 says that ATS contains ATS_Lenght as first byte @@ -114,7 +114,7 @@ target_io( nfc_target_t * pnt, const byte_t * pbtInput, const size_t szInput, by break; case 0xc2: // S-block DESELECT if (!quiet_output) { - printf("Target released me. Bye!\n"); + printf("Initiator DESELECT me. Bye!\n"); } loop = false; break; @@ -188,7 +188,7 @@ main (int argc, char *argv[]) if (pnd == NULL) { ERR("Unable to connect to NFC device"); - return EXIT_FAILURE; + exit (EXIT_FAILURE); } printf ("Connected to NFC device: %s\n", pnd->acName); @@ -250,7 +250,7 @@ main (int argc, char *argv[]) printf ("NFC device (configured as target) is now emulating the tag, please touch it with a second NFC device (initiator)\n"); if (!nfc_target_emulate_tag (pnd, &nt)) { nfc_perror (pnd, "nfc_target_emulate_tag"); - return EXIT_FAILURE; + exit (EXIT_FAILURE); } nfc_disconnect(pnd);