]> cvs.zerfleddert.de Git - proxmark3-svn/blob - client/data.c
/client/Makefile: Output object files to the obj subdir.
[proxmark3-svn] / client / data.c
1 #include <string.h>
2 #include <stdint.h>
3 #include "data.h"
4 #include "ui.h"
5 #include "proxusb.h"
6 #include "cmdmain.h"
7
8 uint8_t sample_buf[SAMPLE_BUFFER_SIZE];
9
10 void GetFromBigBuf(uint8_t *dest, int bytes)
11 {
12 int n = bytes/4;
13
14 if (n % 48 != 0) {
15 PrintAndLog("bad len in GetFromBigBuf");
16 return;
17 }
18
19 for (int i = 0; i < n; i += 12) {
20 UsbCommand c = {CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K, {i, 0, 0}};
21 SendCommand(&c);
22 WaitForResponse(CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K);
23 memcpy(dest+(i*4), sample_buf, 48);
24 }
25 }
Impressum, Datenschutz