Generic library for working with PN532-like chips
Fork of PN532 by
Diff: MifareUltralight.cpp
- Revision:
- 10:f959b305a571
- Parent:
- 5:51f820fbd18a
--- a/MifareUltralight.cpp Wed Feb 04 16:24:30 2015 +0000 +++ b/MifareUltralight.cpp Wed Feb 04 19:04:54 2015 +0000 @@ -27,7 +27,7 @@ { if (isUnformatted()) { - DMSG("WARNING: Tag is not formatted."); + DMSG("WARNING: Tag is not formatted.\n"); return NfcTag(uid, uidLength, NFC_FORUM_TAG_TYPE_2); } @@ -54,11 +54,12 @@ #ifdef MIFARE_ULTRALIGHT_DEBUG DMSG("Page ");Serial.print(page);DMSG(" "); nfc->PrintHexChar(&buffer[index], ULTRALIGHT_PAGE_SIZE); + DMSG("\n"); #endif } else { - DMSG("Read failed ");DMSG_INT(page); + DMSG("Read failed ");DMSG_INT(page);DMSG("\n"); // TODO error handling messageLength = 0; break; @@ -143,7 +144,7 @@ } else { - DMSG("Error. Failed read page ");DMSG_INT(page); + DMSG("Error. Failed read page ");DMSG_INT(page);DMSG("\n"); return false; } } @@ -158,7 +159,7 @@ // See AN1303 - different rules for Mifare Family uint8_t2 = (additional data + 48)/8 tagCapacity = data[2] * 8; #ifdef MIFARE_ULTRALIGHT_DEBUG - DMSG("Tag capacity "));Serial.print(tagCapacity);DMSG(F(" uint8_ts"); + DMSG("Tag capacity "));Serial.print(tagCapacity);DMSG(F(" uint8_ts\n"); #endif // TODO future versions should get lock information @@ -180,6 +181,7 @@ #ifdef MIFARE_ULTRALIGHT_DEBUG DMSG("Page "));Serial.print(page);Serial.print(F(" - "); nfc->PrintHexChar(data_ptr, 4); + DMSG("\n"); #endif data_ptr += ULTRALIGHT_PAGE_SIZE; } @@ -201,7 +203,7 @@ #ifdef MIFARE_ULTRALIGHT_DEBUG DMSG("messageLength ");DMSG(messageLength); - DMSG("ndefStartIndex ");DMSG(ndefStartIndex); + DMSG(" ndefStartIndex ");DMSG(ndefStartIndex);DMSG("\n"); #endif }