@pokusew/pcsclite
Advanced tools
Comparing version 0.4.16 to 0.4.17
@@ -117,4 +117,7 @@ "use strict"; | ||
options.share_mode = options.share_mode || this.SCARD_SHARE_EXCLUSIVE; | ||
options.protocol = options.protocol || this.SCARD_PROTOCOL_T0 | this.SCARD_PROTOCOL_T1; | ||
if (typeof options.protocol === 'undefined' || options.protocol === null) { | ||
options.protocol = this.SCARD_PROTOCOL_T0 | this.SCARD_PROTOCOL_T1; | ||
} | ||
if (!this.connected) { | ||
@@ -175,2 +178,14 @@ this._connect(options.share_mode, options.protocol, cb); | ||
CardReader.prototype.SCARD_CTL_CODE = function (code) { | ||
const isWin = /^win/.test(process.platform); | ||
if (isWin) { | ||
return (0x31 << 16 | (code) << 2); | ||
} else { | ||
return 0x42000000 + (code); | ||
} | ||
}; | ||
// extend prototype | ||
@@ -177,0 +192,0 @@ function inherits(target, source) { |
{ | ||
"name": "@pokusew/pcsclite", | ||
"version": "0.4.16", | ||
"version": "0.4.17", | ||
"description": "Bindings over PC/SC to access Smart Cards", | ||
@@ -5,0 +5,0 @@ "keywords": [ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
981372
326