From f6bf349a538a672fda8a3ff28b96088561a37023 Mon Sep 17 00:00:00 2001 From: Christina Quast Date: Thu, 15 Jan 2015 14:42:04 +0100 Subject: [PATCH] CCID: Change cold to warm rst on PCtoRDRIccPowerOn Before this change pcsc_scan would always receive garbage from the stack when the reset button was pressed on the simtrace board. Because the return value of ISO7816_GetChar is never checked anywhere. If there is a timeout in this function, the non-initialized local variable values which happen to be lying around on the stack are inserted into the ATR message and send to the host. This only helps mitigating the symptoms but does not remove the reason for the behavior. On the other hand, is it really feasable to check the return value on EVERY call to ISO7816_GetChar..? --- .../atmel_softpack_libraries/usb/device/ccid/cciddriver.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sam3s_example/atmel_softpack_libraries/usb/device/ccid/cciddriver.c b/sam3s_example/atmel_softpack_libraries/usb/device/ccid/cciddriver.c index dcc48be6..8958890e 100644 --- a/sam3s_example/atmel_softpack_libraries/usb/device/ccid/cciddriver.c +++ b/sam3s_example/atmel_softpack_libraries/usb/device/ccid/cciddriver.c @@ -849,7 +849,8 @@ static void PCtoRDRIccPowerOn( void ) ccidDriver.sCcidCommand.bSpecific_0 = VOLTS_AUTO; } - ISO7816_cold_reset(); + ISO7816_warm_reset(); +// ISO7816_cold_reset(); // for emulation only //JCB if ( ccidDriver.sCcidCommand.bSpecific_0 != VOLTS_5_0 ) {