\section{util/firmdl/srec.h File Reference}
\label{firmdl_2srec_8h}\index{util/firmdl/srec.h@{util/firmdl/srec.h}}
\subsection*{Data Structures}
\begin{CompactItemize}
\item 
struct {\bf srec\_\-t}
\end{CompactItemize}
\subsection*{Defines}
\begin{CompactItemize}
\item 
\#define {\bf SREC\_\-DATA\_\-SIZE}\ 256
\item 
\#define {\bf SREC\_\-OK}\ 0
\item 
\#define {\bf SREC\_\-NULL}\ -1
\item 
\#define {\bf SREC\_\-INVALID\_\-HDR}\ -2
\item 
\#define {\bf SREC\_\-INVALID\_\-CHAR}\ -3
\item 
\#define {\bf SREC\_\-INVALID\_\-TYPE}\ -4
\item 
\#define {\bf SREC\_\-TOO\_\-SHORT}\ -5
\item 
\#define {\bf SREC\_\-TOO\_\-LONG}\ -6
\item 
\#define {\bf SREC\_\-INVALID\_\-LEN}\ -7
\item 
\#define {\bf SREC\_\-INVALID\_\-CKSUM}\ -8
\end{CompactItemize}
\subsection*{Functions}
\begin{CompactItemize}
\item 
int {\bf srec\_\-decode} ({\bf srec\_\-t} $\ast$srec, char $\ast$line)
\item 
int {\bf srec\_\-encode} ({\bf srec\_\-t} $\ast$srec, char $\ast$line)
\item 
char $\ast$ {\bf srec\_\-strerror} (int errno)
\end{CompactItemize}


