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

Data Structures | Macros | Typedefs | Functions
HAL callback storing interface

Callbacks definition. More...

## Data Structures
struct | tag_T_NFC_CALLBACKS
| Struct to handle all callbacks. More...

## Macros
#define | NUM_T_NFC_CALLBACK_GET_READER_TYPE 1
| Code, used to register T_NFC_CALLBACK_GET_READER_TYPE callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CARD_SENDCAPDU 2
| Code, used to register T_NFC_CALLBACK_CARD_SENDCAPDU callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CARD_RECEIVERAPDU 3
| Code, used to register T_NFC_CALLBACK_CARD_RECEIVERAPDU callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_FIELD_OFF 4
| Code, used to register T_NFC_CALLBACK_CARD_POWER_DOWN callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CARD_POLL 5
| Code, used to register T_NFC_CALLBACK_CARD_POWER_UP callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CARD_GETINFO 6
| Code, used to register T_NFC_CALLBACK_CARD_GETINFO callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CARD_REMOVAL_PROCEDURE 7
| Code, used to register T_NFC_CALLBACK_CARD_REMOVAL_PROCEDURE callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_RESET_OPERATION_FIELD 8
| Code, used to register T_NFC_CALLBACK_RESET_OPERATION_FIELD callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_GET_READER_SERIAL_NUMBER 9
| Code, used to register T_NFC_CALLBACK_GET_READER_SERIAL_NUMBER callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_TRACE_SET_MODE 11
| Code, used to register T_NFC_CALLBACK_TRACE_SET_MODE callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_TRACE_GET_MODE 12
| Code, used to register T_NFC_CALLBACK_TRACE_GET_MODE callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_TRACE_STRING 13
| Code, used to register T_NFC_CALLBACK_TRACE_STRING callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_TRACE_BUFFER 14
| Code, used to register T_NFC_CALLBACK_TRACE_BUFFER callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_TRACE_TIME 15
| Code, used to register T_NFC_CALLBACK_TRACE_TIME callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_TRACE_ERROR 16
| Code, used to register T_NFC_CALLBACK_TRACE_ERROR callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_KEEP_TRACE_TIME 17
| Code, used to register T_NFC_CALLBACK_KEEP_TRACE_TIME callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_TRACE_FLUSH 18
| Code, used to register T_NFC_CALLBACK_TRACE_FLUSH callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_MEM_CMP 21
| Code, used to register T_NFC_CALLBACK_MEM_CMP callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_MEM_SET 22
| Code, used to register T_NFC_CALLBACK_MEM_SET callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_MEM_CPY 23
| Code, used to register T_NFC_CALLBACK_MEM_CPY callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_MEM_MOVE 24
| Code, used to register T_NFC_CALLBACK_MEM_MOVE callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_MEM_ADD 25
| Code, used to register T_NFC_CALLBACK_MEM_ADD callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_MEM_SPRINTF 26
| Code, used to register T_NFC_CALLBACK_MEM_SPRINTF callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_MEM_VSPRINTF 27
| Code, used to register T_NFC_CALLBACK_MEM_VSPRINTF callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_MEM_ALLOC 28
| Code, used to register T_NFC_CALLBACK_MEM_ALLOC callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_MEM_RELEASE_EX 29
| Code, used to register T_NFC_CALLBACK_MEM_RELEASE_EX callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CFG_GET_CONFIG_BY_ID 31
| Code, used to register T_NFC_CALLBACK_CFG_GET_CONFIG_BY_ID callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CFG_GET_CUST_TAG_BY_ID 32
| Code, used to register T_NFC_CALLBACK_CFG_GET_CUST_TAG_BY_ID callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CFG_GET_ID_BY_CUST_TAG 33
| Code, used to register T_NFC_CALLBACK_CFG_GET_ID_BY_CUST_TAG callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CFG_IS_TRAN_CASH 34
| Code, used to register T_NFC_CALLBACK_CFG_IS_TRAN_CASH callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CFG_IS_TRAN_SALE 35
| Code, used to register T_NFC_CALLBACK_CFG_IS_TRAN_SALE callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CFG_IS_TRAN_CASHBACK 36
| Code, used to register T_NFC_CALLBACK_CFG_IS_TRAN_CASHBACK callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CFG_IS_TRAN_MAN_CASH 37
| Code, used to register T_NFC_CALLBACK_CFG_IS_TRAN_MAN_CASH callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CFG_IS_TRAN_REFUND 38
| Code, used to register T_NFC_CALLBACK_CFG_IS_TRAN_REFUND callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CFG_IS_APPROVED_ONLINE 39
| Code, used to register T_NFC_CALLBACK_CFG_IS_APPROVED_ONLINE callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CFG_SET_CONFIG_BY_ID 40
| Code, used to register T_NFC_CALLBACK_CFG_SET_CONFIG_BY_ID callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CFG_GET_EP_CONFIG 41
| Code, used to register T_NFC_CALLBACK_CFG_GET_EP_CONFIG callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_GET_DEFAULT_KERNEL_ID 42
| Code, used to register T_NFC_CALLBACK_GET_DEFAULT_KERNEL_ID callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_GET_CUSTOM_KERNEL_ID 43
| Code, used to register T_NFC_CALLBACK_GET_DEFAULT_KERNEL_ID callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CV_CHECK_CVM_COND 51
| Code, used to register T_NFC_CALLBACK_CV_CHECK_CVM_COND callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CV_APPLY_CVM 52
| Code, used to register T_NFC_CALLBACK_CV_APPLY_CVM callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_DEX_DATAFROMKERNEL 61
| Code, used to register T_NFC_CALLBACK_DEX_DATAFROMKERNEL callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_DEX_DATAFROMTERMINAL 62
| Code, used to register T_NFC_CALLBACK_DEX_DATAFROMTERMINAL callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_DEX_FREERESULT_EX 63
| Code, used to register T_NFC_CALLBACK_DEX_FREERESULT_EX callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CRYPT_HASH 71
| Code, used to register T_NFC_CALLBACK_CRYPT_HASH callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CRYPT_HASH_INIT 72
| Code, used to register T_NFC_CALLBACK_CRYPT_HASH_INIT callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CRYPT_HASH_UPDATE 73
| Code, used to register T_NFC_CALLBACK_CRYPT_HASH_UPDATE callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CRYPT_HASH_COMPLETE 74
| Code, used to register T_NFC_CALLBACK_CRYPT_HASH_COMPLETE callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CRYPT_UNPRED_NUMBER 75
| Code, used to register T_NFC_CALLBACK_CRYPT_UNPRED_NUMBER callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CRYPT_SET_AC 76
| Code, used to register T_NFC_CALLBACK_CRYPT_SET_AC callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CRYPT_GET_CA_PK 77
| Code, used to register T_NFC_CALLBACK_CRYPT_GET_CA_PK callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CRYPT_MSG_RECOVERY 78
| Code, used to register T_NFC_CALLBACK_CRYPT_MSG_RECOVERY callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CRYPT_CERT_REVOCATION 79
| Code, used to register T_NFC_CALLBACK_CRYPT_CERT_REVOCATION callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CRYPT_ENCRYPT 80
| Code, used to register T_NFC_CALLBACK_CRYPT_ENCRYPT callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_CRYPT_DECRYPT 81
| Code, used to register T_NFC_CALLBACK_CRYPT_DECRYPT callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_INIT_CHECKSUM_EX 91
| Code, used to register T_NFC_CALLBACK_INIT_CHECKSUM_EX callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_UI_SCHEDULE_CHANGE_REQUEST 101
| Code, used to register T_NFC_CALLBACK_UI_SCHEDULE_CHANGE_REQUEST callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_UI_CANCEL_CHANGE_REQUEST 102
| Code, used to register T_NFC_CALLBACK_UI_CANCEL_CHANGE_REQUEST callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_SYS_SLEEP 111
| Code, used to register T_NFC_CALLBACK_SYS_SLEEP callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_SYS_GET_100_MICROSEC_TIMESTAMP 112
| Code, used to register T_NFC_CALLBACK_SYS_GET_100_MICROSEC_TIMESTAMP callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_SYS_GET_DATE_TIME 113
| Code, used to register T_NFC_CALLBACK_SYS_GET_DATE_TIME callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_SYS_GET_UTC_DATE_TIME 114
| Code, used to register T_NFC_CALLBACK_SYS_GET_UTC_DATE_TIME callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_NOTIFY 121
| Code, used to register T_NFC_CALLBACK_NOTIFY callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_CALLBACK_ONLINE_CHECK 122
| Code, used to register T_NFC_CALLBACK_ONLINE_CHECK callback through t_nfc_RegisterCallback.
#define | T_NFC_CALLBACKS_VER_00 0x00
| Struct to handle all callbacks version. More...

