mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-08-20 13:23:51 -07:00
make style
This commit is contained in:
parent
0d9223a547
commit
0373696662
483 changed files with 56514 additions and 52451 deletions
|
@ -83,25 +83,25 @@ extern uint32_t FLASHMEM_SPIBAUDRATE;
|
|||
#endif
|
||||
|
||||
#ifdef WITH_FLASH
|
||||
#ifndef T55XX_CONFIG_LEN
|
||||
# define T55XX_CONFIG_LEN sizeof( t55xx_config )
|
||||
#endif
|
||||
#ifndef T55XX_CONFIG_LEN
|
||||
# define T55XX_CONFIG_LEN sizeof( t55xx_config )
|
||||
#endif
|
||||
|
||||
#ifndef T55XX_CONFIG_OFFSET
|
||||
# define T55XX_CONFIG_OFFSET (FLASH_MEM_MAX_4K_SECTOR - 0x2000)
|
||||
#endif
|
||||
#ifndef T55XX_CONFIG_OFFSET
|
||||
# define T55XX_CONFIG_OFFSET (FLASH_MEM_MAX_4K_SECTOR - 0x2000)
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_T55XX_KEYS_OFFSET
|
||||
# define DEFAULT_T55XX_KEYS_OFFSET (FLASH_MEM_MAX_4K_SECTOR - 0x3000)
|
||||
#endif
|
||||
#ifndef DEFAULT_T55XX_KEYS_OFFSET
|
||||
# define DEFAULT_T55XX_KEYS_OFFSET (FLASH_MEM_MAX_4K_SECTOR - 0x3000)
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_MF_KEYS_OFFSET
|
||||
# define DEFAULT_MF_KEYS_OFFSET (FLASH_MEM_MAX_4K_SECTOR - 0x4000)
|
||||
#endif
|
||||
#ifndef DEFAULT_MF_KEYS_OFFSET
|
||||
# define DEFAULT_MF_KEYS_OFFSET (FLASH_MEM_MAX_4K_SECTOR - 0x4000)
|
||||
#endif
|
||||
|
||||
#ifndef DEFAULT_ICLASS_KEYS_OFFSET
|
||||
# define DEFAULT_ICLASS_KEYS_OFFSET (FLASH_MEM_MAX_4K_SECTOR - 0x5000)
|
||||
#endif
|
||||
#ifndef DEFAULT_ICLASS_KEYS_OFFSET
|
||||
# define DEFAULT_ICLASS_KEYS_OFFSET (FLASH_MEM_MAX_4K_SECTOR - 0x5000)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// RDV40, validation structure to help identifying that client/firmware is talking with RDV40
|
||||
|
|
|
@ -18,29 +18,32 @@
|
|||
|
||||
//protocol-state
|
||||
typedef enum PROTO_STATE {
|
||||
HT_READY=0,
|
||||
HT_READY = 0,
|
||||
HT_INIT,
|
||||
HT_AUTHENTICATE,
|
||||
HT_SELECTED,
|
||||
HT_QUIET,
|
||||
HT_TTF,
|
||||
HT_FAIL} PSTATE;
|
||||
HT_FAIL
|
||||
} PSTATE;
|
||||
|
||||
//tag-state
|
||||
typedef enum TAG_STATE {
|
||||
HT_NO_OP=0,
|
||||
HT_NO_OP = 0,
|
||||
HT_READING_PAGE,
|
||||
HT_WRITING_PAGE_ACK,
|
||||
HT_WRITING_PAGE_DATA,
|
||||
HT_WRITING_BLOCK_DATA} TSATE;
|
||||
HT_WRITING_BLOCK_DATA
|
||||
} TSATE;
|
||||
|
||||
//number of start-of-frame bits
|
||||
typedef enum SOF_TYPE {
|
||||
HT_STANDARD=0,
|
||||
HT_STANDARD = 0,
|
||||
HT_ADVANCED,
|
||||
HT_FAST_ADVANCED,
|
||||
HT_ONE,
|
||||
HT_NO_BITS} stype;
|
||||
HT_NO_BITS
|
||||
} stype;
|
||||
|
||||
struct hitagS_tag {
|
||||
PSTATE pstate; //protocol-state
|
||||
|
|
|
@ -32,23 +32,23 @@ typedef struct {
|
|||
} __attribute__((__packed__)) iso14a_card_select_t;
|
||||
|
||||
typedef enum ISO14A_COMMAND {
|
||||
ISO14A_CONNECT = (1 << 0),
|
||||
ISO14A_NO_DISCONNECT = (1 << 1),
|
||||
ISO14A_APDU = (1 << 2),
|
||||
ISO14A_RAW = (1 << 3),
|
||||
ISO14A_CONNECT = (1 << 0),
|
||||
ISO14A_NO_DISCONNECT = (1 << 1),
|
||||
ISO14A_APDU = (1 << 2),
|
||||
ISO14A_RAW = (1 << 3),
|
||||
ISO14A_REQUEST_TRIGGER = (1 << 4),
|
||||
ISO14A_APPEND_CRC = (1 << 5),
|
||||
ISO14A_SET_TIMEOUT = (1 << 6),
|
||||
ISO14A_NO_SELECT = (1 << 7),
|
||||
ISO14A_TOPAZMODE = (1 << 8),
|
||||
ISO14A_NO_RATS = (1 << 9),
|
||||
ISO14A_SEND_CHAINING = (1 << 10)
|
||||
ISO14A_APPEND_CRC = (1 << 5),
|
||||
ISO14A_SET_TIMEOUT = (1 << 6),
|
||||
ISO14A_NO_SELECT = (1 << 7),
|
||||
ISO14A_TOPAZMODE = (1 << 8),
|
||||
ISO14A_NO_RATS = (1 << 9),
|
||||
ISO14A_SEND_CHAINING = (1 << 10)
|
||||
} iso14a_command_t;
|
||||
|
||||
typedef struct {
|
||||
uint8_t* response;
|
||||
uint8_t *response;
|
||||
size_t response_n;
|
||||
uint8_t* modulation;
|
||||
uint8_t *modulation;
|
||||
size_t modulation_n;
|
||||
uint32_t ProxToAirDuration;
|
||||
} tag_response_info_t;
|
||||
|
@ -64,23 +64,23 @@ typedef struct {
|
|||
} __attribute__((__packed__)) iso14b_card_select_t;
|
||||
|
||||
typedef enum ISO14B_COMMAND {
|
||||
ISO14B_CONNECT = (1 << 0),
|
||||
ISO14B_DISCONNECT = (1 << 1),
|
||||
ISO14B_APDU = (1 << 2),
|
||||
ISO14B_RAW = (1 << 3),
|
||||
ISO14B_CONNECT = (1 << 0),
|
||||
ISO14B_DISCONNECT = (1 << 1),
|
||||
ISO14B_APDU = (1 << 2),
|
||||
ISO14B_RAW = (1 << 3),
|
||||
ISO14B_REQUEST_TRIGGER = (1 << 4),
|
||||
ISO14B_APPEND_CRC = (1 << 5),
|
||||
ISO14B_SELECT_STD = (1 << 6),
|
||||
ISO14B_SELECT_SR = (1 << 7)
|
||||
ISO14B_APPEND_CRC = (1 << 5),
|
||||
ISO14B_SELECT_STD = (1 << 6),
|
||||
ISO14B_SELECT_SR = (1 << 7)
|
||||
} iso14b_command_t;
|
||||
|
||||
typedef enum ISO15_COMMAND {
|
||||
ISO15_CONNECT = (1 << 0),
|
||||
ISO15_NO_DISCONNECT = (1 << 1),
|
||||
ISO15_RAW = (1 << 2),
|
||||
ISO15_APPEND_CRC = (1 << 3),
|
||||
ISO15_HIGH_SPEED = (1 << 4),
|
||||
ISO15_READ_RESPONSE = (1 << 5)
|
||||
ISO15_CONNECT = (1 << 0),
|
||||
ISO15_NO_DISCONNECT = (1 << 1),
|
||||
ISO15_RAW = (1 << 2),
|
||||
ISO15_APPEND_CRC = (1 << 3),
|
||||
ISO15_HIGH_SPEED = (1 << 4),
|
||||
ISO15_READ_RESPONSE = (1 << 5)
|
||||
} iso15_command_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -113,11 +113,11 @@ typedef struct {
|
|||
} __attribute__((__packed__)) smart_card_atr_t;
|
||||
|
||||
typedef enum SMARTCARD_COMMAND {
|
||||
SC_CONNECT = (1 << 0),
|
||||
SC_NO_DISCONNECT = (1 << 1),
|
||||
SC_RAW = (1 << 2),
|
||||
SC_SELECT = (1 << 3),
|
||||
SC_RAW_T0 = (1 << 4),
|
||||
SC_CONNECT = (1 << 0),
|
||||
SC_NO_DISCONNECT = (1 << 1),
|
||||
SC_RAW = (1 << 2),
|
||||
SC_SELECT = (1 << 3),
|
||||
SC_RAW_T0 = (1 << 4),
|
||||
} smartcard_command_t;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -151,11 +151,11 @@ typedef struct {
|
|||
} __attribute__((__packed__)) felica_card_select_t;
|
||||
|
||||
typedef enum FELICA_COMMAND {
|
||||
FELICA_CONNECT = (1 << 0),
|
||||
FELICA_NO_DISCONNECT = (1 << 1),
|
||||
FELICA_RAW = (1 << 3),
|
||||
FELICA_APPEND_CRC = (1 << 5),
|
||||
FELICA_NO_SELECT = (1 << 6),
|
||||
FELICA_CONNECT = (1 << 0),
|
||||
FELICA_NO_DISCONNECT = (1 << 1),
|
||||
FELICA_RAW = (1 << 3),
|
||||
FELICA_APPEND_CRC = (1 << 5),
|
||||
FELICA_NO_SELECT = (1 << 6),
|
||||
} felica_command_t;
|
||||
|
||||
#endif // _MIFARE_H_
|
||||
|
|
|
@ -126,8 +126,8 @@ struct common_area {
|
|||
char version; /* Must be 1 */
|
||||
char command;
|
||||
struct {
|
||||
unsigned int bootrom_present:1; /* Set when a bootrom that is capable of parsing the common area is present */
|
||||
unsigned int osimage_present:1; /* Set when a osimage that is capable of parsing the common area is present */
|
||||
unsigned int bootrom_present: 1; /* Set when a bootrom that is capable of parsing the common area is present */
|
||||
unsigned int osimage_present: 1; /* Set when a osimage that is capable of parsing the common area is present */
|
||||
} __attribute__((packed)) flags;
|
||||
int arg1, arg2;
|
||||
} __attribute__((packed));
|
||||
|
|
|
@ -14,28 +14,28 @@
|
|||
#define __USB_CMD_H
|
||||
|
||||
#ifdef _MSC_VER
|
||||
typedef DWORD uint32_t;
|
||||
typedef BYTE uint8_t;
|
||||
#define PACKED
|
||||
// stuff
|
||||
typedef DWORD uint32_t;
|
||||
typedef BYTE uint8_t;
|
||||
#define PACKED
|
||||
// stuff
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#define PACKED __attribute__((packed))
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
#define PACKED __attribute__((packed))
|
||||
#endif
|
||||
|
||||
#define USB_CMD_DATA_SIZE 512
|
||||
|
||||
typedef struct {
|
||||
uint64_t cmd;
|
||||
uint64_t arg[3];
|
||||
union {
|
||||
uint8_t asBytes[USB_CMD_DATA_SIZE];
|
||||
uint32_t asDwords[USB_CMD_DATA_SIZE/4];
|
||||
} d;
|
||||
uint64_t cmd;
|
||||
uint64_t arg[3];
|
||||
union {
|
||||
uint8_t asBytes[USB_CMD_DATA_SIZE];
|
||||
uint32_t asDwords[USB_CMD_DATA_SIZE / 4];
|
||||
} d;
|
||||
} PACKED UsbCommand;
|
||||
// A struct used to send sample-configs over USB
|
||||
typedef struct{
|
||||
typedef struct {
|
||||
uint8_t decimation;
|
||||
uint8_t bits_per_sample;
|
||||
bool averaging;
|
||||
|
@ -43,7 +43,7 @@ typedef struct{
|
|||
int trigger_threshold;
|
||||
} sample_config;
|
||||
|
||||
typedef struct{
|
||||
typedef struct {
|
||||
uint16_t start_gap;
|
||||
uint16_t write_gap;
|
||||
uint16_t write_0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue