\hypertarget{button_8c}{
\section{button.c File Reference}
\label{button_8c}\index{button.c@{button.c}}
}


Button Interface.  


{\ttfamily \#include $<$avr/io.h$>$}\par
{\ttfamily \#include $<$avr/interrupt.h$>$}\par
{\ttfamily \#include $<$util/delay.h$>$}\par
{\ttfamily \#include \char`\"{}button.h\char`\"{}}\par
{\ttfamily \#include \char`\"{}uart.h\char`\"{}}\par
Include dependency graph for button.c:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{button_8c__incl}
\end{center}
\end{figure}
\subsection*{Defines}
\begin{DoxyCompactItemize}
\item 
\hypertarget{button_8c_a9a98d21add5238019fe3de98f1bf6912}{
\#define {\bfseries \_\-BUTTON\_\-C\_\-}~1}
\label{button_8c_a9a98d21add5238019fe3de98f1bf6912}

\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{button_8c_a9ebb64bc3ea7a1e75d422784fe931347}{button\_\-init} (void)
\begin{DoxyCompactList}\small\item\em Initialise the Button Interface. \item\end{DoxyCompactList}\item 
\hypertarget{button_8c_a0b31814d988812a766c52ce01620d948}{
uint8\_\-t {\bfseries button\_\-read} (void)}
\label{button_8c_a0b31814d988812a766c52ce01620d948}

\item 
void \hyperlink{button_8c_a14a60cca3a5bbf6caa3bcce9c97d4be5}{button\_\-process} (void)
\begin{DoxyCompactList}\small\item\em Button Process. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Button Interface. \begin{DoxyAuthor}{Author}
Dominic Rathje (\href{mailto:dominic.rathje@uni-ulm.de}{\tt dominic.rathje@uni-\/ulm.de}) 
\end{DoxyAuthor}
\begin{DoxyVersion}{Version}
1.0 
\end{DoxyVersion}
\begin{DoxyNote}{Note}

\begin{DoxyItemize}
\item Compiler : WinAVR 20100110
\item Supported devices : ATMega8 
\end{DoxyItemize}
\end{DoxyNote}


Definition in file \hyperlink{button_8c_source}{button.c}.



\subsection{Function Documentation}
\hypertarget{button_8c_a9ebb64bc3ea7a1e75d422784fe931347}{
\index{button.c@{button.c}!button\_\-init@{button\_\-init}}
\index{button\_\-init@{button\_\-init}!button.c@{button.c}}
\subsubsection[{button\_\-init}]{\setlength{\rightskip}{0pt plus 5cm}void button\_\-init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}
\label{button_8c_a9ebb64bc3ea7a1e75d422784fe931347}


Initialise the Button Interface. 

Configures the Port Registers. Call this function at the beginning of your main function. 

Definition at line 21 of file button.c.

\hypertarget{button_8c_a14a60cca3a5bbf6caa3bcce9c97d4be5}{
\index{button.c@{button.c}!button\_\-process@{button\_\-process}}
\index{button\_\-process@{button\_\-process}!button.c@{button.c}}
\subsubsection[{button\_\-process}]{\setlength{\rightskip}{0pt plus 5cm}void button\_\-process (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}
\label{button_8c_a14a60cca3a5bbf6caa3bcce9c97d4be5}


Button Process. 

Reads the Ports and sends the according character to the Host on any pinchange Call this function regularly in main loop. 

Definition at line 58 of file button.c.



Here is the call graph for this function:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=400pt]{button_8c_a14a60cca3a5bbf6caa3bcce9c97d4be5_cgraph}
\end{center}
\end{figure}


