From fc028858c445aa4ba147871a61bfa4f39e1e8b14 Mon Sep 17 00:00:00 2001 From: Thomas Klaehn Date: Sun, 20 Mar 2016 14:01:08 +0100 Subject: [PATCH] gpio interface section added --- content.tex | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/content.tex b/content.tex index 63ba0d7..9dfb6e8 100644 --- a/content.tex +++ b/content.tex @@ -149,12 +149,24 @@ KERNEL=="i2c-1", MODE="0777" To enable spi interface edit \texttt{/boot/config.txt}. \\ Uncomment \texttt{\#device\_tree\_param=spi=on} +\subsubsection{GPIO} +Create an udev rule to enable others than root accessing the gpio files: +\begin{lstlisting} +/etc/udev/rules.d/98-gpio.rules + +SUBSYSTEM=="gpio*", PROGRAM="/bin/sh -c 'chown -R root:gpio\ +/sys/class/gpio; chmod -R 0777 /sys/class/gpio; chown -R \ +root:gpio /sys/devices/virtual/gpio; chmod -R 0777 \ +/sys/devices/virtual/gpio'" +\end{lstlisting} + \subsection{tools} \begin{itemize} \item \texttt{fakeroot} \item \texttt{gcc} \item \texttt{git} \item \texttt{make} +\item \texttt{patch} \item \texttt{python2, python2-pip} \item \texttt{wget} \end{itemize}