## Typedefs
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_GET_READER_TYPE) (T_NFC_CLB_CTX_PARAM KER_CHAR *data, KER_BYTE *dlen)
| Get IFD type for IFD related config Optional Callback. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CARD_SENDCAPDU) (T_NFC_CLB_CTX_PARAM KER_BYTE btCase, KER_BYTE btCls, KER_BYTE btIns, KER_BYTE btP1, KER_BYTE btP2, KER_INT16U usLc, const KER_BYTE *pbtDataIn, KER_INT16U usLe)
| Send APDU requset to card. More...
typedef KER_RES(CLB_API * | T_NFC_CALLBACK_CARD_RECEIVERAPDU) (T_NFC_CLB_CTX_PARAM KER_INT16U usTimeout, KER_BYTE *pbtDataOut, KER_INT16U *pusDataOutLength, KER_INT16U usDataOutMaxLength, KER_INT16U *pusSW1SW2, KER_INT32U *pulExecutionTime)
| Obtain APDU response from card. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_FIELD_OFF) (T_NFC_CLB_CTX_SINGLE_PARAM)
| PCD field off request. More...
typedef KER_RES(CLB_API * | T_NFC_CALLBACK_CARD_POLL) (T_NFC_CLB_CTX_PARAM KER_INT32U ulTimeout, KER_INT16U *pusCardType, KER_BYTE *pbtUID, KER_INT16U *pusUIDLen)
| PCD field on and card polling during specified timeout. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CARD_GETINFO) (T_NFC_CLB_CTX_PARAM KER_INT16U *pusCardType, KER_BYTE *pbtUID, KER_INT16U *pusUIDLen)
| Callback returns info for last activated card. More...
typedef KER_RES(CLB_API * | T_NFC_CALLBACK_CARD_REMOVAL_PROCEDURE) (T_NFC_CLB_CTX_PARAM KER_INT32U ulTimeout)
| Performs EMV L1 card removal procedure Callback called by Entry Point only. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_RESET_OPERATION_FIELD) (T_NFC_CLB_CTX_SINGLE_PARAM)
| Reset operation field Callback called by Entry Point only. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_GET_READER_SERIAL_NUMBER) (T_NFC_CLB_CTX_PARAM KER_CHAR *data, KER_BYTE *dlen)
| Get serial number of the IFD Optional Callback. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_TRACE_SET_MODE) (T_NFC_CLB_CTX_PARAM KER_BYTE btTraceMode)
| Set trace mode. More...
typedef KER_BYTE(CLB_API * | T_NFC_CALLBACK_TRACE_GET_MODE) (T_NFC_CLB_CTX_SINGLE_PARAM)
| Get trace mode. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_TRACE_STRING) (T_NFC_CLB_CTX_PARAM const KER_CHAR *pchString)
| Trace povided nul-term string. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_TRACE_BUFFER) (T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtDataBuffer, KER_INT16U usDataBufferSize)
| Trace povided data buffer. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_TRACE_TIME) (T_NFC_CLB_CTX_SINGLE_PARAM)
| Trace timestamp. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_TRACE_ERROR) (T_NFC_CLB_CTX_PARAM KER_INT16U usTraceLevel, KER_RES resErrCode, const KER_CHAR *pchErrorText)
| Trace error to system error journal. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_KEEP_TRACE_TIME) (T_NFC_CLB_CTX_PARAM KER_BYTE *pbtTimeBuffer, KER_INT16U *pusTimeBufferSize)
| Keep trace timestamp. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_TRACE_FLUSH) (T_NFC_CLB_CTX_SINGLE_PARAM)
| Flush trace to tracefile (optional) More...
typedef KER_INT32S(CLB_API * | T_NFC_CALLBACK_MEM_CMP) (T_NFC_CLB_CTX_PARAM const KER_VOID *pvBuffer1, const KER_VOID *pvBuffer2, KER_INT16U usCount)
| Compare memory buffers. More...
typedef KER_VOID *(CLB_API * | T_NFC_CALLBACK_MEM_SET) (T_NFC_CLB_CTX_PARAM KER_VOID *pvDestBuffer, KER_INT16U usDestBufferSize, KER_BYTE btValue, KER_INT16U usCount)
| Reset memory buffer with specified value. More...
typedef KER_INT16U(CLB_API * | T_NFC_CALLBACK_MEM_CPY) (T_NFC_CLB_CTX_PARAM KER_VOID *pvDestBuffer, KER_INT16U usDestBufferSize, const KER_VOID *pvSourceBuffer, KER_INT16U usSourceBufferSize)
| Copy one memory buffer to another. More...
typedef KER_VOID *(CLB_API * | T_NFC_CALLBACK_MEM_MOVE) (T_NFC_CLB_CTX_PARAM KER_VOID *pvDestBuffer, KER_INT16U usDestBufferSize, KER_VOID *pvSourceBuffer, KER_INT16U usSourceBufferSize)
| Copy one memory buffer to another (event if buffer overlaped) More...
typedef KER_INT16U(CLB_API * | T_NFC_CALLBACK_MEM_ADD) (T_NFC_CLB_CTX_PARAM KER_VOID *pvDestBuffer, KER_INT16U usDestBufferSize, KER_INT16U usDestBufferOffset, const KER_VOID *pvSourceBuffer, KER_INT16U usSourceBufferSize)
| Add memory buffer to existing buffer with offset. More...
typedef KER_INT16U(KER_CDECL * | T_NFC_CALLBACK_MEM_SPRINTF) (T_NFC_CLB_CTX_PARAM KER_CHAR *pchDestBuffer, KER_INT16U usDestBufferSize, const KER_CHAR *pchFormat,...)
| sprintf_s analog More...
typedef KER_INT16U(KER_CDECL * | T_NFC_CALLBACK_MEM_VSPRINTF) (T_NFC_CLB_CTX_PARAM KER_CHAR *pchDestBuffer, KER_INT16U usDestBufferSize, const KER_CHAR *pchFormat, va_list _ArgList)
| sprintf_s analog More...
typedef KER_VOID *(CLB_API * | T_NFC_CALLBACK_MEM_ALLOC) (T_NFC_CLB_CTX_PARAM KER_INT16U usBufferSize)
| allocate memory buffer More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_MEM_RELEASE_EX) (T_NFC_CLB_CTX_PARAM KER_VOID *pBuffer, KER_INT16U usBufferSize)
| release previously allocated memory buffer More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CFG_GET_CONFIG_BY_ID) (T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtAID, KER_INT16U usAIDLen, const KER_TLV *pTranDataList, const KER_TLV *pTranContextList, KER_INT16U usID, KER_BYTE *pbtValue, KER_INT16U *pusValueLen, KER_INT16U usMaxLen)
| Provide terminal configuration specific for AID-Transaction data combination which have no emv tag assinged by ID. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CFG_GET_CUST_TAG_BY_ID) (T_NFC_CLB_CTX_PARAM KER_INT16U usID, KER_BYTE *pbtValue, KER_INT16U *pusValueLen, KER_INT16U usMaxLen)
| Remapp terminal configuration id to custom tag. More...
typedef KER_INT16U(CLB_API * | T_NFC_CALLBACK_CFG_GET_ID_BY_CUST_TAG) (T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtTag, KER_INT16U usTagLen)
| Remapp custom tag to configuration ID. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CFG_IS_TRAN_CASH) (T_NFC_CLB_CTX_PARAM KER_BYTE btTranType)
| Check transaction type (9C) for cash tran (cash or cash disbursement at POS) More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CFG_IS_TRAN_SALE) (T_NFC_CLB_CTX_PARAM KER_BYTE btTranType)
| Check transaction type (9C) for goods and services. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CFG_IS_TRAN_CASHBACK) (T_NFC_CLB_CTX_PARAM KER_BYTE btTranType)
| Check transaction type (9C) for cashback. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CFG_IS_TRAN_MAN_CASH) (T_NFC_CLB_CTX_PARAM KER_BYTE btTranType)
| Check transaction type (9C) for cashback. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CFG_IS_TRAN_REFUND) (T_NFC_CLB_CTX_PARAM KER_BYTE btTranType)
| Check transaction type (9C) for cashback. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CFG_IS_APPROVED_ONLINE) (T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtARC, KER_INT16U usARCLen)
| Check online result by ARC. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CFG_SET_CONFIG_BY_ID) (T_NFC_CLB_CTX_PARAM KER_INT16U usID, const KER_BYTE *pbtValue, KER_INT16U usValueLen)
| Keeps trerminal params in "scratch pad". More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CFG_GET_EP_CONFIG) (T_NFC_CLB_CTX_PARAM const KER_TLV *pTranData, HAL_CONFIG_NFC_COMB **ppCombList)
| Provides configuration (common / combination / tran related for EP This callback called by Entry Point only. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_GET_DEFAULT_KERNEL_ID) (T_NFC_CLB_CTX_PARAM const KER_BYTE *pAID, KER_INT16U usAIDLen, KER_BYTE *pbtKernelID, KER_BYTE *pbtKernelIDLen, KER_BYTE btMaxLen)
| Provides default AID - Kernel ID mapping Optional callback called by Entry Point only. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_GET_CUSTOM_KERNEL_ID) (T_NFC_CLB_CTX_PARAM const KER_BYTE *p61, KER_INT16U us61Len, KER_BYTE *pbtKernelID, KER_BYTE *pbtKernelIDLen, KER_BYTE btMaxLen)
| Provides custom mapping between Directory Entry and Requested Kernel ID Optional callback called by Entry Point only. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CV_CHECK_CVM_COND) (T_NFC_CLB_CTX_PARAM KER_BYTE btCVM, KER_BYTE btCondition)
| Check if non standard cvm condition met. More...
typedef KER_BYTE(CLB_API * | T_NFC_CALLBACK_CV_APPLY_CVM) (T_NFC_CLB_CTX_PARAM KER_BYTE btCVM, KER_BYTE *pbtRes, KER_BYTE *pbtOutcomeCVM, KER_BYTE *pbtTVR, KER_BYTE btTVRLen)
| Apply non standard cvm. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_DEX_DATAFROMKERNEL) (T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtKernelData, KER_INT16U usKernelDataLen)
| Data exchange callback. More...
typedef KER_RES(CLB_API * | T_NFC_CALLBACK_DEX_DATAFROMTERMINAL) (T_NFC_CLB_CTX_PARAM KER_INT16U usTimeout, KER_INT16U usParam, KER_VOID *pParam, KER_BYTE **ppbtTerminalData, KER_INT16U *pusTerminalDataLen)
| Data exchange callback. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_DEX_FREERESULT_EX) (T_NFC_CLB_CTX_PARAM KER_BYTE *pbtData, KER_INT16U usDataLen)
| Data exchange callback. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CRYPT_HASH) (T_NFC_CLB_CTX_PARAM KER_BYTE btAlg, KER_VOID *pExtra, const KER_BYTE *pbtDataBuffer, KER_INT16U usDataBufferLen, KER_BYTE *pbtHash, KER_INT16U *pusHashLen, KER_INT16U usHashSize)
| Calculates hash for data buffer provided. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CRYPT_HASH_INIT) (T_NFC_CLB_CTX_PARAM KER_BYTE btAlg, KER_VOID *pExtra, KER_VOID **ppHashHandle)
| Initiates hash calculation. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CRYPT_HASH_UPDATE) (T_NFC_CLB_CTX_PARAM KER_VOID *pHashHandle, KER_BYTE btAlg, const KER_BYTE *pbtDataBuffer, KER_INT16U usDataBufferLen)
| Passes data for hash calculation (can be executed several times) More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CRYPT_HASH_COMPLETE) (T_NFC_CLB_CTX_PARAM KER_VOID *pHashHandle, KER_BYTE btAlg, KER_BYTE *pbtHash, KER_INT16U *pusHashLen, KER_INT16U usHashSize)
| Calculates hash on prev. provided data. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CRYPT_UNPRED_NUMBER) (T_NFC_CLB_CTX_PARAM KER_INT16U usUnpredNumLen, KER_BYTE *pbtUnpredNum)
| Calculates unpredictable number. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CRYPT_SET_AC) (T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtAc, KER_INT16U usAcLen)
| Updates unpredictable (random) number calculator with last AC (9F26) value (only if it was obtained from card) More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CRYPT_GET_CA_PK) (T_NFC_CLB_CTX_PARAM KER_BYTE btKernelID, const KER_BYTE *pbtRID, KER_BYTE btRIDLen, KER_BYTE btKeyIndex, HAL_CRYPT_PK *pCA_PK)
| Get CA PK by index from repositoty. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CRYPT_MSG_RECOVERY) (T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtPK, KER_INT16U usPKLen, const KER_BYTE *pbtExp, KER_INT16U usExpLen, KER_BYTE btAlg, const KER_BYTE *pbtMsg, KER_INT16U usMsgLen, KER_BYTE *pbtResult, KER_INT16U *pusResultLen, KER_INT16U usMaxLen)
| Message recovery according to EMV Book 2, Appendix A2.1. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CRYPT_CERT_REVOCATION) (T_NFC_CLB_CTX_PARAM KER_BYTE btKernelID, const KER_BYTE *pbtRID, KER_BYTE btRIDLen, KER_BYTE btKeyIndex, const HAL_CRYPT_CERT_INFO *pCert)
| Get CA PK by index from repositoty. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CRYPT_ENCRYPT) (T_NFC_CLB_CTX_PARAM KER_BYTE btAlg, const KER_BYTE *pbtKey, KER_INT16U usKeyLen, const KER_BYTE *pbtIV, KER_INT16U usIVLen, const KER_BYTE *pbtData, KER_INT16U usDataLen, KER_BYTE *pbtResult, KER_INT16U *pusResultLen, KER_INT16U usMaxLen)
| Performs encryption. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_CRYPT_DECRYPT) (T_NFC_CLB_CTX_PARAM KER_BYTE btAlg, const KER_BYTE *pbtKey, KER_INT16U usKeyLen, const KER_BYTE *pbtIV, KER_INT16U usIVLen, const KER_BYTE *pbtData, KER_INT16U usDataLen, KER_BYTE *pbtResult, KER_INT16U *pusResultLen, KER_INT16U usMaxLen)
| Performs decryption. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_INIT_CHECKSUM_EX) (T_NFC_CLB_CTX_PARAM KER_BYTE btType, const KER_CHAR *pchKernelModuleList, KER_INT16U usKernelModuleListLen, KER_BYTE *pbtCheckSum, KER_INT16U *pusCheckSumLen, KER_INT16U usMaxSize)
| Pass checksums to the kernel. More...
typedef KER_VOID(CLB_API * | T_NFC_CALLBACK_SYS_SLEEP) (T_NFC_CLB_CTX_PARAM KER_INT32U ulTimeout)
| Sleeps for specified timeout. More...
typedef KER_INT32U(CLB_API * | T_NFC_CALLBACK_SYS_GET_100_MICROSEC_TIMESTAMP) (T_NFC_CLB_CTX_SINGLE_PARAM)
| Provides terminal timestamp for Kernel (in 100 microsec resolution) More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_NOTIFY) (T_NFC_CLB_CTX_PARAM KER_INT16U usNotifyType, const KER_VOID *pNotifyData, KER_INT16U usNotifyDataLen)
| Notifies HAL about some specific event. More...
typedef KER_BOOL(CLB_API * | T_NFC_CALLBACK_ONLINE_CHECK) (T_NFC_CLB_CTX_SINGLE_PARAM)
| Checks HAL for unable to go online condition (for AmEx C-4). More...
typedef struct tag_T_NFC_CALLBACKS | T_NFC_CALLBACKS
| Struct to handle all callbacks.
typedef struct tag_T_NFC_CALLBACKS | T_NFC_CALLBACKS
| Struct to handle all callbacks.

