diff --git a/armsrc/appmain.c b/armsrc/appmain.c index 325adf783..9c2ab9f78 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -3351,14 +3351,14 @@ static void PacketReceived(PacketCommandNG *packet) { LED_B_OFF(); break; } - case CMD_FLASHMEM_INFO: { + case CMD_FLASHMEM_GET_ID: { uint64_t flash_uniqueID = 0; bool isok = FlashInit(); if (isok) { isok = Flash_UniqueID((uint8_t *)(&flash_uniqueID)); FlashStop(); } - reply_ng(CMD_FLASHMEM_INFO, (isok) ? PM3_SUCCESS : PM3_EFLASH, (uint8_t *)&flash_uniqueID, sizeof(flash_uniqueID)); + reply_ng(CMD_FLASHMEM_GET_ID, (isok) ? PM3_SUCCESS : PM3_EFLASH, (uint8_t *)&flash_uniqueID, sizeof(flash_uniqueID)); break; } #endif @@ -3579,7 +3579,7 @@ static void PacketReceived(PacketCommandNG *packet) { reply_ng(CMD_EEPROM_FACTORY_INFO_WRITE, PM3_SUCCESS, NULL, 0); break; } - case CMD_FPGA_CMD_SET_PWR_PWM_LOW_COUNT: { + case CMD_PM5_FPGA_SET_PWR_PWM_LOW_COUNT: { struct p { uint8_t is_lf; uint16_t count; @@ -3587,7 +3587,7 @@ static void PacketReceived(PacketCommandNG *packet) { struct p *payload = (struct p *) packet->data.asBytes; FpgaDownloadAndGo(payload->is_lf ? FPGA_BITSTREAM_LF : FPGA_BITSTREAM_HF); FpgaSendCommand(FPGA_CMD_SET_PWR_PWM_LOW_COUNT, payload->count & 0xFFF); - reply_ng(CMD_FPGA_CMD_SET_PWR_PWM_LOW_COUNT, PM3_SUCCESS, NULL, 0); + reply_ng(CMD_PM5_FPGA_SET_PWR_PWM_LOW_COUNT, PM3_SUCCESS, NULL, 0); break; } #endif diff --git a/client/src/cmdfpga.c b/client/src/cmdfpga.c index 0523fcc23..9981d1dd9 100644 --- a/client/src/cmdfpga.c +++ b/client/src/cmdfpga.c @@ -169,11 +169,11 @@ static int CmdFpgaSetPowerPWM(const char *Cmd) { // Start fpga config by mode PacketResponseNG resp; - SendCommandNG(CMD_FPGA_CMD_SET_PWR_PWM_LOW_COUNT, (uint8_t *)¶ms, sizeof(params)); + SendCommandNG(CMD_PM5_FPGA_SET_PWR_PWM_LOW_COUNT, (uint8_t *)¶ms, sizeof(params)); PrintAndLogEx(INFO, "PWM value: " _YELLOW_("%d") ", for %s", count, is_lf ? "LF driver" : "HF driver"); // Wait for response before sending data - if (WaitForResponseTimeout(CMD_FPGA_CMD_SET_PWR_PWM_LOW_COUNT, &resp, 15000) == false) { + if (WaitForResponseTimeout(CMD_PM5_FPGA_SET_PWR_PWM_LOW_COUNT, &resp, 15000) == false) { PrintAndLogEx(WARNING, "set power pwm for fpga timeout while waiting for reply"); return PM3_ETIMEOUT; } diff --git a/include/pm3_cmd.h b/include/pm3_cmd.h index cbd25a3b0..eb3d7d249 100644 --- a/include/pm3_cmd.h +++ b/include/pm3_cmd.h @@ -568,7 +568,7 @@ typedef struct { #define CMD_FLASHMEM_DOWNLOAD 0x0123 #define CMD_FLASHMEM_DOWNLOADED 0x0124 // DXL: I found that this command did not seem to have been used before, so it can be used to obtain the unique ID of FLASH MEM. -#define CMD_FLASHMEM_INFO 0x0125 +#define CMD_FLASHMEM_GET_ID 0x0125 #define CMD_FLASHMEM_SET_SPIBAUDRATE 0x0126 #define CMD_FLASHMEM_PAGES64K 0x0127 @@ -835,7 +835,7 @@ typedef struct { #define CMD_FPGA_BITSTREAM_CONFIG_FINISH 0x0503 // For fpga set pwm output for driver voltage adjust -#define CMD_FPGA_CMD_SET_PWR_PWM_LOW_COUNT 0x0504 +#define CMD_PM5_FPGA_SET_PWR_PWM_LOW_COUNT 0x0504 // For mifare commands #define CMD_HF_MIFARE_EML_MEMCLR 0x0601 diff --git a/tools/deprecated-hid-flasher/flasher/usb_cmd.h b/tools/deprecated-hid-flasher/flasher/usb_cmd.h index ab8cc3b8c..3d25ed394 100644 --- a/tools/deprecated-hid-flasher/flasher/usb_cmd.h +++ b/tools/deprecated-hid-flasher/flasher/usb_cmd.h @@ -63,7 +63,7 @@ typedef struct { #define CMD_FLASHMEM_WIPE 0x0122 #define CMD_FLASHMEM_DOWNLOAD 0x0123 #define CMD_FLASHMEM_DOWNLOADED 0x0124 -#define CMD_FLASHMEM_INFO 0x0125 +#define CMD_FLASHMEM_GET_ID 0x0125 // For low-frequency tags #define CMD_LF_TI_READ 0x0202