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


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


Extract encoder value.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]: a (void $\ast$) that is casted in (uint8\_\-t) containing the number of the encoder to be read.\end{description}
\end{Desc}
Extract encoder value.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em number}]: a (void $\ast$) that is casted in (int) containing the number of the encoder to be read. \end{description}
\end{Desc}


Definition at line 230 of file encoders\_\-microb.c.

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


Initialisation of encoders, variables 

Definition at line 104 of file encoders\_\-microb.c.

References DDR, encoders\_\-microb\_\-manage(), INIT, IRQ\_\-LOCK, IRQ\_\-UNLOCK, sbi, SEL\_\-A, SEL\_\-B, and wait\_\-4cyc.\index{encoders\_\-microb.h@{encoders\_\-microb.h}!encoders\_\-microb\_\-manage@{encoders\_\-microb\_\-manage}}
\index{encoders\_\-microb\_\-manage@{encoders\_\-microb\_\-manage}!encoders_microb.h@{encoders\_\-microb.h}}
\subsubsection[encoders\_\-microb\_\-manage]{\setlength{\rightskip}{0pt plus 5cm}void encoders\_\-microb\_\-manage (void $\ast$ {\em dummy})}\label{encoders__microb_8h_e3d9e9664caa710b4fa3642d585b940c}


Update encoders values, need to be done quite often (Fmax\_\-encoders/64). First, encoders 0 2 4 6 are read, and at next call encoders 1 3 5 7.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em dummy}]: a (void $\ast$) pointer that is not used. It is here according to the encoders interface. \end{description}
\end{Desc}


Definition at line 166 of file encoders\_\-microb.c.

References IRQ\_\-LOCK, IRQ\_\-UNLOCK, READ, SEL\_\-A, and SEL\_\-B.

Referenced by encoders\_\-microb\_\-init().\index{encoders\_\-microb.h@{encoders\_\-microb.h}!encoders\_\-microb\_\-set\_\-value@{encoders\_\-microb\_\-set\_\-value}}
\index{encoders\_\-microb\_\-set\_\-value@{encoders\_\-microb\_\-set\_\-value}!encoders_microb.h@{encoders\_\-microb.h}}
\subsubsection[encoders\_\-microb\_\-set\_\-value]{\setlength{\rightskip}{0pt plus 5cm}void encoders\_\-microb\_\-set\_\-value (void $\ast$ {\em number}, \/  int32\_\-t {\em v})}\label{encoders__microb_8h_f8b925db51c0e3dbbf04ea6f0f93c54b}


Set an encoder value

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em data}]: a (void $\ast$) that is casted in (uint8\_\-t) containing the number of the encoder to be read. \item[{\em v}]: the value\end{description}
\end{Desc}
Set an encoder value

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em number}]: a (void $\ast$) that is casted in (int) containing the number of the encoder to be read. \item[{\em v}]: the value \end{description}
\end{Desc}


Definition at line 248 of file encoders\_\-microb.c.

References g\_\-encoders\_\-microb\_\-values, IRQ\_\-LOCK, and IRQ\_\-UNLOCK.