]>
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 | enum {\r | |
15 | DEMOD_NRZ = 0x00, \r | |
16 | DEMOD_PSK1 = 0x01,\r | |
17 | DEMOD_PSK2 = 0x02,\r | |
18 | DEMOD_PSK3 = 0x03,\r | |
19 | DEMOD_FSK1 = 0x04, \r | |
20 | DEMOD_FSK1a = 0x05, \r | |
21 | DEMOD_FSK2 = 0x06, \r | |
22 | DEMOD_FSK2a = 0x07, \r | |
23 | DEMOD_FSK = 0xF0, //generic FSK (auto detect FCs) \r | |
24 | DEMOD_ASK = 0x08,\r | |
25 | DEMOD_BI = 0x10,\r | |
26 | DEMOD_BIa = 0x18, \r | |
27 | } modulation;\r | |
28 | bool inverted;\r | |
29 | uint8_t offset;\r | |
30 | uint32_t block0;\r | |
31 | enum {\r | |
32 | RF_8 = 0x00,\r | |
33 | RF_16 = 0x01,\r | |
34 | RF_32 = 0x02,\r | |
35 | RF_40 = 0x03,\r | |
36 | RF_50 = 0x04,\r | |
37 | RF_64 = 0x05,\r | |
38 | RF_100 = 0x06,\r | |
39 | RF_128 = 0x07,\r | |
40 | } bitrate;\r | |
41 | bool Q5;\r | |
42 | } t55xx_conf_block_t;\r | |
43 | t55xx_conf_block_t Get_t55xx_Config();\r | |
44 | void Set_t55xx_Config(t55xx_conf_block_t conf);\r | |
45 | \r | |
46 | \r | |
47 | int CmdLFT55XX(const char *Cmd);\r | |
48 | int CmdT55xxSetConfig(const char *Cmd);\r | |
49 | int CmdT55xxReadBlock(const char *Cmd);\r | |
50 | int CmdT55xxWriteBlock(const char *Cmd);\r | |
51 | int CmdT55xxReadTrace(const char *Cmd);\r | |
52 | int CmdT55xxInfo(const char *Cmd);\r | |
53 | int CmdT55xxDetect(const char *Cmd);\r | |
54 | int CmdResetRead(const char *Cmd);\r | |
55 | int CmdT55xxWipe(const char *Cmd);\r | |
56 | \r | |
57 | char * GetBitRateStr(uint32_t id);\r | |
58 | char * GetSaferStr(uint32_t id);\r | |
59 | char * GetModulationStr( uint32_t id);\r | |
60 | char * GetModelStrFromCID(uint32_t cid);\r | |
61 | char * GetSelectedModulationStr( uint8_t id);\r | |
62 | uint32_t PackBits(uint8_t start, uint8_t len, uint8_t *bitstream);\r | |
63 | void printT55xxBlock(const char *demodStr);\r | |
64 | int printConfiguration( t55xx_conf_block_t b);\r | |
65 | \r | |
66 | bool DecodeT55xxBlock();\r | |
67 | bool tryDetectModulation();\r | |
68 | bool test(uint8_t mode, uint8_t *offset, int *fndBitRate, uint8_t clk, bool *Q5);\r | |
69 | int special(const char *Cmd);\r | |
70 | int AquireData( uint8_t page, uint8_t block, bool pwdmode, uint32_t password );\r | |
71 | \r | |
72 | #endif\r |