Comments (1)
Hi! The API changed in recent versions so that the rxBuffer
argument is now part of the function call. You would also need to allocate the buffer first, the binding won't do it for you and expects an existing Buffer to be provided.
So, something like:
var rxBuffer = new Buffer(8)
rpio.spiTransfer(new Buffer('HELLOSPI'), rxBuffer, 8)
Hope that helps, and sorry for the change, but it's part of making the API more orthogonal, and allows for a future version to return the number of bytes read if that proves to be useful.
from node-rpio.
Related Issues (20)
- Reset output to floating state HOT 1
- Could not locate the bindings file HOT 2
- Cannot use PWM HOT 4
- Shared files missing HOT 2
- How to use Waveshare epaper HOT 1
- detect_pinmap hard codes /proc/device-tree/model causing docker issues
- Raspberry pi zero 2 w supports? HOT 4
- Banana Pi M2 Zero supports SPI with this library? HOT 1
- raspberry pi chrashing when pluggin cable into the gpio pin 39
- question about functionality HOT 2
- Issues with timing on poll HOT 2
- Compilation Warnings HOT 1
- M1 Mac support? HOT 4
- Orange Pi Zero 2? HOT 2
- Bindings.js Error HOT 2
- Example with button polling HOT 1
- orangepi 5 support HOT 1
- How to set BCM2835_SPI_BIT_ORDER_MSBFIRST ?
- Node.js Exception
- Software PWM support?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from node-rpio.