Fork for the GitHub

Embed: (wiki syntax)

« Back to documentation index

LibNDEF_Public_Functions

LibNDEF_Public_Functions
[LibNFC_FORUM]

Functions

uint16_t NDEF_IdentifyNDEF (sRecordInfo_t *pRecordStruct, uint8_t *pNDEF, I2C *mi2cChannel)
 This function identify the NDEF message stored in tag.
uint16_t NDEF_ReadNDEF (uint8_t *pNDEF, I2C *mi2cChannel)
 This function read the NDEF content of the TAG.
uint16_t NDEF_getNDEFSize (uint16_t *Size, I2C *mi2cChannel)
 This function read the NDEF size of the TAG.
uint16_t NDEF_WriteNDEF (uint16_t NDEF_Size, uint8_t *pNDEF, I2C *mi2cChannel)
 This function write the NDEF in the TAG.
uint16_t NDEF_AppendRecord (sRecordInfo_t *Record, I2C *mi2cChannel)
 This function append the record to an the NDEF in the TAG.
uint16_t NDEF_IdentifyBuffer (sRecordInfo_t *pRecordStruct, uint8_t *pNDEF)
 This function identify the NDEF message stored in tag.
uint32_t NDEF_WriteRecord (sRecordInfo_t *pRecord, uint8_t *pNDEF, I2C *mi2cChannel)
 This function writes a record into a NDEF buffer.
uint32_t NDEF_GetRecordLength (sRecordInfo_t *pRecord)
 This function return the length a record data (update SR flag if required)
uint16_t NDEF_ClearNDEF (I2C *mi2cChannel)
 This function clears the NDEF file.

Function Documentation

uint16_t NDEF_AppendRecord ( sRecordInfo_t *  Record,
I2C *  mi2cChannel 
)

This function append the record to an the NDEF in the TAG.

Parameters:
pRecord: pointer on the record with data to be written.
Return values:
NDEF_OK: NDEF file data written in the tag.
NDEF_ERROR: not able to store NDEF in tag.
NDEF_ERROR_MEMORY_INTERNAL: Cannot write to tag.
NDEF_ERROR_NOT_FORMATED: CCFile data not supported or not present.
NDEF_ERROR_MEMORY_TAG: Size not compatible with memory.
NDEF_ERROR_LOCKED: Tag locked, cannot be write.

Definition at line 515 of file lib_NDEF.cpp.

uint16_t NDEF_ClearNDEF ( I2C *  mi2cChannel )

This function clears the NDEF file.

Return values:
NDEFStatus

Definition at line 732 of file lib_NDEF.cpp.

uint16_t NDEF_getNDEFSize ( uint16_t *  Size,
I2C *  mi2cChannel 
)

This function read the NDEF size of the TAG.

Parameters:
Size: pointer to a 16-bit Size (in bytes) to be returned.
Return values:
NDEF_OK: NDEF file data retrieve and store in the buffer.
NDEF_ERROR: not able to read NDEF from tag.
NDEF_ERROR_MEMORY_INTERNAL: Cannot read tag.
NDEF_ERROR_NOT_FORMATED: CCFile data not supported or not present.
NDEF_ERROR_MEMORY_TAG: Size not compatible with memory.
NDEF_ERROR_LOCKED: Tag locked, cannot be read.

Definition at line 485 of file lib_NDEF.cpp.

uint32_t NDEF_GetRecordLength ( sRecordInfo_t *  pRecord )

This function return the length a record data (update SR flag if required)

Parameters:
pRecord: Structure with record information
Return values:
Length: Length of the data (in bytes)

Definition at line 708 of file lib_NDEF.cpp.

uint16_t NDEF_IdentifyBuffer ( sRecordInfo_t *  pRecordStruct,
uint8_t *  pNDEF 
)

This function identify the NDEF message stored in tag.

Parameters:
pRecordStruct: Structure to fill with record information.
pNDEF: pointer on the NDEF message data.
Return values:
NDEF_OK: record struct filled.
NDEF_ERROR: record struct not updated.

Definition at line 563 of file lib_NDEF.cpp.

uint16_t NDEF_IdentifyNDEF ( sRecordInfo_t *  pRecordStruct,
uint8_t *  pNDEF,
I2C *  mi2cChannel 
)

This function identify the NDEF message stored in tag.

Parameters:
pRecordStruct: Structure to fill with record information.
pNDEF: pointer on the NDEF message data.
Return values:
NDEF_OK: record struct filled.
NDEF_ERROR: record struct not updated.

Definition at line 378 of file lib_NDEF.cpp.

uint16_t NDEF_ReadNDEF ( uint8_t *  pNDEF,
I2C *  mi2cChannel 
)

This function read the NDEF content of the TAG.

Parameters:
pNDEF: pointer on the buffer to store NDEF data.
Return values:
NDEF_OK: NDEF file data retrieve and store in the buffer.
NDEF_ERROR: not able to read NDEF from tag.
NDEF_ERROR_MEMORY_INTERNAL: Cannot read tag.
NDEF_ERROR_NOT_FORMATED: CCFile data not supported or not present.
NDEF_ERROR_MEMORY_TAG: Size not compatible with memory.
NDEF_ERROR_LOCKED: Tag locked, cannot be read.

Definition at line 468 of file lib_NDEF.cpp.

uint16_t NDEF_WriteNDEF ( uint16_t  NDEF_Size,
uint8_t *  pNDEF,
I2C *  mi2cChannel 
)

This function write the NDEF in the TAG.

Parameters:
pNDEF: pointer on the buffer containing the NDEF data.
Return values:
NDEF_OK: NDEF file data written in the tag.
NDEF_ERROR: not able to store NDEF in tag.
NDEF_ERROR_MEMORY_INTERNAL: Cannot write to tag.
NDEF_ERROR_NOT_FORMATED: CCFile data not supported or not present.
NDEF_ERROR_MEMORY_TAG: Size not compatible with memory.
NDEF_ERROR_LOCKED: Tag locked, cannot be write.

Definition at line 499 of file lib_NDEF.cpp.

uint32_t NDEF_WriteRecord ( sRecordInfo_t *  pRecord,
uint8_t *  pNDEF,
I2C *  mi2cChannel 
)

This function writes a record into a NDEF buffer.

(update SR flag if required)

Parameters:
pRecord: Structure with record information to be written.
pNDEF: pointer on the NDEF buffer.
Return values:
Length: Length of the written data (in bytes)

Definition at line 639 of file lib_NDEF.cpp.