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

NFC-V definitions. More...

#include "nfcv.hpp"
#include "nfc/manufacturer_id.hpp"
#include <M5Utility.hpp>

Namespaces

namespace  m5
 Top level namespace of M5Stack.
 

Functions

Type m5::nfc::v::identify_type (const PICC &picc)
 Identify the type from Manufacturer Code, IC Identifier, IC Reference.
 
uint32_t m5::nfc::v::encode_VCD (std::vector< uint8_t > &out, const ModulationMode mode, const uint8_t *buffer, const uint32_t length, const bool high_rate=true, const bool add_crc=true)
 Encode to VCD frame.
 
bool m5::nfc::v::decode_VICC (std::vector< uint8_t > &out, const uint8_t *buffer, const uint32_t length, const uint32_t ignore_bits=16)
 Decode from VICC frame.
 

Detailed Description

NFC-V definitions.

Function Documentation

◆ decode_VICC()

bool m5::nfc::v::decode_VICC ( std::vector< uint8_t > & out,
const uint8_t * buffer,
const uint32_t length,
const uint32_t ignore_bits = 16 )

Decode from VICC frame.

Parameters
outOutput buffer
bufferInput buffer
lengthInput buffer length
ignore_bitsNumber of trailing bits to ignore
Returns
True if successful

◆ encode_VCD()

uint32_t m5::nfc::v::encode_VCD ( std::vector< uint8_t > & out,
const ModulationMode mode,
const uint8_t * buffer,
const uint32_t length,
const bool high_rate = true,
const bool add_crc = true )

Encode to VCD frame.

Parameters
outOutput buffer
modeModulationMode
bufferInput buffer (allow nullptr )
lengthInput buffer length (allow 0)
high_rateHigh data rate if true
add_crcAppend CRC16 if true
Returns
Encoded size in bytes, or 0 on error
Note
Make EOF only if buffer is nullptr and length is 0

◆ identify_type()

Type m5::nfc::v::identify_type ( const PICC & picc)

Identify the type from Manufacturer Code, IC Identifier, IC Reference.

Parameters
piccPICC information to identify
Returns
Type
Warning
Not all tags can be identified
If identification is impossible, Unclassified is returned