Hi David,
Hi Ronny,
Thanks for the suggestion. It seems that the SPI library’s transfer() and transfer16() functions are a bit different from uLisp’s read-byte and write-byte , as they do a simultaneous read and write.
When writing a byte to a spi device it always returns something. So I think that this doesn’t make any difference. A write byte always gives reads back the result , although its useless of course.
Currently write-byte returns nil . Perhaps if called with an SPI stream it could return the result of transfer() , thus avoiding the need for another function? The same could be true of write-word for transfer16() . What do you think?
I think this is not so bad at all , since you can decide than what to do with the return (use it or not).
Regards ,
Ronny