layout, text, colors - mfu info, 15 info

This commit is contained in:
iceman1001 2020-04-04 12:17:55 +02:00
commit 34adf411c3
7 changed files with 252 additions and 214 deletions

View file

@ -11,18 +11,18 @@
// returns a string representation of the UID
// UID is transmitted and stored LSB first, displayed MSB first
// target char* buffer, where to put the UID, if NULL a static buffer is returned
// dest char* buffer, where to put the UID, if NULL a static buffer is returned
// uid[] the UID in transmission order
// return: ptr to string
char *Iso15693sprintUID(char *target, uint8_t *uid) {
char *iso15693_sprintUID(char *dest, uint8_t *uid) {
static char tempbuf[3 * 8 + 1] = {0};
if (target == NULL)
target = tempbuf;
if (dest == NULL)
dest = tempbuf;
sprintf(target, "%02X %02X %02X %02X %02X %02X %02X %02X",
sprintf(dest, "%02X %02X %02X %02X %02X %02X %02X %02X",
uid[7], uid[6], uid[5], uid[4],
uid[3], uid[2], uid[1], uid[0]
);
return target;
return dest;
}

View file

@ -142,6 +142,6 @@ static const int Iso15693FrameEOF[] = {
-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
};
char *Iso15693sprintUID(char *target, uint8_t *uid);
char *iso15693_sprintUID(char *dest, uint8_t *uid);
#endif