NXP Reader Library  v17.1.0.2535

Internal definitions. More...

Collaboration diagram for Internal:

Custom command option

phStatus_t phhalHw_Rc632_WriteFifo (phhalHw_Rc632_DataParams_t *pDataParams, uint8_t *pData, uint16_t wLength, uint16_t *pBytesWritten)
 Write Data to Fifo buffer. More...
 
phStatus_t phhalHw_Rc632_ReadFifo (phhalHw_Rc632_DataParams_t *pDataParams, uint16_t wBufSize, uint8_t *pData, uint16_t *pLength)
 Read Data from Fifo buffer. More...
 
phStatus_t phhalHw_Rc632_FlushFifo (phhalHw_Rc632_DataParams_t *pDataParams)
 Clear Fifo buffer. More...
 
phStatus_t phhalHw_Rc632_WriteData (phhalHw_Rc632_DataParams_t *pDataParams, uint8_t bAddress, uint8_t *pData, uint16_t wLength)
 Write multiple values to a single register address. More...
 
phStatus_t phhalHw_Rc632_ReadData (phhalHw_Rc632_DataParams_t *pDataParams, uint8_t bAddress, uint16_t wLength, uint8_t *pData)
 Read multiple values from single register address. More...
 
phStatus_t phhalHw_Rc632_WaitIrq (phhalHw_Rc632_DataParams_t *pDataParams, uint8_t bIrqWaitFor, uint8_t *pIrqReg)
 Wait until one of the given interrupts occurs. More...
 
phStatus_t phhalHw_Rc632_SetBitMask (phhalHw_Rc632_DataParams_t *pDataParams, uint8_t reg, uint8_t mask)
 
phStatus_t phhalHw_Rc632_ClearBitMask (phhalHw_Rc632_DataParams_t *pDataParams, uint8_t reg, uint8_t mask)
 
phStatus_t phhalHw_Rc632_SetTmo (phhalHw_Rc632_DataParams_t *pDataParams, uint16_t tmoLength, uint8_t bUnit)
 
phStatus_t phhalHw_Rc632_GetTxBuffer (phhalHw_Rc632_DataParams_t *pDataParams, uint8_t bIsExchange, uint8_t **pTxBuffer, uint16_t *pTxBufferLen, uint16_t *pTxBufferSize)
 
phStatus_t phhalHw_Rc632_GetRxBuffer (phhalHw_Rc632_DataParams_t *pDataParams, uint8_t bIsExchange, uint8_t **pRxBuffer, uint16_t *pRxBufferLen, uint16_t *pRxBufferSize)
 
phStatus_t phhalHw_Rc632_Command_Int (phhalHw_Rc632_DataParams_t *pDataParams, uint8_t bCmd, uint16_t wOption, uint8_t bIrqWaitFor, uint8_t *pTxBuffer, uint16_t wTxLength, uint16_t wRxBufferSize, uint8_t *pRxBuffer, uint16_t *pRxLength)
 Execute a Reader-specific command. More...
 
phStatus_t phhalHw_Rc632_MfcAuthenticate_Int (phhalHw_Rc632_DataParams_t *pDataParams, uint8_t bAuthMode, uint8_t *pUid, uint8_t bBlockNo)
 Build and Execute MIFARE(R) Classic Authentication command. More...
 
phStatus_t phhalHw_Rc632_CalculateFdt (phhalHw_Rc632_DataParams_t *pDataParams, phStatus_t wExchangeStatus, uint32_t *pTime)
 Calculates the frame delay time between transmission and reception of the last command. More...
 
phStatus_t phhalHw_Rc632_GetDigiDelay (phhalHw_Rc632_DataParams_t *pDataParams, uint8_t bIsTimeout, uint16_t *pDelayUs)
 Returns the delay of the digital circutry for the current protocol. More...
 
#define PHHAL_HW_RC632_OPTION_FIFO_NOCLEAR   0x0080U
 Do not clear FIFO prior to command execution.
 
#define PHHAL_HW_RC632_OPTION_RXTX_TIMER_NOSTART   0x0000U
 Do not start timer after transmission / before reception; (only for phhalHw_Rc632_Cmd_Receive).
 
#define PHHAL_HW_RC632_OPTION_RXTX_TIMER_START   0x0010U
 Start timer after transmission / before reception, reset timer counter value; (only for phhalHw_Rc632_Cmd_Receive).
 
#define PHHAL_HW_RC632_EXCHANGE_CMD_NOSTOP   0x0020U
 Do not stop the receive command after execution, do not flush the FIFO.
 
#define PHHAL_HW_RC632_RESERVED_BUFFER_LEN   7U
 Amount of needed and reserved memory for the protocol overhead.
 
#define PHHAL_HW_RC632_DEFAULT_TIMEOUT_MS   5U
 Default timeout in milliseconds.
 
#define PHHAL_HW_RC632_DEFAULT_TIMEOUT_MS   5U
 Default timeout in milliseconds.
 
#define PHHAL_HW_RC632_SHADOW_COUNT   0x000DU
 Number of shadowed configurations.
 
#define PHHAL_HW_RC632_FIFOSIZE   256U
 Size of RC internal FiFo buffer.
 
#define PHHAL_HW_RC632_CONFIG_DISABLE_PCDRESET   (PH_CONFIG_CUSTOM_BEGIN)
 Disable PcdReset call in phhalHw_ApplyProtocolSettings function.
 
#define PHHAL_HW_RC632_TIMER_FREQ   13.56
 RC internal timer frequency.
 
