NXP NFC Reader Library v4.040.05.011646

Data Structures | Macros | Typedefs | Functions
Component : Software
Host Card Emulation » NFC Forum Type 4A Card Emulation
Collaboration diagram for Component : Software:

## Data Structures
struct | phceT4T_Sw_DataParams
| NFC Type 4A Tag card emulation parameter structure. More...

## Macros
#define | PHCE_T4T_SW_ID 0x01U
| ID for this layer (software implementation for card emulation of Type 4 Tag). More...
#define | PHCE_T4T_MAX_PROPRIETARY_FILE 0x01U
| Maximum number of proprietary file supported. More...
#define | E_PH_OSAL_EVT_RXDATA_AVAILABLE (1 << 1)
| Event posted by Reader library thread to the application thread once the ISO 18092 packet is received and processed. More...
#define | E_PH_OSAL_EVT_TXDATA_AVAILABLE (1 << 2)
| Event posted by application thread so that the Reader library thread takes the data and sends over ISO 18092. More...
#define | E_PH_OSAL_EVT_ERROR (1 << 4)
| Event posted by the Reader library thread, in case application should use /ref phOsal__PostwithDetail to knows the error occurred. More...

## Typedefs
typedef struct phceT4T_Sw_DataParams | phceT4T_Sw_DataParams_t
| NFC Type 4A Tag card emulation parameter structure.

## Functions
phStatus_t | phceT4T_Sw_Init (phceT4T_Sw_DataParams_t *pDataParams, uint16_t wSizeOfDataParams, void *pPalI14443p4mCDataParams, uint8_t *pAppBuffer, uint16_t wAppBufferSize)
| Initialize Type 4A card emulation layer. More...

## Detailed Description

## Macro Definition Documentation

## § PHCE_T4T_SW_ID

#define PHCE_T4T_SW_ID 0x01U

ID for this layer (software implementation for card emulation of Type 4 Tag).

phceT4T_Sw_DataParams::wId is initialized with this ID in the initialization function phceT4T_Sw_Init.

## § PHCE_T4T_MAX_PROPRIETARY_FILE

#define PHCE_T4T_MAX_PROPRIETARY_FILE 0x01U

Maximum number of proprietary file supported.

This defines the maximum count of proprietary file supported inside the T4T NDEF Application. By default maximum proprietary file count is sent to 1. User can change this value to support more proprietary files. #NXPBUILD__PHCE_T4T_PROPRIETARY shall be enabled in build configuration to support proprietary files.

## § E_PH_OSAL_EVT_RXDATA_AVAILABLE

#define E_PH_OSAL_EVT_RXDATA_AVAILABLE (1 << 1)

Event posted by Reader library thread to the application thread once the ISO 18092 packet is received and processed.

## § E_PH_OSAL_EVT_TXDATA_AVAILABLE

#define E_PH_OSAL_EVT_TXDATA_AVAILABLE (1 << 2)

Event posted by application thread so that the Reader library thread takes the data and sends over ISO 18092.

## § E_PH_OSAL_EVT_ERROR

#define E_PH_OSAL_EVT_ERROR (1 << 4)

Event posted by the Reader library thread, in case application should use /ref phOsal__PostwithDetail to knows the error occurred.

Event posted by response time extension timer ISR. Reader library thread listens to this event and sends the RTOx packet.

## Function Documentation

## § phceT4T_Sw_Init()

phStatus_t phceT4T_Sw_Init | ( | phceT4T_Sw_DataParams_t * | pDataParams,
|  | uint16_t | wSizeOfDataParams,
|  | void * | pPalI14443p4mCDataParams,
|  | uint8_t * | pAppBuffer,
|  | uint16_t | wAppBufferSize
| ) |  |

Initialize Type 4A card emulation layer.

This should be called before using any of the card emulation APIs to do the initialization of card emulation component. This configures the T4T card emulation layer with default configurations. Refer configuration options for supported configurations and their default values.

Parameters

  [in] | pDataParams | Pointer to T4T card emulation data parameter structure phceT4T_Sw_DataParams_t.
  [in] | wSizeOfDataParams | Specifies the size of data parameter structure phceT4T_Sw_DataParams_t.
  [in] | pPalI14443p4mCDataParams | Pointer to the ISO 14443p4mC data parameter structure phpalI14443p4mC_Sw_DataParams_t.
  [in] | pAppBuffer | Application buffer to be give by application where the command received from external reader will be copied to. This is required if application handles UPDATE BINARY or proprietary commands in application thread (multi-threaded environment) otherwise this can be set to NULL (in single threaded environment with no RTOS).
  [in] | wAppBufferSize | Size of Application buffer (pAppBuffer). If pAppBuffer is set to NULL, then this should be set to zero.

Returns
  Status code

Return values

  PH_ERR_SUCCESS | Operation successful.
  PH_ERR_INVALID_DATA_PARAMS | Invalid data parameter. Size of data parameter structure phceT4T_Sw_DataParams_t specified in wSizeOfDataParams is wrong.