The raw SPI bus
As for USB and I2C buses the SPI bus supports the raw access in order to directly send and receive messages from the SPI slaves, so it's time to show a little example about how we can do it on our Wandboard.
As for other raw accesses, the only problem is that it interrupts management. In this case, we cannot manage these signals from the user space. A kernel driver must be used.
Exchanging data in C
To show how we can manage the raw SPI bus, we are going to manage a really simple device using the Wandboard, that is, the thermocouple to digital converter based on the MAX31855 chip:
Note
The device can be purchased at:Â http://www.cosino.io/product/thermocouple-max31855 or by surfing the Internet. The datasheet of the MAX31855 is available at: https://datasheets.maximintegrated.com/en/ds/MAX31855.pdf.
Electrical connections are reported in this image:
By looking at the chip's datasheet, we see that its functioning is very simple: it has one 32-bit register where...