Loading...
Searching...
No Matches
t5577.h
1#pragma once
2#include <stdint.h>
3#include <stdbool.h>
4
5#ifdef __cplusplus
6extern "C" {
7#endif
8
9#define LFRFID_T5577_BLOCK_COUNT 8
10#define T5577_BLOCKS_IN_PAGE_0 8
11#define T5577_BLOCKS_IN_PAGE_1 4
12
13// T5577 block 0 definitions, thanks proxmark3!
14#define LFRFID_T5577_POR_DELAY 0x00000001
15#define LFRFID_T5577_ST_TERMINATOR 0x00000008
16#define LFRFID_T5577_PWD 0x00000010
17#define LFRFID_T5577_MAXBLOCK_SHIFT 5
18#define LFRFID_T5577_AOR 0x00000200
19#define LFRFID_T5577_PSKCF_RF_2 0
20#define LFRFID_T5577_PSKCF_RF_4 0x00000400
21#define LFRFID_T5577_PSKCF_RF_8 0x00000800
22#define LFRFID_T5577_MODULATION_DIRECT 0
23#define LFRFID_T5577_MODULATION_PSK1 0x00001000
24#define LFRFID_T5577_MODULATION_PSK2 0x00002000
25#define LFRFID_T5577_MODULATION_PSK3 0x00003000
26#define LFRFID_T5577_MODULATION_FSK1 0x00004000
27#define LFRFID_T5577_MODULATION_FSK2 0x00005000
28#define LFRFID_T5577_MODULATION_FSK1a 0x00006000
29#define LFRFID_T5577_MODULATION_FSK2a 0x00007000
30#define LFRFID_T5577_MODULATION_MANCHESTER 0x00008000
31#define LFRFID_T5577_MODULATION_BIPHASE 0x00010000
32#define LFRFID_T5577_MODULATION_DIPHASE 0x00018000
33#define LFRFID_T5577_X_MODE 0x00020000
34#define LFRFID_T5577_BITRATE_RF_8 0
35#define LFRFID_T5577_BITRATE_RF_16 0x00040000
36#define LFRFID_T5577_BITRATE_RF_32 0x00080000
37#define LFRFID_T5577_BITRATE_RF_40 0x000C0000
38#define LFRFID_T5577_BITRATE_RF_50 0x00100000
39#define LFRFID_T5577_BITRATE_RF_64 0x00140000
40#define LFRFID_T5577_BITRATE_RF_100 0x00180000
41#define LFRFID_T5577_BITRATE_RF_128 0x001C0000
42#define LFRFID_T5577_TESTMODE_DISABLED 0x60000000
43
44typedef struct {
45 uint32_t block[LFRFID_T5577_BLOCK_COUNT];
46 uint32_t blocks_to_write;
47 uint8_t mask;
49
55void t5577_write(LFRFIDT5577* data);
56
57void t5577_write_with_pass(LFRFIDT5577* data, uint32_t password);
58
59void t5577_write_with_mask(LFRFIDT5577* data, uint8_t page, bool with_pass, uint32_t password);
60
61#ifdef __cplusplus
62}
63#endif
Definition t5577.h:44