NDEF operations layer.
More...
#include <ndef_layer.hpp>
|
|
bool | read_capability_container_type4_iso7816 (m5::nfc::ndef::type4::CapabilityContainer &cc) |
| |
|
bool | read_capability_container_type4_desfire (m5::nfc::ndef::type4::CapabilityContainer &cc) |
| |
|
bool | read_type2 (std::vector< m5::nfc::ndef::TLV > &tlvs, const m5::nfc::ndef::TagBits tagBits) |
| |
|
bool | read_type3 (m5::nfc::ndef::TLV &tlv) |
| |
|
bool | read_type4 (std::vector< m5::nfc::ndef::TLV > &tlvs, const m5::nfc::ndef::type4::FileControlTagBits fcBits) |
| |
|
bool | read_type4_iso7816 (std::vector< m5::nfc::ndef::TLV > &tlvs, const m5::nfc::ndef::type4::FileControlTagBits fcBits) |
| |
|
bool | read_type4_desfire (std::vector< m5::nfc::ndef::TLV > &tlvs, const m5::nfc::ndef::type4::FileControlTagBits fcBits) |
| |
|
bool | read_type5 (std::vector< m5::nfc::ndef::TLV > &tlvs, const m5::nfc::ndef::TagBits tagBits) |
| |
|
bool | write_type2 (const std::vector< m5::nfc::ndef::TLV > &tlvs, const bool keep) |
| |
|
bool | write_type3 (const m5::nfc::ndef::TLV &tlv) |
| |
|
bool | write_type4 (const std::vector< m5::nfc::ndef::TLV > &tlvs) |
| |
|
bool | write_type4_iso7816 (const std::vector< m5::nfc::ndef::TLV > &tlvs, const type4::CapabilityContainer &cc, isodep::IsoDEP &dep) |
| |
|
bool | write_type4_desfire (const std::vector< m5::nfc::ndef::TLV > &tlvs, const type4::CapabilityContainer &cc, isodep::IsoDEP &dep) |
| |
|
bool | write_type5 (const std::vector< m5::nfc::ndef::TLV > &tlvs, const bool keep) |
| |
|
std::vector< m5::nfc::ndef::TLV > | merge_tlv (std::vector< m5::nfc::ndef::TLV > &old_tlvs, const std::vector< m5::nfc::ndef::TLV > &tlvs) |
| |
|
| bool | read_nfcv (uint8_t *rx, const uint16_t offset, const uint16_t len) |
| | Read bytes from arbitrary byte offset (for NFC-V)
|
| |
| bool | write_nfcv (const uint16_t offset, const uint8_t *tx, const uint16_t len) |
| | Write bytes to arbitrary byte offset (for NFC-V)
|
| |
◆ isValidFormat()
Check whether the tag is in NDEF format.
- Parameters
-
| [out] | valid | True if the tag has a valid NDEF format |
| ftag | NFC Forum Tag type |
- Returns
- True if command succeeded
◆ prepare_desfire()
| bool m5::nfc::ndef::NDEFLayer::prepare_desfire |
( |
const uint32_t | max_ndef_size | ) |
|
Prepare NDEF files on MIFARE DESFire (EV1/EV2/EV3)
- Parameters
-
| max_ndef_size | Max size for NDEF file |
- Returns
- True if successful
◆ prepare_desfire_light()
| bool m5::nfc::ndef::NDEFLayer::prepare_desfire_light |
( |
| ) |
|
Prepare NDEF files on MIFARE DESFire Light.
- Returns
- True if successful
◆ read()
Read NDEF data.
- Parameters
-
| ftag | NFC Forum Tag type |
| [out] | tlvs | Output TLVs |
| tagBits | Target TLV tags |
- Returns
- True if successful
◆ read_nfcv()
| bool m5::nfc::ndef::NDEFLayer::read_nfcv |
( |
uint8_t * | rx, |
|
|
const uint16_t | offset, |
|
|
const uint16_t | len ) |
|
protected |
Read bytes from arbitrary byte offset (for NFC-V)
- Parameters
-
| [out] | rx | Output buffer |
| offset | Byte offset from start of user area |
| len | Number of bytes to read |
- Returns
- True if successful
◆ readAttributeBlock()
Read Type3 Attribute Block.
- Parameters
-
- Returns
- True if successful
◆ readCapabilityContainer() [1/3]
Read Type2 Capability Container.
- Parameters
-
| [out] | cc | Capability container |
- Returns
- True if successful
◆ readCapabilityContainer() [2/3]
Read Type4 Capability Container.
- Parameters
-
| [out] | cc | Capability container |
- Returns
- True if successful
◆ readCapabilityContainer() [3/3]
Read Type5 Capability Container.
- Parameters
-
| [out] | cc | Capability container |
- Returns
- True if successful
◆ write()
Write NDEF data.
- Parameters
-
| ftag | NFC Forum Tag type |
| tlvs | TLVs to write |
| keep | Keep existing TLVs when possible |
- Returns
- True if successful
- Note
- The message will be overwritten
◆ write_nfcv()
| bool m5::nfc::ndef::NDEFLayer::write_nfcv |
( |
const uint16_t | offset, |
|
|
const uint8_t * | tx, |
|
|
const uint16_t | len ) |
|
protected |
Write bytes to arbitrary byte offset (for NFC-V)
- Parameters
-
| offset | Byte offset from start of user area |
| tx | Input buffer |
| len | Number of bytes to write |
- Returns
- True if successful
- Note
- Performs read-modify-write for partial block writes
◆ writeCapabilityContainer()
Write Type5 Capability Container.
- Parameters
-
| [in] | cc | Capability container |
- Returns
- True if successful