]>
Commit | Line | Data |
---|---|---|
1 | //----------------------------------------------------------------------------- | |
2 | // Copyright (C) 2017 Merlok | |
3 | // | |
4 | // This code is licensed to you under the terms of the GNU GPL, version 2 or, | |
5 | // at your option, any later version. See the LICENSE.txt file for the text of | |
6 | // the license. | |
7 | //----------------------------------------------------------------------------- | |
8 | // APDU status bytes information | |
9 | //----------------------------------------------------------------------------- | |
10 | ||
11 | #ifndef APDUINFO_H__ | |
12 | #define APDUINFO_H__ | |
13 | ||
14 | #include <stdio.h> | |
15 | #include <stdint.h> | |
16 | #include <stdlib.h> | |
17 | #include <inttypes.h> | |
18 | ||
19 | #define APDUCODE_TYPE_NONE 0 | |
20 | #define APDUCODE_TYPE_INFO 1 | |
21 | #define APDUCODE_TYPE_WARNING 2 | |
22 | #define APDUCODE_TYPE_ERROR 3 | |
23 | #define APDUCODE_TYPE_SECURITY 4 | |
24 | ||
25 | typedef struct { | |
26 | const char *ID; | |
27 | const uint8_t Type; | |
28 | const char *Description; | |
29 | } APDUCode; | |
30 | ||
31 | extern const APDUCode* const GetAPDUCode(uint8_t sw1, uint8_t sw2); | |
32 | extern const char* GetAPDUCodeDescription(uint8_t sw1, uint8_t sw2); | |
33 | ||
34 | #endif |