{"_id":"@eeemarv/io-spi","_rev":"10-be148c5712d3862f4379ab58096494cf","name":"@eeemarv/io-spi","dist-tags":{"latest":"0.2.8"},"versions":{"0.1.0":{"name":"@eeemarv/io-spi","version":"0.1.0","keywords":["SPI","spidev","nodejs","async","Raspberry Pi","rpi","Orange Pi","ioctl","embedded","linux"],"author":{"name":"Maarten Vandekeybus"},"license":"MIT","_id":"@eeemarv/io-spi@0.1.0","maintainers":[{"name":"eeemarv","email":"info@martti.be"}],"homepage":"https://github.com/eeemarv/io-spi#readme","bugs":{"url":"https://github.com/eeemarv/io-spi/issues"},"os":["linux"],"dist":{"shasum":"ef89c6acf93b9ae06cbd27db64a8ee44afd72884","tarball":"https://registry.npmjs.org/@eeemarv/io-spi/-/io-spi-0.1.0.tgz","fileCount":26,"integrity":"sha512-WDSxge58Cjj4cWFoSaixCN5n8S/1a02qmFK5Q2sj8mrmdVXqFoHDyiBFsThLksEH/lYunQqYTuNLQYHsRsOKFQ==","signatures":[{"sig":"MEYCIQD3bx8myfATKF7Wrym0wy6XnNIEMFqGOW2sr7/BSYDiuAIhAMCI5GQgrV38pwdWDOpIBP8fUIaU/XJKnN5HxNqQ5R7a","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66111},"main":"./index.mjs","type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"import":"./index.mjs","require":"./index.cjs"},"gitHead":"d1a5df28ecea6edf9754f15fff28fdafd8a1284c","gypfile":true,"scripts":{"build":"node-gyp rebuild","clean":"node-gyp clean","install":"node-gyp rebuild"},"_npmUser":{"name":"eeemarv","email":"info@martti.be"},"repository":{"url":"git+https://github.com/eeemarv/io-spi.git","type":"git"},"_npmVersion":"11.4.1","description":"Promise Based Native Node.js Addon for SPI devices on Linux with ioctl","directories":{},"_nodeVersion":"22.15.0","dependencies":{"node-addon-api":"^8.3.1"},"_hasShrinkwrap":false,"devDependencies":{"node-gyp":"^11.2.0","@types/node":"^24.0.1"},"_npmOperationalInternal":{"tmp":"tmp/io-spi_0.1.0_1749847378907_0.914743564716797","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@eeemarv/io-spi","version":"0.2.0","keywords":["SPI","spidev","nodejs","async","Raspberry Pi","rpi","Orange Pi","ioctl","embedded","linux"],"author":{"name":"Maarten Vandekeybus"},"license":"MIT","_id":"@eeemarv/io-spi@0.2.0","maintainers":[{"name":"eeemarv","email":"info@martti.be"}],"homepage":"https://github.com/eeemarv/io-spi#readme","bugs":{"url":"https://github.com/eeemarv/io-spi/issues"},"os":["linux"],"dist":{"shasum":"7d6323956dd09362d81cdd68525674a3c04a772a","tarball":"https://registry.npmjs.org/@eeemarv/io-spi/-/io-spi-0.2.0.tgz","fileCount":26,"integrity":"sha512-VvSYFVuA1n7qHJezUBdnOSRKeDwbytZGR0/RHypg43uk6AdUh+w270vdJC1ZL83PWxA239Yd6hRpSBue/FHjMg==","signatures":[{"sig":"MEYCIQC/5Kgsa04FRpjXJoLjndPG95bFffVoREv6gnw98AoxMwIhAIIaH3If76vcl6hpGqGqwVjo0+nlsNlwdPlj58m3mdCu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66140},"main":"./index.mjs","type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.cjs"},"gitHead":"054c59cf63de89bd7d026162f360685f6e7bdf86","gypfile":true,"scripts":{"build":"node-gyp rebuild","clean":"node-gyp clean","install":"node-gyp rebuild"},"_npmUser":{"name":"eeemarv","email":"info@martti.be"},"repository":{"url":"git+https://github.com/eeemarv/io-spi.git","type":"git"},"_npmVersion":"11.4.1","description":"Promise Based Native Node.js Addon for SPI devices on Linux with ioctl","directories":{},"_nodeVersion":"22.15.0","dependencies":{"node-addon-api":"^8.3.1"},"_hasShrinkwrap":false,"devDependencies":{"node-gyp":"^11.2.0","@types/node":"^24.0.1"},"_npmOperationalInternal":{"tmp":"tmp/io-spi_0.2.0_1749906560322_0.9308378960674797","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@eeemarv/io-spi","version":"0.2.1","keywords":["SPI","spidev","nodejs","async","Raspberry Pi","rpi","Orange Pi","ioctl","embedded","linux"],"author":{"name":"Maarten Vandekeybus"},"license":"MIT","_id":"@eeemarv/io-spi@0.2.1","maintainers":[{"name":"eeemarv","email":"info@martti.be"}],"homepage":"https://github.com/eeemarv/io-spi#readme","bugs":{"url":"https://github.com/eeemarv/io-spi/issues"},"os":["linux"],"dist":{"shasum":"ab5ab29ce881746b5967e32fdd6d63e6d09d3f38","tarball":"https://registry.npmjs.org/@eeemarv/io-spi/-/io-spi-0.2.1.tgz","fileCount":26,"integrity":"sha512-dvL9AG8HX7RqFfTtSP+o806DyaC4s0K8xesjXaPu98unc97jgLjPENojvX+ewnpLF62pAwKvqzAdaAoWkl5Y1A==","signatures":[{"sig":"MEUCIQDfRh9IKDW6azt5DVeNeuc33hyAGiZEAdBGBrbJVjQDngIgPDzUP1xKL5Y3LsrD64Sv8mtYCnzd1eGMZs9VLjbGeeE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66152},"main":"./index.mjs","type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.cjs"},"gitHead":"4047132742e5aec6a993be546267eb0f8baed779","gypfile":true,"scripts":{"build":"node-gyp rebuild","clean":"node-gyp clean","install":"node-gyp rebuild"},"_npmUser":{"name":"eeemarv","email":"info@martti.be"},"repository":{"url":"git+https://github.com/eeemarv/io-spi.git","type":"git"},"_npmVersion":"11.4.1","description":"Promise Based Native Node.js Addon for SPI devices on Linux with ioctl","directories":{},"_nodeVersion":"22.15.0","dependencies":{"node-addon-api":"^8.3.1"},"_hasShrinkwrap":false,"devDependencies":{"node-gyp":"^11.2.0","@types/node":"^24.0.1"},"_npmOperationalInternal":{"tmp":"tmp/io-spi_0.2.1_1749908853964_0.7627625573311445","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@eeemarv/io-spi","version":"0.2.2","keywords":["SPI","spidev","nodejs","async","Raspberry Pi","rpi","Orange Pi","ioctl","embedded","linux"],"author":{"name":"Maarten Vandekeybus"},"license":"MIT","_id":"@eeemarv/io-spi@0.2.2","maintainers":[{"name":"eeemarv","email":"info@martti.be"}],"homepage":"https://github.com/eeemarv/io-spi#readme","bugs":{"url":"https://github.com/eeemarv/io-spi/issues"},"os":["linux"],"dist":{"shasum":"0bd6dfc7cf49c3bc05c3b4b579224fd7c71ac508","tarball":"https://registry.npmjs.org/@eeemarv/io-spi/-/io-spi-0.2.2.tgz","fileCount":26,"integrity":"sha512-C/hqDX4dLO9M9n+mha3Vn+dpq29dKs4yA+9XTWVXt+2/YszZ8uzoXO3VmPBxSzb7tl84Xcb1i/FnxTpYIs024w==","signatures":[{"sig":"MEUCIBBfexkUuKHpoTBoZsSn/Aq8g6a+w7evmgCC7IlMxkz2AiEAwVcPvYfmkOTgdG4AtGGHYfz6gtA7gDzQmeLlBZFE+mg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66150},"main":"./index.mjs","type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.cjs"},"gitHead":"c6d1ea96864a9915ea49e033e50668fc84ab2441","gypfile":true,"scripts":{"build":"node-gyp rebuild","clean":"node-gyp clean","install":"node-gyp rebuild"},"_npmUser":{"name":"eeemarv","email":"info@martti.be"},"repository":{"url":"git+https://github.com/eeemarv/io-spi.git","type":"git"},"_npmVersion":"11.4.1","description":"Promise Based Native Node.js Addon for SPI devices on Linux with ioctl","directories":{},"_nodeVersion":"22.15.0","dependencies":{"node-addon-api":"^8.3.1"},"_hasShrinkwrap":false,"devDependencies":{"node-gyp":"^11.2.0","@types/node":"^24.0.1"},"_npmOperationalInternal":{"tmp":"tmp/io-spi_0.2.2_1749921076820_0.061234843952607365","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@eeemarv/io-spi","version":"0.2.3","keywords":["SPI","spidev","nodejs","async","Raspberry Pi","rpi","Orange Pi","ioctl","embedded","linux"],"author":{"name":"Maarten Vandekeybus"},"license":"MIT","_id":"@eeemarv/io-spi@0.2.3","maintainers":[{"name":"eeemarv","email":"info@martti.be"}],"homepage":"https://github.com/eeemarv/io-spi#readme","bugs":{"url":"https://github.com/eeemarv/io-spi/issues"},"os":["linux"],"dist":{"shasum":"6b3199c7e55f13530a7363250b187ef5cf57cb46","tarball":"https://registry.npmjs.org/@eeemarv/io-spi/-/io-spi-0.2.3.tgz","fileCount":26,"integrity":"sha512-aFqC/g5PuLHGC6BK0JBgkKdFapiDs2/1CDWHdUACmodvOmvWVyP8JnDEUCoOll/slxQQToLJjLUs4njTfL/xMQ==","signatures":[{"sig":"MEQCIFlY6B9tVNYzOfmQQN2w00YZL06BpodMnk31tBIk0F+rAiACdwy0RCdgNtiZRPEni9IiKHujMGRz43fa/1/Xs61eUw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66164},"main":"./index.mjs","type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.cjs"},"gitHead":"5e81f73f92e3c9effe1fd43497d99b71aaf57f66","gypfile":true,"scripts":{"build":"node-gyp rebuild","clean":"node-gyp clean","install":"node-gyp rebuild"},"_npmUser":{"name":"eeemarv","email":"info@martti.be"},"repository":{"url":"git+https://github.com/eeemarv/io-spi.git","type":"git"},"_npmVersion":"11.4.1","description":"Promise Based Native Node.js Addon for SPI devices on Linux with ioctl","directories":{},"_nodeVersion":"22.15.0","dependencies":{"node-addon-api":"^8.3.1"},"_hasShrinkwrap":false,"devDependencies":{"node-gyp":"^11.2.0","@types/node":"^24.0.1"},"_npmOperationalInternal":{"tmp":"tmp/io-spi_0.2.3_1749922201835_0.9194164951302917","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@eeemarv/io-spi","version":"0.2.4","keywords":["SPI","spidev","nodejs","async","Raspberry Pi","rpi","Orange Pi","ioctl","embedded","linux"],"author":{"name":"Maarten Vandekeybus"},"license":"MIT","_id":"@eeemarv/io-spi@0.2.4","maintainers":[{"name":"eeemarv","email":"info@martti.be"}],"homepage":"https://github.com/eeemarv/io-spi#readme","bugs":{"url":"https://github.com/eeemarv/io-spi/issues"},"os":["linux"],"dist":{"shasum":"ed452b94297d475f3a9a074830ecb9f82abb992d","tarball":"https://registry.npmjs.org/@eeemarv/io-spi/-/io-spi-0.2.4.tgz","fileCount":26,"integrity":"sha512-9yxQCNcT7Uq/jwsHZEkxlwpUXyHLzQEBIWxpjABOcnvkvV1johgnE1l5gAT0/ZdDI1hMxJ6oaAinIl8RbdbNhQ==","signatures":[{"sig":"MEUCIGWSLGoAVop7+3qLBxuodYVd1DPvDJa5z5510QSdFgSXAiEAkQ8nmTOI6kbU8uKtl3rpb3DrU3dvNo2k6aHb7YYjFR8=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":66169},"main":"./index.mjs","type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.cjs"},"gitHead":"a896ef1527c51b22a5dacc34fcea7727aa50d2e0","gypfile":true,"scripts":{"build":"node-gyp rebuild","clean":"node-gyp clean","install":"node-gyp rebuild"},"_npmUser":{"name":"eeemarv","email":"info@martti.be"},"repository":{"url":"git+https://github.com/eeemarv/io-spi.git","type":"git"},"_npmVersion":"11.3.0","description":"Promise Based Native Node.js Addon for SPI devices on Linux with ioctl","directories":{},"_nodeVersion":"22.14.0","dependencies":{"node-addon-api":"^8.3.1"},"_hasShrinkwrap":false,"devDependencies":{"node-gyp":"^11.2.0","@types/node":"^24.0.1"},"_npmOperationalInternal":{"tmp":"tmp/io-spi_0.2.4_1750102334895_0.06123159710552173","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@eeemarv/io-spi","version":"0.2.5","keywords":["SPI","spidev","nodejs","async","Raspberry Pi","rpi","Orange Pi","ioctl","embedded","linux"],"author":{"name":"Maarten Vandekeybus"},"license":"MIT","_id":"@eeemarv/io-spi@0.2.5","maintainers":[{"name":"eeemarv","email":"info@martti.be"}],"homepage":"https://github.com/eeemarv/io-spi#readme","bugs":{"url":"https://github.com/eeemarv/io-spi/issues"},"os":["linux"],"dist":{"shasum":"e181d5b775ef3ba36bbe1b7396828f7614c84e1d","tarball":"https://registry.npmjs.org/@eeemarv/io-spi/-/io-spi-0.2.5.tgz","fileCount":26,"integrity":"sha512-BrF6qVa0OUldVl/lkiKRvndSYJxb+3y8WQ+zVlZASEQy5qjObN7ZT58PLE2o3ztKLEeoBDRT0MdCCGhtK5yeDQ==","signatures":[{"sig":"MEYCIQDFQq5jbTJk0vxaDwQihFpCAxA+zM4BaWCvuIgFTUp7rgIhAOf7UZJYDM9tV+Sn3ShZJ/DieubVlgh6BsvbmanxNShC","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":67008},"main":"./index.mjs","type":"module","types":"./index.d.ts","engines":{"node":">=18"},"exports":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.cjs"},"gitHead":"fb99e8d1047bc49f54cdec98b427adfe72559317","gypfile":true,"scripts":{"build":"node-gyp rebuild","clean":"node-gyp clean","install":"node-gyp rebuild"},"_npmUser":{"name":"eeemarv","actor":{"name":"eeemarv","type":"user","email":"info@martti.be"},"email":"info@martti.be"},"repository":{"url":"git+https://github.com/eeemarv/io-spi.git","type":"git"},"_npmVersion":"11.4.2","description":"Promise Based Native Node.js Addon for SPI devices on Linux","directories":{},"_nodeVersion":"22.16.0","dependencies":{"node-addon-api":"^8.3.1"},"_hasShrinkwrap":false,"devDependencies":{"node-gyp":"^11.2.0","@types/node":"^24.0.1"},"_npmOperationalInternal":{"tmp":"tmp/io-spi_0.2.5_1750177513696_0.08787933208049381","host":"s3://npm-registry-packages-npm-production"}},"0.2.6":{"name":"@eeemarv/io-spi","version":"0.2.6","keywords":["SPI","spidev","nodejs","async","Raspberry Pi","rpi","Orange Pi","ioctl","embedded","linux"],"author":{"name":"Maarten Vandekeybus"},"license":"MIT","_id":"@eeemarv/io-spi@0.2.6","maintainers":[{"name":"eeemarv","email":"info@martti.be"}],"homepage":"https://github.com/eeemarv/io-spi#readme","bugs":{"url":"https://github.com/eeemarv/io-spi/issues"},"os":["linux"],"dist":{"shasum":"59c224b0938770e2cf8e5f96f4168ed3bf3e6fa4","tarball":"https://registry.npmjs.org/@eeemarv/io-spi/-/io-spi-0.2.6.tgz","fileCount":19,"integrity":"sha512-dvku99ge+v0CVrmAm/jecpHwV//6HgQv6QpFwqu9vjcn7+puX0T1hZsoJNlDIT83bPsJTPe56nKLU1P13xPmDg==","signatures":[{"sig":"MEQCIDVXt8l9T/AlkuNvz/80epZK0+LnhkuSrjLjKU+FJ8pfAiBYZNacN4zV2EUwpeFuT5UL3ysyXEh/hDViwPMrivlD5w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":41595},"main":"./index.mjs","type":"module","types":"./index.d.ts","engines":{"node":">=20"},"exports":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.cjs"},"gitHead":"8aa74620c35746f98583dfd3a635c428bd11a7d1","gypfile":true,"scripts":{"build":"node-gyp rebuild","clean":"node-gyp clean","install":"node-gyp rebuild"},"_npmUser":{"name":"eeemarv","actor":{"name":"eeemarv","type":"user","email":"info@martti.be"},"email":"info@martti.be"},"repository":{"url":"git+https://github.com/eeemarv/io-spi.git","type":"git"},"_npmVersion":"11.4.2","description":"Promise Based Native Node.js Addon for SPI devices on Linux","directories":{},"_nodeVersion":"22.16.0","dependencies":{"node-addon-api":"^8.3.1"},"_hasShrinkwrap":false,"devDependencies":{"mock-fs":"^5.5.0","node-gyp":"^11.2.0","@types/node":"^24.0.1","node-libgpiod":"^0.5.2"},"_npmOperationalInternal":{"tmp":"tmp/io-spi_0.2.6_1750452888917_0.36521279262419926","host":"s3://npm-registry-packages-npm-production"}},"0.2.7":{"name":"@eeemarv/io-spi","version":"0.2.7","keywords":["SPI","spidev","nodejs","async","Raspberry Pi","rpi","Orange Pi","ioctl","embedded","linux"],"author":{"name":"Maarten Vandekeybus"},"license":"MIT","_id":"@eeemarv/io-spi@0.2.7","maintainers":[{"name":"eeemarv","email":"info@martti.be"}],"homepage":"https://github.com/eeemarv/io-spi#readme","bugs":{"url":"https://github.com/eeemarv/io-spi/issues"},"os":["linux"],"dist":{"shasum":"66cc39f286cfa446568074701aecc2a9c4daddfd","tarball":"https://registry.npmjs.org/@eeemarv/io-spi/-/io-spi-0.2.7.tgz","fileCount":18,"integrity":"sha512-ox/9OIXyrQrwwe75Hqay5Lk+N66VBSS2Q7LShYlpc3pd9GwydPN4dpUusEoGzq2D9OtD8o3BPWe2Zwj7pZJMxA==","signatures":[{"sig":"MEUCIAZhH9g852UetduFUkc53HGGO20H7JEIJ1YAwVT0IwqyAiEA8JaK1dqYmqi9eHB3WsbO7IwzOTzgRt9CvQ7Oc+ZyjpU=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":36207},"main":"./index.mjs","type":"module","types":"./index.d.ts","engines":{"node":">=20"},"exports":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.cjs"},"gitHead":"183766759d827940efc5d040f154d4f83f384ecb","gypfile":true,"scripts":{"build":"node-gyp rebuild","clean":"node-gyp clean","install":"node-gyp rebuild"},"_npmUser":{"name":"eeemarv","actor":{"name":"eeemarv","type":"user","email":"info@martti.be"},"email":"info@martti.be"},"repository":{"url":"git+https://github.com/eeemarv/io-spi.git","type":"git"},"_npmVersion":"11.4.2","description":"Promise Based Native Node.js Addon for SPI devices on Linux","directories":{},"_nodeVersion":"22.16.0","dependencies":{"node-addon-api":"^8.3.1"},"_hasShrinkwrap":false,"devDependencies":{"mock-fs":"^5.5.0","node-gyp":"^11.2.0","@types/node":"^24.0.1"},"_npmOperationalInternal":{"tmp":"tmp/io-spi_0.2.7_1750510874050_0.388402804194937","host":"s3://npm-registry-packages-npm-production"}},"0.2.8":{"name":"@eeemarv/io-spi","version":"0.2.8","description":"Promise Based Native Node.js Addon for SPI devices on Linux","license":"MIT","author":{"name":"Maarten Vandekeybus"},"main":"./index.mjs","exports":{"import":"./index.mjs","require":"./index.cjs","types":"./index.d.ts"},"type":"module","types":"./index.d.ts","engines":{"node":">=20"},"scripts":{"install":"node-gyp rebuild","build":"node-gyp rebuild","clean":"node-gyp clean"},"keywords":["SPI","spidev","nodejs","async","Raspberry Pi","rpi","Orange Pi","ioctl","embedded","linux"],"devDependencies":{"@types/node":"^24.0.1","mock-fs":"^5.5.0","node-gyp":"^11.2.0"},"dependencies":{"node-addon-api":"^8.3.1"},"gypfile":true,"os":["linux"],"repository":{"type":"git","url":"git+https://github.com/eeemarv/io-spi.git"},"bugs":{"url":"https://github.com/eeemarv/io-spi/issues"},"homepage":"https://github.com/eeemarv/io-spi#readme","_id":"@eeemarv/io-spi@0.2.8","gitHead":"16d2590152d956e966609081310f0b57e2fb6b96","_nodeVersion":"22.16.0","_npmVersion":"11.4.2","dist":{"integrity":"sha512-EnZW3SQorFhjLZWDUhmQKXAxHVz9FLIFX9D1U83oep7rBAztoU+Prxyoi2uJkxdvT9abZLBrhM0I0MU0pU7/Lg==","shasum":"d4d53ec8fe38b32dacc592ca2dfd9e5b251bf221","tarball":"https://registry.npmjs.org/@eeemarv/io-spi/-/io-spi-0.2.8.tgz","fileCount":18,"unpackedSize":36134,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCv150QSg8xoRB2HOQ90+DIrHp5RsbsE4O0qGbdOAMheAIgBcj2cZ5sV9ukbCVpTZi89H2wXLV4IEIt+1vP99bQxrM="}]},"_npmUser":{"name":"eeemarv","email":"info@martti.be","actor":{"name":"eeemarv","email":"info@martti.be","type":"user"}},"directories":{},"maintainers":[{"name":"eeemarv","email":"info@martti.be"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/io-spi_0.2.8_1750565730549_0.6152679332734607"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-13T20:42:58.787Z","modified":"2025-06-22T04:15:30.895Z","0.1.0":"2025-06-13T20:42:59.079Z","0.2.0":"2025-06-14T13:09:20.520Z","0.2.1":"2025-06-14T13:47:34.177Z","0.2.2":"2025-06-14T17:11:17.064Z","0.2.3":"2025-06-14T17:30:02.121Z","0.2.4":"2025-06-16T19:32:15.095Z","0.2.5":"2025-06-17T16:25:13.881Z","0.2.6":"2025-06-20T20:54:49.113Z","0.2.7":"2025-06-21T13:01:14.244Z","0.2.8":"2025-06-22T04:15:30.714Z"},"bugs":{"url":"https://github.com/eeemarv/io-spi/issues"},"author":{"name":"Maarten Vandekeybus"},"license":"MIT","homepage":"https://github.com/eeemarv/io-spi#readme","keywords":["SPI","spidev","nodejs","async","Raspberry Pi","rpi","Orange Pi","ioctl","embedded","linux"],"repository":{"type":"git","url":"git+https://github.com/eeemarv/io-spi.git"},"description":"Promise Based Native Node.js Addon for SPI devices on Linux","maintainers":[{"name":"eeemarv","email":"info@martti.be"}],"readme":"# Node Native SPI Addon\n\n[![Node.js Version Support](https://img.shields.io/node/v/@eeemarv/io-spi)](https://www.npmjs.com/package/@eeemarv/io-spi)\n![TypeScript](https://img.shields.io/badge/types-included-blue.svg)\n[![License](https://img.shields.io/npm/l/@eeemarv/io-spi.svg)](https://github.com/eeemarv/io-spi/blob/main/LICENSE)\n[![npm version](https://img.shields.io/npm/v/@eeemarv/io-spi.svg)](https://www.npmjs.com/package/@eeemarv/io-spi)\n[![Downloads](https://img.shields.io/npm/dm/@eeemarv/io-spi.svg)](https://www.npmjs.com/package/@eeemarv/io-spi)\n[![Linux Only](https://img.shields.io/badge/platform-Linux-yellow)](https://en.wikipedia.org/wiki/Linux)\n\n\nA high-performance Node.js native addon for SPI communication on Linux, leveraging direct `spidev.h` APIs.\nFeatures\n\n* Async/await friendly **Promise-based transfers** with configurable per-transfer settings.\n\n* **Batched transfers**: Submit multiple SPI transactions in one call for maximum performance.\n\n* **Zero abstraction**: Direct mapping to the Linux SPI interface (`spi_ioc_transfer`).\n\n* Full support for Linux SPI parameters (e.g., delay_usecs, cs_change).\n\n* Dynamic reconfiguration of mode, speed_hz, and bits_per_word.\n\n* Getters for current device settings.\n\n* Built-in TypeScript type declarations.\n\n## Concurrency & Multiple Chip Select (CS)\n\n### Non-Blocking API\n\nAll transfers are __asynchronous__ by design:\n\n```js\nimport SPIDevice from '@eeemarv/io-spi';\nspi = new SPIDevice('/dev/spidev0.0');\n\n// Fire-and-forget transfer\nspi.transfer([txBuffer])\n   .then([rxBuffer] => console.log('Done!'))\n   .catch(err => console.error('Error:', err));\n\n```\n\n### Key notes\n\n* Transfers are queued at the OS level but don't block Node.js's event loop.\n* Each transfer() call returns a native Promise (no manual threading required).\n\n---\n\n### Multiple Chip Select (CS) Pins\n\nTo control multiple SPI slaves, create separate instances per CS\n\n```js\n// Each CS line gets its own instance\n// each instance contains its own configuration:\n// mode, max_speed_hz and bits_per_word\n\nconst spiCS0 = new SPIDevice('/dev/spidev0.0');  // Uses CS0\nconst spiCS1 = new SPIDevice('/dev/spidev0.1',{\n  max_speed_hz: 500_000\n});  // Uses CS1\n\nconst txBufferForDevice0 = Buffer.from([0x55, 0xAA]);\nconst txBufferForDevice1 = Buffer.from([0x66, 0xBB]);\n\n// Concurrent operations\nPromise.all([\n  spiCS0.transfer([txBufferForDevice0]),\n  spiCS1.transfer([txBufferForDevice1])\n]).then(([[rxBufferfromDevice0], [rxBufferFromDevice1]]) => {\n  console.log(rxBufferfromDevice0);\n  console.log(rxBufferfromDevice1);\n}).catch((error) => {\n  console.error(error);\n});\n\n```\n\n### Hardware Setup\n\n* Ensure each slave has a dedicated CS line (e.g., CS0, CS1).\n* Kernel must expose multiple /dev/spidevX.Y devices (check `ls /dev/spidev* -l`).\n\n__Example Wiring (Raspberry Pi):__\n\nPi (Master) | Peripheral 0 | Peripheral 1\n---|---|---\nMOSI (GPIO10) | MOSI | MOSI\nMISO (GPIO9) | MISO | MISO\nSCLK (GPIO11) | SCLK | SCLK\nCE0 (GPIO8) | CS | -\nCE1 (GPIO7) | - | CS\n\n## Installation\n\n```bash\nnpm install @eeemarv/io-spi\n\n# OR\n\nyarn add @eeemarv/io-spi\n```\n\n## Prerequisites\n\n* Linux (e.g., Raspberry Pi, Orange Pi) with SPI kernel support.\n\n* Node.js v20+\n\n* Build tools:\n\n```bash\nsudo apt-get install build-essential python3\n```\n\n## Usage\n\n### Import\n\n```js\nconst SPIDevice = require('@eeemarv/io-spi');\n\n// OR\n\nimport SPIDevice from '@eeemarv/io-spi';\n```\n\n### Initialize\n\n```js\nconst spi = new SPIDevice('/dev/spidev0.0', {\n  mode: 3,          // SPI mode (default 0)\n  max_speed_hz: 500_000,  // Clock speed (default 1_000_000 or 1MHz)\n  bits_per_word: 16    // Bits per word (default 8)\n});\n```\n\nOr configure dynamically:\n\n```js\n\nspi.setMode(2);           // Switch to mode 2\nspi.setMaxSpeedHz(250_000); // Reduce speed to 250kHz\nspi.setBitsPerWord(8);\n\nconsole.log(spi.getMode()); // e.g., 2\n```\n\n### Transfer Data\n\n#### Simple Transfer (Uses Device Defaults)\n\n```javascript\n\nspi.transfer([\n  Buffer.from([0x01, 0x02])\n]).then(([result]) => {\n  console.log(result); // Buffer with received data\n}).catch((error) => {\n  console.log(error);\n});\n\n```\n\n#### Advanced Transfer (Per-Transfer Settings)\n\n```javascript\n\nspi.transfer([\n  Buffer.from([0x01, 0x02]), // Uses device defaults\n  {                           // Overrides settings for this transfer\n    tx_buf: Buffer.from([0x03, 0x04]), // required\n    speed_hz: 500000,         // Temporary speed change\n    delay_usecs: 100,            // Delay after transfer (microseconds)\n    cs_change: 1           // Toggle CS after this transfer\n  },\n  Buffer.from([0x05, 0x06])  // Reverts to device defaults\n]).then((results) => {\n    console.log(results); // `results` is an array of Buffers (one per transfer)\n}).catch((error) => {\n    console.log(error);\n});\n```\n\n## API Reference\n\n### new SPIDevice(path[, options])\n\n* path (string): SPI device path (e.g., /dev/spidev0.0).\n\n* options (object):\n  * mode: SPI mode 0-3 (CPOL/CPHA), more rare modes are also supported. Defaults to 0.\n  * max_speed_hz (number): Clock speed in Hz. Defaults to 1_000_000 (1Mhz)\n  * bits_per_word (number): Bits per word. Defaults to 8\n\n### Methods\n\nMethod | Description\n---|---\ntransfer(transfers) | Returns a Promise<Buffer[]> for all transfers. Each transfer can override settings (see below).\nsetMode(mode) | Sets SPI mode. Throws if invalid.\ngetMode() | Returns current mode.\nsetMaxSpeedHz(hz) | Sets maximum clock speed (Hz).\ngetMaxSpeedHz() | Returns current maximum speed.\nsetBitsPerWord(bits) | Sets bits per word (usually 8).\ngetBitsPerWord() | Returns current bits per word.\n\n### Transfer Object Parameters\n\nEach transfer can specify:\n\nParameter | Type | Description\n---|---|---\n`tx_buf` | Buffer | Data to send. Required.\n`speed_hz` | number | Temporary clock speed (overrides max_speed_hz).\n`delay_usecs` | number | Delay after transfer (microseconds).\n`cs_change` | number (0,1) | Toggle chip select after this transfer. default is 0.\n\nSee [Linux spidev.h](https://github.com/torvalds/linux/blob/master/include/uapi/linux/spi/spidev.h) for full documentation of all parameters.\nParameters `tx_nbits`, `rx_nbits` and `word_delay_usecs` can also be used, but these are not widely implemented.\n\n## TypeScript Support\n\nThis package includes built-in TypeScript type declarations via `index.d.ts`.\n\nIf you're using TypeScript, you'll get autocompletion and type checking automatically:\n\n```ts\nimport SPIDevice from '@eeemarv/io-spi';\n\nconst spi = new SPIDevice('/dev/spidev0.0', {\n  max_speed_hz: 1_000_000,\n  mode: 0\n});\n```\n\nType definitions include\n\n* Constructor options\n* transfer() method with buffer/object overloads\n* Getter/setter methods for mode, speed, and bits-per-word\n\nNo need to install @types/... — types are bundled with the package.\n\n## Examples\n\nThe loopback test is the only example included in the npm\npackage. More examples can be found in [a separate repository on Github](https://github.com/eeemarv/io-spi-examples#readme).\n\n### Loopback Test\n\n![Loopback test on a Orange Pi 3 Zero](https://raw.githubusercontent.com/eeemarv/io-spi/main/images/opiz3_loopback.webp)\n\nWith this test you can see if the SPI device works without the involvement of a slave device. Connect the MOSI pin directly to the MISO pin, run the test and see if the data matches.\n\n```bash\nnode loopback.js\n# Use the `--help` flag to see all possible configurations.\n```\n\nThe default device is `/dev/spidev0.0` but can be changed\nwith the `--device` flag.\n\n![Loopback Test Terminal](https://raw.githubusercontent.com/eeemarv/io-spi/main/images/cli_loopback.png)\n\n## Troubleshooting\n\n### Enable SPI\n\nCheck out if SPI is enabled. To list all available SPI devices:\n\n```bash\nls -l /dev/spi*\n```\n\nCheck out the manual of your SBC on how to enable the SPI devices.\n\nIf you have `raspi-config` (common on the Raspberry Pi), run\n\n```bash\nsudo raspi-config\n```\n\nNavigate to Interface options > Enable SPI.\n\nOn the Orange Pi, run `orangepi-config`\n\n```bash\nsudo orangepi-config\n```\n\nNavigate to System  > Hardware > Toggle hardware configuration.\n\n### Permission Denied\n\nTo allow non-root users to access the SPI device (e.g. `/dev/spidev0.0`, `/dev/spidev1.1`) without sudo, you need to modify the device permissions and group ownership permanently.\n\n#### 1. Create a Dedicated Group for SPI Access\n\n```bash\nsudo groupadd spi\n```\n\n#### 2. Set a udev Rule to Change SPI Device Permissions\n\nUbuntu, Debian and Raspbian use udev to manage device permissions. Create a new rule:\n\n```bash\nsudo nano /etc/udev/rules.d/90-spi.rules\n```\n\nAdd this line to grant read/write access to the `spi` group:\n\n```bash\nSUBSYSTEM==\"spidev\", GROUP=\"spi\", MODE=\"0660\"\n```\n\n#### 3. Reload udev Rules & Trigger Changes\n\n```bash\nsudo udevadm control --reload-rules\nsudo udevadm trigger\n```\n\n#### 4. Verify the Changes\n\nCheck the SPI device permissions:\n\n```bash\nls -l /dev/spidev*\n```\n\nExpected output:\n\n```bash\ncrw-rw---- 1 root spi 153, 0 Jun 17 10:14 /dev/spidev1.1\n```\n\nNow, users in the `spi` group can access it without sudo.\n\n\n#### 5. Add Your User to the Group\n\n```bash\nsudo usermod -aG spi $(whoami)  # Replace $(whoami) with the target username\n```\n\n(Log out and back in for the group change to take effect.)\n\n### Invalid Arguments\n\nVerify parameters match spidev.h constraints (e.g., valid mode).\n\n### Build Issues\n\nRebuild with `node-gyp rebuild --verbose`\n\n### Hardware connection problems\n\nFor good connection, especially at speeds above 1Mhz,\nbe sure\n\n* to keep wires or paths short\n* to keep wires or paths bundled together\n* to take ground (and power) from pins the closed\nto the MISO, MOSI, CS and CLCK pins in order to provide\na ground return path\n* to thoroughly clean up flux after soldering\n* that you are invoking the right spi device. E.g. on the Orange Pi Zero 3 only /dev/spidev1.1 is available on the pinout.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}