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

hal_nfc_cv.h
Go to the documentation of this file.
1 #ifndef HAL_NFC_CV_H
2 #define HAL_NFC_CV_H
3
4 /* ******** HAL NFC terminal custom cardholder verification functions API declaration ****** */
8 /* ***************************************************************************************** */
9
10 /* ***************************************************************************************** */
18 /* ***************************************************************************************** */
19
20 /* ******************************** CVM Results definition ********************************* */
24 #define HAL_NFC_CVM_RES_OK 0x00
25 #define HAL_NFC_CVM_RES_UNSUPP 0x01
26 #define HAL_NFC_CVM_RES_UNREC 0x02
27 #define HAL_NFC_CVM_RES_FAIL 0x03
30 #ifdef KER_ENABLE_CUSTOM_CV_RULE
31
32 /* ************************** hal_nfc_cv_check_cvm_condition ******************************* */
41 extern KER_BOOL hal_nfc_cv_check_cvm_condition(KER_CTX_PARAM KER_BYTE btCVM, KER_BYTE btCondition);
42
44 #define KER_NFC_CHECK_CUSTOM_CVM_COND(CVM,Condition) hal_nfc_cv_check_cvm_condition(KER_CTX CVM, Condition)
45
46 /* ******************************* hal_nfc_cv_apply_cvm ************************************ */
60 extern KER_BYTE hal_nfc_cv_apply_cvm(KER_CTX_PARAM KER_BYTE btCVM, KER_BYTE* pbtCvmRes, KER_BYTE* pbtOutcomeCVM, KER_BYTE* pbtTVR, KER_BYTE btTVRLen);
61
63 #define KER_NFC_APPLY_CUSTOM_CVM(CVM,RES,OUT,TVR,TVR_LEN) hal_nfc_cv_apply_cvm(KER_CTX CVM, RES, OUT, TVR, TVR_LEN)
64
65 #else
67 #define KER_NFC_CHECK_CUSTOM_CVM_COND(CVM,Condition) KER_FALSE
69 #define KER_NFC_APPLY_CUSTOM_CVM(CVM,RES,TVR,TVR_LEN) KER_CVM_RES_UNREC
70 #endif
71
72 /* ************************ CALLBACK_NFC_CV_CHECK_CUST_CVM_CONDITION *********************** */
84 typedef KER_BOOL(KER_API *CALLBACK_NFC_CV_CHECK_CUST_CVM_CONDITION)(KER_CTX_PARAM KER_VOID* pCallbackHandle, KER_BYTE btCVM, KER_BYTE btCondition);
85
86
87 /* ****************************** CALLBACK_NFC_CV_APPLY_CUST_CVM *************************** */
103 typedef KER_BYTE(KER_API *CALLBACK_NFC_CV_APPLY_CUST_CVM)(KER_CTX_PARAM KER_VOID* pCallbackHandle, KER_BYTE btCVM, KER_BYTE* pbtRes, KER_BYTE* pbtTVR, KER_BYTE btTVRLen);
104
105
106 #endif /* HAL_NFC_CV_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_CTX_PARAM
#define KER_CTX_PARAM
Definition: emv_context.h:53
CALLBACK_NFC_CV_CHECK_CUST_CVM_CONDITION
KER_BOOL(KER_API * CALLBACK_NFC_CV_CHECK_CUST_CVM_CONDITION)(KER_CTX_PARAM KER_VOID *pCallbackHandle, KER_BYTE btCVM, KER_BYTE btCondition)
Callback type for check custom cvm condition.
Definition: hal_nfc_cv.h:84
CALLBACK_NFC_CV_APPLY_CUST_CVM
KER_BYTE(KER_API * CALLBACK_NFC_CV_APPLY_CUST_CVM)(KER_CTX_PARAM KER_VOID *pCallbackHandle, KER_BYTE btCVM, KER_BYTE *pbtRes, KER_BYTE *pbtTVR, KER_BYTE btTVRLen)
Callback type for apply custom cvm.
Definition: hal_nfc_cv.h:103