mirror of
https://github.com/polhenarejos/pico-keys-sdk
synced 2026-05-28 17:11:23 +02:00
20
src/apdu.h
20
src/apdu.h
@@ -48,15 +48,17 @@ extern int register_app(app_t * (*)());
|
|||||||
printf("\r\n");\
|
printf("\r\n");\
|
||||||
} printf("\r\n"); \
|
} printf("\r\n"); \
|
||||||
}
|
}
|
||||||
#define DEBUG_DATA(_p, _s) \
|
#define DEBUG_DATA(_p, _s) \
|
||||||
{ \
|
{ \
|
||||||
printf("Data %s (%d bytes):\r\n", #_p, _s); \
|
printf("Data %s (%d bytes):\r\n", #_p, _s); \
|
||||||
for (int _i = 0; _i < _s; _i++) \
|
char *tmp = (char *)calloc(1, 2 * _s + 1); \
|
||||||
{ \
|
for (int _i = 0; _i < _s; _i++) \
|
||||||
printf("%02X", (_p)[_i]); \
|
{ \
|
||||||
} \
|
sprintf(&tmp[2 * _i], "%02X", (_p)[_i]); \
|
||||||
printf("\n"); \
|
} \
|
||||||
}
|
printf("%s\n", tmp); \
|
||||||
|
free(tmp); \
|
||||||
|
}
|
||||||
|
|
||||||
#else
|
#else
|
||||||
#define DEBUG_PAYLOAD(_p,_s)
|
#define DEBUG_PAYLOAD(_p,_s)
|
||||||
|
|||||||
Reference in New Issue
Block a user