\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)
\item 
const char $\ast$const \hyperlink{structdriver_ab4d02011a73f1778b63c70f45f3ab98b}{device\+\_\+hint}
\end{DoxyCompactItemize}


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

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



\subsection{Field Documentation}
\hypertarget{structdriver_a16e4dc8d1f027390afd91294991d932d}{}\label{structdriver_a16e4dc8d1f027390afd91294991d932d} 
\index{driver@{driver}!api\+\_\+version@{api\+\_\+version}}
\index{api\+\_\+version@{api\+\_\+version}!driver@{driver}}
\subsubsection{\texorpdfstring{api\+\_\+version}{api\_version}}
{\footnotesize\ttfamily const int driver\+::api\+\_\+version}

A\+PI version (from version 2+). 

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

\hypertarget{structdriver_aea9a20decd81cb165101823a40fd29af}{}\label{structdriver_aea9a20decd81cb165101823a40fd29af} 
\index{driver@{driver}!close\+\_\+func@{close\+\_\+func}}
\index{close\+\_\+func@{close\+\_\+func}!driver@{driver}}
\subsubsection{\texorpdfstring{close\+\_\+func}{close\_func}}
{\footnotesize\ttfamily int($\ast$const driver\+::close\+\_\+func) (void)}

Hard closing, returns 0 on OK. 

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

\hypertarget{structdriver_a2ee468d3e45ec38ceb8a8122a721c2ae}{}\label{structdriver_a2ee468d3e45ec38ceb8a8122a721c2ae} 
\index{driver@{driver}!code\+\_\+length@{code\+\_\+length}}
\index{code\+\_\+length@{code\+\_\+length}!driver@{driver}}
\subsubsection{\texorpdfstring{code\+\_\+length}{code\_length}}
{\footnotesize\ttfamily const \+\_\+\+\_\+u32 driver\+::code\+\_\+length}

Length in bits of the code. 

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

\hypertarget{structdriver_a4c8fb1671a48fb248bc8dafa90cded15}{}\label{structdriver_a4c8fb1671a48fb248bc8dafa90cded15} 
\index{driver@{driver}!decode\+\_\+func@{decode\+\_\+func}}
\index{decode\+\_\+func@{decode\+\_\+func}!driver@{driver}}
\subsubsection{\texorpdfstring{decode\+\_\+func}{decode\_func}}
{\footnotesize\ttfamily int($\ast$const driver\+::decode\+\_\+func) (struct \hyperlink{structir__remote}{ir\+\_\+remote} $\ast$remote, struct \hyperlink{structdecode__ctx__t}{decode\+\_\+ctx\+\_\+t} $\ast$ctx)}

T\+O\+DO 

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

\hypertarget{structdriver_a87fb83240c2426874349f860fb8504dc}{}\label{structdriver_a87fb83240c2426874349f860fb8504dc} 
\index{driver@{driver}!deinit\+\_\+func@{deinit\+\_\+func}}
\index{deinit\+\_\+func@{deinit\+\_\+func}!driver@{driver}}
\subsubsection{\texorpdfstring{deinit\+\_\+func}{deinit\_func}}
{\footnotesize\ttfamily int($\ast$const driver\+::deinit\+\_\+func) (void)}

Function called when transmitting/receiving stops. Zero return value indicates failure, all other return values success. 

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

\hypertarget{structdriver_aca3bbacc48c5f27dac5568bd658afec8}{}\label{structdriver_aca3bbacc48c5f27dac5568bd658afec8} 
\index{driver@{driver}!device@{device}}
\index{device@{device}!driver@{driver}}
\subsubsection{\texorpdfstring{device}{device}}
{\footnotesize\ttfamily const char$\ast$ driver\+::device}

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 134 of file driver.\+h.

\hypertarget{structdriver_ab4d02011a73f1778b63c70f45f3ab98b}{}\label{structdriver_ab4d02011a73f1778b63c70f45f3ab98b} 
\index{driver@{driver}!device\+\_\+hint@{device\+\_\+hint}}
\index{device\+\_\+hint@{device\+\_\+hint}!driver@{driver}}
\subsubsection{\texorpdfstring{device\+\_\+hint}{device\_hint}}
{\footnotesize\ttfamily const char$\ast$ const driver\+::device\+\_\+hint}

device\+\_\+hint is a mean for config tools to autodetect devices.
\begin{DoxyItemize}
\item /dev/tty$\ast$ User selects a tty.
\item /dev/usb/$\ast$ Denotes serial, U\+S\+B-\/connectd port.
\item /dev/event$\ast$ A devinput device
\item /dev/foo$\ast$ A wildcard listing possible devices, general fallback.
\item /bin/sh ... Shell command listing possible devices.
\item drvctl Driver supports D\+R\+V\+C\+T\+L\+\_\+\+G\+E\+T\+\_\+\+D\+E\+V\+I\+C\+ES drvctl.
\item None No device is silently configured.
\item Auto No device configured, but a message is displayed. 
\end{DoxyItemize}

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

\hypertarget{structdriver_a2c48ed8680d2f242dd0c018f846551b7}{}\label{structdriver_a2c48ed8680d2f242dd0c018f846551b7} 
\index{driver@{driver}!driver\+\_\+version@{driver\+\_\+version}}
\index{driver\+\_\+version@{driver\+\_\+version}!driver@{driver}}
\subsubsection{\texorpdfstring{driver\+\_\+version}{driver\_version}}
{\footnotesize\ttfamily const char$\ast$ driver\+::driver\+\_\+version}

Driver version (free text). 

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

\hypertarget{structdriver_ac5d035961037ecb0a74182dd456ced26}{}\label{structdriver_ac5d035961037ecb0a74182dd456ced26} 
\index{driver@{driver}!drvctl\+\_\+func@{drvctl\+\_\+func}}
\index{drvctl\+\_\+func@{drvctl\+\_\+func}!driver@{driver}}
\subsubsection{\texorpdfstring{drvctl\+\_\+func}{drvctl\_func}}
{\footnotesize\ttfamily int($\ast$const driver\+::drvctl\+\_\+func) (unsigned int cmd, void $\ast$arg)}

Generic driver control function with semantics as defined by driver Returns 0 on success, else a positive error code. 

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

\hypertarget{structdriver_a277e91c9ef0365654b5412cdcf8cac5f}{}\label{structdriver_a277e91c9ef0365654b5412cdcf8cac5f} 
\index{driver@{driver}!fd@{fd}}
\index{fd@{fd}!driver@{driver}}
\subsubsection{\texorpdfstring{fd}{fd}}
{\footnotesize\ttfamily int driver\+::fd}

Set by the driver after init(). 

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

\hypertarget{structdriver_acefa919d82609175b57967c5249020c0}{}\label{structdriver_acefa919d82609175b57967c5249020c0} 
\index{driver@{driver}!features@{features}}
\index{features@{features}!driver@{driver}}
\subsubsection{\texorpdfstring{features}{features}}
{\footnotesize\ttfamily \+\_\+\+\_\+u32 driver\+::features}

Code for the features of the present device, valid after init(). 

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

\hypertarget{structdriver_a6b71523700af552255b059ff51a657e1}{}\label{structdriver_a6b71523700af552255b059ff51a657e1} 
\index{driver@{driver}!info@{info}}
\index{info@{info}!driver@{driver}}
\subsubsection{\texorpdfstring{info}{info}}
{\footnotesize\ttfamily const char$\ast$ driver\+::info}

Free text driver info. 

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

\hypertarget{structdriver_a8f50bcc4e1d143a05dd4eba66a4fa7bb}{}\label{structdriver_a8f50bcc4e1d143a05dd4eba66a4fa7bb} 
\index{driver@{driver}!init\+\_\+func@{init\+\_\+func}}
\index{init\+\_\+func@{init\+\_\+func}!driver@{driver}}
\subsubsection{\texorpdfstring{init\+\_\+func}{init\_func}}
{\footnotesize\ttfamily int($\ast$const driver\+::init\+\_\+func) (void)}

Function called for initializing the driver and the hardware. Zero return value indicates failure, all other return values success. 

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

\hypertarget{structdriver_a2d4bc5861fb0d7bb1684e22a16b7d414}{}\label{structdriver_a2d4bc5861fb0d7bb1684e22a16b7d414} 
\index{driver@{driver}!name@{name}}
\index{name@{name}!driver@{driver}}
\subsubsection{\texorpdfstring{name}{name}}
{\footnotesize\ttfamily const char$\ast$ driver\+::name}

Driver name, as listed by -\/H help and used as argument to i --driver. 

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

\hypertarget{structdriver_aeea866dd70c1cb8296e99fbe706bacf5}{}\label{structdriver_aeea866dd70c1cb8296e99fbe706bacf5} 
\index{driver@{driver}!open\+\_\+func@{open\+\_\+func}}
\index{open\+\_\+func@{open\+\_\+func}!driver@{driver}}
\subsubsection{\texorpdfstring{open\+\_\+func}{open\_func}}
{\footnotesize\ttfamily int($\ast$const driver\+::open\+\_\+func) (const char $\ast$\hyperlink{structdriver_aca3bbacc48c5f27dac5568bd658afec8}{device})}

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 163 of file driver.\+h.

