1 //-----------------------------------------------------------------------------
3 // Gerhard de Koning Gans - May 2008
4 // Hagen Fritsch - June 2010
6 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
7 // at your option, any later version. See the LICENSE.txt file for the text of
9 //-----------------------------------------------------------------------------
10 // Routines to support ISO 14443 type B.
11 //-----------------------------------------------------------------------------
22 # define AddCrc14A(data, len) compute_crc(CRC_14443_A, (data), (len), (data)+(len), (data)+(len)+1)
26 # define AddCrc14B(data, len) compute_crc(CRC_14443_B, (data), (len), (data)+(len), (data)+(len)+1)
29 void iso14443b_setup(void);
30 int iso14443b_apdu(uint8_t const *msg
, size_t msg_len
, bool send_chaining
, void *rxdata
, uint16_t rxmaxlen
, uint8_t *res
);
32 int iso14443b_select_card(iso14b_card_select_t
*card
);
33 int iso14443b_select_card_srx(iso14b_card_select_t
*card
);
35 void SimulateIso14443bTag(uint8_t *pupi
);
36 void AcquireRawAdcSamplesIso14443b(uint32_t parameter
);
37 void ReadSTBlock(uint8_t blocknr
);
38 void SniffIso14443b(void);
39 void SendRawCommand14443B(uint32_t, uint32_t, uint8_t, uint8_t[]);
40 void SendRawCommand14443B_Ex(iso14b_raw_cmd_t
*p
);
42 // States for 14B SIM command
46 #define SIM_SELECTING 3
48 #define SIM_ACKNOWLEDGE 5
51 #endif /* __ISO14443B_H */