From acb598756c52459f3a38fc92dfdd0e445489d056 Mon Sep 17 00:00:00 2001 From: iceman1001 Date: Wed, 29 Jul 2020 11:00:06 +0200 Subject: [PATCH] optional log --- armsrc/i2c.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/armsrc/i2c.c b/armsrc/i2c.c index 23ae07f10..c6d9c6fb3 100644 --- a/armsrc/i2c.c +++ b/armsrc/i2c.c @@ -713,7 +713,6 @@ bool GetATR(smart_card_atr_t *card_ptr) { void SmartCardAtr(void) { smart_card_atr_t card; LED_D_ON(); - clear_trace(); set_tracing(true); I2C_Reset_EnterMainProgram(); bool isOK = GetATR(&card); @@ -730,10 +729,13 @@ void SmartCardRaw(uint64_t arg0, uint64_t arg1, uint8_t *data) { uint8_t *resp = BigBuf_malloc(ISO7618_MAX_FRAME); smartcard_command_t flags = arg0; - if ((flags & SC_CONNECT)) + if ((flags & SC_CLEARLOG) == SC_CLEARLOG) clear_trace(); - set_tracing(true); + if ((flags & SC_LOG) == SC_LOG) + set_tracing(true); + else + set_tracing(false); if ((flags & SC_CONNECT)) {