File tree 1 file changed +7
-7
lines changed
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::
51
51
52
52
$ sudo modprobe spi-bcm2708
53
53
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 ``
56
60
57
61
The /dev/spidev* devices should now appear but they require special privileges
58
62
for 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*
76
80
access to these by adding the following udev rule (all on one line) to
77
81
``/etc/udev/rules.d/51-gpio.rules ``::
78
82
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'"
84
84
85
85
Then create the gpio group and add the user pi::
86
86
You can’t perform that action at this time.
0 commit comments