NFC-B definitions.
More...
#include "nfc/nfc.hpp"
#include <cstdint>
#include <string>
#include <cstring>
Go to the source code of this file.
|
| namespace | m5 |
| | Top level namespace of M5Stack.
|
| |
| namespace | b |
| | NFC-B definitions.
|
| |
|
|
constexpr uint8_t | m5::nfc::b::ATQB_LENGTH {11} |
| | ATQB length pupi(4) + application(4) + protocol(3)
|
| |
|
|
constexpr uint8_t | m5::nfc::b::COMMUNICATION_SAME_SPEED {0x80} |
| |
|
constexpr uint8_t | m5::nfc::b::COMMUNICATION_SPEED_106K {0X00} |
| |
|
constexpr uint8_t | m5::nfc::b::COMMUNICATION_SPEED_212K_FROM_PICC {0X10} |
| |
|
constexpr uint8_t | m5::nfc::b::COMMUNICATION_SPEED_424K_FROM_PICC {0X20} |
| |
|
constexpr uint8_t | m5::nfc::b::COMMUNICATION_SPEED_847K_FROM_PICC {0X40} |
| |
|
constexpr uint8_t | m5::nfc::b::COMMUNICATION_SPEED_212K_TO_PICC {0X01} |
| |
|
constexpr uint8_t | m5::nfc::b::COMMUNICATION_SPEED_424K_TO_PICC {0X02} |
| |
|
constexpr uint8_t | m5::nfc::b::COMMUNICATION_SPEED_847K_TO_PICC {0X04} |
| |
|
constexpr uint8_t | m5::nfc::b::COMMUNICATION_SPPED_106K {COMMUNICATION_SPEED_106K} |
| |
|
constexpr uint8_t | m5::nfc::b::COMMUNICATION_SPPED_212K_FROM_PICC {COMMUNICATION_SPEED_212K_FROM_PICC} |
| |
|
constexpr uint8_t | m5::nfc::b::COMMUNICATION_SPPED_424K_FROM_PICC {COMMUNICATION_SPEED_424K_FROM_PICC} |
| |
|
constexpr uint8_t | m5::nfc::b::COMMUNICATION_SPPED_847K_FROM_PICC {COMMUNICATION_SPEED_847K_FROM_PICC} |
| |
|
constexpr uint8_t | m5::nfc::b::COMMUNICATION_SPPED_212K_TO_PICC {COMMUNICATION_SPEED_212K_TO_PICC} |
| |
|
constexpr uint8_t | m5::nfc::b::COMMUNICATION_SPPED_424K_TO_PICC {COMMUNICATION_SPEED_424K_TO_PICC} |
| |
|
constexpr uint8_t | m5::nfc::b::COMMUNICATION_SPPED_847K_TO_PICC {COMMUNICATION_SPEED_847K_TO_PICC} |
| |
|
|
const uint8_t | m5::nfc::b::FRAME_OPTION_NAD {0x02} |
| |
|
const uint8_t | m5::nfc::b::FRAME_OPTION_CID {0x01} |
| |
|
|
constexpr uint32_t | m5::nfc::b::TIMEOUT_REQ_WUP_B {5} |
| |
|
constexpr uint32_t | m5::nfc::b::TIMEOUT_ATTRIB {50} |
| |
|
constexpr uint32_t | m5::nfc::b::TIMEOUT_HLTB {5} |
| |
|
constexpr uint32_t | m5::nfc::b::TIMEOUT_DESELECT {5} |
| |
◆ Command
ISO/IEC 14443 Type B command (Layer 3 / activation)
| Enumerator |
|---|
| REQ_WUPB | Request/Wakeup Type B.
|
| ATTRIB | Attribute (activate ISO-DEP)
|
| HLTB | Halt Type B (rarely used)
|
| DESELECT | DESELECT.
|
| DESELECT_WITH_CID | DESELECT with CID.
|
◆ Type
Type of the PICC.
| Enumerator |
|---|
| Unknown | Unknown type.
|
| Unclassified | Unclassified.
|
◆ get_frame_option()
| uint8_t m5::nfc::b::get_frame_option |
( |
const uint8_t | protocol[3] | ) |
|
|
inline |
Gets the frame option bits.
- Parameters
-
| protocol | ATQB protocol information bytes |
- Returns
- Frame option bits
◆ get_fwi()
| uint8_t m5::nfc::b::get_fwi |
( |
const uint8_t | protocol[3] | ) |
|
|
inline |
Gets the FWI.
- Parameters
-
| protocol | ATQB protocol information bytes |
- Returns
- Frame Waiting Integer, or RFU value if protocol is nullptr
◆ maximum_frame_length()
| uint16_t m5::nfc::b::maximum_frame_length |
( |
const uint8_t | protocol[3] | ) |
|
Get maximum frame length from protocol bytes.
- Parameters
-
| protocol | ATQB protocol information bytes |
- Returns
- Maximum frame length in bytes
◆ maximum_frame_length_bits()
| uint8_t m5::nfc::b::maximum_frame_length_bits |
( |
const uint8_t | protocol[3] | ) |
|
|
inline |
Get maximum frame length code from protocol bytes.
- Parameters
-
| protocol | ATQB protocol information bytes |
- Returns
- FSCI-like frame length bits, or RFU value if protocol is nullptr
◆ operator!=()
| bool m5::nfc::b::operator!= |
( |
const PICC & | a, |
|
|
const PICC & | b ) |
|
inline |
Not equal?
- Parameters
-
- Returns
- True if ATQB bytes are not equal
◆ operator==()
| bool m5::nfc::b::operator== |
( |
const PICC & | a, |
|
|
const PICC & | b ) |
|
inline |
Equal?
- Parameters
-
- Returns
- True if ATQB bytes are equal
◆ supports_iso14443_4()
| bool m5::nfc::b::supports_iso14443_4 |
( |
const uint8_t | protocol[3] | ) |
|
|
inline |
Supports ISO/IEC 14443-4?
- Parameters
-
| protocol | ATQB protocol information bytes |
- Returns
- True if ISO/IEC 14443-4 is supported