mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
chg: params
This commit is contained in:
parent
13b461cab2
commit
69bab29834
2 changed files with 8 additions and 6 deletions
|
@ -16,13 +16,15 @@ int s_Buff[MAX_GRAPH_TRACE_LEN];
|
||||||
/* write a manchester bit to the graph
|
/* write a manchester bit to the graph
|
||||||
TODO, verfy that this doesn't overflow buffer (iceman)
|
TODO, verfy that this doesn't overflow buffer (iceman)
|
||||||
*/
|
*/
|
||||||
void AppendGraph(bool redraw, int clock, int bit) {
|
void AppendGraph(bool redraw, uint16_t clock, int bit) {
|
||||||
int i;
|
uint8_t half = clock / 2;
|
||||||
|
uint8_t i;
|
||||||
//set first half the clock bit (all 1's or 0's for a 0 or 1 bit)
|
//set first half the clock bit (all 1's or 0's for a 0 or 1 bit)
|
||||||
for (i = 0; i < (int)(clock / 2); ++i)
|
for (i = 0; i < half; ++i)
|
||||||
GraphBuffer[GraphTraceLen++] = bit ;
|
GraphBuffer[GraphTraceLen++] = bit;
|
||||||
|
|
||||||
//set second half of the clock bit (all 0's or 1's for a 0 or 1 bit)
|
//set second half of the clock bit (all 0's or 1's for a 0 or 1 bit)
|
||||||
for (i = (int)(clock / 2); i < clock; ++i)
|
for (; i < clock; ++i)
|
||||||
GraphBuffer[GraphTraceLen++] = bit ^ 1;
|
GraphBuffer[GraphTraceLen++] = bit ^ 1;
|
||||||
|
|
||||||
if (redraw)
|
if (redraw)
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
#include "lfdemod.h"
|
#include "lfdemod.h"
|
||||||
#include "cmddata.h" //for g_debugmode
|
#include "cmddata.h" //for g_debugmode
|
||||||
|
|
||||||
void AppendGraph(bool redraw, int clock, int bit);
|
void AppendGraph(bool redraw, uint16_t clock, int bit);
|
||||||
size_t ClearGraph(bool redraw);
|
size_t ClearGraph(bool redraw);
|
||||||
size_t getFromGraphBuf(uint8_t *buff);
|
size_t getFromGraphBuf(uint8_t *buff);
|
||||||
int GetAskClock(const char *str, bool printAns);
|
int GetAskClock(const char *str, bool printAns);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue