[Pcsclite-git-commit] [CCID] 01/02: PowerOn: use automatic voltage selection when needed
Ludovic Rousseau
rousseau at moszumanska.debian.org
Mon Oct 3 15:55:50 UTC 2016
This is an automated email from the git hooks/post-receive script.
rousseau pushed a commit to branch master
in repository CCID.
commit 84966dfaae8c37702512774c5e4d510998b0e8b2
Author: Ludovic Rousseau <ludovic.rousseau at free.fr>
Date: Mon Oct 3 11:37:25 2016 +0200
PowerOn: use automatic voltage selection when needed
CCID standard 1.1, page 26, ch 6.1.1 PC_to_RDR_IccPowerOn
" For a CCID which features “automatic activation of ICC on inserting”,
the bPowerSelect field must be 00h (Automatic Voltage Selection) in the
first PC_to_RDR_IccPowerOn message received for a slot which was
previously inactive. "
---
src/ccid.h | 1 +
src/commands.c | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/ccid.h b/src/ccid.h
index 57f6ef1..77ec559 100644
--- a/src/ccid.h
+++ b/src/ccid.h
@@ -141,6 +141,7 @@ typedef struct
/* Features from dwFeatures */
#define CCID_CLASS_AUTO_CONF_ATR 0x00000002
+#define CCID_CLASS_AUTO_ACTIVATION 0x00000004
#define CCID_CLASS_AUTO_VOLTAGE 0x00000008
#define CCID_CLASS_AUTO_BAUD 0x00000020
#define CCID_CLASS_AUTO_PPS_PROP 0x00000040
diff --git a/src/commands.c b/src/commands.c
index c6cd40a..fbca893 100644
--- a/src/commands.c
+++ b/src/commands.c
@@ -190,7 +190,8 @@ RESPONSECODE CmdPowerOn(unsigned int reader_index, unsigned int * nlength,
/* store length of buffer[] */
length = *nlength;
- if (ccid_descriptor->dwFeatures & CCID_CLASS_AUTO_VOLTAGE)
+ if ((ccid_descriptor->dwFeatures & CCID_CLASS_AUTO_VOLTAGE)
+ || (ccid_descriptor->dwFeatures & CCID_CLASS_AUTO_ACTIVATION))
voltage = 0; /* automatic voltage selection */
else
{
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pcsclite/CCID.git
More information about the Pcsclite-cvs-commit
mailing list