X-Git-Url: http://git.zerfleddert.de/cgi-bin/gitweb.cgi/proxmark3-svn/blobdiff_plain/cd028159be9a6a3d7b158d2076cc94bf2b4f1143..98a67bc908980d93328a4436a1e5fd2a4ace16f7:/armsrc/fpgaloader.h diff --git a/armsrc/fpgaloader.h b/armsrc/fpgaloader.h index 09eaec42..57e9c28a 100644 --- a/armsrc/fpgaloader.h +++ b/armsrc/fpgaloader.h @@ -35,15 +35,17 @@ void SetAdcMuxFor(uint32_t whichGpio); #define FPGA_BITSTREAM_HF 2 // Definitions for the FPGA commands. +#define FPGA_CMD_MASK 0xF000 // BOTH -#define FPGA_CMD_SET_CONFREG (1<<12) +#define FPGA_CMD_SET_CONFREG (1<<12) // LF -#define FPGA_CMD_SET_DIVISOR (2<<12) -#define FPGA_CMD_SET_USER_BYTE1 (3<<12) +#define FPGA_CMD_SET_DIVISOR (2<<12) +#define FPGA_CMD_SET_EDGE_DETECT_THRESHOLD (3<<12) // HF -#define FPGA_CMD_TRACE_ENABLE (2<<12) +#define FPGA_CMD_TRACE_ENABLE (2<<12) // Definitions for the FPGA configuration word. +#define FPGA_MAJOR_MODE_MASK 0x01C0 // LF #define FPGA_MAJOR_MODE_LF_ADC (0<<6) #define FPGA_MAJOR_MODE_LF_EDGE_DETECT (1<<6) @@ -57,13 +59,13 @@ void SetAdcMuxFor(uint32_t whichGpio); // BOTH #define FPGA_MAJOR_MODE_OFF (7<<6) +#define FPGA_MINOR_MODE_MASK 0x003F // Options for LF_ADC #define FPGA_LF_ADC_READER_FIELD (1<<0) // Options for LF_EDGE_DETECT -#define FPGA_CMD_SET_EDGE_DETECT_THRESHOLD FPGA_CMD_SET_USER_BYTE1 #define FPGA_LF_EDGE_DETECT_READER_FIELD (1<<0) -#define FPGA_LF_EDGE_DETECT_TOGGLE_MODE (1<<1) +#define FPGA_LF_EDGE_DETECT_TOGGLE_MODE (2<<0) // Options for the HF reader #define FPGA_HF_READER_MODE_RECEIVE_IQ (0<<0)