NXP Reader Library  v17.1.0.2535
Commands_DataOperations

These Components implement the MIFARE Plus EVx data operation commands. More...

Collaboration diagram for Commands_DataOperations:

Functions

phStatus_t phalMfpEVx_Write (void *pDataParams, uint8_t bEncrypted, uint8_t bWriteMaced, uint16_t wBlockNr, uint8_t bNumBlocks, uint8_t *pBlocks, uint8_t *pTMC, uint8_t *pTMV)
 Performs a Write / Write MACed command. More...
 
phStatus_t phalMfpEVx_Read (void *pDataParams, uint8_t bEncrypted, uint8_t bReadMaced, uint8_t bMacOnCmd, uint16_t wBlockNr, uint8_t bNumBlocks, uint8_t *pBlocks)
 Performs a Read / Read MACed command. More...
 

Detailed Description

These Components implement the MIFARE Plus EVx data operation commands.

Function Documentation

◆ phalMfpEVx_Write()

phStatus_t phalMfpEVx_Write ( void *  pDataParams,
uint8_t  bEncrypted,
uint8_t  bWriteMaced,
uint16_t  wBlockNr,
uint8_t  bNumBlocks,
uint8_t pBlocks,
uint8_t pTMC,
uint8_t pTMV 
)

Performs a Write / Write MACed command.

This command writes a 16 byte data to the PICC. The parameter Encrypted, WriteMaced are valid only for MFP authenticated state and not for MFC authenticate state.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bEncrypted[In] Type of communication to be used. Based on this flag the command code will be updated.
[in]bWriteMaced[In] Indicate whether the response should be maced. Based on this flag the command code will be updated.
[in]wBlockNr[In] PICC block number to which the data should be written.
[in]bNumBlocks[In] Number of blocks to write.
15 block for Native communication if configured as Software component.
13 blocks if configured as Sam X or Sam NonX component.
[in]pBlocks[In] The data to be written. This buffer should have data equal to NumBlocks * 16, where 16 is one block size.
[out]pTMC[Out] Only available is the block is a TMProtected block. The buffer will have 4 bytes of Transaction MAC counter information.
[out]pTMV[Out] Only available is the block is a TMProtected block. The buffer will have 8 bytes of Transaction MAC value.

◆ phalMfpEVx_Read()

phStatus_t phalMfpEVx_Read ( void *  pDataParams,
uint8_t  bEncrypted,
uint8_t  bReadMaced,
uint8_t  bMacOnCmd,
uint16_t  wBlockNr,
uint8_t  bNumBlocks,
uint8_t pBlocks 
)

Performs a Read / Read MACed command.

The parameter Encrypted, ReadMaced and MacOnCmd are valid only for MFP authenticated state and not for MFC authenticate state.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bEncrypted[In] Type of communication to be used. Based on this flag the command code will be updated.
[in]bReadMaced[In] Indicate whether the response should be maced. Based on this flag the command code will be updated.
[in]bMacOnCmd[In] Indicate whether the command should be maced. Based on this flag the command code will be updated.
[in]wBlockNr[In] PICC block number from which the data should be read.
[in]bNumBlocks[In] Number of blocks to be read.
15 block for Native communication if configured as Software component.
13 blocks if configured as Sam X or Sam NonX component.
[out]pBlocks[Out] The data to be read. This buffer should have data equal to ((NumBlocks * 16) + 8), where 16 is one block size and 8 bytes is for storing the MAC received form PICC. The last 8 bytes will be cleared once returned to the application.