## Functions
KER_RES | nfcRegisterCallback (T_NFC_CALLBACKS *pCallbacks, KER_INT16U usCllbackID, KER_VOID *pCallback)
| HAL callback registration. More...
#define | T_NFC_DE_RES_OK 0x0000
| T_NFC_CALLBACK_DEX_DATAFROMTERMINAL callback result codes definition More...
#define | T_NFC_DE_RES_TIMEOUT 0x0001
#define | T_NFC_DE_RES_NO_DATA 0x0002
#define | T_NFC_DE_RES_FAIL 0x0003

## Detailed Description

Callbacks definition.

## Macro Definition Documentation

## ◆ T_NFC_CALLBACKS_VER_00

#define T_NFC_CALLBACKS_VER_00 0x00

Struct to handle all callbacks version.

initial version

## ◆ T_NFC_DE_RES_FAIL

#define T_NFC_DE_RES_FAIL 0x0003

failure

## ◆ T_NFC_DE_RES_NO_DATA

#define T_NFC_DE_RES_NO_DATA 0x0002

no new data from terminal

## ◆ T_NFC_DE_RES_OK

#define T_NFC_DE_RES_OK 0x0000

T_NFC_CALLBACK_DEX_DATAFROMTERMINAL callback result codes definition

ok

## ◆ T_NFC_DE_RES_TIMEOUT