\subsection{Define Documentation}
\index{firmdl/srec.h@{firmdl/srec.h}!SREC_DATA_SIZE@{SREC\_\-DATA\_\-SIZE}}
\index{SREC_DATA_SIZE@{SREC\_\-DATA\_\-SIZE}!firmdl/srec.h@{firmdl/srec.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SREC\_\-DATA\_\-SIZE\ 256}\label{firmdl_2srec_8h_a0}




Definition at line 31 of file srec.h.

Referenced by srec\_\-decode().\index{firmdl/srec.h@{firmdl/srec.h}!SREC_INVALID_CHAR@{SREC\_\-INVALID\_\-CHAR}}
\index{SREC_INVALID_CHAR@{SREC\_\-INVALID\_\-CHAR}!firmdl/srec.h@{firmdl/srec.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SREC\_\-INVALID\_\-CHAR\ -3}\label{firmdl_2srec_8h_a4}




Definition at line 51 of file srec.h.

Referenced by srec\_\-strerror().\index{firmdl/srec.h@{firmdl/srec.h}!SREC_INVALID_CKSUM@{SREC\_\-INVALID\_\-CKSUM}}
\index{SREC_INVALID_CKSUM@{SREC\_\-INVALID\_\-CKSUM}!firmdl/srec.h@{firmdl/srec.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SREC\_\-INVALID\_\-CKSUM\ -8}\label{firmdl_2srec_8h_a9}




Definition at line 56 of file srec.h.

Referenced by srec\_\-strerror().\index{firmdl/srec.h@{firmdl/srec.h}!SREC_INVALID_HDR@{SREC\_\-INVALID\_\-HDR}}
\index{SREC_INVALID_HDR@{SREC\_\-INVALID\_\-HDR}!firmdl/srec.h@{firmdl/srec.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SREC\_\-INVALID\_\-HDR\ -2}\label{firmdl_2srec_8h_a3}




Definition at line 50 of file srec.h.

Referenced by srec\_\-strerror().\index{firmdl/srec.h@{firmdl/srec.h}!SREC_INVALID_LEN@{SREC\_\-INVALID\_\-LEN}}
\index{SREC_INVALID_LEN@{SREC\_\-INVALID\_\-LEN}!firmdl/srec.h@{firmdl/srec.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SREC\_\-INVALID\_\-LEN\ -7}\label{firmdl_2srec_8h_a8}




Definition at line 55 of file srec.h.

Referenced by srec\_\-strerror().\index{firmdl/srec.h@{firmdl/srec.h}!SREC_INVALID_TYPE@{SREC\_\-INVALID\_\-TYPE}}
\index{SREC_INVALID_TYPE@{SREC\_\-INVALID\_\-TYPE}!firmdl/srec.h@{firmdl/srec.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SREC\_\-INVALID\_\-TYPE\ -4}\label{firmdl_2srec_8h_a5}




Definition at line 52 of file srec.h.\index{firmdl/srec.h@{firmdl/srec.h}!SREC_NULL@{SREC\_\-NULL}}
\index{SREC_NULL@{SREC\_\-NULL}!firmdl/srec.h@{firmdl/srec.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SREC\_\-NULL\ -1}\label{firmdl_2srec_8h_a2}




Definition at line 49 of file srec.h.

Referenced by srec\_\-strerror().\index{firmdl/srec.h@{firmdl/srec.h}!SREC_OK@{SREC\_\-OK}}
\index{SREC_OK@{SREC\_\-OK}!firmdl/srec.h@{firmdl/srec.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SREC\_\-OK\ 0}\label{firmdl_2srec_8h_a1}




Definition at line 48 of file srec.h.

Referenced by srec\_\-strerror().\index{firmdl/srec.h@{firmdl/srec.h}!SREC_TOO_LONG@{SREC\_\-TOO\_\-LONG}}
\index{SREC_TOO_LONG@{SREC\_\-TOO\_\-LONG}!firmdl/srec.h@{firmdl/srec.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SREC\_\-TOO\_\-LONG\ -6}\label{firmdl_2srec_8h_a7}




Definition at line 54 of file srec.h.

Referenced by srec\_\-strerror().\index{firmdl/srec.h@{firmdl/srec.h}!SREC_TOO_SHORT@{SREC\_\-TOO\_\-SHORT}}
\index{SREC_TOO_SHORT@{SREC\_\-TOO\_\-SHORT}!firmdl/srec.h@{firmdl/srec.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}\#define SREC\_\-TOO\_\-SHORT\ -5}\label{firmdl_2srec_8h_a6}




Definition at line 53 of file srec.h.

Referenced by srec\_\-strerror().

\subsection{Function Documentation}
\index{firmdl/srec.h@{firmdl/srec.h}!srec_decode@{srec\_\-decode}}
\index{srec_decode@{srec\_\-decode}!firmdl/srec.h@{firmdl/srec.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int srec\_\-decode ({\bf srec\_\-t} $\ast$ {\em srec}, char $\ast$ {\em line})}\label{firmdl_2srec_8h_a10}




Definition at line 48 of file srec.c.

References srec\_\-t::addr, C1, C2, srec\_\-t::count, srec\_\-t::data, ltab, SREC\_\-DATA\_\-SIZE, and srec\_\-t::type.

Referenced by image\_\-load(), main(), and srec\_\-load().\index{firmdl/srec.h@{firmdl/srec.h}!srec_encode@{srec\_\-encode}}
\index{srec_encode@{srec\_\-encode}!firmdl/srec.h@{firmdl/srec.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int srec\_\-encode ({\bf srec\_\-t} $\ast$ {\em srec}, char $\ast$ {\em line})}\label{firmdl_2srec_8h_a11}




Definition at line 116 of file srec.c.

References srec\_\-t::addr, srec\_\-t::count, srec\_\-t::data, ltab, and srec\_\-t::type.\index{firmdl/srec.h@{firmdl/srec.h}!srec_strerror@{srec\_\-strerror}}
\index{srec_strerror@{srec\_\-strerror}!firmdl/srec.h@{firmdl/srec.h}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}char$\ast$ srec\_\-strerror (int {\em errno})}\label{firmdl_2srec_8h_a12}




Definition at line 168 of file srec.c.

References SREC\_\-INVALID\_\-CHAR, SREC\_\-INVALID\_\-CKSUM, SREC\_\-INVALID\_\-HDR, SREC\_\-INVALID\_\-LEN, SREC\_\-NULL, SREC\_\-OK, SREC\_\-TOO\_\-LONG, and SREC\_\-TOO\_\-SHORT.

Referenced by main(), and srec\_\-load().