mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2024-09-20 07:16:14 +08:00
hf read adc low level command
This commit is contained in:
parent
ded87056d4
commit
541c060a5d
|
@ -35,6 +35,7 @@ APP_CFLAGS = $(PLATFORM_DEFS) \
|
|||
-ffunction-sections -fdata-sections
|
||||
|
||||
SRC_LF = lfops.c lfsampling.c pcf7931.c lfdemod.c lfadc.c
|
||||
SRC_HF = hfops.c
|
||||
SRC_ISO15693 = iso15693.c iso15693tools.c
|
||||
SRC_ISO14443a = iso14443a.c mifareutil.c mifarecmd.c epa.c mifaresim.c
|
||||
#UNUSED: mifaresniff.c
|
||||
|
@ -132,6 +133,7 @@ THUMBSRC = start.c \
|
|||
$(SRC_EM4x50) \
|
||||
$(SRC_EM4x70) \
|
||||
$(SRC_SPIFFS) \
|
||||
$(SRC_HF) \
|
||||
$(SRC_ISO14443a) \
|
||||
$(SRC_ISO14443b) \
|
||||
$(SRC_CRAPTO1) \
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "legicrf.h"
|
||||
#include "BigBuf.h"
|
||||
#include "iclass_cmd.h"
|
||||
#include "hfops.h"
|
||||
#include "iso14443a.h"
|
||||
#include "iso14443b.h"
|
||||
#include "iso15693.h"
|
||||
|
@ -1384,6 +1385,15 @@ static void PacketReceived(PacketCommandNG *packet) {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_GENERAL_HF
|
||||
case CMD_HF_ACQ_RAW_ADC: {
|
||||
uint32_t samplesCount = 0;
|
||||
memcpy(&samplesCount, packet->data.asBytes, 4);
|
||||
HfReadADC(samplesCount);
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef WITH_ISO14443a
|
||||
case CMD_HF_ISO14443A_PRINT_CONFIG: {
|
||||
printHf14aConfig();
|
||||
|
|
41
armsrc/hfops.c
Normal file
41
armsrc/hfops.c
Normal file
|
@ -0,0 +1,41 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// See LICENSE.txt for the text of the license.
|
||||
//-----------------------------------------------------------------------------
|
||||
// HF general operations
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#include "hfops.h"
|
||||
|
||||
#include "proxmark3_arm.h"
|
||||
#include "cmd.h"
|
||||
#include "BigBuf.h"
|
||||
#include "fpgaloader.h"
|
||||
#include "ticks.h"
|
||||
#include "dbprint.h"
|
||||
#include "util.h"
|
||||
#include "commonutil.h"
|
||||
|
||||
|
||||
int HfReadADC(uint32_t samplesCount) {
|
||||
|
||||
|
||||
|
||||
|
||||
DbpString("HfReadADC " _GREEN_("success"));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
27
armsrc/hfops.h
Normal file
27
armsrc/hfops.h
Normal file
|
@ -0,0 +1,27 @@
|
|||
//-----------------------------------------------------------------------------
|
||||
// Copyright (C) Proxmark3 contributors. See AUTHORS.md for details.
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// See LICENSE.txt for the text of the license.
|
||||
//-----------------------------------------------------------------------------
|
||||
// HF general operations
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#ifndef HFOPS_H
|
||||
#define HFOPS_H
|
||||
|
||||
#include "common.h"
|
||||
|
||||
int HfReadADC(uint32_t samplesCount);
|
||||
|
||||
|
||||
#endif
|
|
@ -40,8 +40,8 @@ static int CmdHFTexkomReader(const char *Cmd) {
|
|||
CLIExecWithReturn(ctx, Cmd, argtable, true);
|
||||
CLIParserFree(ctx);
|
||||
|
||||
// uint8_t param = 0;
|
||||
// SendCommandNG(CMD_HF_TEXKOM_READER, (uint8_t *)¶m, sizeof(uint8_t));
|
||||
uint32_t samplesCount = 40000;
|
||||
SendCommandNG(CMD_HF_ACQ_RAW_ADC, (uint8_t *)&samplesCount, sizeof(uint32_t));
|
||||
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -143,6 +143,9 @@ ifneq ($(SKIP_ZX8211),1)
|
|||
endif
|
||||
|
||||
# common HF support
|
||||
ifneq ($(SKIP_HF),1)
|
||||
PLATFORM_DEFS += -DWITH_GENERAL_HF
|
||||
endif
|
||||
ifneq ($(SKIP_ISO15693),1)
|
||||
PLATFORM_DEFS += -DWITH_ISO15693
|
||||
endif
|
||||
|
|
|
@ -511,6 +511,7 @@ typedef struct {
|
|||
|
||||
// For the 13.56 MHz tags
|
||||
#define CMD_HF_ISO15693_ACQ_RAW_ADC 0x0300
|
||||
#define CMD_HF_ACQ_RAW_ADC 0x0301
|
||||
#define CMD_HF_SRI_READ 0x0303
|
||||
#define CMD_HF_ISO14443B_COMMAND 0x0305
|
||||
#define CMD_HF_ISO15693_READER 0x0310
|
||||
|
|
Loading…
Reference in a new issue