update release info
[RRG-proxmark3.git] / armsrc / lfops.h
blobc3f00b4af7bbaa792de2bf16b4c943054dfbda98
1 //-----------------------------------------------------------------------------
2 // Copyright (C) Jonathan Westhues, 2005
3 // Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
4 //
5 // This program is free software: you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation, either version 3 of the License, or
8 // (at your option) any later version.
9 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // See LICENSE.txt for the text of the license.
16 //-----------------------------------------------------------------------------
17 #ifndef __LFOPS_H
18 #define __LFOPS_H
20 #include "common.h"
22 #include "pm3_cmd.h" // struct
24 void ModThenAcquireRawAdcSamples125k(uint32_t delay_off, uint16_t period_0, uint16_t period_1,
25 const uint8_t *symbol_extra, uint16_t *period_extra, uint8_t *command, bool verbose,
26 bool keep_field_on, uint32_t samples, bool ledcontrol);
28 void ReadTItag(bool ledcontrol);
29 void WriteTItag(uint32_t idhi, uint32_t idlo, uint16_t crc, bool ledcontrol);
31 void AcquireTiType(bool ledcontrol);
32 void AcquireRawBitsTI(void);
33 void SimulateTagLowFrequencyEx(int period, int gap, bool ledcontrol, int numcycles);
34 void SimulateTagLowFrequency(int period, int gap, bool ledcontrol);
35 void SimulateTagLowFrequencyBidir(int divisor, int max_bitlen);
37 void CmdHIDsimTAGEx(uint32_t hi2, uint32_t hi, uint32_t lo, uint8_t longFMT, bool ledcontrol, int numcycles);
38 void CmdHIDsimTAG(uint32_t hi2, uint32_t hi, uint32_t lo, uint8_t longFMT, bool ledcontrol);
40 void CmdFSKsimTAGEx(uint8_t fchigh, uint8_t fclow, uint8_t separator, uint8_t clk, uint16_t bitslen,
41 const uint8_t *bits, bool ledcontrol, int numcycles);
42 void CmdFSKsimTAG(uint8_t fchigh, uint8_t fclow, uint8_t separator, uint8_t clk, uint16_t bitslen,
43 const uint8_t *bits, bool ledcontrol);
44 void CmdASKsimTAG(uint8_t encoding, uint8_t invert, uint8_t separator, uint8_t clk, uint16_t size,
45 const uint8_t *bits, bool ledcontrol);
46 void CmdPSKsimTAG(uint8_t carrier, uint8_t invert, uint8_t clk, uint16_t size,
47 const uint8_t *bits, bool ledcontrol);
48 void CmdNRZsimTAG(uint8_t invert, uint8_t separator, uint8_t clk, uint16_t size,
49 const uint8_t *bits, bool ledcontrol);
51 int lf_hid_watch(int findone, uint32_t *high, uint32_t *low, bool ledcontrol);
52 int lf_awid_watch(int findone, uint32_t *high, uint32_t *low, bool ledcontrol); // Realtime demodulation mode for AWID26
53 int lf_em410x_watch(int findone, uint32_t *high, uint64_t *low, bool ledcontrol);
54 int lf_io_watch(int findone, uint32_t *high, uint32_t *low, bool ledcontrol);
56 void CopyHIDtoT55x7(uint32_t hi2, uint32_t hi, uint32_t lo, uint8_t longFMT, bool q5, bool em, bool ledcontrol); // Clone an HID card to T5557/T5567
57 void CopyVikingtoT55xx(const uint8_t *blocks, bool q5, bool em, bool ledcontrol);
59 int copy_em410x_to_t55xx(uint8_t card, uint8_t clock, uint32_t id_hi, uint32_t id_lo, bool add_electra, bool ledcontrol);
61 void T55xxResetRead(uint8_t flags, bool ledcontrol);
62 //id T55xxWriteBlock(uint32_t data, uint8_t blockno, uint32_t pwd, uint8_t flags, bool ledcontrol);
63 void T55xxWriteBlock(uint8_t *data, bool ledcontrol);
64 // void T55xxWriteBlockExt(uint32_t data, uint8_t blockno, uint32_t pwd, uint8_t flags);
65 void T55xxReadBlock(uint8_t page, bool pwd_mode, bool brute_mem, uint8_t block, uint32_t pwd,
66 uint8_t downlink_mode, bool ledcontrol);
67 void T55xxWakeUp(uint32_t pwd, uint8_t flags, bool ledcontrol);
68 void T55xx_ChkPwds(uint8_t flags, bool ledcontrol);
69 void T55xxDangerousRawTest(const uint8_t *data, bool ledcontrol);
71 void turn_read_lf_on(uint32_t delay);
72 void turn_read_lf_off(uint32_t delay);
74 void EM4xLogin(uint32_t pwd, bool ledcontrol);
75 void EM4xBruteforce(uint32_t start_pwd, uint32_t n, bool ledcontrol);
76 void EM4xReadWord(uint8_t addr, uint32_t pwd, uint8_t usepwd, bool ledcontrol);
77 void EM4xWriteWord(uint8_t addr, uint32_t data, uint32_t pwd, uint8_t usepwd, bool ledcontrol);
78 void EM4xProtectWord(uint32_t data, uint32_t pwd, uint8_t usepwd, bool ledcontrol);
80 void Cotag(uint32_t arg0, bool ledcontrol);
81 void setT55xxConfig(uint8_t arg0, const t55xx_configurations_t *c);
82 t55xx_configurations_t *getT55xxConfig(void);
83 void printT55xxConfig(void);
84 void loadT55xxConfig(void);
86 #endif