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

NFC-A definitions. More...

#include "nfca.hpp"
#include <M5Utility.hpp>

Namespaces

namespace  m5
 Top level namespace of M5stack.
 

Functions

uint16_t m5::nfc::a::get_number_of_blocks (const Type t)
 Gets the number of blocks.
 
uint16_t m5::nfc::a::get_number_of_user_blocks (const Type t)
 Gets the number of user blocks.
 
uint16_t m5::nfc::a::get_user_area_size (const Type t)
 Gets the user area bytes.
 
uint16_t m5::nfc::a::get_unit_size (const Type t)
 Get the unit size of 1 block / 1 page.
 
uint16_t m5::nfc::a::get_number_of_sectors (const Type t)
 Gets the number of sectors.
 
uint16_t m5::nfc::a::get_first_user_block (const Type t)
 Gets the first user area block.
 
uint16_t m5::nfc::a::get_last_user_block (const Type t)
 Gets the last user area block.
 
bool m5::nfc::a::is_user_block (const Type t, const uint16_t block)
 Is block user area?
 
file_system_feature_t m5::nfc::a::get_file_system_feature (const Type t)
 Get file system fearure bits.
 
Type m5::nfc::a::sak_to_type (const uint8_t sak)
 Inferring the type from SAK.
 
Type m5::nfc::a::version3_to_type (const uint8_t info[8])
 Inferring the type from GetVersion L3.
 
Type m5::nfc::a::version4_to_type (uint8_t &sub, const uint8_t info[8])
 Inferring the type from GetVersion L4.
 
Type m5::nfc::a::historical_bytes_to_type (uint8_t &sub, const uint16_t atqa, const uint8_t sak, const uint8_t *bytes, const uint8_t len)
 Historical bytes to type.
 
const uint8_t * m5::nfc::a::get_version3_response (const Type t)
 Gets the GET_VERSION(L3) response for emulation.
 
uint8_t m5::nfc::a::calculate_bcc8 (const uint8_t *data, const uint32_t len)
 Calculate bcc8.
 
m5::nfc::NFCForumTag m5::nfc::a::get_nfc_forum_tag_type (const Type t)
 Get NFC Forum Tag Type from PICC type.
 

Detailed Description

NFC-A definitions.

Function Documentation

◆ get_unit_size()

uint16_t m5::nfc::a::get_unit_size ( const Type t)

Get the unit size of 1 block / 1 page.

Return values
!=0 Unit size
==0 Does not have a unit size

◆ sak_to_type()

Type m5::nfc::a::sak_to_type ( const uint8_t sak)

Inferring the type from SAK.

Returns
Type
Warning
This is a preliminary diagnosis, a more accurate diagnosis is required