mfclassic: avoid hardcoded offsets & sizes

This commit is contained in:
Philippe Teuwen 2017-02-17 11:31:13 +01:00
parent 646ab57ace
commit c5e8adc169
2 changed files with 25 additions and 18 deletions

View file

@ -72,10 +72,17 @@ struct mifare_param_value {
uint8_t abtValue[4];
};
struct mifare_param_trailer {
uint8_t abtKeyA[6];
uint8_t abtAccessBits[4];
uint8_t abtKeyB[6];
};
typedef union {
struct mifare_param_auth mpa;
struct mifare_param_data mpd;
struct mifare_param_value mpv;
struct mifare_param_trailer mpt;
} mifare_param;
// Reset struct alignment to default