02-24-2017, 09:08 AM
(This post was last modified: 02-24-2017, 09:14 AM by martinayotte.)
With the latest Armbian, /dev/spidevX.X are enabled using overlay. Simply add "overlays=sun8i-h3-spi0-spidev" into /boot/armbianEnv.txt.
And to test if it is actually working, there a piece of code on the net which is named "spidev_test.c" to test loopback of MOSI/MISO.
Example :
And to test if it is actually working, there a piece of code on the net which is named "spidev_test.c" to test loopback of MOSI/MISO.
Example :
Code:
./spidev_test -D /dev/spidev1.0
spi mode: 0
bits per word: 8
max speed: 500000 Hz (500 KHz)
FF FF FF FF FF FF
40 00 00 00 00 95
FF FF FF FF FF FF
FF FF FF FF FF FF
FF FF FF FF FF FF
DE AD BE EF BA AD
F0 0D