Files
MicrochipFor32/bscpp_Doc/html/mpu6050_8h_source.html
XerolySkinner 1004372110 初代发行版本
增加了栈的链表实现方法
编写了markdown文件
2022-11-10 03:34:52 +08:00

179 lines
36 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>XerolySkinnerBscpp: D:/gitt/MicrochipFor32/bscpp_Device/bscpp_MPU6050/mpu6050.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr id="projectrow">
<td id="projectalign">
<div id="projectname">XerolySkinnerBscpp<span id="projectnumber">&#160;1.0.0</span>
</div>
<div id="projectbrief">C++版本的驱动库</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>首页</span></a></li>
<li><a href="pages.html"><span>相关页面</span></a></li>
<li><a href="modules.html"><span>模块</span></a></li>
<li><a href="annotated.html"><span></span></a></li>
<li class="current"><a href="files.html"><span>文件</span></a></li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="files.html"><span>文件列表</span></a></li>
<li><a href="globals.html"><span>文件成员</span></a></li>
</ul>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="dir_3bfaf0217183ded7409ebd120766862d.html">gitt</a></li><li class="navelem"><a class="el" href="dir_876bb78db91ff67e2b56e1228af3574e.html">MicrochipFor32</a></li><li class="navelem"><a class="el" href="dir_2f7647e102f146f5202708a3606f65a7.html">bscpp_Device</a></li><li class="navelem"><a class="el" href="dir_30daf241509c7468077f82cc2dd6aa8a.html">bscpp_MPU6050</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="headertitle"><div class="title">mpu6050.h</div></div>
</div><!--header-->
<div class="contents">
<a href="mpu6050_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno"> 1</span> </div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno"> 11</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno"> 12</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno"> 13</span><span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span>{</div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno"> 14</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno"> 15</span><span class="preprocessor">#include &quot;main.h&quot;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno"> 16</span><span class="preprocessor">#include &quot;<a class="code" href="varint_8h.html">varint.h</a>&quot;</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno"> 17</span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno"> 18</span><span class="comment">//#define MPU_ACCEL_OFFS_REG 0X06 //accel_offs寄存器,可读取版本号,寄存器手册未提到</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno"> 19</span><span class="comment">//#define MPU_PROD_ID_REG 0X0C //prod id寄存器,在寄存器手册未提到</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#af02b592f85ebbfcc6f5e13d8287832de"> 20</a></span><span class="preprocessor">#define MPU_SELF_TESTX_REG 0X0D </span><span class="comment">//自检寄存器X</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a029c571acc0e3a941d14d4af3e3ecd5f"> 21</a></span><span class="preprocessor">#define MPU_SELF_TESTY_REG 0X0E </span><span class="comment">//自检寄存器Y</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#aa7f091c311c419133b4799a37919ce24"> 22</a></span><span class="preprocessor">#define MPU_SELF_TESTZ_REG 0X0F </span><span class="comment">//自检寄存器Z</span></div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a9f2d6b09b992598daadf6a0afa9a8b9c"> 23</a></span><span class="preprocessor">#define MPU_SELF_TESTA_REG 0X10 </span><span class="comment">//自检寄存器A</span></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a4b95cfafadb4b30146a17fac36819ca3"> 24</a></span><span class="preprocessor">#define MPU_SAMPLE_RATE_REG 0X19 </span><span class="comment">//采样频率分频器</span></div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a5034e2fc680fc68faa369a48f6955837"> 25</a></span><span class="preprocessor">#define MPU_CFG_REG 0X1A </span><span class="comment">//配置寄存器</span></div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#ac8ce2e66126327cf30cfba19c4c38db5"> 26</a></span><span class="preprocessor">#define MPU_GYRO_CFG_REG 0X1B </span><span class="comment">//陀螺仪配置寄存器</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a7bc1a37b846a3869f13a29e00072bbc7"> 27</a></span><span class="preprocessor">#define MPU_ACCEL_CFG_REG 0X1C </span><span class="comment">//加速度计配置寄存器</span></div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#ad214879acffccefd843d291949a2abb6"> 28</a></span><span class="preprocessor">#define MPU_MOTION_DET_REG 0X1F </span><span class="comment">//运动检测阀值设置寄存器</span></div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a6ac27367cd834a85810e99df72b97621"> 29</a></span><span class="preprocessor">#define MPU_FIFO_EN_REG 0X23 </span><span class="comment">//FIFO使能寄存器</span></div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a077d9362ddf1c52a0fca0740164533ca"> 30</a></span><span class="preprocessor">#define MPU_I2CMST_CTRL_REG 0X24 </span><span class="comment">//IIC主机控制寄存器</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a0482943c31faa0c896d63ef5d66755e1"> 31</a></span><span class="preprocessor">#define MPU_I2CSLV0_ADDR_REG 0X25 </span><span class="comment">//IIC从机0器件地址寄存器</span></div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a53122cbda4565a4a060e5df3bb9a37a7"> 32</a></span><span class="preprocessor">#define MPU_I2CSLV0_REG 0X26 </span><span class="comment">//IIC从机0数据地址寄存器</span></div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a22b266f1daab1a09f9257cfeb96fbb68"> 33</a></span><span class="preprocessor">#define MPU_I2CSLV0_CTRL_REG 0X27 </span><span class="comment">//IIC从机0控制寄存器</span></div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a9123fc86edcdc301cbb75f7ebe4b5875"> 34</a></span><span class="preprocessor">#define MPU_I2CSLV1_ADDR_REG 0X28 </span><span class="comment">//IIC从机1器件地址寄存器</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a7a0758891de15a4b4bf0ef2c4e75efeb"> 35</a></span><span class="preprocessor">#define MPU_I2CSLV1_REG 0X29 </span><span class="comment">//IIC从机1数据地址寄存器</span></div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a237cf43cb562d63ea2f2d98eeac464bc"> 36</a></span><span class="preprocessor">#define MPU_I2CSLV1_CTRL_REG 0X2A </span><span class="comment">//IIC从机1控制寄存器</span></div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a5a7b90007c003c428c098d0073fa4f9c"> 37</a></span><span class="preprocessor">#define MPU_I2CSLV2_ADDR_REG 0X2B </span><span class="comment">//IIC从机2器件地址寄存器</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a1d01e992631966ee1af8795ec14710bc"> 38</a></span><span class="preprocessor">#define MPU_I2CSLV2_REG 0X2C </span><span class="comment">//IIC从机2数据地址寄存器</span></div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a1c2971fc921e219f0060640349d4a58a"> 39</a></span><span class="preprocessor">#define MPU_I2CSLV2_CTRL_REG 0X2D </span><span class="comment">//IIC从机2控制寄存器</span></div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a0627354a9a7143a3967bbf1552952e11"> 40</a></span><span class="preprocessor">#define MPU_I2CSLV3_ADDR_REG 0X2E </span><span class="comment">//IIC从机3器件地址寄存器</span></div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a82236d7861a3a175cff0058d5d5b4716"> 41</a></span><span class="preprocessor">#define MPU_I2CSLV3_REG 0X2F </span><span class="comment">//IIC从机3数据地址寄存器</span></div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#ac907afde99231069287fa0d78c305549"> 42</a></span><span class="preprocessor">#define MPU_I2CSLV3_CTRL_REG 0X30 </span><span class="comment">//IIC从机3控制寄存器</span></div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a6fbb07805d44b04e97f4f7d30d7c65bf"> 43</a></span><span class="preprocessor">#define MPU_I2CSLV4_ADDR_REG 0X31 </span><span class="comment">//IIC从机4器件地址寄存器</span></div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a838f7301336bd077e84a3a4fbe6e16e7"> 44</a></span><span class="preprocessor">#define MPU_I2CSLV4_REG 0X32 </span><span class="comment">//IIC从机4数据地址寄存器</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a5bf6ae395ef8815c28c23d5343116871"> 45</a></span><span class="preprocessor">#define MPU_I2CSLV4_DO_REG 0X33 </span><span class="comment">//IIC从机4写数据寄存器</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a144d40f6321e971c85d9987ceaedf539"> 46</a></span><span class="preprocessor">#define MPU_I2CSLV4_CTRL_REG 0X34 </span><span class="comment">//IIC从机4控制寄存器</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#ab62d9fd87688d16052273b6598d5572f"> 47</a></span><span class="preprocessor">#define MPU_I2CSLV4_DI_REG 0X35 </span><span class="comment">//IIC从机4读数据寄存器</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno"> 48</span> </div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a818abd42a819632acfee736d8db636f5"> 49</a></span><span class="preprocessor">#define MPU_I2CMST_STA_REG 0X36 </span><span class="comment">//IIC主机状态寄存器</span></div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a41676476ba5dbb1b213f8f8e252d17f9"> 50</a></span><span class="preprocessor">#define MPU_INTBP_CFG_REG 0X37 </span><span class="comment">//中断/旁路设置寄存器</span></div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#afa56d3602a6044562c45cecf6403fb8b"> 51</a></span><span class="preprocessor">#define MPU_INT_EN_REG 0X38 </span><span class="comment">//中断使能寄存器</span></div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a186faa987a57c9d2a3ea6bfaba0bdd46"> 52</a></span><span class="preprocessor">#define MPU_INT_STA_REG 0X3A </span><span class="comment">//中断状态寄存器</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno"> 53</span> </div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a571a31cdf2a467b2b1df39fea686ea0d"> 54</a></span><span class="preprocessor">#define MPU_ACCEL_XOUTH_REG 0X3B </span><span class="comment">//加速度值,X轴高8位寄存器</span></div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#ad7193ffe844d2c844b0c419a50d40173"> 55</a></span><span class="preprocessor">#define MPU_ACCEL_XOUTL_REG 0X3C </span><span class="comment">//加速度值,X轴低8位寄存器</span></div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a42eb93ccf84e25005cd1eca7c43b7516"> 56</a></span><span class="preprocessor">#define MPU_ACCEL_YOUTH_REG 0X3D </span><span class="comment">//加速度值,Y轴高8位寄存器</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#aa1b06e69bcbb83ced2e28a8891ee8558"> 57</a></span><span class="preprocessor">#define MPU_ACCEL_YOUTL_REG 0X3E </span><span class="comment">//加速度值,Y轴低8位寄存器</span></div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#af3a12a4f04a41df24c977c491a4aad5f"> 58</a></span><span class="preprocessor">#define MPU_ACCEL_ZOUTH_REG 0X3F </span><span class="comment">//加速度值,Z轴高8位寄存器</span></div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a82eb10a4b48c58f8bf7bc96a892533b6"> 59</a></span><span class="preprocessor">#define MPU_ACCEL_ZOUTL_REG 0X40 </span><span class="comment">//加速度值,Z轴低8位寄存器</span></div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno"> 60</span> </div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#af2665b26b7f1ce9b3982a9f6418748e9"> 61</a></span><span class="preprocessor">#define MPU_TEMP_OUTH_REG 0X41 </span><span class="comment">//温度值高八位寄存器</span></div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a5f4a1c425564e1e56bfe51576ba3ea82"> 62</a></span><span class="preprocessor">#define MPU_TEMP_OUTL_REG 0X42 </span><span class="comment">//温度值低8位寄存器</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno"> 63</span> </div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a7e16f1a459d902b070ca67df67be862b"> 64</a></span><span class="preprocessor">#define MPU_GYRO_XOUTH_REG 0X43 </span><span class="comment">//陀螺仪值,X轴高8位寄存器</span></div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a0b2e09225774ed67f49666ec1bbea501"> 65</a></span><span class="preprocessor">#define MPU_GYRO_XOUTL_REG 0X44 </span><span class="comment">//陀螺仪值,X轴低8位寄存器</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#af71ca06f446573faed7a73979237e51e"> 66</a></span><span class="preprocessor">#define MPU_GYRO_YOUTH_REG 0X45 </span><span class="comment">//陀螺仪值,Y轴高8位寄存器</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a0007fe50b455737a3076e38f300bce14"> 67</a></span><span class="preprocessor">#define MPU_GYRO_YOUTL_REG 0X46 </span><span class="comment">//陀螺仪值,Y轴低8位寄存器</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#ad5811a104c711b123b648b46bcc6f929"> 68</a></span><span class="preprocessor">#define MPU_GYRO_ZOUTH_REG 0X47 </span><span class="comment">//陀螺仪值,Z轴高8位寄存器</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a289046a426f3c6ef18cb504c5e991652"> 69</a></span><span class="preprocessor">#define MPU_GYRO_ZOUTL_REG 0X48 </span><span class="comment">//陀螺仪值,Z轴低8位寄存器</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno"> 70</span> </div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a93d37f52e6ac87e1ef103339b22770af"> 71</a></span><span class="preprocessor">#define MPU_I2CSLV0_DO_REG 0X63 </span><span class="comment">//IIC从机0数据寄存器</span></div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#af03578391ec1c0c6b357207c83ce28bb"> 72</a></span><span class="preprocessor">#define MPU_I2CSLV1_DO_REG 0X64 </span><span class="comment">//IIC从机1数据寄存器</span></div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a14db443ae863599bc0f16fa3733d4056"> 73</a></span><span class="preprocessor">#define MPU_I2CSLV2_DO_REG 0X65 </span><span class="comment">//IIC从机2数据寄存器</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a4343d92e344dd56343094d46798a5e0e"> 74</a></span><span class="preprocessor">#define MPU_I2CSLV3_DO_REG 0X66 </span><span class="comment">//IIC从机3数据寄存器</span></div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno"> 75</span> </div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#ad7209fcea0ea70f90f6cb43e862f8f5b"> 76</a></span><span class="preprocessor">#define MPU_I2CMST_DELAY_REG 0X67 </span><span class="comment">//IIC主机延时管理寄存器</span></div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a82c9cecb9ee30b37f8b054feca2bc1da"> 77</a></span><span class="preprocessor">#define MPU_SIGPATH_RST_REG 0X68 </span><span class="comment">//信号通道复位寄存器</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a1e60421d39a0a24b0c513f309e1d6910"> 78</a></span><span class="preprocessor">#define MPU_MDETECT_CTRL_REG 0X69 </span><span class="comment">//运动检测控制寄存器</span></div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a0146ef35d7ff0b037eafb0a5dac53b0f"> 79</a></span><span class="preprocessor">#define MPU_USER_CTRL_REG 0X6A </span><span class="comment">//用户控制寄存器</span></div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#abbe7ea135ee03eb0f1296ecb22be7554"> 80</a></span><span class="preprocessor">#define MPU_PWR_MGMT1_REG 0X6B </span><span class="comment">//电源管理寄存器1</span></div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a3fa9eb0485744e73d0274b198f0ad705"> 81</a></span><span class="preprocessor">#define MPU_PWR_MGMT2_REG 0X6C </span><span class="comment">//电源管理寄存器2 </span></div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a9c04be29f6f59066df910560a1eb9ddf"> 82</a></span><span class="preprocessor">#define MPU_FIFO_CNTH_REG 0X72 </span><span class="comment">//FIFO计数寄存器高八位</span></div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a66dc73eec1f79cfefe8ad3d4c2a81c0d"> 83</a></span><span class="preprocessor">#define MPU_FIFO_CNTL_REG 0X73 </span><span class="comment">//FIFO计数寄存器低八位</span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#af3acc9068f9c3b6a54c3d65ca91dc52e"> 84</a></span><span class="preprocessor">#define MPU_FIFO_RW_REG 0X74 </span><span class="comment">//FIFO读写寄存器</span></div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a9668e5ccfcfb0aa64da044a381a56f9c"> 85</a></span><span class="preprocessor">#define MPU_DEVICE_ID_REG 0X75 </span><span class="comment">//器件ID寄存器</span></div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno"> 86</span> </div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno"> 87</span><span class="comment">//如果AD0脚(9脚)接地,IIC地址为0X68(不包含最低位).</span></div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno"> 88</span><span class="comment">//如果接V3.3,则IIC地址为0X69(不包含最低位).</span></div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#ac3281ee64415e63422da7d65db161891"> 89</a></span><span class="preprocessor">#define MPU_ADDR 0X68</span></div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno"> 90</span> </div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno"> 91</span><a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> <a class="code hl_function" href="mpu6050_8h.html#ab1f8c6111d59b60a2edb4ee3e8aa3113">MPU_Init</a>(<span class="keywordtype">void</span>); <span class="comment">//初始化MPU6050</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno"> 92</span><a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> <a class="code hl_function" href="mpu6050_8h.html#a59b1c26b234be88e97435a1b3c061330">MPU_Write_Len</a>(<a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> addr,<a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> <a class="code hl_variable" href="group___d_r_i_v_e_r_s.html#ga5448c351fc95ff052b110eee80e5f75c">reg</a>,<a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> len,<a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> *buf);<span class="comment">//IIC连续写</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno"> 93</span><a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> <a class="code hl_function" href="mpu6050_8h.html#a63161fa966899e4e7c5791e40ebf2b0a">MPU_Read_Len</a>(<a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> addr,<a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> <a class="code hl_variable" href="group___d_r_i_v_e_r_s.html#ga5448c351fc95ff052b110eee80e5f75c">reg</a>,<a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> len,<a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> *buf); <span class="comment">//IIC连续读 </span></div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno"> 94</span><a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> <a class="code hl_function" href="mpu6050_8h.html#a0be9b422bb8613f8444db4af5234e1a1">MPU_Write_Byte</a>(<a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> <a class="code hl_variable" href="group___d_r_i_v_e_r_s.html#ga5448c351fc95ff052b110eee80e5f75c">reg</a>,<a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> data); <span class="comment">//IIC写一个字节</span></div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno"> 95</span><a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> <a class="code hl_function" href="mpu6050_8h.html#a17c11d19a2bb21d61610f08cb2cbe2f7">MPU_Read_Byte</a>(<a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> <a class="code hl_variable" href="group___d_r_i_v_e_r_s.html#ga5448c351fc95ff052b110eee80e5f75c">reg</a>); <span class="comment">//IIC读一个字节</span></div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno"> 96</span> </div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno"> 97</span><a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> <a class="code hl_function" href="mpu6050_8h.html#aa27cc30326ce4980b289a0e1c3f76b5e">MPU_Set_Gyro_Fsr</a>(<a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> fsr);</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno"> 98</span><a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> <a class="code hl_function" href="mpu6050_8h.html#a6c391137bc5880c3b5e15e84c5a3380f">MPU_Set_Accel_Fsr</a>(<a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> fsr);</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno"> 99</span><a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> <a class="code hl_function" href="mpu6050_8h.html#a2fb9973c9f5ea5327649d0eef5e96217">MPU_Set_LPF</a>(<a class="code hl_typedef" href="varint_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a> lpf);</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno"> 100</span><a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> <a class="code hl_function" href="mpu6050_8h.html#a04e58232ce838e94d54aa2b53287cb41">MPU_Set_Rate</a>(<a class="code hl_typedef" href="varint_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a> rate);</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno"><a class="line" href="mpu6050_8h.html#a91e0ee4610726fcf9f45570245269a0e"> 101</a></span><a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> <a class="code hl_function" href="mpu6050_8h.html#a91e0ee4610726fcf9f45570245269a0e">MPU_Set_Fifo</a>(<a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> sens);</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno"> 102</span> </div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno"> 103</span><span class="keywordtype">short</span> <a class="code hl_function" href="mpu6050_8h.html#a41eaf87c26b1281d9d5fc6a06abcf2a8">MPU_Get_Temperature</a>(<span class="keywordtype">void</span>);</div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno"> 104</span><a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> <a class="code hl_function" href="mpu6050_8h.html#a8f28105f9dcccc709b78d7d0ce497633">MPU_Get_Gyroscope</a>(<span class="keywordtype">short</span> *gx,<span class="keywordtype">short</span> *gy,<span class="keywordtype">short</span> *gz);</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno"> 105</span><a class="code hl_typedef" href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a> <a class="code hl_function" href="mpu6050_8h.html#a2a0a02f6d7c597828a0cc282c76e99e3">MPU_Get_Accelerometer</a>(<span class="keywordtype">short</span> *ax,<span class="keywordtype">short</span> *ay,<span class="keywordtype">short</span> *az);</div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno"> 106</span> </div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno"> 107</span><span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"> 108</span>}</div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno"> 109</span><span class="preprocessor">#endif</span></div>
<div class="ttc" id="agroup___d_r_i_v_e_r_s_html_ga5448c351fc95ff052b110eee80e5f75c"><div class="ttname"><a href="group___d_r_i_v_e_r_s.html#ga5448c351fc95ff052b110eee80e5f75c">reg</a></div><div class="ttdeci">const struct gyro_reg_s reg</div><div class="ttdef"><b>Definition:</b> <a href="inv__mpu_8c_source.html#l00489">inv_mpu.c:489</a></div></div>
<div class="ttc" id="ampu6050_8h_html_a04e58232ce838e94d54aa2b53287cb41"><div class="ttname"><a href="mpu6050_8h.html#a04e58232ce838e94d54aa2b53287cb41">MPU_Set_Rate</a></div><div class="ttdeci">u8 MPU_Set_Rate(u16 rate)</div><div class="ttdoc">设置MPU6050的采样率(假定Fs=1KHz)</div><div class="ttdef"><b>Definition:</b> <a href="mpu6050_8cpp_source.html#l00092">mpu6050.cpp:92</a></div></div>
<div class="ttc" id="ampu6050_8h_html_a0be9b422bb8613f8444db4af5234e1a1"><div class="ttname"><a href="mpu6050_8h.html#a0be9b422bb8613f8444db4af5234e1a1">MPU_Write_Byte</a></div><div class="ttdeci">u8 MPU_Write_Byte(u8 reg, u8 data)</div><div class="ttdoc">IIC写一个字节</div><div class="ttdef"><b>Definition:</b> <a href="mpu6050_8cpp_source.html#l00178">mpu6050.cpp:178</a></div></div>
<div class="ttc" id="ampu6050_8h_html_a17c11d19a2bb21d61610f08cb2cbe2f7"><div class="ttname"><a href="mpu6050_8h.html#a17c11d19a2bb21d61610f08cb2cbe2f7">MPU_Read_Byte</a></div><div class="ttdeci">u8 MPU_Read_Byte(u8 reg)</div><div class="ttdoc">IIC读一个字节</div><div class="ttdef"><b>Definition:</b> <a href="mpu6050_8cpp_source.html#l00187">mpu6050.cpp:187</a></div></div>
<div class="ttc" id="ampu6050_8h_html_a2a0a02f6d7c597828a0cc282c76e99e3"><div class="ttname"><a href="mpu6050_8h.html#a2a0a02f6d7c597828a0cc282c76e99e3">MPU_Get_Accelerometer</a></div><div class="ttdeci">u8 MPU_Get_Accelerometer(short *ax, short *ay, short *az)</div><div class="ttdoc">得到加速度值(原始值)</div><div class="ttdef"><b>Definition:</b> <a href="mpu6050_8cpp_source.html#l00137">mpu6050.cpp:137</a></div></div>
<div class="ttc" id="ampu6050_8h_html_a2fb9973c9f5ea5327649d0eef5e96217"><div class="ttname"><a href="mpu6050_8h.html#a2fb9973c9f5ea5327649d0eef5e96217">MPU_Set_LPF</a></div><div class="ttdeci">u8 MPU_Set_LPF(u16 lpf)</div><div class="ttdoc">设置MPU6050的数字低通滤波器</div><div class="ttdef"><b>Definition:</b> <a href="mpu6050_8cpp_source.html#l00076">mpu6050.cpp:76</a></div></div>
<div class="ttc" id="ampu6050_8h_html_a41eaf87c26b1281d9d5fc6a06abcf2a8"><div class="ttname"><a href="mpu6050_8h.html#a41eaf87c26b1281d9d5fc6a06abcf2a8">MPU_Get_Temperature</a></div><div class="ttdeci">short MPU_Get_Temperature(void)</div><div class="ttdoc">得到温度值</div><div class="ttdef"><b>Definition:</b> <a href="mpu6050_8cpp_source.html#l00105">mpu6050.cpp:105</a></div></div>
<div class="ttc" id="ampu6050_8h_html_a59b1c26b234be88e97435a1b3c061330"><div class="ttname"><a href="mpu6050_8h.html#a59b1c26b234be88e97435a1b3c061330">MPU_Write_Len</a></div><div class="ttdeci">u8 MPU_Write_Len(u8 addr, u8 reg, u8 len, u8 *buf)</div><div class="ttdoc">IIC连续写</div><div class="ttdef"><b>Definition:</b> <a href="mpu6050_8cpp_source.html#l00156">mpu6050.cpp:156</a></div></div>
<div class="ttc" id="ampu6050_8h_html_a63161fa966899e4e7c5791e40ebf2b0a"><div class="ttname"><a href="mpu6050_8h.html#a63161fa966899e4e7c5791e40ebf2b0a">MPU_Read_Len</a></div><div class="ttdeci">u8 MPU_Read_Len(u8 addr, u8 reg, u8 len, u8 *buf)</div><div class="ttdoc">IIC连续读</div><div class="ttdef"><b>Definition:</b> <a href="mpu6050_8cpp_source.html#l00168">mpu6050.cpp:168</a></div></div>
<div class="ttc" id="ampu6050_8h_html_a6c391137bc5880c3b5e15e84c5a3380f"><div class="ttname"><a href="mpu6050_8h.html#a6c391137bc5880c3b5e15e84c5a3380f">MPU_Set_Accel_Fsr</a></div><div class="ttdeci">u8 MPU_Set_Accel_Fsr(u8 fsr)</div><div class="ttdoc">设置MPU6050加速度传感器满量程范围</div><div class="ttdef"><b>Definition:</b> <a href="mpu6050_8cpp_source.html#l00067">mpu6050.cpp:67</a></div></div>
<div class="ttc" id="ampu6050_8h_html_a8f28105f9dcccc709b78d7d0ce497633"><div class="ttname"><a href="mpu6050_8h.html#a8f28105f9dcccc709b78d7d0ce497633">MPU_Get_Gyroscope</a></div><div class="ttdeci">u8 MPU_Get_Gyroscope(short *gx, short *gy, short *gz)</div><div class="ttdoc">得到陀螺仪值(原始值)</div><div class="ttdef"><b>Definition:</b> <a href="mpu6050_8cpp_source.html#l00121">mpu6050.cpp:121</a></div></div>
<div class="ttc" id="ampu6050_8h_html_a91e0ee4610726fcf9f45570245269a0e"><div class="ttname"><a href="mpu6050_8h.html#a91e0ee4610726fcf9f45570245269a0e">MPU_Set_Fifo</a></div><div class="ttdeci">u8 MPU_Set_Fifo(u8 sens)</div></div>
<div class="ttc" id="ampu6050_8h_html_aa27cc30326ce4980b289a0e1c3f76b5e"><div class="ttname"><a href="mpu6050_8h.html#aa27cc30326ce4980b289a0e1c3f76b5e">MPU_Set_Gyro_Fsr</a></div><div class="ttdeci">u8 MPU_Set_Gyro_Fsr(u8 fsr)</div><div class="ttdoc">设置MPU6050陀螺仪传感器满量程范围</div><div class="ttdef"><b>Definition:</b> <a href="mpu6050_8cpp_source.html#l00055">mpu6050.cpp:55</a></div></div>
<div class="ttc" id="ampu6050_8h_html_ab1f8c6111d59b60a2edb4ee3e8aa3113"><div class="ttname"><a href="mpu6050_8h.html#ab1f8c6111d59b60a2edb4ee3e8aa3113">MPU_Init</a></div><div class="ttdeci">u8 MPU_Init(void)</div><div class="ttdoc">初始化MPU6050</div><div class="ttdef"><b>Definition:</b> <a href="mpu6050_8cpp_source.html#l00025">mpu6050.cpp:25</a></div></div>
<div class="ttc" id="avarint_8h_html"><div class="ttname"><a href="varint_8h.html">varint.h</a></div></div>
<div class="ttc" id="avarint_8h_html_a92c50087ca0e64fa93fc59402c55f8ca"><div class="ttname"><a href="varint_8h.html#a92c50087ca0e64fa93fc59402c55f8ca">u8</a></div><div class="ttdeci">uint8_t u8</div><div class="ttdoc">8位无符号数类型</div><div class="ttdef"><b>Definition:</b> <a href="varint_8h_source.html#l00040">varint.h:40</a></div></div>
<div class="ttc" id="avarint_8h_html_ace9d960e74685e2cd84b36132dbbf8aa"><div class="ttname"><a href="varint_8h.html#ace9d960e74685e2cd84b36132dbbf8aa">u16</a></div><div class="ttdeci">uint16_t u16</div><div class="ttdoc">16位无符号数类型</div><div class="ttdef"><b>Definition:</b> <a href="varint_8h_source.html#l00041">varint.h:41</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>