From 675705ffcd1d2e24d0cb70f05a33b8c6789eb8e6 Mon Sep 17 00:00:00 2001 From: Dom Date: Thu, 5 Apr 2018 09:22:54 +0100 Subject: [PATCH] minor changes. Changed minor errors to warnings in compiler. --- .DS_Store | Bin 0 -> 8196 bytes armsrc/iso14443a.c | 28 ++++++++++++++-------------- common/Makefile.common | 2 +- 3 files changed, 15 insertions(+), 15 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..458ef6af6e390543679e12a17e64dc4bcb0b6424 GIT binary patch literal 8196 zcmeHMPiz%M7@uETV0NK&%HQr&=#yGSDB6~mqJX@<7O@JUp@p^-Df`~8u(I8)Z}+u8 zsTRFxg7Jh3>P3yl;K@WzCdP{q{~fdnYB+fCpcjuuqlw?_>;qcpRSoPUGvCZN-?ua0 zZ+^RznPrS2TeO-Ot6_|B%2JB?RNNrRewnXJWwEA$B*>oyBRSX4QR_l(Ec?FdP09p;1c6%;0r`DMQ|J_3CfkEaz%W^fO02&I=0Kia#Bg<&JZ6y5RZ)bgo0>vdVV@GXUHg- zlnDX}0@ouTU!QVjF`wmgW7nSFT_*?|8!w`)ykgGWd7SIIUa3FUbJ!p23C*w=WX-~$ zY;~LA;aptr^?mnB-OTNE?6D!Sq{H_@)A8&=6uznkObSzP!F^OV`2SW5>r&Ogwc)MTGdPz^Z0M zc=l>|ZZO)Rt|!V~&W)(>E|tR5^!Y~DBl?bhC+~Yb&T)H4R0R}W7d5*J_9#Wtm-pS` zuon!8>b&XZi>?{k?XD}0gZ|Jy8p_(fz%PUyk>QXK#lYTelbthacak-^E|O2$H4-|$ z7wokQ0m-^dqnfmKZo$$OtL|Fc*!sZM&Z)|URib*4uJ0pUywG{vu?u^~94kCLU4HfIoIy>%wfA4uBJ^bTV7LXq>S53T{B&{sN?;`obzPS36D*Qg;kY$t#OAY zKH&Q;n&D30k|SABk5OyXb3Q2b9R-_8E1J~Zs|~$3pjd^;wMf&jPS<;n(1MD9rXVNY z)T|qOTr+38!qRx8+R&yOeWNO5@o22vv{^U$^ZxKKg&0($fz)zNM!V6$#i#s$9D9cu zgu6y;PY%DlX4$q{!x)hIcFVFY&UsyCwZbogK@)N(G1w~B!Zx#RHbC4SW2e|@_7Z!8 zonz?igM`;Gm<{$zi#zcCk85Lkr8NaG%?!CJH-gKgN3htY-I z=)(Z^VGtIcfQw;x7{k*ziD&REPT@3O!5N&zn|KRv;~kvGN4S8`@HxJ~xA*}+s(F@` z$huRtOC>H-Eq)h?tnpo1*?}98HTBSTJ^P=M_4@^ip^KL+U0Jt!U31&!_A4tnW8JQ$ zP{bTXjfgTON<@n{orA<>BXyg;Vm2=CA;#H9xulJlH)RkvYSXEdki_9p^Uiu|mJzqP zd@l@rO^Pf{F3O{3>OQ@R6FtQo)!U+P(1^gILiOISZ{oyLF<13IsAn|!iU}4yI$NL8 z1-LeoeY0}!UG_fvn0?8 z2XngEL zNxXNJbE7>4&-J}Sq$x3Ux^dFFxezE<;nc|U|F+rh|8K6KlV}nI5(K6pfQrtZ&Mc{B z`|QiJcAD}*$}&m2NhKo}DyCfoQ2WXcL#n6ARQhCMIjJORDE;df0m=R!;jW5g|Gx%| HTdMjGk^|Rp literal 0 HcmV?d00001 diff --git a/armsrc/iso14443a.c b/armsrc/iso14443a.c index 945a5b9a..c70a282b 100644 --- a/armsrc/iso14443a.c +++ b/armsrc/iso14443a.c @@ -1297,7 +1297,7 @@ static void TransmitFor14443a(const uint8_t *cmd, uint16_t len, uint32_t *timing // clear TXRDY AT91C_BASE_SSC->SSC_THR = SEC_Y; - Dbprintf("Sending bytes to the PICC."); + //Dbprintf("Sending bytes to the PICC."); uint16_t c = 0; for(;;) { @@ -1589,7 +1589,7 @@ int EmSendPrecompiledCmd(tag_response_info_t *response_info) { static int GetIso14443aAnswerFromTag(uint8_t *receivedResponse, uint8_t *receivedResponsePar, uint16_t offset) { uint32_t c; - uint32_t start_ts = GetCountSspClk(); + //uint32_t start_ts = GetCountSspClk(); uint32_t end_ts = 0; manchester_recv_started = 0; recorded = 0; @@ -1618,21 +1618,21 @@ static int GetIso14443aAnswerFromTag(uint8_t *receivedResponse, uint8_t *receive if(AT91C_BASE_SSC->SSC_SR & AT91C_SSC_RXRDY) { b = (uint8_t)AT91C_BASE_SSC->SSC_RHR; //read in 4 bytes of data from the RHR - if(manchester_recv_started){ - end_ts = GetCountSspClk(); - manchester_recv_started = 0; - recorded = 1; - } + // if(manchester_recv_started){ + // end_ts = GetCountSspClk(); + // manchester_recv_started = 0; + // recorded = 1; + // } //Perform the manchester decoding on the 4 bytes just received. if(ManchesterDecoding(b, offset, 0)) { NextTransferTime = MAX(NextTransferTime, Demod.endTime - (DELAY_AIR2ARM_AS_READER + DELAY_ARM2AIR_AS_READER)/16 + FRAME_DELAY_TIME_PICC_TO_PCD); - uint32_t cycle_count = end_ts - start_ts; - Dbprintf("Finished decoding (Manchester). Value of c=%d. Cycle count (for one bit) = %d", c, cycle_count); + //uint32_t cycle_count = end_ts - start_ts; + //Dbprintf("Finished decoding (Manchester). Value of c=%d. Cycle count (for one bit) = %d", c, cycle_count); return true; } else if (c++ > iso14a_timeout && Demod.state == DEMOD_UNSYNCD) { //we reach here only if we time out (i.e. receiving the data from the PICC takes too long) - Dbprintf("Timed out while waiting for PICC response (c = %d)!", c); + //Dbprintf("Timed out while waiting for PICC response (c = %d)!", c); return false; } } @@ -2123,11 +2123,11 @@ void ReaderIso14443a(UsbCommand *c) ReaderTransmit(cmd,len, NULL); // 8 bits, odd parity } } - start_ts = GetCountSspClk(); //started just after we send all our bytes to the PICC + //start_ts = GetCountSspClk(); //started just after we send all our bytes to the PICC arg0 = ReaderReceive(buf, par); - end_ts = GetCountSspClk(); //ended just after we have received all the response bytes from the PICC. - uint32_t cycle_count = end_ts - start_ts; - Dbprintf("Cycle count (all bytes) = %d", cycle_count); + //end_ts = GetCountSspClk(); //ended just after we have received all the response bytes from the PICC. + //uint32_t cycle_count = end_ts - start_ts; + //Dbprintf("Cycle count (all bytes) = %d", cycle_count); LED_B_ON(); cmd_send(CMD_ACK,arg0,0,0,buf,sizeof(buf)); diff --git a/common/Makefile.common b/common/Makefile.common index 29b72a4c..0b77fb19 100644 --- a/common/Makefile.common +++ b/common/Makefile.common @@ -67,7 +67,7 @@ VPATH = . ../common ../common/crapto1 ../common/polarssl ../fpga ../zlib INCLUDES = ../include/proxmark3.h ../include/at91sam7s512.h ../include/config_gpio.h ../include/usb_cmd.h $(APP_INCLUDES) -CFLAGS = -c $(INCLUDE) -Wall -Werror -pedantic -std=c99 -Os $(APP_CFLAGS) +CFLAGS = -c $(INCLUDE) -Wall -pedantic -std=c99 -Os $(APP_CFLAGS) LDFLAGS = -nostartfiles -nodefaultlibs -Wl,-gc-sections -n LIBS = -lgcc