\doxysection{include/osmocom/core/soft\+\_\+uart.h File Reference}
\label{soft__uart_8h}\index{include/osmocom/core/soft\_uart.h@{include/osmocom/core/soft\_uart.h}}


Software UART implementation.  


{\ttfamily \#include $<$stdint.\+h$>$}\newline
{\ttfamily \#include $<$stdbool.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/bits.\+h$>$}\newline
{\ttfamily \#include $<$osmocom/core/msgb.\+h$>$}\newline
\doxysubsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg}
\begin{DoxyCompactList}\small\item\em Configuration for a soft-\/\+UART. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+parity\+\_\+mode} \{ \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+PARITY\+\_\+\+NONE}
, \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+PARITY\+\_\+\+EVEN}
, \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+PARITY\+\_\+\+ODD}
, \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+PARITY\+\_\+\+MARK}
, \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+PARITY\+\_\+\+SPACE}
, \newline
\textbf{ \+\_\+\+OSMO\+\_\+\+SUART\+\_\+\+PARITY\+\_\+\+NUM}
 \}
\begin{DoxyCompactList}\small\item\em Parity mode. \end{DoxyCompactList}\item 
enum \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+flags} \{ \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+F\+\_\+\+FRAMING\+\_\+\+ERROR} = (1 $<$$<$ 0)
, \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+F\+\_\+\+PARITY\+\_\+\+ERROR} = (1 $<$$<$ 1)
, \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+F\+\_\+\+BREAK} = (1 $<$$<$ 2)
 \}
\begin{DoxyCompactList}\small\item\em Flags passed to the application. \end{DoxyCompactList}\item 
enum \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+status} \{ \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+\+DTR} = (1 $<$$<$ 0)
, \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+\+DCD} = (1 $<$$<$ 1)
, \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+\+DSR} = (1 $<$$<$ 2)
, \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+\+RI} = (1 $<$$<$ 3)
, \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+\+RTS\+\_\+\+RTR} = (1 $<$$<$ 4)
, \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+\+CTS} = (1 $<$$<$ 5)
 \}
\begin{DoxyCompactList}\small\item\em Modem status \char`\"{}line\char`\"{} flags. \end{DoxyCompactList}\item 
enum \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+flow\+\_\+ctrl\+\_\+mode} \{ \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+\+NONE}
, \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+\+DTR\+\_\+\+DSR}
, \newline
\textbf{ OSMO\+\_\+\+SUART\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+\+RTS\+\_\+\+CTS}
 \}
\begin{DoxyCompactList}\small\item\em Flow control mode. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$ \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+alloc} (void $\ast$ctx, const char $\ast$\textbf{ name}, const struct \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg} $\ast$cfg)
\begin{DoxyCompactList}\small\item\em Allocate a soft-\/\+UART instance. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+free} (struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$suart)
\begin{DoxyCompactList}\small\item\em Release memory taken by the given soft-\/\+UART. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+configure} (struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$suart, const struct \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg} $\ast$cfg)
\begin{DoxyCompactList}\small\item\em Change soft-\/\+UART configuration to the user-\/provided config. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+get\+\_\+name} (const struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$suart)
\begin{DoxyCompactList}\small\item\em Get a name for the given soft-\/\+UART instance. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+set\+\_\+name} (struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$suart, const char $\ast$\textbf{ name})
\begin{DoxyCompactList}\small\item\em Set a new name for the given soft-\/\+UART instance. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+set\+\_\+rx} (struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$suart, bool enable)
\begin{DoxyCompactList}\small\item\em Enable/disable receiver of the given soft-\/\+UART. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+set\+\_\+tx} (struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$suart, bool enable)
\begin{DoxyCompactList}\small\item\em Enable/disable transmitter of the given soft-\/\+UART. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+rx\+\_\+ubits} (struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$suart, const \textbf{ ubit\+\_\+t} $\ast$ubits, size\+\_\+t n\+\_\+ubits)
\begin{DoxyCompactList}\small\item\em Feed a number of unpacked bits into the soft-\/\+UART receiver. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+tx\+\_\+ubits} (struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$suart, \textbf{ ubit\+\_\+t} $\ast$ubits, size\+\_\+t n\+\_\+ubits)
\begin{DoxyCompactList}\small\item\em Pull a number of unpacked bits out of the soft-\/\+UART transmitter. \end{DoxyCompactList}\item 
unsigned int \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+get\+\_\+status} (const struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$suart)
\begin{DoxyCompactList}\small\item\em Get the modem status bitmask of the given soft-\/\+UART. \end{DoxyCompactList}\item 
int \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+set\+\_\+status} (struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$suart, unsigned int status)
\begin{DoxyCompactList}\small\item\em Set the modem status bitmask of the given soft-\/\+UART. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+set\+\_\+status\+\_\+line} (struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$suart, enum \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+status} line, bool active)
\begin{DoxyCompactList}\small\item\em Activate/deactivate a modem status line of the given soft-\/\+UART. \end{DoxyCompactList}\item 
void \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+flush\+\_\+rx} (struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$suart)
\begin{DoxyCompactList}\small\item\em Flush the receive buffer, passing ownership of the msgb to the .rx\+\_\+cb(). \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsection*{Variables}
\begin{DoxyCompactItemize}
\item 
const struct \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg} \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+default\+\_\+cfg}
\begin{DoxyCompactList}\small\item\em Default soft-\/\+UART configuration (8-\/N-\/1) \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Software UART implementation. 



