\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$}{*} \doxymbox{\hyperlink{structicm__plat__t_a5bdf6aab09ac76687060aab3f429177c}{read}} )(uint8\+\_\+t reg, uint8\+\_\+t \texorpdfstring{$\ast$}{*}buf, size\+\_\+t len, void \texorpdfstring{$\ast$}{*}\doxymbox{\hyperlink{structicm__plat__t_aa568650352ead6ca41379e9468dbd204}{user}})
\item 
int(\texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{structicm__plat__t_a9df1e04508e6883fa346566871d0db8c}{write}} )(uint8\+\_\+t reg, const uint8\+\_\+t \texorpdfstring{$\ast$}{*}buf, size\+\_\+t len, void \texorpdfstring{$\ast$}{*}\doxymbox{\hyperlink{structicm__plat__t_aa568650352ead6ca41379e9468dbd204}{user}})
\item 
uint8\+\_\+t(\texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{structicm__plat__t_aa062ed0b3b8deab83c3eec08852eb1b0}{spi\+\_\+reg\+\_\+rw\+\_\+bits}} )(uint8\+\_\+t reg, int is\+\_\+write)
\item 
void(\texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{structicm__plat__t_a007afe99d158d09cfd11bccc56e60cf9}{delay\+\_\+ms}} )(uint32\+\_\+t ms)
\item 
void \texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{structicm__plat__t_aa568650352ead6ca41379e9468dbd204}{user}}
\item 
void(\texorpdfstring{$\ast$}{*} \doxymbox{\hyperlink{structicm__plat__t_a26ca1c8442adbe5b2cf19163c8b77a49}{spi\+\_\+cs}} )(int level, void \texorpdfstring{$\ast$}{*}\doxymbox{\hyperlink{structicm__plat__t_aa568650352ead6ca41379e9468dbd204}{user}})
\item 
uint8\+\_\+t \doxymbox{\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 \doxymbox{\hyperlink{ICM20948__platform_8h_source_l00013}{13}} of file \doxymbox{\hyperlink{ICM20948__platform_8h_source}{ICM20948\+\_\+platform.\+h}}.



\label{structicm__plat__t_doc-variable-members}
\Hypertarget{structicm__plat__t_doc-variable-members}
\doxysubsection{Member Data Documentation}
\Hypertarget{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 \label{structicm__plat__t_a007afe99d158d09cfd11bccc56e60cf9} 
void(\texorpdfstring{$\ast$}{*} icm\+\_\+plat\+\_\+t::\+delay\+\_\+ms) (uint32\+\_\+t ms)}


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

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

\Hypertarget{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 \label{structicm__plat__t_a4c7b153cd772538a1e63ade3e8b792e6} 
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 \doxymbox{\hyperlink{ICM20948__platform_8h_source_l00045}{45}} of file \doxymbox{\hyperlink{ICM20948__platform_8h_source}{ICM20948\+\_\+platform.\+h}}.

\Hypertarget{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 \label{structicm__plat__t_a5bdf6aab09ac76687060aab3f429177c} 
int(\texorpdfstring{$\ast$}{*} icm\+\_\+plat\+\_\+t::\+read) (uint8\+\_\+t reg, uint8\+\_\+t \texorpdfstring{$\ast$}{*}buf, size\+\_\+t len, void \texorpdfstring{$\ast$}{*}\doxymbox{\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 \doxymbox{\hyperlink{ICM20948__platform_8h_source_l00018}{18}} of file \doxymbox{\hyperlink{ICM20948__platform_8h_source}{ICM20948\+\_\+platform.\+h}}.

\Hypertarget{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 \label{structicm__plat__t_a26ca1c8442adbe5b2cf19163c8b77a49} 
void(\texorpdfstring{$\ast$}{*} icm\+\_\+plat\+\_\+t::\+spi\+\_\+cs) (int level, void \texorpdfstring{$\ast$}{*}\doxymbox{\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 \doxymbox{\hyperlink{ICM20948__platform_8h_source_l00041}{41}} of file \doxymbox{\hyperlink{ICM20948__platform_8h_source}{ICM20948\+\_\+platform.\+h}}.

\Hypertarget{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 \label{structicm__plat__t_aa062ed0b3b8deab83c3eec08852eb1b0} 
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 \doxymbox{\hyperlink{ICM20948__platform_8h_source_l00028}{28}} of file \doxymbox{\hyperlink{ICM20948__platform_8h_source}{ICM20948\+\_\+platform.\+h}}.

\Hypertarget{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 \label{structicm__plat__t_aa568650352ead6ca41379e9468dbd204} 
void\texorpdfstring{$\ast$}{*} icm\+\_\+plat\+\_\+t::\+user}


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

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

\Hypertarget{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 \label{structicm__plat__t_a9df1e04508e6883fa346566871d0db8c} 
int(\texorpdfstring{$\ast$}{*} icm\+\_\+plat\+\_\+t::\+write) (uint8\+\_\+t reg, const uint8\+\_\+t \texorpdfstring{$\ast$}{*}buf, size\+\_\+t len, void \texorpdfstring{$\ast$}{*}\doxymbox{\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 \doxymbox{\hyperlink{ICM20948__platform_8h_source_l00023}{23}} of file \doxymbox{\hyperlink{ICM20948__platform_8h_source}{ICM20948\+\_\+platform.\+h}}.



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