\doxysection{include/\+BNO08x\+SH2\+HAL.hpp File Reference}
\hypertarget{_b_n_o08x_s_h2_h_a_l_8hpp}{}\label{_b_n_o08x_s_h2_h_a_l_8hpp}\index{include/BNO08xSH2HAL.hpp@{include/BNO08xSH2HAL.hpp}}
{\ttfamily \#include "{}sh2.\+h"{}}\newline
{\ttfamily \#include "{}sh2\+\_\+\+Sensor\+Value.\+h"{}}\newline
{\ttfamily \#include "{}sh2\+\_\+err.\+h"{}}\newline
{\ttfamily \#include $<$esp\+\_\+log.\+h$>$}\newline
{\ttfamily \#include $<$esp\+\_\+timer.\+h$>$}\newline
{\ttfamily \#include "{}BNO08x\+Private\+Types.\+hpp"{}}\newline
Include dependency graph for BNO08x\+SH2\+HAL.\+hpp\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{_b_n_o08x_s_h2_h_a_l_8hpp__incl}
\end{center}
\end{figure}
This graph shows which files directly or indirectly include this file\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=350pt]{_b_n_o08x_s_h2_h_a_l_8hpp__dep__incl}
\end{center}
\end{figure}
\doxysubsubsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \mbox{\hyperlink{class_b_n_o08x_s_h2_h_a_l}{BNO08x\+SH2\+HAL}}
\begin{DoxyCompactList}\small\item\em Fully static class containing callback implementations for sh2 HAL lib. \end{DoxyCompactList}\end{DoxyCompactItemize}
\doxysubsubsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \mbox{\hyperlink{_b_n_o08x_s_h2_h_a_l_8hpp_ad98f2fa811436866ff297a8288e34f40}{UINT16\+\_\+\+CLR\+\_\+\+MSB}}(val\+\_\+16bit)~((val\+\_\+16bit) \& 0x00\+FFU)
\begin{DoxyCompactList}\small\item\em Clears the most significant byte of a 16-\/bit value. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{_b_n_o08x_s_h2_h_a_l_8hpp_ac89a0ae0c3d3067f02e9fa275521606b}{UINT16\+\_\+\+CLR\+\_\+\+LSB}}(val\+\_\+16bit)~((val\+\_\+16bit) \& 0x\+FF00U)
\begin{DoxyCompactList}\small\item\em Clears the least significant byte of a 16-\/bit value. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{_b_n_o08x_s_h2_h_a_l_8hpp_a7de5c0b84ba545981105e1216925d8e9}{UINT32\+\_\+\+CLR\+\_\+\+BYTE}}(val\+\_\+32bit,  byte2clear)~((val\+\_\+32bit) \& \texorpdfstring{$\sim$}{\string~}(0x\+FFUL $<$$<$ (byte2clear \texorpdfstring{$\ast$}{*} 8UL)))
\begin{DoxyCompactList}\small\item\em Clears a specified byte in a 32-\/bit value. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{_b_n_o08x_s_h2_h_a_l_8hpp_a6f459cc2cce1722c63d22a9556f06bc8}{UINT32\+\_\+\+MSK\+\_\+\+BYTE}}(val\+\_\+32bit,  byte2mask)~((val\+\_\+32bit) \& (0x\+FFUL $<$$<$ (byte2mask \texorpdfstring{$\ast$}{*} 8UL)))
\begin{DoxyCompactList}\small\item\em Masks a specified byte in a 32-\/bit value. \end{DoxyCompactList}\item 
\#define \mbox{\hyperlink{_b_n_o08x_s_h2_h_a_l_8hpp_aaed5b6cbf0d2f27550d1b4a975c46c34}{PARSE\+\_\+\+PACKET\+\_\+\+LENGTH}}(header)~    (\mbox{\hyperlink{_b_n_o08x_s_h2_h_a_l_8hpp_ac89a0ae0c3d3067f02e9fa275521606b}{UINT16\+\_\+\+CLR\+\_\+\+LSB}}(static\+\_\+cast$<$uint16\+\_\+t$>$(header\mbox{[}1\mbox{]}) $<$$<$ 8U) \texorpdfstring{$\vert$}{|} \mbox{\hyperlink{_b_n_o08x_s_h2_h_a_l_8hpp_ad98f2fa811436866ff297a8288e34f40}{UINT16\+\_\+\+CLR\+\_\+\+MSB}}(static\+\_\+cast$<$uint16\+\_\+t$>$(header\mbox{[}0\mbox{]})))
\begin{DoxyCompactList}\small\item\em Parse length from SHTP packet header. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
\begin{DoxyAuthor}{Author}
Myles Parfeniuk 
\end{DoxyAuthor}


\doxysubsection{Macro Definition Documentation}
\Hypertarget{_b_n_o08x_s_h2_h_a_l_8hpp_aaed5b6cbf0d2f27550d1b4a975c46c34}\label{_b_n_o08x_s_h2_h_a_l_8hpp_aaed5b6cbf0d2f27550d1b4a975c46c34} 
\index{BNO08xSH2HAL.hpp@{BNO08xSH2HAL.hpp}!PARSE\_PACKET\_LENGTH@{PARSE\_PACKET\_LENGTH}}
\index{PARSE\_PACKET\_LENGTH@{PARSE\_PACKET\_LENGTH}!BNO08xSH2HAL.hpp@{BNO08xSH2HAL.hpp}}
\doxysubsubsection{\texorpdfstring{PARSE\_PACKET\_LENGTH}{PARSE\_PACKET\_LENGTH}}
{\footnotesize\ttfamily \#define PARSE\+\_\+\+PACKET\+\_\+\+LENGTH(\begin{DoxyParamCaption}\item[{}]{header }\end{DoxyParamCaption})~    (\mbox{\hyperlink{_b_n_o08x_s_h2_h_a_l_8hpp_ac89a0ae0c3d3067f02e9fa275521606b}{UINT16\+\_\+\+CLR\+\_\+\+LSB}}(static\+\_\+cast$<$uint16\+\_\+t$>$(header\mbox{[}1\mbox{]}) $<$$<$ 8U) \texorpdfstring{$\vert$}{|} \mbox{\hyperlink{_b_n_o08x_s_h2_h_a_l_8hpp_ad98f2fa811436866ff297a8288e34f40}{UINT16\+\_\+\+CLR\+\_\+\+MSB}}(static\+\_\+cast$<$uint16\+\_\+t$>$(header\mbox{[}0\mbox{]})))}



Parse length from SHTP packet header. 


\begin{DoxyParams}{Parameters}
{\em packet} & Pointer to bno08x\+\_\+rx\+\_\+packet\+\_\+t containing data. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Length of SHTP packet. 
\end{DoxyReturn}
\Hypertarget{_b_n_o08x_s_h2_h_a_l_8hpp_ac89a0ae0c3d3067f02e9fa275521606b}\label{_b_n_o08x_s_h2_h_a_l_8hpp_ac89a0ae0c3d3067f02e9fa275521606b} 
\index{BNO08xSH2HAL.hpp@{BNO08xSH2HAL.hpp}!UINT16\_CLR\_LSB@{UINT16\_CLR\_LSB}}
\index{UINT16\_CLR\_LSB@{UINT16\_CLR\_LSB}!BNO08xSH2HAL.hpp@{BNO08xSH2HAL.hpp}}
\doxysubsubsection{\texorpdfstring{UINT16\_CLR\_LSB}{UINT16\_CLR\_LSB}}
{\footnotesize\ttfamily \#define UINT16\+\_\+\+CLR\+\_\+\+LSB(\begin{DoxyParamCaption}\item[{}]{val\+\_\+16bit }\end{DoxyParamCaption})~((val\+\_\+16bit) \& 0x\+FF00U)}



Clears the least significant byte of a 16-\/bit value. 


\begin{DoxyParams}{Parameters}
{\em val\+\_\+16bit} & The 16-\/bit value to modify. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The value with the MSB cleared. 
\end{DoxyReturn}
\Hypertarget{_b_n_o08x_s_h2_h_a_l_8hpp_ad98f2fa811436866ff297a8288e34f40}\label{_b_n_o08x_s_h2_h_a_l_8hpp_ad98f2fa811436866ff297a8288e34f40} 
\index{BNO08xSH2HAL.hpp@{BNO08xSH2HAL.hpp}!UINT16\_CLR\_MSB@{UINT16\_CLR\_MSB}}
\index{UINT16\_CLR\_MSB@{UINT16\_CLR\_MSB}!BNO08xSH2HAL.hpp@{BNO08xSH2HAL.hpp}}
\doxysubsubsection{\texorpdfstring{UINT16\_CLR\_MSB}{UINT16\_CLR\_MSB}}
{\footnotesize\ttfamily \#define UINT16\+\_\+\+CLR\+\_\+\+MSB(\begin{DoxyParamCaption}\item[{}]{val\+\_\+16bit }\end{DoxyParamCaption})~((val\+\_\+16bit) \& 0x00\+FFU)}



Clears the most significant byte of a 16-\/bit value. 


\begin{DoxyParams}{Parameters}
{\em val\+\_\+16bit} & The 16-\/bit value to modify. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The value with the MSB cleared. 
\end{DoxyReturn}
\Hypertarget{_b_n_o08x_s_h2_h_a_l_8hpp_a7de5c0b84ba545981105e1216925d8e9}\label{_b_n_o08x_s_h2_h_a_l_8hpp_a7de5c0b84ba545981105e1216925d8e9} 
\index{BNO08xSH2HAL.hpp@{BNO08xSH2HAL.hpp}!UINT32\_CLR\_BYTE@{UINT32\_CLR\_BYTE}}
\index{UINT32\_CLR\_BYTE@{UINT32\_CLR\_BYTE}!BNO08xSH2HAL.hpp@{BNO08xSH2HAL.hpp}}
\doxysubsubsection{\texorpdfstring{UINT32\_CLR\_BYTE}{UINT32\_CLR\_BYTE}}
{\footnotesize\ttfamily \#define UINT32\+\_\+\+CLR\+\_\+\+BYTE(\begin{DoxyParamCaption}\item[{}]{val\+\_\+32bit,  }\item[{}]{byte2clear }\end{DoxyParamCaption})~((val\+\_\+32bit) \& \texorpdfstring{$\sim$}{\string~}(0x\+FFUL $<$$<$ (byte2clear \texorpdfstring{$\ast$}{*} 8UL)))}



Clears a specified byte in a 32-\/bit value. 


\begin{DoxyParams}{Parameters}
{\em val\+\_\+32bit} & The 32-\/bit value to modify. \\
\hline
{\em byte2clear} & The byte index to clear (0 = LSB, 3 = MSB). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The value with the specified byte cleared. 
\end{DoxyReturn}
\Hypertarget{_b_n_o08x_s_h2_h_a_l_8hpp_a6f459cc2cce1722c63d22a9556f06bc8}\label{_b_n_o08x_s_h2_h_a_l_8hpp_a6f459cc2cce1722c63d22a9556f06bc8} 
\index{BNO08xSH2HAL.hpp@{BNO08xSH2HAL.hpp}!UINT32\_MSK\_BYTE@{UINT32\_MSK\_BYTE}}
\index{UINT32\_MSK\_BYTE@{UINT32\_MSK\_BYTE}!BNO08xSH2HAL.hpp@{BNO08xSH2HAL.hpp}}
\doxysubsubsection{\texorpdfstring{UINT32\_MSK\_BYTE}{UINT32\_MSK\_BYTE}}
{\footnotesize\ttfamily \#define UINT32\+\_\+\+MSK\+\_\+\+BYTE(\begin{DoxyParamCaption}\item[{}]{val\+\_\+32bit,  }\item[{}]{byte2mask }\end{DoxyParamCaption})~((val\+\_\+32bit) \& (0x\+FFUL $<$$<$ (byte2mask \texorpdfstring{$\ast$}{*} 8UL)))}



Masks a specified byte in a 32-\/bit value. 


\begin{DoxyParams}{Parameters}
{\em val\+\_\+32bit} & The 32-\/bit value to modify. \\
\hline
{\em byte2mask} & The byte index to mask (0 = LSB, 3 = MSB). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The value with the specified byte masked. 
\end{DoxyReturn}
