Skip to content

Commit 0dac8ba

Browse files
committed
Squashed 'examples/UnitUnified/NFCA/' changes from fcb4454..e0b71c1
e0b71c1 Fixes identify_plus_sl03, some twaks git-subtree-dir: examples/UnitUnified/NFCA git-subtree-split: e0b71c16bb09afde54db2f460412f68d04a534d8
1 parent fcada80 commit 0dac8ba

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

ReadWrite/main/ReadWrite.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff 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();

0 commit comments

Comments
 (0)