Domanda

I want to use SPI interface to read and write the registers in an external FPGA (so I called it SPI device). I know Linux kernel has the spi driver. So can I use mmap? If yes, should I open the device file through "/sys/bus/spi/devices/DEVICE_NAME" in my code?

I noticed that when I cd to "/sys/bus/spi/devices/SPI_DEVICE_NAME", the path was changed automatically to "/sys/devices/soc.0/CORE_NAME/SOME_NUMBER/SPI_DEVICE_NAME". Can anyone explain it for me?

Thanks in advance!

Hetty

È stato utile?

Soluzione

SPI is strictly a command- and stream-oriented protocol. Linux does not have any facility for accessing the data available via it in a random manner. Or even in a sequential manner, since it does not have any drivers for SPI devices; all operations must be performed by user software.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top