\doxysubsection{Enumeration Type Documentation}
\mbox{\label{soft__uart_8h_ad108b55bb45ac4c9b7c7dada9e8f3ca0}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_flags@{osmo\_soft\_uart\_flags}}
\index{osmo\_soft\_uart\_flags@{osmo\_soft\_uart\_flags}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_flags}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+flags}}



Flags passed to the application. 

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_F\_FRAMING\_ERROR@{OSMO\_SUART\_F\_FRAMING\_ERROR}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_F\_FRAMING\_ERROR@{OSMO\_SUART\_F\_FRAMING\_ERROR}}}\mbox{\label{soft__uart_8h_ad108b55bb45ac4c9b7c7dada9e8f3ca0a9df6e60e183d3875329831e2e094c716}} 
OSMO\+\_\+\+SUART\+\_\+\+F\+\_\+\+FRAMING\+\_\+\+ERROR&Framing error occurred. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_F\_PARITY\_ERROR@{OSMO\_SUART\_F\_PARITY\_ERROR}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_F\_PARITY\_ERROR@{OSMO\_SUART\_F\_PARITY\_ERROR}}}\mbox{\label{soft__uart_8h_ad108b55bb45ac4c9b7c7dada9e8f3ca0a549351d161822142a41406933a39a9b2}} 
OSMO\+\_\+\+SUART\+\_\+\+F\+\_\+\+PARITY\+\_\+\+ERROR&Parity error occurred. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_F\_BREAK@{OSMO\_SUART\_F\_BREAK}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_F\_BREAK@{OSMO\_SUART\_F\_BREAK}}}\mbox{\label{soft__uart_8h_ad108b55bb45ac4c9b7c7dada9e8f3ca0a18b99360094ca8d8ff81bcc1913224f7}} 
OSMO\+\_\+\+SUART\+\_\+\+F\+\_\+\+BREAK&Break condition (not implemented) \\
\hline

\end{DoxyEnumFields}
\mbox{\label{soft__uart_8h_a807a5c545de0cc1adfbb3352add2f575}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_flow\_ctrl\_mode@{osmo\_soft\_uart\_flow\_ctrl\_mode}}
\index{osmo\_soft\_uart\_flow\_ctrl\_mode@{osmo\_soft\_uart\_flow\_ctrl\_mode}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_flow\_ctrl\_mode}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+flow\+\_\+ctrl\+\_\+mode}}



Flow control mode. 

