CHG: Added calling clear bigbuff to zero out it also, instead of just "free" it.

ADD:  downloading the EML part from BigBuffer specially.
This commit is contained in:
iceman1001
2016-03-12 09:03:28 +01:00
parent 6063655a3c
commit aaa1a9a2dc
16 changed files with 91 additions and 48 deletions

View File

@@ -197,14 +197,15 @@ void UsbCommandReceived(UsbCommand *UC)
return;
} break;
case CMD_DEBUG_PRINT_INTEGERS:
case CMD_DEBUG_PRINT_INTEGERS: {
PrintAndLog("#db# %08x, %08x, %08x", UC->arg[0], UC->arg[1], UC->arg[2]);
break;
}
case CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K:
case CMD_DOWNLOADED_EML_BIGBUF: {
memcpy( sample_buf + (UC->arg[0]), UC->d.asBytes, UC->arg[1]);
break;
}
default: {
storeCommand(UC);
break;

View File

@@ -23,3 +23,10 @@ void GetFromBigBuf(uint8_t *dest, int bytes, int start_index) {
clearCommandBuffer();
SendCommand(&c);
}
void GetEMLFromBigBuf(uint8_t *dest, int bytes, int start_index) {
sample_buf = dest;
UsbCommand c = {CMD_DOWNLOAD_EML_BIGBUF, {start_index, bytes, 0}};
clearCommandBuffer();
SendCommand(&c);
}

View File

@@ -19,5 +19,5 @@ extern uint8_t* sample_buf;
#define arraylen(x) (sizeof(x)/sizeof((x)[0]))
void GetFromBigBuf(uint8_t *dest, int bytes, int start_index);
void GetEMLFromBigBuf(uint8_t *dest, int bytes, int start_index);
#endif

View File

@@ -52,6 +52,9 @@ typedef struct {
#define CMD_VERSION 0x0107
#define CMD_STATUS 0x0108
#define CMD_PING 0x0109
#define CMD_DOWNLOAD_EML_BIGBUF 0x0110
#define CMD_DOWNLOADED_EML_BIGBUF 0x0111
// For low-frequency tags
#define CMD_READ_TI_TYPE 0x0202

View File

@@ -22,6 +22,9 @@ local _commands = {
CMD_VERSION = 0x0107,
CMD_STATUS = 0x0108,
CMD_PING = 0x0109,
CMD_DOWNLOAD_EML_BIGBUF = 0x0110,
CMD_DOWNLOADED_EML_BIGBUF = 0x0111,
--// For low-frequency tags
CMD_READ_TI_TYPE = 0x0202,
CMD_WRITE_TI_TYPE = 0x0203,