cardreader: add SCARD_CTL_CODE js implementation
This commit is contained in:
committed by
Santiago Gimeno
parent
98a5269015
commit
1a369f0fad
@@ -140,6 +140,15 @@ CardReader.prototype.control = function(data, control_code, res_len, cb) {
|
||||
});
|
||||
};
|
||||
|
||||
CardReader.prototype.SCARD_CTL_CODE = function(code) {
|
||||
var isWin = /^win/.test(process.platform);
|
||||
if (isWin) {
|
||||
return (0x31 << 16 | (code) << 2);
|
||||
} else {
|
||||
return 0x42000000 + (code);
|
||||
}
|
||||
};
|
||||
|
||||
// extend prototype
|
||||
function inherits(target, source) {
|
||||
for (var k in source.prototype) {
|
||||
|
||||
Reference in New Issue
Block a user