From: iceman1001 Date: Tue, 10 Feb 2015 07:58:14 +0000 (+0100) Subject: Merge branch 'master' of https://github.com/Proxmark/proxmark3 X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/commitdiff_plain/2b61c242127b54c6f8a92bf6991cdf9bd9aa27af Merge branch 'master' of https://github.com/Proxmark/proxmark3 Conflicts: armsrc/appmain.c armsrc/apps.h armsrc/lfops.c --- 2b61c242127b54c6f8a92bf6991cdf9bd9aa27af diff --cc armsrc/appmain.c index 00e9ba4d,cb1b9f73..271ff3f8 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@@ -21,9 -21,9 +21,9 @@@ #include #include "legicrf.h" -#include +#include "../include/hitag2.h" - + #include "lfsampling.h" + #ifdef WITH_LCD #include "LCD.h" #endif diff --cc armsrc/lfops.c index 98045d81,479da772..c5f4a37a --- a/armsrc/lfops.c +++ b/armsrc/lfops.c @@@ -123,18 -34,19 +34,19 @@@ void ModThenAcquireRawAdcSamples125k(in if (command[strlen((char *) command) - 1] == 'h') divisor_used = 88; // 134.8 KHz + sample_config sc = { 0,0,1, divisor_used, 0}; + setSamplingConfig(&sc); - FpgaSendCommand(FPGA_CMD_SET_DIVISOR, divisor_used); - FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_ADC | FPGA_LF_ADC_READER_FIELD); - // Give it a bit of time for the resonant antenna to settle. - SpinDelay(50); - /* Make sure the tag is reset */ - FpgaDownloadAndGo(FPGA_BITSTREAM_LF); - FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); - SpinDelay(2500); ++ /* Make sure the tag is reset */ ++ FpgaDownloadAndGo(FPGA_BITSTREAM_LF); ++ FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); ++ SpinDelay(2500); + + LFSetupFPGAForADC(sc.divisor, 1); - // And a little more time for the tag to fully power up - SpinDelay(2000); + // And a little more time for the tag to fully power up + SpinDelay(2000); - // Now set up the SSC to get the ADC samples that are now streaming at us. - FpgaSetupSsc(); - // now modulate the reader field while(*command != '\0' && *command != ' ') { FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF); @@@ -647,8 -561,8 +561,8 @@@ void CmdHIDdemodFSK(int findone, int *h WDT_HIT(); if (ledcontrol) LED_A_ON(); - DoAcquisition125k_internal(-1,true); + DoAcquisition_default(-1,true); - // FSK demodulator + // FSK demodulator size = sizeOfBigBuff; //variable size will change after demod so re initialize it before use idx = HIDdemodFSK(dest, &size, &hi2, &hi, &lo); @@@ -736,8 -650,8 +650,8 @@@ void CmdEM410xdemod(int findone, int *h WDT_HIT(); if (ledcontrol) LED_A_ON(); - DoAcquisition125k_internal(-1,true); + DoAcquisition_default(-1,true); - size = BigBuf_max_traceLen(); + size = BigBuf_max_traceLen(); //Dbprintf("DEBUG: Buffer got"); //askdemod and manchester decode errCnt = askmandemod(dest, &size, &clk, &invert); @@@ -789,8 -703,8 +703,8 @@@ void CmdIOdemodFSK(int findone, int *hi while(!BUTTON_PRESS()) { WDT_HIT(); if (ledcontrol) LED_A_ON(); - DoAcquisition125k_internal(-1,true); + DoAcquisition_default(-1,true); - //fskdemod and get start index + //fskdemod and get start index WDT_HIT(); idx = IOdemodFSK(dest, BigBuf_max_traceLen()); if (idx>0){ diff --cc include/usb_cmd.h index ecdf8ac1,6ee6509e..295f0ebf --- a/include/usb_cmd.h +++ b/include/usb_cmd.h @@@ -187,9 -194,10 +197,10 @@@ typedef struct //Iclass reader flags -#define FLAG_ICLASS_READER_ONLY_ONCE 0x01 +#define FLAG_ICLASS_READER_ONLY_ONCE 0x01 #define FLAG_ICLASS_READER_GET_CC 0x02 + // CMD_DEVICE_INFO response packet has flags in arg[0], flag definitions: /* Whether a bootloader that understands the common_area is present */ #define DEVICE_INFO_FLAG_BOOTROM_PRESENT (1<<0)