{\texttt{ https\+://en.\+wikipedia.\+org/wiki/\+Flow\+\_\+control\+\_\+(data)\#\+Hardware\+\_\+flow\+\_\+control}} \begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_FLOW\_CTRL\_NONE@{OSMO\_SUART\_FLOW\_CTRL\_NONE}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_FLOW\_CTRL\_NONE@{OSMO\_SUART\_FLOW\_CTRL\_NONE}}}\mbox{\label{soft__uart_8h_a807a5c545de0cc1adfbb3352add2f575a5fbe4ef7f614c66a473929c91b29b5e8}} 
OSMO\+\_\+\+SUART\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+\+NONE&No flow control. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_FLOW\_CTRL\_DTR\_DSR@{OSMO\_SUART\_FLOW\_CTRL\_DTR\_DSR}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_FLOW\_CTRL\_DTR\_DSR@{OSMO\_SUART\_FLOW\_CTRL\_DTR\_DSR}}}\mbox{\label{soft__uart_8h_a807a5c545de0cc1adfbb3352add2f575adb63ba291b48eae809080a3a021de2cd}} 
OSMO\+\_\+\+SUART\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+\+DTR\+\_\+\+DSR&DTR/\+DSR flow control\+: Tx if DSR is active and drop DTR if cannot Rx anymore. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_FLOW\_CTRL\_RTS\_CTS@{OSMO\_SUART\_FLOW\_CTRL\_RTS\_CTS}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_FLOW\_CTRL\_RTS\_CTS@{OSMO\_SUART\_FLOW\_CTRL\_RTS\_CTS}}}\mbox{\label{soft__uart_8h_a807a5c545de0cc1adfbb3352add2f575a01ac9bbbf1532f747cc54a05169d59ce}} 
OSMO\+\_\+\+SUART\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+\+RTS\+\_\+\+CTS&RTS/\+CTS flow control\+: Tx if CTS is active and drop RTS if cannot Rx anymore. The technically correct name would be RTR/\+CTS, because the RTS signal actually indicates readiness to {\itshape receive} data (Ready To Receive), and not really used to request a transmission (Request To Send) nowadays. Alternatively, the RTS signal can be interpreted as \char`\"{}\+Request To Send to me\char`\"{}. \\
\hline

\end{DoxyEnumFields}
\mbox{\label{soft__uart_8h_aa43dd37ffde2fd00defd123aae6c1732}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_parity\_mode@{osmo\_soft\_uart\_parity\_mode}}
\index{osmo\_soft\_uart\_parity\_mode@{osmo\_soft\_uart\_parity\_mode}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_parity\_mode}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+parity\+\_\+mode}}



Parity mode. 

{\texttt{ https\+://en.\+wikipedia.\+org/wiki/\+Parity\+\_\+bit}} \begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_PARITY\_NONE@{OSMO\_SUART\_PARITY\_NONE}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_PARITY\_NONE@{OSMO\_SUART\_PARITY\_NONE}}}\mbox{\label{soft__uart_8h_aa43dd37ffde2fd00defd123aae6c1732accec1ddaf3b0540d78334e5daadff639}} 
OSMO\+\_\+\+SUART\+\_\+\+PARITY\+\_\+\+NONE&No parity bit. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_PARITY\_EVEN@{OSMO\_SUART\_PARITY\_EVEN}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_PARITY\_EVEN@{OSMO\_SUART\_PARITY\_EVEN}}}\mbox{\label{soft__uart_8h_aa43dd37ffde2fd00defd123aae6c1732a924cf56dbbb5c6afb2b3a09d1292e8c9}} 
OSMO\+\_\+\+SUART\+\_\+\+PARITY\+\_\+\+EVEN&Even parity. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_PARITY\_ODD@{OSMO\_SUART\_PARITY\_ODD}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_PARITY\_ODD@{OSMO\_SUART\_PARITY\_ODD}}}\mbox{\label{soft__uart_8h_aa43dd37ffde2fd00defd123aae6c1732aabc51b510f55c2eb3504f61dd71ee08d}} 
OSMO\+\_\+\+SUART\+\_\+\+PARITY\+\_\+\+ODD&Odd parity. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_PARITY\_MARK@{OSMO\_SUART\_PARITY\_MARK}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_PARITY\_MARK@{OSMO\_SUART\_PARITY\_MARK}}}\mbox{\label{soft__uart_8h_aa43dd37ffde2fd00defd123aae6c1732ab02592499a92b6c5eeb51257193f4d66}} 
OSMO\+\_\+\+SUART\+\_\+\+PARITY\+\_\+\+MARK&Always 1. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_PARITY\_SPACE@{OSMO\_SUART\_PARITY\_SPACE}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_PARITY\_SPACE@{OSMO\_SUART\_PARITY\_SPACE}}}\mbox{\label{soft__uart_8h_aa43dd37ffde2fd00defd123aae6c1732a576da0ada6ef85efebe7224bfe3fc32e}} 
OSMO\+\_\+\+SUART\+\_\+\+PARITY\+\_\+\+SPACE&Always 0. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{\_OSMO\_SUART\_PARITY\_NUM@{\_OSMO\_SUART\_PARITY\_NUM}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!\_OSMO\_SUART\_PARITY\_NUM@{\_OSMO\_SUART\_PARITY\_NUM}}}\mbox{\label{soft__uart_8h_aa43dd37ffde2fd00defd123aae6c1732a0dbafc8f716fd9e51a56a3756b0817d7}} 
\+\_\+\+OSMO\+\_\+\+SUART\+\_\+\+PARITY\+\_\+\+NUM&\\
\hline

\end{DoxyEnumFields}
\mbox{\label{soft__uart_8h_a50cde2815fad2bac3015a6e6055fb19a}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_status@{osmo\_soft\_uart\_status}}
\index{osmo\_soft\_uart\_status@{osmo\_soft\_uart\_status}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_status}
{\footnotesize\ttfamily enum \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+status}}



Modem status \char`\"{}line\char`\"{} flags. 

{\texttt{ https\+://en.\+wikipedia.\+org/wiki/\+RS-\/232\#\+Data\+\_\+and\+\_\+control\+\_\+signals}} \begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_STATUS\_F\_DTR@{OSMO\_SUART\_STATUS\_F\_DTR}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_STATUS\_F\_DTR@{OSMO\_SUART\_STATUS\_F\_DTR}}}\mbox{\label{soft__uart_8h_a50cde2815fad2bac3015a6e6055fb19aa3938bac5142e9b6a043e8c739c5dc02c}} 
OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+\+DTR&Data Terminal Ready. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_STATUS\_F\_DCD@{OSMO\_SUART\_STATUS\_F\_DCD}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_STATUS\_F\_DCD@{OSMO\_SUART\_STATUS\_F\_DCD}}}\mbox{\label{soft__uart_8h_a50cde2815fad2bac3015a6e6055fb19aa325882ae703412c99b185f1e0749476f}} 
OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+\+DCD&Data Carrier Detect. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_STATUS\_F\_DSR@{OSMO\_SUART\_STATUS\_F\_DSR}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_STATUS\_F\_DSR@{OSMO\_SUART\_STATUS\_F\_DSR}}}\mbox{\label{soft__uart_8h_a50cde2815fad2bac3015a6e6055fb19aae99abac90f35e880992475d9a5dfd9ae}} 
OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+\+DSR&Data Set Ready. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_STATUS\_F\_RI@{OSMO\_SUART\_STATUS\_F\_RI}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_STATUS\_F\_RI@{OSMO\_SUART\_STATUS\_F\_RI}}}\mbox{\label{soft__uart_8h_a50cde2815fad2bac3015a6e6055fb19aaec43e7db9acce866ebcde1c5ac9dc9f2}} 
OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+\+RI&Ring Indicator. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_STATUS\_F\_RTS\_RTR@{OSMO\_SUART\_STATUS\_F\_RTS\_RTR}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_STATUS\_F\_RTS\_RTR@{OSMO\_SUART\_STATUS\_F\_RTS\_RTR}}}\mbox{\label{soft__uart_8h_a50cde2815fad2bac3015a6e6055fb19aa58064551f601c3183fb59ae32961f7d8}} 
OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+\+RTS\+\_\+\+RTR&Request To Send or Ready To Receive. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{OSMO\_SUART\_STATUS\_F\_CTS@{OSMO\_SUART\_STATUS\_F\_CTS}!soft\_uart.h@{soft\_uart.h}}\index{soft\_uart.h@{soft\_uart.h}!OSMO\_SUART\_STATUS\_F\_CTS@{OSMO\_SUART\_STATUS\_F\_CTS}}}\mbox{\label{soft__uart_8h_a50cde2815fad2bac3015a6e6055fb19aaf7df326433c7daee2a91b41340316726}} 
OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+\+CTS&Clear To Send. \\
\hline

\end{DoxyEnumFields}


\doxysubsection{Function Documentation}
\mbox{\label{soft__uart_8h_a063d09085ca7ea01ee93e08d6199c751}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_alloc@{osmo\_soft\_uart\_alloc}}
\index{osmo\_soft\_uart\_alloc@{osmo\_soft\_uart\_alloc}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_alloc()}
{\footnotesize\ttfamily struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$ osmo\+\_\+soft\+\_\+uart\+\_\+alloc (\begin{DoxyParamCaption}\item[{void $\ast$}]{ctx,  }\item[{const char $\ast$}]{name,  }\item[{const struct \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg} $\ast$}]{cfg }\end{DoxyParamCaption})}



Allocate a soft-\/\+UART instance. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em ctx} & parent talloc context. \\
\hline
\mbox{\texttt{ in}}  & {\em name} & name of the soft-\/\+UART instance. \\
\hline
\mbox{\texttt{ in}}  & {\em cfg} & initial configuration of the soft-\/\+UART instance. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
pointer to allocated soft-\/\+UART instance; NULL on error. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+soft\+\_\+uart\+::cfg}, \textbf{ name}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::name}, and \textbf{ OSMO\+\_\+\+ASSERT}.

\mbox{\label{soft__uart_8h_afc55d9d32b42aa1e3ad0e450d91d875a}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_configure@{osmo\_soft\_uart\_configure}}
\index{osmo\_soft\_uart\_configure@{osmo\_soft\_uart\_configure}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_configure()}
{\footnotesize\ttfamily int osmo\+\_\+soft\+\_\+uart\+\_\+configure (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$}]{suart,  }\item[{const struct \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg} $\ast$}]{cfg }\end{DoxyParamCaption})}



Change soft-\/\+UART configuration to the user-\/provided config. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em suart} & soft-\/\+UART instance to be re-\/configured. \\
\hline
\mbox{\texttt{ in}}  & {\em cfg} & the user-\/provided config to be applied. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error. 
\end{DoxyReturn}


References \textbf{ \+\_\+\+OSMO\+\_\+\+SUART\+\_\+\+PARITY\+\_\+\+NUM}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::cfg}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::num\+\_\+data\+\_\+bits}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::num\+\_\+stop\+\_\+bits}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+flush\+\_\+rx()}, \textbf{ osmo\+\_\+timer\+\_\+setup()}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::parity\+\_\+mode}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::rx}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::rx\+\_\+buf\+\_\+size}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::rx\+\_\+timeout\+\_\+ms}, \textbf{ suart\+\_\+rx\+\_\+timer\+\_\+cb()}, and \textbf{ osmo\+\_\+soft\+\_\+uart\+::timer}.

\mbox{\label{soft__uart_8h_a39fc01350377643743e89b630fa3ce1a}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_flush\_rx@{osmo\_soft\_uart\_flush\_rx}}
\index{osmo\_soft\_uart\_flush\_rx@{osmo\_soft\_uart\_flush\_rx}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_flush\_rx()}
{\footnotesize\ttfamily void osmo\+\_\+soft\+\_\+uart\+\_\+flush\+\_\+rx (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$}]{suart }\end{DoxyParamCaption})}



Flush the receive buffer, passing ownership of the msgb to the .rx\+\_\+cb(). 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em suart} & soft-\/\+UART instance holding the receive buffer. \\
\hline
\end{DoxyParams}


References \textbf{ osmo\+\_\+soft\+\_\+uart\+::cfg}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::flags}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::msg}, \textbf{ msgb\+\_\+alloc\+\_\+c()}, \textbf{ msgb\+\_\+length()}, \textbf{ msgb\+\_\+reset()}, \textbf{ osmo\+\_\+timer\+\_\+del()}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::priv}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::rx}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::rx\+\_\+buf\+\_\+size}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::rx\+\_\+cb}, and \textbf{ osmo\+\_\+soft\+\_\+uart\+::timer}.



Referenced by \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+configure()}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+set\+\_\+rx()}, \textbf{ suart\+\_\+rx\+\_\+ch()}, and \textbf{ suart\+\_\+rx\+\_\+timer\+\_\+cb()}.

\mbox{\label{soft__uart_8h_a43a70e38b6059372f81ab8f8f7f14e9d}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_free@{osmo\_soft\_uart\_free}}
\index{osmo\_soft\_uart\_free@{osmo\_soft\_uart\_free}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_free()}
{\footnotesize\ttfamily void osmo\+\_\+soft\+\_\+uart\+\_\+free (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$}]{suart }\end{DoxyParamCaption})}



Release memory taken by the given soft-\/\+UART. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em suart} & soft-\/\+UART instance to be free()d. \\
\hline
\end{DoxyParams}


References \textbf{ osmo\+\_\+soft\+\_\+uart\+::msg}, \textbf{ msgb\+\_\+free()}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::name}, \textbf{ osmo\+\_\+timer\+\_\+del()}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::rx}, and \textbf{ osmo\+\_\+soft\+\_\+uart\+::timer}.

\mbox{\label{soft__uart_8h_a35b6e0b25f80ed22fab1758536edc4cc}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_get\_name@{osmo\_soft\_uart\_get\_name}}
\index{osmo\_soft\_uart\_get\_name@{osmo\_soft\_uart\_get\_name}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_get\_name()}
{\footnotesize\ttfamily const char $\ast$ osmo\+\_\+soft\+\_\+uart\+\_\+get\+\_\+name (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$}]{suart }\end{DoxyParamCaption})}



Get a name for the given soft-\/\+UART instance. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em suart} & soft-\/\+UART instance to get the name from. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
name of the given soft-\/\+UART instance. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+soft\+\_\+uart\+::name}.

\mbox{\label{soft__uart_8h_a92c611f063e605c836017d77b6a64789}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_get\_status@{osmo\_soft\_uart\_get\_status}}
\index{osmo\_soft\_uart\_get\_status@{osmo\_soft\_uart\_get\_status}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_get\_status()}
{\footnotesize\ttfamily unsigned int osmo\+\_\+soft\+\_\+uart\+\_\+get\+\_\+status (\begin{DoxyParamCaption}\item[{const struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$}]{suart }\end{DoxyParamCaption})}



Get the modem status bitmask of the given soft-\/\+UART. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em suart} & soft-\/\+UART instance to get the modem status. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
bitmask of OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+$\ast$. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+soft\+\_\+uart\+::status}.

\mbox{\label{soft__uart_8h_ad870a6210297fcf8a5a5b528d3b6269e}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_rx\_ubits@{osmo\_soft\_uart\_rx\_ubits}}
\index{osmo\_soft\_uart\_rx\_ubits@{osmo\_soft\_uart\_rx\_ubits}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_rx\_ubits()}
{\footnotesize\ttfamily int osmo\+\_\+soft\+\_\+uart\+\_\+rx\+\_\+ubits (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$}]{suart,  }\item[{const \textbf{ ubit\+\_\+t} $\ast$}]{ubits,  }\item[{size\+\_\+t}]{n\+\_\+ubits }\end{DoxyParamCaption})}



Feed a number of unpacked bits into the soft-\/\+UART receiver. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em suart} & soft-\/\+UART instance to feed bits into. \\
\hline
\mbox{\texttt{ in}}  & {\em ubits} & pointer to the unpacked bits. \\
\hline
\mbox{\texttt{ in}}  & {\em n\+\_\+ubits} & number of unpacked bits to be fed. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error. -\/EAGAIN indicates that the receiver is disabled. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+soft\+\_\+uart\+::running}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::rx}, and \textbf{ suart\+\_\+rx\+\_\+bit()}.

\mbox{\label{soft__uart_8h_a3351d78d1f56c05dd919c2c3a748130a}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_set\_name@{osmo\_soft\_uart\_set\_name}}
\index{osmo\_soft\_uart\_set\_name@{osmo\_soft\_uart\_set\_name}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_set\_name()}
{\footnotesize\ttfamily void osmo\+\_\+soft\+\_\+uart\+\_\+set\+\_\+name (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$}]{suart,  }\item[{const char $\ast$}]{name }\end{DoxyParamCaption})}



Set a new name for the given soft-\/\+UART instance. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em suart} & soft-\/\+UART instance to set the name for. \\
\hline
\mbox{\texttt{ in}}  & {\em name} & the new name. \\
\hline
\end{DoxyParams}


References \textbf{ name}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::name}, and \textbf{ osmo\+\_\+talloc\+\_\+replace\+\_\+string()}.

\mbox{\label{soft__uart_8h_a390451aed05c1adc0450fe091377f651}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_set\_rx@{osmo\_soft\_uart\_set\_rx}}
\index{osmo\_soft\_uart\_set\_rx@{osmo\_soft\_uart\_set\_rx}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_set\_rx()}
{\footnotesize\ttfamily int osmo\+\_\+soft\+\_\+uart\+\_\+set\+\_\+rx (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$}]{suart,  }\item[{bool}]{enable }\end{DoxyParamCaption})}



Enable/disable receiver of the given soft-\/\+UART. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em suart} & soft-\/\+UART instance to be re-\/configured. \\
\hline
\mbox{\texttt{ in}}  & {\em enable} & enable/disable state of the receiver. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+soft\+\_\+uart\+::cfg}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::flow\+\_\+state}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::msg}, \textbf{ msgb\+\_\+alloc\+\_\+c()}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+flush\+\_\+rx()}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::running}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::rx}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::rx\+\_\+buf\+\_\+size}, and \textbf{ SUART\+\_\+\+FLOW\+\_\+\+ST\+\_\+\+IDLE}.

\mbox{\label{soft__uart_8h_ae5c16cdf602285cc395008816ecf6666}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_set\_status@{osmo\_soft\_uart\_set\_status}}
\index{osmo\_soft\_uart\_set\_status@{osmo\_soft\_uart\_set\_status}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_set\_status()}
{\footnotesize\ttfamily int osmo\+\_\+soft\+\_\+uart\+\_\+set\+\_\+status (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$}]{suart,  }\item[{unsigned int}]{status }\end{DoxyParamCaption})}



Set the modem status bitmask of the given soft-\/\+UART. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em suart} & soft-\/\+UART instance to set the modem status. \\
\hline
\mbox{\texttt{ in}}  & {\em status} & bitmask of OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+$\ast$. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+soft\+\_\+uart\+::cfg}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::priv}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::status}, and \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::status\+\_\+change\+\_\+cb}.



Referenced by \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+set\+\_\+status\+\_\+line()}.

\mbox{\label{soft__uart_8h_a2dbac5fede9255613820199209c7b580}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_set\_status\_line@{osmo\_soft\_uart\_set\_status\_line}}
\index{osmo\_soft\_uart\_set\_status\_line@{osmo\_soft\_uart\_set\_status\_line}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_set\_status\_line()}
{\footnotesize\ttfamily void osmo\+\_\+soft\+\_\+uart\+\_\+set\+\_\+status\+\_\+line (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$}]{suart,  }\item[{enum \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+status}}]{line,  }\item[{bool}]{active }\end{DoxyParamCaption})}



Activate/deactivate a modem status line of the given soft-\/\+UART. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em suart} & soft-\/\+UART instance to update the modem status. \\
\hline
\mbox{\texttt{ in}}  & {\em line} & a modem status line, one of OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+$\ast$. \\
\hline
\mbox{\texttt{ in}}  & {\em active} & activate (true) or deactivate (false) the line. \\
\hline
\end{DoxyParams}


References \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+set\+\_\+status()}, and \textbf{ osmo\+\_\+soft\+\_\+uart\+::status}.

\mbox{\label{soft__uart_8h_a21fbc23b6423f407db7b710a18f08caf}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_set\_tx@{osmo\_soft\_uart\_set\_tx}}
\index{osmo\_soft\_uart\_set\_tx@{osmo\_soft\_uart\_set\_tx}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_set\_tx()}
{\footnotesize\ttfamily int osmo\+\_\+soft\+\_\+uart\+\_\+set\+\_\+tx (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$}]{suart,  }\item[{bool}]{enable }\end{DoxyParamCaption})}



Enable/disable transmitter of the given soft-\/\+UART. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em suart} & soft-\/\+UART instance to be re-\/configured. \\
\hline
\mbox{\texttt{ in}}  & {\em enable} & enable/disable state of the transmitter. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 on success; negative on error. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+soft\+\_\+uart\+::flow\+\_\+state}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::running}, \textbf{ SUART\+\_\+\+FLOW\+\_\+\+ST\+\_\+\+IDLE}, and \textbf{ osmo\+\_\+soft\+\_\+uart\+::tx}.

\mbox{\label{soft__uart_8h_a4c1a3c81790eec8747c4d33e091fb1b3}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_tx\_ubits@{osmo\_soft\_uart\_tx\_ubits}}
\index{osmo\_soft\_uart\_tx\_ubits@{osmo\_soft\_uart\_tx\_ubits}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_tx\_ubits()}
{\footnotesize\ttfamily int osmo\+\_\+soft\+\_\+uart\+\_\+tx\+\_\+ubits (\begin{DoxyParamCaption}\item[{struct \textbf{ osmo\+\_\+soft\+\_\+uart} $\ast$}]{suart,  }\item[{\textbf{ ubit\+\_\+t} $\ast$}]{ubits,  }\item[{size\+\_\+t}]{n\+\_\+ubits }\end{DoxyParamCaption})}



Pull a number of unpacked bits out of the soft-\/\+UART transmitter. 


\begin{DoxyParams}[1]{Parameters}
\mbox{\texttt{ in}}  & {\em suart} & soft-\/\+UART instance to pull the bits from. \\
\hline
\mbox{\texttt{ out}}  & {\em ubits} & pointer to a buffer where to store pulled bits. \\
\hline
\mbox{\texttt{ in}}  & {\em n\+\_\+ubits} & number of unpacked bits to be pulled. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of bits pulled (may be less than n\+\_\+ubits); negative on error. -\/EAGAIN indicates that the transmitter is disabled. 
\end{DoxyReturn}


References \textbf{ osmo\+\_\+soft\+\_\+uart\+::cfg}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::flow\+\_\+ctrl\+\_\+mode}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::flow\+\_\+state}, \textbf{ msg}, \textbf{ msgb\+\_\+alloc\+\_\+c()}, \textbf{ msgb\+\_\+free()}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::num\+\_\+data\+\_\+bits}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::num\+\_\+stop\+\_\+bits}, \textbf{ OSMO\+\_\+\+ASSERT}, \textbf{ OSMO\+\_\+\+SUART\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+\+DTR\+\_\+\+DSR}, \textbf{ OSMO\+\_\+\+SUART\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+\+NONE}, \textbf{ OSMO\+\_\+\+SUART\+\_\+\+FLOW\+\_\+\+CTRL\+\_\+\+RTS\+\_\+\+CTS}, \textbf{ OSMO\+\_\+\+SUART\+\_\+\+PARITY\+\_\+\+NONE}, \textbf{ OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+\+CTS}, \textbf{ OSMO\+\_\+\+SUART\+\_\+\+STATUS\+\_\+\+F\+\_\+\+DSR}, \textbf{ OSMO\+\_\+\+UNLIKELY}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::parity\+\_\+mode}, \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::priv}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::running}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::status}, \textbf{ SUART\+\_\+\+FLOW\+\_\+\+ST\+\_\+\+IDLE}, \textbf{ suart\+\_\+tx\+\_\+bit()}, \textbf{ suart\+\_\+tx\+\_\+pending()}, \textbf{ osmo\+\_\+soft\+\_\+uart\+::tx}, and \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg\+::tx\+\_\+cb}.



\doxysubsection{Variable Documentation}
\mbox{\label{soft__uart_8h_a4f0f43abec08e6901270f24fb213c024}} 
\index{soft\_uart.h@{soft\_uart.h}!osmo\_soft\_uart\_default\_cfg@{osmo\_soft\_uart\_default\_cfg}}
\index{osmo\_soft\_uart\_default\_cfg@{osmo\_soft\_uart\_default\_cfg}!soft\_uart.h@{soft\_uart.h}}
\doxysubsubsection{osmo\_soft\_uart\_default\_cfg}
{\footnotesize\ttfamily const struct \textbf{ osmo\+\_\+soft\+\_\+uart\+\_\+cfg} osmo\+\_\+soft\+\_\+uart\+\_\+default\+\_\+cfg\hspace{0.3cm}{\ttfamily [extern]}}



Default soft-\/\+UART configuration (8-\/N-\/1) 

