mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 05:13:46 -07:00
refactor: move FPGA_BITSTREAM_* to fpga.h
This commit is contained in:
parent
5d66bcfd75
commit
8928883f2d
5 changed files with 15 additions and 6 deletions
|
@ -20,6 +20,7 @@
|
||||||
#define __FPGALOADER_H
|
#define __FPGALOADER_H
|
||||||
|
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
#include "fpga.h"
|
||||||
|
|
||||||
#define FpgaDisableSscDma(void) AT91C_BASE_PDC_SSC->PDC_PTCR = AT91C_PDC_RXTDIS;
|
#define FpgaDisableSscDma(void) AT91C_BASE_PDC_SSC->PDC_PTCR = AT91C_PDC_RXTDIS;
|
||||||
#define FpgaEnableSscDma(void) AT91C_BASE_PDC_SSC->PDC_PTCR = AT91C_PDC_RXTEN;
|
#define FpgaEnableSscDma(void) AT91C_BASE_PDC_SSC->PDC_PTCR = AT91C_PDC_RXTEN;
|
||||||
|
|
|
@ -44,6 +44,7 @@
|
||||||
#include "preferences.h"
|
#include "preferences.h"
|
||||||
#include "mifare/gen4.h"
|
#include "mifare/gen4.h"
|
||||||
#include "generator.h" // keygens.
|
#include "generator.h" // keygens.
|
||||||
|
#include "fpga.h"
|
||||||
|
|
||||||
static int CmdHelp(const char *Cmd);
|
static int CmdHelp(const char *Cmd);
|
||||||
|
|
||||||
|
|
|
@ -67,6 +67,7 @@
|
||||||
#include "cmdlfzx8211.h" // for ZX8211 menu
|
#include "cmdlfzx8211.h" // for ZX8211 menu
|
||||||
#include "crc.h"
|
#include "crc.h"
|
||||||
#include "pm3_cmd.h" // for LF_CMDREAD_MAX_EXTRA_SYMBOLS
|
#include "pm3_cmd.h" // for LF_CMDREAD_MAX_EXTRA_SYMBOLS
|
||||||
|
#include "fpga.h" // for set_fpga_mode
|
||||||
|
|
||||||
static int CmdHelp(const char *Cmd);
|
static int CmdHelp(const char *Cmd);
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,17 @@
|
||||||
#define FPGA_RING_BUFFER_BYTES (1024 * 30)
|
#define FPGA_RING_BUFFER_BYTES (1024 * 30)
|
||||||
#define FPGA_TRACE_SIZE 3072
|
#define FPGA_TRACE_SIZE 3072
|
||||||
|
|
||||||
|
// definitions for multiple FPGA config files support
|
||||||
|
typedef enum
|
||||||
|
{
|
||||||
|
FPGA_BITSTREAM_UNKNOWN = 0,
|
||||||
|
FPGA_BITSTREAM_LF = 1,
|
||||||
|
FPGA_BITSTREAM_HF,
|
||||||
|
FPGA_BITSTREAM_HF_FELICA,
|
||||||
|
FPGA_BITSTREAM_HF_15,
|
||||||
|
FPGA_BITSTREAM_MAX = FPGA_BITSTREAM_HF_15,
|
||||||
|
} FPGA_config;
|
||||||
|
|
||||||
static const uint8_t bitparse_fixed_header[] = {0x00, 0x09, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x00, 0x00, 0x01};
|
static const uint8_t bitparse_fixed_header[] = {0x00, 0x09, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x0f, 0xf0, 0x00, 0x00, 0x01};
|
||||||
extern const int g_fpga_bitstream_num;
|
extern const int g_fpga_bitstream_num;
|
||||||
extern const char *const g_fpga_version_information[];
|
extern const char *const g_fpga_version_information[];
|
||||||
|
|
|
@ -891,11 +891,6 @@ typedef struct {
|
||||||
# define UART_TCP_LOCAL_CLIENT_RX_TIMEOUT_MS 40
|
# define UART_TCP_LOCAL_CLIENT_RX_TIMEOUT_MS 40
|
||||||
# define UART_UDP_LOCAL_CLIENT_RX_TIMEOUT_MS 20
|
# define UART_UDP_LOCAL_CLIENT_RX_TIMEOUT_MS 20
|
||||||
|
|
||||||
// definitions for multiple FPGA config files support
|
|
||||||
#define FPGA_BITSTREAM_LF 1
|
|
||||||
#define FPGA_BITSTREAM_HF 2
|
|
||||||
#define FPGA_BITSTREAM_HF_FELICA 3
|
|
||||||
#define FPGA_BITSTREAM_HF_15 4
|
|
||||||
|
|
||||||
// CMD_DEVICE_INFO response packet has flags in arg[0], flag definitions:
|
// CMD_DEVICE_INFO response packet has flags in arg[0], flag definitions:
|
||||||
/* Whether a bootloader that understands the g_common_area is present */
|
/* Whether a bootloader that understands the g_common_area is present */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue