NXP Reader Library  v17.1.0.2535
Commands_DataOperations

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

Collaboration diagram for Commands_DataOperations:

Functions

phStatus_t phalMfp_MultiBlockWrite (void *pDataParams, uint8_t bBlockNr, uint8_t bNumBlocks, uint8_t *pBlocks)
 Performs a Multi Block Write command. More...
 
phStatus_t phalMfp_MultiBlockRead (void *pDataParams, uint8_t bBlockNr, uint8_t bNumBlocks, uint8_t *pBlocks)
 Performs a Multi Block Read command. More...
 
phStatus_t phalMfp_Write (void *pDataParams, uint8_t bEncrypted, uint8_t bWriteMaced, uint16_t wBlockNr, uint8_t bNumBlocks, uint8_t *pBlocks)
 Performs a Write / Write MACed command. More...
 
phStatus_t phalMfp_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 data operation commands.

Function Documentation

◆ phalMfp_MultiBlockWrite()

phStatus_t phalMfp_MultiBlockWrite ( void *  pDataParams,
uint8_t  bBlockNr,
uint8_t  bNumBlocks,
uint8_t pBlocks 
)

Performs a Multi Block Write command.

This command is for to use in Security Level 2 only and with MFC Authenticated state.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bBlockNr[In] PICC block number to which the data should be written.
[in]bNumBlocks[In] Number of blocks to write (must not be more than 3).
[in]pBlocks[In] Block(s) (16 * bNumBlocks bytes).

◆ phalMfp_MultiBlockRead()

phStatus_t phalMfp_MultiBlockRead ( void *  pDataParams,
uint8_t  bBlockNr,
uint8_t  bNumBlocks,
uint8_t pBlocks 
)

Performs a Multi Block Read command.

This command is for to use in Security Level 2 only and with MFC Authenticated state.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bBlockNr[In] PICC block number from which the data should be read.
[in]bNumBlocks[In] Number of blocks to read (must not be more than 3).
[out]pBlocks[Out] Block(s) (16 * bNumBlocks bytes).

◆ phalMfp_Write()

phStatus_t phalMfp_Write ( void *  pDataParams,
uint8_t  bEncrypted,
uint8_t  bWriteMaced,
uint16_t  wBlockNr,
uint8_t  bNumBlocks,
uint8_t pBlocks 
)

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 (must not be more than 3)
[in]pBlocks[In] The data to be written. This buffer should have data equal to NumBlocks * 16, where 16 is one block size.

◆ phalMfp_Read()

phStatus_t phalMfp_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 (must not be more than 3)
[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.