From be86197b0b43b42439a54d16154a53a5ad2a3b79 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Tue, 14 Jun 2022 19:12:17 +0200 Subject: [PATCH] Added macro to disable APDU debug. It will speed up the device notably. Signed-off-by: Pol Henarejos --- src/ccid/ccid2040.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ccid/ccid2040.h b/src/ccid/ccid2040.h index 19949da..b980de3 100644 --- a/src/ccid/ccid2040.h +++ b/src/ccid/ccid2040.h @@ -36,6 +36,7 @@ extern int register_app(app_t * (*)()); extern const uint8_t historical_bytes[]; +#ifdef DEBUG_APDU #define DEBUG_PAYLOAD(_p,_s) { \ printf("Payload %s (%d bytes):\r\n", #_p,_s);\ for (int _i = 0; _i < _s; _i += 16) {\ @@ -52,7 +53,9 @@ extern const uint8_t historical_bytes[]; printf("\r\n");\ } printf("\r\n"); \ } - +#else +#define DEBUG_PAYLOAD(_p,_s) +#endif struct apdu { uint8_t *header;