NFC-A definitions.
More...
#include "nfca.hpp"
#include <M5Utility.hpp>
|
| namespace | m5 |
| | Top level namespace of M5Stack.
|
| |
◆ calculate_bcc8()
| uint8_t m5::nfc::a::calculate_bcc8 |
( |
const uint8_t * | data, |
|
|
const uint32_t | len ) |
Calculate bcc8.
- Parameters
-
| data | Input data |
| len | Input data length |
- Returns
- BCC8 value
◆ get_file_system_feature()
Get file system feature bits.
- Parameters
-
- Returns
- File system feature bits
◆ get_first_user_block()
| uint16_t m5::nfc::a::get_first_user_block |
( |
const Type | t | ) |
|
Gets the first user area block.
- Parameters
-
- Returns
- First user block/page number
◆ get_last_user_block()
| uint16_t m5::nfc::a::get_last_user_block |
( |
const Type | t | ) |
|
Gets the last user area block.
- Parameters
-
- Returns
- Last user block/page number
◆ get_nfc_forum_tag_type()
Get NFC Forum Tag Type from PICC type.
- Parameters
-
- Returns
- NFC Forum Tag Type
◆ get_number_of_blocks()
| uint16_t m5::nfc::a::get_number_of_blocks |
( |
const Type | t | ) |
|
Gets the number of blocks.
- Parameters
-
- Returns
- Number of blocks/pages
◆ get_number_of_sectors()
| uint16_t m5::nfc::a::get_number_of_sectors |
( |
const Type | t | ) |
|
Gets the number of sectors.
- Parameters
-
- Returns
- Number of sectors
◆ get_number_of_user_blocks()
| uint16_t m5::nfc::a::get_number_of_user_blocks |
( |
const Type | t | ) |
|
Gets the number of user blocks.
- Parameters
-
- Returns
- Number of user blocks/pages
◆ get_unit_size()
| uint16_t m5::nfc::a::get_unit_size |
( |
const Type | t | ) |
|
Get the unit size of 1 block / 1 page.
- Parameters
-
- Return values
-
| != | 0 Unit size |
| == | 0 Does not have a unit size |
◆ get_user_area_size()
| uint16_t m5::nfc::a::get_user_area_size |
( |
const Type | t | ) |
|
Gets the user area bytes.
- Parameters
-
- Returns
- User area size in bytes
◆ get_version3_response()
| const uint8_t * m5::nfc::a::get_version3_response |
( |
const Type | t | ) |
|
Gets the GET_VERSION(L3) response for emulation.
- Parameters
-
- Returns
- Pointer to the GET_VERSION response bytes, or nullptr if unavailable
◆ historical_bytes_to_type()
| 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.
- Parameters
-
| [out] | sub | Inferred subtype value |
| atqa | ATQA value |
| sak | SAK byte |
| bytes | Historical bytes |
| len | Historical byte length |
- Returns
- Type inferred from historical bytes
◆ is_user_block()
| bool m5::nfc::a::is_user_block |
( |
const Type | t, |
|
|
const uint16_t | block ) |
Is block user area?
- Parameters
-
| t | PICC type |
| block | Block/page number |
- Returns
- True if the block/page is in the user area
◆ sak_to_type()
| Type m5::nfc::a::sak_to_type |
( |
const uint8_t | sak | ) |
|
Inferring the type from SAK.
- Parameters
-
- Returns
- Type
- Warning
- This is a preliminary diagnosis, a more accurate diagnosis is required
◆ version3_to_type()
| Type m5::nfc::a::version3_to_type |
( |
const uint8_t | info[8] | ) |
|
Inferring the type from GetVersion L3.
- Parameters
-
| info | GET_VERSION response bytes |
- Returns
- Type inferred from the level 3 version information
◆ version4_to_type()
| Type m5::nfc::a::version4_to_type |
( |
uint8_t & | sub, |
|
|
const uint8_t | info[8] ) |
Inferring the type from GetVersion L4.
- Parameters
-
| [out] | sub | Inferred subtype value |
| info | GET_VERSION response bytes |
- Returns
- Type inferred from the level 4 version information