Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
ISO-DEP
[RFAL-AL]
RFAL ISO-DEP Module. More...
Data Structures | |
| struct | rfalIsoDepRats |
| struct | rfalIsoDepAts |
| struct | rfalIsoDepPpsReq |
| struct | rfalIsoDepPpsRes |
| struct | rfalIsoDepAttribCmd |
| struct | rfalIsoDepAttribRes |
| union | rfalIsoDepActivation |
| struct | rfalIsoDepInfo |
| struct | rfalIsoDepDevice |
| struct | rfalIsoDepAttribResParam |
| struct | rfalIsoDepAtsParam |
| struct | rfalIsoDepBufFormat |
| struct | rfalIsoDepApduBufFormat |
| struct | rfalIsoDepListenActvParam |
| struct | rfalIsoDepTxRxParam |
| struct | rfalIsoDepApduTxRxParam |
Enumerations | |
| enum | rfalIsoDepFSxI { RFAL_ISODEP_FSXI_16 = 0, RFAL_ISODEP_FSXI_24 = 1, RFAL_ISODEP_FSXI_32 = 2, RFAL_ISODEP_FSXI_40 = 3, RFAL_ISODEP_FSXI_48 = 4, RFAL_ISODEP_FSXI_64 = 5, RFAL_ISODEP_FSXI_96 = 6, RFAL_ISODEP_FSXI_128 = 7, RFAL_ISODEP_FSXI_256 = 8, RFAL_ISODEP_FSXI_512 = 9, RFAL_ISODEP_FSXI_1024 = 10, RFAL_ISODEP_FSXI_2048 = 11, RFAL_ISODEP_FSXI_4096 = 12 } |
| enum | rfalIsoDepFSx { RFAL_ISODEP_FSX_16 = 16, RFAL_ISODEP_FSX_24 = 24, RFAL_ISODEP_FSX_32 = 32, RFAL_ISODEP_FSX_40 = 40, RFAL_ISODEP_FSX_48 = 48, RFAL_ISODEP_FSX_64 = 64, RFAL_ISODEP_FSX_96 = 96, RFAL_ISODEP_FSX_128 = 128, RFAL_ISODEP_FSX_256 = 256, RFAL_ISODEP_FSX_512 = 512, RFAL_ISODEP_FSX_1024 = 1024, RFAL_ISODEP_FSX_2048 = 2048, RFAL_ISODEP_FSX_4096 = 4096 } |
Functions | |
| void | rfalIsoDepInitialize (void) |
| Initialize the ISO-DEP protocol. | |
| void | rfalIsoDepInitializeWithParams (rfalComplianceMode compMode, uint8_t maxRetriesR, uint8_t maxRetriesS, uint8_t maxRetriesI, uint8_t maxRetriesRATS) |
| Initialize the ISO-DEP protocol. | |
| uint16_t | rfalIsoDepFSxI2FSx (uint8_t fsxi) |
| FSxI to FSx. | |
| uint32_t | rfalIsoDepFWI2FWT (uint8_t fwi) |
| FWI to FWT. | |
| bool | rfalIsoDepIsRats (uint8_t *buf, uint8_t bufLen) |
| Check if the buffer data contains a valid RATS command. | |
| bool | rfalIsoDepIsAttrib (uint8_t *buf, uint8_t bufLen) |
| Check if the buffer data contains a valid ATTRIB command. | |
| ReturnCode | rfalIsoDepListenStartActivation (rfalIsoDepAtsParam *atsParam, rfalIsoDepAttribResParam *attribResParam, uint8_t *buf, uint16_t bufLen, rfalIsoDepListenActvParam rxParam, SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| Start Listen Activation Handling. | |
| ReturnCode | rfalIsoDepListenGetActivationStatus (SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| Get the current Activation Status. | |
| uint16_t | rfalIsoDepGetMaxInfLen (void) |
| Get the ISO-DEP Communication Information. | |
| ReturnCode | rfalIsoDepStartTransceive (rfalIsoDepTxRxParam param) |
| ISO-DEP Start Transceive. | |
| ReturnCode | rfalIsoDepGetTransceiveStatus (SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| Get the Transceive status. | |
| ReturnCode | rfalIsoDepStartApduTransceive (rfalIsoDepApduTxRxParam param) |
| ISO-DEP Start APDU Transceive. | |
| ReturnCode | rfalIsoDepGetApduTransceiveStatus (SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| Get the APDU Transceive status. | |
| ReturnCode | rfalIsoDepRATS (rfalIsoDepFSxI FSDI, uint8_t DID, rfalIsoDepAts *ats, uint8_t *atsLen, SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| ISO-DEP Send RATS. | |
| ReturnCode | rfalIsoDepPPS (uint8_t DID, rfalBitRate DSI, rfalBitRate DRI, rfalIsoDepPpsRes *ppsRes, SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| ISO-DEP Send PPS. | |
| ReturnCode | rfalIsoDepATTRIB (uint8_t *nfcid0, uint8_t PARAM1, rfalBitRate DSI, rfalBitRate DRI, rfalIsoDepFSxI FSDI, uint8_t PARAM3, uint8_t DID, uint8_t *HLInfo, uint8_t HLInfoLen, uint32_t fwt, rfalIsoDepAttribRes *attribRes, uint8_t *attribResLen, SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| ISO-DEP Send ATTRIB. | |
| ReturnCode | rfalIsoDepDeselect (SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| Deselects PICC. | |
| ReturnCode | rfalIsoDepPollAHandleActivation (rfalIsoDepFSxI FSDI, uint8_t DID, rfalBitRate maxBR, rfalIsoDepDevice *isoDepDev, SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| ISO-DEP Poller Handle NFC-A Activation. | |
| ReturnCode | rfalIsoDepPollBHandleActivation (rfalIsoDepFSxI FSDI, uint8_t DID, rfalBitRate maxBR, uint8_t PARAM1, rfalNfcbListenDevice *nfcbDev, uint8_t *HLInfo, uint8_t HLInfoLen, rfalIsoDepDevice *isoDepDev, SPI *mspiChannel, ST25R3911 *mST25, DigitalOut *gpio_cs, InterruptIn *IRQ, DigitalOut *fieldLED_01, DigitalOut *fieldLED_02, DigitalOut *fieldLED_03, DigitalOut *fieldLED_04, DigitalOut *fieldLED_05, DigitalOut *fieldLED_06) |
| ISO-DEP Poller Handle NFC-B Activation. | |
Detailed Description
RFAL ISO-DEP Module.
Enumeration Type Documentation
| enum rfalIsoDepFSx |
Frame Size for Proximity Card definitions
- Enumerator:
Definition at line 152 of file rfal_isoDep.h.
| enum rfalIsoDepFSxI |
Frame Size for Proximity Card Integer definitions
- Enumerator:
Definition at line 134 of file rfal_isoDep.h.
Function Documentation
| ReturnCode rfalIsoDepATTRIB | ( | uint8_t * | nfcid0, |
| uint8_t | PARAM1, | ||
| rfalBitRate | DSI, | ||
| rfalBitRate | DRI, | ||
| rfalIsoDepFSxI | FSDI, | ||
| uint8_t | PARAM3, | ||
| uint8_t | DID, | ||
| uint8_t * | HLInfo, | ||
| uint8_t | HLInfoLen, | ||
| uint32_t | fwt, | ||
| rfalIsoDepAttribRes * | attribRes, | ||
| uint8_t * | attribResLen, | ||
| SPI * | mspiChannel, | ||
| ST25R3911 * | mST25, | ||
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
ISO-DEP Send ATTRIB.
This sends a ATTRIB to make a NFC-B Listen Device to enter ISO-DEP layer (ISO14443-4) and checks if the received ATTRIB Response is valid
- Parameters:
-
[in] nfcid0 : NFCID0 to be used for the ATTRIB [in] PARAM1 : ATTRIB PARAM1 byte (communication parameters) [in] DSI : DSI code the divisor from Listener (PICC) to Poller (PCD) [in] DRI : DRI code the divisor from Poller (PCD) to Listener (PICC) [in] FSDI : PCD's Frame Size to be announced on the ATTRIB [in] PARAM3 : ATTRIB PARAM1 byte (protocol type) [in] DID : Device ID to be used or RFAL_ISODEP_NO_DID for not use DID [in] HLInfo : pointer to Higher layer INF (NULL if none) [in] HLInfoLen : Length HLInfo [in] fwt : Frame Waiting Time to be used (from SENSB_RES) [out] attribRes : pointer to place the ATTRIB Response [out] attribResLen : pointer to place the ATTRIB Response length
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or incorrect mode
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_TIMEOUT : Timeout error
- ERR_CRC : CRC error detected
- ERR_FRAMING : Framing error detected
- ERR_PROTO : Protocol error detected
- ERR_NONE : No error, ATTRIB Response received
Definition at line 1820 of file rfal_isoDep.cpp.
| ReturnCode rfalIsoDepDeselect | ( | SPI * | mspiChannel, |
| ST25R3911 * | mST25, | ||
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
Deselects PICC.
This function sends a deselect command to PICC and waits for it`s responce in a blocking way
- Returns:
- ERR_NONE : Deselect successfully sent and acknowledged by PICC
- ERR_TIMEOUT: No response rcvd from PICC
Definition at line 925 of file rfal_isoDep.cpp.
| uint16_t rfalIsoDepFSxI2FSx | ( | uint8_t | fsxi ) |
FSxI to FSx.
Convert Frame Size for proximity coupling Device Integer (FSxI) to Frame Size for proximity coupling Device (FSx)
FSD - maximum frame size for NFC Forum Device in Poll Mode FSC - maximum frame size for NFC Forum Device in Listen Mode
FSxI = FSDI or FSCI FSx = FSD or FSC
The FSD/FSC value includes the header and CRC
- Parameters:
-
[in] fsxi : Frame Size for proximity coupling Device Integer
- Returns:
- fsx : Frame Size for proximity coupling Device (FSD or FSC)
Definition at line 988 of file rfal_isoDep.cpp.
| uint32_t rfalIsoDepFWI2FWT | ( | uint8_t | fwi ) |
FWI to FWT.
Convert Frame Waiting time Integer (FWI) to Frame Waiting Time (FWT) in 1/fc units
- Parameters:
-
[in] fwi : Frame Waiting time Integer
- Returns:
- fwt : Frame Waiting Time in 1/fc units
Definition at line 965 of file rfal_isoDep.cpp.
| ReturnCode rfalIsoDepGetApduTransceiveStatus | ( | SPI * | mspiChannel, |
| ST25R3911 * | mST25, | ||
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
Get the APDU Transceive status.
- Returns:
- ERR_NONE : if Transceive has been completed successfully
- ERR_BUSY : if Transceive is ongoing
- ERR_PROTO : if a protocol error occurred
- ERR_TIMEOUT : if a timeout error occurred
- ERR_SLEEP_REQ : if Deselect is received and responded
- ERR_NOMEM : if the received INF does not fit into the receive buffer
- ERR_LINK_LOSS : if communication is lost because Reader/Writer has turned off its field
Definition at line 2220 of file rfal_isoDep.cpp.
| uint16_t rfalIsoDepGetMaxInfLen | ( | void | ) |
Get the ISO-DEP Communication Information.
Gets the maximum INF length in bytes based on current Frame Size for proximity coupling Device (FSD or FSC) excluding the header and CRC
- Returns:
- maximum INF length in bytes
Definition at line 1343 of file rfal_isoDep.cpp.
| ReturnCode rfalIsoDepGetTransceiveStatus | ( | SPI * | mspiChannel, |
| ST25R3911 * | mST25, | ||
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
Get the Transceive status.
Returns the status of the ISO-DEP Transceive
- Warning:
- When the other device is performing chaining once a chained block is received the error ERR_AGAIN is sent. At this point caller must handle the received data immediately. When ERR_AGAIN is returned an ACK has already been sent to the other device and the next block might be incoming. If rfalWorker() is called frequently it will place the next block on the given buffer
- Returns:
- ERR_NONE : Transceive has been completed successfully
- ERR_BUSY : Transceive is ongoing
- ERR_PROTO : Protocol error occurred
- ERR_TIMEOUT : Timeout error occurred
- ERR_SLEEP_REQ : Deselect has been received and responded
- ERR_NOMEM : The received INF does not fit into the receive buffer
- ERR_LINK_LOSS : Communication is lost because Reader/Writer has turned off its field
- ERR_AGAIN : received one chaining block, continue to call this method to retrieve the remaining blocks
Definition at line 1411 of file rfal_isoDep.cpp.
| void rfalIsoDepInitialize | ( | void | ) |
Initialize the ISO-DEP protocol.
Initialize the ISO-DEP protocol layer with default config
Definition at line 598 of file rfal_isoDep.cpp.
| void rfalIsoDepInitializeWithParams | ( | rfalComplianceMode | compMode, |
| uint8_t | maxRetriesR, | ||
| uint8_t | maxRetriesS, | ||
| uint8_t | maxRetriesI, | ||
| uint8_t | maxRetriesRATS | ||
| ) |
Initialize the ISO-DEP protocol.
Initialize the ISO-DEP protocol layer with additional parameters allowing to customise the protocol layer for specific behaviours
- Parameters:
-
[in] compMode : compliance mode to be performed [in] maxRetriesR : Number of retries for a R-Block [in] maxRetriesS : Number of retries for a S-Block [in] maxRetriesI : Number of retries for a I-Block [in] maxRetriesRATS : Number of retries for RATS
Definition at line 630 of file rfal_isoDep.cpp.
| bool rfalIsoDepIsAttrib | ( | uint8_t * | buf, |
| uint8_t | bufLen | ||
| ) |
Check if the buffer data contains a valid ATTRIB command.
Check if it is a well formed ATTRIB command, but does not check the validity of the information inside
- Parameters:
-
[in] buf : reference to buffer containing the data to be checked [in] bufLen : length of data in the buffer in bytes
- Returns:
- true if the data indicates a ATTRIB command; false otherwise
Definition at line 1046 of file rfal_isoDep.cpp.
| bool rfalIsoDepIsRats | ( | uint8_t * | buf, |
| uint8_t | bufLen | ||
| ) |
Check if the buffer data contains a valid RATS command.
Check if it is a well formed RATS command with 2 bytes This function does not check the validity of FSDI and DID
- Parameters:
-
[in] buf : reference to buffer containing the data to be checked [in] bufLen : length of data in the buffer in bytes
- Returns:
- true if the data indicates a RATS command; false otherwise
Definition at line 1032 of file rfal_isoDep.cpp.
| ReturnCode rfalIsoDepListenGetActivationStatus | ( | SPI * | mspiChannel, |
| ST25R3911 * | mST25, | ||
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
Get the current Activation Status.
- Returns:
- ERR_NONE if Activation is already completed
- ERR_BUSY if Activation is ongoing
- ERR_LINK_LOSS if Remote Field is turned off
Definition at line 1195 of file rfal_isoDep.cpp.
| ReturnCode rfalIsoDepListenStartActivation | ( | rfalIsoDepAtsParam * | atsParam, |
| rfalIsoDepAttribResParam * | attribResParam, | ||
| uint8_t * | buf, | ||
| uint16_t | bufLen, | ||
| rfalIsoDepListenActvParam | rxParam, | ||
| SPI * | mspiChannel, | ||
| ST25R3911 * | mST25, | ||
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
Start Listen Activation Handling.
Start Listen Activation Handling and setup to receive first I-block which may contain complete or partial APDU after activation is completed
Pass in RATS for T4AT, or ATTRIB for T4BT, to handle ATS or ATTRIB Response respectively The Activation Handling handles ATS and ATTRIB Response; and additionally PPS Response if a PPS is received for T4AT. The method uses the current RFAL state machine to determine if it is expecting RATS or ATTRIB
Activation is completed if PPS Response is sent or if first PDU is received in T4T-A Activation is completed if ATTRIB Response is sent in T4T-B
rfalIsoDepListenGetActivationStatus provide status if activation is completed. rfalIsoDepStartTransceive shall be called right after activation is completed
- Parameters:
-
[in] atsParam : reference to ATS parameters [in] attribResParam : reference to ATTRIB_RES parameters [in] buf : reference to buffer containing RATS or ATTRIB [in] bufLen : length in bytes of the given bufffer [in] rxParam : reference to incoming reception information will be placed
- Warning:
- Once the Activation has been completed the method rfalIsoDepGetTransceiveStatus() must be called. If activation has completed due to reception of a data block (not PPS) the buffer owned by the caller and passed on rxParam must still contain this data. The first data will be processed (I-Block or S-DSL) by rfalIsoDepGetTransceiveStatus() inform the caller and then for the next transaction use rfalIsoDepStartTransceive()
- Returns:
- ERR_NONE : RATS/ATTRIB is valid and activation has started
- ERR_PARAM : Invalid parameters
- ERR_PROTO : Invalid request
- ERR_NOTSUPP : Feature not supported
Definition at line 1061 of file rfal_isoDep.cpp.
| ReturnCode rfalIsoDepPollAHandleActivation | ( | rfalIsoDepFSxI | FSDI, |
| uint8_t | DID, | ||
| rfalBitRate | maxBR, | ||
| rfalIsoDepDevice * | isoDepDev, | ||
| SPI * | mspiChannel, | ||
| ST25R3911 * | mST25, | ||
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
ISO-DEP Poller Handle NFC-A Activation.
This performs a NFC-A Activation into ISO-DEP layer (ISO14443-4) with the given parameters. It sends RATS and if the higher bit rates are supported by both devices it additionally sends PPS Once Activated all details of the device are provided on isoDepDev
- Parameters:
-
[in] FSDI : Frame Size Device Integer to be used [in] DID : Device ID to be used or RFAL_ISODEP_NO_DID for not use DID [in] maxBR : Max bit rate supported by the Poller [out] isoDepDev : ISO-DEP information of the activated Listen device
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or incorrect mode
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_TIMEOUT : Timeout error
- ERR_PAR : Parity error detected
- ERR_CRC : CRC error detected
- ERR_FRAMING : Framing error detected
- ERR_PROTO : Protocol error detected
- ERR_NONE : No error, activation successful
Definition at line 1865 of file rfal_isoDep.cpp.
| ReturnCode rfalIsoDepPollBHandleActivation | ( | rfalIsoDepFSxI | FSDI, |
| uint8_t | DID, | ||
| rfalBitRate | maxBR, | ||
| uint8_t | PARAM1, | ||
| rfalNfcbListenDevice * | nfcbDev, | ||
| uint8_t * | HLInfo, | ||
| uint8_t | HLInfoLen, | ||
| rfalIsoDepDevice * | isoDepDev, | ||
| SPI * | mspiChannel, | ||
| ST25R3911 * | mST25, | ||
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
ISO-DEP Poller Handle NFC-B Activation.
This performs a NFC-B Activation into ISO-DEP layer (ISO14443-4) with the given parameters. It sends ATTRIB and calculates supported higher bit rates of both devices and performs activation. Once Activated all details of the device are provided on isoDepDev
- Parameters:
-
[in] FSDI : Frame Size Device Integer to be used [in] DID : Device ID to be used or RFAL_ISODEP_NO_DID for not use DID [in] maxBR : Max bit rate supported by the Poller [in] PARAM1 : ATTRIB PARAM1 byte (communication parameters) [in] nfcbDev : pointer to the NFC-B Device containing the SENSB_RES [in] HLInfo : pointer to Higher layer INF (NULL if none) [in] HLInfoLen : Length HLInfo [out] isoDepDev : ISO-DEP information of the activated Listen device
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or incorrect mode
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_TIMEOUT : Timeout error
- ERR_PAR : Parity error detected
- ERR_CRC : CRC error detected
- ERR_FRAMING : Framing error detected
- ERR_PROTO : Protocol error detected
- ERR_NONE : No error, activation successful
Definition at line 2004 of file rfal_isoDep.cpp.
| ReturnCode rfalIsoDepPPS | ( | uint8_t | DID, |
| rfalBitRate | DSI, | ||
| rfalBitRate | DRI, | ||
| rfalIsoDepPpsRes * | ppsRes, | ||
| SPI * | mspiChannel, | ||
| ST25R3911 * | mST25, | ||
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
ISO-DEP Send PPS.
This sends a PPS to make a NFC-A Listen Device change the communications bit rate from 106kbps to one of the supported bit rates Additionally checks if the received PPS response is valid
- Parameters:
-
[in] DID : Device ID [in] DSI : DSI code the divisor from Listener (PICC) to Poller (PCD) [in] DRI : DRI code the divisor from Poller (PCD) to Listener (PICC) [out] ppsRes : pointer to place the PPS Response
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or incorrect mode
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_TIMEOUT : Timeout error
- ERR_PAR : Parity error detected
- ERR_CRC : CRC error detected
- ERR_FRAMING : Framing error detected
- ERR_PROTO : Protocol error detected
- ERR_NONE : No error, PPS Response received
Definition at line 1788 of file rfal_isoDep.cpp.
| ReturnCode rfalIsoDepRATS | ( | rfalIsoDepFSxI | FSDI, |
| uint8_t | DID, | ||
| rfalIsoDepAts * | ats, | ||
| uint8_t * | atsLen, | ||
| SPI * | mspiChannel, | ||
| ST25R3911 * | mST25, | ||
| DigitalOut * | gpio_cs, | ||
| InterruptIn * | IRQ, | ||
| DigitalOut * | fieldLED_01, | ||
| DigitalOut * | fieldLED_02, | ||
| DigitalOut * | fieldLED_03, | ||
| DigitalOut * | fieldLED_04, | ||
| DigitalOut * | fieldLED_05, | ||
| DigitalOut * | fieldLED_06 | ||
| ) |
ISO-DEP Send RATS.
This sends a RATS to make a NFC-A Listen Device to enter ISO-DEP layer (ISO14443-4) and checks if the received ATS is valid
- Parameters:
-
[in] FSDI : Frame Size Device Integer to be used [in] DID : Device ID to be used or RFAL_ISODEP_NO_DID for not use DID [out] ats : pointer to place the ATS Response [out] atsLen : pointer to place the ATS length
- Returns:
- ERR_WRONG_STATE : RFAL not initialized or incorrect mode
- ERR_PARAM : Invalid parameters
- ERR_IO : Generic internal error
- ERR_TIMEOUT : Timeout error
- ERR_PAR : Parity error detected
- ERR_CRC : CRC error detected
- ERR_FRAMING : Framing error detected
- ERR_PROTO : Protocol error detected
- ERR_NONE : No error, ATS received
Definition at line 1747 of file rfal_isoDep.cpp.
| ReturnCode rfalIsoDepStartApduTransceive | ( | rfalIsoDepApduTxRxParam | param ) |
ISO-DEP Start APDU Transceive.
This method triggers a ISO-DEP Transceive containing a complete APDU It transmits the given message and handles all protocol retransmitions, error handling and control messages
The txBuf contains a complete APDU to be transmitted The Prologue field will be manipulated by the Transceive
- Warning:
- the txBuf will be modified during the transmission
- the maximum RF frame which can be received is limited by param.tmpBuf
- Parameters:
-
[in] param,: reference parameters to be used for the Transceive
- Returns:
- ERR_PARAM : Bad request
- ERR_WRONG_STATE : The module is not in a proper state
- ERR_NONE : The Transceive request has been started
Definition at line 2199 of file rfal_isoDep.cpp.
| ReturnCode rfalIsoDepStartTransceive | ( | rfalIsoDepTxRxParam | param ) |
ISO-DEP Start Transceive.
This method triggers a ISO-DEP Transceive containing a complete or partial APDU It transmits the given message and handles all protocol retransmitions, error handling and control messages
The txBuf contains a complete or partial APDU (INF) to be transmitted The Prologue field will be manipulated by the Transceive
If the buffer contains a partial APDU and is not the last block, then isTxChaining must be set to true
- Parameters:
-
[in] param,: reference parameters to be used for the Transceive
- Returns:
- ERR_PARAM : Bad request
- ERR_WRONG_STATE : The module is not in a proper state
- ERR_NONE : The Transceive request has been started
Definition at line 1356 of file rfal_isoDep.cpp.
Generated on Fri Jul 15 2022 06:42:12 by
1.7.2