#define T_NFC_DE_RES_TIMEOUT 0x0001

timeout

## Typedef Documentation

## ◆ T_NFC_CALLBACK_CARD_GETINFO

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CARD_GETINFO) (T_NFC_CLB_CTX_PARAM KER_INT16U *pusCardType, KER_BYTE *pbtUID, KER_INT16U *pusUIDLen)

Callback returns info for last activated card.

Parameters

  [out] | pusCardType | Card type, see KER_NFCL1_PHISICAL_CARD_TYPE_NONE, KER_NFCL1_PHISICAL_CARD_TYPE_ISO14443_4_A KER_NFCL1_PHISICAL_CARD_TYPE_ISO14443_4_B KER_NFCL1_PHISICAL_CARD_TYPE_MIFARE_A_STD KER_NFCL1_PHISICAL_CARD_TYPE_MIFARE_A_UL KER_NFCL1_PHISICAL_CARD_TYPE_ISO14443_A KER_NFCL1_PHISICAL_CARD_TYPE_ISO14443_B KER_NFCL1_PHISICAL_CARD_TYPE_ISO14443_AND_MIFARE KER_NFCL1_PHISICAL_CARD_TYPE_UNKNOWN
  [out] | pbtUID | Card UID, if available
  [in,out] | pusUIDLen | Size of lpbtUID in/out

Returns
  KER_TRUE Success.
  KER_FALSE Failure. Execution failed due to reader error.

## ◆ T_NFC_CALLBACK_CARD_POLL

typedef KER_RES(CLB_API * T_NFC_CALLBACK_CARD_POLL) (T_NFC_CLB_CTX_PARAM KER_INT32U ulTimeout, KER_INT16U *pusCardType, KER_BYTE *pbtUID, KER_INT16U *pusUIDLen)

PCD field on and card polling during specified timeout.

Parameters

  [in] | ulTimeout | Card polling timeout (in msec, or special value KER_NFCL1_PU_POLLING_TIMEOUT for external polling)
  [in,out] | pusCardType | Card type polling for bitmask as input (set KER_NFCL1_PHISICAL_CARD_TYPE_DEFAULT to use internal PCD configuration), located card type as output (optional, set KER_NULL for PCD default settings), see KER_NFCL1_PHISICAL_CARD_TYPE_DEFAULT, KER_NFCL1_PHISICAL_CARD_TYPE_NONE, KER_NFCL1_PHISICAL_CARD_TYPE_ISO14443_A KER_NFCL1_PHISICAL_CARD_TYPE_ISO14443_B KER_NFCL1_PHISICAL_CARD_TYPE_ISO14443_4_A KER_NFCL1_PHISICAL_CARD_TYPE_ISO14443_4_B KER_NFCL1_PHISICAL_CARD_TYPE_MIFARE_A_STD KER_NFCL1_PHISICAL_CARD_TYPE_MIFARE_A_UL KER_NFCL1_PHISICAL_CARD_TYPE_ISO14443_AND_MIFARE KER_NFCL1_PHISICAL_CARD_TYPE_UNKNOWN
  [out] | pbtUID | Card UID, if available
  [in,out] | pusUIDLen | Size of pbtUID in/out

Returns
  KER_OK Success
  KER_NFCL1_PU_RES_TIMEOUT polling timeout
  KER_NFCL1_PU_RES_COLLISION card collision detected
  KER_NFCL1_PU_RES_COMM_ERROR card communication error
  Other - failure. Execution failed due to reader error.

## ◆ T_NFC_CALLBACK_CARD_RECEIVERAPDU

typedef KER_RES(CLB_API * T_NFC_CALLBACK_CARD_RECEIVERAPDU) (T_NFC_CLB_CTX_PARAM KER_INT16U usTimeout, KER_BYTE *pbtDataOut, KER_INT16U *pusDataOutLength, KER_INT16U usDataOutMaxLength, KER_INT16U *pusSW1SW2, KER_INT32U *pulExecutionTime)

Obtain APDU response from card.

Parameters

  [in] | usTimeout | Wait R-APDU timeout (in msec, or special values KER_NFCL1_POLLING_TIMEOUT, KER_NFCL1_DEF_TIMEOUT)
  [out] | pbtDataOut | Buffer to obtain command response data sent by the card
  [out] | pusDataOutLength | Length of data placed in pbtDataOut
  [in] | usDataOutMaxLength | pbtDataOut buffer size
  [out] | pusSW1SW2 | card response status bytes
  [out] | pulExecutionTime | APDU command execution time in 100 microseconds (Optionl, set KER_NULL if you don't need it)

Returns
  KER_OK Success.
  KER_NFCL1_RES_TIMEOUT R-APDU timeout
  KER_NFCL1_RES_TRANSMISSION R-APDU transmission error
  KER_NFCL1_RES_PROTOCOL R-APDU protocol error
  KER_NFCL1_RES_PENDING R-APDU pending...
  KER_NFCL1_RES_HW_ERROR R-APDU HW error
  Other - Execution failed due to invalid param or unexpected error.

## ◆ T_NFC_CALLBACK_CARD_REMOVAL_PROCEDURE

typedef KER_RES(CLB_API * T_NFC_CALLBACK_CARD_REMOVAL_PROCEDURE) (T_NFC_CLB_CTX_PARAM KER_INT32U ulTimeout)

Performs EMV L1 card removal procedure Callback called by Entry Point only.

Parameters

  [in] | ulTimeout | Card wait in RF timeout (in msec)

Returns
  KER_OK Success.
  KER_NFCL1_CR_RES_TIMEOUT Card removal timeout.
  KER_NFCL1_CR_HW_ERROR Failure. Execution failed due to reader error.

## ◆ T_NFC_CALLBACK_CARD_SENDCAPDU

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CARD_SENDCAPDU) (T_NFC_CLB_CTX_PARAM KER_BYTE btCase, KER_BYTE btCls, KER_BYTE btIns, KER_BYTE btP1, KER_BYTE btP2, KER_INT16U usLc, const KER_BYTE *pbtDataIn, KER_INT16U usLe)

Send APDU requset to card.

Parameters

  [in] | btCase | APDU request type (KER_NFCL1_APDU_CASE1 ...)
  [in] | btCls | Class of Instruction
  [in] | btIns | Instruction Code
  [in] | btP1 | Instruction Parameter 1
  [in] | btP2 | Instruction Parameter 2
  [in] | usLc | The pbtDataIn data length
  [in] | pbtDataIn | Data buffer to send to the card
  [in] | usLe | Expected length of response data from card (if known, otherwise KER_EXT_NFCL1_LE_MAX or KER_EXT_NFCL1_LE_NULL)

Returns
  KER_TRUE Success.
  KER_FALSE Execution failed due to timeout, invalid param or reader error.

## ◆ T_NFC_CALLBACK_CFG_GET_CONFIG_BY_ID

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_GET_CONFIG_BY_ID) (T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtAID, KER_INT16U usAIDLen, const KER_TLV *pTranDataList, const KER_TLV *pTranContextList, KER_INT16U usID, KER_BYTE *pbtValue, KER_INT16U *pusValueLen, KER_INT16U usMaxLen)

Provide terminal configuration specific for AID-Transaction data combination which have no emv tag assinged by ID.

Parameters

  [in] | pbtAID | app aid (optional, set KER_NULL to request general terminal config)
  [in] | usAIDLen | The btAID length
  [in] | pTranDataList | Transaction data passed to kernel
  [in] | pTranContextList | Transaction context created by kernel according to context tag list (obtained by KER_CFG_ID_NFC_TRAN_CONTEXT_TAG_LIST ID)
  [in] | usID | requested value ID
  [out] | pbtValue | Buffer to obtain requested tag value (optional, set KER_NULL if you don't need it)
  [out] | pusValueLen | Buffer to obtain requested tag value length
  [in] | usMaxLen | Size of pbtValue buffer

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

This function is used to request terminal configuration which have no emv tag assinged by ID.

Pass pbtAID parameter to obtain application related configuration. If appropriate parameter not found in application releated configuration - take it from general terminal configuration.

Pass pbtValue as KER_NULL to obtain estimated buffer length through pusValueLen

## ◆ T_NFC_CALLBACK_CFG_GET_CUST_TAG_BY_ID

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_GET_CUST_TAG_BY_ID) (T_NFC_CLB_CTX_PARAM KER_INT16U usID, KER_BYTE *pbtValue, KER_INT16U *pusValueLen, KER_INT16U usMaxLen)

Remapp terminal configuration id to custom tag.

