NXP Reader Library  v17.1.0.2535

Internal definitions. More...

Collaboration diagram for Internal:

Macros

#define PHHAL_HW_RC523_TIMER_FREQ   13.56f
 RC internal timer frequency.
 
#define PHHAL_HW_RC523_TIMER_MAX_VALUE_US   39586813
 RC maximum timer value in microseconds.
 
#define PHHAL_HW_RC523_TIMER_SHIFT   4.8f
 Shift of the internal RC timer in ETUs.
 
#define PHHAL_HW_RC523_ETU_106   9.44f
 Duration of one ETU at 106 kBit/s in [us].
 
#define PHHAL_HW_RC523_MFC_AUTHA_CMD   0x60U
 MIFARE(R) Classic AUTHA command code.
 
#define PHHAL_HW_RC523_MFC_AUTHB_CMD   0x61U
 MIFARE(R) Classic AUTHB command code.
 

Functions

phStatus_t phhalHw_Rc523_WriteFifo (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t *pData, uint16_t wLength, uint16_t *pBytesWritten)
 Write Data to Fifo buffer. More...
 
phStatus_t phhalHw_Rc523_ReadFifo (phhalHw_Rc523_DataParams_t *pDataParams, uint16_t wBufSize, uint8_t *pData, uint16_t *pLength)
 Read Data from Fifo buffer. More...
 
phStatus_t phhalHw_Rc523_FlushFifo (phhalHw_Rc523_DataParams_t *pDataParams)
 Clear Fifo buffer. More...
 
phStatus_t phhalHw_Rc523_WriteData (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t bAddress, uint8_t *pData, uint16_t wLength)
 Write multiple values to a single register address. More...
 
phStatus_t phhalHw_Rc523_ReadData (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t bAddress, uint16_t wLength, uint8_t *pData)
 Read multiple values from single register address. More...
 
phStatus_t phhalHw_Rc523_ExchangeTransmit (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t bCmdCode, uint8_t *pTxBuffer, uint16_t wTxLength)
 Transmit part of Exchange command. More...
 
phStatus_t phhalHw_Rc523_ExchangeReceive (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t **ppRxBuffer, uint16_t *pRxLength)
 Receive part of Exchange command. More...
 
phStatus_t phhalHw_Rc523_SetFdt (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t bUnit, uint16_t wTimeout)
 Sets the Frame Delay Time (Timeout). More...
 
phStatus_t phhalHw_Rc523_GetFdt (phhalHw_Rc523_DataParams_t *pDataParams, phStatus_t wExchangeStatus, uint32_t *pTime)
 Retrieves the Frame Delay Time of the last command. More...
 
phStatus_t phhalHw_Rc523_GetTxBuffer (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t bIsExchange, uint8_t **pTxBuffer, uint16_t *pTxBufferLen, uint16_t *pTxBufferSize)
 Returns the TxBuffer pointer, length and size. More...
 
phStatus_t phhalHw_Rc523_GetRxBuffer (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t bIsExchange, uint8_t **pRxBuffer, uint16_t *pRxBufferLen, uint16_t *pRxBufferSize)
 Returns the RxBuffer pointer, length and size. More...
 
phStatus_t phhalHw_Rc523_WaitIrq (phhalHw_Rc523_DataParams_t *pDataParams, uint8_t bIrq0WaitFor, uint8_t bIrq1WaitFor, uint8_t *pIrq0Reg, uint8_t *pIrq1Reg)
 Wait until one of the given interrupts occurs. More...
 

Timing related constants

#define PHHAL_HW_RC523_FELICA_ADD_DELAY_US   240U
 Additional digital timeout delay for Felica.
 

RS232 speed settings

#define PHHAL_HW_RC523_SERIALSPEED_7200   0xFAU
 7.200 kBit/s.
 
#define PHHAL_HW_RC523_SERIALSPEED_9600   0xEBU
 9.600 kBit/s.
 
#define PHHAL_HW_RC523_SERIALSPEED_14400   0xDAU
 14.400 kBit/s.
 
#define PHHAL_HW_RC523_SERIALSPEED_19200   0xCBU
 19.200 kBit/s.
 
#define PHHAL_HW_RC523_SERIALSPEED_38400   0xABU
 38.400 kBit/s.
 
#define PHHAL_HW_RC523_SERIALSPEED_57600   0x9AU
 57.500 kBit/s.
 
#define PHHAL_HW_RC523_SERIALSPEED_115200   0x7AU
 115.200 kBit/s.
 
#define PHHAL_HW_RC523_SERIALSPEED_128000   0x74U
 128.000 kBit/s.
 
#define PHHAL_HW_RC523_SERIALSPEED_230400   0x5AU
 230.400 kBit/s.
 
#define PHHAL_HW_RC523_SERIALSPEED_460800   0x3AU
 460.800 kBit/s.
 
#define PHHAL_HW_RC523_SERIALSPEED_921600   0x1CU
 921.600 kBit/s.
 
#define PHHAL_HW_RC523_SERIALSPEED_1228800   0x15U
 1.228.800 kBit/s.
 

Detailed Description

Internal definitions.

Function Documentation

◆ phhalHw_Rc523_WriteFifo()

phStatus_t phhalHw_Rc523_WriteFifo ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t pData,
uint16_t  wLength,
uint16_t pBytesWritten 
)

