mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-21 05:43:48 -07:00
fill samples - get samples
This commit is contained in:
parent
0392cfaa9b
commit
f007db6661
2 changed files with 11 additions and 2 deletions
|
@ -26,6 +26,7 @@
|
|||
#include "dbprint.h"
|
||||
#include "util.h"
|
||||
#include "commonutil.h"
|
||||
#include "lfsampling.h"
|
||||
|
||||
|
||||
int HfReadADC(uint32_t samplesCount, bool ledcontrol) {
|
||||
|
@ -58,6 +59,9 @@ int HfReadADC(uint32_t samplesCount, bool ledcontrol) {
|
|||
//uint32_t dma_start_time = 0;
|
||||
uint16_t *upTo = dma->buf;
|
||||
|
||||
uint32_t sbs = samplesCount;
|
||||
initSampleBuffer(&sbs);
|
||||
|
||||
for (;;) {
|
||||
if (BUTTON_PRESS()) {
|
||||
break;
|
||||
|
@ -95,8 +99,10 @@ int HfReadADC(uint32_t samplesCount, bool ledcontrol) {
|
|||
}
|
||||
|
||||
|
||||
logSample(50, 1, 8, false);
|
||||
|
||||
|
||||
if (getSampleCounter() >= samplesCount)
|
||||
break;
|
||||
}
|
||||
|
||||
FpgaDisableSscDma();
|
||||
|
@ -109,7 +115,7 @@ int HfReadADC(uint32_t samplesCount, bool ledcontrol) {
|
|||
reply_ng(CMD_HF_ACQ_RAW_ADC, PM3_SUCCESS, NULL, 0);
|
||||
if (ledcontrol) LEDsoff();
|
||||
|
||||
DbpString("HfReadADC " _GREEN_("success"));
|
||||
Dbprintf("-- samples: %d", getSampleCounter());
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -26,6 +26,7 @@
|
|||
#include "comms.h"
|
||||
#include "ui.h"
|
||||
#include "cmdhf14a.h"
|
||||
#include "cmddata.h"
|
||||
|
||||
static int CmdHFTexkomReader(const char *Cmd) {
|
||||
CLIParserContext *ctx;
|
||||
|
@ -50,6 +51,8 @@ static int CmdHFTexkomReader(const char *Cmd) {
|
|||
return PM3_ETIMEOUT;
|
||||
}
|
||||
|
||||
getSamples(samplesCount, true);
|
||||
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue