mirror of
https://github.com/whowechina/aic_pico.git
synced 2024-11-27 15:00:49 +01:00
Identifies card in aime mode
This commit is contained in:
parent
323f3b6053
commit
6591e28f11
Binary file not shown.
@ -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()
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -205,7 +205,9 @@ static void cardio_run()
|
||||
|
||||
nfc_rf_field(true);
|
||||
nfc_card_t card = nfc_detect_card();
|
||||
nfc_identify_last_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) {
|
||||
|
Loading…
Reference in New Issue
Block a user