@@ -122,81 +122,21 @@ extern const __flash DESFireCommand DESFireCommandSet[];
122
122
123
123
/* Helper and batch process functions */
124
124
uint16_t CallInstructionHandler (uint8_t * Buffer , uint16_t ByteCount );
125
- uint16_t ExitWithStatus (uint8_t * Buffer , uint8_t StatusCode , uint16_t DefaultReturnValue );
126
- uint16_t CmdNotImplemented (uint8_t * Buffer , uint16_t ByteCount );
127
125
128
126
/*
129
127
* The following section implements:
130
128
* DESFire EV0 / D40 specific commands
131
129
*/
132
130
133
- /* General commands */
134
131
uint16_t EV0CmdGetVersion1 (uint8_t * Buffer , uint16_t ByteCount );
135
132
uint16_t EV0CmdGetVersion2 (uint8_t * Buffer , uint16_t ByteCount );
136
133
uint16_t EV0CmdGetVersion3 (uint8_t * Buffer , uint16_t ByteCount );
137
- uint16_t EV0CmdFormatPicc (uint8_t * Buffer , uint16_t ByteCount );
138
- uint16_t DesfireCmdGetCardUID (uint8_t * Buffer , uint16_t ByteCount );
139
- uint16_t DesfireCmdSetConfiguration (uint8_t * Buffer , uint16_t ByteCount ); // ?? Docs ??
140
- uint16_t DesfireCmdFreeMemory (uint8_t * Buffer , uint16_t ByteCount ); // returns free memory on the tag
141
-
142
- /* Key management commands */
143
- uint16_t EV0CmdChangeKey (uint8_t * Buffer , uint16_t ByteCount );
144
- uint16_t EV0CmdGetKeySettings (uint8_t * Buffer , uint16_t ByteCount );
145
- uint16_t EV0CmdChangeKeySettings (uint8_t * Buffer , uint16_t ByteCount );
146
- uint16_t DesfireCmdGetKeyVersion (uint8_t * Buffer , uint16_t ByteCount );
147
-
148
- /* Application management commands */
149
- uint16_t EV0CmdGetApplicationIds1 (uint8_t * Buffer , uint16_t ByteCount );
150
- uint16_t EV0CmdCreateApplication (uint8_t * Buffer , uint16_t ByteCount );
151
- uint16_t EV0CmdDeleteApplication (uint8_t * Buffer , uint16_t ByteCount );
152
- uint16_t EV0CmdSelectApplication (uint8_t * Buffer , uint16_t ByteCount );
153
- uint16_t DesfireCmdGetDFNames (uint8_t * Buffer , uint16_t ByteCount );
154
-
155
- /* File management commands */
156
- uint16_t EV0CmdCreateStandardDataFile (uint8_t * Buffer , uint16_t ByteCount );
157
- uint16_t EV0CmdCreateBackupDataFile (uint8_t * Buffer , uint16_t ByteCount );
158
- uint16_t EV0CmdCreateValueFile (uint8_t * Buffer , uint16_t ByteCount );
159
- uint16_t EV0CmdCreateLinearRecordFile (uint8_t * Buffer , uint16_t ByteCount );
160
- uint16_t EV0CmdCreateCyclicRecordFile (uint8_t * Buffer , uint16_t ByteCount );
161
- uint16_t EV0CmdDeleteFile (uint8_t * Buffer , uint16_t ByteCount );
162
- uint16_t EV0CmdGetFileIds (uint8_t * Buffer , uint16_t ByteCount );
163
- uint16_t EV0CmdGetFileSettings (uint8_t * Buffer , uint16_t ByteCount );
164
- uint16_t EV0CmdChangeFileSettings (uint8_t * Buffer , uint16_t ByteCount );
165
-
166
- /* Data manipulation commands */
167
- // NOTE: Page 57: Read file functions:
168
- uint16_t EV0CmdReadData (uint8_t * Buffer , uint16_t ByteCount );
169
- uint16_t EV0CmdWriteData (uint8_t * Buffer , uint16_t ByteCount );
170
- uint16_t EV0CmdGetValue (uint8_t * Buffer , uint16_t ByteCount );
171
- uint16_t EV0CmdCredit (uint8_t * Buffer , uint16_t ByteCount );
172
- uint16_t EV0CmdDebit (uint8_t * Buffer , uint16_t ByteCount );
173
- uint16_t EV0CmdLimitedCredit (uint8_t * Buffer , uint16_t ByteCount );
174
- uint16_t EV0CmdReadRecords (uint8_t * Buffer , uint16_t ByteCount );
175
- uint16_t EV0CmdWriteRecord (uint8_t * Buffer , uint16_t ByteCount );
176
- uint16_t EV0CmdClearRecords (uint8_t * Buffer , uint16_t ByteCount );
177
-
178
- /* Transaction handling commands */
179
- uint16_t EV0CmdCommitTransaction (uint8_t * Buffer , uint16_t ByteCount );
180
- uint16_t EV0CmdAbortTransaction (uint8_t * Buffer , uint16_t ByteCount );
181
-
182
- /* EV1/EV2 supported commands */
183
134
uint16_t EV0CmdAuthenticateLegacy1 (uint8_t * Buffer , uint16_t ByteCount );
184
135
uint16_t EV0CmdAuthenticateLegacy2 (uint8_t * Buffer , uint16_t ByteCount );
136
+
185
137
uint16_t DesfireCmdAuthenticate3KTDEA1 (uint8_t * Buffer , uint16_t ByteCount );
186
138
uint16_t DesfireCmdAuthenticate3KTDEA2 (uint8_t * Buffer , uint16_t ByteCount );
187
139
uint16_t DesfireCmdAuthenticateAES1 (uint8_t * Buffer , uint16_t ByteCount );
188
140
uint16_t DesfireCmdAuthenticateAES2 (uint8_t * Buffer , uint16_t ByteCount );
189
141
190
- /* ISO7816 command handling */
191
- uint16_t ISO7816CmdSelect (uint8_t * Buffer , uint16_t ByteCount );
192
- uint16_t ISO7816CmdSelectEF (uint8_t * Buffer , uint16_t ByteCount );
193
- uint16_t ISO7816CmdSelectDF (uint8_t * Buffer , uint16_t ByteCount );
194
- uint16_t ISO7816CmdGetChallenge (uint8_t * Buffer , uint16_t ByteCount );
195
- uint16_t ISO7816CmdExternalAuthenticate (uint8_t * Buffer , uint16_t ByteCount );
196
- uint16_t ISO7816CmdInternalAuthenticate (uint8_t * Buffer , uint16_t ByteCount );
197
- uint16_t ISO7816CmdReadBinary (uint8_t * Buffer , uint16_t ByteCount );
198
- uint16_t ISO7816CmdUpdateBinary (uint8_t * Buffer , uint16_t ByteCount );
199
- uint16_t ISO7816CmdReadRecords (uint8_t * Buffer , uint16_t ByteCount );
200
- uint16_t ISO7816CmdAppendRecord (uint8_t * Buffer , uint16_t ByteCount );
201
-
202
142
#endif
0 commit comments