AT-NFC 2.1 (win) AT-NFC kernel set

nfc_ext_data.h
Go to the documentation of this file.
1 #ifndef NFC_EXT_DATA_H
2 #define NFC_EXT_DATA_H
3
4 /* ***************************** nfc external data definitions ***************************** */
8 /* ***************************************************************************************** */
9
10 /* set struct alignment */
11 #include <emv_platform_set_align.h>
12
13 /* ***************************************************************************************** */
18 /* ***************************************************************************************** */
19
20 /* ***************************************************************************************** */
21 /* Terminal transaction data struct version ID */
28 #define NFC_EXT_TERM_TRAN_DATA_VERSION 0x0001
30 /* ***************************************************************************************** */
31
32 /* ***************************************************************************************** */
33 /* transaction options */
40 #define NFC_EXT_TERM_TRAN_OPT_DEBUG 0x0001
41 #define NFC_EXT_TERM_TRAN_OPT_DISABLE_MS_MODE 0x0002
42 #define NFC_EXT_TERM_TRAN_OPT_DISABLE_EMV_MODE 0x0004
43 #define NFC_EXT_TERM_TRAN_OPT_TRY_AGAIN_IS_FINAL 0x0008
44 #define NFC_EXT_TERM_TRAN_OPT_TRY_AGAIN_CD_CVM_IS_FINAL 0x0010
45 #define NFC_EXT_TERM_TRAN_OPT_CARD_ALREADY_DETECTED 0x0020
47 /* ***************************************************************************************** */
48
49 /* ***************************************************************************************** */
50 /* reset Terminal transaction data macro */
55 #define NFC_EXT_TERM_TRAN_DATA_RESET(DATA, SIZE) \
56 do \
57 { \
58 KER_MEM_SET(DATA, SIZE, 0, SIZE); \
59 (DATA)->usSize = SIZE; \
60 (DATA)->btVersion = NFC_EXT_TERM_TRAN_DATA_VERSION; \
61 (DATA)->pbtTranData = KER_NULL; \
62 } while (0)
63
64 /* ***************************************************************************************** */
65 /* check Terminal transaction option macro */
70 #define NFC_EXT_TERM_TRAN_CHECK_OPT(TRAN, SIZE, OPTION) (((TRAN) != KER_NULL) && \
71 ((TRAN)->usSize >= (SIZE)) && \
72 ((TRAN)->btVersion >= NFC_EXT_TERM_TRAN_DATA_VERSION) && \
73 (((TRAN)->usOptions & (OPTION)) != 0))
74
75 /* ***************************************************************************************** */
82 typedef struct tag_NFC_EXT_TERM_TRAN_DATA
83 {
84 KER_INT16U usSize;
85 KER_BYTE btVersion;
87 KER_INT16U usOptions;
89 KER_BYTE* pbtTranData;
90 KER_INT16U usTranDataLen;
91 } NFC_EXT_TERM_TRAN_DATA;
95 /* ***************************************************************************************** */
96 /* Terminal transaction restart data struct version ID */
103 #define NFC_EXT_TERM_RESTART_DATA_VERSION 0x0001
105 /* ***************************************************************************************** */
106
107 /* ***************************************************************************************** */
108 /* Terminal transaction restart data options */
115 #define NFC_EXT_TERM_RESTART_OPT_UNABLE_TO_GO_ONLINE 0x0001
116 #define NFC_EXT_TERM_RESTART_OPT_SKIP_CARD_REMOVAL 0x0002
117 #define NFC_EXT_TERM_RESTART_OPT_CARD_ALREADY_DETECTED 0x0004
119 /* ***************************************************************************************** */
120
121 /* ***************************************************************************************** */
122 /* reset Terminal transaction restart data macro */
127 #define NFC_EXT_TERM_RESTART_DATA_RESET(DATA, SIZE) \
128 do \
129 { \
130 KER_MEM_SET(DATA, SIZE, 0, SIZE); \
131 (DATA)->usSize = SIZE; \
132 (DATA)->btVersion = NFC_EXT_TERM_RESTART_DATA_VERSION; \
133 (DATA)->pbtIssUpdateData = KER_NULL; \
134 } while (0)
135
136 /* ***************************************************************************************** */
143 typedef struct tag_NFC_EXT_TERM_RESTART_DATA
144 {
145 KER_INT16U usSize;
146 KER_BYTE btVersion;
148 KER_INT16U usOptions;
150 KER_BYTE* pbtIssUpdateData;
151 KER_INT16U usIssUpdateDataLen;
152 } NFC_EXT_TERM_RESTART_DATA;
155 /* restore struct alignment */
156 #include <emv_platform_restore_align.h>
157
158 #endif /* NFC_EXT_DATA_H */
emv_platform_restore_align.h
emv_platform_set_align.h
KER_BYTE
uint8_t KER_BYTE
Definition: emv_platform.h:70
KER_INT16U
unsigned short KER_INT16U
Definition: emv_platform.h:61
NFC_EXT_TERM_RESTART_DATA
struct tag_NFC_EXT_TERM_RESTART_DATA NFC_EXT_TERM_RESTART_DATA
Terminal transaction restart data.
NFC_EXT_TERM_TRAN_DATA
struct tag_NFC_EXT_TERM_TRAN_DATA NFC_EXT_TERM_TRAN_DATA
Terminal transaction data structure.
tag_NFC_EXT_TERM_RESTART_DATA
Terminal transaction restart data.
Definition: nfc_ext_data.h:144
tag_NFC_EXT_TERM_RESTART_DATA::usSize
KER_INT16U usSize
Definition: nfc_ext_data.h:145
tag_NFC_EXT_TERM_RESTART_DATA::btVersion
KER_BYTE btVersion
Definition: nfc_ext_data.h:146
tag_NFC_EXT_TERM_RESTART_DATA::usIssUpdateDataLen
KER_INT16U usIssUpdateDataLen
Definition: nfc_ext_data.h:151
tag_NFC_EXT_TERM_RESTART_DATA::pbtIssUpdateData
KER_BYTE * pbtIssUpdateData
Definition: nfc_ext_data.h:150
tag_NFC_EXT_TERM_RESTART_DATA::usOptions
KER_INT16U usOptions
Definition: nfc_ext_data.h:148
tag_NFC_EXT_TERM_TRAN_DATA
Terminal transaction data structure.
Definition: nfc_ext_data.h:83
tag_NFC_EXT_TERM_TRAN_DATA::usSize
KER_INT16U usSize
Definition: nfc_ext_data.h:84
tag_NFC_EXT_TERM_TRAN_DATA::usTranDataLen
KER_INT16U usTranDataLen
Definition: nfc_ext_data.h:90
tag_NFC_EXT_TERM_TRAN_DATA::pbtTranData
KER_BYTE * pbtTranData
Definition: nfc_ext_data.h:89
tag_NFC_EXT_TERM_TRAN_DATA::btVersion
KER_BYTE btVersion
Definition: nfc_ext_data.h:85
tag_NFC_EXT_TERM_TRAN_DATA::usOptions
KER_INT16U usOptions
Definition: nfc_ext_data.h:87