X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/5eae566a28d4494e70a9e3812e269dbd87d9bc07..b4c1f167da39e85f3d10757a1b615a64a6031f26:/armsrc/lfops.c diff --git a/armsrc/lfops.c b/armsrc/lfops.c index d6d686e1..c26d063b 100644 --- a/armsrc/lfops.c +++ b/armsrc/lfops.c @@ -382,7 +382,7 @@ void WriteTItag(uint32_t idhi, uint32_t idlo, uint16_t crc) DbpString("Now use 'lf ti read' to check"); } -void SimulateTagLowFrequency(uint16_t period, uint32_t gap, uint8_t ledcontrol) +void SimulateTagLowFrequency(int period, int gap, int ledcontrol) { int i; uint8_t *tab = BigBuf_get_addr(); @@ -651,7 +651,7 @@ void CmdASKsimTag(uint16_t arg1, uint16_t arg2, size_t size, uint8_t *BitStream) int ledcontrol = 1; int n=0, i=0; uint8_t clk = (arg1 >> 8) & 0xFF; - uint8_t encoding = arg1 & 1; + uint8_t encoding = arg1 & 0xFF; uint8_t separator = arg2 & 1; uint8_t invert = (arg2 >> 8) & 1; @@ -861,7 +861,7 @@ void CmdEM410xdemod(int findone, int *high, int *low, int ledcontrol) size = BigBuf_max_traceLen(); //askdemod and manchester decode if (size > 16385) size = 16385; //big enough to catch 2 sequences of largest format - errCnt = askmandemod(dest, &size, &clk, &invert, maxErr); + errCnt = askdemod(dest, &size, &clk, &invert, maxErr, 0, 1); WDT_HIT(); if (errCnt<0) continue; @@ -1043,10 +1043,10 @@ void CmdIOdemodFSK(int findone, int *high, int *low, int ledcontrol) * To compensate antenna falling times shorten the write times * and enlarge the gap ones. */ -#define START_GAP 50*8 // 10 - 50fc 250 -#define WRITE_GAP 20*8 // 8 - 30fc -#define WRITE_0 24*8 // 16 - 31fc 24fc 192 -#define WRITE_1 54*8 // 48 - 63fc 54fc 432 for T55x7; 448 for E5550 +#define START_GAP 31*8 // was 250 // SPEC: 8 - 50fc [15fc] +#define WRITE_GAP 20*8 // was 160 // SPEC: 8 - 20fc [10fc] +#define WRITE_0 18*8 // was 144 // SPEC: 16 - 32fc [24fc] 192 +#define WRITE_1 50*8 // was 400 // SPEC: 48 - 64fc [56fc] 432 for T55x7; 448 for E5550 // VALUES TAKEN FROM EM4x function: SendForward // START_GAP = 440; (55*8) cycles at 125Khz (8us = 1cycle)