\hypertarget{encoder_8c}{}\doxysection{encoder.\+c-\/Dateireferenz}
\label{encoder_8c}\index{encoder.c@{encoder.c}}


Drehencoder Library.  


{\ttfamily \#include $<$avr/io.\+h$>$}\newline
{\ttfamily \#include $<$avr/interrupt.\+h$>$}\newline
{\ttfamily \#include \char`\"{}encoder.\+h\char`\"{}}\newline
Include-\/\+Abhängigkeitsdiagramm für encoder.\+c\+:\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=301pt]{encoder_8c__incl}
\end{center}
\end{figure}
\doxysubsection*{Typdefinitionen}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{encoder_8c_aedeed12448cdc285bc8c21763ae9f1a0}\label{encoder_8c_aedeed12448cdc285bc8c21763ae9f1a0}} 
typedef enum EButton\+State {\bfseries t\+EButton\+State}
\end{DoxyCompactItemize}
\doxysubsection*{Aufzählungen}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{encoder_8c_a7e7392f1e24ef55450099d5e7d095c4b}\label{encoder_8c_a7e7392f1e24ef55450099d5e7d095c4b}} 
enum {\bfseries EButton\+State} \{ {\bfseries Button\+State\+\_\+\+Unpressed}
, {\bfseries Button\+State\+\_\+\+Pressed}
, {\bfseries Button\+State\+\_\+\+Hold}
, {\bfseries Button\+State\+\_\+\+Released}
 \}
\end{DoxyCompactItemize}
\doxysubsection*{Funktionen}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{encoder_8c_a80ec2c177aa9c2636f797ca881381827}\label{encoder_8c_a80ec2c177aa9c2636f797ca881381827}} 
void {\bfseries Encoder\+Init} (void)
\item 
void \mbox{\hyperlink{encoder_8c_a660e5b11dce82f5b307f628def81d188}{Encoder\+Polling}} (void)
\begin{DoxyCompactList}\small\item\em Encoder\+Polling. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{encoder_8c_aaf6a92358a883c87b032984732655084}\label{encoder_8c_aaf6a92358a883c87b032984732655084}} 
int8\+\_\+t {\bfseries Encode\+Read} (void)
\item 
\mbox{\Hypertarget{encoder_8c_a9ec6df4b13c9134f1c61546b718cd563}\label{encoder_8c_a9ec6df4b13c9134f1c61546b718cd563}} 
int8\+\_\+t {\bfseries Encoder\+Read} (char Ueberlauf)
\item 
\mbox{\Hypertarget{encoder_8c_ac9e955efd05fd5f6579bb5e179b506c7}\label{encoder_8c_ac9e955efd05fd5f6579bb5e179b506c7}} 
void {\bfseries Encoder\+Write} (int8\+\_\+t \mbox{\hyperlink{globals_8h_a3a1db669858552a5c21490149c648e12}{Encoder\+Pos}})
\item 
\mbox{\Hypertarget{encoder_8c_ab5afede50bbce8aae40f3d02be64a374}\label{encoder_8c_ab5afede50bbce8aae40f3d02be64a374}} 
void {\bfseries Encoder\+Min\+Max} (int8\+\_\+t Encoder\+Min, int8\+\_\+t Encoder\+Max)
\item 
\mbox{\Hypertarget{encoder_8c_a2de57e0e3c5f3e0ab176c11363a58bf1}\label{encoder_8c_a2de57e0e3c5f3e0ab176c11363a58bf1}} 
t\+EButton\+Pressed\+State {\bfseries Encoder\+Get\+Button\+State} (void)
\end{DoxyCompactItemize}
\doxysubsection*{Variablen}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{encoder_8c_abdbce2c910e9ca583dbbf74a99d50d72}\label{encoder_8c_abdbce2c910e9ca583dbbf74a99d50d72}} 
int8\+\_\+t {\bfseries Drehgeber\+Position}
\item 
\mbox{\Hypertarget{encoder_8c_aa7c6a2827b1cc4fcb2c5ff33d8d05300}\label{encoder_8c_aa7c6a2827b1cc4fcb2c5ff33d8d05300}} 
int8\+\_\+t {\bfseries Drehgeber\+Max} = 127
\item 
\mbox{\Hypertarget{encoder_8c_af734dbab527768cb6207a4a5bd90bd1d}\label{encoder_8c_af734dbab527768cb6207a4a5bd90bd1d}} 
int8\+\_\+t {\bfseries Drehgeber\+Min} = -\/127
\item 
\mbox{\Hypertarget{encoder_8c_a25f7e7becdadc23b1f28f301dbf0325d}\label{encoder_8c_a25f7e7becdadc23b1f28f301dbf0325d}} 
volatile int16\+\_\+t {\bfseries i\+Button\+Pressed\+Counter} = 0
\item 
\mbox{\Hypertarget{encoder_8c_a93ec6852319d923e71003f50ad073327}\label{encoder_8c_a93ec6852319d923e71003f50ad073327}} 
volatile int16\+\_\+t {\bfseries i\+Button\+Debounce\+Cycles} = 0
\item 
\mbox{\Hypertarget{encoder_8c_aa12d33a8833ab123443cfe09d8c385e8}\label{encoder_8c_aa12d33a8833ab123443cfe09d8c385e8}} 
volatile int16\+\_\+t {\bfseries i\+Button\+Pressed\+Long\+Cycles} = 0
\item 
\mbox{\Hypertarget{encoder_8c_a3f5ba1853e96736d1ffcc756e9138849}\label{encoder_8c_a3f5ba1853e96736d1ffcc756e9138849}} 
volatile int8\+\_\+t {\bfseries enc\+\_\+delta}
\item 
\mbox{\Hypertarget{encoder_8c_a904a7151d59a45adae73c4e0a68b5a1f}\label{encoder_8c_a904a7151d59a45adae73c4e0a68b5a1f}} 
static int8\+\_\+t {\bfseries last}
\item 
\mbox{\Hypertarget{encoder_8c_a9031f1bbc45388b7f4d7a6d534114e64}\label{encoder_8c_a9031f1bbc45388b7f4d7a6d534114e64}} 
volatile t\+EButton\+State {\bfseries button\+State} = Button\+State\+\_\+\+Unpressed
\item 
\mbox{\Hypertarget{encoder_8c_a32833c1bd4da805038b020ba58750218}\label{encoder_8c_a32833c1bd4da805038b020ba58750218}} 
volatile t\+EButton\+Pressed\+State {\bfseries button\+Pressed} = Button\+Pressed\+\_\+\+Unpressed
\end{DoxyCompactItemize}


