30 #ifndef MIFAREDESFIRE_H_ 31 #define MIFAREDESFIRE_H_ 33 #include "Application.h" 34 #include "DESFire/DESFireFirmwareSettings.h" 35 #include "DESFire/DESFirePICCHeaderLayout.h" 36 #include "DESFire/DESFireISO14443Support.h" 37 #include "DESFire/DESFireISO7816Support.h" 38 #include "DESFire/DESFireInstructions.h" 43 void ResetLocalStructureData(
void);
44 void MifareDesfireReset(
void);
45 void MifareDesfireEV0AppInit(
void);
46 void MifareDesfire2kEV1AppInit(
void);
47 void MifareDesfire4kEV1AppInit(
void);
48 void MifareDesfire8kEV1AppInit(
void);
49 void MifareDesfireAppReset(
void);
50 void MifareDesfireAppTick(
void);
51 void MifareDesfireAppTask(
void);
53 uint16_t MifareDesfireProcessCommand(uint8_t *Buffer, uint16_t ByteCount);
54 uint16_t MifareDesfireProcess(uint8_t *Buffer, uint16_t ByteCount);
55 uint16_t MifareDesfireAppProcess(uint8_t *Buffer, uint16_t BitCount);
57 void MifareDesfireGetUid(ConfigurationUidType Uid);
58 void MifareDesfireSetUid(ConfigurationUidType Uid);
64 #define DesfireCLA(cmdCode) \ 65 ((cmdCode == DESFIRE_NATIVE_CLA) || Iso7816CLA(cmdCode)) 67 typedef enum DESFIRE_FIRMWARE_ENUM_PACKING {
73 DESFIRE_GET_APPLICATION_IDS2,
74 DESFIRE_LEGACY_AUTHENTICATE,
75 DESFIRE_LEGACY_AUTHENTICATE2,
76 DESFIRE_ISO_AUTHENTICATE,
77 DESFIRE_ISO_AUTHENTICATE2,
78 DESFIRE_AES_AUTHENTICATE,
79 DESFIRE_AES_AUTHENTICATE2,
80 DESFIRE_READ_DATA_FILE,
81 DESFIRE_WRITE_DATA_FILE,
84 extern DesfireStateType DesfireState;
85 extern DesfireStateType DesfirePreviousState;
86 extern bool DesfireFromHalt;
87 extern BYTE DesfireCmdCLA;