NXP Reader Library  v17.1.0.2535
Commands_ValueOperations

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

Collaboration diagram for Commands_ValueOperations:

Functions

phStatus_t phalMfpEVx_WriteValue (void *pDataParams, uint8_t bEncrypted, uint8_t bWriteMaced, uint16_t wBlockNr, uint8_t *pValue, uint8_t bAddrData, uint8_t *pTMC, uint8_t *pTMV)
 Performs a Write / Write MACed command of a value. More...
 
phStatus_t phalMfpEVx_ReadValue (void *pDataParams, uint8_t bEncrypted, uint8_t bReadMaced, uint8_t bMacOnCmd, uint16_t wBlockNr, uint8_t *pValue, uint8_t *pAddrData)
 Performs a Read / Read MACed Value command. More...
 
phStatus_t phalMfpEVx_Increment (void *pDataParams, uint8_t bIncrementMaced, uint16_t wBlockNr, uint8_t *pValue)
 Performs an Increment / Increment MACed command. More...
 
phStatus_t phalMfpEVx_Decrement (void *pDataParams, uint8_t bDecrementMaced, uint16_t wBlockNr, uint8_t *pValue)
 Performs a Decrement / Decrement MACed command. More...
 
phStatus_t phalMfpEVx_IncrementTransfer (void *pDataParams, uint8_t bIncrementTransferMaced, uint16_t wSourceBlockNr, uint16_t wDestinationBlockNr, uint8_t *pValue, uint8_t *pTMC, uint8_t *pTMV)
 Performs an Increment Transfer / Increment Transfer MACed command. More...
 
phStatus_t phalMfpEVx_DecrementTransfer (void *pDataParams, uint8_t bDecrementTransferMaced, uint16_t wSourceBlockNr, uint16_t wDestinationBlockNr, uint8_t *pValue, uint8_t *pTMC, uint8_t *pTMV)
 Performs a Decrement Transfer / Decrement Transfer MACed command. More...
 
phStatus_t phalMfpEVx_Transfer (void *pDataParams, uint8_t bTransferMaced, uint16_t wBlockNr, uint8_t *pTMC, uint8_t *pTMV)
 Performs a Transfer / Transfer MACed command. More...
 
phStatus_t phalMfpEVx_Restore (void *pDataParams, uint8_t bRestoreMaced, uint16_t wBlockNr)
 Performs a Restore / Restore MACed command. More...
 

Detailed Description

These Components implement the MIFARE Plus EVx value operation commands.

Function Documentation

◆ phalMfpEVx_WriteValue()

phStatus_t phalMfpEVx_WriteValue ( void *  pDataParams,
uint8_t  bEncrypted,
uint8_t  bWriteMaced,
uint16_t  wBlockNr,
uint8_t pValue,
uint8_t  bAddrData,
uint8_t pTMC,
uint8_t pTMV 
)

Performs a Write / Write MACed command of a value.

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 value should be written.
[in]pValue[In] The value to be written. This buffer should have value equal to 4 bytes.
[in]bAddrData[In] The address to be written.
[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_ReadValue()

phStatus_t phalMfpEVx_ReadValue ( void *  pDataParams,
uint8_t  bEncrypted,
uint8_t  bReadMaced,
uint8_t  bMacOnCmd,
uint16_t  wBlockNr,
uint8_t pValue,
uint8_t pAddrData 
)

Performs a Read / Read MACed Value 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 value should be read.
pValueThe value read from the specified block number. The buffer will have 4 bytes of value information.
[out]pAddrData[Out] The address from the read value information.

◆ phalMfpEVx_Increment()

phStatus_t phalMfpEVx_Increment ( void *  pDataParams,
uint8_t  bIncrementMaced,
uint16_t  wBlockNr,
uint8_t pValue 
)

Performs an Increment / Increment MACed command.

The parameter IncrementMaced is 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]bIncrementMaced[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 be used for incrementing the value.
[in]pValue[In] The value to be incremented. This buffer should have 4 bytes value information. The value to be incremented should be LSB first order.
For Ex. If the value to be incremented is by 1 times then the pValue buffer will be,
0x01, 0x00, 0x00, 0x00.

◆ phalMfpEVx_Decrement()

phStatus_t phalMfpEVx_Decrement ( void *  pDataParams,
uint8_t  bDecrementMaced,
uint16_t  wBlockNr,
uint8_t pValue 
)

Performs a Decrement / Decrement MACed command.

The parameter DecrementMaced is 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]bDecrementMaced[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 be used for decrementing the value.
[in]pValue[In] The value to be decremented. This buffer should have 4 bytes value information. The value to be decremented should be LSB first order.
For Ex. If the value to be decremented is by 1 times then the pValue buffer will be,
0x01, 0x00, 0x00, 0x00.

◆ phalMfpEVx_IncrementTransfer()

phStatus_t phalMfpEVx_IncrementTransfer ( void *  pDataParams,
uint8_t  bIncrementTransferMaced,
uint16_t  wSourceBlockNr,
uint16_t  wDestinationBlockNr,
uint8_t pValue,
uint8_t pTMC,
uint8_t pTMV 
)

Performs an Increment Transfer / Increment Transfer MACed command.

The parameter IncrementTransferMaced is 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]bIncrementTransferMaced[In] Indicate whether the response should be maced. Based on this flag the command code will be updated.
[in]wSourceBlockNr[In] PICC block number to be used for incrementing the value.
[in]wDestinationBlockNr[In] PICC block number to be used for transferring the value.
[in]pValue[In] The value to be incremented and transferred. This buffer should have 4 bytes value information. The value to be incremented and transferred should be LSB first order.
For Ex. If the value to be incremented is by 1 times then the pValue buffer will be,
0x01, 0x00, 0x00, 0x00.
[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_DecrementTransfer()

phStatus_t phalMfpEVx_DecrementTransfer ( void *  pDataParams,
uint8_t  bDecrementTransferMaced,
uint16_t  wSourceBlockNr,
uint16_t  wDestinationBlockNr,
uint8_t pValue,
uint8_t pTMC,
uint8_t pTMV 
)

Performs a Decrement Transfer / Decrement Transfer MACed command.

The parameter DecrementTransferMaced is 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]bDecrementTransferMaced[In] Indicate whether the response should be maced. Based on this flag the command code will be updated.
[in]wSourceBlockNr[In] PICC block number to be used for decrementing the value.
[in]wDestinationBlockNr[In] PICC block number to be used for transferring the value.
[in]pValue[In] The value to be decremented and transferred. This buffer should have 4 bytes value information. The value to be decremented and transferred should be LSB first order.
For Ex. If the value to be decremented is by 1 times then the pValue buffer will be,
0x01, 0x00, 0x00, 0x00.
[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_Transfer()

phStatus_t phalMfpEVx_Transfer ( void *  pDataParams,
uint8_t  bTransferMaced,
uint16_t  wBlockNr,
uint8_t pTMC,
uint8_t pTMV 
)

Performs a Transfer / Transfer MACed command.

The parameter TransferMaced is 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]bTransferMaced[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 be used for transferring the value.
[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_Restore()

phStatus_t phalMfpEVx_Restore ( void *  pDataParams,
uint8_t  bRestoreMaced,
uint16_t  wBlockNr 
)

Performs a Restore / Restore MACed command.

The parameter RestoreMaced is 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]bRestoreMaced[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 be used for restoring the value.