]>
cvs.zerfleddert.de Git - proxmark3-svn/blob - common/iso15693tools.h
96095fba51e13717a00ff359f050eb48441e657d
   2 // Adrian Dabrowski 2010 and others, GPLv2 
   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 
  12 uint16_t Iso15693Crc(uint8_t *v
, int n
); 
  13 int Iso15693AddCrc(uint8_t *req
, int n
); 
  14 char* Iso15693sprintUID(char *target
,uint8_t *uid
); 
  15 unsigned short iclass_crc16(char *data_p
, unsigned short length
); 
  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 //----------------------------------------------------------------------------- 
  23         // The sampling rate is 106.353 ksps/s, for T = 18.8 us 
  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) 
  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, 
  40         static const int Iso15693Logic0
[] = { 
  46         static const int Iso15693Logic1
[] = { 
  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 
  58         static const int Iso15693FrameEOF
[] = { 
  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