Comparing version 1.1.0 to 1.2.0
{ | ||
"name": "pi-spi", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Simple async SPI library for Raspberry Pi", | ||
@@ -23,4 +23,4 @@ "main": "index.js", | ||
"dependencies": { | ||
"nan": "^2.3.5" | ||
"nan": "^2.14.0" | ||
} | ||
} |
@@ -15,3 +15,3 @@ # pi-spi | ||
var spi = SPI.initialize("/dev/spidev0.0"), | ||
test = Buffer("Hello, World!"); | ||
test = Buffer.from("Hello, World!"); | ||
@@ -18,0 +18,0 @@ // reads and writes simultaneously |
// this one is intended for testing stub binding on platforms where not actually implemented | ||
var stubDevice = (process.platform === 'win32') ? "\\\\.\\NUL" : "/dev/null"; | ||
require("./").initialize(stubDevice).transfer(Buffer("-"), function (e,d) { | ||
require("./").initialize(stubDevice).transfer(Buffer.from("-"), function (e,d) { | ||
console.log(e,d); | ||
}); |
var SPI = require("./index"); | ||
var spi = SPI.initialize("/dev/spidev0.0"), | ||
test = Buffer("Hello, World!"); | ||
var spi = SPI.initialize(process.argv[2] || "/dev/spidev0.0"), | ||
test = Buffer.from("Hello, World!"); | ||
spi.transfer(test, test.length, function (e,d) { | ||
@@ -6,0 +6,0 @@ if (e) { |
Sorry, the diff of this file is not supported yet
13597
Updatednan@^2.14.0