text
[RRG-proxmark3.git] / armsrc / lfadc.h
blobee2ffbbabf47d48d7a35888200ef2869a1529910
1 //-----------------------------------------------------------------------------
2 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
3 // at your option, any later version. See the LICENSE.txt file for the text of
4 // the license.
5 //-----------------------------------------------------------------------------
6 // LF ADC read/write implementation
7 //-----------------------------------------------------------------------------
9 #ifndef __LFADC_H__
10 #define __LFADC_H__
12 #include "proxmark3_arm.h"
13 #include "common.h"
14 #include "cmd.h"
15 #include "util.h"
16 #include "string.h"
18 extern bool g_logging;
20 uint8_t get_adc_avg(void);
21 void lf_sample_mean(void);
22 bool lf_test_periods(size_t expected, size_t count);
23 size_t lf_count_edge_periods(size_t max);
24 size_t lf_detect_gap(size_t max);
25 void lf_reset_counter(void);
27 bool lf_get_tag_modulation(void);
28 bool lf_get_reader_modulation(void);
30 void lf_wait_periods(size_t periods);
31 //void lf_init(bool reader);
32 void lf_init(bool reader, bool simulate);
33 void lf_finalize(void);
34 size_t lf_detect_field_drop(size_t max);
36 bool lf_manchester_send_bytes(const uint8_t *frame, size_t frame_len);
37 void lf_modulation(bool modulation);
39 #endif // __LFADC_H__