mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-04 20:13:38 +08:00
zx now builds after fixing corrent header.
This commit is contained in:
parent
7e43d6b8f4
commit
49ee82be19
5 changed files with 50 additions and 3 deletions
|
@ -48,7 +48,7 @@
|
|||
#include "ticks.h"
|
||||
#include "commonutil.h"
|
||||
#include "crc16.h"
|
||||
#include "zx8211.h"
|
||||
#include "lfzx.h"
|
||||
|
||||
|
||||
#ifdef WITH_LCD
|
||||
|
|
|
@ -11,14 +11,61 @@
|
|||
#define __LFOPS_H
|
||||
|
||||
#include "lfzx.h"
|
||||
#include "fpgaloader.h"
|
||||
#include "ticks.h"
|
||||
#include "dbprint.h"
|
||||
#include "lfadc.h"
|
||||
#include "pm3_cmd.h" // struct
|
||||
#include "zx8211.h"
|
||||
|
||||
|
||||
static void zx8211_setup_read(void) {
|
||||
|
||||
FpgaDownloadAndGo(FPGA_BITSTREAM_LF);
|
||||
FpgaWriteConfWord(FPGA_MAJOR_MODE_LF_ADC | FPGA_LF_ADC_READER_FIELD);
|
||||
|
||||
// 50ms for the resonant antenna to settle.
|
||||
SpinDelay(50);
|
||||
|
||||
// Now set up the SSC to get the ADC samples that are now streaming at us.
|
||||
FpgaSetupSsc(FPGA_MAJOR_MODE_LF_READER);
|
||||
|
||||
FpgaSendCommand(FPGA_CMD_SET_DIVISOR, LF_DIVISOR_125);
|
||||
|
||||
// Connect the A/D to the peak-detected low-frequency path.
|
||||
SetAdcMuxFor(GPIO_MUXSEL_LOPKD);
|
||||
|
||||
// Steal this pin from the SSP (SPI communication channel with fpga) and
|
||||
// use it to control the modulation
|
||||
AT91C_BASE_PIOA->PIO_PER = GPIO_SSC_DOUT;
|
||||
AT91C_BASE_PIOA->PIO_OER = GPIO_SSC_DOUT;
|
||||
|
||||
// Disable modulation at default, which means enable the field
|
||||
LOW(GPIO_SSC_DOUT);
|
||||
|
||||
// Start the timer
|
||||
StartTicks();
|
||||
|
||||
// Watchdog hit
|
||||
WDT_HIT();
|
||||
}
|
||||
|
||||
|
||||
int zx8211_read(zx8211_data_t *zxd, bool ledcontrol) {
|
||||
zx8211_setup_read();
|
||||
|
||||
StopTicks();
|
||||
lf_finalize(ledcontrol);
|
||||
//reply_ng(CMD_LF_ZX_READ, status, tag.data, sizeof(tag.data));
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
int zx8211_write(zx8211_data_t *zxd, bool ledcontrol) {
|
||||
zx8211_setup_read();
|
||||
|
||||
StopTicks();
|
||||
lf_finalize(ledcontrol);
|
||||
//reply_ng(CMD_LF_ZX_WRITE, status, tag.data, sizeof(tag.data));
|
||||
return PM3_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
@ -11,7 +11,6 @@
|
|||
#define __LFZX_H
|
||||
|
||||
#include "common.h"
|
||||
#include "pm3_cmd.h" // struct
|
||||
#include "zx8211.h"
|
||||
|
||||
int zx8211_read(zx8211_data_t *zxd, bool ledcontrol);
|
||||
|
|
|
@ -64,6 +64,7 @@ SKIP_FELICA=1
|
|||
SKIP_NFCBARCODE=1
|
||||
SKIP_HFSNIFF=1
|
||||
SKIP_HFPLOT=1
|
||||
SKIP_ZX8211=1
|
||||
endef
|
||||
|
||||
define KNOWN_DEFINITIONS
|
||||
|
|
|
@ -139,7 +139,7 @@ a series of `SKIP_*` allow to skip some of the functionalities and to get a smal
|
|||
|SKIP_NFCBARCODE=1 | 1.4kb
|
||||
|SKIP_HFSNIFF=1 | 0.5kb
|
||||
|SKIP_HFPLOT=1 | 0.3kb
|
||||
|
||||
|SKIP_ZX8211=1 | unknown yet
|
||||
|
||||
So for example, at the time of writing, this is a valid `Makefile.platform` compiling an image for 256k:
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue