mirror of
https://github.com/Proxmark/proxmark3.git
synced 2025-07-12 08:16:09 -07:00
some minor lf fixes from @iceman1001
This commit is contained in:
parent
b66ff08113
commit
72c5877a74
4 changed files with 15 additions and 14 deletions
|
@ -379,7 +379,7 @@ void WriteTItag(uint32_t idhi, uint32_t idlo, uint16_t crc)
|
|||
AcquireTiType();
|
||||
|
||||
FpgaWriteConfWord(FPGA_MAJOR_MODE_OFF);
|
||||
DbpString("Now use tiread to check");
|
||||
DbpString("Now use `lf ti read` to check");
|
||||
}
|
||||
|
||||
void SimulateTagLowFrequency(int period, int gap, int ledcontrol)
|
||||
|
@ -1415,7 +1415,7 @@ void WriteEM410x(uint32_t card, uint32_t id_hi, uint32_t id_lo) {
|
|||
LED_D_ON();
|
||||
|
||||
// Write EM410x ID
|
||||
uint32_t data[] = {0, id>>32, id & 0xFFFFFFFF};
|
||||
uint32_t data[] = {0, (uint32_t)(id>>32), (uint32_t)(id & 0xFFFFFFFF)};
|
||||
|
||||
clock = (card & 0xFF00) >> 8;
|
||||
clock = (clock == 0) ? 64 : clock;
|
||||
|
|
|
@ -848,16 +848,18 @@ int CmdUndec(const char *Cmd)
|
|||
uint8_t factor = param_get8ex(Cmd, 0,2, 10);
|
||||
//We have memory, don't we?
|
||||
int swap[MAX_GRAPH_TRACE_LEN] = { 0 };
|
||||
uint32_t g_index = 0 ,s_index = 0;
|
||||
while(g_index < GraphTraceLen && s_index < MAX_GRAPH_TRACE_LEN)
|
||||
uint32_t g_index = 0, s_index = 0;
|
||||
while(g_index < GraphTraceLen && s_index + factor < MAX_GRAPH_TRACE_LEN)
|
||||
{
|
||||
int count = 0;
|
||||
for(count = 0; count < factor && s_index+count < MAX_GRAPH_TRACE_LEN; count ++)
|
||||
for(count = 0; count < factor && s_index + count < MAX_GRAPH_TRACE_LEN; count++)
|
||||
swap[s_index+count] = GraphBuffer[g_index];
|
||||
s_index+=count;
|
||||
|
||||
s_index += count;
|
||||
g_index++;
|
||||
}
|
||||
|
||||
memcpy(GraphBuffer,swap, s_index * sizeof(int));
|
||||
memcpy(GraphBuffer, swap, s_index * sizeof(int));
|
||||
GraphTraceLen = s_index;
|
||||
RepaintGraphWindow();
|
||||
return 0;
|
||||
|
@ -2334,9 +2336,8 @@ int Cmdbin2hex(const char *Cmd)
|
|||
return 0;
|
||||
}
|
||||
|
||||
int usage_data_hex2bin(){
|
||||
|
||||
PrintAndLog("Usage: data bin2hex <binary_digits>");
|
||||
int usage_data_hex2bin() {
|
||||
PrintAndLog("Usage: data hex2bin <hex_digits>");
|
||||
PrintAndLog(" This function will ignore all non-hexadecimal characters (but stop reading on whitespace)");
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -539,7 +539,7 @@ int CmdLFSetConfig(const char *Cmd)
|
|||
return usage_lf_config();
|
||||
}
|
||||
//Bps is limited to 8, so fits in lower half of arg1
|
||||
if(bps >> 8) bps = 8;
|
||||
if(bps >> 4) bps = 8;
|
||||
|
||||
sample_config config = {
|
||||
decimation,bps,averaging,divisor,trigger_threshold
|
||||
|
|
|
@ -76,7 +76,7 @@ int usage_t55xx_read(){
|
|||
return 0;
|
||||
}
|
||||
int usage_t55xx_write(){
|
||||
PrintAndLog("Usage: lf t55xx wr [b <block>] [d <data>] [p <password>] [1]");
|
||||
PrintAndLog("Usage: lf t55xx write [b <block>] [d <data>] [p <password>] [1]");
|
||||
PrintAndLog("Options:");
|
||||
PrintAndLog(" b <block> - block number to write. Between 0-7");
|
||||
PrintAndLog(" d <data> - 4 bytes of data to write (8 hex characters)");
|
||||
|
@ -84,8 +84,8 @@ int usage_t55xx_write(){
|
|||
PrintAndLog(" 1 - OPTIONAL write Page 1 instead of Page 0");
|
||||
PrintAndLog("");
|
||||
PrintAndLog("Examples:");
|
||||
PrintAndLog(" lf t55xx wr b 3 d 11223344 - write 11223344 to block 3");
|
||||
PrintAndLog(" lf t55xx wr b 3 d 11223344 p feedbeef - write 11223344 to block 3 password feedbeef");
|
||||
PrintAndLog(" lf t55xx write b 3 d 11223344 - write 11223344 to block 3");
|
||||
PrintAndLog(" lf t55xx write b 3 d 11223344 p feedbeef - write 11223344 to block 3 password feedbeef");
|
||||
PrintAndLog("");
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue