\hypertarget{spi_8c}{
\section{spi.c File Reference}
\label{spi_8c}\index{spi.c@{spi.c}}
}
{\ttfamily \#include $<$avr/io.h$>$}\par
{\ttfamily \#include $<$config.h$>$}\par
{\ttfamily \#include $<$spi.h$>$}\par
{\ttfamily \#include $<$util/delay\_\-basic.h$>$}\par
{\ttfamily \#include $<$util/delay.h$>$}\par
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{spi_8c_aa7441f5527c57a6e01d8cdd0c09c8e49}{spi\_\-clock\_\-up\_\-down} (void)
\item 
uint8\_\-t \hyperlink{spi_8c_a0636c505bffbff271eb223131d406160}{read\_\-spi\_\-byte} (void)
\begin{DoxyCompactList}\small\item\em Read an 8 bit value from the SPI bus. \item\end{DoxyCompactList}\item 
uint16\_\-t \hyperlink{spi_8c_a071cca9acd1c01c93823eb7684bdb8ce}{read\_\-spi\_\-2byte} (void)
\begin{DoxyCompactList}\small\item\em Read a 16 bit value from the SPI bus. \item\end{DoxyCompactList}\item 
void \hyperlink{spi_8c_a8f851f62e527b9aa2182813dcd2504bf}{write\_\-spi\_\-byte} (uint8\_\-t data)
\begin{DoxyCompactList}\small\item\em Transmit an 8 bit value to the SPI bus. \item\end{DoxyCompactList}\item 
void \hyperlink{spi_8c_a07bb26baf54076c41148883e9a590e15}{write\_\-spi\_\-2byte} (uint16\_\-t data)
\begin{DoxyCompactList}\small\item\em Transmit a 16 bit value to the SPI bus. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Function Documentation}
\hypertarget{spi_8c_a071cca9acd1c01c93823eb7684bdb8ce}{
\index{spi.c@{spi.c}!read\_\-spi\_\-2byte@{read\_\-spi\_\-2byte}}
\index{read\_\-spi\_\-2byte@{read\_\-spi\_\-2byte}!spi.c@{spi.c}}
\subsubsection[{read\_\-spi\_\-2byte}]{\setlength{\rightskip}{0pt plus 5cm}uint16\_\-t read\_\-spi\_\-2byte (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}
\label{spi_8c_a071cca9acd1c01c93823eb7684bdb8ce}


Read a 16 bit value from the SPI bus. 

\begin{DoxyReturn}{Returns}
Value from SPI bus. 
\end{DoxyReturn}
\hypertarget{spi_8c_a0636c505bffbff271eb223131d406160}{
\index{spi.c@{spi.c}!read\_\-spi\_\-byte@{read\_\-spi\_\-byte}}
\index{read\_\-spi\_\-byte@{read\_\-spi\_\-byte}!spi.c@{spi.c}}
\subsubsection[{read\_\-spi\_\-byte}]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t read\_\-spi\_\-byte (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}
\label{spi_8c_a0636c505bffbff271eb223131d406160}


Read an 8 bit value from the SPI bus. 

\begin{DoxyReturn}{Returns}
Value from SPI bus. 
\end{DoxyReturn}
\hypertarget{spi_8c_aa7441f5527c57a6e01d8cdd0c09c8e49}{
\index{spi.c@{spi.c}!spi\_\-clock\_\-up\_\-down@{spi\_\-clock\_\-up\_\-down}}
\index{spi\_\-clock\_\-up\_\-down@{spi\_\-clock\_\-up\_\-down}!spi.c@{spi.c}}
\subsubsection[{spi\_\-clock\_\-up\_\-down}]{\setlength{\rightskip}{0pt plus 5cm}void spi\_\-clock\_\-up\_\-down (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily  \mbox{[}inline\mbox{]}}}}
\label{spi_8c_aa7441f5527c57a6e01d8cdd0c09c8e49}
\hypertarget{spi_8c_a07bb26baf54076c41148883e9a590e15}{
\index{spi.c@{spi.c}!write\_\-spi\_\-2byte@{write\_\-spi\_\-2byte}}
\index{write\_\-spi\_\-2byte@{write\_\-spi\_\-2byte}!spi.c@{spi.c}}
\subsubsection[{write\_\-spi\_\-2byte}]{\setlength{\rightskip}{0pt plus 5cm}void write\_\-spi\_\-2byte (
\begin{DoxyParamCaption}
\item[{uint16\_\-t}]{ data}
\end{DoxyParamCaption}
)}}
\label{spi_8c_a07bb26baf54076c41148883e9a590e15}


Transmit a 16 bit value to the SPI bus. 


\begin{DoxyParams}{Parameters}
\item[{\em data}]Value to send via SPI bus. \end{DoxyParams}
\hypertarget{spi_8c_a8f851f62e527b9aa2182813dcd2504bf}{
\index{spi.c@{spi.c}!write\_\-spi\_\-byte@{write\_\-spi\_\-byte}}
\index{write\_\-spi\_\-byte@{write\_\-spi\_\-byte}!spi.c@{spi.c}}
\subsubsection[{write\_\-spi\_\-byte}]{\setlength{\rightskip}{0pt plus 5cm}void write\_\-spi\_\-byte (
\begin{DoxyParamCaption}
\item[{uint8\_\-t}]{ data}
\end{DoxyParamCaption}
)}}
\label{spi_8c_a8f851f62e527b9aa2182813dcd2504bf}


Transmit an 8 bit value to the SPI bus. 


\begin{DoxyParams}{Parameters}
\item[{\em data}]Value to send via SPI bus. \end{DoxyParams}
