Arduino Forum

Development => Other Software Development => Topic started by: dgroening on May 22, 2018, 03:46 am

Title: SPI.transfer documentation incomplete
Post by: dgroening on May 22, 2018, 03:46 am
The page: https://www.arduino.cc/en/Reference/SPITransfer it does not mention that the buffer  argument must be a pointer in the buffer form of the call [SPI.transfer(buffer, size)].
Title: Re: SPI.transfer documentation incomplete
Post by: pert on May 22, 2018, 04:02 am
I think that goes without saying. The reference page says:
Quote
buffer: the array of data to be transferred
If you pass an array to to a function then it's passed by pointer automatically. Pointers are confusing to beginners (most Arduino beginners have probably never even heard of them). An array is something much more basic and beginner friendly.