\hypertarget{structdriver_a6dc74317e7f5fff8153be89153766865}{}\label{structdriver_a6dc74317e7f5fff8153be89153766865} 
\index{driver@{driver}!readdata@{readdata}}
\index{readdata@{readdata}!driver@{driver}}
\subsubsection{\texorpdfstring{readdata}{readdata}}
{\footnotesize\ttfamily lirc\+\_\+t($\ast$const driver\+::readdata) (lirc\+\_\+t timeout)}

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\+IT is set to reflect if this is a pulse or space. 0 indicates errors. 
\end{DoxyReturn}


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

\hypertarget{structdriver_a41e193204b057873b878b1979c309db8}{}\label{structdriver_a41e193204b057873b878b1979c309db8} 
\index{driver@{driver}!rec\+\_\+func@{rec\+\_\+func}}
\index{rec\+\_\+func@{rec\+\_\+func}!driver@{driver}}
\subsubsection{\texorpdfstring{rec\+\_\+func}{rec\_func}}
{\footnotesize\ttfamily char$\ast$($\ast$const driver\+::rec\+\_\+func) (struct \hyperlink{structir__remote}{ir\+\_\+remote} $\ast$remotes)}

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 192 of file driver.\+h.

\hypertarget{structdriver_ad5d91256e4b5eb5139a6a744cc8204f6}{}\label{structdriver_ad5d91256e4b5eb5139a6a744cc8204f6} 
\index{driver@{driver}!rec\+\_\+mode@{rec\+\_\+mode}}
\index{rec\+\_\+mode@{rec\+\_\+mode}!driver@{driver}}
\subsubsection{\texorpdfstring{rec\+\_\+mode}{rec\_mode}}
{\footnotesize\ttfamily \+\_\+\+\_\+u32 driver\+::rec\+\_\+mode}

Possible values are\+: L\+I\+R\+C\+\_\+\+M\+O\+D\+E\+\_\+\+R\+AW, L\+I\+R\+C\+\_\+\+M\+O\+D\+E\+\_\+\+P\+U\+L\+SE, 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\+DE. These can be combined using bitwise or. 

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

\hypertarget{structdriver_a91eef0a66c9eb8ba1d3c8c9f69a1086b}{}\label{structdriver_a91eef0a66c9eb8ba1d3c8c9f69a1086b} 
\index{driver@{driver}!resolution@{resolution}}
\index{resolution@{resolution}!driver@{driver}}
\subsubsection{\texorpdfstring{resolution}{resolution}}
{\footnotesize\ttfamily unsigned int driver\+::resolution}

The resolution in microseconds of the recorded durations when reading signals. 

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

\hypertarget{structdriver_a90d38db70255ee7d38bcd81c9edd9412}{}\label{structdriver_a90d38db70255ee7d38bcd81c9edd9412} 
\index{driver@{driver}!send\+\_\+func@{send\+\_\+func}}
\index{send\+\_\+func@{send\+\_\+func}!driver@{driver}}
\subsubsection{\texorpdfstring{send\+\_\+func}{send\_func}}
{\footnotesize\ttfamily int($\ast$const driver\+::send\+\_\+func) (struct \hyperlink{structir__remote}{ir\+\_\+remote} $\ast$remote, struct \hyperlink{structir__ncode}{ir\+\_\+ncode} $\ast$code)}

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 183 of file driver.\+h.

\hypertarget{structdriver_abad2a6f422a77f0b80848085b2512ca4}{}\label{structdriver_abad2a6f422a77f0b80848085b2512ca4} 
\index{driver@{driver}!send\+\_\+mode@{send\+\_\+mode}}
\index{send\+\_\+mode@{send\+\_\+mode}!driver@{driver}}
\subsubsection{\texorpdfstring{send\+\_\+mode}{send\_mode}}
{\footnotesize\ttfamily \+\_\+\+\_\+u32 driver\+::send\+\_\+mode}

Possible values are\+: L\+I\+R\+C\+\_\+\+M\+O\+D\+E\+\_\+\+R\+AW, L\+I\+R\+C\+\_\+\+M\+O\+D\+E\+\_\+\+P\+U\+L\+SE, 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\+DE. These can be combined using bitwise or. 

Definition at line 146 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 (8e114f9 2016-\/10-\/22 06\+:11\+:39 +0200)}\end{DoxyCompactItemize}
