This component implements the PICC side of ISO/IEC 14443-4 Protocol.
More...
|
phStatus_t | phpalI14443p4mC_ResetProtocol (void *pDataParams) |
| Reset protocol parameters. More...
|
|
phStatus_t | phpalI14443p4mC_Activate (void *pDataParams, uint8_t *pRats, uint8_t bRatsLength, uint8_t *pAts, uint16_t wAtsLength) |
| Validates received RATS request and send ATS response. More...
|
|
phStatus_t | phpalI14443p4mC_Receive (void *pDataParams, uint16_t wOption, uint8_t **ppRxBuffer, uint16_t *pRxLength) |
| Perform receive operation and validate received block. More...
|
|
phStatus_t | phpalI14443p4mC_Transmit (void *pDataParams, uint16_t wOption, uint8_t *pTxBuffer, uint16_t wTxLength) |
| Transmit I-Block block. More...
|
|
phStatus_t | phpalI14443p4mC_Wtx (void *pDataParams) |
| Sends WTX request and receive WTX response. More...
|
|
phStatus_t | phpalI14443p4mC_SetConfig (void *pDataParams, uint16_t wConfig, uint16_t wValue) |
| Set configuration parameter. More...
|
|
phStatus_t | phpalI14443p4mC_GetConfig (void *pDataParams, uint16_t wConfig, uint16_t *pValue) |
| Get configuration parameter. More...
|
|
This component implements the PICC side of ISO/IEC 14443-4 Protocol.
§ PHPAL_I14443P4MC_106
#define PHPAL_I14443P4MC_106 0x00 |
Set communication speed to 106 kbs.
§ PHPAL_I14443P4MC_212
#define PHPAL_I14443P4MC_212 0x01 |
Set communication speed to 212 kbs.
§ PHPAL_I14443P4MC_424
#define PHPAL_I14443P4MC_424 0x02 |
Set communication speed to 424 kbs.
§ PHPAL_I14443P4MC_848
#define PHPAL_I14443P4MC_848 0x04 |
Set communication speed to 848 kbs.
§ PHPAL_I14443P4MC_STATE_NONE
#define PHPAL_I14443P4MC_STATE_NONE 0x00U |
§ PHPAL_I14443P4MC_STATE_ATS
#define PHPAL_I14443P4MC_STATE_ATS 0x01U |
State once we send successful ATS for RATS.
§ PHPAL_I14443P4MC_STATE_PPS
#define PHPAL_I14443P4MC_STATE_PPS 0x02U |
State once we receive PPS Request.
§ PHPAL_I14443P4MC_STATE_RX
#define PHPAL_I14443P4MC_STATE_RX 0x03U |
Internal State once we are in Receive State.
§ PHPAL_I14443P4MC_STATE_TX_I
#define PHPAL_I14443P4MC_STATE_TX_I 0x04U |
State once we have received successful I (Information) Block.
§ PHPAL_I14443P4MC_STATE_TX_R
#define PHPAL_I14443P4MC_STATE_TX_R 0x05U |
State once we have received R Block.
§ PHPAL_I14443P4MC_STATE_WTX
#define PHPAL_I14443P4MC_STATE_WTX 0x07U |
State once we have received S Block (WTX).
§ PHPAL_I14443P4MC_STATE_DESELECT
#define PHPAL_I14443P4MC_STATE_DESELECT 0x08U |
State once we have received S Block (DESELECT).
§ PHPAL_I14443P4MC_STATE_PARAMETERS
#define PHPAL_I14443P4MC_STATE_PARAMETERS 0x09U |
State once we have received S Block (PARAMETERS).
§ PHPAL_I14443P4MC_STATE_RESEND
#define PHPAL_I14443P4MC_STATE_RESEND 0x0AU |
State to handle errors, like in case of NAK.
§ PHPAL_I14443P4MC_STATE_RXCHAINING
#define PHPAL_I14443P4MC_STATE_RXCHAINING 0x0BU |
State to handle RX Data Chaining.
§ PHPAL_I14443P4MC_STATE_TXCHAINING
#define PHPAL_I14443P4MC_STATE_TXCHAINING 0x0CU |
State to handle TX Data Chaining.
§ PHPAL_I14443P4MC_CONFIG_WTX
#define PHPAL_I14443P4MC_CONFIG_WTX 0x0000U |
Enable/Disable WTX feature.
§ PHPAL_I14443P4MC_CONFIG_WTX_VALUE
#define PHPAL_I14443P4MC_CONFIG_WTX_VALUE 0x0001U |
§ PHPAL_I14443P4MC_CONFIG_BLOCKNO
#define PHPAL_I14443P4MC_CONFIG_BLOCKNO 0x0002U |
Get the value of current ISO14443-4 protocol block number.
§ PHPAL_I14443P4MC_CONFIG_FSDI
#define PHPAL_I14443P4MC_CONFIG_FSDI 0x0003U |
§ PHPAL_I14443P4MC_CONFIG_MODE
#define PHPAL_I14443P4MC_CONFIG_MODE 0x0004U |
§ PHPAL_I14443P4MC_CONFIG_FSD
#define PHPAL_I14443P4MC_CONFIG_FSD 0x0005U |
Get the current frame size (FSD) value.
§ PHPAL_I14443P4MC_CONFIG_WT_PERCENTAGE
#define PHPAL_I14443P4MC_CONFIG_WT_PERCENTAGE 0x0006U |
Set/Get the percentage of actual time to be used in WTX timer.
§ PHPAL_I14443P4MC_CONFIG_WT_DELTA
#define PHPAL_I14443P4MC_CONFIG_WT_DELTA 0x0007U |
Set/Get the delta time to be subtracted from the time in WTX timer.
§ PHPAL_I14443P4MC_CONFIG_CID_PRESENCE
#define PHPAL_I14443P4MC_CONFIG_CID_PRESENCE 0x0008U |
Check if CID is present in current received block.
1 - Present; 0 - Not present.
§ PHPAL_I14443P4MC_CONFIG_NAD_PRESENCE
#define PHPAL_I14443P4MC_CONFIG_NAD_PRESENCE 0x0009U |
Check if NAD is present in current received I-block.
1 - Present; 0 - Not present.
§ phpalI14443p4mC_ResetProtocol()
phStatus_t phpalI14443p4mC_ResetProtocol |
( |
void * |
pDataParams | ) |
|
Reset protocol parameters.
Removes any state information stored in previous runs.
- Returns
- Status code
- Return values
-
- Parameters
-
[in] | pDataParams | Pointer to this layer's parameter structure. |
§ phpalI14443p4mC_Activate()
Validates received RATS request and send ATS response.
The user has to call phpalI14443p4mC_Receive() once this function has returned with success status.
- Returns
- Status code
- Return values
-
- Parameters
-
[in] | pDataParams | Pointer to this layer's parameter structure |
[in] | pRats | Pointer to received RATS request |
[in] | bRatsLength | RATS Length |
[in] | pAts | ATS to be sent |
[in] | wAtsLength | ATS length |
§ phpalI14443p4mC_Receive()
phStatus_t phpalI14443p4mC_Receive |
( |
void * |
pDataParams, |
|
|
uint16_t |
wOption, |
|
|
uint8_t ** |
ppRxBuffer, |
|
|
uint16_t * |
pRxLength |
|
) |
| |
Perform receive operation and validate received block.
Used to receive the next command from PCD after the Activate() is successful. Responses to S-block and R-Block are sent internally. Response to I-Block can be sent using phpalI14443p4mC_Transmit. This function also handles PPS request sent from the reader by sending a PPS response. An I-Frame received from the reader is returned back to the user. Handles DESELECT by sending DESELECT response Starts WTx timer before returning with the valid received packet to the caller
wOption
can be one of:
- Returns
- Status code
- Return values
-
- Parameters
-
[in] | pDataParams | Pointer to this layer's parameter structure. |
[in] | wOption | Option parameter. |
[out] | ppRxBuffer | Pointer to received data. |
[out] | pRxLength | Number of received data bytes. |
§ phpalI14443p4mC_Transmit()
phStatus_t phpalI14443p4mC_Transmit |
( |
void * |
pDataParams, |
|
|
uint16_t |
wOption, |
|
|
uint8_t * |
pTxBuffer, |
|
|
uint16_t |
wTxLength |
|
) |
| |
Transmit I-Block block.
This function transmits an information block. Stops the WTx timer if it is running.
wOption
can be one of:
- Returns
- Status code
- Return values
-
- Parameters
-
[in] | pDataParams | Pointer to this layer's parameter structure. |
[in] | wOption | Option parameter. |
[in] | pTxBuffer | I-Block data to transmit. |
[in] | wTxLength | Length of data to transmit. |
§ phpalI14443p4mC_Wtx()
phStatus_t phpalI14443p4mC_Wtx |
( |
void * |
pDataParams | ) |
|
Sends WTX request and receive WTX response.
Wait time extension request is sent by this function and this will block till it receives a response from the external reader.
- Returns
- Status code
- Return values
-
- Parameters
-
[in] | pDataParams | Pointer to this layer's parameter structure |
§ phpalI14443p4mC_SetConfig()
phStatus_t phpalI14443p4mC_SetConfig |
( |
void * |
pDataParams, |
|
|
uint16_t |
wConfig, |
|
|
uint16_t |
wValue |
|
) |
| |
Set configuration parameter.
- Returns
- Status code
- Return values
-
- Parameters
-
[in] | pDataParams | Pointer to this layer's parameter structure. |
[in] | wConfig | Configuration identifier. |
[in] | wValue | Configuration value. |
§ phpalI14443p4mC_GetConfig()
phStatus_t phpalI14443p4mC_GetConfig |
( |
void * |
pDataParams, |
|
|
uint16_t |
wConfig, |
|
|
uint16_t * |
pValue |
|
) |
| |
Get configuration parameter.
- Returns
- Status code
- Return values
-
- Parameters
-
[in] | pDataParams | Pointer to this layer's parameter structure. |
[in] | wConfig | Configuration identifier. |
[out] | pValue | Configuration value. |