From 264f615b659e1e362aef0739cc2b4bb1eed7e2b4 Mon Sep 17 00:00:00 2001 From: Eric Wild Date: Sat, 26 Jun 2021 02:54:20 +0200 Subject: [PATCH] cardemu: support 1v8 for the tester The tester has shifters, while the original simtrace relies upon the reader restarting the powerup attempt with > 1v8 after not respondig due to a lack of shifters and therefore 1v8 support. Change-Id: I520aa26c6e0fb34568a4f632943efa59a0da831c --- firmware/libcommon/source/mode_cardemu.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/firmware/libcommon/source/mode_cardemu.c b/firmware/libcommon/source/mode_cardemu.c index b9971eda..2440ec5e 100644 --- a/firmware/libcommon/source/mode_cardemu.c +++ b/firmware/libcommon/source/mode_cardemu.c @@ -461,7 +461,11 @@ static int card_vcc_adc_init(void) static void process_vcc_adc(struct cardem_inst *ci) { +#ifdef octsimtest + if (ci->vcc_uv >= VCC_UV_THRESH_1V8) +#else if (ci->vcc_uv >= VCC_UV_THRESH_3V) +#endif ci->vcc_active = true; else ci->vcc_active = false;