\hypertarget{group__util__parity}{}\doxysubsection{$<$util/parity.h$>$\+: Parity bit generation}
\label{group__util__parity}\index{$<$util/parity.h$>$: Parity bit generation@{$<$util/parity.h$>$: Parity bit generation}}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{group__util__parity_ga4180eaa9b8f27f8efc589f3a3ba1724c}{parity\+\_\+even\+\_\+bit}}(val)
\end{DoxyCompactItemize}


\doxysubsubsection{Detailed Description}

\begin{DoxyCode}{0}
\DoxyCodeLine{\textcolor{preprocessor}{\#include <\mbox{\hyperlink{parity_8h}{util/parity.h}}>} }
\end{DoxyCode}


This header file contains optimized assembler code to calculate the parity bit for a byte. 

\doxysubsubsection{Macro Definition Documentation}
\mbox{\Hypertarget{group__util__parity_ga4180eaa9b8f27f8efc589f3a3ba1724c}\label{group__util__parity_ga4180eaa9b8f27f8efc589f3a3ba1724c}} 
\index{$<$util/parity.h$>$: Parity bit generation@{$<$util/parity.h$>$: Parity bit generation}!parity\_even\_bit@{parity\_even\_bit}}
\index{parity\_even\_bit@{parity\_even\_bit}!$<$util/parity.h$>$: Parity bit generation@{$<$util/parity.h$>$: Parity bit generation}}
\doxyparagraph{\texorpdfstring{parity\_even\_bit}{parity\_even\_bit}}
{\footnotesize\ttfamily \#define parity\+\_\+even\+\_\+bit(\begin{DoxyParamCaption}\item[{}]{val }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}{0}
\DoxyCodeLine{(\_\_extension\_\_(\{                    \(\backslash\)}
\DoxyCodeLine{    unsigned \textcolor{keywordtype}{char} \_\_t;              \(\backslash\)}
\DoxyCodeLine{    \_\_asm\_\_ (                   \(\backslash\)}
\DoxyCodeLine{        \textcolor{stringliteral}{"mov \_\_tmp\_reg\_\_,\%0"} \textcolor{stringliteral}{"\(\backslash\)n\(\backslash\)t"}     \(\backslash\)}
\DoxyCodeLine{        \textcolor{stringliteral}{"swap \%0"} \textcolor{stringliteral}{"\(\backslash\)n\(\backslash\)t"}            \(\backslash\)}
\DoxyCodeLine{        \textcolor{stringliteral}{"eor \%0,\_\_tmp\_reg\_\_"} \textcolor{stringliteral}{"\(\backslash\)n\(\backslash\)t"}     \(\backslash\)}
\DoxyCodeLine{        \textcolor{stringliteral}{"mov \_\_tmp\_reg\_\_,\%0"} \textcolor{stringliteral}{"\(\backslash\)n\(\backslash\)t"}     \(\backslash\)}
\DoxyCodeLine{        \textcolor{stringliteral}{"lsr \%0"} \textcolor{stringliteral}{"\(\backslash\)n\(\backslash\)t"}             \(\backslash\)}
\DoxyCodeLine{        \textcolor{stringliteral}{"lsr \%0"} \textcolor{stringliteral}{"\(\backslash\)n\(\backslash\)t"}             \(\backslash\)}
\DoxyCodeLine{        \textcolor{stringliteral}{"eor \%0,\_\_tmp\_reg\_\_"}            \(\backslash\)}
\DoxyCodeLine{        : \textcolor{stringliteral}{"=r"} (\_\_t)                \(\backslash\)}
\DoxyCodeLine{        : \textcolor{stringliteral}{"0"} ((\textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char})(val))        \(\backslash\)}
\DoxyCodeLine{        : \textcolor{stringliteral}{"r0"}                  \(\backslash\)}
\DoxyCodeLine{    );                      \(\backslash\)}
\DoxyCodeLine{    (((\_\_t + 1) >> 1) \& 1);             \(\backslash\)}
\DoxyCodeLine{ \}))}

\end{DoxyCode}
\begin{DoxyReturn}{Returns}
1 if {\ttfamily val} has an odd number of bits set. 
\end{DoxyReturn}
