\hypertarget{BFP_8h}{
\section{BFP.h File Reference}
\label{BFP_8h}\index{BFP.h@{BFP.h}}
}
Bit Field Pack Routines. 



This graph shows which files directly or indirectly include this file:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=110pt]{BFP_8h__dep__incl}
\end{center}
\end{figure}
\subsection*{Functions}
\begin{CompactItemize}
\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_a0}{BFP\_\-word\-L} (unsigned int $\ast$w, unsigned int position, unsigned int field, unsigned int width)
\begin{CompactList}\small\item\em Packs a left justified bit field into the current position. The width of the bit field must be less than 32 bits. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_a1}{BFP\_\-word\-B} (unsigned int $\ast$w, unsigned int position, unsigned int bit)
\begin{CompactList}\small\item\em Packs the value of the bit into the current bit position. The value of the bit is either 0 or 1, or said in a negative fashion, it is not the left justified version, {\em i.e\/}. 0x80000000 or 0. \item\end{CompactList}\item 
static \_\-\_\-inline unsigned int \hyperlink{BFP_8h_a2}{BFP\_\-word\-R} (unsigned int $\ast$w, unsigned int position, unsigned int field, unsigned int width)
\begin{CompactList}\small\item\em Packs a right justified bit field into the current position. The width of the bit field must be less than 32 bits. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Bit Field Pack Routines. 

\begin{Desc}
\item[Author:]JJRussell - \href{mailto:russell@slac.stanford.edu}{\tt russell@slac.stanford.edu}\end{Desc}
Inline functions to (left justified) pack bit fields into a 32-bit output vector. These routines assume that any bits ahead of the current bit position index can be overwritten. In this sense these routines are not equivalent to a bit field insert routine which only write the bits in the designated bit field.

\subsection{Function Documentation}
\hypertarget{BFP_8h_a1}{
\index{BFP.h@{BFP.h}!BFP_wordB@{BFP\_\-wordB}}
\index{BFP_wordB@{BFP\_\-wordB}!BFP.h@{BFP.h}}
\subsubsection[BFP\_\-wordB]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-word\-B (unsigned int $\ast$ {\em w}, unsigned int {\em position}, unsigned int {\em bit})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_a1}


Packs the value of the bit into the current bit position. The value of the bit is either 0 or 1, or said in a negative fashion, it is not the left justified version, {\em i.e\/}. 0x80000000 or 0. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word \item[{\em position}]The current bit position \item[{\em bit}]The value of the bit to insert (0 or 1) \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The updated bit position\end{Desc}
\hypertarget{BFP_8h_a0}{
\index{BFP.h@{BFP.h}!BFP_wordL@{BFP\_\-wordL}}
\index{BFP_wordL@{BFP\_\-wordL}!BFP.h@{BFP.h}}
\subsubsection[BFP\_\-wordL]{\setlength{\rightskip}{0pt plus 5cm}static \_\-\_\-inline unsigned int BFP\_\-word\-L (unsigned int $\ast$ {\em w}, unsigned int {\em position}, unsigned int {\em field}, unsigned int {\em width})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_a0}


Packs a left justified bit field into the current position. The width of the bit field must be less than 32 bits. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word array to insert the bit field into \item[{\em position}]The current bit position in the output bit field \item[{\em field}]The left justified field to insert \item[{\em width}]The width of the field to insert \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The new bit position (essentially position + width).\end{Desc}
\hypertarget{BFP_8h_a2}{
\index{BFP.h@{BFP.h}!BFP_wordR@{BFP\_\-wordR}}
\index{BFP_wordR@{BFP\_\-wordR}!BFP.h@{BFP.h}}
\subsubsection[BFP\_\-wordR]{\setlength{\rightskip}{0pt plus 5cm}static unsigned int BFP\_\-word\-R (unsigned int $\ast$ {\em w}, unsigned int {\em position}, unsigned int {\em field}, unsigned int {\em width})\hspace{0.3cm}{\tt  \mbox{[}static\mbox{]}}}}
\label{BFP_8h_a2}


Packs a right justified bit field into the current position. The width of the bit field must be less than 32 bits. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em w}]The output word array to insert the bit field into \item[{\em position}]The current bit position in the output bit field \item[{\em field}]The left justified field to insert \item[{\em width}]The width of the field to insert \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The new bit position (essentially position + width).\end{Desc}
