]> git.zerfleddert.de Git - proxmark3-svn/blob - client/data.c
First check in.
[proxmark3-svn] / client / data.c
1 //-----------------------------------------------------------------------------
2 // Copyright (C) 2010 iZsh <izsh at fail0verflow.com>
3 //
4 // This code is licensed to you under the terms of the GNU GPL, version 2 or,
5 // at your option, any later version. See the LICENSE.txt file for the text of
6 // the license.
7 //-----------------------------------------------------------------------------
8 // Data utilities
9 //-----------------------------------------------------------------------------
10
11 #include <string.h>
12 #include <stdint.h>
13 #include "data.h"
14 #include "ui.h"
15 #include "proxmark3.h"
16 #include "cmdmain.h"
17
18 uint8_t* sample_buf;
19 size_t sample_buf_len;
20
21 void GetFromBigBuf(uint8_t *dest, int bytes, int start_index)
22 {
23 sample_buf_len = 0;
24 sample_buf = dest;
25 // start_index = ((start_index/12)*12);
26 // int n = start_index + bytes;
27 /*
28 if (n % 48 != 0) {
29 PrintAndLog("bad len in GetFromBigBuf");
30 return;
31 }
32 */
33 UsbCommand c = {CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K, {start_index, bytes, 0}};
34 SendCommand(&c);
35 /*
36 for (int i = start_index; i < n; i += 48) {
37 UsbCommand c = {CMD_DOWNLOAD_RAW_ADC_SAMPLES_125K, {i, 0, 0}};
38 SendCommand(&c);
39 // WaitForResponse(CMD_DOWNLOADED_RAW_ADC_SAMPLES_125K);
40 // memcpy(dest+(i*4), sample_buf, 48);
41 }
42 */
43 }
Impressum, Datenschutz