hitag sniff, use edgemode

This commit is contained in:
iceman1001 2020-03-24 10:08:11 +01:00
commit 1f5de5debd

View file

@ -74,7 +74,7 @@ size_t lf_count_edge_periods_ex(size_t max, bool wait, bool detect_gap) {
while (!BUTTON_PRESS()) { while (!BUTTON_PRESS()) {
// only every 100th times, in order to save time when collecting samples. // only every 100th times, in order to save time when collecting samples.
/* /*
if (checked == 1000) { if (checked == 1000) {
if (data_available()) { if (data_available()) {
break; break;
@ -83,7 +83,7 @@ size_t lf_count_edge_periods_ex(size_t max, bool wait, bool detect_gap) {
} }
} }
++checked; ++checked;
*/ */
WDT_HIT(); WDT_HIT();
if (AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) { if (AT91C_BASE_SSC->SSC_SR & (AT91C_SSC_RXRDY)) {
@ -179,7 +179,8 @@ void lf_init(bool reader, bool simulate) {
// FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT); // FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT);
FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_ADC); FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_ADC);
else else
FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_ADC); // Sniff
FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_EDGE_DETECT | FPGA_LF_EDGE_DETECT_TOGGLE_MODE);
} }
@ -249,7 +250,7 @@ size_t lf_detect_field_drop(size_t max) {
while (!BUTTON_PRESS()) { while (!BUTTON_PRESS()) {
/* /*
// only every 1000th times, in order to save time when collecting samples. // only every 1000th times, in order to save time when collecting samples.
if (checked == 1000) { if (checked == 1000) {
if (data_available()) { if (data_available()) {
@ -260,7 +261,7 @@ size_t lf_detect_field_drop(size_t max) {
} }
} }
++checked; ++checked;
*/ */
WDT_HIT(); WDT_HIT();