Parameters

  [in] | usID | requested value ID
  [out] | pbtValue | Buffer to obtain appropriate tag value (optional, set KER_NULL if you don't need it)
  [out] | pusValueLen | Buffer to obtain requested tag value length
  [in] | usMaxLen | Size of pbtValue buffer

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

This function is used for remapping terminal configuration which have no emv tag assinged to configurable custom tags.

Pass pbtValue as KER_NULL to obtain estimated buffer length through pusValueLen

## ◆ T_NFC_CALLBACK_CFG_GET_EP_CONFIG

typedef KER_BOOL(CLB_API* T_NFC_CALLBACK_CFG_GET_EP_CONFIG) (T_NFC_CLB_CTX_PARAM const KER_TLV *pTranData, HAL_CONFIG_NFC_COMB **ppCombList)

Provides configuration (common / combination / tran related for EP This callback called by Entry Point only.

Parameters

  [in] | pTranData | transaction data obtained from Terminal Application
  [out] | ppCombList | transaction related combinations configurations list

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

Terminal should use kerContTlvCreateByTag or kerContTlvCreateByTLV to create tlv container list for combination configuration EP/Kernel may update obtained combination configuration during transaction processing

Warning
  Allocated combination list should be released by kerContTlvListRelease and hal_release_mem_ex by EP.

## ◆ T_NFC_CALLBACK_CFG_GET_ID_BY_CUST_TAG

typedef KER_INT16U(CLB_API * T_NFC_CALLBACK_CFG_GET_ID_BY_CUST_TAG) (T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtTag, KER_INT16U usTagLen)

Remapp custom tag to configuration ID.

Parameters

  [in] | pbtTag | buffer with tag value
  [in] | usTagLen | pbtTag value length

Returns
  0 - failure (invalid parameter or such tag not remapped).
  Otherwise - ID of appropriate configuration parameter.

This function is used for remapping custom tags to terminal configuration which have no emv tag assinged.

## ◆ T_NFC_CALLBACK_CFG_IS_APPROVED_ONLINE

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_IS_APPROVED_ONLINE) (T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtARC, KER_INT16U usARCLen)

Check online result by ARC.

Parameters

  [in] | pbtARC | the buffer with ARC (2 bytes)
  [in] | usARCLen | the size of pbtARC

Returns
  KER_TRUE - condition fulfilled.
  KER_FALSE - condition not fulfilled.

This function is used to check online result by ARC

## ◆ T_NFC_CALLBACK_CFG_IS_TRAN_CASH

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_IS_TRAN_CASH) (T_NFC_CLB_CTX_PARAM KER_BYTE btTranType)

Check transaction type (9C) for cash tran (cash or cash disbursement at POS)

Parameters

  [in] | btTranType | the value of transaction type (9C) tag

Returns
  KER_TRUE - condition fulfilled.
  KER_FALSE - condition not fulfilled.

This function is used to check if transaction type (9C) is for cash tran

## ◆ T_NFC_CALLBACK_CFG_IS_TRAN_CASHBACK

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_IS_TRAN_CASHBACK) (T_NFC_CLB_CTX_PARAM KER_BYTE btTranType)

Check transaction type (9C) for cashback.

Parameters

  [in] | btTranType | the value of transaction type (9C) tag

Returns
  KER_TRUE - condition fulfilled.
  KER_FALSE - condition not fulfilled.

This function is used to check if transaction type (9C) is for cashback

## ◆ T_NFC_CALLBACK_CFG_IS_TRAN_MAN_CASH

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_IS_TRAN_MAN_CASH) (T_NFC_CLB_CTX_PARAM KER_BYTE btTranType)

Check transaction type (9C) for cashback.

Parameters

  [in] | btTranType | the value of transaction type (9C) tag

Returns
  KER_TRUE - condition fulfilled.
  KER_FALSE - condition not fulfilled.

This function is used to check if transaction type (9C) is for manual cash tran

## ◆ T_NFC_CALLBACK_CFG_IS_TRAN_REFUND

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_IS_TRAN_REFUND) (T_NFC_CLB_CTX_PARAM KER_BYTE btTranType)

Check transaction type (9C) for cashback.

Parameters

  [in] | btTranType | the value of transaction type (9C) tag

Returns
  KER_TRUE - condition fulfilled.
  KER_FALSE - condition not fulfilled.

This function is used to check if transaction type (9C) is for refund

## ◆ T_NFC_CALLBACK_CFG_IS_TRAN_SALE

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_IS_TRAN_SALE) (T_NFC_CLB_CTX_PARAM KER_BYTE btTranType)

Check transaction type (9C) for goods and services.

Parameters

  [in] | btTranType | the value of transaction type (9C) tag

Returns
  KER_TRUE - condition fulfilled.
  KER_FALSE - condition not fulfilled.

This function is used to check if transaction type (9C) is for goods and services

## ◆ T_NFC_CALLBACK_CFG_SET_CONFIG_BY_ID

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CFG_SET_CONFIG_BY_ID) (T_NFC_CLB_CTX_PARAM KER_INT16U usID, const KER_BYTE *pbtValue, KER_INT16U usValueLen)

Keeps trerminal params in "scratch pad".

Parameters

  [in] | usID | value ID to set
  [in] | pbtValue | Data to keep
  [in] | usValueLen | pbtValue buffer length

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

This function is used to save some data to terminal configuration.

Pass pbtAID parameter to keep data in application related configuration.

## ◆ T_NFC_CALLBACK_CRYPT_CERT_REVOCATION

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_CERT_REVOCATION) (T_NFC_CLB_CTX_PARAM KER_BYTE btKernelID, const KER_BYTE *pbtRID, KER_BYTE btRIDLen, KER_BYTE btKeyIndex, const HAL_CRYPT_CERT_INFO *pCert)

Get CA PK by index from repositoty.

Use for CDA

Parameters

  [in] | btKernelID | Kernel id (reserved)
  [in] | pbtRID | Kernel RID
  [in] | btRIDLen | Length of pbtRID
  [in] | btKeyIndex | requested key index
  [out] | pCert | certificate to check info

Returns
  KER_TRUE Success.
  KER_FALSE Failure (certificate revoked or invalid params).

## ◆ T_NFC_CALLBACK_CRYPT_DECRYPT

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_DECRYPT) (T_NFC_CLB_CTX_PARAM KER_BYTE btAlg, const KER_BYTE *pbtKey, KER_INT16U usKeyLen, const KER_BYTE *pbtIV, KER_INT16U usIVLen, const KER_BYTE *pbtData, KER_INT16U usDataLen, KER_BYTE *pbtResult, KER_INT16U *pusResultLen, KER_INT16U usMaxLen)

Performs decryption.

Use for DES/AES decryption in MC IDS write functionality

Parameters

  [in] | btAlg | decryption algorithm id (T_NFC_CALLBACK_CRYPT_ALG_DES T_NFC_CALLBACK_CRYPT_ALG_AES)
  [in] | pbtKey | Decryption key
  [in] | usKeyLen | pbtKey buffer length
  [in] | pbtIV | Initial Vector (set KER_NULL if not used)
  [in] | usIVLen | pbtIV buffer length (set 0 if not used)
  [in] | pbtData | Data to decrypt
  [in] | usDataLen | pbtData buffer length (with nesessary padding)
  [out] | pbtResult | buffer to obtain decryption result
  [out] | pusResultLen | buffer to obtain decryption result length
  [in] | usMaxLen | - pbtResult buffer length

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

## ◆ T_NFC_CALLBACK_CRYPT_ENCRYPT

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_ENCRYPT) (T_NFC_CLB_CTX_PARAM KER_BYTE btAlg, const KER_BYTE *pbtKey, KER_INT16U usKeyLen, const KER_BYTE *pbtIV, KER_INT16U usIVLen, const KER_BYTE *pbtData, KER_INT16U usDataLen, KER_BYTE *pbtResult, KER_INT16U *pusResultLen, KER_INT16U usMaxLen)

Performs encryption.

Use for DES/AES encryption in MC IDS write functionality

Parameters

  [in] | btAlg | encryption algorithm id (T_NFC_CALLBACK_CRYPT_ALG_DES T_NFC_CALLBACK_CRYPT_ALG_AES)
  [in] | pbtKey | Encryption key
  [in] | usKeyLen | pbtKey buffer length
  [in] | pbtIV | Initial Vector (set KER_NULL if not used)
  [in] | usIVLen | pbtIV buffer length (set 0 if not used)
  [in] | pbtData | Data to encrypt
  [in] | usDataLen | pbtData buffer length (with nesessary padding)
  [out] | pbtResult | buffer to obtain encryption result
  [out] | pusResultLen | buffer to obtain encryption result length
  [in] | usMaxLen | - pbtResult buffer length

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

