Open Mrtenz opened 5 years ago
I wonder if it's just that polling isn't supported for SPI. Out of interest, to rule out any hardware or kernel issues, if you just use regular GPIO does it work?
If it's that SPI and polling are incompatible then I'm not sure there is a fix.
As far as I can see, on SPI master cannot wait for a message to read from a slave (e.g. using poll
/epoll/select). Because master hardware must select slave via PIN and then start clocking, after what slave will provide bits serially.
OTOH events can be seen by SPI slaves, when a message from master arrives.
I'm trying to use the
poll
What SPI master/slave setup is there and who is reading?
I'm trying to use the
poll
function but it does not seem to work. Manually polling withsetInterval
does work.Here is the code that's not working:
While using
setInterval
andread
does work:Am I missing something here or is this a bug in
node-rpio
?