mirror of
https://github.com/RfidResearchGroup/proxmark3.git
synced 2025-03-20 12:07:05 +08:00
added define PACKED
This commit is contained in:
parent
d2a2acf69c
commit
84c09ce881
3 changed files with 10 additions and 4 deletions
|
@ -10,8 +10,6 @@
|
|||
|
||||
#include "apduinfo.h"
|
||||
|
||||
#include "util.h"
|
||||
|
||||
const APDUCode APDUCodeTable[] = {
|
||||
// ID Type Description
|
||||
{"XXXX", APDUCODE_TYPE_NONE, ""}, // blank string
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
#include <stdbool.h>
|
||||
#include <inttypes.h>
|
||||
|
||||
#include "util.h"
|
||||
|
||||
#define APDUCODE_TYPE_NONE 0
|
||||
#define APDUCODE_TYPE_INFO 1
|
||||
#define APDUCODE_TYPE_WARNING 2
|
||||
|
@ -38,7 +40,7 @@ typedef struct {
|
|||
uint8_t p1;
|
||||
uint8_t p2;
|
||||
uint8_t lc[3];
|
||||
} __attribute__((packed)) ExtAPDUHeader;
|
||||
} PACKED ExtAPDUHeader;
|
||||
|
||||
typedef struct {
|
||||
uint8_t cla;
|
||||
|
@ -50,7 +52,7 @@ typedef struct {
|
|||
uint32_t le;
|
||||
bool extended_apdu;
|
||||
uint8_t case_type;
|
||||
} __attribute__((packed)) APDUStruct;
|
||||
} PACKED APDUStruct;
|
||||
|
||||
extern int APDUDecode(uint8_t *data, int len, APDUStruct *apdu);
|
||||
extern int APDUEncode(APDUStruct *apdu, uint8_t *data, int *len);
|
||||
|
|
|
@ -21,6 +21,12 @@
|
|||
#include "ui.h" // PrintAndLog
|
||||
#include "commonutil.h"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#define PACKED
|
||||
#else
|
||||
#define PACKED __attribute__((packed))
|
||||
#endif
|
||||
|
||||
#ifdef ANDROID
|
||||
#include <endian.h>
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue