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

t_nfc_ep_ker.h
Go to the documentation of this file.
1 #ifndef T_NFC_EP_KER_H
2 #define T_NFC_EP_KER_H
3
4 /* ******************* T-NFC Entry Point kernel registration interface ********************* */
8 /* ***************************************************************************************** */
9
10 #ifdef T_NFC_EP_EXP_MODE
11 #define T_NFC_EP_MODE KER_EXP_API
12 #else
13 #ifdef T_NFC_EP_INT_MODE
14 #define T_NFC_EP_MODE
15 #else
16 #define T_NFC_EP_MODE KER_IMP_API
17 #endif
18 #endif
19
20 /* set struct alignment */
21 #include <emv_platform_set_align.h>
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27
28 /* ***************************************************************************************** */
33 /* ***************************************************************************************** */
34 /* EP Kernel API struct version ID */
41 #define T_NFC_EP_KER_API_VERSION 0x0001
43 /* ***************************************************************************************** */
44
45 /* ***************************************************************************************** */
46 /* reset EP Kernel API struct macro */
51 #define T_NFC_EP_KER_API_RESET(DATA, SIZE) \
52 do \
53 { \
54 KER_MEM_SET(DATA, SIZE, 0, SIZE); \
55 (DATA)->usSize = SIZE; \
56 (DATA)->btVersion = T_NFC_EP_KER_API_VERSION; \
57 (DATA)->fTranInit = KER_NULL; \
58 (DATA)->fTranPreprocess = KER_NULL; \
59 (DATA)->fTranStart = KER_NULL; \
60 (DATA)->fTranIssUpdate = KER_NULL; \
61 (DATA)->fTranRelease = KER_NULL; \
62 (DATA)->fGetData = KER_NULL; \
63 (DATA)->fGetDataByTag = KER_NULL; \
64 (DATA)->fGetDataByTagList = KER_NULL; \
65 (DATA)->fGetDataByID = KER_NULL; \
66 } while (0)
67
68 /* ***************************************************************************************** */
75 typedef struct tag_T_NFC_KER_API
76 {
77 KER_INT16U usSize;
78 KER_BYTE btVersion;
80 KER_BYTE ar_btKernelID[8];
81 KER_BYTE btKernelIDLen;
83 T_NFC_HANDLE hKerHandle;
85 FUNC_T_NFC_KERNEL_TRAN_PREPROCESS fTranPreprocess;
86 FUNC_T_NFC_KERNEL_TRAN_START fTranStart;
87 FUNC_T_NFC_KERNEL_TRAN_ISS_UPDATE fTranIssUpdate;
88 FUNC_T_NFC_KERNEL_TRAN_RELEASE fTranReleaase;
90 FUNC_T_NFC_KERNEL_GET_DATA fGetData;
91 FUNC_T_NFC_KERNEL_GET_DATA_BY_TAG fGetDataByTag;
92 FUNC_T_NFC_KERNEL_GET_DATA_BY_TAG_LIST fGetDataByTagList;
93 FUNC_T_NFC_KERNEL_GET_DATA_BY_ID fGetDataByID;
95 } T_NFC_KER_API;
97 /* ***************************************************************************************** */
98
99 /* ********************************* t_nfc_epRegisterKernel ******************************** */
111 T_NFC_EP_MODE KER_RES KER_API t_nfc_epRegisterKernel(T_NFC_EP_HANDLE pHandle, T_NFC_KER_API* pKerAPI);
113 #define NAME_FUNC_T_NFC_EP_KER_REGISTER "t_nfc_epRegisterKernel"
115 typedef KER_RES(KER_API *FUNC_T_NFC_EP_KER_REGISTER)(T_NFC_EP_HANDLE pHandle, T_NFC_KER_API* pKerAPI);
116
117 #ifdef __cplusplus
118 }
119 #endif
120
121 /* restore struct alignment */
122 #include <emv_platform_restore_align.h>
123
124 #endif /* T_NFC_EP_KER_H */
emv_platform_restore_align.h
emv_platform_set_align.h
KER_BYTE
uint8_t KER_BYTE
Definition: emv_platform.h:70
KER_RES
KER_INT16U KER_RES
Definition: emv_platform.h:68
KER_INT16U
unsigned short KER_INT16U
Definition: emv_platform.h:61
T_NFC_KER_API
struct tag_T_NFC_KER_API T_NFC_KER_API
EP Kernel API struct.
FUNC_T_NFC_EP_KER_REGISTER
KER_RES(KER_API * FUNC_T_NFC_EP_KER_REGISTER)(T_NFC_EP_HANDLE pHandle, T_NFC_KER_API *pKerAPI)
Definition: t_nfc_ep_ker.h:115
t_nfc_epRegisterKernel
T_NFC_EP_MODE KER_RES KER_API t_nfc_epRegisterKernel(T_NFC_EP_HANDLE pHandle, T_NFC_KER_API *pKerAPI)
Entry Point Kernel registration.
FUNC_T_NFC_KERNEL_GET_DATA_BY_ID
KER_RES(KER_API * FUNC_T_NFC_KERNEL_GET_DATA_BY_ID)(T_NFC_HANDLE pHandle, KER_INT16U usID, KER_BYTE *pbtData, KER_INT16U *pusDataSize)
Definition: t_nfc_ker.h:336
FUNC_T_NFC_KERNEL_TRAN_PREPROCESS
KER_RES(KER_API * FUNC_T_NFC_KERNEL_TRAN_PREPROCESS)(T_NFC_HANDLE pHandle, const NFC_EXT_TERM_TRAN_DATA *pTermTranData, const NFC_EP_PRE_DATA *pEpPRE)
Definition: t_nfc_ker.h:173
FUNC_T_NFC_KERNEL_TRAN_RELEASE
KER_RES(KER_API * FUNC_T_NFC_KERNEL_TRAN_RELEASE)(T_NFC_HANDLE pHandle)
Definition: t_nfc_ker.h:237
FUNC_T_NFC_KERNEL_GET_DATA_BY_TAG
KER_RES(KER_API * FUNC_T_NFC_KERNEL_GET_DATA_BY_TAG)(T_NFC_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE *pbtTag, KER_BYTE btTagSize, KER_BYTE *pbtData, KER_INT16U *pusDataSize)
Definition: t_nfc_ker.h:289
FUNC_T_NFC_KERNEL_GET_DATA
KER_RES(KER_API * FUNC_T_NFC_KERNEL_GET_DATA)(T_NFC_HANDLE pHandle, KER_INT16U usOptions, KER_BYTE *pbtData, KER_INT16U *pusDataLen)
Definition: t_nfc_ker.h:259
FUNC_T_NFC_KERNEL_TRAN_ISS_UPDATE
KER_RES(KER_API * FUNC_T_NFC_KERNEL_TRAN_ISS_UPDATE)(T_NFC_HANDLE pHandle, const NFC_EP_RESTART_DATA *pEpRestartData, const NFC_EXT_TERM_RESTART_DATA *pTermRestartData, NFC_OUTCOME **ppOutcome)
Definition: t_nfc_ker.h:218
FUNC_T_NFC_KERNEL_TRAN_START
KER_RES(KER_API * FUNC_T_NFC_KERNEL_TRAN_START)(T_NFC_HANDLE pHandle, const NFC_EP_PRE_DATA *pEpPRE, const NFC_EP_PPSE_DATA *pEpPPSE, const NFC_EP_TRAN_DATA *pEpTranData, NFC_OUTCOME **ppOutcome)
Definition: t_nfc_ker.h:196
FUNC_T_NFC_KERNEL_GET_DATA_BY_TAG_LIST
KER_RES(KER_API * FUNC_T_NFC_KERNEL_GET_DATA_BY_TAG_LIST)(T_NFC_HANDLE pHandle, KER_INT16U usOptions, const KER_BYTE *pbtTagList, KER_INT16U usTagListSize, KER_BYTE *pbtData, KER_INT16U *pusDataSize)
Definition: t_nfc_ker.h:313
tag_T_NFC_KER_API
EP Kernel API struct.
Definition: t_nfc_ep_ker.h:76
tag_T_NFC_KER_API::btKernelIDLen
KER_BYTE btKernelIDLen
Definition: t_nfc_ep_ker.h:81
tag_T_NFC_KER_API::fTranPreprocess
FUNC_T_NFC_KERNEL_TRAN_PREPROCESS fTranPreprocess
Definition: t_nfc_ep_ker.h:85
tag_T_NFC_KER_API::fGetDataByID
FUNC_T_NFC_KERNEL_GET_DATA_BY_ID fGetDataByID
Definition: t_nfc_ep_ker.h:93
tag_T_NFC_KER_API::usSize
KER_INT16U usSize
Definition: t_nfc_ep_ker.h:77
tag_T_NFC_KER_API::hKerHandle
T_NFC_HANDLE hKerHandle
Definition: t_nfc_ep_ker.h:83
tag_T_NFC_KER_API::fGetData
FUNC_T_NFC_KERNEL_GET_DATA fGetData
Definition: t_nfc_ep_ker.h:90
tag_T_NFC_KER_API::btVersion
KER_BYTE btVersion
Definition: t_nfc_ep_ker.h:78
tag_T_NFC_KER_API::ar_btKernelID
KER_BYTE ar_btKernelID[8]
Definition: t_nfc_ep_ker.h:80
tag_T_NFC_KER_API::fTranReleaase
FUNC_T_NFC_KERNEL_TRAN_RELEASE fTranReleaase
Definition: t_nfc_ep_ker.h:88
tag_T_NFC_KER_API::fTranIssUpdate
FUNC_T_NFC_KERNEL_TRAN_ISS_UPDATE fTranIssUpdate
Definition: t_nfc_ep_ker.h:87
tag_T_NFC_KER_API::fGetDataByTagList
FUNC_T_NFC_KERNEL_GET_DATA_BY_TAG_LIST fGetDataByTagList
Definition: t_nfc_ep_ker.h:92
tag_T_NFC_KER_API::fTranStart
FUNC_T_NFC_KERNEL_TRAN_START fTranStart
Definition: t_nfc_ep_ker.h:86
tag_T_NFC_KER_API::fGetDataByTag
FUNC_T_NFC_KERNEL_GET_DATA_BY_TAG fGetDataByTag
Definition: t_nfc_ep_ker.h:91