/[pcsclite]/trunk/Drivers/ccid/src/ccid_serial.c
ViewVC logotype

Log of /trunk/Drivers/ccid/src/ccid_serial.c

Parent Directory Parent Directory | Revision Log Revision Log


Links to HEAD: (view) (download) (annotate)
Sticky Revision:

Revision 3271 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jan 5 14:56:38 2009 UTC (4 years, 5 months ago) by rousseau
File length: 22163 byte(s)
Diff to previous 3270 , to selected 414
use int instead of long to store a reader ID (32 bits)

Revision 3270 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jan 5 14:46:36 2009 UTC (4 years, 5 months ago) by rousseau
File length: 22164 byte(s)
Diff to previous 3269 , to selected 414
tag output parameters with /*@out@*/

Revision 3269 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jan 5 14:35:25 2009 UTC (4 years, 5 months ago) by rousseau
File length: 22154 byte(s)
Diff to previous 3268 , to selected 414
use snprintf() instead of sprintf() to avoid potential buffer overflow

Revision 3268 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jan 5 14:28:26 2009 UTC (4 years, 5 months ago) by rousseau
File length: 22085 byte(s)
Diff to previous 2983 , to selected 414
explicitly cast result in void when not used (reported by the splint tool)

Revision 2983 - (view) (download) (annotate) - [select for diffs]
Modified Sun Jun 8 08:31:47 2008 UTC (5 years ago) by rousseau
File length: 22031 byte(s)
Diff to previous 2974 , to selected 414
ReadSerial(): return the length of data read in *length

Thanks to Alexander Georg for the bug report

Revision 2974 - (view) (download) (annotate) - [select for diffs]
Modified Wed May 28 18:32:52 2008 UTC (5 years ago) by rousseau
File length: 21996 byte(s)
Diff to previous 2871 , to selected 414
update Free Software Foundation mail address

Revision 2871 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 8 09:34:13 2008 UTC (5 years, 2 months ago) by rousseau
File length: 22000 byte(s)
Diff to previous 2858 , to selected 414
Simulate card absence for the GemCore SIM Pro

Revision 2858 - (view) (download) (annotate) - [select for diffs]
Modified Sat Mar 29 15:15:39 2008 UTC (5 years, 2 months ago) by rousseau
File length: 21935 byte(s)
Diff to previous 2152 , to selected 414
WriteSerial(): use unsigned int instead of int

ccid_serial.c:199: warning: comparison between signed and unsigned

Revision 2152 - (view) (download) (annotate) - [select for diffs]
Modified Wed Sep 6 20:06:58 2006 UTC (6 years, 9 months ago) by rousseau
File length: 21926 byte(s)
Diff to previous 1808 , to selected 414
remove trailing spaces at end of lines

Revision 1808 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jan 18 10:25:34 2006 UTC (7 years, 5 months ago) by rousseau
File length: 21939 byte(s)
Diff to previous 1801 , to selected 414
add support of GemCore SIM Pro and GemCore POS Pro (serial and USB).

Revision 1801 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jan 17 13:41:26 2006 UTC (7 years, 5 months ago) by rousseau
File length: 16965 byte(s)
Diff to previous 1771 , to selected 414
OpenSerialByName(): call CloseSerial() if the "Get firmware" or "Change
card movement notification" command failed

Revision 1771 - (view) (download) (annotate) - [select for diffs]
Modified Tue Nov 29 12:21:00 2005 UTC (7 years, 6 months ago) by rousseau
File length: 16905 byte(s)
Diff to previous 1703 , to selected 414
remove PCSC/ from the pcsc-lite #include header files since the PCSC/
part is already given by `pkg-config --cflags libpcsclite`

Revision 1703 - (view) (download) (annotate) - [select for diffs]
Modified Mon Nov 7 15:46:03 2005 UTC (7 years, 7 months ago) by rousseau
File length: 16910 byte(s)
Diff to previous 1496 , to selected 414
remove #ifdef DEBUG_LEVEL_COMM since DEBUG_LEVEL_COMM is a numeric value
and not a compilation flag anymore. Debug is always active and filtered
by pcscd.

Revision 1496 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 2 13:37:13 2005 UTC (8 years, 1 month ago) by rousseau
File length: 17066 byte(s)
Diff to previous 1491 , to selected 414
typo in the data rates list

Revision 1491 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 2 11:33:04 2005 UTC (8 years, 1 month ago) by rousseau
File length: 17066 byte(s)
Diff to previous 1485 , to selected 414
ReadSerial(): if we get a NAK we return STATUS_COMM_NAK to the above
layer to replay the command instead of just restarting the read

Revision 1485 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 2 09:17:53 2005 UTC (8 years, 1 month ago) by rousseau
File length: 17017 byte(s)
Diff to previous 1479 , to selected 414
Open*ByName(): initialise dwMaxDataRate field

Revision 1479 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 27 14:10:38 2005 UTC (8 years, 1 month ago) by rousseau
File length: 16966 byte(s)
Diff to previous 1472 , to selected 414
Open*ByName: do not initialise the now disappeared .dwMaxDataRate field

Revision 1472 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 27 13:35:19 2005 UTC (8 years, 1 month ago) by rousseau
File length: 17017 byte(s)
Diff to previous 1458 , to selected 414
OpenSerialByName(): inhibit the Plug-n-Play string by setting the RTS
signal to low. Mainly useful for the GemPC Card (PCMCIA)

Revision 1458 - (view) (download) (annotate) - [select for diffs]
Modified Wed Apr 27 12:09:26 2005 UTC (8 years, 1 month ago) by rousseau
File length: 16473 byte(s)
Diff to previous 1453 , to selected 414
SerialDataRates[] is unsigned

Revision 1453 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 26 14:34:52 2005 UTC (8 years, 1 month ago) by rousseau
File length: 16464 byte(s)
Diff to previous 1447 , to selected 414
use the calculated read timeout instead of a fixed value

Revision 1447 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 26 13:44:08 2005 UTC (8 years, 1 month ago) by rousseau
File length: 16468 byte(s)
Diff to previous 1444 , to selected 414
OpenSerialByName(): the reader does not support the Get Data Rates CCID
function so the list of supported data rates is hard coded.

Revision 1444 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 26 12:38:25 2005 UTC (8 years, 1 month ago) by rousseau
File length: 15988 byte(s)
Diff to previous 1399 , to selected 414
OpenSerialByName(): set card movement notification in synchronous mde

Revision 1399 - (view) (download) (annotate) - [select for diffs]
Modified Mon Mar 14 18:56:53 2005 UTC (8 years, 3 months ago) by rousseau
File length: 15449 byte(s)
Diff to previous 1330 , to selected 414
change licence from GNU GPL to GNU LGPL

Revision 1330 - (view) (download) (annotate) - [select for diffs]
Modified Mon Feb 21 14:06:53 2005 UTC (8 years, 3 months ago) by rousseau
File length: 15424 byte(s)
Diff to previous 1292 , to selected 414
OpenSerialByName(): use tx_buffer[] = { 0x02 } insead of "\x02" since we
want 1 byte only and not a null-terminated string

Revision 1292 - (view) (download) (annotate) - [select for diffs]
Modified Wed Oct 27 13:52:44 2004 UTC (8 years, 7 months ago) by rousseau
File length: 15422 byte(s)
Diff to previous 1149 , to selected 414
OpenSerialByName(): use %s instead of %d for dev_name

Revision 1149 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 6 11:00:25 2004 UTC (8 years, 10 months ago) by rousseau
File length: 15422 byte(s)
Diff to previous 1147 , to selected 414
use pbSeq instead of bSeq

Revision 1147 - (view) (download) (annotate) - [select for diffs]
Modified Fri Aug 6 10:19:48 2004 UTC (8 years, 10 months ago) by rousseau
File length: 15344 byte(s)
Diff to previous 1146 , to selected 414
use a dynamic timeout when reading the serial port.

The first timeout use when detecting the reader is 2 seconds to not wait
too long if no reader is connected. Later timeouts are set to 1 minute
to allow long time APDU.

Revision 1146 - (view) (download) (annotate) - [select for diffs]
Modified Wed Aug 4 21:30:14 2004 UTC (8 years, 10 months ago) by rousseau
File length: 15124 byte(s)
Diff to previous 1106 , to selected 414
remove defaultFeatures management (was used for SCR331-DI hack)

Revision 1106 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 28 08:33:18 2004 UTC (8 years, 10 months ago) by rousseau
File length: 15207 byte(s)
Diff to previous 1101 , to selected 414
use reader_index instead of lun as reader identification

Revision 1101 - (view) (download) (annotate) - [select for diffs]
Modified Mon Jul 26 09:16:16 2004 UTC (8 years, 10 months ago) by rousseau
File length: 15121 byte(s)
Diff to previous 1091 , to selected 414
initialise ccid.defaultFeatures field

Revision 1091 - (view) (download) (annotate) - [select for diffs]
Modified Wed Jul 21 08:59:28 2004 UTC (8 years, 11 months ago) by rousseau
File length: 15038 byte(s)
Diff to previous 1077 , to selected 414
initialise bMaxSlotIndex and ccid.bCurrentSlotIndex fields

Revision 1077 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 16 06:53:25 2004 UTC (8 years, 11 months ago) by rousseau
File length: 14942 byte(s)
Diff to previous 1054 , to selected 414
rename PCSCLITE_MAX_READERS in CCID_DRIVER_MAX_READERS

This value is not defined by pcsc-lite but is internal to the CCID
driver. By default pcsc-lite supports the same number of readers (16).

Revision 1054 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 9 13:23:37 2004 UTC (8 years, 11 months ago) by rousseau
File length: 14936 byte(s)
Diff to previous 1053 , to selected 414
mark potentially null values as /*@null@*/ for splint

Revision 1053 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 9 13:21:44 2004 UTC (8 years, 11 months ago) by rousseau
File length: 14925 byte(s)
Diff to previous 1050 , to selected 414
mark unused arguments as /*@unused@*/ for splint

Revision 1050 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 9 08:40:15 2004 UTC (8 years, 11 months ago) by rousseau
File length: 14911 byte(s)
Diff to previous 1049 , to selected 414
ReadChunk() and get_bytes() are internal use in ccid_serial.c so declare
them static

Revision 1049 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 9 08:28:44 2004 UTC (8 years, 11 months ago) by rousseau
File length: 14699 byte(s)
Diff to previous 1048 , to selected 414
lun is (unsigned int) so reader = LunToReaderIndex(lun) is also (unsigned int)

Revision 1048 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 9 08:25:51 2004 UTC (8 years, 11 months ago) by rousseau
File length: 14681 byte(s)
Diff to previous 1047 , to selected 414
OpenSerialByName(): arguments of CmdEscape() are unsigned

Revision 1047 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 9 08:22:24 2004 UTC (8 years, 11 months ago) by rousseau
File length: 14654 byte(s)
Diff to previous 1046 , to selected 414
replace "121234" by "123456" to make it more clear it is a memory reservation
for 6 characters

Revision 1046 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 9 08:21:07 2004 UTC (8 years, 11 months ago) by rousseau
File length: 14654 byte(s)
Diff to previous 1045 , to selected 414
remove a unneeded cast in (int)lun

Revision 1045 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 9 08:18:17 2004 UTC (8 years, 11 months ago) by rousseau
File length: 14659 byte(s)
Diff to previous 1044 , to selected 414
allow splint to continue parsing after use of type fd_set

Revision 1044 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 9 08:11:11 2004 UTC (8 years, 11 months ago) by rousseau
File length: 14631 byte(s)
Diff to previous 1043 , to selected 414
ReadSerial(): the unknown card movement byte is in "c" not "buffer[3]"

Revision 1043 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 9 07:10:17 2004 UTC (8 years, 11 months ago) by rousseau
File length: 14639 byte(s)
Diff to previous 1022 , to selected 414
lun is (unsigned int) instead of (int)

Avoid a warning by splint in #define LunToReaderIndex(Lun) (Lun>>16)
Left operand of >> may be negative (int): lun >> 16

Revision 1022 - (view) (download) (annotate) - [select for diffs]
Modified Fri Jul 2 13:58:11 2004 UTC (8 years, 11 months ago) by rousseau
File length: 14572 byte(s)
Diff to previous 900 , to selected 414
OpenSerialByName(): perform a command (get the reader firmware) to be
sure a GemPC Twin (serial or pcmcia) reader is connected

