X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/6fcb5dda51b7bedb8a8bb1bb216a2f4a60a6095c..c0d32c3186e5b11cf13394b10770cc1b6abab83f:/armsrc/appmain.c diff --git a/armsrc/appmain.c b/armsrc/appmain.c index 475b1c1b..ffe6b7f2 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -37,8 +37,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 @@ -842,7 +840,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(); @@ -850,7 +848,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) @@ -860,7 +858,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(); @@ -868,7 +866,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)