File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -702,14 +702,17 @@ void loop()
702702 picc.userAreaSize (), picc.totalSize ());
703703 if (clicked) {
704704 M5 .Speaker .tone (2000 , 30 );
705- if (picc.isFileSystemMemory ()) {
705+ if (picc.isFileSystemMemory () &&
706+ (picc.isMifarePlus () ? (picc.security_level == 1 || picc.security_level == 3 ) : true )) {
706707 // read_all_user_area();
707708 auto ret = read_write (picc.firstUserBlock (), picc.userAreaSize () >= 120 ? long_msg : short_msg);
708709 lcd.fillScreen (ret ? 0 : TFT_RED );
709710 } else if (picc.isMifareDESFire ()) {
710711 auto ret =
711712 picc.type == Type::MIFARE_DESFire_Light ? read_write_desfire_light () : read_write_desfire ();
712713 lcd.fillScreen (ret ? 0 : TFT_RED );
714+ } else {
715+ M5 .Log .printf (" This example is not supported\n " );
713716 }
714717 } else if (held) {
715718 nfc_a.dump ();
@@ -719,7 +722,7 @@ void loop()
719722 } else if (picc.supportsNFC ()) {
720723 read_write_page_structure (picc, 10 );
721724 } else {
722- M5_LOGE ( " No example" );
725+ M5 . Log . printf ( " This example is not supported \n " );
723726 }
724727 }
725728 nfc_a.deactivate ();
You can’t perform that action at this time.
0 commit comments