]> git.zerfleddert.de Git - proxmark3-svn/blame - armsrc/lfsampling.h
FIX: lf hitag : Mea culpa, simulation should not have reader_field on. thanks to...
[proxmark3-svn] / armsrc / lfsampling.h
CommitLineData
53d5dc64 1#ifndef __LFSAMPLING_H
2#define __LFSAMPLING_H
31abe49f 3
24c49d36 4#include "proxmark3.h"
5#include "apps.h"
6#include "util.h"
7#include "string.h"
8#include "usb_cdc.h" // for usb_poll_validate_length
9#include "ticks.h" // for StartTicks
10
53d5dc64 11typedef struct BitstreamOut BitstreamOut;
12
ac2df346 13/**
5f5b83b7 14* acquisition of Cotag LF signal. Similar to other LF, since the Cotag has such long datarate RF/384
15* and is Manchester?, we directly gather the manchester data into bigbuff
16**/
17void doCotagAcquisition(size_t sample_size);
18uint32_t doCotagAcquisitionManchester(void);
19
20/**
21* acquisition of T55x7 LF signal. Similar to other LF, but adjusted with @marshmellows thresholds
ac2df346 22* the data is collected in BigBuf.
23**/
94422fa2 24void doT55x7Acquisition(size_t sample_size);
ac2df346 25
31abe49f
MHS
26/**
27* Initializes the FPGA for reader-mode (field on), and acquires the samples.
28* @return number of bits sampled
29**/
1fbf8956 30uint32_t SampleLF(bool silent);
31abe49f
MHS
31
32/**
33* Initializes the FPGA for snoop-mode (field off), and acquires the samples.
34* @return number of bits sampled
35**/
36
37uint32_t SnoopLF();
38
17556415 39// adds sample size to default options
40uint32_t DoPartialAcquisition(int trigger_threshold, bool silent, int sample_size);
41
31abe49f
MHS
42/**
43 * @brief Does sample acquisition, ignoring the config values set in the sample_config.
44 * This method is typically used by tag-specific readers who just wants to read the samples
45 * the normal way
46 * @param trigger_threshold
47 * @param silent
48 * @return number of bits sampled
49 */
50uint32_t DoAcquisition_default(int trigger_threshold, bool silent);
51/**
52 * @brief Does sample acquisition, using the config values set in the sample_config.
53 * @param trigger_threshold
54 * @param silent
55 * @return number of bits sampled
56 */
57
58uint32_t DoAcquisition_config( bool silent);
59
60/**
61* Setup the FPGA to listen for samples. This method downloads the FPGA bitstream
62* if not already loaded, sets divisor and starts up the antenna.
63* @param divisor : 1, 88> 255 or negative ==> 134.8 KHz
64* 0 or 95 ==> 125 KHz
65*
66**/
67void LFSetupFPGAForADC(int divisor, bool lf_field);
68
31abe49f
MHS
69/**
70 * Called from the USB-handler to set the sampling configuration
71 * The sampling config is used for std reading and snooping.
72 *
73 * Other functions may read samples and ignore the sampling config,
74 * such as functions to read the UID from a prox tag or similar.
75 *
76 * Values set to '0' implies no change (except for averaging)
77 * @brief setSamplingConfig
78 * @param sc
79 */
80void setSamplingConfig(sample_config *sc);
81
82sample_config * getSamplingConfig();
7838f4be 83
84void printConfig();
85
86
53d5dc64 87#endif // __LFSAMPLING_H
Impressum, Datenschutz