\hypertarget{structdriver}{}\section{driver Struct Reference}
\label{structdriver}\index{driver@{driver}}


{\ttfamily \#include $<$driver.\+h$>$}

\subsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
const char $\ast$ \hyperlink{structdriver_aca3bbacc48c5f27dac5568bd658afec8}{device}
\item 
int \hyperlink{structdriver_a277e91c9ef0365654b5412cdcf8cac5f}{fd}
\item 
\+\_\+\+\_\+u32 \hyperlink{structdriver_acefa919d82609175b57967c5249020c0}{features}
\item 
\+\_\+\+\_\+u32 \hyperlink{structdriver_abad2a6f422a77f0b80848085b2512ca4}{send\+\_\+mode}
\item 
\+\_\+\+\_\+u32 \hyperlink{structdriver_ad5d91256e4b5eb5139a6a744cc8204f6}{rec\+\_\+mode}
\item 
const \+\_\+\+\_\+u32 \hyperlink{structdriver_a2ee468d3e45ec38ceb8a8122a721c2ae}{code\+\_\+length}
\item 
int($\ast$const \hyperlink{structdriver_aeea866dd70c1cb8296e99fbe706bacf5}{open\+\_\+func} )(const char $\ast$\hyperlink{structdriver_aca3bbacc48c5f27dac5568bd658afec8}{device})
\item 
int($\ast$const \hyperlink{structdriver_a8f50bcc4e1d143a05dd4eba66a4fa7bb}{init\+\_\+func} )(void)
\item 
int($\ast$const \hyperlink{structdriver_a87fb83240c2426874349f860fb8504dc}{deinit\+\_\+func} )(void)
\item 
int($\ast$const \hyperlink{structdriver_a90d38db70255ee7d38bcd81c9edd9412}{send\+\_\+func} )(struct \hyperlink{structir__remote}{ir\+\_\+remote} $\ast$remote, struct \hyperlink{structir__ncode}{ir\+\_\+ncode} $\ast$code)
\item 
char $\ast$($\ast$const \hyperlink{structdriver_a41e193204b057873b878b1979c309db8}{rec\+\_\+func} )(struct \hyperlink{structir__remote}{ir\+\_\+remote} $\ast$remotes)
\item 
int($\ast$const \hyperlink{structdriver_a4c8fb1671a48fb248bc8dafa90cded15}{decode\+\_\+func} )(struct \hyperlink{structir__remote}{ir\+\_\+remote} $\ast$remote, struct \hyperlink{structdecode__ctx__t}{decode\+\_\+ctx\+\_\+t} $\ast$ctx)
\item 
int($\ast$const \hyperlink{structdriver_ac5d035961037ecb0a74182dd456ced26}{drvctl\+\_\+func} )(unsigned int cmd, void $\ast$arg)
\item 
lirc\+\_\+t($\ast$const \hyperlink{structdriver_a6dc74317e7f5fff8153be89153766865}{readdata} )(lirc\+\_\+t timeout)
\item 
const char $\ast$ \hyperlink{structdriver_a2d4bc5861fb0d7bb1684e22a16b7d414}{name}
\item 
unsigned int \hyperlink{structdriver_a91eef0a66c9eb8ba1d3c8c9f69a1086b}{resolution}
\item 
const int \hyperlink{structdriver_a16e4dc8d1f027390afd91294991d932d}{api\+\_\+version}
\item 
const char $\ast$ \hyperlink{structdriver_a2c48ed8680d2f242dd0c018f846551b7}{driver\+\_\+version}
\item 
const char $\ast$ \hyperlink{structdriver_a6b71523700af552255b059ff51a657e1}{info}
\item 
int($\ast$const \hyperlink{structdriver_aea9a20decd81cb165101823a40fd29af}{close\+\_\+func} )(void)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
The data the driver exports i. e., lirc accesses the driver as defined here. 

Definition at line 83 of file driver.\+h.



\subsection{Field Documentation}
\hypertarget{structdriver_a16e4dc8d1f027390afd91294991d932d}{}\index{driver@{driver}!api\+\_\+version@{api\+\_\+version}}
\index{api\+\_\+version@{api\+\_\+version}!driver@{driver}}
\subsubsection[{api\+\_\+version}]{\setlength{\rightskip}{0pt plus 5cm}const int driver\+::api\+\_\+version}\label{structdriver_a16e4dc8d1f027390afd91294991d932d}
A\+P\+I version (from version 2+). 

Definition at line 185 of file driver.\+h.

\hypertarget{structdriver_aea9a20decd81cb165101823a40fd29af}{}\index{driver@{driver}!close\+\_\+func@{close\+\_\+func}}
\index{close\+\_\+func@{close\+\_\+func}!driver@{driver}}
\subsubsection[{close\+\_\+func}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$const driver\+::close\+\_\+func) (void)}\label{structdriver_aea9a20decd81cb165101823a40fd29af}
Hard closing, returns 0 on O\+K. 

