iso14a reader patches [Hagen Fritsch]

This commit is contained in:
adam@algroup.co.uk committed 2010-07-13 13:39:30 +00:00
1 parent 7e758047e4
commit 534983d735
12 files changed
+255 -95

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
#include <stdio.h>
#include <stdint.h>
void print_hex(const uint8_t * data, const size_t len)
{
size_t i;
for (i=0; i < len; i++)
printf("%02x ", data[i]);
printf("\n");
}
char * sprint_hex(const uint8_t * data, const size_t len) {
static char buf[1024];
char * tmp = buf;
size_t i;
for (i=0; i < len && i < 1024/3; i++, tmp += 3)
sprintf(tmp, "%02x ", data[i]);
return buf;
}