Skip to content

Commit

Permalink
further limit Serial
Browse files Browse the repository at this point in the history
  • Loading branch information
ccreutzig committed Mar 12, 2015
1 parent f231e10 commit 1699127
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions MifareUltralight.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ NfcTag MifareUltralight::read(byte * uid, unsigned int uidLength)
{
if (isUnformatted())
{
#ifdef NDEF_USE_SERIAL
Serial.println(F("WARNING: Tag is not formatted."));
#endif
return NfcTag(uid, uidLength, NFC_FORUM_TAG_TYPE_2);
}

Expand Down Expand Up @@ -56,7 +58,9 @@ NfcTag MifareUltralight::read(byte * uid, unsigned int uidLength)
}
else
{
#ifdef NDEF_USE_SERIAL
Serial.print(F("Read failed "));Serial.println(page);
#endif
// TODO error handling
messageLength = 0;
break;
Expand Down Expand Up @@ -86,7 +90,9 @@ boolean MifareUltralight::isUnformatted()
}
else
{
#ifdef NDEF_USE_SERIAL
Serial.print(F("Error. Failed read page "));Serial.println(page);
#endif
return false;
}
}
Expand Down Expand Up @@ -166,7 +172,9 @@ boolean MifareUltralight::write(NdefMessage& m, byte * uid, unsigned int uidLeng
{
if (isUnformatted())
{
#ifdef NDEF_USE_SERIAL
Serial.println(F("WARNING: Tag is not formatted."));
#endif
return false;
}
readCapabilityContainer(); // meta info for tag
Expand Down

0 comments on commit 1699127

Please sign in to comment.