User manual

NXP Semiconductors
UM10663
NXP Reader Library User Manual
UM10663
All information provided in this document is subject to legal disclaimers.
© NXP B.V. 2013. All rights reserved.
User Manual
COMPANY PUBLIC
Rev. 1.224 July 2013
257412
18 of 47
PH_ERR_SUCCESS
- operation successful.
Note: This function configures same communication protocol for both receiver and
transmitter as well. If developer needs for any purpose to run them on different protocols
concurrently, in this case it is necessary to do it via direct calling of lower layer function
phhalHw_Rc663_Cmd_LoadProtocol()
- software equivalent of native Load Protocol
command. But be careful about using this function, because it does not provide
necessary timer configurations.
returnValues:
PH_ERR_INVALID_PARAMETER
attempt to access EEPROM address out of section 2 or
register address out of 0 128.
PH_ERR_READ_WRITE_ERROR
error occurred during writing data into EEPROM
PH_ERR_SUCCESS
- operation successful.
Other: depending on implementation and underlaying component.
2.1.14 StoreKeyE2
- phKeyStore_SetKey()
This function writes a given key to Firstly, a given key is passed to the FIFO and
subsequently written to specified position in EEPROM. Unlike CLRC663 native
SetKeyE2 command, this function stores just 2 keys into reader’s key storage area. If an
incomplete key (less than 6 bytes) is passed to this function, that key is not stored into
the EEPROM.
phStatus_t phKeyStore_SetKey(
void * pDataParams, [In]
uint16_t wKeyNo, [In]
uint16_t wKeyVersion, [In]
uint16_t wKeyType, [In]
uint8_t pNewKey, [Out]
uint16_t wNewKeyVersion ); [Out]
*pDataParams: pointer to the HAL layer data parameter structure.
wKeyNo: indicates the first key in MIFARE key area (up to 128) that will be written. In
other words number of section that key is matched to.
wKeyVersion: is key version of the key to be loaded. Parameter has no effect.
wKeyType: is key type of the key to be loaded. Only
PH_KEYSTORE_TYPE_MIFARE
is
supported.
*pNewKey: is pointer to the new key to be stored in EEPROM.
wNewKeyVersion: is new key version of the key to be updated. Parameter has no
effect.
returnValues:
PH_ERR_READ_WRITE_ERROR
unsuccessful writing the key into EEPROM. If writing not
finished after time defined by
PH_KEYSTORE_RC663_EEP_WR_TO_MS
in phKeyStore_Rc663_Int.h then function stops command
executing and returns this error.
- error from write into EEPROM