mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-08-14 02:26:59 -07:00
lfem4x cleanup/add/fix
changed spacing to tabs for cmdlfem4x.c finished the partially built lf em em4x50read function added save/restore GraphBuffer function in graph.c adjusted some tolerances in lfdemod.c added a maxLen argument to the askmandemod
This commit is contained in:
parent
f83c41c75b
commit
23f0a7d862
8 changed files with 505 additions and 354 deletions
|
@ -17,7 +17,6 @@
|
|||
|
||||
int GraphBuffer[MAX_GRAPH_TRACE_LEN];
|
||||
int GraphTraceLen;
|
||||
|
||||
/* write a manchester bit to the graph */
|
||||
void AppendGraph(int redraw, int clock, int bit)
|
||||
{
|
||||
|
@ -46,6 +45,23 @@ int ClearGraph(int redraw)
|
|||
|
||||
return gtl;
|
||||
}
|
||||
// option '1' to save GraphBuffer any other to restore
|
||||
void save_restoreGB(uint8_t saveOpt)
|
||||
{
|
||||
static int SavedGB[MAX_GRAPH_TRACE_LEN];
|
||||
static int SavedGBlen;
|
||||
static bool GB_Saved = false;
|
||||
|
||||
if (saveOpt==1) { //save
|
||||
memcpy(SavedGB,GraphBuffer, sizeof(GraphBuffer));
|
||||
SavedGBlen = GraphTraceLen;
|
||||
GB_Saved=true;
|
||||
} else if (GB_Saved){
|
||||
memcpy(GraphBuffer,SavedGB, sizeof(GraphBuffer));
|
||||
GraphTraceLen = SavedGBlen;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// DETECT CLOCK NOW IN LFDEMOD.C
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue