]> cvs.zerfleddert.de Git - proxmark3-svn/blame - client/data.c
Fix windows compilation issues. But still not final. We should move to pthread and...
[proxmark3-svn] / client / data.c
CommitLineData
7fe9b0b7 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
8uint8_t sample_buf[SAMPLE_BUFFER_SIZE];
9
10void 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