#define PHHAL_HW_RC632_TIMER_MAX_VALUE_US   39437592
 RC maximum timer value in microseconds.
 
#define PHHAL_HW_RC632_ETU_106   1000 / 106
 Duration of one ETU at 106 kBit/s in [us].
 
#define PHHAL_HW_RC632_MFC_KEY_LENGTH   0x06U
 Lengh of a MIFARE(R) Classic key.
 
#define PHHAL_HW_RC632_VALUE_FIFOSIZE   0x40U
 Buffer size of the FIFO.
 
#define PHHAL_HW_RC632_EEPROM_SIZE   0xFFFU
 EEPROM size of the Rc632 chip.
 
#define PHHAL_HW_RC632_EEPROM_PAGE_SIZE   0x10U
 Size of a page in EEPROM.
 
#define PHHAL_HW_RC632_MAX_NUM_REGS   0x40U
 NUMBER of registers in RC632.
 
#define PHHAL_HW_RC632_ETU_I14443   9.44f
 Duration of one ETU for ISO14443 at 106 kBit/s in [us].
 
#define PHHAL_HW_RC632_ETU_I15693   37.76f
 Duration of one ETU for ISO15693 in [us].
 
#define PHHAL_HW_RC632_ETU_EPCUID   37.76f
 Duration of one ETU for EPC/UID in [us].
 
#define PHHAL_HW_RC632_I14443_ADD_DELAY_US   15
 Additional digital timeout delay for ISO14443.
 
#define PHHAL_HW_RC632_I15693_ADD_DELAY_US   120
 Additional digital timeout delay for ISO15693.
 
#define PHHAL_HW_RC632_DIGI_DELAY_TXWAIT_DBFREQ   8U
 Chip digital delay in ETUs for TxWait.
 
#define PHHAL_HW_RC632_TIMER_SHIFT   4.8f
 Shift of the internal RC timer in ETUs.
 
#define PHHAL_HW_RC632_AUTHMODE_KEYA   0x60U
 MFC KeyA Authentication Mode.
 
#define PHHAL_HW_RC632_AUTHMODE_KEYB   0x61U
 MFC KeyA Authentication Mode.
 
#define PHHAL_HW_RC632_MAX_NUM_KEYS   16U
 Maximum possible number of keys in the EEPROM.
 

Detailed Description

Internal definitions.

Function Documentation

◆ phhalHw_Rc632_WriteFifo()

phStatus_t phhalHw_Rc632_WriteFifo ( phhalHw_Rc632_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_Rc632_ReadFifo()

phStatus_t phhalHw_Rc632_ReadFifo ( phhalHw_Rc632_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_Rc632_FlushFifo()

phStatus_t phhalHw_Rc632_FlushFifo ( phhalHw_Rc632_DataParams_t pDataParams)

Clear Fifo buffer.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.

◆ phhalHw_Rc632_WriteData()

phStatus_t phhalHw_Rc632_WriteData ( phhalHw_Rc632_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_Rc632_ReadData()

phStatus_t phhalHw_Rc632_ReadData ( phhalHw_Rc632_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_Rc632_WaitIrq()

phStatus_t phhalHw_Rc632_WaitIrq ( phhalHw_Rc632_DataParams_t pDataParams,
uint8_t  bIrqWaitFor,
uint8_t pIrqReg 
)

Wait until one of the given interrupts occurs.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.

◆ phhalHw_Rc632_Command_Int()

phStatus_t phhalHw_Rc632_Command_Int ( phhalHw_Rc632_DataParams_t pDataParams,
uint8_t  bCmd,
uint16_t  wOption,
uint8_t  bIrqWaitFor,
uint8_t pTxBuffer,
uint16_t  wTxLength,
uint16_t  wRxBufferSize,
uint8_t pRxBuffer,
uint16_t pRxLength 
)

Execute a Reader-specific command.

Internal function for executing all commands except Transceive/Transmit/Receive.

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]bCmd[In] Command code.
[in]wOption[In] Option parameter.
[in]bIrqWaitFor[In] Bitmask of interrupts in Irq0 register to wait for.
[in]pTxBuffer[In] Data to transmit.
[in]wTxLength[In] Length of input data.
[in]wRxBufferSize[In] Size of receive buffer.
[out]pRxBuffer[Out] Pointer to received data.
[out]pRxLength[Out] Number of received data bytes.

◆ phhalHw_Rc632_MfcAuthenticate_Int()

phStatus_t phhalHw_Rc632_MfcAuthenticate_Int ( phhalHw_Rc632_DataParams_t pDataParams,
uint8_t  bAuthMode,
uint8_t pUid,
uint8_t  bBlockNo 
)

Build and Execute MIFARE(R) Classic Authentication command.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlaying component.

◆ phhalHw_Rc632_CalculateFdt()

phStatus_t phhalHw_Rc632_CalculateFdt ( phhalHw_Rc632_DataParams_t pDataParams,
phStatus_t  wExchangeStatus,
uint32_t pTime 
)

Calculates the frame delay time between transmission and reception of the last command.

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_Rc632_GetDigiDelay()

phStatus_t phhalHw_Rc632_GetDigiDelay ( phhalHw_Rc632_DataParams_t pDataParams,
uint8_t  bIsTimeout,
uint16_t pDelayUs 
)

Returns the delay of the digital circutry for the current protocol.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
Parameters
[in]pDataParams[In] Pointer to this layer's parameter structure.
[in]bIsTimeout[In] Wheter the returned delay is added to a timeout (PH_ON) or is used for measurement (PH_OFF).
[out]pDelayUs[Out] The digital delay in microseconds.