\hypertarget{group___s_r_f08}{\section{S\-R\-F08 ultrasonic range finders.}
\label{group___s_r_f08}\index{S\-R\-F08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}}
}
\subsection*{Files}
\begin{DoxyCompactItemize}
\item 
file \hyperlink{_s_r_f08_8c}{S\-R\-F08.\-c}
\end{DoxyCompactItemize}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{group___s_r_f08_ga84df9a5887b8b8230cfe85d18e53900e}{I2\-C\-\_\-\-Init} (void)
\item 
void \hyperlink{group___s_r_f08_gafce134e0a1b6a8bc503c97b37639c9e6}{I2\-C\-\_\-\-Stop} (void)
\item 
uint8\-\_\-t \hyperlink{group___s_r_f08_gac08827cc72729e04d1ac6bb15207b3ec}{I2\-C\-\_\-\-Start} (uint8\-\_\-t addr)
\item 
uint8\-\_\-t \hyperlink{group___s_r_f08_ga49555a389250e982638d26a567dcf437}{I2\-C\-\_\-\-Write} (uint8\-\_\-t data)
\item 
uint8\-\_\-t \hyperlink{group___s_r_f08_ga0f85a56a349448fcc67ec19e87d9dc3b}{I2\-C\-\_\-\-Read\-Ack} (void)
\item 
uint8\-\_\-t \hyperlink{group___s_r_f08_ga4a7e4e6afa98be22172bc213cc62bc64}{I2\-C\-\_\-\-Read\-Nak} (void)
\item 
uint8\-\_\-t \hyperlink{group___s_r_f08_ga9ea36c00ec40b6f5f3afa7d48f9c4d02}{S\-R\-F08\-\_\-\-Write} (uint8\-\_\-t address, uint8\-\_\-t reg, uint8\-\_\-t data)
\item 
uint8\-\_\-t \hyperlink{group___s_r_f08_gafc3c5fe74807c332a1669f2e97984436}{S\-R\-F08\-\_\-\-Read} (uint8\-\_\-t address, uint8\-\_\-t reg)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Library functions for handling S\-R\-F08 range finders. 

\subsection{Function Documentation}
\hypertarget{group___s_r_f08_ga84df9a5887b8b8230cfe85d18e53900e}{\index{S\-R\-F08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}!I2\-C\-\_\-\-Init@{I2\-C\-\_\-\-Init}}
\index{I2\-C\-\_\-\-Init@{I2\-C\-\_\-\-Init}!SRF08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}}
\subsubsection[{I2\-C\-\_\-\-Init}]{\setlength{\rightskip}{0pt plus 5cm}void I2\-C\-\_\-\-Init (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group___s_r_f08_ga84df9a5887b8b8230cfe85d18e53900e}
Initializes I2\-C. 

Definition at line 15 of file S\-R\-F08.\-c.

\hypertarget{group___s_r_f08_ga0f85a56a349448fcc67ec19e87d9dc3b}{\index{S\-R\-F08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}!I2\-C\-\_\-\-Read\-Ack@{I2\-C\-\_\-\-Read\-Ack}}
\index{I2\-C\-\_\-\-Read\-Ack@{I2\-C\-\_\-\-Read\-Ack}!SRF08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}}
\subsubsection[{I2\-C\-\_\-\-Read\-Ack}]{\setlength{\rightskip}{0pt plus 5cm}uint8\-\_\-t I2\-C\-\_\-\-Read\-Ack (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group___s_r_f08_ga0f85a56a349448fcc67ec19e87d9dc3b}
Reads data from the previously addressed device, generates A\-C\-K bit. 

Definition at line 69 of file S\-R\-F08.\-c.

\hypertarget{group___s_r_f08_ga4a7e4e6afa98be22172bc213cc62bc64}{\index{S\-R\-F08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}!I2\-C\-\_\-\-Read\-Nak@{I2\-C\-\_\-\-Read\-Nak}}
\index{I2\-C\-\_\-\-Read\-Nak@{I2\-C\-\_\-\-Read\-Nak}!SRF08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}}
\subsubsection[{I2\-C\-\_\-\-Read\-Nak}]{\setlength{\rightskip}{0pt plus 5cm}uint8\-\_\-t I2\-C\-\_\-\-Read\-Nak (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group___s_r_f08_ga4a7e4e6afa98be22172bc213cc62bc64}
Reads data from the previously addressed device, generates N\-A\-C\-K bit. 

Definition at line 78 of file S\-R\-F08.\-c.

\hypertarget{group___s_r_f08_gac08827cc72729e04d1ac6bb15207b3ec}{\index{S\-R\-F08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}!I2\-C\-\_\-\-Start@{I2\-C\-\_\-\-Start}}
\index{I2\-C\-\_\-\-Start@{I2\-C\-\_\-\-Start}!SRF08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}}
\subsubsection[{I2\-C\-\_\-\-Start}]{\setlength{\rightskip}{0pt plus 5cm}uint8\-\_\-t I2\-C\-\_\-\-Start (
\begin{DoxyParamCaption}
\item[{uint8\-\_\-t}]{addr}
\end{DoxyParamCaption}
)}}\label{group___s_r_f08_gac08827cc72729e04d1ac6bb15207b3ec}
Sends start sequence and addresses device. 

Definition at line 21 of file S\-R\-F08.\-c.

\hypertarget{group___s_r_f08_gafce134e0a1b6a8bc503c97b37639c9e6}{\index{S\-R\-F08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}!I2\-C\-\_\-\-Stop@{I2\-C\-\_\-\-Stop}}
\index{I2\-C\-\_\-\-Stop@{I2\-C\-\_\-\-Stop}!SRF08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}}
\subsubsection[{I2\-C\-\_\-\-Stop}]{\setlength{\rightskip}{0pt plus 5cm}void I2\-C\-\_\-\-Stop (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}\label{group___s_r_f08_gafce134e0a1b6a8bc503c97b37639c9e6}
Sends stop sequence. 

Definition at line 46 of file S\-R\-F08.\-c.

\hypertarget{group___s_r_f08_ga49555a389250e982638d26a567dcf437}{\index{S\-R\-F08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}!I2\-C\-\_\-\-Write@{I2\-C\-\_\-\-Write}}
\index{I2\-C\-\_\-\-Write@{I2\-C\-\_\-\-Write}!SRF08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}}
\subsubsection[{I2\-C\-\_\-\-Write}]{\setlength{\rightskip}{0pt plus 5cm}uint8\-\_\-t I2\-C\-\_\-\-Write (
\begin{DoxyParamCaption}
\item[{uint8\-\_\-t}]{data}
\end{DoxyParamCaption}
)}}\label{group___s_r_f08_ga49555a389250e982638d26a567dcf437}
Writes data to the previously addressed device. 

Definition at line 53 of file S\-R\-F08.\-c.

\hypertarget{group___s_r_f08_gafc3c5fe74807c332a1669f2e97984436}{\index{S\-R\-F08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}!S\-R\-F08\-\_\-\-Read@{S\-R\-F08\-\_\-\-Read}}
\index{S\-R\-F08\-\_\-\-Read@{S\-R\-F08\-\_\-\-Read}!SRF08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}}
\subsubsection[{S\-R\-F08\-\_\-\-Read}]{\setlength{\rightskip}{0pt plus 5cm}uint8\-\_\-t S\-R\-F08\-\_\-\-Read (
\begin{DoxyParamCaption}
\item[{uint8\-\_\-t}]{address, }
\item[{uint8\-\_\-t}]{reg}
\end{DoxyParamCaption}
)}}\label{group___s_r_f08_gafc3c5fe74807c332a1669f2e97984436}
Reads data from the register of the assigned device.


\begin{DoxyParams}{Parameters}
{\em address} & Device address. \\
\hline
{\em reg} & Device register to read from. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Data from the register / 0 on error. 
\end{DoxyReturn}


Definition at line 115 of file S\-R\-F08.\-c.

\hypertarget{group___s_r_f08_ga9ea36c00ec40b6f5f3afa7d48f9c4d02}{\index{S\-R\-F08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}!S\-R\-F08\-\_\-\-Write@{S\-R\-F08\-\_\-\-Write}}
\index{S\-R\-F08\-\_\-\-Write@{S\-R\-F08\-\_\-\-Write}!SRF08 ultrasonic range finders.@{S\-R\-F08 ultrasonic range finders.}}
\subsubsection[{S\-R\-F08\-\_\-\-Write}]{\setlength{\rightskip}{0pt plus 5cm}uint8\-\_\-t S\-R\-F08\-\_\-\-Write (
\begin{DoxyParamCaption}
\item[{uint8\-\_\-t}]{address, }
\item[{uint8\-\_\-t}]{reg, }
\item[{uint8\-\_\-t}]{data}
\end{DoxyParamCaption}
)}}\label{group___s_r_f08_ga9ea36c00ec40b6f5f3afa7d48f9c4d02}
Writes data to the register of the assigned device.


\begin{DoxyParams}{Parameters}
{\em address} & Device address. \\
\hline
{\em reg} & Device register to write to. \\
\hline
{\em data} & 1 byte of data to write. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
F\-A\-L\-S\-E if write is successful / T\-R\-U\-E if write fails. 
\end{DoxyReturn}


Definition at line 87 of file S\-R\-F08.\-c.

