]> cvs.zerfleddert.de Git - proxmark3-svn/blame_incremental - armsrc/apps.h
Remove LEGIC RF tag emulation code since it's useless without keystream generator
[proxmark3-svn] / armsrc / apps.h
... / ...
CommitLineData
1//-----------------------------------------------------------------------------\r
2// Definitions internal to the app source.\r
3// Jonathan Westhues, Aug 2005\r
4// Added ISO14443-A support by Gerhard de Koning Gans, April 2008\r
5//-----------------------------------------------------------------------------\r
6\r
7#ifndef __APPS_H\r
8#define __APPS_H\r
9\r
10// The large multi-purpose buffer, typically used to hold A/D samples,\r
11// maybe processed in some way.\r
12DWORD BigBuf[12000];\r
13\r
14/// appmain.h\r
15void ReadMem(int addr);\r
16void __attribute__((noreturn)) AppMain(void);\r
17void SamyRun(void);\r
18void DbpIntegers(int a, int b, int c);\r
19void DbpString(char *str);\r
20void ToSendStuffBit(int b);\r
21void ToSendReset(void);\r
22void ListenReaderField(int limit);\r
23void AcquireRawAdcSamples125k(BOOL at134khz);\r
24void DoAcquisition125k(BOOL at134khz);\r
25extern int ToSendMax;\r
26extern BYTE ToSend[];\r
27extern DWORD BigBuf[];\r
28\r
29/// fpga.h\r
30void FpgaSendCommand(WORD cmd, WORD v);\r
31void FpgaWriteConfWord(BYTE v);\r
32void FpgaDownloadAndGo(void);\r
33void FpgaGatherVersion(char *dst, int len);\r
34void FpgaSetupSsc(void);\r
35void SetupSpi(int mode);\r
36void FpgaSetupSscDma(BYTE *buf, int len);\r
37void SetAdcMuxFor(DWORD whichGpio);\r
38\r
39// Definitions for the FPGA commands.\r
40#define FPGA_CMD_SET_CONFREG (1<<12)\r
41#define FPGA_CMD_SET_DIVISOR (2<<12)\r
42// Definitions for the FPGA configuration word.\r
43#define FPGA_MAJOR_MODE_LF_READER (0<<5)\r
44#define FPGA_MAJOR_MODE_LF_SIMULATOR (1<<5)\r
45#define FPGA_MAJOR_MODE_HF_READER_TX (2<<5)\r
46#define FPGA_MAJOR_MODE_HF_READER_RX_XCORR (3<<5)\r
47#define FPGA_MAJOR_MODE_HF_SIMULATOR (4<<5)\r
48#define FPGA_MAJOR_MODE_HF_ISO14443A (5<<5)\r
49#define FPGA_MAJOR_MODE_LF_PASSTHRU (6<<5)\r
50#define FPGA_MAJOR_MODE_OFF (7<<5)\r
51// Options for the HF reader, tx to tag\r
52#define FPGA_HF_READER_TX_SHALLOW_MOD (1<<0)\r
53// Options for the HF reader, correlating against rx from tag\r
54#define FPGA_HF_READER_RX_XCORR_848_KHZ (1<<0)\r
55#define FPGA_HF_READER_RX_XCORR_SNOOP (1<<1)\r
56#define FPGA_HF_READER_RX_XCORR_QUARTER_FREQ (1<<2)\r
57// Options for the HF simulated tag, how to modulate\r
58#define FPGA_HF_SIMULATOR_NO_MODULATION (0<<0)\r
59#define FPGA_HF_SIMULATOR_MODULATE_BPSK (1<<0)\r
60#define FPGA_HF_SIMULATOR_MODULATE_212K (2<<0)\r
61// Options for ISO14443A\r
62#define FPGA_HF_ISO14443A_SNIFFER (0<<0)\r
63#define FPGA_HF_ISO14443A_TAGSIM_LISTEN (1<<0)\r
64#define FPGA_HF_ISO14443A_TAGSIM_MOD (2<<0)\r
65#define FPGA_HF_ISO14443A_READER_LISTEN (3<<0)\r
66#define FPGA_HF_ISO14443A_READER_MOD (4<<0)\r
67\r
68/// lfops.h\r
69void AcquireRawAdcSamples125k(BOOL at134khz);\r
70void DoAcquisition125k(BOOL at134khz);\r
71void ModThenAcquireRawAdcSamples125k(int delay_off,int period_0,int period_1,BYTE *command);\r
72void ReadTItag();\r
73void WriteTItag(DWORD idhi, DWORD idlo, WORD crc);\r
74void AcquireTiType(void);\r
75void AcquireRawBitsTI(void);\r
76void SimulateTagLowFrequency(int period, int ledcontrol);\r
77void CmdHIDsimTAG(int hi, int lo, int ledcontrol);\r
78void CmdHIDdemodFSK(int findone, int *high, int *low, int ledcontrol);\r
79void SimulateTagLowFrequencyBidir(int divisor, int max_bitlen);\r
80\r
81/// iso14443.h\r
82void SimulateIso14443Tag(void);\r
83void AcquireRawAdcSamplesIso14443(DWORD parameter);\r
84void ReadSRI512Iso14443(DWORD parameter);\r
85void ReadSRIX4KIso14443(DWORD parameter);
86void ReadSTMemoryIso14443(DWORD parameter,DWORD dwLast);
87void SnoopIso14443(void);\r
88\r
89/// iso14443a.h\r
90void SnoopIso14443a(void);\r
91void SimulateIso14443aTag(int tagType, int TagUid); // ## simulate iso14443a tag\r
92void ReaderIso14443a(DWORD parameter);\r
93\r
94/// iso15693.h\r
95void AcquireRawAdcSamplesIso15693(void);\r
96void ReaderIso15693(DWORD parameter); // Simulate an ISO15693 reader - greg\r
97void SimTagIso15693(DWORD parameter); // simulate an ISO15693 tag - greg\r
98\r
99/// util.h\r
100#define LED_RED 1\r
101#define LED_ORANGE 2\r
102#define LED_GREEN 4\r
103#define LED_RED2 8\r
104#define BUTTON_HOLD 1\r
105#define BUTTON_NO_CLICK 0\r
106#define BUTTON_SINGLE_CLICK -1\r
107#define BUTTON_DOUBLE_CLICK -2\r
108#define BUTTON_ERROR -99\r
109int strlen(char *str);\r
110void *memcpy(void *dest, const void *src, int len);\r
111void *memset(void *dest, int c, int len);\r
112int memcmp(const void *av, const void *bv, int len);\r
113char *strncat(char *dest, const char *src, unsigned int n);\r
114void SpinDelay(int ms);\r
115void SpinDelayUs(int us);\r
116void LED(int led, int ms);\r
117void LEDsoff();\r
118int BUTTON_CLICKED(int ms);\r
119int BUTTON_HELD(int ms);\r
120void FormatVersionInformation(char *dst, int len, const char *prefix, void *version_information);\r
121\r
122#endif\r
Impressum, Datenschutz