Definition at line 189 of file driver.\+h.

\hypertarget{structdriver_a2ee468d3e45ec38ceb8a8122a721c2ae}{}\index{driver@{driver}!code\+\_\+length@{code\+\_\+length}}
\index{code\+\_\+length@{code\+\_\+length}!driver@{driver}}
\subsubsection[{code\+\_\+length}]{\setlength{\rightskip}{0pt plus 5cm}const \+\_\+\+\_\+u32 driver\+::code\+\_\+length}\label{structdriver_a2ee468d3e45ec38ceb8a8122a721c2ae}
Length in bits of the code. 

Definition at line 111 of file driver.\+h.

\hypertarget{structdriver_a4c8fb1671a48fb248bc8dafa90cded15}{}\index{driver@{driver}!decode\+\_\+func@{decode\+\_\+func}}
\index{decode\+\_\+func@{decode\+\_\+func}!driver@{driver}}
\subsubsection[{decode\+\_\+func}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$const driver\+::decode\+\_\+func) (struct {\bf ir\+\_\+remote} $\ast$remote, struct {\bf decode\+\_\+ctx\+\_\+t} $\ast$ctx)}\label{structdriver_a4c8fb1671a48fb248bc8dafa90cded15}
T\+O\+D\+O 

Definition at line 153 of file driver.\+h.

\hypertarget{structdriver_a87fb83240c2426874349f860fb8504dc}{}\index{driver@{driver}!deinit\+\_\+func@{deinit\+\_\+func}}
\index{deinit\+\_\+func@{deinit\+\_\+func}!driver@{driver}}
\subsubsection[{deinit\+\_\+func}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$const driver\+::deinit\+\_\+func) (void)}\label{structdriver_a87fb83240c2426874349f860fb8504dc}
Function called when transmitting/receiving stops. Zero return value indicates failure, all other return values success. 

Definition at line 131 of file driver.\+h.

\hypertarget{structdriver_aca3bbacc48c5f27dac5568bd658afec8}{}\index{driver@{driver}!device@{device}}
\index{device@{device}!driver@{driver}}
\subsubsection[{device}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ driver\+::device}\label{structdriver_aca3bbacc48c5f27dac5568bd658afec8}
Name of the device (string). Set by \hyperlink{structdriver_aeea866dd70c1cb8296e99fbe706bacf5}{open\+\_\+func()} before init(), possibly using the hard-\/coded driver default value. 

Definition at line 90 of file driver.\+h.

\hypertarget{structdriver_a2c48ed8680d2f242dd0c018f846551b7}{}\index{driver@{driver}!driver\+\_\+version@{driver\+\_\+version}}
\index{driver\+\_\+version@{driver\+\_\+version}!driver@{driver}}
\subsubsection[{driver\+\_\+version}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ driver\+::driver\+\_\+version}\label{structdriver_a2c48ed8680d2f242dd0c018f846551b7}
Driver version (free text). 

Definition at line 186 of file driver.\+h.

\hypertarget{structdriver_ac5d035961037ecb0a74182dd456ced26}{}\index{driver@{driver}!drvctl\+\_\+func@{drvctl\+\_\+func}}
\index{drvctl\+\_\+func@{drvctl\+\_\+func}!driver@{driver}}
\subsubsection[{drvctl\+\_\+func}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$const driver\+::drvctl\+\_\+func) (unsigned int cmd, void $\ast$arg)}\label{structdriver_ac5d035961037ecb0a74182dd456ced26}
Generic driver control function with semantics as defined by driver Returns 0 on success, else a positive error code. 

Definition at line 160 of file driver.\+h.

