M5Unit-NFC 0.0.3 git rev:59f5362
Loading...
Searching...
No Matches
nfcb.hpp File Reference

NFC-B definitions. More...

#include "nfc/nfc.hpp"
#include <cstdint>
#include <string>
#include <cstring>

Go to the source code of this file.

Classes

struct  m5::nfc::b::PICC
 PICC for NFC-B. More...
 

Namespaces

namespace  m5
 Top level namespace of M5stack.
 
namespace  b
 NFC-B definitions.
 

Enumerations

enum class  m5::nfc::b::Type : uint8_t { Unknown , Unclassified }
 Type of the PICC. More...
 
enum class  m5::nfc::b::Require : uint8_t {
  Slot1 , Slot2 , Slot4 , Slot8 ,
  Slot16
}
 Number of slots required in the request/wakeup.
 
enum class  m5::nfc::b::Command : uint8_t {
  REQ_WUPB = 0x05 , ATTRIB = 0x1D , HLTB = 0x50 , DESELECT = 0xC2 ,
  DESELECT_WITH_CID = 0xCA
}
 ISO/IEC 14443 Type B command (Layer 3 / activation) More...
 

Functions

bool m5::nfc::b::operator== (const PICC &a, const PICC &b)
 Equal?
 
bool m5::nfc::b::operator!= (const PICC &a, const PICC &b)
 Not equal?
 
ATQB protocol
uint16_t m5::nfc::b::maximum_frame_length (const uint8_t protocol[3])
 Get maximum frame length from protocol bytes.
 
uint8_t m5::nfc::b::maximum_frame_length_bits (const uint8_t protocol[3])
 Get maximum frame length from protocol bytes.
 
bool m5::nfc::b::supports_iso14443_4 (const uint8_t protocol[3])
 Supports ISO/IEC 14443-4?
 
uint8_t m5::nfc::b::get_frame_option (const uint8_t protocol[3])
 Gets the frame option bits.
 
uint8_t m5::nfc::b::get_fwi (const uint8_t protocol[3])
 Gets the FWI.
 

Variables

constexpr uint8_t m5::nfc::b::ATQB_LENGTH {11}
 ATQB length pupi(4) + application(4) + protocol(3)
 
Communication speed bits
constexpr uint8_t m5::nfc::b::COMMUNICATION_SAME_SPEED {0x80}
 
constexpr uint8_t m5::nfc::b::COMMUNICATION_SPPED_106K {0X00}
 
constexpr uint8_t m5::nfc::b::COMMUNICATION_SPPED_212K_FROM_PICC {0X10}
 
constexpr uint8_t m5::nfc::b::COMMUNICATION_SPPED_424K_FROM_PICC {0X20}
 
constexpr uint8_t m5::nfc::b::COMMUNICATION_SPPED_847K_FROM_PICC {0X40}
 
constexpr uint8_t m5::nfc::b::COMMUNICATION_SPPED_212K_TO_PICC {0X01}
 
constexpr uint8_t m5::nfc::b::COMMUNICATION_SPPED_424K_TO_PICC {0X02}
 
constexpr uint8_t m5::nfc::b::COMMUNICATION_SPPED_847K_TO_PICC {0X04}
 
Frame option bits
const uint8_t m5::nfc::b::FRAME_OPTION_NAD {0x02}
 
const uint8_t m5::nfc::b::FRAME_OPTION_CID {0x01}
 
Timeout
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}
 

Detailed Description

NFC-B definitions.

Enumeration Type Documentation

◆ Command

enum class m5::nfc::b::Command : uint8_t
strong

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

enum class m5::nfc::b::Type : uint8_t
strong

Type of the PICC.

Enumerator
Unknown 

Unknown type.

Unclassified 

Unclassified.