fix compile issue with gcc 9.1.0 (issue #868)
[proxmark3-svn] / armsrc / lfsampling.h
CommitLineData
70dbfc3f 1#ifndef LFSAMPLING_H__
2#define LFSAMPLING_H__
31abe49f 3
e04475c4 4/**
5* acquisition of Cotag LF signal. Similar to other LF, since the Cotag has such long datarate RF/384
6* and is Manchester?, we directly gather the manchester data into bigbuff
7**/
8void doCotagAcquisition(size_t sample_size);
9uint32_t doCotagAcquisitionManchester(void);
10
31abe49f
MHS
11/**
12* Initializes the FPGA for reader-mode (field on), and acquires the samples.
13* @return number of bits sampled
14**/
b9957414 15uint32_t SampleLF(bool silent, int sample_size);
31abe49f
MHS
16
17/**
18* Initializes the FPGA for snoop-mode (field off), and acquires the samples.
19* @return number of bits sampled
20**/
31abe49f
MHS
21uint32_t SnoopLF();
22
a37228c8 23// adds sample size to default options
217cfb6b 24uint32_t DoPartialAcquisition(int trigger_threshold, bool silent, int sample_size, int cancel_after);
a37228c8 25
31abe49f
MHS
26/**
27 * @brief Does sample acquisition, ignoring the config values set in the sample_config.
28 * This method is typically used by tag-specific readers who just wants to read the samples
29 * the normal way
30 * @param trigger_threshold
31 * @param silent
32 * @return number of bits sampled
33 */
34uint32_t DoAcquisition_default(int trigger_threshold, bool silent);
35/**
36 * @brief Does sample acquisition, using the config values set in the sample_config.
37 * @param trigger_threshold
38 * @param silent
39 * @return number of bits sampled
40 */
41
b9957414 42uint32_t DoAcquisition_config(bool silent, int sample_size);
31abe49f
MHS
43
44/**
45* Setup the FPGA to listen for samples. This method downloads the FPGA bitstream
46* if not already loaded, sets divisor and starts up the antenna.
47* @param divisor : 1, 88> 255 or negative ==> 134.8 KHz
70dbfc3f 48* 0 or 95 ==> 125 KHz
31abe49f
MHS
49*
50**/
51void LFSetupFPGAForADC(int divisor, bool lf_field);
52
31abe49f
MHS
53/**
54 * Called from the USB-handler to set the sampling configuration
55 * The sampling config is used for std reading and snooping.
56 *
57 * Other functions may read samples and ignore the sampling config,
58 * such as functions to read the UID from a prox tag or similar.
59 *
60 * Values set to '0' implies no change (except for averaging)
61 * @brief setSamplingConfig
62 * @param sc
63 */
70dbfc3f 64void setSamplingConfig(uint8_t *config_data);
31abe49f 65
70dbfc3f 66sample_config *getSamplingConfig();
e2012d1b
MHS
67
68void printConfig();
69
70
31abe49f 71#endif // LFSAMPLING_H
Impressum, Datenschutz