The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.


<HTML>
<head>
 <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 <title>SPI Device Driver</title></head>

<BODY TOPMARGIN=4 BGCOLOR=#FFFFFF TEXT=#000000 VLINK=#0000CC LINK=#0000CC ALINK=#0000CC>
<FONT FACE="Arial, Lucida, Helvetica" >

<TABLE WIDTH="100%" ALIGN=CENTER CELLPADDING=1 CELLSPACING=0>
<TR>
<TD WIDTH="100%" ALIGN=CENTER>


<A HREF="contents.htm"><img align=center src="home.png" BORDER=0 ALT="Contents"></A>


<A HREF="topic.htm"><img align=center src="up.png" BORDER=0 ALT="Up"></A>

<A HREF="topic_gpiopins_rev1.htm"><img align=center src="back.png" BORDER=0 ALT="Previous"></A>

<A HREF="topic_i2cdev.htm"><img align=center src="forward.png" BORDER=0 ALT="Next"></A>
</TD>
</TR>
<TR>
<TD COLSPAN=2 HEIGHT=2 BGCOLOR="#C0C0C0">
</TD>
</TR>
</TABLE>

<H2>SPI Device Driver</H2><p>The SPI kernel device drivers provide access to the BCM2835 spi interface.<p>
<p>In common with many other device drivers it makes 'files' available in the /dev/ folder of your system that you can write to and read from using <B>ioctl</B> commands.</p>
<p>The module <A HREF="mod_device_spi.htm">HiPi::Device::SPI</A> supports communication with SPI devices using the kernel device driver.</p> 
<p>The device drivers are configured and loaded at system startup as described in the <A HREF="">Loading Device Drivers Topic.</A></p>

<h3>Allowing None Root Device Permissions</h3>
<p>Users who are members of the group 'spi' can access the SPI devices. By default, user 'pi' is a member of the spi group.</p>

<p>The kernel drivers in Raspbian provide access to the SPI0 peripheral by default. The Raspberry Pi GPIO provides 2 SPI cable select pins and the device driver works by providing a different file for each cable select. You therefore get two device files created for the SPI0 peripheral:</p>
<pre>
/dev/spidev0.0
/dev/spidev0.1
</pre>


</FONT>
<br>
<p>
<br>
<hr>
<br>
<center>
<A HREF="contents.htm"><img align=center src="home.png" BORDER=0 ALT="Contents"></A>


<A HREF="topic.htm"><img align=center src="up.png" BORDER=0 ALT="Up"></A>

<A HREF="topic_gpiopins_rev1.htm"><img align=center src="back.png" BORDER=0 ALT="Previous"></A>

<A HREF="topic_i2cdev.htm"><img align=center src="forward.png" BORDER=0 ALT="Next"></A>
</center>

<HR>
<br>
<center><FONT FACE="Arial, Lucida, Helvetica" size="2" color="#000080">HiPi Modules Copyright &#169; 2013 - 2016 Mark Dootson</font></center>
</BODY></HTML>