]> cvs.zerfleddert.de Git - proxmark3-svn/blame - common/iso15693tools.h
Mfp commands (#698)
[proxmark3-svn] / common / iso15693tools.h
CommitLineData
9455b51c 1// ISO15693 commons
0546b4aa 2// Adrian Dabrowski 2010 and others, GPLv2
9455b51c 3
4#ifndef ISO15693_H__
5#define ISO15693_H__
6
7// ISO15693 CRC
8c6cca0b 8#define ISO15693_CRC_PRESET (uint16_t)0xFFFF
9#define ISO15693_CRC_POLY (uint16_t)0x8408
10#define ISO15693_CRC_CHECK ((uint16_t)(~0xF0B8 & 0xFFFF)) // use this for checking of a correct crc
9455b51c 11
12uint16_t Iso15693Crc(uint8_t *v, int n);
13int Iso15693AddCrc(uint8_t *req, int n);
14char* Iso15693sprintUID(char *target,uint8_t *uid);
c3963755 15unsigned short iclass_crc16(char *data_p, unsigned short length);
9455b51c 16
17//-----------------------------------------------------------------------------
18// Map a sequence of octets (~layer 2 command) into the set of bits to feed
19// to the FPGA, to transmit that command to the tag.
20// Mode: highspeed && one subcarrier (ASK)
21//-----------------------------------------------------------------------------
22
23 // The sampling rate is 106.353 ksps/s, for T = 18.8 us
24
25 // SOF defined as
26 // 1) Unmodulated time of 56.64us
27 // 2) 24 pulses of 423.75khz
28 // 3) logic '1' (unmodulated for 18.88us followed by 8 pulses of 423.75khz)
29
30 static const int Iso15693FrameSOF[] = {
31 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
32 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
33 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
34 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
35 -1, -1, -1, -1,
36 -1, -1, -1, -1,
37 1, 1, 1, 1,
38 1, 1, 1, 1
39 };
40 static const int Iso15693Logic0[] = {
41 1, 1, 1, 1,
42 1, 1, 1, 1,
43 -1, -1, -1, -1,
44 -1, -1, -1, -1
45 };
46 static const int Iso15693Logic1[] = {
47 -1, -1, -1, -1,
48 -1, -1, -1, -1,
49 1, 1, 1, 1,
50 1, 1, 1, 1
51 };
52
53 // EOF defined as
54 // 1) logic '0' (8 pulses of 423.75khz followed by unmodulated for 18.88us)
55 // 2) 24 pulses of 423.75khz
56 // 3) Unmodulated time of 56.64us
57
58 static const int Iso15693FrameEOF[] = {
59 1, 1, 1, 1,
60 1, 1, 1, 1,
61 -1, -1, -1, -1,
62 -1, -1, -1, -1,
63 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
64 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
65 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
66 -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
67 };
68
69
70#endif
Impressum, Datenschutz