8 #include "usb_cdc.h" // for usb_poll_validate_length
9 #include "ticks.h" // for StartTicks
11 typedef struct BitstreamOut BitstreamOut
;
14 * acquisition of T55x7 LF signal. Similart to other LF, but adjusted with @marshmellows thresholds
15 * the data is collected in BigBuf.
17 void doT55x7Acquisition(size_t sample_size
);
20 * Initializes the FPGA for reader-mode (field on), and acquires the samples.
21 * @return number of bits sampled
23 uint32_t SampleLF(bool silent
);
26 * Initializes the FPGA for snoop-mode (field off), and acquires the samples.
27 * @return number of bits sampled
33 * @brief Does sample acquisition, ignoring the config values set in the sample_config.
34 * This method is typically used by tag-specific readers who just wants to read the samples
36 * @param trigger_threshold
38 * @return number of bits sampled
40 uint32_t DoAcquisition_default(int trigger_threshold
, bool silent
);
42 * @brief Does sample acquisition, using the config values set in the sample_config.
43 * @param trigger_threshold
45 * @return number of bits sampled
48 uint32_t DoAcquisition_config( bool silent
);
51 * Setup the FPGA to listen for samples. This method downloads the FPGA bitstream
52 * if not already loaded, sets divisor and starts up the antenna.
53 * @param divisor : 1, 88> 255 or negative ==> 134.8 KHz
57 void LFSetupFPGAForADC(int divisor
, bool lf_field
);
60 * Called from the USB-handler to set the sampling configuration
61 * The sampling config is used for std reading and snooping.
63 * Other functions may read samples and ignore the sampling config,
64 * such as functions to read the UID from a prox tag or similar.
66 * Values set to '0' implies no change (except for averaging)
67 * @brief setSamplingConfig
70 void setSamplingConfig(sample_config
*sc
);
72 sample_config
* getSamplingConfig();
77 #endif // __LFSAMPLING_H