]> git.zerfleddert.de Git - proxmark3-svn/blob - armsrc/lfsampling.h
6c671ec8ca7a295b49a2d9200401a3ca69d49753
[proxmark3-svn] / armsrc / lfsampling.h
1 #ifndef LFSAMPLING_H
2 #define LFSAMPLING_H
3
4 /**
5 * Initializes the FPGA for reader-mode (field on), and acquires the samples.
6 * @return number of bits sampled
7 **/
8 uint32_t SampleLF(bool silent);
9
10 /**
11 * Initializes the FPGA for snoop-mode (field off), and acquires the samples.
12 * @return number of bits sampled
13 **/
14
15 uint32_t SnoopLF();
16
17 /**
18 * @brief Does sample acquisition, ignoring the config values set in the sample_config.
19 * This method is typically used by tag-specific readers who just wants to read the samples
20 * the normal way
21 * @param trigger_threshold
22 * @param silent
23 * @return number of bits sampled
24 */
25 uint32_t DoAcquisition_default(int trigger_threshold, bool silent);
26 /**
27 * @brief Does sample acquisition, using the config values set in the sample_config.
28 * @param trigger_threshold
29 * @param silent
30 * @return number of bits sampled
31 */
32
33 uint32_t DoAcquisition_config( bool silent);
34
35 /**
36 * Setup the FPGA to listen for samples. This method downloads the FPGA bitstream
37 * if not already loaded, sets divisor and starts up the antenna.
38 * @param divisor : 1, 88> 255 or negative ==> 134.8 KHz
39 * 0 or 95 ==> 125 KHz
40 *
41 **/
42 void LFSetupFPGAForADC(int divisor, bool lf_field);
43
44
45 /**
46 * Called from the USB-handler to set the sampling configuration
47 * The sampling config is used for std reading and snooping.
48 *
49 * Other functions may read samples and ignore the sampling config,
50 * such as functions to read the UID from a prox tag or similar.
51 *
52 * Values set to '0' implies no change (except for averaging)
53 * @brief setSamplingConfig
54 * @param sc
55 */
56 void setSamplingConfig(sample_config *sc);
57
58 sample_config * getSamplingConfig();
59 #endif // LFSAMPLING_H
Impressum, Datenschutz