reworked "lf em 4x50 chk" to use dynamic memory for dictionary
[RRG-proxmark3.git] / armsrc / lfops.h
blob82db382d840bc8933b94e9f8580ec8d40d39e67b
1 //-----------------------------------------------------------------------------
2 // Jonathan Westhues, Aug 2005
3 // Gerhard de Koning Gans, April 2008, May 2011
4 //
5 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
6 // at your option, any later version. See the LICENSE.txt file for the text of
7 // the license.
8 //-----------------------------------------------------------------------------
9 // Definitions internal to the app source.
10 //-----------------------------------------------------------------------------
11 #ifndef __LFOPS_H
12 #define __LFOPS_H
14 #include "common.h"
16 #include "pm3_cmd.h" // struct
18 void ModThenAcquireRawAdcSamples125k(uint32_t delay_off, uint16_t period_0, uint16_t period_1, uint8_t *symbol_extra, uint16_t *period_extra, uint8_t *command, bool verbose, uint32_t samples);
19 void ReadTItag(void);
20 void WriteTItag(uint32_t idhi, uint32_t idlo, uint16_t crc);
22 void AcquireTiType(void);
23 void AcquireRawBitsTI(void);
24 void SimulateTagLowFrequencyEx(int period, int gap, bool ledcontrol, int numcycles);
25 void SimulateTagLowFrequency(int period, int gap, bool ledcontrol);
26 void SimulateTagLowFrequencyBidir(int divisor, int max_bitlen);
28 void CmdHIDsimTAGEx(uint32_t hi2, uint32_t hi, uint32_t lo, uint8_t longFMT, bool ledcontrol, int numcycles);
29 void CmdHIDsimTAG(uint32_t hi2, uint32_t hi, uint32_t lo, uint8_t longFMT, bool ledcontrol);
31 void CmdFSKsimTAGEx(uint8_t fchigh, uint8_t fclow, uint8_t separator, uint8_t clk, uint16_t bitslen, uint8_t *bits, bool ledcontrol, int numcycles);
32 void CmdFSKsimTAG(uint8_t fchigh, uint8_t fclow, uint8_t separator, uint8_t clk, uint16_t bitslen, uint8_t *bits, bool ledcontrol);
33 void CmdASKsimTAG(uint8_t encoding, uint8_t invert, uint8_t separator, uint8_t clk, uint16_t size, uint8_t *bits, bool ledcontrol);
34 void CmdPSKsimTAG(uint8_t carrier, uint8_t invert, uint8_t clk, uint16_t size, uint8_t *bits, bool ledcontrol);
35 void CmdNRZsimTAG(uint8_t invert, uint8_t separator, uint8_t clk, uint16_t size, uint8_t *bits, bool ledcontrol);
37 int lf_hid_watch(int findone, uint32_t *high, uint32_t *low);
38 int lf_awid_watch(int findone, uint32_t *high, uint32_t *low); // Realtime demodulation mode for AWID26
39 int lf_em410x_watch(int findone, uint32_t *high, uint64_t *low);
40 int lf_io_watch(int findone, uint32_t *high, uint32_t *low);
42 void CopyHIDtoT55x7(uint32_t hi2, uint32_t hi, uint32_t lo, uint8_t longFMT, bool q5, bool em); // Clone an HID card to T5557/T5567
43 void CopyVikingtoT55xx(uint8_t *blocks, bool q5, bool em);
45 int copy_em410x_to_t55xx(uint8_t card, uint8_t clock, uint32_t id_hi, uint32_t id_lo);
47 void T55xxResetRead(uint8_t flags);
48 //id T55xxWriteBlock(uint32_t data, uint8_t blockno, uint32_t pwd, uint8_t flags);
49 void T55xxWriteBlock(uint8_t *data);
50 // void T55xxWriteBlockExt(uint32_t data, uint8_t blockno, uint32_t pwd, uint8_t flags);
51 void T55xxReadBlock(uint8_t page, bool pwd_mode, bool brute_mem, uint8_t block, uint32_t pwd, uint8_t downlink_mode);
52 void T55xxWakeUp(uint32_t pwd, uint8_t flags);
53 void T55xx_ChkPwds(uint8_t flags);
54 void T55xxDangerousRawTest(uint8_t *data);
56 void TurnReadLFOn(uint32_t delay);
58 void EM4xLogin(uint32_t pwd);
59 void EM4xBruteforce(uint32_t start_pwd, uint32_t n);
60 void EM4xReadWord(uint8_t addr, uint32_t pwd, uint8_t usepwd);
61 void EM4xWriteWord(uint8_t addr, uint32_t data, uint32_t pwd, uint8_t usepwd);
62 void EM4xProtectWord(uint32_t data, uint32_t pwd, uint8_t usepwd);
64 void Cotag(uint32_t arg0);
65 void setT55xxConfig(uint8_t arg0, t55xx_configurations_t *c);
66 t55xx_configurations_t *getT55xxConfig(void);
67 void printT55xxConfig(void);
68 void loadT55xxConfig(void);
70 #endif