]> git.zerfleddert.de Git - proxmark3-svn/blame - client/cmdlft55xx.h
gcc10 compiler fixes:
[proxmark3-svn] / client / cmdlft55xx.h
CommitLineData
e98300f2 1//-----------------------------------------------------------------------------\r
2//\r
3// This code is licensed to you under the terms of the GNU GPL, version 2 or,\r
4// at your option, any later version. See the LICENSE.txt file for the text of\r
5// the license.\r
6//-----------------------------------------------------------------------------\r
7// Low frequency T55xx commands\r
8//-----------------------------------------------------------------------------\r
9\r
10#ifndef CMDLFT55XX_H__\r
11#define CMDLFT55XX_H__\r
12\r
ad939de5 13#include <stdint.h>\r
14#include <stdbool.h>\r
15\r
5490c2d6 16typedef struct {\r
17 uint32_t bl1;\r
18 uint32_t bl2; \r
19 uint32_t acl; \r
20 uint32_t mfc; \r
21 uint32_t cid; \r
22 uint32_t year; \r
23 uint32_t quarter; \r
24 uint32_t icr;\r
25 uint32_t lotid; \r
26 uint32_t wafer; \r
27 uint32_t dw;\r
28} t55x7_tracedata_t;\r
29\r
30typedef struct {\r
31 uint32_t bl1;\r
32 uint32_t bl2;\r
33 uint32_t icr;\r
34 char lotidc;\r
35 uint32_t lotid;\r
36 uint32_t wafer;\r
37 uint32_t dw;\r
38} t5555_tracedata_t;\r
39\r
13d77ef9 40typedef struct {\r
41 enum {\r
b97311b1 42 DEMOD_NRZ = 0x00,\r
13d77ef9 43 DEMOD_PSK1 = 0x01,\r
44 DEMOD_PSK2 = 0x02,\r
45 DEMOD_PSK3 = 0x03,\r
b97311b1 46 DEMOD_FSK1 = 0x04,\r
47 DEMOD_FSK1a = 0x05,\r
48 DEMOD_FSK2 = 0x06,\r
13d77ef9 49 DEMOD_FSK2a = 0x07, \r
50 DEMOD_FSK = 0xF0, //generic FSK (auto detect FCs) \r
51 DEMOD_ASK = 0x08,\r
52 DEMOD_BI = 0x10,\r
b97311b1 53 DEMOD_BIa = 0x18\r
13d77ef9 54 } modulation;\r
55 bool inverted;\r
56 uint8_t offset;\r
57 uint32_t block0;\r
58 enum {\r
59 RF_8 = 0x00,\r
60 RF_16 = 0x01,\r
61 RF_32 = 0x02,\r
62 RF_40 = 0x03,\r
63 RF_50 = 0x04,\r
64 RF_64 = 0x05,\r
65 RF_100 = 0x06,\r
b97311b1 66 RF_128 = 0x07\r
13d77ef9 67 } bitrate;\r
f6650679 68 bool Q5;\r
d1869c33 69 bool ST;\r
13d77ef9 70} t55xx_conf_block_t;\r
9f669cb2 71\r
b97311b1 72t55xx_conf_block_t Get_t55xx_Config(void);\r
73void Set_t55xx_Config(t55xx_conf_block_t conf);\r
13d77ef9 74\r
b97311b1 75extern int CmdLFT55XX(const char *Cmd);\r
76extern int CmdT55xxBruteForce(const char *Cmd);\r
77extern int CmdT55xxSetConfig(const char *Cmd);\r
78extern int CmdT55xxReadBlock(const char *Cmd);\r
79extern int CmdT55xxWriteBlock(const char *Cmd);\r
80extern int CmdT55xxReadTrace(const char *Cmd);\r
81extern int CmdT55xxInfo(const char *Cmd);\r
82extern int CmdT55xxDetect(const char *Cmd);\r
83extern int CmdResetRead(const char *Cmd);\r
84extern int CmdT55xxWipe(const char *Cmd);\r
13d77ef9 85\r
b97311b1 86char * GetBitRateStr(uint32_t id, bool xmode);\r
13d77ef9 87char * GetSaferStr(uint32_t id);\r
88char * GetModulationStr( uint32_t id);\r
89char * GetModelStrFromCID(uint32_t cid);\r
90char * GetSelectedModulationStr( uint8_t id);\r
9632ecbe 91uint32_t PackBits(uint8_t start, uint8_t len, uint8_t *bitstream);\r
5490c2d6 92void printT5xxHeader(uint8_t page);\r
13d77ef9 93void printT55xxBlock(const char *demodStr);\r
be2d41b7 94int printConfiguration( t55xx_conf_block_t b);\r
e98300f2 95\r
b97311b1 96bool DecodeT55xxBlock(void);\r
97bool tryDetectModulation(void);\r
98extern bool tryDetectP1(bool getData);\r
f6650679 99bool test(uint8_t mode, uint8_t *offset, int *fndBitRate, uint8_t clk, bool *Q5);\r
13d77ef9 100int special(const char *Cmd);\r
dd8e4513 101int AquireData( uint8_t page, uint8_t block, bool pwdmode, uint32_t password,uint8_t downlink_mode );\r
e98300f2 102\r
5490c2d6 103void printT55x7Trace( t55x7_tracedata_t data, uint8_t repeat );\r
104void printT5555Trace( t5555_tracedata_t data, uint8_t repeat );\r
105\r
e98300f2 106#endif\r
Impressum, Datenschutz