]> git.zerfleddert.de Git - proxmark3-svn/blob - armsrc/apps.h
e09c8357d0c296c6919693fb256f928e1a3420cb
[proxmark3-svn] / armsrc / apps.h
1 //-----------------------------------------------------------------------------
2 // Definitions internal to the app source.
3 // Jonathan Westhues, Aug 2005
4 // Added ISO14443-A support by Gerhard de Koning Gans, April 2008
5 //-----------------------------------------------------------------------------
6
7 #ifndef __APPS_H
8 #define __APPS_H
9
10 /// appmain.c
11 void AppMain(void);
12 void DbpIntegers(int a, int b, int c);
13 void DbpString(char *str);
14 void SpinDelay(int ms);
15 void ToSendStuffBit(int b);
16 void ToSendReset(void);
17 extern int ToSendMax;
18 extern BYTE ToSend[];
19 extern DWORD BigBuf[];
20
21 /// fpga.c
22 void FpgaWriteConfWord(BYTE v);
23 void FpgaDownloadAndGo(void);
24 void FpgaSetupSsc(void);
25 void SetupSpi(int mode);
26 void FpgaSetupSscDma(BYTE *buf, int len);
27 void SetAdcMuxFor(int whichGpio);
28
29 // Definitions for the FPGA configuration word.
30 #define FPGA_MAJOR_MODE_LF_READER (0<<5)
31 #define FPGA_MAJOR_MODE_LF_SIMULATOR (1<<5)
32 #define FPGA_MAJOR_MODE_HF_READER_TX (2<<5)
33 #define FPGA_MAJOR_MODE_HF_READER_RX_XCORR (3<<5)
34 #define FPGA_MAJOR_MODE_HF_SIMULATOR (4<<5)
35 #define FPGA_MAJOR_MODE_HF_ISO14443A (5<<5)
36 #define FPGA_MAJOR_MODE_UNUSED (6<<5)
37 #define FPGA_MAJOR_MODE_OFF (7<<5)
38 // Options for the LF reader
39 #define FPGA_LF_READER_USE_125_KHZ (1<<3)
40 #define FPGA_LF_READER_USE_134_KHZ (0<<3)
41 // Options for the HF reader, tx to tag
42 #define FPGA_HF_READER_TX_SHALLOW_MOD (1<<0)
43 // Options for the HF reader, correlating against rx from tag
44 #define FPGA_HF_READER_RX_XCORR_848_KHZ (1<<0)
45 #define FPGA_HF_READER_RX_XCORR_SNOOP (1<<1)
46 // Options for the HF simulated tag, how to modulate
47 #define FPGA_HF_SIMULATOR_NO_MODULATION (0<<0)
48 #define FPGA_HF_SIMULATOR_MODULATE_BPSK (1<<0)
49 // Options for ISO14443A
50 #define FPGA_HF_ISO14443A_SNIFFER (0<<0)
51 #define FPGA_HF_ISO14443A_TAGSIM_LISTEN (1<<0)
52 #define FPGA_HF_ISO14443A_TAGSIM_MOD (2<<0)
53 #define FPGA_HF_ISO14443A_READER_LISTEN (3<<0)
54 #define FPGA_HF_ISO14443A_READER_MOD (4<<0)
55
56 /// iso14443.h
57 void SimulateIso14443Tag(void);
58 void AcquireRawAdcSamplesIso14443(DWORD parameter);
59 void SnoopIso14443(void);
60
61 /// iso14443a.h
62 void SnoopIso14443a(void);
63 void SimulateIso14443aTag(int tagType, int TagUid); // ## simulate iso14443a tag
64 void ReaderIso14443a(DWORD parameter);
65
66 /// iso15693.h
67 void AcquireRawAdcSamplesIso15693(void);
68 void ReaderIso15693(DWORD parameter); // Simulate an ISO15693 reader - greg
69 void SimTagIso15693(DWORD parameter); // simulate an ISO15693 tag - greg
70
71 /// util.h
72 int strlen(char *str);
73 void *memcpy(void *dest, const void *src, int len);
74 void *memset(void *dest, int c, int len);
75 int memcmp(const void *av, const void *bv, int len);
76
77 #endif
Impressum, Datenschutz