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