Fork for the GitHub
This part of the library manage the data which follow NFC forum organisation. More...
Functions | |
| static void | NDEF_FillVcardStruct (uint8_t *pPayload, uint32_t PayloadSize, char *pKeyWord, uint32_t SizeOfKeyWord, uint8_t *pString) |
| This function extracts a Vcard particular property from a vCard. | |
| static void | NDEF_ExtractVcard (sRecordInfo_t *pRecordStruct, sVcardInfo *pVcardStruct) |
| This function reads a Vcard record and stores data in a `sVcardInfo` structure. | |
| uint16_t | NDEF_ReadVcard (sRecordInfo_t *pRecordStruct, sVcardInfo *pVcardStruct) |
| This function reads a Vcard record and stores data in a `sVcardInfo` structure. | |
| uint16_t | NDEF_WriteVcard (sVcardInfo *pVcardStruct, I2C *mi2cChannel) |
| This function writes a NDEF message to the NFC tag with the Vcard data given in a `sVcardInfo` structure. | |
| uint32_t | NDEF_GetVcardLength (sVcardInfo *pVcardStruct) |
| This function computes the size of a Vcard record from the data given in the `sVcardInfo` structure. | |
| void | NDEF_PrepareVcardMessage (sVcardInfo *pVcardStruct, uint8_t *pNDEFMessage, uint16_t *size) |
| This function write the NDEF file with the Vcard data given in the structure. | |
| static uint8_t * | from_base64 (uint8_t *input64, uint32_t *binary) |
| This function extracts binary data from a base64 representation. | |
| int | NDEF_getVcardPicture (uint8_t *pPayload, uint32_t PayloadSize, uint8_t *pPict) |
| This function return the picture stored in a VCARD. | |
Variables | |
| uint8_t | NDEF_Buffer [] |
| This buffer is used to store the data sent/received by the TAG. | |
Detailed Description
This part of the library manage the data which follow NFC forum organisation.
Function Documentation
| static uint8_t* from_base64 | ( | uint8_t * | input64, |
| uint32_t * | binary | ||
| ) | [static] |
This function extracts binary data from a base64 representation.
- Parameters:
-
input64 : pointer on the input data in base64. binary : returned binary data.
- Returns:
- Updated pointer on the input64 buffer (normal increment is 4 base64 char for 3 bytes of binary data, but special char are ignored)
Definition at line 525 of file lib_NDEF_Vcard.cpp.
| static void NDEF_ExtractVcard | ( | sRecordInfo_t * | pRecordStruct, |
| sVcardInfo * | pVcardStruct | ||
| ) | [static] |
This function reads a Vcard record and stores data in a `sVcardInfo` structure.
- Parameters:
-
pRecordStruct Pointer on the vCard record structure. pVcardStruct Pointer on the `sCardInfo` structure to fill.
Definition at line 99 of file lib_NDEF_Vcard.cpp.
| static void NDEF_FillVcardStruct | ( | uint8_t * | pPayload, |
| uint32_t | PayloadSize, | ||
| char * | pKeyWord, | ||
| uint32_t | SizeOfKeyWord, | ||
| uint8_t * | pString | ||
| ) | [static] |
This function extracts a Vcard particular property from a vCard.
- Parameters:
-
pPayload Pointer on the vCard payload data of the vCard record. PayloadSize Number of bytes in the vCard payload. pKeyWord Pointer on the vCard property keyword to look for. SizeOfKeyWord Number of bytes of the vCard property keyword we are looking for. pString Pointer on a string used to return the vCard property read.
Definition at line 54 of file lib_NDEF_Vcard.cpp.
| uint32_t NDEF_GetVcardLength | ( | sVcardInfo * | pVcardStruct ) |
This function computes the size of a Vcard record from the data given in the `sVcardInfo` structure.
- Parameters:
-
pVcardStruct Pointer on a `sVcardInfo` structure containing the Vcard information.
- Returns:
- vCard record data size in bytes (excluding record metadata).
Definition at line 183 of file lib_NDEF_Vcard.cpp.
| int NDEF_getVcardPicture | ( | uint8_t * | pPayload, |
| uint32_t | PayloadSize, | ||
| uint8_t * | pPict | ||
| ) |
This function return the picture stored in a VCARD.
- Parameters:
-
pPayload : pointer on the payload data of the NDEF message. PayloadSize : number of data in the payload. pPict : Pointer on the dpicture buffer (must be big enough to contain the picture - warning: no check is done in the function).
Definition at line 572 of file lib_NDEF_Vcard.cpp.
| void NDEF_PrepareVcardMessage | ( | sVcardInfo * | pVcardStruct, |
| uint8_t * | pNDEFMessage, | ||
| uint16_t * | size | ||
| ) |
This function write the NDEF file with the Vcard data given in the structure.
- Parameters:
-
pVcardStruct : pointer on structure that contain the Vcard information. pNDEFMessage : pointer on the NDEF message. size : to store the size of the NDEF message generated.
Definition at line 297 of file lib_NDEF_Vcard.cpp.
| uint16_t NDEF_ReadVcard | ( | sRecordInfo_t * | pRecordStruct, |
| sVcardInfo * | pVcardStruct | ||
| ) |
This function reads a Vcard record and stores data in a `sVcardInfo` structure.
- Parameters:
-
pRecordStruct Pointer on the vCard record structure. pVcardStruct Pointer on the `sCardInfo` structure to fill.
- Return values:
-
NDEF_OK The Vcard information has been retrieved. NDEF_ERROR Not able to retrieve the Vcard information.
Definition at line 144 of file lib_NDEF_Vcard.cpp.
| uint16_t NDEF_WriteVcard | ( | sVcardInfo * | pVcardStruct, |
| I2C * | mi2cChannel | ||
| ) |
This function writes a NDEF message to the NFC tag with the Vcard data given in a `sVcardInfo` structure.
- Parameters:
-
pVcardStruct Pointer on a `sVcardInfo` structure containing the Vcard information.
- Return values:
-
NDEF_OK NDEF file data written in the tag. NDEF_ERROR Not able to store the 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 167 of file lib_NDEF_Vcard.cpp.
Variable Documentation
| uint8_t NDEF_Buffer[] |
This buffer is used to store the data sent/received by the TAG.
This buffer contains the data send/received by TAG.
Definition at line 65 of file lib_NDEF.cpp.
Generated on Fri Jul 15 2022 10:08:35 by
1.7.2