M5Unit-NFC 0.1.0 git rev:93745b5
Loading...
Searching...
No Matches
nfc.hpp File Reference

NFC definitions. More...

#include <cstdint>
#include "manufacturer_id.hpp"

Go to the source code of this file.

Namespaces

namespace  m5
 Top level namespace of M5Stack.
 
namespace  nfc
 NFC related definitions.
 

Enumerations

enum class  m5::nfc::NFC : uint8_t {
  None , A , B , F ,
  V
}
 NFC type. More...
 
enum class  m5::nfc::NFCForumTag : uint8_t {
  None , Type1 , Type2 , Type3 ,
  Type4 , Type5
}
 NFC Forum Tag Type. More...
 
enum class  m5::nfc::Bitrate : uint8_t {
  Bps106K , Bps212K , Bps424K , Bps848K ,
  Invalid = 0xFF
}
 Communication bitrate. More...
 

Functions

bool m5::nfc::is_file_system_memory (const file_system_feature_t fsf)
 Has flat-memory file system feature?
 
bool m5::nfc::is_file_system_file (const file_system_feature_t fsf)
 Has any file-based file system feature?
 
bool m5::nfc::is_file_system_ISO (const file_system_feature_t fsf)
 Has ISO 7816-4 file system feature?
 
bool m5::nfc::is_file_system_desfire (const file_system_feature_t fsf)
 Has MIFARE DESFire (any variant) file system feature?
 
bool m5::nfc::is_file_system_desfire_normal (const file_system_feature_t fsf)
 Has MIFARE DESFire (normal) file system feature?
 
bool m5::nfc::is_file_system_desfire_light (const file_system_feature_t fsf)
 Has MIFARE DESFire light file system feature?
 

File system (bits)

using m5::nfc::file_system_feature_t = uint8_t
 Alias for file_system_feature_t.
 
constexpr file_system_feature_t m5::nfc::FILE_SYSTEM_FLAT_MEMORY {0x01}
 Block/Page base R/W (flat memory)
 
constexpr file_system_feature_t m5::nfc::FILE_SYSTEM_ISO7816_4 {0x02}
 ISO 7816-4 (multi file base)
 
constexpr file_system_feature_t m5::nfc::FILE_SYSTEM_DESFIRE {0x04}
 MIFARE DESFire (multi file base)
 
constexpr file_system_feature_t m5::nfc::FILE_SYSTEM_DESFIRE_LIGHT {0x08}
 MIFARE DESFire light (single file base)
 

Detailed Description

NFC definitions.

Enumeration Type Documentation

◆ Bitrate

enum class m5::nfc::Bitrate : uint8_t
strong

Communication bitrate.

Enumerator
Bps106K 

106K

Bps212K 

212K

Bps424K 

424K

Bps848K 

848K

◆ NFC

enum class m5::nfc::NFC : uint8_t
strong

NFC type.

Enumerator
None 

No mode.

NFC-A.

NFC-B.

NFC-F.

NFC-V.

◆ NFCForumTag

enum class m5::nfc::NFCForumTag : uint8_t
strong

NFC Forum Tag Type.

Enumerator
Type1 

Type 1 (NFC-A)

Type2 

Type 2 (NFC-A)

Type3 

Type 3 (NFC-F)

Type4 

Type 4 (NFC-A, NFC-B)

Type5 

Type 5 ISO/IEC 15693.

Function Documentation

◆ is_file_system_desfire()

bool m5::nfc::is_file_system_desfire ( const file_system_feature_t fsf)
inline

Has MIFARE DESFire (any variant) file system feature?

Parameters
fsfFile system feature bits
Returns
True if MIFARE DESFire or DESFire Light file system access is supported

◆ is_file_system_desfire_light()

bool m5::nfc::is_file_system_desfire_light ( const file_system_feature_t fsf)
inline

Has MIFARE DESFire light file system feature?

Parameters
fsfFile system feature bits
Returns
True if MIFARE DESFire Light file system access is supported

◆ is_file_system_desfire_normal()

bool m5::nfc::is_file_system_desfire_normal ( const file_system_feature_t fsf)
inline

Has MIFARE DESFire (normal) file system feature?

Parameters
fsfFile system feature bits
Returns
True if normal MIFARE DESFire file system access is supported

◆ is_file_system_file()

bool m5::nfc::is_file_system_file ( const file_system_feature_t fsf)
inline

Has any file-based file system feature?

Parameters
fsfFile system feature bits
Returns
True if any file-based access is supported

◆ is_file_system_ISO()

bool m5::nfc::is_file_system_ISO ( const file_system_feature_t fsf)
inline

Has ISO 7816-4 file system feature?

Parameters
fsfFile system feature bits
Returns
True if ISO 7816-4 file system access is supported

◆ is_file_system_memory()

bool m5::nfc::is_file_system_memory ( const file_system_feature_t fsf)
inline

Has flat-memory file system feature?

Parameters
fsfFile system feature bits
Returns
True if flat-memory access is supported