rename a couple of commands
This commit is contained in:
4 files changed
+9
-9
No files matched your search
+4
-4
@@ -3351,14 +3351,14 @@ static void PacketReceived(PacketCommandNG *packet) {
|
|||||||
LED_B_OFF();
|
LED_B_OFF();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CMD_FLASHMEM_INFO: {
|
case CMD_FLASHMEM_GET_ID: {
|
||||||
uint64_t flash_uniqueID = 0;
|
uint64_t flash_uniqueID = 0;
|
||||||
bool isok = FlashInit();
|
bool isok = FlashInit();
|
||||||
if (isok) {
|
if (isok) {
|
||||||
isok = Flash_UniqueID((uint8_t *)(&flash_uniqueID));
|
isok = Flash_UniqueID((uint8_t *)(&flash_uniqueID));
|
||||||
FlashStop();
|
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;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@@ -3579,7 +3579,7 @@ static void PacketReceived(PacketCommandNG *packet) {
|
|||||||
reply_ng(CMD_EEPROM_FACTORY_INFO_WRITE, PM3_SUCCESS, NULL, 0);
|
reply_ng(CMD_EEPROM_FACTORY_INFO_WRITE, PM3_SUCCESS, NULL, 0);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case CMD_FPGA_CMD_SET_PWR_PWM_LOW_COUNT: {
|
case CMD_PM5_FPGA_SET_PWR_PWM_LOW_COUNT: {
|
||||||
struct p {
|
struct p {
|
||||||
uint8_t is_lf;
|
uint8_t is_lf;
|
||||||
uint16_t count;
|
uint16_t count;
|
||||||
@@ -3587,7 +3587,7 @@ static void PacketReceived(PacketCommandNG *packet) {
|
|||||||
struct p *payload = (struct p *) packet->data.asBytes;
|
struct p *payload = (struct p *) packet->data.asBytes;
|
||||||
FpgaDownloadAndGo(payload->is_lf ? FPGA_BITSTREAM_LF : FPGA_BITSTREAM_HF);
|
FpgaDownloadAndGo(payload->is_lf ? FPGA_BITSTREAM_LF : FPGA_BITSTREAM_HF);
|
||||||
FpgaSendCommand(FPGA_CMD_SET_PWR_PWM_LOW_COUNT, payload->count & 0xFFF);
|
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;
|
break;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -169,11 +169,11 @@ static int CmdFpgaSetPowerPWM(const char *Cmd) {
|
|||||||
|
|
||||||
// Start fpga config by mode
|
// Start fpga config by mode
|
||||||
PacketResponseNG resp;
|
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");
|
PrintAndLogEx(INFO, "PWM value: " _YELLOW_("%d") ", for %s", count, is_lf ? "LF driver" : "HF driver");
|
||||||
|
|
||||||
// Wait for response before sending data
|
// 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");
|
PrintAndLogEx(WARNING, "set power pwm for fpga timeout while waiting for reply");
|
||||||
return PM3_ETIMEOUT;
|
return PM3_ETIMEOUT;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -568,7 +568,7 @@ typedef struct {
|
|||||||
#define CMD_FLASHMEM_DOWNLOAD 0x0123
|
#define CMD_FLASHMEM_DOWNLOAD 0x0123
|
||||||
#define CMD_FLASHMEM_DOWNLOADED 0x0124
|
#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.
|
// 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_SET_SPIBAUDRATE 0x0126
|
||||||
#define CMD_FLASHMEM_PAGES64K 0x0127
|
#define CMD_FLASHMEM_PAGES64K 0x0127
|
||||||
|
|
||||||
@@ -835,7 +835,7 @@ typedef struct {
|
|||||||
#define CMD_FPGA_BITSTREAM_CONFIG_FINISH 0x0503
|
#define CMD_FPGA_BITSTREAM_CONFIG_FINISH 0x0503
|
||||||
|
|
||||||
// For fpga set pwm output for driver voltage adjust
|
// 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
|
// For mifare commands
|
||||||
#define CMD_HF_MIFARE_EML_MEMCLR 0x0601
|
#define CMD_HF_MIFARE_EML_MEMCLR 0x0601
|
||||||
|
|||||||
@@ -63,7 +63,7 @@ typedef struct {
|
|||||||
#define CMD_FLASHMEM_WIPE 0x0122
|
#define CMD_FLASHMEM_WIPE 0x0122
|
||||||
#define CMD_FLASHMEM_DOWNLOAD 0x0123
|
#define CMD_FLASHMEM_DOWNLOAD 0x0123
|
||||||
#define CMD_FLASHMEM_DOWNLOADED 0x0124
|
#define CMD_FLASHMEM_DOWNLOADED 0x0124
|
||||||
#define CMD_FLASHMEM_INFO 0x0125
|
#define CMD_FLASHMEM_GET_ID 0x0125
|
||||||
|
|
||||||
// For low-frequency tags
|
// For low-frequency tags
|
||||||
#define CMD_LF_TI_READ 0x0202
|
#define CMD_LF_TI_READ 0x0202
|
||||||
|
|||||||
Reference in new issue
Block a user