mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-19 21:03:48 -07:00
rawdemod param cleanup
plus lfdemod.h cleanup
This commit is contained in:
parent
2eec55c8a4
commit
f8f894a50f
2 changed files with 12 additions and 13 deletions
|
@ -414,7 +414,10 @@ int ASKmanDemod(const char *Cmd, bool verbose, bool emSearch)
|
||||||
int invert=0;
|
int invert=0;
|
||||||
int clk=0;
|
int clk=0;
|
||||||
int maxErr=100;
|
int maxErr=100;
|
||||||
|
//param_getdec(Cmd, 0, &clk);
|
||||||
|
//param_getdec(Cmd, 1, &invert);
|
||||||
|
//maxErr = param_get32ex(Cmd, 2, 0xFFFFFFFF, 10);
|
||||||
|
//if (maxErr == 0xFFFFFFFF) maxErr=100;
|
||||||
uint8_t BitStream[MAX_GRAPH_TRACE_LEN]={0};
|
uint8_t BitStream[MAX_GRAPH_TRACE_LEN]={0};
|
||||||
sscanf(Cmd, "%i %i %i", &clk, &invert, &maxErr);
|
sscanf(Cmd, "%i %i %i", &clk, &invert, &maxErr);
|
||||||
if (invert != 0 && invert != 1) {
|
if (invert != 0 && invert != 1) {
|
||||||
|
@ -675,7 +678,7 @@ int ASKbiphaseDemod(const char *Cmd, bool verbose)
|
||||||
int offset=0, clk=0, invert=0, maxErr=0, ans=0;
|
int offset=0, clk=0, invert=0, maxErr=0, ans=0;
|
||||||
ans = sscanf(Cmd, "%i %i %i %i", &offset, &clk, &invert, &maxErr);
|
ans = sscanf(Cmd, "%i %i %i %i", &offset, &clk, &invert, &maxErr);
|
||||||
if (ans>0)
|
if (ans>0)
|
||||||
ans = ASKrawDemod(Cmd+2, FALSE);
|
ans = ASKrawDemod(Cmd+1, FALSE);
|
||||||
else
|
else
|
||||||
ans = ASKrawDemod(Cmd, FALSE);
|
ans = ASKrawDemod(Cmd, FALSE);
|
||||||
if (!ans) {
|
if (!ans) {
|
||||||
|
@ -2082,19 +2085,19 @@ int CmdRawDemod(const char *Cmd)
|
||||||
char cmdp2 = Cmd[1];
|
char cmdp2 = Cmd[1];
|
||||||
int ans = 0;
|
int ans = 0;
|
||||||
if (cmdp == 'f' && cmdp2 == 's'){
|
if (cmdp == 'f' && cmdp2 == 's'){
|
||||||
ans = CmdFSKrawdemod(Cmd+3);
|
ans = CmdFSKrawdemod(Cmd+2);
|
||||||
} else if(cmdp == 'a' && cmdp2 == 'b'){
|
} else if(cmdp == 'a' && cmdp2 == 'b'){
|
||||||
ans = Cmdaskbiphdemod(Cmd+3);
|
ans = Cmdaskbiphdemod(Cmd+2);
|
||||||
} else if(cmdp == 'a' && cmdp2 == 'm'){
|
} else if(cmdp == 'a' && cmdp2 == 'm'){
|
||||||
ans = Cmdaskmandemod(Cmd+3);
|
ans = Cmdaskmandemod(Cmd+2);
|
||||||
} else if(cmdp == 'a' && cmdp2 == 'r'){
|
} else if(cmdp == 'a' && cmdp2 == 'r'){
|
||||||
ans = Cmdaskrawdemod(Cmd+3);
|
ans = Cmdaskrawdemod(Cmd+2);
|
||||||
} else if(cmdp == 'n' && cmdp2 == 'r'){
|
} else if(cmdp == 'n' && cmdp2 == 'r'){
|
||||||
ans = CmdNRZrawDemod(Cmd+3);
|
ans = CmdNRZrawDemod(Cmd+2);
|
||||||
} else if(cmdp == 'p' && cmdp2 == '1'){
|
} else if(cmdp == 'p' && cmdp2 == '1'){
|
||||||
ans = CmdPSK1rawDemod(Cmd+3);
|
ans = CmdPSK1rawDemod(Cmd+2);
|
||||||
} else if(cmdp == 'p' && cmdp2 == '2'){
|
} else if(cmdp == 'p' && cmdp2 == '2'){
|
||||||
ans = CmdPSK2rawDemod(Cmd+3);
|
ans = CmdPSK2rawDemod(Cmd+2);
|
||||||
} else {
|
} else {
|
||||||
PrintAndLog("unknown modulation entered - see help ('h') for parameter structure");
|
PrintAndLog("unknown modulation entered - see help ('h') for parameter structure");
|
||||||
}
|
}
|
||||||
|
|
|
@ -19,7 +19,6 @@ int DetectASKClock(uint8_t dest[], size_t size, int *clock, int maxErr);
|
||||||
uint8_t DetectCleanAskWave(uint8_t dest[], size_t size, int high, int low);
|
uint8_t DetectCleanAskWave(uint8_t dest[], size_t size, int high, int low);
|
||||||
int askmandemod(uint8_t *BinStream, size_t *size, int *clk, int *invert, int maxErr);
|
int askmandemod(uint8_t *BinStream, size_t *size, int *clk, int *invert, int maxErr);
|
||||||
uint8_t Em410xDecode(uint8_t *BitStream, size_t *size, size_t *startIdx, uint32_t *hi, uint64_t *lo);
|
uint8_t Em410xDecode(uint8_t *BitStream, size_t *size, size_t *startIdx, uint32_t *hi, uint64_t *lo);
|
||||||
//uint64_t Em410xDecode(uint8_t *BitStream, size_t *size, size_t *startIdx);
|
|
||||||
int ManchesterEncode(uint8_t *BitStream, size_t size);
|
int ManchesterEncode(uint8_t *BitStream, size_t size);
|
||||||
int manrawdecode(uint8_t *BitStream, size_t *size);
|
int manrawdecode(uint8_t *BitStream, size_t *size);
|
||||||
int BiphaseRawDecode(uint8_t * BitStream, size_t *size, int offset, int invert);
|
int BiphaseRawDecode(uint8_t * BitStream, size_t *size, int offset, int invert);
|
||||||
|
@ -34,7 +33,6 @@ void psk1TOpsk2(uint8_t *BitStream, size_t size);
|
||||||
void psk2TOpsk1(uint8_t *BitStream, size_t size);
|
void psk2TOpsk1(uint8_t *BitStream, size_t size);
|
||||||
int DetectNRZClock(uint8_t dest[], size_t size, int clock);
|
int DetectNRZClock(uint8_t dest[], size_t size, int clock);
|
||||||
int indala26decode(uint8_t *bitStream, size_t *size, uint8_t *invert);
|
int indala26decode(uint8_t *bitStream, size_t *size, uint8_t *invert);
|
||||||
void pskCleanWave(uint8_t *bitStream, size_t size);
|
|
||||||
int PyramiddemodFSK(uint8_t *dest, size_t *size);
|
int PyramiddemodFSK(uint8_t *dest, size_t *size);
|
||||||
int AWIDdemodFSK(uint8_t *dest, size_t *size);
|
int AWIDdemodFSK(uint8_t *dest, size_t *size);
|
||||||
size_t removeParity(uint8_t *BitStream, size_t startIdx, uint8_t pLen, uint8_t pType, size_t bLen);
|
size_t removeParity(uint8_t *BitStream, size_t startIdx, uint8_t pLen, uint8_t pType, size_t bLen);
|
||||||
|
@ -44,9 +42,7 @@ int getHiLo(uint8_t *BitStream, size_t size, int *high, int *low, uint8_t fuzzHi
|
||||||
int ParadoxdemodFSK(uint8_t *dest, size_t *size, uint32_t *hi2, uint32_t *hi, uint32_t *lo);
|
int ParadoxdemodFSK(uint8_t *dest, size_t *size, uint32_t *hi2, uint32_t *hi, uint32_t *lo);
|
||||||
uint8_t preambleSearch(uint8_t *BitStream, uint8_t *preamble, size_t pLen, size_t *size, size_t *startIdx);
|
uint8_t preambleSearch(uint8_t *BitStream, uint8_t *preamble, size_t pLen, size_t *size, size_t *startIdx);
|
||||||
uint8_t parityTest(uint32_t bits, uint8_t bitLen, uint8_t pType);
|
uint8_t parityTest(uint32_t bits, uint8_t bitLen, uint8_t pType);
|
||||||
uint8_t justNoise(uint8_t *BitStream, size_t size);
|
|
||||||
int pskRawDemod(uint8_t dest[], size_t *size, int *clock, int *invert);
|
int pskRawDemod(uint8_t dest[], size_t *size, int *clock, int *invert);
|
||||||
int DetectPSKClock(uint8_t dest[], size_t size, int clock);
|
int DetectPSKClock(uint8_t dest[], size_t size, int clock);
|
||||||
void askAmp(uint8_t *BitStream, size_t size);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue