\section{aversive\_\-10-03-12/modules/devices/encoders/encoders\_\-spi/encoders\_\-spi.h File Reference}
\label{encoders__spi_8h}\index{aversive\_\-10-03-12/modules/devices/encoders/encoders\_\-spi/encoders\_\-spi.h@{aversive\_\-10-03-12/modules/devices/encoders/encoders\_\-spi/encoders\_\-spi.h}}
\subsection*{Functions}
\begin{CompactItemize}
\item 
void {\bf encoders\_\-spi\_\-init} (void)
\item 
void {\bf encoders\_\-spi\_\-manage} (void $\ast$dummy)
\item 
int32\_\-t {\bf encoders\_\-spi\_\-get\_\-value} (void $\ast$encoder)
\item 
void {\bf encoders\_\-spi\_\-set\_\-value} (void $\ast$encoder, int32\_\-t val)
\end{CompactItemize}


\subsection{Function Documentation}
\index{encoders\_\-spi.h@{encoders\_\-spi.h}!encoders\_\-spi\_\-get\_\-value@{encoders\_\-spi\_\-get\_\-value}}
\index{encoders\_\-spi\_\-get\_\-value@{encoders\_\-spi\_\-get\_\-value}!encoders_spi.h@{encoders\_\-spi.h}}
\subsubsection[encoders\_\-spi\_\-get\_\-value]{\setlength{\rightskip}{0pt plus 5cm}int32\_\-t encoders\_\-spi\_\-get\_\-value (void $\ast$ {\em encoder})}\label{encoders__spi_8h_5a2d1450e14c193ae7b44134fdaed06d}


Extract encoder value. 

Definition at line 82 of file encoders\_\-spi.c.

References IRQ\_\-LOCK, and IRQ\_\-UNLOCK.\index{encoders\_\-spi.h@{encoders\_\-spi.h}!encoders\_\-spi\_\-init@{encoders\_\-spi\_\-init}}
\index{encoders\_\-spi\_\-init@{encoders\_\-spi\_\-init}!encoders_spi.h@{encoders\_\-spi.h}}
\subsubsection[encoders\_\-spi\_\-init]{\setlength{\rightskip}{0pt plus 5cm}void encoders\_\-spi\_\-init (void)}\label{encoders__spi_8h_f10714d6b4bfb8135ba5808412a17605}


Initialisation of encoders, variables 

Definition at line 42 of file encoders\_\-spi.c.

References spi\_\-init(), SPI\_\-MODE\_\-MASTER, spi\_\-register\_\-ss\_\-line(), and spi\_\-set\_\-data\_\-order().\index{encoders\_\-spi.h@{encoders\_\-spi.h}!encoders\_\-spi\_\-manage@{encoders\_\-spi\_\-manage}}
\index{encoders\_\-spi\_\-manage@{encoders\_\-spi\_\-manage}!encoders_spi.h@{encoders\_\-spi.h}}
\subsubsection[encoders\_\-spi\_\-manage]{\setlength{\rightskip}{0pt plus 5cm}void encoders\_\-spi\_\-manage (void $\ast$ {\em dummy})}\label{encoders__spi_8h_9cd4796c18662f3084f77ee81ffd181f}


Update encoders values, need to be done quite often 

Definition at line 53 of file encoders\_\-spi.c.

References i, IRQ\_\-LOCK, IRQ\_\-UNLOCK, s, spi\_\-receive\_\-byte(), spi\_\-slave\_\-deselect(), and spi\_\-slave\_\-select().\index{encoders\_\-spi.h@{encoders\_\-spi.h}!encoders\_\-spi\_\-set\_\-value@{encoders\_\-spi\_\-set\_\-value}}
\index{encoders\_\-spi\_\-set\_\-value@{encoders\_\-spi\_\-set\_\-value}!encoders_spi.h@{encoders\_\-spi.h}}
\subsubsection[encoders\_\-spi\_\-set\_\-value]{\setlength{\rightskip}{0pt plus 5cm}void encoders\_\-spi\_\-set\_\-value (void $\ast$ {\em encoder}, \/  int32\_\-t {\em val})}\label{encoders__spi_8h_a1415d7a3c84ce669c457d64c7f0aff8}


Set an encoder value 

Definition at line 95 of file encoders\_\-spi.c.

References IRQ\_\-LOCK, and IRQ\_\-UNLOCK.