From f0a3a3f8c4f39dfacf2d370bd23b27cd5b3358bf Mon Sep 17 00:00:00 2001 From: laforge Date: Fri, 1 Dec 2006 13:29:00 +0000 Subject: - add size detection for mifare classic / ultralight - add possibility to obtain ATQA via getopt - fix default -EINVAL return of tcl getopt git-svn-id: https://svn.gnumonks.org/trunk/librfid@1930 e0336214-984f-0b4b-a45f-81c69e1f0ede --- include/librfid/rfid_layer2_iso14443a.h | 2 ++ include/librfid/rfid_protocol.h | 1 + include/librfid/rfid_protocol_mifare_classic.h | 4 ++++ 3 files changed, 7 insertions(+) (limited to 'include') diff --git a/include/librfid/rfid_layer2_iso14443a.h b/include/librfid/rfid_layer2_iso14443a.h index 283e6b6..b9ef954 100644 --- a/include/librfid/rfid_layer2_iso14443a.h +++ b/include/librfid/rfid_layer2_iso14443a.h @@ -4,6 +4,7 @@ enum rfid_14443a_opt { RFID_OPT_14443A_SPEED_RX = 0x00010001, RFID_OPT_14443A_SPEED_TX = 0x00010002, + RFID_OPT_14443A_ATQA = 0x00010003, }; enum rfid_14443_opt_speed { @@ -56,6 +57,7 @@ struct iso14443a_handle { unsigned int state; unsigned int level; unsigned int tcl_capable; + struct iso14443a_atqa atqa; }; enum iso14443a_level { diff --git a/include/librfid/rfid_protocol.h b/include/librfid/rfid_protocol.h index fd649ef..06f704f 100644 --- a/include/librfid/rfid_protocol.h +++ b/include/librfid/rfid_protocol.h @@ -45,6 +45,7 @@ enum rfid_protocol_id { enum rfid_protocol_opt { RFID_OPT_PROTO_ID, + RFID_OPT_PROTO_SIZE = 0x10000001, }; #ifdef __LIBRFID__ diff --git a/include/librfid/rfid_protocol_mifare_classic.h b/include/librfid/rfid_protocol_mifare_classic.h index 99c447d..b20a028 100644 --- a/include/librfid/rfid_protocol_mifare_classic.h +++ b/include/librfid/rfid_protocol_mifare_classic.h @@ -17,6 +17,10 @@ #define RFID_CMD_MIFARE_AUTH1A 0x60 #define RFID_CMD_MIFARE_AUTH1B 0x61 +enum rfid_proto_mfcl_opt { + RFID_OPT_P_MFCL_SIZE = 0x10000001, +}; + #ifdef __LIBRFID__ extern const struct rfid_protocol rfid_protocol_mfcl; -- cgit v1.2.3