\hypertarget{i2c_8h}{
\section{i2c.h File Reference}
\label{i2c_8h}\index{i2c.h@{i2c.h}}
}
{\ttfamily \#include $<$avr/io.h$>$}\par
{\ttfamily \#include $<$config.h$>$}\par
\subsection*{Defines}
\begin{DoxyCompactItemize}
\item 
\#define \hyperlink{i2c_8h_a8ec630c2063d0353c53d140b99382d80}{TW\_\-START}~0x08
\item 
\#define \hyperlink{i2c_8h_a8dce3e4b7e35355a8add9ed63d1fa3ab}{TW\_\-REP\_\-START}~0x10
\item 
\#define \hyperlink{i2c_8h_a85cae14b4190042335d25ed9a1b72369}{TW\_\-MT\_\-SLA\_\-ACK}~0x18
\item 
\#define \hyperlink{i2c_8h_aca64b973c51d6548a962c1d7cae0663e}{TW\_\-MT\_\-SLA\_\-NACK}~0x20
\item 
\#define \hyperlink{i2c_8h_a4c28186053b5298305b131ad3e1111f7}{TW\_\-MT\_\-DATA\_\-ACK}~0x28
\item 
\#define \hyperlink{i2c_8h_a91c107a74d268f8578d866ed1bbbd4f3}{TW\_\-MT\_\-DATA\_\-NACK}~0x30
\item 
\#define \hyperlink{i2c_8h_a5959251c4bd80f48b5a029447d86adb3}{TW\_\-MT\_\-ARB\_\-LOST}~0x38
\item 
\#define \hyperlink{i2c_8h_ad85222308836bfbe099255662ffb510c}{TW\_\-MR\_\-ARB\_\-LOST}~0x38
\item 
\#define \hyperlink{i2c_8h_ac16504b87d15d83b97bb0ce61577bb40}{TW\_\-MR\_\-SLA\_\-ACK}~0x40
\item 
\#define \hyperlink{i2c_8h_a655325b6f8a1818103b126cc3774d8e8}{TW\_\-MR\_\-SLA\_\-NACK}~0x48
\item 
\#define \hyperlink{i2c_8h_a3c8c79b2ecb8d22358839890161cc33b}{TW\_\-MR\_\-DATA\_\-ACK}~0x50
\item 
\#define \hyperlink{i2c_8h_a532f0ffa12f684346c74a5cbec15950e}{TW\_\-MR\_\-DATA\_\-NACK}~0x58
\item 
\#define \hyperlink{i2c_8h_a0ecd2ca38d00279194460e65028a0533}{TW\_\-ST\_\-SLA\_\-ACK}~0xA8
\item 
\#define \hyperlink{i2c_8h_a1064659d0758206d43d69cd582d1f5da}{TW\_\-ST\_\-ARB\_\-LOST\_\-SLA\_\-ACK}~0xB0
\item 
\#define \hyperlink{i2c_8h_a2de84bf7cbf1cd7ae43a6e0f0eeca719}{TW\_\-ST\_\-DATA\_\-ACK}~0xB8
\item 
\#define \hyperlink{i2c_8h_acc1837317b1d45e9bb49b8e83cfe6d42}{TW\_\-ST\_\-DATA\_\-NACK}~0xC0
\item 
\#define \hyperlink{i2c_8h_af92d03d0051d47f5b9375f0ef9293d64}{TW\_\-ST\_\-LAST\_\-DATA}~0xC8
\item 
\#define \hyperlink{i2c_8h_a9e9e761d674793772e6b3f77fc9d7fab}{TW\_\-SR\_\-SLA\_\-ACK}~0x60
\item 
\#define \hyperlink{i2c_8h_a1c3ed5ed345d17972002b9fd07f4f829}{TW\_\-SR\_\-ARB\_\-LOST\_\-SLA\_\-ACK}~0x68
\item 
\#define \hyperlink{i2c_8h_a6eb3b4230887a8b73d7787ff231ea911}{TW\_\-SR\_\-GCALL\_\-ACK}~0x70
\item 
\#define \hyperlink{i2c_8h_a4756103341a65e0e3889996cdf15b2fa}{TW\_\-SR\_\-ARB\_\-LOST\_\-GCALL\_\-ACK}~0x78
\item 
\#define \hyperlink{i2c_8h_ac50f1a59c74c3109d4913dbecfb472c1}{TW\_\-SR\_\-DATA\_\-ACK}~0x80
\item 
\#define \hyperlink{i2c_8h_a6c0fa701fe9d96b0b7df29e8af154f94}{TW\_\-SR\_\-DATA\_\-NACK}~0x88
\item 
\#define \hyperlink{i2c_8h_a4abaad098fd92bed63719ffb01802c8d}{TW\_\-SR\_\-GCALL\_\-DATA\_\-ACK}~0x90
\item 
\#define \hyperlink{i2c_8h_a42234278f9b01b9af75dbbc617b97890}{TW\_\-SR\_\-GCALL\_\-DATA\_\-NACK}~0x98
\item 
\#define \hyperlink{i2c_8h_a98d2570f965790884cf1774e716ec629}{TW\_\-SR\_\-STOP}~0xA0
\item 
\#define \hyperlink{i2c_8h_abcff70642634cb53e9d8e93872f70c90}{TW\_\-NO\_\-INFO}~0xF8
\item 
\#define \hyperlink{i2c_8h_a90d373160b1d0a3f0c454af83c57df71}{TW\_\-BUS\_\-ERROR}~0x00
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{i2c_8h_a2dca72c99f7680a64f2b19dd55bfafc3}{i2c\_\-timerproc} (void)
\item 
uint8\_\-t \hyperlink{i2c_8h_af22f74d92a5754c8b6ccc46122628f01}{read\_\-i2c\_\-device} (uint8\_\-t address, uint8\_\-t bytes, uint8\_\-t $\ast$rdata)
\begin{DoxyCompactList}\small\item\em Read 1 or more bytes from an I2C device to memory. \item\end{DoxyCompactList}\item 
uint8\_\-t \hyperlink{i2c_8h_a4b6661a87eb12eb4b2c433245ddb56e5}{write\_\-i2c\_\-device} (uint8\_\-t address, uint8\_\-t bytes, uint8\_\-t $\ast$wdata)
\begin{DoxyCompactList}\small\item\em Write 1 or more bytes to an I2C device from memory. \item\end{DoxyCompactList}\item 
uint8\_\-t \hyperlink{i2c_8h_aac7ed590769c92a1bf20cbcad8c85a2e}{write\_\-read\_\-i2c\_\-device} (uint8\_\-t address, uint8\_\-t wbytes, uint8\_\-t $\ast$wdata, uint8\_\-t rbytes, uint8\_\-t $\ast$rdata)
\begin{DoxyCompactList}\small\item\em Write 1 or more bytes to an I2C device followed by a read without releasing the bus. \item\end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Define Documentation}
\hypertarget{i2c_8h_a90d373160b1d0a3f0c454af83c57df71}{
\index{i2c.h@{i2c.h}!TW\_\-BUS\_\-ERROR@{TW\_\-BUS\_\-ERROR}}
\index{TW\_\-BUS\_\-ERROR@{TW\_\-BUS\_\-ERROR}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-BUS\_\-ERROR}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-BUS\_\-ERROR~0x00}}
\label{i2c_8h_a90d373160b1d0a3f0c454af83c57df71}
\hypertarget{i2c_8h_ad85222308836bfbe099255662ffb510c}{
\index{i2c.h@{i2c.h}!TW\_\-MR\_\-ARB\_\-LOST@{TW\_\-MR\_\-ARB\_\-LOST}}
\index{TW\_\-MR\_\-ARB\_\-LOST@{TW\_\-MR\_\-ARB\_\-LOST}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-MR\_\-ARB\_\-LOST}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-MR\_\-ARB\_\-LOST~0x38}}
\label{i2c_8h_ad85222308836bfbe099255662ffb510c}
\hypertarget{i2c_8h_a3c8c79b2ecb8d22358839890161cc33b}{
\index{i2c.h@{i2c.h}!TW\_\-MR\_\-DATA\_\-ACK@{TW\_\-MR\_\-DATA\_\-ACK}}
\index{TW\_\-MR\_\-DATA\_\-ACK@{TW\_\-MR\_\-DATA\_\-ACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-MR\_\-DATA\_\-ACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-MR\_\-DATA\_\-ACK~0x50}}
\label{i2c_8h_a3c8c79b2ecb8d22358839890161cc33b}
\hypertarget{i2c_8h_a532f0ffa12f684346c74a5cbec15950e}{
\index{i2c.h@{i2c.h}!TW\_\-MR\_\-DATA\_\-NACK@{TW\_\-MR\_\-DATA\_\-NACK}}
\index{TW\_\-MR\_\-DATA\_\-NACK@{TW\_\-MR\_\-DATA\_\-NACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-MR\_\-DATA\_\-NACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-MR\_\-DATA\_\-NACK~0x58}}
\label{i2c_8h_a532f0ffa12f684346c74a5cbec15950e}
\hypertarget{i2c_8h_ac16504b87d15d83b97bb0ce61577bb40}{
\index{i2c.h@{i2c.h}!TW\_\-MR\_\-SLA\_\-ACK@{TW\_\-MR\_\-SLA\_\-ACK}}
\index{TW\_\-MR\_\-SLA\_\-ACK@{TW\_\-MR\_\-SLA\_\-ACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-MR\_\-SLA\_\-ACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-MR\_\-SLA\_\-ACK~0x40}}
\label{i2c_8h_ac16504b87d15d83b97bb0ce61577bb40}
\hypertarget{i2c_8h_a655325b6f8a1818103b126cc3774d8e8}{
\index{i2c.h@{i2c.h}!TW\_\-MR\_\-SLA\_\-NACK@{TW\_\-MR\_\-SLA\_\-NACK}}
\index{TW\_\-MR\_\-SLA\_\-NACK@{TW\_\-MR\_\-SLA\_\-NACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-MR\_\-SLA\_\-NACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-MR\_\-SLA\_\-NACK~0x48}}
\label{i2c_8h_a655325b6f8a1818103b126cc3774d8e8}
\hypertarget{i2c_8h_a5959251c4bd80f48b5a029447d86adb3}{
\index{i2c.h@{i2c.h}!TW\_\-MT\_\-ARB\_\-LOST@{TW\_\-MT\_\-ARB\_\-LOST}}
\index{TW\_\-MT\_\-ARB\_\-LOST@{TW\_\-MT\_\-ARB\_\-LOST}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-MT\_\-ARB\_\-LOST}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-MT\_\-ARB\_\-LOST~0x38}}
\label{i2c_8h_a5959251c4bd80f48b5a029447d86adb3}
\hypertarget{i2c_8h_a4c28186053b5298305b131ad3e1111f7}{
\index{i2c.h@{i2c.h}!TW\_\-MT\_\-DATA\_\-ACK@{TW\_\-MT\_\-DATA\_\-ACK}}
\index{TW\_\-MT\_\-DATA\_\-ACK@{TW\_\-MT\_\-DATA\_\-ACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-MT\_\-DATA\_\-ACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-MT\_\-DATA\_\-ACK~0x28}}
\label{i2c_8h_a4c28186053b5298305b131ad3e1111f7}
\hypertarget{i2c_8h_a91c107a74d268f8578d866ed1bbbd4f3}{
\index{i2c.h@{i2c.h}!TW\_\-MT\_\-DATA\_\-NACK@{TW\_\-MT\_\-DATA\_\-NACK}}
\index{TW\_\-MT\_\-DATA\_\-NACK@{TW\_\-MT\_\-DATA\_\-NACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-MT\_\-DATA\_\-NACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-MT\_\-DATA\_\-NACK~0x30}}
\label{i2c_8h_a91c107a74d268f8578d866ed1bbbd4f3}
\hypertarget{i2c_8h_a85cae14b4190042335d25ed9a1b72369}{
\index{i2c.h@{i2c.h}!TW\_\-MT\_\-SLA\_\-ACK@{TW\_\-MT\_\-SLA\_\-ACK}}
\index{TW\_\-MT\_\-SLA\_\-ACK@{TW\_\-MT\_\-SLA\_\-ACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-MT\_\-SLA\_\-ACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-MT\_\-SLA\_\-ACK~0x18}}
\label{i2c_8h_a85cae14b4190042335d25ed9a1b72369}
\hypertarget{i2c_8h_aca64b973c51d6548a962c1d7cae0663e}{
\index{i2c.h@{i2c.h}!TW\_\-MT\_\-SLA\_\-NACK@{TW\_\-MT\_\-SLA\_\-NACK}}
\index{TW\_\-MT\_\-SLA\_\-NACK@{TW\_\-MT\_\-SLA\_\-NACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-MT\_\-SLA\_\-NACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-MT\_\-SLA\_\-NACK~0x20}}
\label{i2c_8h_aca64b973c51d6548a962c1d7cae0663e}
\hypertarget{i2c_8h_abcff70642634cb53e9d8e93872f70c90}{
\index{i2c.h@{i2c.h}!TW\_\-NO\_\-INFO@{TW\_\-NO\_\-INFO}}
\index{TW\_\-NO\_\-INFO@{TW\_\-NO\_\-INFO}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-NO\_\-INFO}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-NO\_\-INFO~0xF8}}
\label{i2c_8h_abcff70642634cb53e9d8e93872f70c90}
\hypertarget{i2c_8h_a8dce3e4b7e35355a8add9ed63d1fa3ab}{
\index{i2c.h@{i2c.h}!TW\_\-REP\_\-START@{TW\_\-REP\_\-START}}
\index{TW\_\-REP\_\-START@{TW\_\-REP\_\-START}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-REP\_\-START}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-REP\_\-START~0x10}}
\label{i2c_8h_a8dce3e4b7e35355a8add9ed63d1fa3ab}
\hypertarget{i2c_8h_a4756103341a65e0e3889996cdf15b2fa}{
\index{i2c.h@{i2c.h}!TW\_\-SR\_\-ARB\_\-LOST\_\-GCALL\_\-ACK@{TW\_\-SR\_\-ARB\_\-LOST\_\-GCALL\_\-ACK}}
\index{TW\_\-SR\_\-ARB\_\-LOST\_\-GCALL\_\-ACK@{TW\_\-SR\_\-ARB\_\-LOST\_\-GCALL\_\-ACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-SR\_\-ARB\_\-LOST\_\-GCALL\_\-ACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-SR\_\-ARB\_\-LOST\_\-GCALL\_\-ACK~0x78}}
\label{i2c_8h_a4756103341a65e0e3889996cdf15b2fa}
\hypertarget{i2c_8h_a1c3ed5ed345d17972002b9fd07f4f829}{
\index{i2c.h@{i2c.h}!TW\_\-SR\_\-ARB\_\-LOST\_\-SLA\_\-ACK@{TW\_\-SR\_\-ARB\_\-LOST\_\-SLA\_\-ACK}}
\index{TW\_\-SR\_\-ARB\_\-LOST\_\-SLA\_\-ACK@{TW\_\-SR\_\-ARB\_\-LOST\_\-SLA\_\-ACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-SR\_\-ARB\_\-LOST\_\-SLA\_\-ACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-SR\_\-ARB\_\-LOST\_\-SLA\_\-ACK~0x68}}
\label{i2c_8h_a1c3ed5ed345d17972002b9fd07f4f829}
\hypertarget{i2c_8h_ac50f1a59c74c3109d4913dbecfb472c1}{
\index{i2c.h@{i2c.h}!TW\_\-SR\_\-DATA\_\-ACK@{TW\_\-SR\_\-DATA\_\-ACK}}
\index{TW\_\-SR\_\-DATA\_\-ACK@{TW\_\-SR\_\-DATA\_\-ACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-SR\_\-DATA\_\-ACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-SR\_\-DATA\_\-ACK~0x80}}
\label{i2c_8h_ac50f1a59c74c3109d4913dbecfb472c1}
\hypertarget{i2c_8h_a6c0fa701fe9d96b0b7df29e8af154f94}{
\index{i2c.h@{i2c.h}!TW\_\-SR\_\-DATA\_\-NACK@{TW\_\-SR\_\-DATA\_\-NACK}}
\index{TW\_\-SR\_\-DATA\_\-NACK@{TW\_\-SR\_\-DATA\_\-NACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-SR\_\-DATA\_\-NACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-SR\_\-DATA\_\-NACK~0x88}}
\label{i2c_8h_a6c0fa701fe9d96b0b7df29e8af154f94}
\hypertarget{i2c_8h_a6eb3b4230887a8b73d7787ff231ea911}{
\index{i2c.h@{i2c.h}!TW\_\-SR\_\-GCALL\_\-ACK@{TW\_\-SR\_\-GCALL\_\-ACK}}
\index{TW\_\-SR\_\-GCALL\_\-ACK@{TW\_\-SR\_\-GCALL\_\-ACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-SR\_\-GCALL\_\-ACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-SR\_\-GCALL\_\-ACK~0x70}}
\label{i2c_8h_a6eb3b4230887a8b73d7787ff231ea911}
\hypertarget{i2c_8h_a4abaad098fd92bed63719ffb01802c8d}{
\index{i2c.h@{i2c.h}!TW\_\-SR\_\-GCALL\_\-DATA\_\-ACK@{TW\_\-SR\_\-GCALL\_\-DATA\_\-ACK}}
\index{TW\_\-SR\_\-GCALL\_\-DATA\_\-ACK@{TW\_\-SR\_\-GCALL\_\-DATA\_\-ACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-SR\_\-GCALL\_\-DATA\_\-ACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-SR\_\-GCALL\_\-DATA\_\-ACK~0x90}}
\label{i2c_8h_a4abaad098fd92bed63719ffb01802c8d}
\hypertarget{i2c_8h_a42234278f9b01b9af75dbbc617b97890}{
\index{i2c.h@{i2c.h}!TW\_\-SR\_\-GCALL\_\-DATA\_\-NACK@{TW\_\-SR\_\-GCALL\_\-DATA\_\-NACK}}
\index{TW\_\-SR\_\-GCALL\_\-DATA\_\-NACK@{TW\_\-SR\_\-GCALL\_\-DATA\_\-NACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-SR\_\-GCALL\_\-DATA\_\-NACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-SR\_\-GCALL\_\-DATA\_\-NACK~0x98}}
\label{i2c_8h_a42234278f9b01b9af75dbbc617b97890}
\hypertarget{i2c_8h_a9e9e761d674793772e6b3f77fc9d7fab}{
\index{i2c.h@{i2c.h}!TW\_\-SR\_\-SLA\_\-ACK@{TW\_\-SR\_\-SLA\_\-ACK}}
\index{TW\_\-SR\_\-SLA\_\-ACK@{TW\_\-SR\_\-SLA\_\-ACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-SR\_\-SLA\_\-ACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-SR\_\-SLA\_\-ACK~0x60}}
\label{i2c_8h_a9e9e761d674793772e6b3f77fc9d7fab}
\hypertarget{i2c_8h_a98d2570f965790884cf1774e716ec629}{
\index{i2c.h@{i2c.h}!TW\_\-SR\_\-STOP@{TW\_\-SR\_\-STOP}}
\index{TW\_\-SR\_\-STOP@{TW\_\-SR\_\-STOP}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-SR\_\-STOP}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-SR\_\-STOP~0xA0}}
\label{i2c_8h_a98d2570f965790884cf1774e716ec629}
\hypertarget{i2c_8h_a1064659d0758206d43d69cd582d1f5da}{
\index{i2c.h@{i2c.h}!TW\_\-ST\_\-ARB\_\-LOST\_\-SLA\_\-ACK@{TW\_\-ST\_\-ARB\_\-LOST\_\-SLA\_\-ACK}}
\index{TW\_\-ST\_\-ARB\_\-LOST\_\-SLA\_\-ACK@{TW\_\-ST\_\-ARB\_\-LOST\_\-SLA\_\-ACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-ST\_\-ARB\_\-LOST\_\-SLA\_\-ACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-ST\_\-ARB\_\-LOST\_\-SLA\_\-ACK~0xB0}}
\label{i2c_8h_a1064659d0758206d43d69cd582d1f5da}
\hypertarget{i2c_8h_a2de84bf7cbf1cd7ae43a6e0f0eeca719}{
\index{i2c.h@{i2c.h}!TW\_\-ST\_\-DATA\_\-ACK@{TW\_\-ST\_\-DATA\_\-ACK}}
\index{TW\_\-ST\_\-DATA\_\-ACK@{TW\_\-ST\_\-DATA\_\-ACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-ST\_\-DATA\_\-ACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-ST\_\-DATA\_\-ACK~0xB8}}
\label{i2c_8h_a2de84bf7cbf1cd7ae43a6e0f0eeca719}
\hypertarget{i2c_8h_acc1837317b1d45e9bb49b8e83cfe6d42}{
\index{i2c.h@{i2c.h}!TW\_\-ST\_\-DATA\_\-NACK@{TW\_\-ST\_\-DATA\_\-NACK}}
\index{TW\_\-ST\_\-DATA\_\-NACK@{TW\_\-ST\_\-DATA\_\-NACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-ST\_\-DATA\_\-NACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-ST\_\-DATA\_\-NACK~0xC0}}
\label{i2c_8h_acc1837317b1d45e9bb49b8e83cfe6d42}
\hypertarget{i2c_8h_af92d03d0051d47f5b9375f0ef9293d64}{
\index{i2c.h@{i2c.h}!TW\_\-ST\_\-LAST\_\-DATA@{TW\_\-ST\_\-LAST\_\-DATA}}
\index{TW\_\-ST\_\-LAST\_\-DATA@{TW\_\-ST\_\-LAST\_\-DATA}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-ST\_\-LAST\_\-DATA}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-ST\_\-LAST\_\-DATA~0xC8}}
\label{i2c_8h_af92d03d0051d47f5b9375f0ef9293d64}
\hypertarget{i2c_8h_a0ecd2ca38d00279194460e65028a0533}{
\index{i2c.h@{i2c.h}!TW\_\-ST\_\-SLA\_\-ACK@{TW\_\-ST\_\-SLA\_\-ACK}}
\index{TW\_\-ST\_\-SLA\_\-ACK@{TW\_\-ST\_\-SLA\_\-ACK}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-ST\_\-SLA\_\-ACK}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-ST\_\-SLA\_\-ACK~0xA8}}
\label{i2c_8h_a0ecd2ca38d00279194460e65028a0533}
\hypertarget{i2c_8h_a8ec630c2063d0353c53d140b99382d80}{
\index{i2c.h@{i2c.h}!TW\_\-START@{TW\_\-START}}
\index{TW\_\-START@{TW\_\-START}!i2c.h@{i2c.h}}
\subsubsection[{TW\_\-START}]{\setlength{\rightskip}{0pt plus 5cm}\#define TW\_\-START~0x08}}
\label{i2c_8h_a8ec630c2063d0353c53d140b99382d80}


\subsection{Function Documentation}
\hypertarget{i2c_8h_a2dca72c99f7680a64f2b19dd55bfafc3}{
\index{i2c.h@{i2c.h}!i2c\_\-timerproc@{i2c\_\-timerproc}}
\index{i2c\_\-timerproc@{i2c\_\-timerproc}!i2c.h@{i2c.h}}
\subsubsection[{i2c\_\-timerproc}]{\setlength{\rightskip}{0pt plus 5cm}void i2c\_\-timerproc (
\begin{DoxyParamCaption}
\item[{void}]{}
\end{DoxyParamCaption}
)}}
\label{i2c_8h_a2dca72c99f7680a64f2b19dd55bfafc3}
\hypertarget{i2c_8h_af22f74d92a5754c8b6ccc46122628f01}{
\index{i2c.h@{i2c.h}!read\_\-i2c\_\-device@{read\_\-i2c\_\-device}}
\index{read\_\-i2c\_\-device@{read\_\-i2c\_\-device}!i2c.h@{i2c.h}}
\subsubsection[{read\_\-i2c\_\-device}]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t read\_\-i2c\_\-device (
\begin{DoxyParamCaption}
\item[{uint8\_\-t}]{ address, }
\item[{uint8\_\-t}]{ bytes, }
\item[{uint8\_\-t $\ast$}]{ rdata}
\end{DoxyParamCaption}
)}}
\label{i2c_8h_af22f74d92a5754c8b6ccc46122628f01}


Read 1 or more bytes from an I2C device to memory. 


\begin{DoxyParams}{Parameters}
\item[{\em address}]Address if I2C device. The bottom bit is set to enforce an I2C read. \item[{\em bytes}]Number of bytes to be returned. \item[{\em $\ast$rdata}]Pointer to location to store values returned.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
returns error code generated from I2C transaction, or 0 for success 
\end{DoxyReturn}
\hypertarget{i2c_8h_a4b6661a87eb12eb4b2c433245ddb56e5}{
\index{i2c.h@{i2c.h}!write\_\-i2c\_\-device@{write\_\-i2c\_\-device}}
\index{write\_\-i2c\_\-device@{write\_\-i2c\_\-device}!i2c.h@{i2c.h}}
\subsubsection[{write\_\-i2c\_\-device}]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t write\_\-i2c\_\-device (
\begin{DoxyParamCaption}
\item[{uint8\_\-t}]{ address, }
\item[{uint8\_\-t}]{ bytes, }
\item[{uint8\_\-t $\ast$}]{ wdata}
\end{DoxyParamCaption}
)}}
\label{i2c_8h_a4b6661a87eb12eb4b2c433245ddb56e5}


Write 1 or more bytes to an I2C device from memory. 


\begin{DoxyParams}{Parameters}
\item[{\em address}]Address if I2C device. The bottom bit is cleared to enforce an I2C write. \item[{\em bytes}]Number of data bytes to be sent. \item[{\em $\ast$wdata}]Pointer to location in memory of first byte of set of data.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
returns error code generated from I2C transaction, or 0 for success 
\end{DoxyReturn}
\hypertarget{i2c_8h_aac7ed590769c92a1bf20cbcad8c85a2e}{
\index{i2c.h@{i2c.h}!write\_\-read\_\-i2c\_\-device@{write\_\-read\_\-i2c\_\-device}}
\index{write\_\-read\_\-i2c\_\-device@{write\_\-read\_\-i2c\_\-device}!i2c.h@{i2c.h}}
\subsubsection[{write\_\-read\_\-i2c\_\-device}]{\setlength{\rightskip}{0pt plus 5cm}uint8\_\-t write\_\-read\_\-i2c\_\-device (
\begin{DoxyParamCaption}
\item[{uint8\_\-t}]{ address, }
\item[{uint8\_\-t}]{ wbytes, }
\item[{uint8\_\-t $\ast$}]{ wdata, }
\item[{uint8\_\-t}]{ rbytes, }
\item[{uint8\_\-t $\ast$}]{ rdata}
\end{DoxyParamCaption}
)}}
\label{i2c_8h_aac7ed590769c92a1bf20cbcad8c85a2e}


Write 1 or more bytes to an I2C device followed by a read without releasing the bus. 


\begin{DoxyParams}{Parameters}
\item[{\em address}]Address if I2C device. The bottom bit is manipulated as appropriate for R/W \item[{\em wbytes}]Number of bytes to write. \item[{\em $\ast$wdata}]Pointer to location in memory of first byte to write. \item[{\em rbytes}]Number of bytes to read. \item[{\em $\ast$rdata}]Pointer to location in memory of first byte of set of data.\end{DoxyParams}
\begin{DoxyReturn}{Returns}
returns error code generated from I2C transaction, or 0 for success 
\end{DoxyReturn}
