mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 13:53:55 -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
|
@ -308,7 +308,7 @@ static void lookupChipID(uint32_t iChipID, uint32_t mem_used) {
|
|||
}
|
||||
|
||||
static int CmdDetectReader(const char *Cmd) {
|
||||
UsbCommandOLD c = {CMD_LISTEN_READER_FIELD, {0, 0, 0}, {{0}}};
|
||||
PacketCommandOLD c = {CMD_LISTEN_READER_FIELD, {0, 0, 0}, {{0}}};
|
||||
// 'l' means LF - 125/134 kHz
|
||||
if (*Cmd == 'l') {
|
||||
c.arg[0] = 1;
|
||||
|
@ -326,7 +326,7 @@ static int CmdDetectReader(const char *Cmd) {
|
|||
// ## FPGA Control
|
||||
static int CmdFPGAOff(const char *Cmd) {
|
||||
(void)Cmd; // Cmd is not used so far
|
||||
UsbCommandOLD c = {CMD_FPGA_MAJOR_MODE_OFF, {0, 0, 0}, {{0}}};
|
||||
PacketCommandOLD c = {CMD_FPGA_MAJOR_MODE_OFF, {0, 0, 0}, {{0}}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
return 0;
|
||||
|
@ -336,7 +336,7 @@ static int CmdFPGAOff(const char *Cmd) {
|
|||
static int CmdLCD(const char *Cmd) {
|
||||
int i, j;
|
||||
|
||||
UsbCommandOLD c = {CMD_LCD, {0, 0, 0}, {{0}}};
|
||||
PacketCommandOLD c = {CMD_LCD, {0, 0, 0}, {{0}}};
|
||||
sscanf(Cmd, "%x %d", &i, &j);
|
||||
while (j--) {
|
||||
c.arg[0] = i & 0x1ff;
|
||||
|
@ -347,7 +347,7 @@ static int CmdLCD(const char *Cmd) {
|
|||
}
|
||||
|
||||
static int CmdLCDReset(const char *Cmd) {
|
||||
UsbCommandOLD c = {CMD_LCD_RESET, {strtol(Cmd, NULL, 0), 0, 0}, {{0}}};
|
||||
PacketCommandOLD c = {CMD_LCD_RESET, {strtol(Cmd, NULL, 0), 0, 0}, {{0}}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
return 0;
|
||||
|
@ -355,7 +355,7 @@ static int CmdLCDReset(const char *Cmd) {
|
|||
#endif
|
||||
|
||||
static int CmdReadmem(const char *Cmd) {
|
||||
UsbCommandOLD c = {CMD_READ_MEM, {strtol(Cmd, NULL, 0), 0, 0}, {{0}}};
|
||||
PacketCommandOLD c = {CMD_READ_MEM, {strtol(Cmd, NULL, 0), 0, 0}, {{0}}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
return 0;
|
||||
|
@ -363,7 +363,7 @@ static int CmdReadmem(const char *Cmd) {
|
|||
|
||||
static int CmdReset(const char *Cmd) {
|
||||
(void)Cmd; // Cmd is not used so far
|
||||
UsbCommandOLD c = {CMD_HARDWARE_RESET, {0, 0, 0}, {{0}}};
|
||||
PacketCommandOLD c = {CMD_HARDWARE_RESET, {0, 0, 0}, {{0}}};
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
return 0;
|
||||
|
@ -374,7 +374,7 @@ static int CmdReset(const char *Cmd) {
|
|||
* 600kHz.
|
||||
*/
|
||||
static int CmdSetDivisor(const char *Cmd) {
|
||||
UsbCommandOLD c = {CMD_SET_LF_DIVISOR, {strtol(Cmd, NULL, 0), 0, 0}, {{0}}};
|
||||
PacketCommandOLD c = {CMD_SET_LF_DIVISOR, {strtol(Cmd, NULL, 0), 0, 0}, {{0}}};
|
||||
|
||||
if (c.arg[0] < 19 || c.arg[0] > 255) {
|
||||
PrintAndLogEx(NORMAL, "divisor must be between 19 and 255");
|
||||
|
@ -394,7 +394,7 @@ static int CmdSetMux(const char *Cmd) {
|
|||
return 1;
|
||||
}
|
||||
|
||||
UsbCommandOLD c = {CMD_SET_ADC_MUX, {0, 0, 0}, {{0}}};
|
||||
PacketCommandOLD c = {CMD_SET_ADC_MUX, {0, 0, 0}, {{0}}};
|
||||
|
||||
if (strcmp(Cmd, "lopkd") == 0) c.arg[0] = 0;
|
||||
else if (strcmp(Cmd, "loraw") == 0) c.arg[0] = 1;
|
||||
|
@ -418,8 +418,8 @@ static int CmdVersion(const char *Cmd) {
|
|||
static int CmdStatus(const char *Cmd) {
|
||||
(void)Cmd; // Cmd is not used so far
|
||||
clearCommandBuffer();
|
||||
UsbReplyNG resp;
|
||||
UsbCommandOLD c = {CMD_STATUS, {0, 0, 0}, {{0}}};
|
||||
PacketResponseNG resp;
|
||||
PacketCommandOLD c = {CMD_STATUS, {0, 0, 0}, {{0}}};
|
||||
SendCommand(&c);
|
||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, 1900))
|
||||
PrintAndLogEx(NORMAL, "Status command failed. USB Speed Test timed out");
|
||||
|
@ -429,8 +429,8 @@ static int CmdStatus(const char *Cmd) {
|
|||
static int CmdPing(const char *Cmd) {
|
||||
(void)Cmd; // Cmd is not used so far
|
||||
clearCommandBuffer();
|
||||
UsbReplyNG resp;
|
||||
UsbCommandOLD c = {CMD_PING, {0, 0, 0}, {{0}}};
|
||||
PacketResponseNG resp;
|
||||
PacketCommandOLD c = {CMD_PING, {0, 0, 0}, {{0}}};
|
||||
SendCommand(&c);
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1000))
|
||||
PrintAndLogEx(NORMAL, "Ping successful");
|
||||
|
@ -445,7 +445,7 @@ static int CmdPingNG(const char *Cmd) {
|
|||
len = USB_CMD_DATA_SIZE;
|
||||
PrintAndLogEx(NORMAL, "PingNG sent with payload len=%d", len);
|
||||
clearCommandBuffer();
|
||||
UsbReplyNG resp;
|
||||
PacketResponseNG resp;
|
||||
uint8_t data[USB_CMD_DATA_SIZE] = {0};
|
||||
uint16_t cmd = CMD_PING;
|
||||
for (uint16_t i = 0; i < len; i++)
|
||||
|
@ -496,8 +496,8 @@ int CmdHW(const char *Cmd) {
|
|||
void pm3_version(bool verbose) {
|
||||
if (!verbose)
|
||||
return;
|
||||
UsbCommandOLD c = {CMD_VERSION, {0, 0, 0}, {{0}}};
|
||||
UsbReplyNG resp;
|
||||
PacketCommandOLD c = {CMD_VERSION, {0, 0, 0}, {{0}}};
|
||||
PacketResponseNG resp;
|
||||
clearCommandBuffer();
|
||||
SendCommand(&c);
|
||||
if (WaitForResponseTimeout(CMD_ACK, &resp, 1000)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue