\doxysection{crc8gen.\+h}
\label{crc8gen_8h_source}\index{include/osmocom/core/crc8gen.h@{include/osmocom/core/crc8gen.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 }
\DoxyCodeLine{3 \textcolor{comment}{/*}}
\DoxyCodeLine{4 \textcolor{comment}{ * Copyright (C) 2011  Sylvain Munaut <tnt@246tNt.com>}}
\DoxyCodeLine{5 \textcolor{comment}{ *}}
\DoxyCodeLine{6 \textcolor{comment}{ * All Rights Reserved}}
\DoxyCodeLine{7 \textcolor{comment}{ *}}
\DoxyCodeLine{8 \textcolor{comment}{ * This program is free software; you can redistribute it and/or modify}}
\DoxyCodeLine{9 \textcolor{comment}{ * it under the terms of the GNU General Public License as published by}}
\DoxyCodeLine{10 \textcolor{comment}{ * the Free Software Foundation; either version 2 of the License, or}}
\DoxyCodeLine{11 \textcolor{comment}{ * (at your option) any later version.}}
\DoxyCodeLine{12 \textcolor{comment}{ *}}
\DoxyCodeLine{13 \textcolor{comment}{ * This program is distributed in the hope that it will be useful,}}
\DoxyCodeLine{14 \textcolor{comment}{ * but WITHOUT ANY WARRANTY; without even the implied warranty of}}
\DoxyCodeLine{15 \textcolor{comment}{ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the}}
\DoxyCodeLine{16 \textcolor{comment}{ * GNU General Public License for more details.}}
\DoxyCodeLine{17 \textcolor{comment}{ */}}
\DoxyCodeLine{18 }
\DoxyCodeLine{19 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{20 }
\DoxyCodeLine{25 \textcolor{preprocessor}{\#include <stdint.h>}}
\DoxyCodeLine{26 \textcolor{preprocessor}{\#include <osmocom/core/bits.h>}}
\DoxyCodeLine{27 }
\DoxyCodeLine{28 }
\DoxyCodeLine{30 \textcolor{keyword}{struct }osmo\_crc8gen\_code \{}
\DoxyCodeLine{31         \textcolor{keywordtype}{int} bits;           }
\DoxyCodeLine{32         uint8\_t poly;      }
\DoxyCodeLine{33         uint8\_t init;      }
\DoxyCodeLine{34         uint8\_t remainder; }
\DoxyCodeLine{35 \};}
\DoxyCodeLine{36 }
\DoxyCodeLine{37 uint8\_t osmo\_crc8gen\_compute\_bits(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_crc8gen\_code *code,}
\DoxyCodeLine{38                                     \textcolor{keyword}{const} ubit\_t *in, \textcolor{keywordtype}{int} len);}
\DoxyCodeLine{39 \textcolor{keywordtype}{int} osmo\_crc8gen\_check\_bits(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_crc8gen\_code *code,}
\DoxyCodeLine{40                              \textcolor{keyword}{const} ubit\_t *in, \textcolor{keywordtype}{int} len, \textcolor{keyword}{const} ubit\_t *crc\_bits);}
\DoxyCodeLine{41 \textcolor{keywordtype}{void} osmo\_crc8gen\_set\_bits(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_crc8gen\_code *code,}
\DoxyCodeLine{42                             \textcolor{keyword}{const} ubit\_t *in, \textcolor{keywordtype}{int} len, ubit\_t *crc\_bits);}
\DoxyCodeLine{43 }
\DoxyCodeLine{44 }
\DoxyCodeLine{47 \textcolor{comment}{/* vim: set syntax=c: */}}

\end{DoxyCode}
