Rename and unguard CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K ans it's used more generally than LF

This commit is contained in:
Philippe Teuwen 2019-05-04 23:56:59 +02:00
commit 6b5a0f8319
3 changed files with 9 additions and 9 deletions

View file

@ -386,7 +386,7 @@ void printUSBSpeed(void) {
LED_B_ON(); LED_B_ON();
while (end_time < start_time + USB_SPEED_TEST_MIN_TIME) { 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(); end_time = GetTickCount();
bytes_transferred += PM3_CMD_DATA_SIZE; bytes_transferred += PM3_CMD_DATA_SIZE;
} }
@ -1246,8 +1246,7 @@ static void PacketReceived(PacketCommandNG *packet) {
SpinDelay(200); SpinDelay(200);
LED_D_OFF(); // LED D indicates field ON or OFF LED_D_OFF(); // LED D indicates field ON or OFF
break; break;
#ifdef WITH_LF case CMD_DOWNLOAD_BIGBUF: {
case CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K: {
LED_B_ON(); LED_B_ON();
uint8_t *mem = BigBuf_get_addr(); uint8_t *mem = BigBuf_get_addr();
uint32_t startidx = packet->oldarg[0]; 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) { for (size_t i = 0; i < numofbytes; i += PM3_CMD_DATA_SIZE) {
size_t len = MIN((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) if (result != PM3_SUCCESS)
Dbprintf("transfer to client failed :: | bytes between %d - %d (%d) | result: %d", i, i + len, len, result); 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(); LED_B_OFF();
break; break;
} }
#ifdef WITH_LF
case CMD_UPLOAD_SIM_SAMPLES_125K: { case CMD_UPLOAD_SIM_SAMPLES_125K: {
// iceman; since changing fpga_bitstreams clears bigbuff, Its better to call it before. // 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 // to be able to use this one for uploading data to device

View file

@ -295,7 +295,7 @@ static void PacketResponseReceived(PacketResponseNG *packet) {
break; break;
} }
// iceman: hw status - down the path on device, runs printusbspeed which starts sending a lot of // 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. // work. lets try it.
default: { default: {
storeReply(packet); storeReply(packet);
@ -755,8 +755,8 @@ bool GetFromDevice(DeviceMemType_t memtype, uint8_t *dest, uint32_t bytes, uint3
switch (memtype) { switch (memtype) {
case BIG_BUF: { case BIG_BUF: {
SendCommandOLD(CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K, start_index, bytes, 0, NULL, 0); SendCommandOLD(CMD_DOWNLOAD_BIGBUF, start_index, bytes, 0, NULL, 0);
return dl_it(dest, bytes, start_index, response, ms_timeout, show_warning, CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K); return dl_it(dest, bytes, start_index, response, ms_timeout, show_warning, CMD_DOWNLOADED_BIGBUF);
} }
case BIG_BUF_EML: { case BIG_BUF_EML: {
SendCommandOLD(CMD_DOWNLOAD_EML_BIGBUF, start_index, bytes, 0, NULL, 0); SendCommandOLD(CMD_DOWNLOAD_EML_BIGBUF, start_index, bytes, 0, NULL, 0);

View file

@ -223,8 +223,8 @@ extern capabilities_t pm3_capabilities;
#define CMD_DOWNLOADED_RAW_BITS_TI_TYPE 0x0204 #define CMD_DOWNLOADED_RAW_BITS_TI_TYPE 0x0204
#define CMD_ACQUIRE_RAW_ADC_SAMPLES_125K 0x0205 #define CMD_ACQUIRE_RAW_ADC_SAMPLES_125K 0x0205
#define CMD_MOD_THEN_ACQUIRE_RAW_ADC_SAMPLES_125K 0x0206 #define CMD_MOD_THEN_ACQUIRE_RAW_ADC_SAMPLES_125K 0x0206
#define CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K 0x0207 #define CMD_DOWNLOAD_BIGBUF 0x0207
#define CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K 0x0208 #define CMD_DOWNLOADED_BIGBUF 0x0208
#define CMD_UPLOAD_SIM_SAMPLES_125K 0x0209 #define CMD_UPLOAD_SIM_SAMPLES_125K 0x0209
#define CMD_SIMULATE_TAG_125K 0x020A #define CMD_SIMULATE_TAG_125K 0x020A
#define CMD_HID_DEMOD_FSK 0x020B #define CMD_HID_DEMOD_FSK 0x020B