]>
Commit | Line | Data |
---|---|---|
534983d7 | 1 | //----------------------------------------------------------------------------- |
2 | // Hagen Fritsch - June 2010 | |
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 | //----------------------------------------------------------------------------- | |
9 | // Interlib Definitions | |
10 | //----------------------------------------------------------------------------- | |
11 | ||
12 | #ifndef __COMMON_H | |
13 | #define __COMMON_H | |
14 | ||
873014de | 15 | #include <stdint.h> |
d19929cb | 16 | typedef unsigned char byte_t; |
873014de | 17 | |
534983d7 | 18 | //----------------------------------------------------------------------------- |
19 | // ISO 14443A | |
20 | //----------------------------------------------------------------------------- | |
21 | typedef struct { | |
22 | uint8_t atqa[2]; | |
23 | uint8_t sak; | |
24 | uint8_t ats_len; | |
25 | uint8_t ats[20]; //FIXME: size? | |
26 | } __attribute__((__packed__)) iso14a_card_select_t; | |
27 | ||
28 | typedef enum ISO14A_COMMAND { | |
29 | ISO14A_CONNECT = 1, | |
30 | ISO14A_NO_DISCONNECT = 2, | |
31 | ISO14A_APDU = 4, | |
32 | ISO14A_RAW = 8, | |
33 | ISO14A_REQUEST_TRIGGER = 0x10, | |
34 | ISO14A_APPEND_CRC = 0x20, | |
35 | ISO14A_SET_TIMEOUT = 0x40 | |
36 | } iso14a_command_t; | |
37 | ||
38 | #endif |