Supported ReaderIC commands. More...

Functions | |
| phStatus_t | phhalHw_Rc663_Cmd_Lpcd (phhalHw_Rc663_DataParams_t *pDataParams, uint8_t bMode, uint8_t bI, uint8_t bQ, uint16_t wPowerDownTimeMs, uint16_t wDetectionTimeUs) |
| Perform Low-Power-Card-Detection. More... | |
| phStatus_t | phhalHw_Rc663_Cmd_LpcdConfig (phhalHw_Rc663_DataParams_t *pDataParams, uint8_t *pI, uint8_t *pQ) |
| Perform Low-Power-Card-Detection Configuration Procedure. More... | |
| phStatus_t | phhalHw_Rc663_Cmd_LoadKey (phhalHw_Rc663_DataParams_t *pDataParams, uint8_t *pKey) |
| Load a MIFARE key into the key-buffer. More... | |
| phStatus_t | phhalHw_Rc663_Cmd_AckReq (phhalHw_Rc663_DataParams_t *pDataParams, uint8_t *pRxBuffer, uint16_t *wRxBufferLen) |
| Performs a query, an Ack and a Req-Rn. More... | |
| phStatus_t | phhalHw_Rc663_Cmd_Receive (phhalHw_Rc663_DataParams_t *pDataParams, uint16_t wOption, uint8_t **ppRxBuffer, uint16_t *pRxLength) |
| Start receiver and wait until reception or timeout. More... | |
| phStatus_t | phhalHw_Rc663_Cmd_Transmit (phhalHw_Rc663_DataParams_t *pDataParams, uint16_t wOption, uint8_t *pTxBuffer, uint16_t wTxLength) |
| Transmit bytes to card without starting receiver afterwards. More... | |
| phStatus_t | phhalHw_Rc663_Cmd_WriteE2 (phhalHw_Rc663_DataParams_t *pDataParams, uint16_t wAddress, uint8_t bData) |
| Write one byte of data to a given EEPROM address. More... | |
| phStatus_t | phhalHw_Rc663_Cmd_WriteE2Page (phhalHw_Rc663_DataParams_t *pDataParams, uint16_t wAddress, uint8_t *pData, uint8_t bDataLen) |
| Write a number of data bytes to a given EEPROM page. More... | |
| phStatus_t | phhalHw_Rc663_Cmd_ReadE2 (phhalHw_Rc663_DataParams_t *pDataParams, uint16_t wAddress, uint16_t wNumBytes, uint8_t *pData) |
| Read one byte from a given EEPROM address. More... | |
| phStatus_t | phhalHw_Rc663_Cmd_LoadReg (phhalHw_Rc663_DataParams_t *pDataParams, uint16_t wEEAddress, uint8_t bRegAddress, uint8_t bNumBytes) |
| Copies a defined number of bytes from the EEPROM into the register set, beginning at the given register address RegAdr. More... | |
| phStatus_t | phhalHw_Rc663_Cmd_LoadProtocol (phhalHw_Rc663_DataParams_t *pDataParams, uint8_t bTxProtocol, uint8_t bRxProtocol) |
| Initializes protected registers for a dedicated protocol. More... | |
| phStatus_t | phhalHw_Rc663_Cmd_LoadKeyE2 (phhalHw_Rc663_DataParams_t *pDataParams, uint8_t bKeyNo) |
| Load a MIFARE key from EEPROM into the key-buffer. More... | |
| phStatus_t | phhalHw_Rc663_Cmd_StoreKeyE2 (phhalHw_Rc663_DataParams_t *pDataParams, uint8_t bKeyNo, uint8_t *pKeys, uint8_t bNumberOfKeys) |
| Write one or more MIFARE key(s) into EEPROM. More... | |
| phStatus_t | phhalHw_Rc663_Cmd_SoftReset (phhalHw_Rc663_DataParams_t *pDataParams) |
| Performs a Softreset. More... | |
Low-Power-Card-Detection Modes | |
| #define | PHHAL_HW_RC663_CMD_LPCD_MODE_DEFAULT 0x00U |
| Default mode. More... | |
| #define | PHHAL_HW_RC663_CMD_LPCD_MODE_POWERDOWN 0x01U |
| Powers down the IC for a certain amount of time and performs LPC after wakeup. More... | |
| #define | PHHAL_HW_RC663_CMD_LPCD_MODE_POWERDOWN_GUARDED 0x02U |
| Same as PHHAL_HW_RC663_CMD_LPCD_MODE_POWERDOWN, but uses the timeout set with either PHHAL_HW_CONFIG_TIMING_US or PHHAL_HW_CONFIG_TIMING_MS as abort criteria. More... | |
| #define | PHHAL_HW_RC663_CMD_LPCD_MODE_OPTION_TRIMM_LPO 0x80U |
| Or this bit to the desired mode to perform LPO trimming together with the command. | |
| #define | PHHAL_HW_RC663_CMD_LPCD_MODE_OPTION_IGNORE_IQ 0x40U |
| Or this bit to the desired mode to prevent the function to set I and Q channel values. | |
| #define | PHHAL_HW_RC663_CMD_LPCD_MODE_OPTION_MASK 0xF0U |
| Mask for option bits within Mode byte. | |
Supported ReaderIC commands.
| #define PHHAL_HW_RC663_CMD_LPCD_MODE_DEFAULT 0x00U |
Default mode.
Try LPCD until timeout is reached.
| #define PHHAL_HW_RC663_CMD_LPCD_MODE_POWERDOWN 0x01U |
Powers down the IC for a certain amount of time and performs LPC after wakeup.
If no card is found the IC is powered down again and the procedure is restarted. If a card is found the function returns and the IC remains powered up.
| #define PHHAL_HW_RC663_CMD_LPCD_MODE_POWERDOWN_GUARDED 0x02U |
Same as PHHAL_HW_RC663_CMD_LPCD_MODE_POWERDOWN, but uses the timeout set with either PHHAL_HW_CONFIG_TIMING_US or PHHAL_HW_CONFIG_TIMING_MS as abort criteria.
Be advised that the guard-timer in this case is only running during the power-up phases, so the timeout has to be adjusted properly.
| phStatus_t phhalHw_Rc663_Cmd_Lpcd | ( | phhalHw_Rc663_DataParams_t * | pDataParams, |
| uint8_t | bMode, | ||
| uint8_t | bI, | ||
| uint8_t | bQ, | ||
| uint16_t | wPowerDownTimeMs, | ||
| uint16_t | wDetectionTimeUs | ||
| ) |
Perform Low-Power-Card-Detection.
In default-mode the bPowerDownTimeMs and bDetectionTimeUs parameters are not used.
The timeout set with PHHAL_HW_CONFIG_TIMEOUT_VALUE_US or PHHAL_HW_CONFIG_TIMEOUT_VALUE_MS is always used as stop-condition.
| PH_ERR_SUCCESS | Card present. |
| PH_ERR_IO_TIMEOUT | No card found. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bMode | [In] One of the above LPCD modes. |
| [in] | bI | [In] I-Channel value in case of no card on antenna. |
| [in] | bQ | [In] Q-Channel value in case of no card on antenna. |
| [in] | wPowerDownTimeMs | [In] Power-Down time in milliseconds if power-down mode is used. |
| [in] | wDetectionTimeUs | [In] Detection time in microseconds if power-down mode is used. |
| phStatus_t phhalHw_Rc663_Cmd_LpcdConfig | ( | phhalHw_Rc663_DataParams_t * | pDataParams, |
| uint8_t * | pI, | ||
| uint8_t * | pQ | ||
| ) |
Perform Low-Power-Card-Detection Configuration Procedure.
Returns the I and Q channel values for the current antenna status. This is inteded to be used to retrieve the I and Q channel values in case of no card on antenna. The values can directly be used as parameters for the phhalHw_Rc663_Cmd_Lpcd function.
| PH_ERR_SUCCESS | Trimming successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [out] | pI | [Out] I-Channel value in case of no card on antenna. |
| [out] | pQ | [Out] Q-Channel value in case of no card on antenna. |
| phStatus_t phhalHw_Rc663_Cmd_LoadKey | ( | phhalHw_Rc663_DataParams_t * | pDataParams, |
| uint8_t * | pKey | ||
| ) |
Load a MIFARE key into the key-buffer.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | pKey | [In] 6 byte MIFARE key. |
| phStatus_t phhalHw_Rc663_Cmd_AckReq | ( | phhalHw_Rc663_DataParams_t * | pDataParams, |
| uint8_t * | pRxBuffer, | ||
| uint16_t * | wRxBufferLen | ||
| ) |
Performs a query, an Ack and a Req-Rn.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [out] | pRxBuffer | [Out]Pointer to receive output of CmdAckReq. |
| [out] | wRxBufferLen | [Out]Length of the Data read. |
| phStatus_t phhalHw_Rc663_Cmd_Receive | ( | phhalHw_Rc663_DataParams_t * | pDataParams, |
| uint16_t | wOption, | ||
| uint8_t ** | ppRxBuffer, | ||
| uint16_t * | pRxLength | ||
| ) |
Start receiver and wait until reception or timeout.
| PH_ERR_SUCCESS | Operation successful. |
| PH_ERR_IO_TIMEOUT | No response received. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wOption | [In] Option parameter. |
| [out] | ppRxBuffer | [Out] Pointer to received data. |
| [out] | pRxLength | [Out] Number of received data bytes. |
| phStatus_t phhalHw_Rc663_Cmd_Transmit | ( | phhalHw_Rc663_DataParams_t * | pDataParams, |
| uint16_t | wOption, | ||
| uint8_t * | pTxBuffer, | ||
| uint16_t | wTxLength | ||
| ) |
Transmit bytes to card without starting receiver afterwards.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wOption | [In] Option parameter. |
| [in] | pTxBuffer | [In] Data to transmit. |
| [in] | wTxLength | [In] Length of data to transmit. |
| phStatus_t phhalHw_Rc663_Cmd_WriteE2 | ( | phhalHw_Rc663_DataParams_t * | pDataParams, |
| uint16_t | wAddress, | ||
| uint8_t | bData | ||
| ) |
Write one byte of data to a given EEPROM address.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wAddress | [In] 2 byte Address; Range is 0x0000 - 0x1FFF. |
| [in] | bData | [In] Data byte to write. |
| phStatus_t phhalHw_Rc663_Cmd_WriteE2Page | ( | phhalHw_Rc663_DataParams_t * | pDataParams, |
| uint16_t | wAddress, | ||
| uint8_t * | pData, | ||
| uint8_t | bDataLen | ||
| ) |
Write a number of data bytes to a given EEPROM page.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wAddress | [In] 2 byte Address; Range is 0x0000 - 0x007F. |
| [in] | pData | [In] Pointer to data byte array. |
| [in] | bDataLen | [In] Number of data bytes to write; Range is 1 - 64. |
| phStatus_t phhalHw_Rc663_Cmd_ReadE2 | ( | phhalHw_Rc663_DataParams_t * | pDataParams, |
| uint16_t | wAddress, | ||
| uint16_t | wNumBytes, | ||
| uint8_t * | pData | ||
| ) |
Read one byte from a given EEPROM address.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wAddress | [In] 2 byte Address; Range is 0x0000 - 0x1FFF. |
| [in] | wNumBytes | [In] Number of data bytes to read; Range is 0(256) - 256. |
| [out] | pData | [Out] Requested data bytes. |
| phStatus_t phhalHw_Rc663_Cmd_LoadReg | ( | phhalHw_Rc663_DataParams_t * | pDataParams, |
| uint16_t | wEEAddress, | ||
| uint8_t | bRegAddress, | ||
| uint8_t | bNumBytes | ||
| ) |
Copies a defined number of bytes from the EEPROM into the register set, beginning at the given register address RegAdr.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | wEEAddress | [In] 2 byte EEPROM Address; Range is 0x00C0 - 0x17FF. |
| [in] | bRegAddress | [In] Register Address; Range is 0x00 - 0xFF. |
| [in] | bNumBytes | [In] Number of bytes to copy; Range is 1 - 255. |
| phStatus_t phhalHw_Rc663_Cmd_LoadProtocol | ( | phhalHw_Rc663_DataParams_t * | pDataParams, |
| uint8_t | bTxProtocol, | ||
| uint8_t | bRxProtocol | ||
| ) |
Initializes protected registers for a dedicated protocol.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bTxProtocol | [In] Tx-Protocol (see PHHAL_HW_RC663_RXTX_* defines). |
| [in] | bRxProtocol | [In] Rx-Protocol (see PHHAL_HW_RC663_RXTX_* defines). |
| phStatus_t phhalHw_Rc663_Cmd_LoadKeyE2 | ( | phhalHw_Rc663_DataParams_t * | pDataParams, |
| uint8_t | bKeyNo | ||
| ) |
Load a MIFARE key from EEPROM into the key-buffer.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bKeyNo | [In] Key number in EEPROM; Range is 0x00 - 0xFF. |
| phStatus_t phhalHw_Rc663_Cmd_StoreKeyE2 | ( | phhalHw_Rc663_DataParams_t * | pDataParams, |
| uint8_t | bKeyNo, | ||
| uint8_t * | pKeys, | ||
| uint8_t | bNumberOfKeys | ||
| ) |
Write one or more MIFARE key(s) into EEPROM.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |
| [in] | bKeyNo | [In] Key number in EEPROM; Range is 0x00 - 0xFF. |
| [in] | pKeys | [In] Pointer to MIFARE key array. |
| [in] | bNumberOfKeys | [In] Number of keys to write. |
| phStatus_t phhalHw_Rc663_Cmd_SoftReset | ( | phhalHw_Rc663_DataParams_t * | pDataParams | ) |
Performs a Softreset.
Note: It is up to the caller to wait until the IC is powered-up and ready again.
In addition to that, the caller should call phhalHw_ApplyProtocolSettings again to re-configure the IC.
| PH_ERR_SUCCESS | Operation successful. |
| Other | Depending on implementation and underlaying component. |
| [in] | pDataParams | [In] Pointer to this layer's parameter structure. |