\doxysection{FACCH9 channel coding}
\label{group__facch9}\index{FACCH9 channel coding@{FACCH9 channel coding}}
\doxysubsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \textbf{ facch9.\+h}
\begin{DoxyCompactList}\small\item\em Osmocom GMR-\/1 FACCH9 channel coding header. \end{DoxyCompactList}\item 
file \textbf{ facch9.\+c}
\begin{DoxyCompactList}\small\item\em Osmocom GMR-\/1 FACCH9 channel coding implementation. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ gmr1\+\_\+facch9\+\_\+encode} (ubit\+\_\+t $\ast$bits\+\_\+e, const uint8\+\_\+t $\ast$l2, const ubit\+\_\+t $\ast$bits\+\_\+sacch, const ubit\+\_\+t $\ast$bits\+\_\+status, const ubit\+\_\+t $\ast$ciph)
\begin{DoxyCompactList}\small\item\em Stateless GMR-\/1 FACCH9 channel coder. \end{DoxyCompactList}\item 
int \textbf{ gmr1\+\_\+facch9\+\_\+decode} (uint8\+\_\+t $\ast$l2, sbit\+\_\+t $\ast$bits\+\_\+sacch, sbit\+\_\+t $\ast$bits\+\_\+status, const sbit\+\_\+t $\ast$bits\+\_\+e, const ubit\+\_\+t $\ast$ciph, int $\ast$conv\+\_\+rv)
\begin{DoxyCompactList}\small\item\em Stateless GMR-\/1 FACCH9 channel decoder. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}


\doxysubsection{Function Documentation}
\mbox{\label{group__facch9_ga42d1d80d7a1bfab7d92ad0d28d8f87c6}} 
\index{FACCH9 channel coding@{FACCH9 channel coding}!gmr1\_facch9\_decode@{gmr1\_facch9\_decode}}
\index{gmr1\_facch9\_decode@{gmr1\_facch9\_decode}!FACCH9 channel coding@{FACCH9 channel coding}}
\doxysubsubsection{gmr1\_facch9\_decode()}
{\footnotesize\ttfamily int gmr1\+\_\+facch9\+\_\+decode (\begin{DoxyParamCaption}\item[{uint8\+\_\+t $\ast$}]{l2,  }\item[{sbit\+\_\+t $\ast$}]{bits\+\_\+sacch,  }\item[{sbit\+\_\+t $\ast$}]{bits\+\_\+status,  }\item[{const sbit\+\_\+t $\ast$}]{bits\+\_\+e,  }\item[{const ubit\+\_\+t $\ast$}]{ciph,  }\item[{int $\ast$}]{conv\+\_\+rv }\end{DoxyParamCaption})}



Stateless GMR-\/1 FACCH9 channel decoder. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em l2} & L2 packet data (38 bytes, last nibble unused) \\
\hline
\mbox{\texttt{ out}}  & {\em bits\+\_\+sacch} & 10 saach bits demultiplexed \\
\hline
\mbox{\texttt{ out}}  & {\em bits\+\_\+status} & 4 status bits demultiplexed \\
\hline
\mbox{\texttt{ in}}  & {\em bits\+\_\+e} & 662 encoded bits of one NT9 burst \\
\hline
\mbox{\texttt{ in}}  & {\em ciph} & 658 bits of cipher stream (can be NULL) \\
\hline
\mbox{\texttt{ out}}  & {\em conv\+\_\+rv} & Return of the convolutional decode (can be NULL) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if CRC check pass, any other value for fail. 
\end{DoxyReturn}


References \textbf{ gmr1\+\_\+deinterleave\+\_\+intra()}, and \textbf{ gmr1\+\_\+scramble\+\_\+sbit()}.

\mbox{\label{group__facch9_ga8956be2f31fd48853350bc092fd1797f}} 
\index{FACCH9 channel coding@{FACCH9 channel coding}!gmr1\_facch9\_encode@{gmr1\_facch9\_encode}}
\index{gmr1\_facch9\_encode@{gmr1\_facch9\_encode}!FACCH9 channel coding@{FACCH9 channel coding}}
\doxysubsubsection{gmr1\_facch9\_encode()}
{\footnotesize\ttfamily void gmr1\+\_\+facch9\+\_\+encode (\begin{DoxyParamCaption}\item[{ubit\+\_\+t $\ast$}]{bits\+\_\+e,  }\item[{const uint8\+\_\+t $\ast$}]{l2,  }\item[{const ubit\+\_\+t $\ast$}]{bits\+\_\+sacch,  }\item[{const ubit\+\_\+t $\ast$}]{bits\+\_\+status,  }\item[{const ubit\+\_\+t $\ast$}]{ciph }\end{DoxyParamCaption})}



Stateless GMR-\/1 FACCH9 channel coder. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ out}}  & {\em bits\+\_\+e} & 662 encoded bits of one NT9 burst \\
\hline
\mbox{\texttt{ in}}  & {\em l2} & L2 packet data (38 bytes, last nibble unused) \\
\hline
\mbox{\texttt{ in}}  & {\em bits\+\_\+sacch} & 10 saach bits to be multiplexed \\
\hline
\mbox{\texttt{ in}}  & {\em bits\+\_\+status} & 4 status bits to be multiplexed \\
\hline
\mbox{\texttt{ in}}  & {\em ciph} & 658 bits of cipher stream (can be NULL) \\
\hline
\end{DoxyParams}


References \textbf{ gmr1\+\_\+crc16}.

