NXP Reader Library  v17.1.0.2535
TMI Utilities

This layer provides Utilities for operating on transaction MAC. More...

Collaboration diagram for TMI Utilities:

Data Structures

struct  phTMIUtils_t
 Definition of a singe Log entry. More...
 

Functions

phStatus_t phTMIUtils_Init (phTMIUtils_t *pDataParams, uint8_t *pTMIBuffer, uint32_t dwBufLen)
 Initialize TMI Utils component. More...
 
phStatus_t phTMIUtils_ActivateTMICollection (phTMIUtils_t *pDataParams, uint8_t bOption)
 Perfomrs Activation, Deactivation, Resume, Reset and Pause of TmiCollection. More...
 
phStatus_t phTMIUtils_GetTMI (phTMIUtils_t *pDataParams, uint8_t **ppTMIBuffer, uint32_t *dwTMILen)
 Get TMI buffer. More...
 
phStatus_t phTMIUtils_CollectTMI (phTMIUtils_t *pDataParams, uint8_t bOption, uint8_t *pCmdBuffer, uint16_t wCmdBufLen, uint8_t *pData, uint32_t dwDataLen, uint16_t wBlockSize)
 Performs collection of command / data information. More...
 
phStatus_t phTMIUtils_SetConfig (phTMIUtils_t *pDataParams, uint16_t wConfig, uint32_t dwValue)
 Performs SetConfig command. More...
 
phStatus_t phTMIUtils_GetConfig (phTMIUtils_t *pDataParams, uint16_t wConfig, uint32_t *pValue)
 Performs GetConfig command. More...
 

Activate TMI options

#define PH_TMIUTILS_DEACTIVATE_TMI   0x00U
 Deactivate TMI collection.
 
#define PH_TMIUTILS_ACTIVATE_TMI   0x01U
 Activate TMI collection.
 
#define PH_TMIUTILS_PAUSE_TMI   0x02U
 Pause TMI collection.
 
#define PH_TMIUTILS_RESUME_TMI   0x03U
 Resume Paused TMI collection.
 
#define PH_TMIUTILS_RESET_TMI   0x04U
 Reset TMI collection Buffer Index to 0.
 

Configuration Options

#define PH_TMIUTILS_TMI_STATUS   0x01U
 Config Option for TMI Status.
 
#define PH_TMIUTILS_TMI_OFFSET_LENGTH   0x02U
 Config option for Length offset in TMI Length.
 
#define PH_TMIUTILS_TMI_BUFFER_INDEX   0x04U
 Config option for buffer index.
 
#define PH_TMIUTILS_TMI_OFFSET_VALUE   0x08U
 Config option for Offset Value.
 

Flags for CollectTMI

#define PH_TMIUTILS_NO_PADDING   0x00U
 Flag indicating that padding is not required.
 
#define PH_TMIUTILS_READ_INS   0x01U
 Flag indicating that instruction is Read Operation.
 
#define PH_TMIUTILS_ZEROPAD_CMDBUFF   0x02U
 Flag to indicate zero padding after Cmd buffer.
 
#define PH_TMIUTILS_ZEROPAD_DATABUFF   0x04U
 Flag to indicate zero padding after Data buffer.
 

Detailed Description

This layer provides Utilities for operating on transaction MAC.

Function Documentation

◆ phTMIUtils_Init()

phStatus_t phTMIUtils_Init ( phTMIUtils_t pDataParams,
uint8_t pTMIBuffer,
uint32_t  dwBufLen 
)

Initialize TMI Utils component.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]pTMIBuffer[In] Input buffer for collecting the command / data information..
[in]dwBufLen[In] Size of input buffer.

◆ phTMIUtils_ActivateTMICollection()

phStatus_t phTMIUtils_ActivateTMICollection ( phTMIUtils_t pDataParams,
uint8_t  bOption 
)

Perfomrs Activation, Deactivation, Resume, Reset and Pause of TmiCollection.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]bOption[In] One of the below options.

◆ phTMIUtils_GetTMI()

phStatus_t phTMIUtils_GetTMI ( phTMIUtils_t pDataParams,
uint8_t **  ppTMIBuffer,
uint32_t dwTMILen 
)

Get TMI buffer.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[out]ppTMIBuffer[Out] Get the collected command / data information.
[out]dwTMILen[Out] Length of bytes available in ppTMIBuffer.

◆ phTMIUtils_CollectTMI()

phStatus_t phTMIUtils_CollectTMI ( phTMIUtils_t pDataParams,
uint8_t  bOption,
uint8_t pCmdBuffer,
uint16_t  wCmdBufLen,
uint8_t pData,
uint32_t  dwDataLen,
uint16_t  wBlockSize 
)

Performs collection of command / data information.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]bOption[In] One of the below values.
[in]pCmdBuffer[In] Buffer containing the command information.
[in]wCmdBufLen[In] Length of bytes available in pCmdBuffer.
[in]pData[In] Buffer containing the data information.
[in]dwDataLen[In] Length of bytes available in pData.
[in]wBlockSize[In] Block size for appending padding bytes if PH_TMIUTILS_NO_PADDING is not used.

◆ phTMIUtils_SetConfig()

phStatus_t phTMIUtils_SetConfig ( phTMIUtils_t pDataParams,
uint16_t  wConfig,
uint32_t  dwValue 
)

Performs SetConfig command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]wConfig[In] One of the Below Configurations.
[in]dwValue[In] The value for the given configuration.

◆ phTMIUtils_GetConfig()

phStatus_t phTMIUtils_GetConfig ( phTMIUtils_t pDataParams,
uint16_t  wConfig,
uint32_t pValue 
)

Performs GetConfig command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParams[In] Pointer to this layers parameter structure.
[in]wConfig[In] One of the Below Configurations.
[out]pValue[Out] The value for the given configuration.