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

Macros | Typedefs
User callback interface

USER callback interface definition. More...

## Macros
#define | NUM_T_NFC_USER_CALLBACK_HANDLE 200
| Code, used to register handle to be passed to user callbacks (T_NFC_USER_CALLBACK_DE_DATA_FROM_KERNEL, etc... * /.
#define | NUM_T_NFC_USER_CALLBACK_DE_DATA_FROM_KERNEL 201
| Code, used to register T_NFC_USER_CALLBACK_DE_DATA_FROM_KERNEL.
#define | NUM_T_NFC_USER_CALLBACK_DE_DATA_FROM_TERMINAL 202
| Code, used to register NUM_T_NFC_USER_CALLBACK_DE_DATA_FROM_TERMINAL.
#define | NUM_T_NFC_USER_CALLBACK_DE_DATA_RELEASE 203
| Code, used to register T_NFC_USER_CALLBACK_DE_DATA_RELEASE.
#define | NUM_T_NFC_USER_CALLBACK_UI_SCHEDULE_CHANGE_REQUEST 210
| Code, used to register T_NFC_USER_CALLBACK_UI_SCHEDULE_CHANGE_REQUEST callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_USER_CALLBACK_UI_CANCEL_CHANGE_REQUEST 211
| Code, used to register T_NFC_CALLBACK_UI_CANCEL_CHANGE_REQUEST callback through t_nfc_RegisterCallback.
#define | NUM_T_NFC_USER_CALLBACK_ONLINE_CHECK 220
| Code, used to register T_NFC_USER_CALLBACK_ONLINE_CHECK.

## Typedefs
typedef KER_BOOL(KER_API * | T_NFC_USER_CALLBACK_DE_DATA_FROM_KERNEL) (KER_VOID *pCallbackHandle, const KER_BYTE *pbtData, KER_INT16U usDataLen)
| Callback type for data exchange to pass card/kernel data to terminal. More...
typedef KER_INT16U(KER_API * | T_NFC_USER_CALLBACK_DE_DATA_FROM_TERMINAL) (KER_VOID *pCallbackHandle, KER_INT16U usTimeout, KER_INT16U usParam, KER_VOID *pParam, KER_BYTE **ppbtData, KER_INT16U *pusDataLen)
| Callback type for data exchange. More...
typedef KER_BOOL(KER_API * | T_NFC_USER_CALLBACK_DE_DATA_RELEASE) (KER_VOID *pCallbackHandle, KER_BYTE *pbtData, KER_INT16U usDataLen)
| Callback type for data exchange. More...
typedef KER_BOOL(KER_API * | T_NFC_USER_CALLBACK_ONLINE_CHECK) (KER_VOID *pCallbackHandle)
| Checks for unable to go online condition (for AmEx C-4). More...
#define | T_NFC_USER_CALLBACK_DE_RES_OK 0x0000
| terminal data request result definition More...
#define | T_NFC_USER_CALLBACK_DE_RES_TIMEOUT 0x0001
#define | T_NFC_USER_CALLBACK_DE_RES_NO_DATA 0x0002
#define | T_NFC_USER_CALLBACK_DE_RES_FAIL 0x0003

## Detailed Description

USER callback interface definition.

## Macro Definition Documentation

## ◆ T_NFC_USER_CALLBACK_DE_RES_FAIL

#define T_NFC_USER_CALLBACK_DE_RES_FAIL 0x0003

failure

## ◆ T_NFC_USER_CALLBACK_DE_RES_NO_DATA

#define T_NFC_USER_CALLBACK_DE_RES_NO_DATA 0x0002

no new data from terminal

## ◆ T_NFC_USER_CALLBACK_DE_RES_OK

#define T_NFC_USER_CALLBACK_DE_RES_OK 0x0000

terminal data request result definition

ok

## ◆ T_NFC_USER_CALLBACK_DE_RES_TIMEOUT

#define T_NFC_USER_CALLBACK_DE_RES_TIMEOUT 0x0001

timeout

## Typedef Documentation

## ◆ T_NFC_USER_CALLBACK_DE_DATA_FROM_KERNEL

typedef KER_BOOL(KER_API * T_NFC_USER_CALLBACK_DE_DATA_FROM_KERNEL) (KER_VOID *pCallbackHandle, const KER_BYTE *pbtData, KER_INT16U usDataLen)

Callback type for data exchange to pass card/kernel data to terminal.

Parameters

  [in] | pCallbackHandle | - callback context, registered with btCallbackType = NUM_T_NFC_USER_CALLBACK_HANDLE
  [in] | pbtData | Buffer with data, obtained from icc
  [in] | usDataLen | pbtData buffer length

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

This callback is optional. DE can be implemented by the hal itself

## ◆ T_NFC_USER_CALLBACK_DE_DATA_FROM_TERMINAL

typedef KER_INT16U(KER_API * T_NFC_USER_CALLBACK_DE_DATA_FROM_TERMINAL) (KER_VOID *pCallbackHandle, KER_INT16U usTimeout, KER_INT16U usParam, KER_VOID *pParam, KER_BYTE **ppbtData, KER_INT16U *pusDataLen)

Callback type for data exchange.

Parameters

  [in] | pCallbackHandle | - callback context, registered with btCallbackType = NUM_T_NFC_USER_CALLBACK_HANDLE
  [in] | usTimeout | execution timeout in msec
  [in] | usParam | reserved
  [in,out] | pParam | reserved
  [out] | ppbtData | pointer to obtain buffer (in TLV format) with updated data
  [out] | pusDataLen | ppbtData referenced buffer length

Returns
  T_NFC_USER_CALLBACK_DE_RES_OK Success.
  T_NFC_USER_CALLBACK_DE_RES_TIMEOUT Timeout
  T_NFC_USER_CALLBACK_DE_RES_NO_DATA No new data from terminal
  Other - Failure.

This callback is optional. DE can be implemented by the hal itself This function is used for data exchage, second stage: get updated transaction data from terminal app.

Warning
  Memory for output buffer allocated by user and should be released by T_NFC_USER_CALLBACK_DE_DATA_RELEASE callback

## ◆ T_NFC_USER_CALLBACK_DE_DATA_RELEASE

typedef KER_BOOL(KER_API * T_NFC_USER_CALLBACK_DE_DATA_RELEASE) (KER_VOID *pCallbackHandle, KER_BYTE *pbtData, KER_INT16U usDataLen)

Callback type for data exchange.

Parameters

  [in] | pCallbackHandle | - callback context, registered with btCallbackType = NUM_T_NFC_USER_CALLBACK_HANDLE
  [in] | pbtData | pointer to memory, allocated by CALLBACK_NFC_DE_DATA_FROM_TERMINAL
  [in] | usDataLen | allocated buffer length

Returns
  KER_TRUE Success.
  KER_FALSE Failure.

This callback is optional. DE can be implemented by the hal itself

## ◆ T_NFC_USER_CALLBACK_ONLINE_CHECK

typedef KER_BOOL(KER_API * T_NFC_USER_CALLBACK_ONLINE_CHECK) (KER_VOID *pCallbackHandle)

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

Parameters

  [in] | pCallbackHandle | - callback context, registered with btCallbackType = NUM_T_NFC_USER_CALLBACK_HANDLE

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