Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue on MKR1000 board #29

Merged
merged 1 commit into from
Jul 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=STM32duino ST25DV
version=2.0.2
version=2.0.3
author=STMicroelectronics
maintainer=stm32duino
sentence=Allows controlling the NFC ST25DV
Expand Down
12 changes: 6 additions & 6 deletions src/libNDEF/lib_NDEF_Vcard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ uint32_t NDEF_GetVcardLength(sVcardInfo *pVcardStruct)
uint32_t PayloadSize = 0;

/* "BEGIN:VCARD\r\n" */
PayloadSize += BEGIN_STRING_SIZE;
PayloadSize += VCARD_BEGIN_STRING_SIZE;
PayloadSize += VCARD_STRING_SIZE;
PayloadSize += LIMIT_STRING_SIZE;

Expand Down Expand Up @@ -256,7 +256,7 @@ uint32_t NDEF_GetVcardLength(sVcardInfo *pVcardStruct)
PayloadSize += LIMIT_STRING_SIZE;
}
/* "END:VCARD\r\n" */
PayloadSize += END_STRING_SIZE;
PayloadSize += VCARD_END_STRING_SIZE;
PayloadSize += VCARD_STRING_SIZE;
/* PayloadSize += LIMIT_STRING_SIZE;*/

Expand Down Expand Up @@ -327,8 +327,8 @@ void NDEF::NDEF_PrepareVcardMessage(sVcardInfo *pVcardStruct, uint8_t *pNDEFMess
}

/* "BEGIN:VCARD\r\n" */
memcpy(&pNDEFMessage[PayloadSize], BEGIN, BEGIN_STRING_SIZE);
PayloadSize += BEGIN_STRING_SIZE;
memcpy(&pNDEFMessage[PayloadSize], VCARD_BEGIN, VCARD_BEGIN_STRING_SIZE);
PayloadSize += VCARD_BEGIN_STRING_SIZE;
memcpy(&pNDEFMessage[PayloadSize], VCARD, VCARD_STRING_SIZE);
PayloadSize += VCARD_STRING_SIZE;
memcpy(&pNDEFMessage[PayloadSize], LIMIT, LIMIT_STRING_SIZE);
Expand Down Expand Up @@ -460,8 +460,8 @@ void NDEF::NDEF_PrepareVcardMessage(sVcardInfo *pVcardStruct, uint8_t *pNDEFMess
}

/* "END:VCARD\r\n" */
memcpy(&pNDEFMessage[PayloadSize], END, END_STRING_SIZE);
PayloadSize += END_STRING_SIZE;
memcpy(&pNDEFMessage[PayloadSize], VCARD_END, VCARD_END_STRING_SIZE);
PayloadSize += VCARD_END_STRING_SIZE;
memcpy(&pNDEFMessage[PayloadSize], VCARD, VCARD_STRING_SIZE);
PayloadSize += VCARD_STRING_SIZE;
// memcpy( &pNDEFMessage[PayloadSize], LIMIT, LIMIT_STRING_SIZE );
Expand Down
8 changes: 4 additions & 4 deletions src/libNDEF/lib_NDEF_Vcard.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
#define VCARD_VERSION_3_0_SIZE 3


#define BEGIN "BEGIN:"
#define VCARD_BEGIN "BEGIN:"
#define VCARD "VCARD"
#define VERSION "VERSION:"
#define VCARD_NAME "N:"
Expand All @@ -60,12 +60,12 @@
#define TITLE "TITLE:"
#define ORG "ORG:"
#define URL "URL:"
#define END "END:"
#define VCARD_END "END:"
#define JPEG "JPEG"

#define LIMIT "\r\n"

#define BEGIN_STRING_SIZE 6
#define VCARD_BEGIN_STRING_SIZE 6
#define VCARD_STRING_SIZE 5
#define VERSION_STRING_SIZE 8
#define VCARD_NAME_STRING_SIZE 2
Expand All @@ -81,7 +81,7 @@
#define TITLE_STRING_SIZE 6
#define ORG_STRING_SIZE 4
#define URL_STRING_SIZE 4
#define END_STRING_SIZE 4
#define VCARD_END_STRING_SIZE 4
#define JPEG_STRING_SIZE 4

#define LIMIT_STRING_SIZE 2
Expand Down