\doxysubsection{Ausführliche Beschreibung}
Drehencoder Library. 

\begin{DoxyDate}{Datum}
2014-\/12-\/04 
\end{DoxyDate}
\begin{DoxyAuthor}{Autor}
Frank Klee \begin{DoxyVerb}    Basisroutinen zum Abfragen eines Drehencoders mittels Polling.
    Quelle: https://www.mikrocontroller.net/articles/Drehgeber
\end{DoxyVerb}
 

Tom, DL7\+BJ 
\end{DoxyAuthor}
\begin{DoxyDate}{Datum}
2023-\/03-\/23
\end{DoxyDate}
Formatierungen und Umbenennungen der Funktionen 

\doxysubsection{Dokumentation der Funktionen}
\mbox{\Hypertarget{encoder_8c_a660e5b11dce82f5b307f628def81d188}\label{encoder_8c_a660e5b11dce82f5b307f628def81d188}} 
\index{encoder.c@{encoder.c}!EncoderPolling@{EncoderPolling}}
\index{EncoderPolling@{EncoderPolling}!encoder.c@{encoder.c}}
\doxysubsubsection{\texorpdfstring{EncoderPolling()}{EncoderPolling()}}
{\footnotesize\ttfamily void Encoder\+Polling (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Encoder\+Polling. 

\begin{DoxyVerb}    Abfrage des Drehencoders und des Tasters
    Wird vom Timer 0 aufgerufen
\end{DoxyVerb}
 
\begin{DoxyParams}{Parameter}
{\em none} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Rückgabe}
none 
\end{DoxyReturn}