\hypertarget{structdriver_a277e91c9ef0365654b5412cdcf8cac5f}{}\index{driver@{driver}!fd@{fd}}
\index{fd@{fd}!driver@{driver}}
\subsubsection[{fd}]{\setlength{\rightskip}{0pt plus 5cm}int driver\+::fd}\label{structdriver_a277e91c9ef0365654b5412cdcf8cac5f}
Set by the driver after init(). 

Definition at line 93 of file driver.\+h.

\hypertarget{structdriver_acefa919d82609175b57967c5249020c0}{}\index{driver@{driver}!features@{features}}
\index{features@{features}!driver@{driver}}
\subsubsection[{features}]{\setlength{\rightskip}{0pt plus 5cm}\+\_\+\+\_\+u32 driver\+::features}\label{structdriver_acefa919d82609175b57967c5249020c0}
Code for the features of the present device, valid after init(). 

Definition at line 96 of file driver.\+h.

\hypertarget{structdriver_a6b71523700af552255b059ff51a657e1}{}\index{driver@{driver}!info@{info}}
\index{info@{info}!driver@{driver}}
\subsubsection[{info}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ driver\+::info}\label{structdriver_a6b71523700af552255b059ff51a657e1}
Free text driver info. 

Definition at line 187 of file driver.\+h.

\hypertarget{structdriver_a8f50bcc4e1d143a05dd4eba66a4fa7bb}{}\index{driver@{driver}!init\+\_\+func@{init\+\_\+func}}
\index{init\+\_\+func@{init\+\_\+func}!driver@{driver}}
\subsubsection[{init\+\_\+func}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$const driver\+::init\+\_\+func) (void)}\label{structdriver_a8f50bcc4e1d143a05dd4eba66a4fa7bb}
Function called for initializing the driver and the hardware. Zero return value indicates failure, all other return values success. 

Definition at line 125 of file driver.\+h.

\hypertarget{structdriver_a2d4bc5861fb0d7bb1684e22a16b7d414}{}\index{driver@{driver}!name@{name}}
\index{name@{name}!driver@{driver}}
\subsubsection[{name}]{\setlength{\rightskip}{0pt plus 5cm}const char$\ast$ driver\+::name}\label{structdriver_a2d4bc5861fb0d7bb1684e22a16b7d414}
Driver name, as listed by -\/\+H help and used as argument to i --driver. 

Definition at line 175 of file driver.\+h.

\hypertarget{structdriver_aeea866dd70c1cb8296e99fbe706bacf5}{}\index{driver@{driver}!open\+\_\+func@{open\+\_\+func}}
\index{open\+\_\+func@{open\+\_\+func}!driver@{driver}}
\subsubsection[{open\+\_\+func}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$const driver\+::open\+\_\+func) (const char $\ast${\bf device})}\label{structdriver_aeea866dd70c1cb8296e99fbe706bacf5}
Function called to do basic driver setup. 
\begin{DoxyParams}{Parameters}
{\em device} & String describing what device driver should communicate with. Often (but not always) a /dev/... path. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
0 if everything is fine, else positive error code. 
\end{DoxyReturn}


Definition at line 119 of file driver.\+h.

\hypertarget{structdriver_a6dc74317e7f5fff8153be89153766865}{}\index{driver@{driver}!readdata@{readdata}}
\index{readdata@{readdata}!driver@{driver}}
\subsubsection[{readdata}]{\setlength{\rightskip}{0pt plus 5cm}lirc\+\_\+t($\ast$const driver\+::readdata) (lirc\+\_\+t timeout)}\label{structdriver_a6dc74317e7f5fff8153be89153766865}
Get length of next pulse/space from hardware. 
\begin{DoxyParams}{Parameters}
{\em timeout} & Max time to wait (us). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Length of pulse in lower 24 bits (us). P\+U\+L\+S\+E\+\_\+\+B\+I\+T is set to reflect if this is a pulse or space. 0 indicates errors. 
\end{DoxyReturn}


Definition at line 169 of file driver.\+h.

\hypertarget{structdriver_a41e193204b057873b878b1979c309db8}{}\index{driver@{driver}!rec\+\_\+func@{rec\+\_\+func}}
\index{rec\+\_\+func@{rec\+\_\+func}!driver@{driver}}
\subsubsection[{rec\+\_\+func}]{\setlength{\rightskip}{0pt plus 5cm}char$\ast$($\ast$const driver\+::rec\+\_\+func) (struct {\bf ir\+\_\+remote} $\ast$remotes)}\label{structdriver_a41e193204b057873b878b1979c309db8}
Receive data from remote. Might close device on error conditions. 
\begin{DoxyParams}{Parameters}
{\em The} & remote to read from. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Formatted, statically allocated string with decoded data\+: \char`\"{}remote-\/name code-\/name code repetitions\char`\"{} 
\end{DoxyReturn}