## ◆ T_NFC_CALLBACK_CRYPT_GET_CA_PK

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_GET_CA_PK) (T_NFC_CLB_CTX_PARAM KER_BYTE btKernelID, const KER_BYTE *pbtRID, KER_BYTE btRIDLen, KER_BYTE btKeyIndex, HAL_CRYPT_PK *pCA_PK)

Get CA PK by index from repositoty.

Use for CDA

Parameters

  [in] | btKernelID | Kernel id (reserved)
  [in] | pbtRID | Kernel RID
  [in] | btRIDLen | Length of pbtRID
  [in] | btKeyIndex | requested key index
  [out] | pCA_PK | requested CA PKs

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

## ◆ T_NFC_CALLBACK_CRYPT_HASH

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_HASH) (T_NFC_CLB_CTX_PARAM KER_BYTE btAlg, KER_VOID *pExtra, const KER_BYTE *pbtDataBuffer, KER_INT16U usDataBufferLen, KER_BYTE *pbtHash, KER_INT16U *pusHashLen, KER_INT16U usHashSize)

Calculates hash for data buffer provided.

Parameters

  [in] | btAlg | Hash algorithm to calculate (T_NFC_CALLBACK_CRYPT_HASH_ALG_TC_HASH T_NFC_CALLBACK_CRYPT_HASH_ALG_SHA1)
  [in] | pExtra | Extra param, reserved
  [in] | pbtDataBuffer | Data buffer to hash
  [in] | usDataBufferLen | Length of pbtDataBuffer
  [out] | pbtHash | Buffer to obtain hash
  [out] | pusHashLen | Length of pbtHash
  [in] | usHashSize | Size of pbtHash

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

## ◆ T_NFC_CALLBACK_CRYPT_HASH_COMPLETE

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_HASH_COMPLETE) (T_NFC_CLB_CTX_PARAM KER_VOID *pHashHandle, KER_BYTE btAlg, KER_BYTE *pbtHash, KER_INT16U *pusHashLen, KER_INT16U usHashSize)

Calculates hash on prev. provided data.

Parameters

  [in] | pHashHandle | hash handle obtained by T_NFC_CALLBACK_CRYPT_HASH_INIT
  [in] | btAlg | Hash algorithm to calculate (KER_HASH_ALG_TC_HASH KER_HASH_ALG_SHA1)
  [out] | pbtHash | Buffer to obtain hash
  [out] | pusHashLen | Length of pbtHash
  [in] | usHashSize | Size of pbtHash

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

## ◆ T_NFC_CALLBACK_CRYPT_HASH_INIT

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_HASH_INIT) (T_NFC_CLB_CTX_PARAM KER_BYTE btAlg, KER_VOID *pExtra, KER_VOID **ppHashHandle)

Initiates hash calculation.

Parameters

  [in] | btAlg | Hash algorithm to calculate (T_NFC_CALLBACK_CRYPT_HASH_ALG_TC_HASH T_NFC_CALLBACK_CRYPT_HASH_ALG_SHA1)
  [in] | pExtra | Extra param, reserved
  [out] | ppHashHandle | Buffer to obtain hash handle

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

## ◆ T_NFC_CALLBACK_CRYPT_HASH_UPDATE

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_HASH_UPDATE) (T_NFC_CLB_CTX_PARAM KER_VOID *pHashHandle, KER_BYTE btAlg, const KER_BYTE *pbtDataBuffer, KER_INT16U usDataBufferLen)

Passes data for hash calculation (can be executed several times)

Parameters

  [in] | pHashHandle | hash handle obtained by T_NFC_CALLBACK_CRYPT_HASH_INIT
  [in] | btAlg | Hash algorithm to calculate (KER_HASH_ALG_TC_HASH KER_HASH_ALG_SHA1)
  [in] | pbtDataBuffer | Data buffer to add for hash
  [in] | usDataBufferLen | Length of pbtDataBuffer

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

## ◆ T_NFC_CALLBACK_CRYPT_MSG_RECOVERY

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_MSG_RECOVERY) (T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtPK, KER_INT16U usPKLen, const KER_BYTE *pbtExp, KER_INT16U usExpLen, KER_BYTE btAlg, const KER_BYTE *pbtMsg, KER_INT16U usMsgLen, KER_BYTE *pbtResult, KER_INT16U *pusResultLen, KER_INT16U usMaxLen)

Message recovery according to EMV Book 2, Appendix A2.1.

Use for CDA

Parameters

  [in] | pbtPK | Public Key for message recovery
  [in] | usPKLen | pbtPK length
  [in] | pbtExp | Exponent of pbtPK
  [in] | usExpLen | pbtExp length
  [in] | btAlg | recovery alg ID
  [in] | pbtMsg | mesage to recovery
  [in] | usMsgLen | pbtMsg length
  [out] | pbtResult | buffer to obtain recovered result
  [out] | pusResultLen | value to obtain recovered result length
  [in] | usMaxLen | pbtResult buffer size

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

## ◆ T_NFC_CALLBACK_CRYPT_SET_AC

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_SET_AC) (T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtAc, KER_INT16U usAcLen)

Updates unpredictable (random) number calculator with last AC (9F26) value (only if it was obtained from card)

Use for unpredictable (random) number calculation algorithm described in: Specification Bulletin No. 144, First Edition June 2014, Terminal Unpredictable Number generation

Parameters

  [in] | pbtAc | Buffer with AC value
  [in] | usAcLen | Length of pbtAc

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

## ◆ T_NFC_CALLBACK_CRYPT_UNPRED_NUMBER

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CRYPT_UNPRED_NUMBER) (T_NFC_CLB_CTX_PARAM KER_INT16U usUnpredNumLen, KER_BYTE *pbtUnpredNum)

Calculates unpredictable number.

Parameters

  [in] | usUnpredNumLen | Length of unpredictable (random) number required
  [out] | pbtUnpredNum | Buffer to obtain unpredictable (random) number

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

## ◆ T_NFC_CALLBACK_CV_APPLY_CVM

typedef KER_BYTE(CLB_API * T_NFC_CALLBACK_CV_APPLY_CVM) (T_NFC_CLB_CTX_PARAM KER_BYTE btCVM, KER_BYTE *pbtRes, KER_BYTE *pbtOutcomeCVM, KER_BYTE *pbtTVR, KER_BYTE btTVRLen)

Apply non standard cvm.

Parameters

  [in] | btCVM | CVM from CV Rule to be aplied
  [out] | pbtRes | CVM result to be set to 3rd byte of 9F34
  [out] | pbtOutcomeCVM | value to set to Outcome CVM
  [in,out] | pbtTVR | TVR reference to update (if required)
  [in] | btTVRLen | pbtTVR buffer length

Returns
  T_NFC_CVM_RES_OK - cvm applied
  T_NFC_CVM_RES_UNSUPP - unsupported cvm
  T_NFC_CVM_RES_UNREC - unrecognized cvm
  T_NFC_CVM_RES_FAIL - cvm failed

## ◆ T_NFC_CALLBACK_CV_CHECK_CVM_COND

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_CV_CHECK_CVM_COND) (T_NFC_CLB_CTX_PARAM KER_BYTE btCVM, KER_BYTE btCondition)

Check if non standard cvm condition met.

Parameters

  [in] | btCVM | CVM from CV Rule to be aplied
  [in] | btCondition | from CV Rule to be aplied

Returns
  KER_TRUE Condition met.
  KER_FALSE Condition not met.

## ◆ T_NFC_CALLBACK_DEX_DATAFROMKERNEL

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_DEX_DATAFROMKERNEL) (T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtKernelData, KER_INT16U usKernelDataLen)

Data exchange callback.

Parameters

  [in] | pbtKernelData | - The data from the kernel
  [in] | usKernelDataLen | - The length of data pointed to by pbtKernelData

Returns
  KER_TRUE Success.
  Other Failure. Execution failed due to invalid param or reader error.

## ◆ T_NFC_CALLBACK_DEX_DATAFROMTERMINAL

typedef KER_RES(CLB_API * T_NFC_CALLBACK_DEX_DATAFROMTERMINAL) (T_NFC_CLB_CTX_PARAM KER_INT16U usTimeout, KER_INT16U usParam, KER_VOID *pParam, KER_BYTE **ppbtTerminalData, KER_INT16U *pusTerminalDataLen)

Data exchange callback.

Parameters

  [in] | usTimeout | - timeout
  [in] | usParam | - reserved
  [in,out] | pParam | - reserved
  [out] | ppbtTerminalData | - To return a pointer to the allocated sent data
  [out] | pusTerminalDataLen | - Returns the length of data pointed to by ppbtTerminalData

Returns
  T_NFC_DE_RES_OK Success.
  T_NFC_DE_RES_TIMEOUT Timeout.
  T_NFC_DE_RES_NO_DATA No new data from terminal.
  T_NFC_DE_RES_FAIL Failure.

