X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/29ada8fc08807d8b279afee69862c22b71aaad8f..cf194819cc71d7e0121e896e71989efc6dbfc280:/armsrc/appmain.c diff --git a/armsrc/appmain.c b/armsrc/appmain.c index 782c57fa..d20b08b2 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -36,8 +36,6 @@ #include "iso14443a.h" #endif -#define abs(x) ( ((x)<0) ? -(x) : (x) ) - //============================================================================= // A buffer where we can queue things up to be sent through the FPGA, for // any purpose (fake tag, as reader, whatever). We go MSB first, since that @@ -841,7 +839,7 @@ void ListenReaderField(int limit) if (limit != HF_ONLY) { if(mode == 1) { - if (abs(lf_av - lf_baseline) > REPORT_CHANGE) + if (ABS(lf_av - lf_baseline) > REPORT_CHANGE) LED_D_ON(); else LED_D_OFF(); @@ -849,7 +847,7 @@ void ListenReaderField(int limit) lf_av_new = AvgAdc(ADC_CHAN_LF); // see if there's a significant change - if(abs(lf_av - lf_av_new) > REPORT_CHANGE) { + if(ABS(lf_av - lf_av_new) > REPORT_CHANGE) { Dbprintf("LF 125/134kHz Field Change: %5dmV", (MAX_ADC_LF_VOLTAGE * lf_av_new) >> 10); lf_av = lf_av_new; if (lf_av > lf_max) @@ -859,7 +857,7 @@ void ListenReaderField(int limit) if (limit != LF_ONLY) { if (mode == 1){ - if (abs(hf_av - hf_baseline) > REPORT_CHANGE) + if (ABS(hf_av - hf_baseline) > REPORT_CHANGE) LED_B_ON(); else LED_B_OFF(); @@ -867,7 +865,7 @@ void ListenReaderField(int limit) hf_av_new = AvgAdc(ADC_CHAN_HF); // see if there's a significant change - if(abs(hf_av - hf_av_new) > REPORT_CHANGE) { + if(ABS(hf_av - hf_av_new) > REPORT_CHANGE) { Dbprintf("HF 13.56MHz Field Change: %5dmV", (MAX_ADC_HF_VOLTAGE * hf_av_new) >> 10); hf_av = hf_av_new; if (hf_av > hf_max)