2022-11-08 01:47:39 +08:00
\hypertarget { mpu6050_ 8cpp} { } \doxysection { D\+ :/gitt/\+ Microchip\+ For32/bscpp\+ \_ \+ \+ Device/bscpp\+ \_ \+ \+ MPU6050/mpu6050.cpp 文件参考}
\label { mpu6050_ 8cpp} \index { D:/gitt/MicrochipFor32/bscpp\_ Device/bscpp\_ MPU6050/mpu6050.cpp@{ D:/gitt/MicrochipFor32/bscpp\_ Device/bscpp\_ MPU6050/mpu6050.cpp} }
{ \ttfamily \# include \char `\" { } bscpp\+ \_ \+ \+ IIC\+ \_ \+ \+ STM32.\+ h\char `\" { } } \newline
{ \ttfamily \# include \char `\" { } mpu6050.\+ h\char `\" { } } \newline
2022-11-10 03:34:52 +08:00
mpu6050.\+ cpp 的引用(Include)关系图\+ :\nopagebreak
2022-11-08 01:47:39 +08:00
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=350pt] { mpu6050_ 8cpp_ _ incl}
\end { center}
\end { figure}
\doxysubsection * { 宏定义}
\begin { DoxyCompactItemize}
\item
\# define \mbox { \hyperlink { mpu6050_ 8cpp_ ae7d7fd8356f1a04698bf36a2ff087f7b} { delay\+ \_ \+ ms} } (var)~HAL\+ \_ \+ \+ Delay(var)
\end { DoxyCompactItemize}
\doxysubsection * { 函数}
\begin { DoxyCompactItemize}
\item
\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } \mbox { \hyperlink { mpu6050_ 8cpp_ ab1f8c6111d59b60a2edb4ee3e8aa3113} { MPU\+ \_ \+ \+ Init} } (void)
\begin { DoxyCompactList} \small \item \em 初始化\+ MPU6050 \end { DoxyCompactList} \item
\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } \mbox { \hyperlink { mpu6050_ 8cpp_ aa27cc30326ce4980b289a0e1c3f76b5e} { MPU\+ \_ \+ \+ Set\+ \_ \+ \+ Gyro\+ \_ \+ \+ Fsr} } (\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } fsr)
\begin { DoxyCompactList} \small \item \em 设置\+ MPU6050陀螺仪传感器满量程范围 \end { DoxyCompactList} \item
\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } \mbox { \hyperlink { mpu6050_ 8cpp_ a6c391137bc5880c3b5e15e84c5a3380f} { MPU\+ \_ \+ \+ Set\+ \_ \+ \+ Accel\+ \_ \+ \+ Fsr} } (\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } fsr)
\begin { DoxyCompactList} \small \item \em 设置\+ MPU6050加速度传感器满量程范围 \end { DoxyCompactList} \item
\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } \mbox { \hyperlink { mpu6050_ 8cpp_ a2fb9973c9f5ea5327649d0eef5e96217} { MPU\+ \_ \+ \+ Set\+ \_ \+ \+ LPF} } (\mbox { \hyperlink { varint_ 8h_ ace9d960e74685e2cd84b36132dbbf8aa} { u16} } lpf)
\begin { DoxyCompactList} \small \item \em 设置\+ MPU6050的数字低通滤波器 \end { DoxyCompactList} \item
\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } \mbox { \hyperlink { mpu6050_ 8cpp_ a04e58232ce838e94d54aa2b53287cb41} { MPU\+ \_ \+ \+ Set\+ \_ \+ \+ Rate} } (\mbox { \hyperlink { varint_ 8h_ ace9d960e74685e2cd84b36132dbbf8aa} { u16} } rate)
\begin { DoxyCompactList} \small \item \em 设置\+ MPU6050的采样率(假定\+ Fs=1KHz) \end { DoxyCompactList} \item
short \mbox { \hyperlink { mpu6050_ 8cpp_ a41eaf87c26b1281d9d5fc6a06abcf2a8} { MPU\+ \_ \+ \+ Get\+ \_ \+ \+ Temperature} } (void)
\begin { DoxyCompactList} \small \item \em 得到温度值 \end { DoxyCompactList} \item
\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } \mbox { \hyperlink { mpu6050_ 8cpp_ a8f28105f9dcccc709b78d7d0ce497633} { MPU\+ \_ \+ \+ Get\+ \_ \+ \+ Gyroscope} } (short $ \ast $ gx, short $ \ast $ gy, short $ \ast $ gz)
\begin { DoxyCompactList} \small \item \em 得到陀螺仪值(原始值) \end { DoxyCompactList} \item
\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } \mbox { \hyperlink { mpu6050_ 8cpp_ a2a0a02f6d7c597828a0cc282c76e99e3} { MPU\+ \_ \+ \+ Get\+ \_ \+ \+ Accelerometer} } (short $ \ast $ ax, short $ \ast $ ay, short $ \ast $ az)
\begin { DoxyCompactList} \small \item \em 得到加速度值(原始值) \end { DoxyCompactList} \item
\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } \mbox { \hyperlink { mpu6050_ 8cpp_ a59b1c26b234be88e97435a1b3c061330} { MPU\+ \_ \+ \+ Write\+ \_ \+ \+ Len} } (\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } addr, \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } \mbox { \hyperlink { group_ _ _ d_ r_ i_ v_ e_ r_ s_ ga5448c351fc95ff052b110eee80e5f75c} { reg} } , \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } len, \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } $ \ast $ buf)
\begin { DoxyCompactList} \small \item \em IIC连续写 \end { DoxyCompactList} \item
\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } \mbox { \hyperlink { mpu6050_ 8cpp_ a63161fa966899e4e7c5791e40ebf2b0a} { MPU\+ \_ \+ \+ Read\+ \_ \+ \+ Len} } (\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } addr, \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } \mbox { \hyperlink { group_ _ _ d_ r_ i_ v_ e_ r_ s_ ga5448c351fc95ff052b110eee80e5f75c} { reg} } , \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } len, \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } $ \ast $ buf)
\begin { DoxyCompactList} \small \item \em IIC连续读 \end { DoxyCompactList} \item
\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } \mbox { \hyperlink { mpu6050_ 8cpp_ a0be9b422bb8613f8444db4af5234e1a1} { MPU\+ \_ \+ \+ Write\+ \_ \+ \+ Byte} } (\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } \mbox { \hyperlink { group_ _ _ d_ r_ i_ v_ e_ r_ s_ ga5448c351fc95ff052b110eee80e5f75c} { reg} } , \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } data)
\begin { DoxyCompactList} \small \item \em IIC写一个字节 \end { DoxyCompactList} \item
\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } \mbox { \hyperlink { mpu6050_ 8cpp_ a17c11d19a2bb21d61610f08cb2cbe2f7} { MPU\+ \_ \+ \+ Read\+ \_ \+ \+ Byte} } (\mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } \mbox { \hyperlink { group_ _ _ d_ r_ i_ v_ e_ r_ s_ ga5448c351fc95ff052b110eee80e5f75c} { reg} } )
\begin { DoxyCompactList} \small \item \em IIC读一个字节 \end { DoxyCompactList} \end { DoxyCompactItemize}
\doxysubsection * { 变量}
\begin { DoxyCompactItemize}
\item
\mbox { \hyperlink { classbscpp_ _ _ i_ i_ c_ _ _ s_ t_ m32} { bscpp\+ \_ \+ \+ IIC\+ \_ \+ \+ STM32} } \mbox { \hyperlink { mpu6050_ 8cpp_ a604895d6ae2b01114260172650252fce} { mpu6050\+ IIC} } (IIC\+ \_ \+ \+ SCK\+ \_ \+ \+ GPIO\+ \_ \+ \+ Port, IIC\+ \_ \+ \+ SCK\+ \_ \+ \+ Pin, IIC\+ \_ \+ \+ SDA\+ \_ \+ \+ GPIO\+ \_ \+ \+ Port, IIC\+ \_ \+ \+ SDA\+ \_ \+ \+ Pin)
\end { DoxyCompactItemize}
\doxysubsection { 宏定义说明}
\mbox { \Hypertarget { mpu6050_ 8cpp_ ae7d7fd8356f1a04698bf36a2ff087f7b} \label { mpu6050_ 8cpp_ ae7d7fd8356f1a04698bf36a2ff087f7b} }
\index { mpu6050.cpp@{ mpu6050.cpp} !delay\_ ms@{ delay\_ ms} }
\index { delay\_ ms@{ delay\_ ms} !mpu6050.cpp@{ mpu6050.cpp} }
\doxysubsubsection { \texorpdfstring { delay\_ ms} { delay\_ ms} }
{ \footnotesize \ttfamily \# define delay\+ \_ \+ ms(\begin { DoxyParamCaption} \item [{}] { var } \end { DoxyParamCaption} )~HAL\+ \_ \+ \+ Delay(var)}
在文件 \mbox { \hyperlink { mpu6050_ 8cpp_ source} { mpu6050.\+ cpp} } 第 \mbox { \hyperlink { mpu6050_ 8cpp_ source_ l00016} { 16} } 行定义.
\doxysubsection { 函数说明}
\mbox { \Hypertarget { mpu6050_ 8cpp_ a2a0a02f6d7c597828a0cc282c76e99e3} \label { mpu6050_ 8cpp_ a2a0a02f6d7c597828a0cc282c76e99e3} }
\index { mpu6050.cpp@{ mpu6050.cpp} !MPU\_ Get\_ Accelerometer@{ MPU\_ Get\_ Accelerometer} }
\index { MPU\_ Get\_ Accelerometer@{ MPU\_ Get\_ Accelerometer} !mpu6050.cpp@{ mpu6050.cpp} }
\doxysubsubsection { \texorpdfstring { MPU\_ Get\_ Accelerometer()} { MPU\_ Get\_ Accelerometer()} }
{ \footnotesize \ttfamily \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } MPU\+ \_ \+ \+ Get\+ \_ \+ \+ Accelerometer (\begin { DoxyParamCaption} \item [{short $\ast$}] { ax, } \item [{short $\ast$}] { ay, } \item [{short $\ast$}] { az } \end { DoxyParamCaption} )}
得到加速度值(原始值)
\begin { DoxyParams} { 参数}
{ \em ax} & 陀螺仪a轴的原始读数(带符号) \\
\hline
{ \em ay} & 陀螺仪a轴的原始读数(带符号) \\
\hline
{ \em ax} & 陀螺仪a轴的原始读数(带符号) \\
\hline
\end { DoxyParams}
\begin { DoxyReturn} { 返回}
0,设置成功
\end { DoxyReturn}
在文件 \mbox { \hyperlink { mpu6050_ 8cpp_ source} { mpu6050.\+ cpp} } 第 \mbox { \hyperlink { mpu6050_ 8cpp_ source_ l00137} { 137} } 行定义.
函数调用图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=350pt] { mpu6050_ 8cpp_ a2a0a02f6d7c597828a0cc282c76e99e3_ cgraph}
\end { center}
\end { figure}
\mbox { \Hypertarget { mpu6050_ 8cpp_ a8f28105f9dcccc709b78d7d0ce497633} \label { mpu6050_ 8cpp_ a8f28105f9dcccc709b78d7d0ce497633} }
\index { mpu6050.cpp@{ mpu6050.cpp} !MPU\_ Get\_ Gyroscope@{ MPU\_ Get\_ Gyroscope} }
\index { MPU\_ Get\_ Gyroscope@{ MPU\_ Get\_ Gyroscope} !mpu6050.cpp@{ mpu6050.cpp} }
\doxysubsubsection { \texorpdfstring { MPU\_ Get\_ Gyroscope()} { MPU\_ Get\_ Gyroscope()} }
{ \footnotesize \ttfamily \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } MPU\+ \_ \+ \+ Get\+ \_ \+ \+ Gyroscope (\begin { DoxyParamCaption} \item [{short $\ast$}] { gx, } \item [{short $\ast$}] { gy, } \item [{short $\ast$}] { gz } \end { DoxyParamCaption} )}
得到陀螺仪值(原始值)
\begin { DoxyParams} { 参数}
{ \em gx} & 陀螺仪x轴的原始读数(带符号) \\
\hline
{ \em gy} & 陀螺仪y轴的原始读数(带符号) \\
\hline
{ \em gx} & 陀螺仪z轴的原始读数(带符号) \\
\hline
\end { DoxyParams}
\begin { DoxyReturn} { 返回}
0,设置成功
\end { DoxyReturn}
在文件 \mbox { \hyperlink { mpu6050_ 8cpp_ source} { mpu6050.\+ cpp} } 第 \mbox { \hyperlink { mpu6050_ 8cpp_ source_ l00121} { 121} } 行定义.
函数调用图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=350pt] { mpu6050_ 8cpp_ a8f28105f9dcccc709b78d7d0ce497633_ cgraph}
\end { center}
\end { figure}
\mbox { \Hypertarget { mpu6050_ 8cpp_ a41eaf87c26b1281d9d5fc6a06abcf2a8} \label { mpu6050_ 8cpp_ a41eaf87c26b1281d9d5fc6a06abcf2a8} }
\index { mpu6050.cpp@{ mpu6050.cpp} !MPU\_ Get\_ Temperature@{ MPU\_ Get\_ Temperature} }
\index { MPU\_ Get\_ Temperature@{ MPU\_ Get\_ Temperature} !mpu6050.cpp@{ mpu6050.cpp} }
\doxysubsubsection { \texorpdfstring { MPU\_ Get\_ Temperature()} { MPU\_ Get\_ Temperature()} }
{ \footnotesize \ttfamily short MPU\+ \_ \+ \+ Get\+ \_ \+ \+ Temperature (\begin { DoxyParamCaption} \item [{void}] { } \end { DoxyParamCaption} )}
得到温度值
\begin { DoxyReturn} { 返回}
温度值(扩大了100倍)
\end { DoxyReturn}
在文件 \mbox { \hyperlink { mpu6050_ 8cpp_ source} { mpu6050.\+ cpp} } 第 \mbox { \hyperlink { mpu6050_ 8cpp_ source_ l00105} { 105} } 行定义.
函数调用图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=350pt] { mpu6050_ 8cpp_ a41eaf87c26b1281d9d5fc6a06abcf2a8_ cgraph}
\end { center}
\end { figure}
\mbox { \Hypertarget { mpu6050_ 8cpp_ ab1f8c6111d59b60a2edb4ee3e8aa3113} \label { mpu6050_ 8cpp_ ab1f8c6111d59b60a2edb4ee3e8aa3113} }
\index { mpu6050.cpp@{ mpu6050.cpp} !MPU\_ Init@{ MPU\_ Init} }
\index { MPU\_ Init@{ MPU\_ Init} !mpu6050.cpp@{ mpu6050.cpp} }
\doxysubsubsection { \texorpdfstring { MPU\_ Init()} { MPU\_ Init()} }
{ \footnotesize \ttfamily \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } MPU\+ \_ \+ \+ Init (\begin { DoxyParamCaption} \item [{void}] { } \end { DoxyParamCaption} )}
初始化\+ MPU6050
\begin { DoxyReturn} { 返回}
0,成功
\end { DoxyReturn}
在文件 \mbox { \hyperlink { mpu6050_ 8cpp_ source} { mpu6050.\+ cpp} } 第 \mbox { \hyperlink { mpu6050_ 8cpp_ source_ l00025} { 25} } 行定义.
函数调用图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=350pt] { mpu6050_ 8cpp_ ab1f8c6111d59b60a2edb4ee3e8aa3113_ cgraph}
\end { center}
\end { figure}
\mbox { \Hypertarget { mpu6050_ 8cpp_ a17c11d19a2bb21d61610f08cb2cbe2f7} \label { mpu6050_ 8cpp_ a17c11d19a2bb21d61610f08cb2cbe2f7} }
\index { mpu6050.cpp@{ mpu6050.cpp} !MPU\_ Read\_ Byte@{ MPU\_ Read\_ Byte} }
\index { MPU\_ Read\_ Byte@{ MPU\_ Read\_ Byte} !mpu6050.cpp@{ mpu6050.cpp} }
\doxysubsubsection { \texorpdfstring { MPU\_ Read\_ Byte()} { MPU\_ Read\_ Byte()} }
{ \footnotesize \ttfamily \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } MPU\+ \_ \+ \+ Read\+ \_ \+ \+ Byte (\begin { DoxyParamCaption} \item [{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}] { reg } \end { DoxyParamCaption} )}
IIC读一个字节
\begin { DoxyParams} { 参数}
{ \em reg} & 寄存器地址 \\
\hline
\end { DoxyParams}
\begin { DoxyReturn} { 返回}
0,设置成功
\end { DoxyReturn}
在文件 \mbox { \hyperlink { mpu6050_ 8cpp_ source} { mpu6050.\+ cpp} } 第 \mbox { \hyperlink { mpu6050_ 8cpp_ source_ l00187} { 187} } 行定义.
函数调用图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=350pt] { mpu6050_ 8cpp_ a17c11d19a2bb21d61610f08cb2cbe2f7_ cgraph}
\end { center}
\end { figure}
这是这个函数的调用关系图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=264pt] { mpu6050_ 8cpp_ a17c11d19a2bb21d61610f08cb2cbe2f7_ icgraph}
\end { center}
\end { figure}
\mbox { \Hypertarget { mpu6050_ 8cpp_ a63161fa966899e4e7c5791e40ebf2b0a} \label { mpu6050_ 8cpp_ a63161fa966899e4e7c5791e40ebf2b0a} }
\index { mpu6050.cpp@{ mpu6050.cpp} !MPU\_ Read\_ Len@{ MPU\_ Read\_ Len} }
\index { MPU\_ Read\_ Len@{ MPU\_ Read\_ Len} !mpu6050.cpp@{ mpu6050.cpp} }
\doxysubsubsection { \texorpdfstring { MPU\_ Read\_ Len()} { MPU\_ Read\_ Len()} }
{ \footnotesize \ttfamily \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } MPU\+ \_ \+ \+ Read\+ \_ \+ \+ Len (\begin { DoxyParamCaption} \item [{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}] { addr, } \item [{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}] { reg, } \item [{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}] { len, } \item [{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} $\ast$}] { buf } \end { DoxyParamCaption} )}
IIC连续读
\begin { DoxyParams} { 参数}
{ \em addr} & 器件地址 \\
\hline
{ \em reg} & 寄存器地址 \\
\hline
{ \em len} & 读取长度 \\
\hline
{ \em $ \ast $ buf} & 读取数据区 \\
\hline
\end { DoxyParams}
\begin { DoxyReturn} { 返回}
0,设置成功
\end { DoxyReturn}
在文件 \mbox { \hyperlink { mpu6050_ 8cpp_ source} { mpu6050.\+ cpp} } 第 \mbox { \hyperlink { mpu6050_ 8cpp_ source_ l00168} { 168} } 行定义.
函数调用图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=350pt] { mpu6050_ 8cpp_ a63161fa966899e4e7c5791e40ebf2b0a_ cgraph}
\end { center}
\end { figure}
这是这个函数的调用关系图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=331pt] { mpu6050_ 8cpp_ a63161fa966899e4e7c5791e40ebf2b0a_ icgraph}
\end { center}
\end { figure}
\mbox { \Hypertarget { mpu6050_ 8cpp_ a6c391137bc5880c3b5e15e84c5a3380f} \label { mpu6050_ 8cpp_ a6c391137bc5880c3b5e15e84c5a3380f} }
\index { mpu6050.cpp@{ mpu6050.cpp} !MPU\_ Set\_ Accel\_ Fsr@{ MPU\_ Set\_ Accel\_ Fsr} }
\index { MPU\_ Set\_ Accel\_ Fsr@{ MPU\_ Set\_ Accel\_ Fsr} !mpu6050.cpp@{ mpu6050.cpp} }
\doxysubsubsection { \texorpdfstring { MPU\_ Set\_ Accel\_ Fsr()} { MPU\_ Set\_ Accel\_ Fsr()} }
{ \footnotesize \ttfamily \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } MPU\+ \_ \+ \+ Set\+ \_ \+ \+ Accel\+ \_ \+ \+ Fsr (\begin { DoxyParamCaption} \item [{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}] { fsr } \end { DoxyParamCaption} )}
设置\+ MPU6050加速度传感器满量程范围
\begin { DoxyParams} { 参数}
{ \em fsr} & 0,±2g 1,±4g 2,±8g 3,±16g \\
\hline
\end { DoxyParams}
\begin { DoxyReturn} { 返回}
0,设置成功
\end { DoxyReturn}
在文件 \mbox { \hyperlink { mpu6050_ 8cpp_ source} { mpu6050.\+ cpp} } 第 \mbox { \hyperlink { mpu6050_ 8cpp_ source_ l00067} { 67} } 行定义.
函数调用图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=350pt] { mpu6050_ 8cpp_ a6c391137bc5880c3b5e15e84c5a3380f_ cgraph}
\end { center}
\end { figure}
这是这个函数的调用关系图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=280pt] { mpu6050_ 8cpp_ a6c391137bc5880c3b5e15e84c5a3380f_ icgraph}
\end { center}
\end { figure}
\mbox { \Hypertarget { mpu6050_ 8cpp_ aa27cc30326ce4980b289a0e1c3f76b5e} \label { mpu6050_ 8cpp_ aa27cc30326ce4980b289a0e1c3f76b5e} }
\index { mpu6050.cpp@{ mpu6050.cpp} !MPU\_ Set\_ Gyro\_ Fsr@{ MPU\_ Set\_ Gyro\_ Fsr} }
\index { MPU\_ Set\_ Gyro\_ Fsr@{ MPU\_ Set\_ Gyro\_ Fsr} !mpu6050.cpp@{ mpu6050.cpp} }
\doxysubsubsection { \texorpdfstring { MPU\_ Set\_ Gyro\_ Fsr()} { MPU\_ Set\_ Gyro\_ Fsr()} }
{ \footnotesize \ttfamily \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } MPU\+ \_ \+ \+ Set\+ \_ \+ \+ Gyro\+ \_ \+ \+ Fsr (\begin { DoxyParamCaption} \item [{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}] { fsr } \end { DoxyParamCaption} )}
设置\+ MPU6050陀螺仪传感器满量程范围
\begin { DoxyParams} { 参数}
{ \em fsr} & 0,±250dps 1,±500dps 2,±1000dps 3,±2000dps \\
\hline
\end { DoxyParams}
\begin { DoxyReturn} { 返回}
0,设置成功
\end { DoxyReturn}
在文件 \mbox { \hyperlink { mpu6050_ 8cpp_ source} { mpu6050.\+ cpp} } 第 \mbox { \hyperlink { mpu6050_ 8cpp_ source_ l00055} { 55} } 行定义.
函数调用图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=350pt] { mpu6050_ 8cpp_ aa27cc30326ce4980b289a0e1c3f76b5e_ cgraph}
\end { center}
\end { figure}
这是这个函数的调用关系图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=276pt] { mpu6050_ 8cpp_ aa27cc30326ce4980b289a0e1c3f76b5e_ icgraph}
\end { center}
\end { figure}
\mbox { \Hypertarget { mpu6050_ 8cpp_ a2fb9973c9f5ea5327649d0eef5e96217} \label { mpu6050_ 8cpp_ a2fb9973c9f5ea5327649d0eef5e96217} }
\index { mpu6050.cpp@{ mpu6050.cpp} !MPU\_ Set\_ LPF@{ MPU\_ Set\_ LPF} }
\index { MPU\_ Set\_ LPF@{ MPU\_ Set\_ LPF} !mpu6050.cpp@{ mpu6050.cpp} }
\doxysubsubsection { \texorpdfstring { MPU\_ Set\_ LPF()} { MPU\_ Set\_ LPF()} }
{ \footnotesize \ttfamily \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } MPU\+ \_ \+ \+ Set\+ \_ \+ \+ LPF (\begin { DoxyParamCaption} \item [{\mbox{\hyperlink{varint_8h_ace9d960e74685e2cd84b36132dbbf8aa}{u16}}}] { lpf } \end { DoxyParamCaption} )}
设置\+ MPU6050的数字低通滤波器
\begin { DoxyParams} { 参数}
{ \em lpf} & 数字低通滤波频率(\+ Hz) \\
\hline
\end { DoxyParams}
\begin { DoxyReturn} { 返回}
0,设置成功
\end { DoxyReturn}
在文件 \mbox { \hyperlink { mpu6050_ 8cpp_ source} { mpu6050.\+ cpp} } 第 \mbox { \hyperlink { mpu6050_ 8cpp_ source_ l00076} { 76} } 行定义.
函数调用图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=350pt] { mpu6050_ 8cpp_ a2fb9973c9f5ea5327649d0eef5e96217_ cgraph}
\end { center}
\end { figure}
这是这个函数的调用关系图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=350pt] { mpu6050_ 8cpp_ a2fb9973c9f5ea5327649d0eef5e96217_ icgraph}
\end { center}
\end { figure}
\mbox { \Hypertarget { mpu6050_ 8cpp_ a04e58232ce838e94d54aa2b53287cb41} \label { mpu6050_ 8cpp_ a04e58232ce838e94d54aa2b53287cb41} }
\index { mpu6050.cpp@{ mpu6050.cpp} !MPU\_ Set\_ Rate@{ MPU\_ Set\_ Rate} }
\index { MPU\_ Set\_ Rate@{ MPU\_ Set\_ Rate} !mpu6050.cpp@{ mpu6050.cpp} }
\doxysubsubsection { \texorpdfstring { MPU\_ Set\_ Rate()} { MPU\_ Set\_ Rate()} }
{ \footnotesize \ttfamily \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } MPU\+ \_ \+ \+ Set\+ \_ \+ \+ Rate (\begin { DoxyParamCaption} \item [{\mbox{\hyperlink{varint_8h_ace9d960e74685e2cd84b36132dbbf8aa}{u16}}}] { rate } \end { DoxyParamCaption} )}
设置\+ MPU6050的采样率(假定\+ Fs=1KHz)
\begin { DoxyParams} { 参数}
{ \em rate} & 4$ \sim $ 1000(Hz) \\
\hline
\end { DoxyParams}
\begin { DoxyReturn} { 返回}
0,设置成功
\end { DoxyReturn}
在文件 \mbox { \hyperlink { mpu6050_ 8cpp_ source} { mpu6050.\+ cpp} } 第 \mbox { \hyperlink { mpu6050_ 8cpp_ source_ l00092} { 92} } 行定义.
函数调用图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=350pt] { mpu6050_ 8cpp_ a04e58232ce838e94d54aa2b53287cb41_ cgraph}
\end { center}
\end { figure}
这是这个函数的调用关系图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=256pt] { mpu6050_ 8cpp_ a04e58232ce838e94d54aa2b53287cb41_ icgraph}
\end { center}
\end { figure}
\mbox { \Hypertarget { mpu6050_ 8cpp_ a0be9b422bb8613f8444db4af5234e1a1} \label { mpu6050_ 8cpp_ a0be9b422bb8613f8444db4af5234e1a1} }
\index { mpu6050.cpp@{ mpu6050.cpp} !MPU\_ Write\_ Byte@{ MPU\_ Write\_ Byte} }
\index { MPU\_ Write\_ Byte@{ MPU\_ Write\_ Byte} !mpu6050.cpp@{ mpu6050.cpp} }
\doxysubsubsection { \texorpdfstring { MPU\_ Write\_ Byte()} { MPU\_ Write\_ Byte()} }
{ \footnotesize \ttfamily \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } MPU\+ \_ \+ \+ Write\+ \_ \+ \+ Byte (\begin { DoxyParamCaption} \item [{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}] { reg, } \item [{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}] { data } \end { DoxyParamCaption} )}
IIC写一个字节
\begin { DoxyParams} { 参数}
{ \em reg} & 寄存器地址 \\
\hline
{ \em data} & 数据 \\
\hline
\end { DoxyParams}
\begin { DoxyReturn} { 返回}
0,设置成功
\end { DoxyReturn}
在文件 \mbox { \hyperlink { mpu6050_ 8cpp_ source} { mpu6050.\+ cpp} } 第 \mbox { \hyperlink { mpu6050_ 8cpp_ source_ l00178} { 178} } 行定义.
函数调用图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=350pt] { mpu6050_ 8cpp_ a0be9b422bb8613f8444db4af5234e1a1_ cgraph}
\end { center}
\end { figure}
这是这个函数的调用关系图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=350pt] { mpu6050_ 8cpp_ a0be9b422bb8613f8444db4af5234e1a1_ icgraph}
\end { center}
\end { figure}
\mbox { \Hypertarget { mpu6050_ 8cpp_ a59b1c26b234be88e97435a1b3c061330} \label { mpu6050_ 8cpp_ a59b1c26b234be88e97435a1b3c061330} }
\index { mpu6050.cpp@{ mpu6050.cpp} !MPU\_ Write\_ Len@{ MPU\_ Write\_ Len} }
\index { MPU\_ Write\_ Len@{ MPU\_ Write\_ Len} !mpu6050.cpp@{ mpu6050.cpp} }
\doxysubsubsection { \texorpdfstring { MPU\_ Write\_ Len()} { MPU\_ Write\_ Len()} }
{ \footnotesize \ttfamily \mbox { \hyperlink { varint_ 8h_ a92c50087ca0e64fa93fc59402c55f8ca} { u8} } MPU\+ \_ \+ \+ Write\+ \_ \+ \+ Len (\begin { DoxyParamCaption} \item [{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}] { addr, } \item [{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}] { reg, } \item [{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}}}] { len, } \item [{\mbox{\hyperlink{varint_8h_a92c50087ca0e64fa93fc59402c55f8ca}{u8}} $\ast$}] { buf } \end { DoxyParamCaption} )}
IIC连续写
\begin { DoxyParams} { 参数}
{ \em addr} & 器件地址 \\
\hline
{ \em reg} & 寄存器地址 \\
\hline
{ \em len} & 写入长度 \\
\hline
{ \em $ \ast $ buf} & 数据区 \\
\hline
\end { DoxyParams}
\begin { DoxyReturn} { 返回}
0,设置成功
\end { DoxyReturn}
在文件 \mbox { \hyperlink { mpu6050_ 8cpp_ source} { mpu6050.\+ cpp} } 第 \mbox { \hyperlink { mpu6050_ 8cpp_ source_ l00156} { 156} } 行定义.
函数调用图\+ :\nopagebreak
\begin { figure} [H]
\begin { center}
\leavevmode
\includegraphics [width=350pt] { mpu6050_ 8cpp_ a59b1c26b234be88e97435a1b3c061330_ cgraph}
\end { center}
\end { figure}
\doxysubsection { 变量说明}
\mbox { \Hypertarget { mpu6050_ 8cpp_ a604895d6ae2b01114260172650252fce} \label { mpu6050_ 8cpp_ a604895d6ae2b01114260172650252fce} }
\index { mpu6050.cpp@{ mpu6050.cpp} !mpu6050IIC@{ mpu6050IIC} }
\index { mpu6050IIC@{ mpu6050IIC} !mpu6050.cpp@{ mpu6050.cpp} }
\doxysubsubsection { \texorpdfstring { mpu6050IIC} { mpu6050IIC} }
{ \footnotesize \ttfamily \mbox { \hyperlink { classbscpp_ _ _ i_ i_ c_ _ _ s_ t_ m32} { bscpp\+ \_ \+ \+ IIC\+ \_ \+ \+ STM32} } mpu6050\+ IIC(IIC\+ \_ \+ \+ SCK\+ \_ \+ \+ GPIO\+ \_ \+ \+ Port, IIC\+ \_ \+ \+ SCK\+ \_ \+ \+ Pin, IIC\+ \_ \+ \+ SDA\+ \_ \+ \+ GPIO\+ \_ \+ \+ Port, IIC\+ \_ \+ \+ SDA\+ \_ \+ \+ Pin) (\begin { DoxyParamCaption} \item [{IIC\+\_\+\+SCK\+\_\+\+GPIO\+\_\+\+Port}] { , } \item [{IIC\+\_\+\+SCK\+\_\+\+Pin}] { , } \item [{IIC\+\_\+\+SDA\+\_\+\+GPIO\+\_\+\+Port}] { , } \item [{IIC\+\_\+\+SDA\+\_\+\+Pin}] { } \end { DoxyParamCaption} )}