NXP NFC Reader Library  v4.040.05.011646

These Components implement the Felica commands. More...

Collaboration diagram for Felica:

Modules

 Component : Software
 

Functions

phStatus_t phalFelica_RequestResponse (void *pDataParams, uint8_t *pMode)
 When receiving the RequestResponse command, the VICC shall respond. More...
 
phStatus_t phalFelica_RequestService (void *pDataParams, uint8_t bTxNumServices, uint8_t *pTxServiceList, uint8_t *pRxNumServices, uint8_t *pRxServiceList)
 When receiving the RequestService command, the VICC shall respond. More...
 
phStatus_t phalFelica_Read (void *pDataParams, uint8_t bNumServices, uint8_t *pServiceList, uint8_t bTxNumBlocks, uint8_t *pBlockList, uint8_t bBlockListLength, uint8_t *pRxNumBlocks, uint8_t *pBlockData)
 When receiving the Read command, the VICC shall respond. More...
 
phStatus_t phalFelica_Write (void *pDataParams, uint8_t bNumServices, uint8_t *pServiceList, uint8_t bNumBlocks, uint8_t *pBlockList, uint8_t bBlockListLength, uint8_t *pBlockData)
 When receiving the Write command, the VICC shall respond. More...
 
phStatus_t phalFelica_GetConfig (void *pDataParams, uint16_t wConfig, uint16_t *pValue)
 Perform a GetConfig command. More...
 
phStatus_t phalFelica_ActivateCard (void *pDataParams, uint8_t *pSystemCode, uint8_t bNumTimeSlots, uint8_t *pRxBuffer, uint8_t *pRxLength, uint8_t *pMoreCardsAvailable)
 This command activates a Felica card. More...
 

Felica constant definitions

#define PHAL_FELICA_CONFIG_ADD_INFO   0x0000U
 Set or get the additional info word. More...
 

FELICA error codes

#define PHAL_FELICA_ERR_FELICA   (PH_ERR_CUSTOM_BEGIN+0)
 General Felica error. More...
 

Misc. Defines

#define PHAL_FELICA_MAX_SERVICES   121U
 Maximum number of services. More...
 

Detailed Description

These Components implement the Felica commands.

Macro Definition Documentation

§ PHAL_FELICA_CONFIG_ADD_INFO

#define PHAL_FELICA_CONFIG_ADD_INFO   0x0000U

Set or get the additional info word.

§ PHAL_FELICA_ERR_FELICA

#define PHAL_FELICA_ERR_FELICA   (PH_ERR_CUSTOM_BEGIN+0)

General Felica error.

§ PHAL_FELICA_MAX_SERVICES

#define PHAL_FELICA_MAX_SERVICES   121U

Maximum number of services.

Function Documentation

§ phalFelica_RequestResponse()

phStatus_t phalFelica_RequestResponse ( void *  pDataParams,
uint8_t pMode 
)

When receiving the RequestResponse command, the VICC shall respond.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layers parameter structure.
[out]pModeCurrent Card Mode. (0, 1, 2).

§ phalFelica_RequestService()

phStatus_t phalFelica_RequestService ( void *  pDataParams,
uint8_t  bTxNumServices,
uint8_t pTxServiceList,
uint8_t pRxNumServices,
uint8_t pRxServiceList 
)

When receiving the RequestService command, the VICC shall respond.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layers parameter structure.
[in]bTxNumServicesNumber of services or areas within the command message.
[in]pTxServiceListService code or area code list within the command message.
[out]pRxNumServicesNumber of received services or areas.
[out]pRxServiceListReceived Service Key version or area version list, max 64 bytes.

§ phalFelica_Read()

phStatus_t phalFelica_Read ( void *  pDataParams,
uint8_t  bNumServices,
uint8_t pServiceList,
uint8_t  bTxNumBlocks,
uint8_t pBlockList,
uint8_t  bBlockListLength,
uint8_t pRxNumBlocks,
uint8_t pBlockData 
)

When receiving the Read command, the VICC shall respond.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layers parameter structure.
[in]bNumServicesNumber of Services.
[in]pServiceListList of Services.
[in]bTxNumBlocksNumber of Blocks to send.
[in]pBlockListList of Blocks to read.
[in]bBlockListLengthNumber of Blocks to read.
[out]pRxNumBlocksNumber of received blocks.
[out]pBlockDataReceived Block data.

§ phalFelica_Write()

phStatus_t phalFelica_Write ( void *  pDataParams,
uint8_t  bNumServices,
uint8_t pServiceList,
uint8_t  bNumBlocks,
uint8_t pBlockList,
uint8_t  bBlockListLength,
uint8_t pBlockData 
)

When receiving the Write command, the VICC shall respond.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layers parameter structure.
[in]bNumServicesNumber of Services.
[in]pServiceListList of Services.
[in]bNumBlocksNumber of Blocks to send.
[in]pBlockListList of Blocks to write.
[in]bBlockListLengthNumber of Blocks to write.
[in]pBlockDataBlock data to write.

§ phalFelica_GetConfig()

phStatus_t phalFelica_GetConfig ( void *  pDataParams,
uint16_t  wConfig,
uint16_t pValue 
)

Perform a GetConfig command.

wConfig can be one of:

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
PH_ERR_PROTOCOL_ERRORInvalid response received.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layers parameter structure.
[in]wConfigConfiguration Identifier.
[out]pValueConfiguration Value.

§ phalFelica_ActivateCard()

phStatus_t phalFelica_ActivateCard ( void *  pDataParams,
uint8_t pSystemCode,
uint8_t  bNumTimeSlots,
uint8_t pRxBuffer,
uint8_t pRxLength,
uint8_t pMoreCardsAvailable 
)

This command activates a Felica card.

Note: SystemCode 0xFFFF is passed to poll for all Felica Tags irrespective of the SystemCode. If SystemCode is specified then only corresponding Tag will be Polled and Activated.

Returns
Status code
Return values
PH_ERR_SUCCESSOperation successful.
OtherDepending on implementation and underlying component.
Parameters
[in]pDataParamsPointer to this layer's parameter structure.
[in]pSystemCodeSystem-Code; uint8_t[2].
[in]bNumTimeSlotsNumber of timeslots to use. Refer to e.g. PHPAL_FELICA_NUMSLOTS_1 for valid values.
[out]pRxBuffer8 bytes NFCID2 + 8 bytes PAD; uint8_t[16].
[out]pRxLengthLength of received data. 0 or 16.
[out]pMoreCardsAvailableWhether there are more cards in the field or not; uint8_t.