Revision 900 - (view) (download) (annotate) - [select for diffs]
Modified Tue May 25 14:46:02 2004 UTC (9 years ago) by rousseau
File length: 14045 byte(s)
Diff to previous 892 , to selected 414
add support for SCardGetAttrib(.., IOCTL_SMARTCARD_VENDOR_VERIFY_PIN, ..)
to know if the reader supports SCardControl(.., IOCTL_SMARTCARD_VENDOR_VERIFY_PIN, ..)

Revision 892 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 24 12:58:43 2004 UTC (9 years ago) by rousseau
File length: 13999 byte(s)
Diff to previous 877 , to selected 414
recompile using gcc -pedantic and correct:
- some C++ syntax comments
- many signedness "problems"

Revision 877 - (view) (download) (annotate) - [select for diffs]
Modified Mon May 17 14:35:51 2004 UTC (9 years, 1 month ago) by rousseau
File length: 14021 byte(s)
Diff to previous 774 , to selected 414
reorganize header files

Revision 774 - (view) (download) (annotate) - [select for diffs]
Modified Tue Apr 6 13:15:34 2004 UTC (9 years, 2 months ago) by rousseau
File length: 13999 byte(s)
Diff to previous 694 , to selected 414
add { } to avoid ambiguities now that DEBUG_* are "if (x) y" constructions

Revision 694 - (view) (download) (annotate) - [select for diffs]
Modified Thu Feb 12 16:09:32 2004 UTC (9 years, 4 months ago) by rousseau
File length: 13977 byte(s)
Diff to previous 672 , to selected 414
fill dwDefaultClock and dwMaxDataRate according to the reader descriptor

Revision 672 - (view) (download) (annotate) - [select for diffs]
Modified Tue Feb 3 15:43:51 2004 UTC (9 years, 4 months ago) by rousseau
File length: 13876 byte(s)
Diff to previous 649 , to selected 414
add dwMaxIFSD field

Revision 649 - (view) (download) (annotate) - [select for diffs]
Modified Tue Jan 27 13:32:55 2004 UTC (9 years, 4 months ago) by rousseau
File length: 13832 byte(s)
Diff to previous 612 , to selected 414
add support of IFDHCreateChannelByName

Revision 612 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 15 13:45:37 2004 UTC (9 years, 5 months ago) by rousseau
File length: 13348 byte(s)
Diff to previous 608 , to selected 414
call ccid_open_hack() in IFDHCreateChannel() instead of in each OpenPort()

Revision 608 - (view) (download) (annotate) - [select for diffs]
Modified Thu Jan 15 08:30:31 2004 UTC (9 years, 5 months ago) by rousseau
File length: 13371 byte(s)
Diff to previous 462 , to selected 414
remove function name from debug message since __FUNCTION__ is now used in
DEBUG_* macro definition

Revision 462 - (view) (download) (annotate) - [select for diffs]
Modified Mon Sep 22 14:24:26 2003 UTC (9 years, 8 months ago) by rousseau
File length: 13475 byte(s)
Diff to previous 453 , to selected 414
ReadChunk() realy reads up to min_length bytes. Add some debug messages
in the state automata.

Revision 453 - (view) (download) (annotate) - [select for diffs]
Modified Fri Sep 19 12:08:09 2003 UTC (9 years, 9 months ago) by rousseau
File length: 12627 byte(s)
Diff to previous 414
complete reimplementation of the Twin serial protocol using a finite
state automata (code much simpler)

Revision 414 - (view) (download) (annotate) - [selected]
Added Wed Sep 10 09:17:43 2003 UTC (9 years, 9 months ago) by rousseau
File length: 12656 byte(s)
manage serial protocol used by the GemPC Twin. Thanks to Niki W. Waibel
for a working prototype.

This form allows you to request diffs between any two revisions of this file. For each of the two "sides" of the diff, enter a numeric revision.

  Diffs between and
  Type of Diff should be a

  ViewVC Help
Powered by ViewVC 1.1.5