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

hal_emvl1.h
Go to the documentation of this file.
1 #ifndef HAL_EMVL1_H
2 #define HAL_EMVL1_H
3
4 /* *************************** HAL EMV Level1 API declaration ****************************** */
8 /* ***************************************************************************************** */
9
10 /* ***************************************************************************************** */
17 /* ***************************************************************************************** */
18
19 /* *********************************** EMVL1 marcos **************************************** */
24 /* ***************************************************************************************** */
25 #define KER_EMVL1_PROTOCOL_T0 0x00
26 #define KER_EMVL1_PROTOCOL_T1 0x01
28 #define KER_EMVL1_RESET_SMART 0x00
29 #define KER_EMVL1_RESET_AUTO 0x01
30 #define KER_EMVL1_RESET_COLD 0x02
31 #define KER_EMVL1_RESET_WARM 0x03
33 #define KER_EMVL1_LE_MAX 0x0000
34 #define KER_EMVL1_LE_NULL 0xFFFF
36 #define KER_EMVL1_APDU_CASE1 0x01
37 #define KER_EMVL1_APDU_CASE2 0x02
38 #define KER_EMVL1_APDU_CASE3 0x03
39 #define KER_EMVL1_APDU_CASE4 0x04
40 /* ***************************************************************************************** */
43 /* ******************************** hal_emvl1_reset_card *********************************** */
54 extern KER_BOOL hal_emvl1_reset_card(KER_CTX_PARAM KER_BYTE btResetType, KER_BYTE *pbtATR, KER_BYTE *pbtATRLen, KER_BYTE btATRLenMax);
55
56 /* ******************************* hal_emvl1_exchange_apdu ********************************* */
76 extern KER_BOOL hal_emvl1_exchange_apdu(KER_CTX_PARAM KER_BYTE btProtocol, KER_BYTE btApduCase,
77 KER_BYTE btCLA, KER_BYTE btINS, KER_BYTE btP1, KER_BYTE btP2,
78 KER_INT16U usLc, const KER_BYTE *pbtDataIn, KER_INT16U usLe,
79 KER_BYTE *pbtDataOut, KER_INT16U *pusDataOut, KER_INT16U usDataOutSize, KER_INT16U *pusSW1SW2);
80
81 /* ******************************* CALLBACK_EMVL1_RESET_CARD ******************************* */
96 typedef KER_BOOL (KER_API *CALLBACK_EMVL1_RESET_CARD)(KER_CTX_PARAM KER_VOID* pCallbackHandle, KER_BYTE btResetType, KER_BYTE* pbtATR, KER_BYTE *pbtATRLen, KER_BYTE btATRLenMax);
97
98 /* ****************************** CALLBACK_EMVL1_EXCHANGE_APDU ***************************** */
122 typedef KER_BOOL (KER_API *CALLBACK_EMVL1_EXCHANGE_APDU)(KER_CTX_PARAM KER_VOID* pCallbackHandle, KER_BYTE btProtocol, KER_BYTE btApduCase,
123 KER_BYTE btCLA, KER_BYTE btINS, KER_BYTE btP1, KER_BYTE btP2,
124 KER_INT16U usLc, const KER_BYTE *pbtDataIn, KER_INT16U usLe,
125 KER_BYTE *pbtDataOut, KER_INT16U *pusDataOut, KER_INT16U usDataOutSize, KER_INT16U *pusSW1SW2);
126
127 /* ***************************** CALLBACK_EMVL1_GET_IFD_SERIAL ***************************** */
141 typedef KER_BOOL (KER_API *CALLBACK_EMVL1_GET_IFD_SERIAL)(KER_CTX_PARAM KER_VOID* pCallbackHandle, KER_CHAR* pbtSerialNumber, KER_BYTE *pbtSerialNumberLen, KER_BYTE btSerialNumberLenMax);
142
143
144 #endif /* HAL_EMVL1_H */
KER_VOID
void KER_VOID
Definition: emv_platform.h:66
KER_BOOL
KER_INT8U KER_BOOL
Definition: emv_platform.h:67
KER_BYTE
uint8_t KER_BYTE
Definition: emv_platform.h:70
KER_INT16U
unsigned short KER_INT16U
Definition: emv_platform.h:61
KER_CHAR
char KER_CHAR
Definition: emv_platform.h:65
KER_CTX_PARAM
#define KER_CTX_PARAM
Definition: emv_context.h:53
hal_emvl1_reset_card
KER_BOOL hal_emvl1_reset_card(KER_CTX_PARAM KER_BYTE btResetType, KER_BYTE *pbtATR, KER_BYTE *pbtATRLen, KER_BYTE btATRLenMax)
Reset command to the card reader.
hal_emvl1_exchange_apdu
KER_BOOL hal_emvl1_exchange_apdu(KER_CTX_PARAM KER_BYTE btProtocol, KER_BYTE btApduCase, KER_BYTE btCLA, KER_BYTE btINS, KER_BYTE btP1, KER_BYTE btP2, KER_INT16U usLc, const KER_BYTE *pbtDataIn, KER_INT16U usLe, KER_BYTE *pbtDataOut, KER_INT16U *pusDataOut, KER_INT16U usDataOutSize, KER_INT16U *pusSW1SW2)
Send APDU requset and obtain APDU response from card.
CALLBACK_EMVL1_EXCHANGE_APDU
KER_BOOL(KER_API * CALLBACK_EMVL1_EXCHANGE_APDU)(KER_CTX_PARAM KER_VOID *pCallbackHandle, KER_BYTE btProtocol, KER_BYTE btApduCase, KER_BYTE btCLA, KER_BYTE btINS, KER_BYTE btP1, KER_BYTE btP2, KER_INT16U usLc, const KER_BYTE *pbtDataIn, KER_INT16U usLe, KER_BYTE *pbtDataOut, KER_INT16U *pusDataOut, KER_INT16U usDataOutSize, KER_INT16U *pusSW1SW2)
Callback type to send APDU requset and obtain APDU response from card.
Definition: hal_emvl1.h:122
CALLBACK_EMVL1_RESET_CARD
KER_BOOL(KER_API * CALLBACK_EMVL1_RESET_CARD)(KER_CTX_PARAM KER_VOID *pCallbackHandle, KER_BYTE btResetType, KER_BYTE *pbtATR, KER_BYTE *pbtATRLen, KER_BYTE btATRLenMax)
Callback type for reset command to the card reader.
Definition: hal_emvl1.h:96
CALLBACK_EMVL1_GET_IFD_SERIAL
KER_BOOL(KER_API * CALLBACK_EMVL1_GET_IFD_SERIAL)(KER_CTX_PARAM KER_VOID *pCallbackHandle, KER_CHAR *pbtSerialNumber, KER_BYTE *pbtSerialNumberLen, KER_BYTE btSerialNumberLenMax)
Callback type for reset command to the card reader.
Definition: hal_emvl1.h:141