mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 10:37:23 -07:00
Rename few stuff for consistency
This commit is contained in:
parent
15558070ad
commit
482db05741
83 changed files with 691 additions and 675 deletions
|
@ -140,7 +140,7 @@ static int CmdFlashMemRead(const char *Cmd) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
UsbCommandOLD c = {CMD_FLASHMEM_READ, {start_index, len, 0}, {{0}}};
|
||||
PacketCommandOLD c = {CMD_FLASHMEM_READ, {start_index, len, 0}, {{0}}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
return 0;
|
||||
|
@ -153,7 +153,7 @@ static int CmdFlashmemSpiBaudrate(const char *Cmd) {
|
|||
uint32_t baudrate = param_get32ex(Cmd, 0, 0, 10);
|
||||
baudrate = baudrate * 1000000;
|
||||
if (baudrate != FLASH_BAUD && baudrate != FLASH_MINBAUD) return usage_flashmem_spibaud();
|
||||
UsbCommandOLD c = {CMD_FLASHMEM_SET_SPIBAUDRATE, {baudrate, 0, 0}, {{0}}};
|
||||
PacketCommandOLD c = {CMD_FLASHMEM_SET_SPIBAUDRATE, {baudrate, 0, 0}, {{0}}};
|
||||
SendCommand(&c);
|
||||
return 0;
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ static int CmdFlashMemLoad(const char *Cmd) {
|
|||
while (bytes_remaining > 0) {
|
||||
uint32_t bytes_in_packet = MIN(FLASH_MEM_BLOCK_SIZE, bytes_remaining);
|
||||
|
||||
UsbCommandOLD c = {CMD_FLASHMEM_WRITE, {start_index + bytes_sent, bytes_in_packet, 0}, {{0}}};
|
||||
PacketCommandOLD c = {CMD_FLASHMEM_WRITE, {start_index + bytes_sent, bytes_in_packet, 0}, {{0}}};
|
||||
|
||||
memcpy(c.d.asBytes, data + bytes_sent, bytes_in_packet);
|
||||
clearCommandBuffer();
|
||||
|
@ -283,7 +283,7 @@ static int CmdFlashMemLoad(const char *Cmd) {
|
|||
bytes_remaining -= bytes_in_packet;
|
||||
bytes_sent += bytes_in_packet;
|
||||
|
||||
UsbReplyNG resp;
|
||||
PacketResponseNG resp;
|
||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, 2000)) {
|
||||
PrintAndLogEx(WARNING, "timeout while waiting for reply.");
|
||||
free(data);
|
||||
|
@ -389,10 +389,10 @@ static int CmdFlashMemWipe(const char *Cmd) {
|
|||
//Validations
|
||||
if (errors || cmdp == 0) return usage_flashmem_wipe();
|
||||
|
||||
UsbCommandOLD c = {CMD_FLASHMEM_WIPE, {page, initalwipe, 0}, {{0}}};
|
||||
PacketCommandOLD c = {CMD_FLASHMEM_WIPE, {page, initalwipe, 0}, {{0}}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
UsbReplyNG resp;
|
||||
PacketResponseNG resp;
|
||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, 8000)) {
|
||||
PrintAndLogEx(WARNING, "timeout while waiting for reply.");
|
||||
return 1;
|
||||
|
@ -435,10 +435,10 @@ static int CmdFlashMemInfo(const char *Cmd) {
|
|||
//Validations
|
||||
if (errors) return usage_flashmem_info();
|
||||
|
||||
UsbCommandOLD c = {CMD_FLASHMEM_INFO, {0, 0, 0}, {{0}}};
|
||||
PacketCommandOLD c = {CMD_FLASHMEM_INFO, {0, 0, 0}, {{0}}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
UsbReplyNG resp;
|
||||
PacketResponseNG resp;
|
||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, 2500)) {
|
||||
PrintAndLogEx(WARNING, "timeout while waiting for reply.");
|
||||
return 1;
|
||||
|
@ -564,7 +564,7 @@ static int CmdFlashMemInfo(const char *Cmd) {
|
|||
|
||||
if (shall_write) {
|
||||
// save to mem
|
||||
c = (UsbCommandOLD) {CMD_FLASHMEM_WRITE, {FLASH_MEM_SIGNATURE_OFFSET, FLASH_MEM_SIGNATURE_LEN, 0}, {{0}}};
|
||||
c = (PacketCommandOLD) {CMD_FLASHMEM_WRITE, {FLASH_MEM_SIGNATURE_OFFSET, FLASH_MEM_SIGNATURE_LEN, 0}, {{0}}};
|
||||
memcpy(c.d.asBytes, sign, sizeof(sign));
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue