\doxysection{Interface\+\_\+7\+Semi Class Reference}
\hypertarget{classInterface__7Semi}{}\label{classInterface__7Semi}\index{Interface\_7Semi@{Interface\_7Semi}}


{\ttfamily \#include $<$7\+Semi\+\_\+\+Interface.\+h$>$}



Inheritance diagram for Interface\+\_\+7\+Semi\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=260pt]{classInterface__7Semi__inherit__graph}
\end{center}
\end{figure}
\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
virtual \mbox{\hyperlink{classInterface__7Semi_a886abd3b127910a54640cee60696ffb5}{\texorpdfstring{$\sim$}{\string~}\+Interface\+\_\+7\+Semi}} ()
\item 
virtual bool \mbox{\hyperlink{classInterface__7Semi_acaf46ee0d90f79c3d0e0e68f777b5696}{begin\+I2C}} (uint8\+\_\+t address, Two\+Wire \&wire, uint32\+\_\+t speed, uint8\+\_\+t sda=255, uint8\+\_\+t scl=255)=0
\item 
virtual bool \mbox{\hyperlink{classInterface__7Semi_a41d682876fe9f25b928835bb25816a80}{begin\+SPI}} (uint8\+\_\+t cs\+\_\+pin, SPIClass \&wire, uint32\+\_\+t speed, uint8\+\_\+t csk=255, uint8\+\_\+t miso=255, uint8\+\_\+t mosi=255)=0
\item 
virtual int8\+\_\+t \mbox{\hyperlink{classInterface__7Semi_a8e267174d883544c418ce925f8c55e0f}{read}} (uint8\+\_\+t reg, uint8\+\_\+t \texorpdfstring{$\ast$}{*}data, uint32\+\_\+t len)=0
\item 
virtual int8\+\_\+t \mbox{\hyperlink{classInterface__7Semi_a35047310c257c82ae7f60d143326daa0}{write}} (uint8\+\_\+t reg, const uint8\+\_\+t \texorpdfstring{$\ast$}{*}data, uint32\+\_\+t len)=0
\end{DoxyCompactItemize}
\doxysubsubsection*{Static Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
static void \mbox{\hyperlink{classInterface__7Semi_a7e9d62ef33227b06c85288712dc11c59}{delay\+\_\+us}} (uint32\+\_\+t us)
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
7Semi Universal Interface Layer


\begin{DoxyItemize}
\item Abstract communication layer for I2C / SPI
\item Ensures sensor drivers remain hardware independent 
\end{DoxyItemize}

Definition at line \mbox{\hyperlink{7Semi__Interface_8h_source_l00015}{15}} of file \mbox{\hyperlink{7Semi__Interface_8h_source}{7\+Semi\+\_\+\+Interface.\+h}}.



\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{classInterface__7Semi_a886abd3b127910a54640cee60696ffb5}\label{classInterface__7Semi_a886abd3b127910a54640cee60696ffb5} 
\index{Interface\_7Semi@{Interface\_7Semi}!````~Interface\_7Semi@{\texorpdfstring{$\sim$}{\string~}Interface\_7Semi}}
\index{````~Interface\_7Semi@{\texorpdfstring{$\sim$}{\string~}Interface\_7Semi}!Interface\_7Semi@{Interface\_7Semi}}
\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\sim$}{\string~}Interface\_7Semi()}{\string~Interface\_7Semi()}}
{\footnotesize\ttfamily virtual Interface\+\_\+7\+Semi\+::\texorpdfstring{$\sim$}{\string~}\+Interface\+\_\+7\+Semi (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [virtual]}}



Definition at line \mbox{\hyperlink{7Semi__Interface_8h_source_l00018}{18}} of file \mbox{\hyperlink{7Semi__Interface_8h_source}{7\+Semi\+\_\+\+Interface.\+h}}.



\doxysubsection{Member Function Documentation}
\Hypertarget{classInterface__7Semi_acaf46ee0d90f79c3d0e0e68f777b5696}\label{classInterface__7Semi_acaf46ee0d90f79c3d0e0e68f777b5696} 
\index{Interface\_7Semi@{Interface\_7Semi}!beginI2C@{beginI2C}}
\index{beginI2C@{beginI2C}!Interface\_7Semi@{Interface\_7Semi}}
\doxysubsubsection{\texorpdfstring{beginI2C()}{beginI2C()}}
{\footnotesize\ttfamily virtual bool Interface\+\_\+7\+Semi\+::begin\+I2C (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{address,  }\item[{Two\+Wire \&}]{wire,  }\item[{uint32\+\_\+t}]{speed,  }\item[{uint8\+\_\+t}]{sda = {\ttfamily 255},  }\item[{uint8\+\_\+t}]{scl = {\ttfamily 255} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

\doxylink{classInterface__7Semi_acaf46ee0d90f79c3d0e0e68f777b5696}{begin\+I2\+C()}


\begin{DoxyItemize}
\item Initializes I2C peripheral
\item Configures SDA / SCL pins if supported
\item Sets communication clock
\end{DoxyItemize}

Returns\+:
\begin{DoxyItemize}
\item true → Initialization successful
\item false → Initialization failed 
\end{DoxyItemize}

Implemented in \mbox{\hyperlink{classI2C__Interface_ae8147c4d6e54fe2622825d7e17493152}{I2\+C\+\_\+\+Interface}}, and \mbox{\hyperlink{classSPI__Interface_a7235325c5823e1a8880a20686f23c021}{SPI\+\_\+\+Interface}}.

\Hypertarget{classInterface__7Semi_a41d682876fe9f25b928835bb25816a80}\label{classInterface__7Semi_a41d682876fe9f25b928835bb25816a80} 
\index{Interface\_7Semi@{Interface\_7Semi}!beginSPI@{beginSPI}}
\index{beginSPI@{beginSPI}!Interface\_7Semi@{Interface\_7Semi}}
\doxysubsubsection{\texorpdfstring{beginSPI()}{beginSPI()}}
{\footnotesize\ttfamily virtual bool Interface\+\_\+7\+Semi\+::begin\+SPI (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{cs\+\_\+pin,  }\item[{SPIClass \&}]{wire,  }\item[{uint32\+\_\+t}]{speed,  }\item[{uint8\+\_\+t}]{csk = {\ttfamily 255},  }\item[{uint8\+\_\+t}]{miso = {\ttfamily 255},  }\item[{uint8\+\_\+t}]{mosi = {\ttfamily 255} }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}



Implemented in \mbox{\hyperlink{classSPI__Interface_a24b5d68ff8da5578f56ee571d86ab289}{SPI\+\_\+\+Interface}}, and \mbox{\hyperlink{classI2C__Interface_ac8ffcc85b81a8e7e43f1cae80e17e06e}{I2\+C\+\_\+\+Interface}}.

\Hypertarget{classInterface__7Semi_a7e9d62ef33227b06c85288712dc11c59}\label{classInterface__7Semi_a7e9d62ef33227b06c85288712dc11c59} 
\index{Interface\_7Semi@{Interface\_7Semi}!delay\_us@{delay\_us}}
\index{delay\_us@{delay\_us}!Interface\_7Semi@{Interface\_7Semi}}
\doxysubsubsection{\texorpdfstring{delay\_us()}{delay\_us()}}
{\footnotesize\ttfamily static void Interface\+\_\+7\+Semi\+::delay\+\_\+us (\begin{DoxyParamCaption}\item[{uint32\+\_\+t}]{us }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}, {\ttfamily [protected]}}

Delay wrapper 

Definition at line \mbox{\hyperlink{7Semi__Interface_8h_source_l00082}{82}} of file \mbox{\hyperlink{7Semi__Interface_8h_source}{7\+Semi\+\_\+\+Interface.\+h}}.

\Hypertarget{classInterface__7Semi_a8e267174d883544c418ce925f8c55e0f}\label{classInterface__7Semi_a8e267174d883544c418ce925f8c55e0f} 
\index{Interface\_7Semi@{Interface\_7Semi}!read@{read}}
\index{read@{read}!Interface\_7Semi@{Interface\_7Semi}}
\doxysubsubsection{\texorpdfstring{read()}{read()}}
{\footnotesize\ttfamily virtual int8\+\_\+t Interface\+\_\+7\+Semi\+::read (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{reg,  }\item[{uint8\+\_\+t \texorpdfstring{$\ast$}{*}}]{data,  }\item[{uint32\+\_\+t}]{len }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

\doxylink{classInterface__7Semi_a8e267174d883544c418ce925f8c55e0f}{read()}


\begin{DoxyItemize}
\item Reads data from device register
\end{DoxyItemize}

Parameters\+:
\begin{DoxyItemize}
\item reg \+: Register address
\item data \+: Output buffer
\item len \+: Number of bytes
\end{DoxyItemize}

Returns\+:
\begin{DoxyItemize}
\item 0 → Success
\item \texorpdfstring{$<$}{<}0 → Error 
\end{DoxyItemize}

Implemented in \mbox{\hyperlink{classI2C__Interface_ae28f61d8a681f69a81d383f4b9d98fc9}{I2\+C\+\_\+\+Interface}}, and \mbox{\hyperlink{classSPI__Interface_a1f6007b741f717b88dab3bf727897040}{SPI\+\_\+\+Interface}}.

\Hypertarget{classInterface__7Semi_a35047310c257c82ae7f60d143326daa0}\label{classInterface__7Semi_a35047310c257c82ae7f60d143326daa0} 
\index{Interface\_7Semi@{Interface\_7Semi}!write@{write}}
\index{write@{write}!Interface\_7Semi@{Interface\_7Semi}}
\doxysubsubsection{\texorpdfstring{write()}{write()}}
{\footnotesize\ttfamily virtual int8\+\_\+t Interface\+\_\+7\+Semi\+::write (\begin{DoxyParamCaption}\item[{uint8\+\_\+t}]{reg,  }\item[{const uint8\+\_\+t \texorpdfstring{$\ast$}{*}}]{data,  }\item[{uint32\+\_\+t}]{len }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [pure virtual]}}

\doxylink{classInterface__7Semi_a35047310c257c82ae7f60d143326daa0}{write()}


\begin{DoxyItemize}
\item Writes data to device register
\end{DoxyItemize}

Returns\+:
\begin{DoxyItemize}
\item 0 → Success
\item \texorpdfstring{$<$}{<}0 → Error 
\end{DoxyItemize}

Implemented in \mbox{\hyperlink{classI2C__Interface_aa3191e7336ca8b3167f60aeee058a523}{I2\+C\+\_\+\+Interface}}, and \mbox{\hyperlink{classSPI__Interface_ae48d3d857131fc77c0f32c7ed24c28e1}{SPI\+\_\+\+Interface}}.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
src/\mbox{\hyperlink{7Semi__Interface_8h}{7\+Semi\+\_\+\+Interface.\+h}}\end{DoxyCompactItemize}
