NXP NFC Reader Library v4.040.05.011646

Functions
Commands
Hardware Abstraction Layer » component : Rc523

Supported ReaderIC commands. More...

Collaboration diagram for Commands:

## Functions
phStatus_t | phhalHw_Rc523_Cmd_Mem (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t *pDataIn, uint8_t bDataLength, uint8_t *pDataOut)
| Transfers either 25 bytes into internal buffer or returns 25 bytes from internal buffer. More...
phStatus_t | phhalHw_Rc523_Cmd_GenerateRandomId (phhalHw_Rc523_DataParams_t *pDataParams)
| Generates a 10 byte random ID. More...
phStatus_t | phhalHw_Rc523_Cmd_CalcCrc (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t *pData, uint16_t wDataLength, uint16_t *pCrcResult)
| Calculates a CRC over the input data and returns the result. More...
phStatus_t | phhalHw_Rc523_Cmd_SoftReset (phhalHw_Rc523_DataParams_t *pDataParams)
| Performs a Softreset. More...
phStatus_t | phhalHw_Rc523_SetListenParameters (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t *pSensRes, uint8_t *pNfcId1, uint8_t SelRes, uint8_t *pPollingResp, uint8_t bNfcId3)
| Stores data for phhalHw_Autocoll (i.e. More...

## Detailed Description

Supported ReaderIC commands.

## Function Documentation

## § phhalHw_Rc523_Cmd_Mem()

phStatus_t phhalHw_Rc523_Cmd_Mem | ( | phhalHw_Rc523_DataParams_t * | pDataParams,
|  | uint8_t * | pDataIn,
|  | uint8_t | bDataLength,
|  | uint8_t * | pDataOut
| ) |  |

Transfers either 25 bytes into internal buffer or returns 25 bytes from internal buffer.

If `bDataLength` equals zero, 25 bytes from the internal buffer are put into `pDataOut`.
If `bDataLength` is 25, 25 bytes from `pDataIn` are copied into the internal buffer.

Returns
  Status code

Return values

  PH_ERR_SUCCESS | Operation successful.
  PH_ERR_INVALID_PARAMETER | `bDataLength` is neither zero nor 25.
  Other | Depending on implementation and underlying component.

Parameters

  [in] | pDataParams | Pointer to this layer's parameter structure.
  [in] | pDataIn | 25 bytes In-data or ignored if `bDataLength` equals zero.
  [in] | bDataLength | Data length. Either zero or 25.
  [out] | pDataOut | 25 bytes Out-data or ignored if `bDataLength` is nonzero.

## § phhalHw_Rc523_Cmd_GenerateRandomId()

phStatus_t phhalHw_Rc523_Cmd_GenerateRandomId | ( | phhalHw_Rc523_DataParams_t * | pDataParams | ) |

Generates a 10 byte random ID.

The generated RandomId is stored in the internal buffer (the first 10 bytes get overridden).
It can be retrieved using the function phhalHw_Rc523_Cmd_Mem.

Returns
  Status code

Return values

  PH_ERR_SUCCESS | Operation successful.
  Other | Depending on implementation and underlying component.

Parameters

  [in] | pDataParams | Pointer to this layer's parameter structure.

## § phhalHw_Rc523_Cmd_CalcCrc()

phStatus_t phhalHw_Rc523_Cmd_CalcCrc | ( | phhalHw_Rc523_DataParams_t * | pDataParams,
|  | uint8_t * | pData,
|  | uint16_t | wDataLength,
|  | uint16_t * | pCrcResult
| ) |  |

Calculates a CRC over the input data and returns the result.

Note: The CRC calculation parameters are taken from the respective registers.

Returns
  Status code

Return values

  PH_ERR_SUCCESS | Operation successful.
  Other | Depending on implementation and underlying component.

Parameters

  [in] | pDataParams | Pointer to this layer's parameter structure.
  [in] | pData | CRC input data.
  [in] | wDataLength | Length of input data.
  [out] | pCrcResult | Calculated CRC.

## § phhalHw_Rc523_Cmd_SoftReset()

phStatus_t phhalHw_Rc523_Cmd_SoftReset | ( | phhalHw_Rc523_DataParams_t * | pDataParams | ) |

Performs a Softreset.

Returns
  Status code

Return values

  PH_ERR_SUCCESS | Operation successful.
  Other | Depending on implementation and underlying component.

Parameters

  [in] | pDataParams | Pointer to this layer's parameter structure.

## § phhalHw_Rc523_SetListenParameters()

phStatus_t phhalHw_Rc523_SetListenParameters | ( | phhalHw_Rc523_DataParams_t * | pDataParams,
|  | uint8_t * | pSensRes,
|  | uint8_t * | pNfcId1,
|  | uint8_t | SelRes,
|  | uint8_t * | pPollingResp,
|  | uint8_t | bNfcId3
| ) |  |

Stores data for phhalHw_Autocoll (i.e.

phhalHw_Rc523_Autocoll) command into internal buffer.

Note: Only applicable if in Target mode.

Returns
  Status code

Return values

  PH_ERR_SUCCESS | Operation successful.
  PH_ERR_INVALID_PARAMETER | `bDataLength` is neither zero nor 25.
  Other | Depending on implementation and under-laying component.

Parameters

  [in] | pDataParams | Pointer to this layer's parameter structure.
  [in] | pSensRes | 2 bytes.
  [in] | pNfcId1 | 3 bytes; The first NfcId1 byte is fixed to `08h` and the check byte is calculated automatically.
  [in] | SelRes | 1 byte.
  [in] | pPollingResp | 2 bytes (shall be 01h, FEh) + 6 bytes NfcId2 + 8 bytes Pad + 2 bytes SystemCode.
  [in] | bNfcId3 | 1 byte.