## ◆ T_NFC_CALLBACK_DEX_FREERESULT_EX

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_DEX_FREERESULT_EX) (T_NFC_CLB_CTX_PARAM KER_BYTE *pbtData, KER_INT16U usDataLen)

Data exchange callback.

Parameters

  [in] | pbtData | - The data buffer to free
  [in] | usDataLen | - pbtData buffer length

Returns
  KER_TRUE Success.
  Other Failure. Execution failed due to invalid param or reader error.

## ◆ T_NFC_CALLBACK_FIELD_OFF

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_FIELD_OFF) (T_NFC_CLB_CTX_SINGLE_PARAM)

PCD field off request.

Returns
  KER_TRUE Success.
  KER_FALSE Execution failed due to invalid param or reader error.

## ◆ T_NFC_CALLBACK_GET_CUSTOM_KERNEL_ID

typedef KER_BOOL(CLB_API* T_NFC_CALLBACK_GET_CUSTOM_KERNEL_ID) (T_NFC_CLB_CTX_PARAM const KER_BYTE *p61, KER_INT16U us61Len, KER_BYTE *pbtKernelID, KER_BYTE *pbtKernelIDLen, KER_BYTE btMaxLen)

Provides custom mapping between Directory Entry and Requested Kernel ID Optional callback called by Entry Point only.

Parameters

  [in] | p61 | Directory Entry (tag 61)
  [in] | us61Len | p61 length
  [out] | pbtKernelID | Buffer to obtain requested Kernel ID (max 8 bytes)
  [out] | pbtKernelIDLen | Buffer to obtain requested Kernel ID length
  [in] | btMaxLen | pbtKernelID buffer size

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

## ◆ T_NFC_CALLBACK_GET_DEFAULT_KERNEL_ID

typedef KER_BOOL(CLB_API* T_NFC_CALLBACK_GET_DEFAULT_KERNEL_ID) (T_NFC_CLB_CTX_PARAM const KER_BYTE *pAID, KER_INT16U usAIDLen, KER_BYTE *pbtKernelID, KER_BYTE *pbtKernelIDLen, KER_BYTE btMaxLen)

Provides default AID - Kernel ID mapping Optional callback called by Entry Point only.

EMV Book B, Table 3-6: Default Value for Requested Kernel ID Matching AID Default Value for Requested Kernel ID American Express AID 00000100b Discover AID 00000110b JCB AID 00000101b MasterCard AID 00000010b UnionPay AID 00000111b Visa AID 00000011b Other 00000000b

Parameters

  [in] | pAID | AID for which default Kernel ID requested
  [in] | usAIDLen | pAID length
  [out] | pbtKernelID | Buffer to obtain requested Kernel ID (max 8 bytes)
  [out] | pbtKernelIDLen | Buffer to obtain requested Kernel ID length
  [in] | btMaxLen | pbtKernelID buffer size

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

## ◆ T_NFC_CALLBACK_GET_READER_SERIAL_NUMBER

typedef KER_BOOL(CLB_API* T_NFC_CALLBACK_GET_READER_SERIAL_NUMBER) (T_NFC_CLB_CTX_PARAM KER_CHAR *data, KER_BYTE *dlen)

Get serial number of the IFD Optional Callback.

Parameters

  [out] | data | the buffer to fill
  [out] | dlen | the length of data buffer (in/out), 8 or less expected

Returns
  KER_TRUE Success.
  KER_FALSE Failure. Execution failed due to reader error.

## ◆ T_NFC_CALLBACK_GET_READER_TYPE

typedef KER_BOOL(CLB_API* T_NFC_CALLBACK_GET_READER_TYPE) (T_NFC_CLB_CTX_PARAM KER_CHAR *data, KER_BYTE *dlen)

Get IFD type for IFD related config Optional Callback.

Parameters

  [out] | data | the buffer to fill
  [out] | dlen | the length of data buffer (in/out), 64 or less expected

Returns
  KER_TRUE Success.
  KER_FALSE Failure. Execution failed due to reader error.

## ◆ T_NFC_CALLBACK_INIT_CHECKSUM_EX

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_INIT_CHECKSUM_EX) (T_NFC_CLB_CTX_PARAM KER_BYTE btType, const KER_CHAR *pchKernelModuleList, KER_INT16U usKernelModuleListLen, KER_BYTE *pbtCheckSum, KER_INT16U *pusCheckSumLen, KER_INT16U usMaxSize)

Pass checksums to the kernel.

Parameters

  [in] | btType | Requested checksum type: 0x00 - Kernel checksum; 0x01 - Configuration checksum; 0x02 - Full Configuration checksum
  [in] | pchKernelModuleList | Buffer with a list of module names to include in kernel checksum, each terminated with a zero character, and an extra zero character in the end (optional)
  [in] | usKernelModuleListLen | pchKernelModuleList buffer length
  [out] | pbtCheckSum | Buffer to obtain claculated checksum
  [out] | pusCheckSumLen | Value to obtain claculated checksum length
  [in] | usMaxSize | Size of pchCheckSum Buffer

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

## ◆ T_NFC_CALLBACK_KEEP_TRACE_TIME

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_KEEP_TRACE_TIME) (T_NFC_CLB_CTX_PARAM KER_BYTE *pbtTimeBuffer, KER_INT16U *pusTimeBufferSize)

Keep trace timestamp.

Parameters

  [in] | pbtTimeBuffer | Buffer to trace
  [in,out] | pusTimeBufferSize | pbtTimeBuffer size as input, stored time length as output

Returns
  KER_TRUE Success
  KER_FALSE Trace failure

## ◆ T_NFC_CALLBACK_MEM_ADD

typedef KER_INT16U(CLB_API * T_NFC_CALLBACK_MEM_ADD) (T_NFC_CLB_CTX_PARAM KER_VOID *pvDestBuffer, KER_INT16U usDestBufferSize, KER_INT16U usDestBufferOffset, const KER_VOID *pvSourceBuffer, KER_INT16U usSourceBufferSize)

Add memory buffer to existing buffer with offset.

Parameters

  [out] | pvDestBuffer | Buffer to copy to
  [in] | usDestBufferSize | DestBuffer size in bytes
  [in] | usDestBufferOffset | DestBuffer offset to add in bytes
  [in] | pvSourceBuffer | Buffer to copy from
  [in] | usSourceBufferSize | SourceBuffer size in bytes

Returns
  Result length in bytes

## ◆ T_NFC_CALLBACK_MEM_ALLOC

typedef KER_VOID*(CLB_API * T_NFC_CALLBACK_MEM_ALLOC) (T_NFC_CLB_CTX_PARAM KER_INT16U usBufferSize)

allocate memory buffer

Parameters

  [in] | usBufferSize | requested buffer size in bytes

Returns
  Pointer to allocated buffer.

Warning
  Allocated buffer should be released by T_NFC_CALLBACK_MEM_FREE callback

## ◆ T_NFC_CALLBACK_MEM_CMP

typedef KER_INT32S(CLB_API * T_NFC_CALLBACK_MEM_CMP) (T_NFC_CLB_CTX_PARAM const KER_VOID *pvBuffer1, const KER_VOID *pvBuffer2, KER_INT16U usCount)

Compare memory buffers.

Parameters

  [in] | pvBuffer1 | Buffer1 to compare
  [in] | pvBuffer2 | Buffer2 to compare
  [in] | usCount | count of bytes to compare

Return values

  0 | Buffers equal

Returns
  <0 Buffer1 less than Buffer2
  >0 Buffer1 more than Buffer2

## ◆ T_NFC_CALLBACK_MEM_CPY

typedef KER_INT16U(CLB_API * T_NFC_CALLBACK_MEM_CPY) (T_NFC_CLB_CTX_PARAM KER_VOID *pvDestBuffer, KER_INT16U usDestBufferSize, const KER_VOID *pvSourceBuffer, KER_INT16U usSourceBufferSize)

Copy one memory buffer to another.

Parameters

  [out] | pvDestBuffer | Buffer to copy to
  [in] | usDestBufferSize | DestBuffer size in bytes
  [in] | pvSourceBuffer | Buffer to copy from
  [in] | usSourceBufferSize | SourceBuffer size in bytes

Returns
  Result length in bytes

## ◆ T_NFC_CALLBACK_MEM_MOVE

typedef KER_VOID*(CLB_API * T_NFC_CALLBACK_MEM_MOVE) (T_NFC_CLB_CTX_PARAM KER_VOID *pvDestBuffer, KER_INT16U usDestBufferSize, KER_VOID *pvSourceBuffer, KER_INT16U usSourceBufferSize)

