- for (int i = offset; i < n+offset; i += 12) {
- UsbCommand c = {CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K, {i, 0, 0}};
- SendCommand(&c);
- WaitForResponse(CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K);
- for (int j = 0; j < 48; j += 8) {
- fprintf(f, "%02x %02x %02x %02x %02x %02x %02x %02x\n",
- sample_buf[j+0],
- sample_buf[j+1],
- sample_buf[j+2],
- sample_buf[j+3],
- sample_buf[j+4],
- sample_buf[j+5],
- sample_buf[j+6],
- sample_buf[j+7]
- );
- delivered += 8;
- if (delivered >= requested)
- break;
- }
+ GetFromBigBuf(got,requested,offset);
+ WaitForResponse(CMD_ACK,NULL);
+
+ for (int j = 0; j < requested; j += 8) {
+ fprintf(f, "%02x %02x %02x %02x %02x %02x %02x %02x\n",
+ got[j+0],
+ got[j+1],
+ got[j+2],
+ got[j+3],
+ got[j+4],
+ got[j+5],
+ got[j+6],
+ got[j+7]
+ );
+ delivered += 8;