File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -51,8 +51,12 @@ but is not enabled by default. You can load the SPI driver manually by running::
5151
5252 $ sudo modprobe spi-bcm2708
5353
54- And you can permanently enable it by commenting out the
55- ``blacklist spi-bcm2708 `` line in ``/etc/modprobe.d/raspi-blacklist.conf ``.
54+ You can permanently enable it one of two ways, depending on which kernel
55+ version you're on.
56+
57+ - Kernel Version < 3.18 (The old way): Comment out ``blacklist spi-bcm2708 `` line in ``/etc/modprobe.d/raspi-blacklist.conf ``.
58+
59+ - Kernel Version >= 3.18 (Device Tree): add ``dtparam=spi=on `` to ``/boot/config/txt ``
5660
5761The /dev/spidev* devices should now appear but they require special privileges
5862for the user *pi * to access them. You can set these up by adding the following
@@ -76,11 +80,7 @@ Interrupts work by monitoring the GPIO pins. You'll need to give the user *pi*
7680access to these by adding the following udev rule (all on one line) to
7781``/etc/udev/rules.d/51-gpio.rules ``::
7882
79- SUBSYSTEM=="gpio*", PROGRAM="
80- /bin/sh -c 'chown -R root:gpio /sys/class/gpio &&
81- chmod -R 770 /sys/class/gpio;
82- chown -R root:gpio /sys/devices/virtual/gpio &&
83- chmod -R 770 /sys/devices/virtual/gpio'"
83+ SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c 'chown -R root:gpio /sys/class/gpio && chmod -R 770 /sys/class/gpio'"
8484
8585Then create the gpio group and add the user pi::
8686
You can’t perform that action at this time.
0 commit comments