\doxysection{v110.\+h}
\label{v110_8h_source}\index{include/osmocom/isdn/v110.h@{include/osmocom/isdn/v110.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{2 }
\DoxyCodeLine{3 \textcolor{preprocessor}{\#include <osmocom/core/bits.h>}}
\DoxyCodeLine{4 }
\DoxyCodeLine{5 \textcolor{comment}{/* See Section 5.1.2.1 of ITU-\/T V.110 */}}
\DoxyCodeLine{6 \textcolor{preprocessor}{\#define MAX\_D\_BITS      48}}
\DoxyCodeLine{7 \textcolor{preprocessor}{\#define MAX\_E\_BITS      7}}
\DoxyCodeLine{8 \textcolor{preprocessor}{\#define MAX\_S\_BITS      9}}
\DoxyCodeLine{9 \textcolor{preprocessor}{\#define MAX\_X\_BITS      2}}
\DoxyCodeLine{10 }
\DoxyCodeLine{12 \textcolor{keyword}{struct }osmo\_v110\_decoded\_frame \{}
\DoxyCodeLine{13         ubit\_t d\_bits[MAX\_D\_BITS];}
\DoxyCodeLine{14         ubit\_t e\_bits[MAX\_E\_BITS];}
\DoxyCodeLine{15         ubit\_t s\_bits[MAX\_S\_BITS];}
\DoxyCodeLine{16         ubit\_t x\_bits[MAX\_X\_BITS];}
\DoxyCodeLine{17 \};}
\DoxyCodeLine{18 }
\DoxyCodeLine{19 \textcolor{keywordtype}{int} osmo\_v110\_decode\_frame(\textcolor{keyword}{struct} osmo\_v110\_decoded\_frame *fr, \textcolor{keyword}{const} ubit\_t *ra\_bits, \textcolor{keywordtype}{size\_t} n\_bits);}
\DoxyCodeLine{20 \textcolor{keywordtype}{int} osmo\_v110\_encode\_frame(ubit\_t *ra\_bits, \textcolor{keywordtype}{size\_t} n\_bits, \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_v110\_decoded\_frame *fr);}
\DoxyCodeLine{21 }
\DoxyCodeLine{22 \textcolor{keywordtype}{void} osmo\_v110\_ubit\_dump(FILE *outf, \textcolor{keyword}{const} ubit\_t *fr, \textcolor{keywordtype}{size\_t} in\_len);}
\DoxyCodeLine{23 }
\DoxyCodeLine{24 }
\DoxyCodeLine{26 \textcolor{keyword}{enum} osmo\_v100\_sync\_ra1\_rate \{}
\DoxyCodeLine{27         OSMO\_V110\_SYNC\_RA1\_600,}
\DoxyCodeLine{28         OSMO\_V110\_SYNC\_RA1\_1200,}
\DoxyCodeLine{29         OSMO\_V110\_SYNC\_RA1\_2400,}
\DoxyCodeLine{30         OSMO\_V110\_SYNC\_RA1\_4800,}
\DoxyCodeLine{31         OSMO\_V110\_SYNC\_RA1\_7200,}
\DoxyCodeLine{32         OSMO\_V110\_SYNC\_RA1\_9600,}
\DoxyCodeLine{33         OSMO\_V110\_SYNC\_RA1\_12000,}
\DoxyCodeLine{34         OSMO\_V110\_SYNC\_RA1\_14400,}
\DoxyCodeLine{35         OSMO\_V110\_SYNC\_RA1\_19200,}
\DoxyCodeLine{36         OSMO\_V110\_SYNC\_RA1\_24000,}
\DoxyCodeLine{37         OSMO\_V110\_SYNC\_RA1\_28800,}
\DoxyCodeLine{38         OSMO\_V110\_SYNC\_RA1\_38400,}
\DoxyCodeLine{39         \_NUM\_OSMO\_V110\_SYNC\_RA1}
\DoxyCodeLine{40 \};}
\DoxyCodeLine{41 }
\DoxyCodeLine{42 \textcolor{keyword}{extern} \textcolor{keyword}{const} ubit\_t osmo\_v110\_e1e2e3[\_NUM\_OSMO\_V110\_SYNC\_RA1][3];}
\DoxyCodeLine{43 }
\DoxyCodeLine{44 \textcolor{preprocessor}{\#define osmo\_v110\_e1e2e3\_set(e\_bits, rate) \(\backslash\)}}
\DoxyCodeLine{45 \textcolor{preprocessor}{        memcpy(e\_bits, osmo\_v110\_e1e2e3[rate], 3)}}
\DoxyCodeLine{46 \textcolor{preprocessor}{\#define osmo\_v110\_e1e2e3\_cmp(e\_bits, rate) \(\backslash\)}}
\DoxyCodeLine{47 \textcolor{preprocessor}{        memcmp(e\_bits, osmo\_v110\_e1e2e3[rate], 3)}}
\DoxyCodeLine{48 }
\DoxyCodeLine{49 \textcolor{keywordtype}{int} osmo\_v110\_sync\_ra1\_get\_user\_data\_chunk\_bitlen(\textcolor{keyword}{enum} osmo\_v100\_sync\_ra1\_rate rate);}
\DoxyCodeLine{50 \textcolor{keywordtype}{int} osmo\_v110\_sync\_ra1\_get\_user\_data\_rate(\textcolor{keyword}{enum} osmo\_v100\_sync\_ra1\_rate rate);}
\DoxyCodeLine{51 \textcolor{keywordtype}{int} osmo\_v110\_sync\_ra1\_get\_intermediate\_rate(\textcolor{keyword}{enum} osmo\_v100\_sync\_ra1\_rate rate);}
\DoxyCodeLine{52 }
\DoxyCodeLine{53 \textcolor{keywordtype}{int} osmo\_v110\_sync\_ra1\_user\_to\_ir(\textcolor{keyword}{enum} osmo\_v100\_sync\_ra1\_rate rate, \textcolor{keyword}{struct} osmo\_v110\_decoded\_frame *fr,}
\DoxyCodeLine{54                                   \textcolor{keyword}{const} ubit\_t *d\_in, \textcolor{keywordtype}{size\_t} in\_len);}
\DoxyCodeLine{55 }
\DoxyCodeLine{56 \textcolor{keywordtype}{int} osmo\_v110\_sync\_ra1\_ir\_to\_user(\textcolor{keyword}{enum} osmo\_v100\_sync\_ra1\_rate rate, ubit\_t *d\_out, \textcolor{keywordtype}{size\_t} out\_len,}
\DoxyCodeLine{57                                   \textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_v110\_decoded\_frame *fr);}

\end{DoxyCode}