Copy one memory buffer to another (event if buffer overlaped)

Parameters

  [out] | pvDestBuffer | Buffer to copy to
  [in] | usDestBufferSize | DestBuffer size in bytes
  [in] | pvSourceBuffer | Buffer to copy from
  [in] | usSourceBufferSize | SourceBuffer size in bytes

Returns
  Pointer to result buffer
  KER_NULL - failure

## ◆ T_NFC_CALLBACK_MEM_RELEASE_EX

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_MEM_RELEASE_EX) (T_NFC_CLB_CTX_PARAM KER_VOID *pBuffer, KER_INT16U usBufferSize)

release previously allocated memory buffer

Parameters

  [in] | pBuffer | previously allocated by hal_alloc_mem memory buffer
  [in] | usBufferSize | allocated buffer size in bytes

Returns
  KER_TRUE Success.
  KER_FALSE Failure. Execution failed due to invalid param or memory error.

## ◆ T_NFC_CALLBACK_MEM_SET

typedef KER_VOID*(CLB_API * T_NFC_CALLBACK_MEM_SET) (T_NFC_CLB_CTX_PARAM KER_VOID *pvDestBuffer, KER_INT16U usDestBufferSize, KER_BYTE btValue, KER_INT16U usCount)

Reset memory buffer with specified value.

Parameters

  [out] | pvDestBuffer | Buffer to copy to
  [in] | usDestBufferSize | DestBuffer size in bytes
  [in] | btValue | value to set
  [in] | usCount | count of bytes to set

Returns
  The value of pvDestBuffer

## ◆ T_NFC_CALLBACK_MEM_SPRINTF

typedef KER_INT16U(KER_CDECL * T_NFC_CALLBACK_MEM_SPRINTF) (T_NFC_CLB_CTX_PARAM KER_CHAR *pchDestBuffer, KER_INT16U usDestBufferSize, const KER_CHAR *pchFormat,...)

sprintf_s analog

Parameters

  [out] | pchDestBuffer | Buffer to sprintf_s to
  [in] | usDestBufferSize | DestBuffer size in bytes
  [in] | pchFormat | format string (as for sprintf_s)

Returns
  Number of characters written, not including 0-terminated character.

## ◆ T_NFC_CALLBACK_MEM_VSPRINTF

typedef KER_INT16U(KER_CDECL * T_NFC_CALLBACK_MEM_VSPRINTF) (T_NFC_CLB_CTX_PARAM KER_CHAR *pchDestBuffer, KER_INT16U usDestBufferSize, const KER_CHAR *pchFormat, va_list _ArgList)

sprintf_s analog

Parameters

  [out] | pchDestBuffer | Buffer to sprintf_s to
  [in] | usDestBufferSize | DestBuffer size in bytes
  [in] | pchFormat | format string (as for sprintf_s)
  [in] | _ArgList | argument list

Returns
  Number of characters written, not including 0-terminated character.

## ◆ T_NFC_CALLBACK_NOTIFY

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_NOTIFY) (T_NFC_CLB_CTX_PARAM KER_INT16U usNotifyType, const KER_VOID *pNotifyData, KER_INT16U usNotifyDataLen)

Notifies HAL about some specific event.

Parameters

  [in] | usNotifyType | Event type (T_NFC_CALLBACK_NOTIFY_SELECTED_AID, T_NFC_CALLBACK_NOTIFY_SELECTED_KERNEL_ID, etc...)
  [in] | pNotifyData | Event related data (T_NFC_CALLBACK_NOTIFY_DATA_AID, etc...)
  [in] | usNotifyDataLen | pNotifyData data length

Returns
  KER_TRUE Success.
  KER_FALSE Failure. Execution failed due to invalid param.

## ◆ T_NFC_CALLBACK_ONLINE_CHECK

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_ONLINE_CHECK) (T_NFC_CLB_CTX_SINGLE_PARAM)

Checks HAL for unable to go online condition (for AmEx C-4).

Returns
  KER_TRUE Online available or Online state is unknown (default).
  KER_FALSE Unable to go online condition.

## ◆ T_NFC_CALLBACK_RESET_OPERATION_FIELD

typedef KER_BOOL(CLB_API* T_NFC_CALLBACK_RESET_OPERATION_FIELD) (T_NFC_CLB_CTX_SINGLE_PARAM)

Reset operation field Callback called by Entry Point only.

Returns
  KER_TRUE Success.
  KER_FALSE Failure. Execution failed due to reader error.

## ◆ T_NFC_CALLBACK_SYS_GET_100_MICROSEC_TIMESTAMP

typedef KER_INT32U(CLB_API * T_NFC_CALLBACK_SYS_GET_100_MICROSEC_TIMESTAMP) (T_NFC_CLB_CTX_SINGLE_PARAM)

Provides terminal timestamp for Kernel (in 100 microsec resolution)

Returns
  Timestamp (in 100 microsec resolution)

## ◆ T_NFC_CALLBACK_SYS_SLEEP

typedef KER_VOID(CLB_API * T_NFC_CALLBACK_SYS_SLEEP) (T_NFC_CLB_CTX_PARAM KER_INT32U ulTimeout)

Sleeps for specified timeout.

Parameters

  [in] | ulTimeout | Sleep timeout in msec

## ◆ T_NFC_CALLBACK_TRACE_BUFFER

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_TRACE_BUFFER) (T_NFC_CLB_CTX_PARAM const KER_BYTE *pbtDataBuffer, KER_INT16U usDataBufferSize)

Trace povided data buffer.

Parameters

  [in] | pbtDataBuffer | Buffer to trace
  [in] | usDataBufferSize | pbtDataBuffer size

Returns
  KER_TRUE Success
  KER_FALSE Trace failure

## ◆ T_NFC_CALLBACK_TRACE_ERROR

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_TRACE_ERROR) (T_NFC_CLB_CTX_PARAM KER_INT16U usTraceLevel, KER_RES resErrCode, const KER_CHAR *pchErrorText)

Trace error to system error journal.

Parameters

  [in] | usTraceLevel | trace level (KER_DBG_LEVEL_ERR, etc..)
  [in] | resErrCode | error code
  [in] | pchErrorText | nul-term string to trace

Returns
  KER_TRUE Success
  KER_FALSE Trace failure

## ◆ T_NFC_CALLBACK_TRACE_FLUSH

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_TRACE_FLUSH) (T_NFC_CLB_CTX_SINGLE_PARAM)

Flush trace to tracefile (optional)

Returns
  KER_TRUE Success
  KER_FALSE Trace failure

## ◆ T_NFC_CALLBACK_TRACE_GET_MODE

typedef KER_BYTE(CLB_API * T_NFC_CALLBACK_TRACE_GET_MODE) (T_NFC_CLB_CTX_SINGLE_PARAM)

Get trace mode.

Returns
  Trace mode value (T_NFC_CALLBACK_TRACE_SET_MODE_STD or T_NFC_CALLBACK_TRACE_SET_MODE_SENS)

## ◆ T_NFC_CALLBACK_TRACE_SET_MODE

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_TRACE_SET_MODE) (T_NFC_CLB_CTX_PARAM KER_BYTE btTraceMode)

Set trace mode.

Parameters

  [in] | btTraceMode | pass T_NFC_CALLBACK_TRACE_SET_MODE_STD to trace standard data and T_NFC_CALLBACK_TRACE_SET_MODE_SENS to trace sensitive data

Returns
  KER_TRUE Success
  KER_FALSE Trace failure

## ◆ T_NFC_CALLBACK_TRACE_STRING

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_TRACE_STRING) (T_NFC_CLB_CTX_PARAM const KER_CHAR *pchString)

Trace povided nul-term string.

Parameters

  [in] | pchString | nul-term string to trace

Returns
  KER_TRUE Success
  KER_FALSE Trace failure

## ◆ T_NFC_CALLBACK_TRACE_TIME

typedef KER_BOOL(CLB_API * T_NFC_CALLBACK_TRACE_TIME) (T_NFC_CLB_CTX_SINGLE_PARAM)

Trace timestamp.

Returns
  KER_TRUE Success
  KER_FALSE Trace failure

## Function Documentation

## ◆ nfcRegisterCallback()

KER_RES nfcRegisterCallback | ( | T_NFC_CALLBACKS * | pCallbacks,
|  | KER_INT16U | usCllbackID,
|  | KER_VOID * | pCallback
| ) |  |

HAL callback registration.

Call this function to register cllbacks

Parameters

  [in] | pCallbacks | - callback structure to store to
  [in] | usCllbackID | - callback ID
  [in] | pCallback | - callback function ptr

Returns
  T_NFC_OK - Success
  Other - Failure...