From 6b5a0f8319bd6e0367fb2b8db2fa6da0cbfe4ef6 Mon Sep 17 00:00:00 2001 From: Philippe Teuwen Date: Sat, 4 May 2019 23:56:59 +0200 Subject: [PATCH] Rename and unguard CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K ans it's used more generally than LF --- armsrc/appmain.c | 8 ++++---- client/comms.c | 6 +++--- include/pm3_cmd.h | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/armsrc/appmain.c b/armsrc/appmain.c index cebfd71e2..cfdfb2ea0 100644 --- a/armsrc/appmain.c +++ b/armsrc/appmain.c @@ -386,7 +386,7 @@ void printUSBSpeed(void) { LED_B_ON(); while (end_time < start_time + USB_SPEED_TEST_MIN_TIME) { - reply_ng(CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K, PM3_SUCCESS, test_data, PM3_CMD_DATA_SIZE); + reply_ng(CMD_DOWNLOADED_BIGBUF, PM3_SUCCESS, test_data, PM3_CMD_DATA_SIZE); end_time = GetTickCount(); bytes_transferred += PM3_CMD_DATA_SIZE; } @@ -1246,8 +1246,7 @@ static void PacketReceived(PacketCommandNG *packet) { SpinDelay(200); LED_D_OFF(); // LED D indicates field ON or OFF break; -#ifdef WITH_LF - case CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K: { + case CMD_DOWNLOAD_BIGBUF: { LED_B_ON(); uint8_t *mem = BigBuf_get_addr(); uint32_t startidx = packet->oldarg[0]; @@ -1259,7 +1258,7 @@ static void PacketReceived(PacketCommandNG *packet) { for (size_t i = 0; i < numofbytes; i += PM3_CMD_DATA_SIZE) { size_t len = MIN((numofbytes - i), PM3_CMD_DATA_SIZE); - int result = reply_old(CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K, i, len, BigBuf_get_traceLen(), mem + startidx + i, len); + int result = reply_old(CMD_DOWNLOADED_BIGBUF, i, len, BigBuf_get_traceLen(), mem + startidx + i, len); if (result != PM3_SUCCESS) Dbprintf("transfer to client failed :: | bytes between %d - %d (%d) | result: %d", i, i + len, len, result); } @@ -1273,6 +1272,7 @@ static void PacketReceived(PacketCommandNG *packet) { LED_B_OFF(); break; } +#ifdef WITH_LF case CMD_UPLOAD_SIM_SAMPLES_125K: { // iceman; since changing fpga_bitstreams clears bigbuff, Its better to call it before. // to be able to use this one for uploading data to device diff --git a/client/comms.c b/client/comms.c index e717ac26d..0acec93d4 100644 --- a/client/comms.c +++ b/client/comms.c @@ -295,7 +295,7 @@ static void PacketResponseReceived(PacketResponseNG *packet) { break; } // iceman: hw status - down the path on device, runs printusbspeed which starts sending a lot of - // CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K packages which is not dealt with. I wonder if simply ignoring them will + // CMD_DOWNLOAD_BIGBUF packages which is not dealt with. I wonder if simply ignoring them will // work. lets try it. default: { storeReply(packet); @@ -755,8 +755,8 @@ bool GetFromDevice(DeviceMemType_t memtype, uint8_t *dest, uint32_t bytes, uint3 switch (memtype) { case BIG_BUF: { - SendCommandOLD(CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K, start_index, bytes, 0, NULL, 0); - return dl_it(dest, bytes, start_index, response, ms_timeout, show_warning, CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K); + SendCommandOLD(CMD_DOWNLOAD_BIGBUF, start_index, bytes, 0, NULL, 0); + return dl_it(dest, bytes, start_index, response, ms_timeout, show_warning, CMD_DOWNLOADED_BIGBUF); } case BIG_BUF_EML: { SendCommandOLD(CMD_DOWNLOAD_EML_BIGBUF, start_index, bytes, 0, NULL, 0); diff --git a/include/pm3_cmd.h b/include/pm3_cmd.h index 387b7bb9f..9f245d0e7 100644 --- a/include/pm3_cmd.h +++ b/include/pm3_cmd.h @@ -223,8 +223,8 @@ extern capabilities_t pm3_capabilities; #define CMD_DOWNLOADED_RAW_BITS_TI_TYPE 0x0204 #define CMD_ACQUIRE_RAW_ADC_SAMPLES_125K 0x0205 #define CMD_MOD_THEN_ACQUIRE_RAW_ADC_SAMPLES_125K 0x0206 -#define CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K 0x0207 -#define CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K 0x0208 +#define CMD_DOWNLOAD_BIGBUF 0x0207 +#define CMD_DOWNLOADED_BIGBUF 0x0208 #define CMD_UPLOAD_SIM_SAMPLES_125K 0x0209 #define CMD_SIMULATE_TAG_125K 0x020A #define CMD_HID_DEMOD_FSK 0x020B