thortex / rpi3-webiopi

WebIOPi for Raspberry Pi 1, 2, 3, and zero
https://thortex.github.io/rpi3-webiopi/
Apache License 2.0
60 stars 20 forks source link

Enabling SPI bus automatically #19

Open thortex opened 8 years ago

thortex commented 8 years ago
r=`grep 'spi=on' /boot/config.txt | grep -v "^#"`
if [ "$r" != "" ] ; then
     sed -i 's/^dtparam=spi=off/dtparam=spi=on/;' /boot/config.txt
fi

Note that 'dtparam' key allow multiple parameters list:

dtparam=i2c_arm=on,spi=on