\doxysection{src/core/bits.c File Reference}
\label{bits_8c}\index{src/core/bits.c@{src/core/bits.c}}
{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include \char`\"{}config.\+h\char`\"{}}\newline
{\ttfamily \#include $<$osmocom/core/bits.\+h$>$}\newline
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
int \textbf{ osmo\+\_\+ubit2pbit} (\textbf{ pbit\+\_\+t} $\ast$out, const \textbf{ ubit\+\_\+t} $\ast$in, unsigned int num\+\_\+bits)
\begin{DoxyCompactList}\small\item\em convert unpacked bits to packed bits, return length in bytes \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+nibble\+\_\+shift\+\_\+right} (uint8\+\_\+t $\ast$out, const uint8\+\_\+t $\ast$in, unsigned int num\+\_\+nibbles)
\begin{DoxyCompactList}\small\item\em Shift unaligned input to octet-\/aligned output. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+nibble\+\_\+shift\+\_\+left\+\_\+unal} (uint8\+\_\+t $\ast$out, const uint8\+\_\+t $\ast$in, unsigned int num\+\_\+nibbles)
\begin{DoxyCompactList}\small\item\em Shift unaligned input to octet-\/aligned output. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+ubit2sbit} (\textbf{ sbit\+\_\+t} $\ast$out, const \textbf{ ubit\+\_\+t} $\ast$in, unsigned int num\+\_\+bits)
\begin{DoxyCompactList}\small\item\em convert unpacked bits to soft bits \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+sbit2ubit} (\textbf{ ubit\+\_\+t} $\ast$out, const \textbf{ sbit\+\_\+t} $\ast$in, unsigned int num\+\_\+bits)
\begin{DoxyCompactList}\small\item\em convert soft bits to unpacked bits \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+pbit2ubit} (\textbf{ ubit\+\_\+t} $\ast$out, const \textbf{ pbit\+\_\+t} $\ast$in, unsigned int num\+\_\+bits)
\begin{DoxyCompactList}\small\item\em convert packed bits to unpacked bits, return length in bytes \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+ubit2pbit\+\_\+ext} (\textbf{ pbit\+\_\+t} $\ast$out, unsigned int out\+\_\+ofs, const \textbf{ ubit\+\_\+t} $\ast$in, unsigned int in\+\_\+ofs, unsigned int num\+\_\+bits, int lsb\+\_\+mode)
\begin{DoxyCompactList}\small\item\em convert unpacked bits to packed bits (extended options) \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+pbit2ubit\+\_\+ext} (\textbf{ ubit\+\_\+t} $\ast$out, unsigned int out\+\_\+ofs, const \textbf{ pbit\+\_\+t} $\ast$in, unsigned int in\+\_\+ofs, unsigned int num\+\_\+bits, int lsb\+\_\+mode)
\begin{DoxyCompactList}\small\item\em convert packed bits to unpacked bits (extended options) \end{DoxyCompactList}\item 
uint32\+\_\+t \textbf{ osmo\+\_\+bit\+\_\+reversal} (uint32\+\_\+t \textbf{ x}, enum \textbf{ osmo\+\_\+br\+\_\+mode} \textbf{ k})
\begin{DoxyCompactList}\small\item\em generalized bit reversal function \end{DoxyCompactList}\item 
uint32\+\_\+t \textbf{ osmo\+\_\+revbytebits\+\_\+32} (uint32\+\_\+t \textbf{ x})
\begin{DoxyCompactList}\small\item\em reverse the bit-\/order in each byte of a dword \end{DoxyCompactList}\item 
uint32\+\_\+t \textbf{ osmo\+\_\+revbytebits\+\_\+8} (uint8\+\_\+t \textbf{ x})
\begin{DoxyCompactList}\small\item\em reverse the bit order in a byte \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+revbytebits\+\_\+buf} (uint8\+\_\+t $\ast$buf, int \textbf{ len})
\begin{DoxyCompactList}\small\item\em reverse bit-\/order of each byte in a buffer \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
static const uint8\+\_\+t \textbf{ flip\+\_\+table} [256]
\end{DoxyCompactItemize}
