1
0
mirror of https://github.com/whowechina/aic_pico.git synced 2024-11-12 00:40:47 +01:00

Identifies card in aime mode

This commit is contained in:
whowechina 2024-06-22 09:59:51 +08:00
parent 323f3b6053
commit 6591e28f11
4 changed files with 9 additions and 1 deletions

Binary file not shown.

View File

@ -333,6 +333,9 @@ static void cmd_detect_card()
}
send_response();
if (card.card_type != NFC_CARD_NONE) {
nfc_identify_last_card();
}
}
static void cmd_card_select()

View File

@ -15,6 +15,8 @@
#include "pn532.h"
#include "pn5180.h"
#define DEBUG(...) { if (nfc_runtime.debug) printf(__VA_ARGS__); }
nfc_runtime_t nfc_runtime;
static enum {
@ -383,6 +385,7 @@ static void identify_15693()
void nfc_identify_last_card()
{
if (time_us_64() - last_card_time > CARD_INFO_TIMEOUT_US) {
DEBUG("\nLast card expired, no identification");
return;
}

View File

@ -205,7 +205,9 @@ static void cardio_run()
nfc_rf_field(true);
nfc_card_t card = nfc_detect_card();
if (card.card_type != NFC_CARD_NONE) {
nfc_identify_last_card();
}
nfc_rf_field(false);
if (memcmp(&old_card, &card, sizeof(old_card)) == 0) {