Write Data to Fifo buffer.

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]pData[In] input data
[in]wLength[In] length of input data
[out]pBytesWritten[Out] Number of written bytes

◆ phhalHw_Rc523_ReadFifo()

phStatus_t phhalHw_Rc523_ReadFifo ( phhalHw_Rc523_DataParams_t pDataParams,
uint16_t  wBufSize,
uint8_t pData,
uint16_t pLength 
)

Read Data from Fifo buffer.

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]wBufSize[In] size of output buffer
[out]pData[Out] output data
[out]pLength[Out] number of output data bytes

◆ phhalHw_Rc523_FlushFifo()

phStatus_t phhalHw_Rc523_FlushFifo ( phhalHw_Rc523_DataParams_t pDataParams)

Clear Fifo buffer.

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.

◆ phhalHw_Rc523_WriteData()

phStatus_t phhalHw_Rc523_WriteData ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t  bAddress,
uint8_t pData,
uint16_t  wLength 
)

Write multiple values to a single register address.

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]bAddress[In] Start-Register Address
[in]pData[In] Register Values; uint8_t[wLength]
[in]wLength[In] Number of Values

◆ phhalHw_Rc523_ReadData()

phStatus_t phhalHw_Rc523_ReadData ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t  bAddress,
uint16_t  wLength,
uint8_t pData 
)

Read multiple values from single register address.

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]bAddress[In] Register Address
[in]wLength[In] Number of Values
[out]pData[Out] Register Values; uint8_t[wLength]

◆ phhalHw_Rc523_ExchangeTransmit()

phStatus_t phhalHw_Rc523_ExchangeTransmit ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t  bCmdCode,
uint8_t pTxBuffer,
uint16_t  wTxLength 
)

Transmit part of Exchange command.

See also
phhalHw_Exchange
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]bCmdCode[In] Command-Code of command.
[in]pTxBuffer[In] Data to transmit.
[in]wTxLength[In] Length of data to transmit.

◆ phhalHw_Rc523_ExchangeReceive()

phStatus_t phhalHw_Rc523_ExchangeReceive ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t **  ppRxBuffer,
uint16_t pRxLength 
)

Receive part of Exchange command.

See also
phhalHw_Exchange
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.
[out]ppRxBuffer[Out] Pointer to received data.
[out]pRxLength[Out] Number of received data bytes.

◆ phhalHw_Rc523_SetFdt()

phStatus_t phhalHw_Rc523_SetFdt ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t  bUnit,
uint16_t  wTimeout 
)

Sets the Frame Delay Time (Timeout).

Note: Frame Delay Time is defined between the last transmitted bit and the first received bit.

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]bUnit[In] Unit of given timeout value (either PHHAL_HW_TIME_MICROSECONDS or PHHAL_HW_TIME_MILLISECONDS).
[in]wTimeout[In] Timeout value.

◆ phhalHw_Rc523_GetFdt()

phStatus_t phhalHw_Rc523_GetFdt ( phhalHw_Rc523_DataParams_t pDataParams,
phStatus_t  wExchangeStatus,
uint32_t pTime 
)

Retrieves the Frame Delay Time of the last command.

Note: Frame Delay Time is defined between the last transmitted bit and the first received bit.

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]wExchangeStatus[In] Status code returned by exchange function.
[out]pTime[Out] Calculated time in microseconds from timer contents.

◆ phhalHw_Rc523_GetTxBuffer()

phStatus_t phhalHw_Rc523_GetTxBuffer ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t  bIsExchange,
uint8_t **  pTxBuffer,
uint16_t pTxBufferLen,
uint16_t pTxBufferSize 
)

Returns the TxBuffer pointer, length and size.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bIsExchange[In] Whether this is for Exchange (PH_ON) or not (PH_OFF).
[out]pTxBuffer[Out] Pointer to the TxBuffer.
[out]pTxBufferLen[Out] Number of bytes already in the TxBuffer.
[out]pTxBufferSize[Out] Size of the TxBuffer.

◆ phhalHw_Rc523_GetRxBuffer()

phStatus_t phhalHw_Rc523_GetRxBuffer ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t  bIsExchange,
uint8_t **  pRxBuffer,
uint16_t pRxBufferLen,
uint16_t pRxBufferSize 
)

Returns the RxBuffer pointer, length and size.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bIsExchange[In] Whether this is for Exchange (PH_ON) or not (PH_OFF).
[out]pRxBuffer[Out] Pointer to the RxBuffer.
[out]pRxBufferLen[Out] Number of bytes already in the RxBuffer.
[out]pRxBufferSize[Out] Size of the RxBuffer.

◆ phhalHw_Rc523_WaitIrq()

phStatus_t phhalHw_Rc523_WaitIrq ( phhalHw_Rc523_DataParams_t pDataParams,
uint8_t  bIrq0WaitFor,
uint8_t  bIrq1WaitFor,
uint8_t pIrq0Reg,
uint8_t pIrq1Reg 
)

Wait until one of the given interrupts occurs.

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]bIrq0WaitFor[In] Bitmask of interrupts in CommIrq register to wait for.
[in]bIrq1WaitFor[In] Bitmask of interrupts in DivIrq register to wait for.
[out]pIrq0Reg[Out] Contents of CommIrq register.
[out]pIrq1Reg[Out] Contents of DivIrq register.