\doxysection{icm\+\_\+plat\+\_\+t Struct Reference}
\hypertarget{structicm__plat__t}{}\label{structicm__plat__t}\index{icm\_plat\_t@{icm\_plat\_t}}


{\ttfamily \#include $<$ICM20948\+\_\+platform.\+h$>$}

\doxysubsubsection*{Public Attributes}
\begin{DoxyCompactItemize}
\item 
int(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{structicm__plat__t_a5bdf6aab09ac76687060aab3f429177c}{read}} )(uint8\+\_\+t reg, uint8\+\_\+t \texorpdfstring{$\ast$}{*}buf, size\+\_\+t len, void \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structicm__plat__t_aa568650352ead6ca41379e9468dbd204}{user}})
\item 
int(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{structicm__plat__t_a9df1e04508e6883fa346566871d0db8c}{write}} )(uint8\+\_\+t reg, const uint8\+\_\+t \texorpdfstring{$\ast$}{*}buf, size\+\_\+t len, void \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structicm__plat__t_aa568650352ead6ca41379e9468dbd204}{user}})
\item 
uint8\+\_\+t(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{structicm__plat__t_aa062ed0b3b8deab83c3eec08852eb1b0}{spi\+\_\+reg\+\_\+rw\+\_\+bits}} )(uint8\+\_\+t reg, int is\+\_\+write)
\item 
void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{structicm__plat__t_a007afe99d158d09cfd11bccc56e60cf9}{delay\+\_\+ms}} )(uint32\+\_\+t ms)
\item 
void \texorpdfstring{$\ast$}{*} \mbox{\hyperlink{structicm__plat__t_aa568650352ead6ca41379e9468dbd204}{user}}
\item 
void(\texorpdfstring{$\ast$}{*} \mbox{\hyperlink{structicm__plat__t_a26ca1c8442adbe5b2cf19163c8b77a49}{spi\+\_\+cs}} )(int level, void \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structicm__plat__t_aa568650352ead6ca41379e9468dbd204}{user}})
\item 
uint8\+\_\+t \mbox{\hyperlink{structicm__plat__t_a4c7b153cd772538a1e63ade3e8b792e6}{i2c\+\_\+addr}}
\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
7Semi comment style
\begin{DoxyItemize}
\item Platform glue for bus IO, delays, and timing
\item Implement these for your system (I2C or SPI) 
\end{DoxyItemize}

Definition at line \mbox{\hyperlink{ICM20948__platform_8h_source_l00013}{13}} of file \mbox{\hyperlink{ICM20948__platform_8h_source}{ICM20948\+\_\+platform.\+h}}.



\doxysubsection{Member Data Documentation}
\Hypertarget{structicm__plat__t_a007afe99d158d09cfd11bccc56e60cf9}\label{structicm__plat__t_a007afe99d158d09cfd11bccc56e60cf9} 
\index{icm\_plat\_t@{icm\_plat\_t}!delay\_ms@{delay\_ms}}
\index{delay\_ms@{delay\_ms}!icm\_plat\_t@{icm\_plat\_t}}
\doxysubsubsection{\texorpdfstring{delay\_ms}{delay\_ms}}
{\footnotesize\ttfamily void(\texorpdfstring{$\ast$}{*} icm\+\_\+plat\+\_\+t\+::delay\+\_\+ms) (uint32\+\_\+t ms)}


\begin{DoxyItemize}
\item Millisecond delay 
\end{DoxyItemize}

Definition at line \mbox{\hyperlink{ICM20948__platform_8h_source_l00032}{32}} of file \mbox{\hyperlink{ICM20948__platform_8h_source}{ICM20948\+\_\+platform.\+h}}.

\Hypertarget{structicm__plat__t_a4c7b153cd772538a1e63ade3e8b792e6}\label{structicm__plat__t_a4c7b153cd772538a1e63ade3e8b792e6} 
\index{icm\_plat\_t@{icm\_plat\_t}!i2c\_addr@{i2c\_addr}}
\index{i2c\_addr@{i2c\_addr}!icm\_plat\_t@{icm\_plat\_t}}
\doxysubsubsection{\texorpdfstring{i2c\_addr}{i2c\_addr}}
{\footnotesize\ttfamily uint8\+\_\+t icm\+\_\+plat\+\_\+t\+::i2c\+\_\+addr}


\begin{DoxyItemize}
\item Device address (I2C) or ignored for SPI if you wrap inside user 
\end{DoxyItemize}

Definition at line \mbox{\hyperlink{ICM20948__platform_8h_source_l00045}{45}} of file \mbox{\hyperlink{ICM20948__platform_8h_source}{ICM20948\+\_\+platform.\+h}}.

\Hypertarget{structicm__plat__t_a5bdf6aab09ac76687060aab3f429177c}\label{structicm__plat__t_a5bdf6aab09ac76687060aab3f429177c} 
\index{icm\_plat\_t@{icm\_plat\_t}!read@{read}}
\index{read@{read}!icm\_plat\_t@{icm\_plat\_t}}
\doxysubsubsection{\texorpdfstring{read}{read}}
{\footnotesize\ttfamily int(\texorpdfstring{$\ast$}{*} icm\+\_\+plat\+\_\+t\+::read) (uint8\+\_\+t reg, uint8\+\_\+t \texorpdfstring{$\ast$}{*}buf, size\+\_\+t len, void \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structicm__plat__t_aa568650352ead6ca41379e9468dbd204}{user}})}


\begin{DoxyItemize}
\item Bus read\+: read {\ttfamily len} bytes from {\ttfamily reg} into {\ttfamily buf}
\item Return 0 on success, nonzero on error 
\end{DoxyItemize}

Definition at line \mbox{\hyperlink{ICM20948__platform_8h_source_l00018}{18}} of file \mbox{\hyperlink{ICM20948__platform_8h_source}{ICM20948\+\_\+platform.\+h}}.

\Hypertarget{structicm__plat__t_a26ca1c8442adbe5b2cf19163c8b77a49}\label{structicm__plat__t_a26ca1c8442adbe5b2cf19163c8b77a49} 
\index{icm\_plat\_t@{icm\_plat\_t}!spi\_cs@{spi\_cs}}
\index{spi\_cs@{spi\_cs}!icm\_plat\_t@{icm\_plat\_t}}
\doxysubsubsection{\texorpdfstring{spi\_cs}{spi\_cs}}
{\footnotesize\ttfamily void(\texorpdfstring{$\ast$}{*} icm\+\_\+plat\+\_\+t\+::spi\+\_\+cs) (int level, void \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structicm__plat__t_aa568650352ead6ca41379e9468dbd204}{user}})}


\begin{DoxyItemize}
\item If using SPI\+: set chip select active (1) or inactive (0)
\item For I2C\+: leave as NULL 
\end{DoxyItemize}

Definition at line \mbox{\hyperlink{ICM20948__platform_8h_source_l00041}{41}} of file \mbox{\hyperlink{ICM20948__platform_8h_source}{ICM20948\+\_\+platform.\+h}}.

\Hypertarget{structicm__plat__t_aa062ed0b3b8deab83c3eec08852eb1b0}\label{structicm__plat__t_aa062ed0b3b8deab83c3eec08852eb1b0} 
\index{icm\_plat\_t@{icm\_plat\_t}!spi\_reg\_rw\_bits@{spi\_reg\_rw\_bits}}
\index{spi\_reg\_rw\_bits@{spi\_reg\_rw\_bits}!icm\_plat\_t@{icm\_plat\_t}}
\doxysubsubsection{\texorpdfstring{spi\_reg\_rw\_bits}{spi\_reg\_rw\_bits}}
{\footnotesize\ttfamily uint8\+\_\+t(\texorpdfstring{$\ast$}{*} icm\+\_\+plat\+\_\+t\+::spi\+\_\+reg\+\_\+rw\+\_\+bits) (uint8\+\_\+t reg, int is\+\_\+write)}


\begin{DoxyItemize}
\item Optional\+: SPI transfers may need register R/W bit mangling
\item For I2C, leave as NULL 
\end{DoxyItemize}

Definition at line \mbox{\hyperlink{ICM20948__platform_8h_source_l00028}{28}} of file \mbox{\hyperlink{ICM20948__platform_8h_source}{ICM20948\+\_\+platform.\+h}}.

\Hypertarget{structicm__plat__t_aa568650352ead6ca41379e9468dbd204}\label{structicm__plat__t_aa568650352ead6ca41379e9468dbd204} 
\index{icm\_plat\_t@{icm\_plat\_t}!user@{user}}
\index{user@{user}!icm\_plat\_t@{icm\_plat\_t}}
\doxysubsubsection{\texorpdfstring{user}{user}}
{\footnotesize\ttfamily void\texorpdfstring{$\ast$}{*} icm\+\_\+plat\+\_\+t\+::user}


\begin{DoxyItemize}
\item User context pointer passed to read/write 
\end{DoxyItemize}

Definition at line \mbox{\hyperlink{ICM20948__platform_8h_source_l00036}{36}} of file \mbox{\hyperlink{ICM20948__platform_8h_source}{ICM20948\+\_\+platform.\+h}}.

\Hypertarget{structicm__plat__t_a9df1e04508e6883fa346566871d0db8c}\label{structicm__plat__t_a9df1e04508e6883fa346566871d0db8c} 
\index{icm\_plat\_t@{icm\_plat\_t}!write@{write}}
\index{write@{write}!icm\_plat\_t@{icm\_plat\_t}}
\doxysubsubsection{\texorpdfstring{write}{write}}
{\footnotesize\ttfamily int(\texorpdfstring{$\ast$}{*} icm\+\_\+plat\+\_\+t\+::write) (uint8\+\_\+t reg, const uint8\+\_\+t \texorpdfstring{$\ast$}{*}buf, size\+\_\+t len, void \texorpdfstring{$\ast$}{*}\mbox{\hyperlink{structicm__plat__t_aa568650352ead6ca41379e9468dbd204}{user}})}


\begin{DoxyItemize}
\item Bus write\+: write {\ttfamily len} bytes from {\ttfamily buf} to {\ttfamily reg}
\item Return 0 on success, nonzero on error 
\end{DoxyItemize}

Definition at line \mbox{\hyperlink{ICM20948__platform_8h_source_l00023}{23}} of file \mbox{\hyperlink{ICM20948__platform_8h_source}{ICM20948\+\_\+platform.\+h}}.



The documentation for this struct was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
src/\mbox{\hyperlink{ICM20948__platform_8h}{ICM20948\+\_\+platform.\+h}}\end{DoxyCompactItemize}
