[Pcsclite-cvs-commit] CVS Drivers/ccid/src

CVS User rousseau ludovic.rousseau@free.fr
Tue, 26 Apr 2005 12:38:27 +0000


Update of /cvsroot/pcsclite/Drivers/ccid/src
In directory haydn:/tmp/cvs-serv18677/src

Modified Files:
	ccid_serial.c 
Log Message:
OpenSerialByName(): set card movement notification in synchronous mde


--- /cvsroot/pcsclite/Drivers/ccid/src/ccid_serial.c	2005/03/14 18:56:50	1.33
+++ /cvsroot/pcsclite/Drivers/ccid/src/ccid_serial.c	2005/04/26 12:38:25	1.34
@@ -20,7 +20,7 @@
  */
 
 /*
- * $Id: ccid_serial.c,v 1.33 2005/03/14 18:56:50 rousseau Exp $
+ * $Id: ccid_serial.c,v 1.34 2005/04/26 12:38:25 rousseau Exp $
  */
 
 #include <stdio.h>
@@ -591,6 +591,22 @@
 		DEBUG_INFO2("Firmware: %s", rx_buffer);
 	}
 
+	/* perform a command to configure GemPC Twin reader card movement
+	 * notification to synchronous mode: the card movement is notified _after_
+	 * the host command and _before_ the reader anwser */
+	{
+		unsigned char tx_buffer[] = { 0x01, 0x01, 0x01};
+		unsigned char rx_buffer[50];
+		unsigned int rx_length = sizeof(rx_buffer);
+
+		if (IFD_SUCCESS != CmdEscape(reader_index, tx_buffer, sizeof(tx_buffer),
+			rx_buffer, &rx_length))
+		{
+			DEBUG_CRITICAL("Change card movement notification failed.");
+			return STATUS_UNSUCCESSFUL;
+		}
+	}
+
 	return STATUS_SUCCESS;
 } /* OpenSerialByName */