Definition at line 148 of file driver.\+h.

\hypertarget{structdriver_ad5d91256e4b5eb5139a6a744cc8204f6}{}\index{driver@{driver}!rec\+\_\+mode@{rec\+\_\+mode}}
\index{rec\+\_\+mode@{rec\+\_\+mode}!driver@{driver}}
\subsubsection[{rec\+\_\+mode}]{\setlength{\rightskip}{0pt plus 5cm}\+\_\+\+\_\+u32 driver\+::rec\+\_\+mode}\label{structdriver_ad5d91256e4b5eb5139a6a744cc8204f6}
Possible values are\+: L\+I\+R\+C\+\_\+\+M\+O\+D\+E\+\_\+\+R\+A\+W, L\+I\+R\+C\+\_\+\+M\+O\+D\+E\+\_\+\+P\+U\+L\+S\+E, L\+I\+R\+C\+\_\+\+M\+O\+D\+E\+\_\+\+M\+O\+D\+E2, L\+I\+R\+C\+\_\+\+M\+O\+D\+E\+\_\+\+L\+I\+R\+C\+C\+O\+D\+E. These can be combined using bitwise or. 

Definition at line 108 of file driver.\+h.

\hypertarget{structdriver_a91eef0a66c9eb8ba1d3c8c9f69a1086b}{}\index{driver@{driver}!resolution@{resolution}}
\index{resolution@{resolution}!driver@{driver}}
\subsubsection[{resolution}]{\setlength{\rightskip}{0pt plus 5cm}unsigned int driver\+::resolution}\label{structdriver_a91eef0a66c9eb8ba1d3c8c9f69a1086b}
The resolution in microseconds of the recorded durations when reading signals. 

Definition at line 181 of file driver.\+h.

\hypertarget{structdriver_a90d38db70255ee7d38bcd81c9edd9412}{}\index{driver@{driver}!send\+\_\+func@{send\+\_\+func}}
\index{send\+\_\+func@{send\+\_\+func}!driver@{driver}}
\subsubsection[{send\+\_\+func}]{\setlength{\rightskip}{0pt plus 5cm}int($\ast$const driver\+::send\+\_\+func) (struct {\bf ir\+\_\+remote} $\ast$remote, struct {\bf ir\+\_\+ncode} $\ast$code)}\label{structdriver_a90d38db70255ee7d38bcd81c9edd9412}
Send data to the remote. 
\begin{DoxyParams}{Parameters}
{\em remote} & The remote used to send. \\
\hline
{\em code} & Code(s) to send, a single code or the head of a list of codes. \\
\hline
\end{DoxyParams}


Definition at line 139 of file driver.\+h.

\hypertarget{structdriver_abad2a6f422a77f0b80848085b2512ca4}{}\index{driver@{driver}!send\+\_\+mode@{send\+\_\+mode}}
\index{send\+\_\+mode@{send\+\_\+mode}!driver@{driver}}
\subsubsection[{send\+\_\+mode}]{\setlength{\rightskip}{0pt plus 5cm}\+\_\+\+\_\+u32 driver\+::send\+\_\+mode}\label{structdriver_abad2a6f422a77f0b80848085b2512ca4}
Possible values are\+: L\+I\+R\+C\+\_\+\+M\+O\+D\+E\+\_\+\+R\+A\+W, L\+I\+R\+C\+\_\+\+M\+O\+D\+E\+\_\+\+P\+U\+L\+S\+E, L\+I\+R\+C\+\_\+\+M\+O\+D\+E\+\_\+\+M\+O\+D\+E2, L\+I\+R\+C\+\_\+\+M\+O\+D\+E\+\_\+\+L\+I\+R\+C\+C\+O\+D\+E. These can be combined using bitwise or. 

Definition at line 102 of file driver.\+h.



The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
/home/mk/tmp/lirc/lib/\hyperlink{driver_8h}{driver.\+h (dad0c0a 2015-\/02-\/09 13\+:36\+:06 +0100)}\end{DoxyCompactItemize}
