mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-14 18:48:13 -07: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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue