]>
Commit | Line | Data |
---|---|---|
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 | |
13 | typedef struct {\r | |
14 | uint32_t bl1;\r | |
15 | uint32_t bl2; \r | |
16 | uint32_t acl; \r | |
17 | uint32_t mfc; \r | |
18 | uint32_t cid; \r | |
19 | uint32_t year; \r | |
20 | uint32_t quarter; \r | |
21 | uint32_t icr;\r | |
22 | uint32_t lotid; \r | |
23 | uint32_t wafer; \r | |
24 | uint32_t dw;\r | |
25 | } t55x7_tracedata_t;\r | |
26 | \r | |
27 | typedef struct {\r | |
28 | uint32_t bl1;\r | |
29 | uint32_t bl2;\r | |
30 | uint32_t icr;\r | |
31 | char lotidc;\r | |
32 | uint32_t lotid;\r | |
33 | uint32_t wafer;\r | |
34 | uint32_t dw;\r | |
35 | } t5555_tracedata_t;\r | |
36 | \r | |
37 | typedef struct {\r | |
38 | enum {\r | |
39 | DEMOD_NRZ = 0x00, \r | |
40 | DEMOD_PSK1 = 0x01,\r | |
41 | DEMOD_PSK2 = 0x02,\r | |
42 | DEMOD_PSK3 = 0x03,\r | |
43 | DEMOD_FSK1 = 0x04, \r | |
44 | DEMOD_FSK1a = 0x05, \r | |
45 | DEMOD_FSK2 = 0x06, \r | |
46 | DEMOD_FSK2a = 0x07, \r | |
47 | DEMOD_FSK = 0xF0, //generic FSK (auto detect FCs) \r | |
48 | DEMOD_ASK = 0x08,\r | |
49 | DEMOD_BI = 0x10,\r | |
50 | DEMOD_BIa = 0x18, \r | |
51 | } modulation;\r | |
52 | bool inverted;\r | |
53 | uint8_t offset;\r | |
54 | uint32_t block0;\r | |
55 | enum {\r | |
56 | RF_8 = 0x00,\r | |
57 | RF_16 = 0x01,\r | |
58 | RF_32 = 0x02,\r | |
59 | RF_40 = 0x03,\r | |
60 | RF_50 = 0x04,\r | |
61 | RF_64 = 0x05,\r | |
62 | RF_100 = 0x06,\r | |
63 | RF_128 = 0x07,\r | |
64 | } bitrate;\r | |
65 | bool Q5;\r | |
66 | bool ST;\r | |
67 | } t55xx_conf_block_t;\r | |
68 | t55xx_conf_block_t Get_t55xx_Config();\r | |
69 | void Set_t55xx_Config(t55xx_conf_block_t conf);\r | |
70 | \r | |
71 | \r | |
72 | int CmdLFT55XX(const char *Cmd);\r | |
73 | int CmdT55xxBruteForce(const char *Cmd);\r | |
74 | int CmdT55xxSetConfig(const char *Cmd);\r | |
75 | int CmdT55xxReadBlock(const char *Cmd);\r | |
76 | int CmdT55xxWriteBlock(const char *Cmd);\r | |
77 | int CmdT55xxReadTrace(const char *Cmd);\r | |
78 | int CmdT55xxInfo(const char *Cmd);\r | |
79 | int CmdT55xxDetect(const char *Cmd);\r | |
80 | int CmdResetRead(const char *Cmd);\r | |
81 | int CmdT55xxWipe(const char *Cmd);\r | |
82 | \r | |
83 | char * GetBitRateStr(uint32_t id);\r | |
84 | char * GetSaferStr(uint32_t id);\r | |
85 | char * GetModulationStr( uint32_t id);\r | |
86 | char * GetModelStrFromCID(uint32_t cid);\r | |
87 | char * GetSelectedModulationStr( uint8_t id);\r | |
88 | uint32_t PackBits(uint8_t start, uint8_t len, uint8_t *bitstream);\r | |
89 | void printT5xxHeader(uint8_t page);\r | |
90 | void printT55xxBlock(const char *demodStr);\r | |
91 | int printConfiguration( t55xx_conf_block_t b);\r | |
92 | \r | |
93 | bool DecodeT55xxBlock();\r | |
94 | bool tryDetectModulation();\r | |
95 | bool test(uint8_t mode, uint8_t *offset, int *fndBitRate, uint8_t clk, bool *Q5);\r | |
96 | int special(const char *Cmd);\r | |
97 | int AquireData( uint8_t page, uint8_t block, bool pwdmode, uint32_t password );\r | |
98 | \r | |
99 | void printT55x7Trace( t55x7_tracedata_t data, uint8_t repeat );\r | |
100 | void printT5555Trace( t5555_tracedata_t data, uint8_t repeat );\r | |
101 | \r | |
102 | #endif\r |