⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lis3l02_8h-source.html

📁 avr应用测试程序
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<a name="l00064"></a><a class="code" href="lis3l02_8h.html#a24">00064</a> <span class="comment"></span>#define LIS3L02_CTRLREG1_ZEN    0x04    <span class="comment">///&lt; LIS3L02 CtrlReg1 Z-axis Enable</span><a name="l00065"></a><a class="code" href="lis3l02_8h.html#a25">00065</a> <span class="comment"></span>#define LIS3L02_CTRLREG1_ST     0x08    <span class="comment">///&lt; LIS3L02 CtrlReg1 Self-Test Enable</span><a name="l00066"></a><a class="code" href="lis3l02_8h.html#a26">00066</a> <span class="comment"></span>#define LIS3L02_CTRLREG1_DF0    0x10    <span class="comment">///&lt; LIS3L02 CtrlReg1 Decimation Factor 0</span><a name="l00067"></a><a class="code" href="lis3l02_8h.html#a27">00067</a> <span class="comment"></span>#define LIS3L02_CTRLREG1_DF1    0x20    <span class="comment">///&lt; LIS3L02 CtrlReg1 Decimation Factor 0</span><a name="l00068"></a><a class="code" href="lis3l02_8h.html#a28">00068</a> <span class="comment"></span>#define LIS3L02_CTRLREG1_PD0    0x40    <span class="comment">///&lt; LIS3L02 CtrlReg1 Power-down Control 0</span><a name="l00069"></a><a class="code" href="lis3l02_8h.html#a29">00069</a> <span class="comment"></span>#define LIS3L02_CTRLREG1_PD1    0x80    <span class="comment">///&lt; LIS3L02 CtrlReg1 Power-down Control 1</span>00070 <span class="comment"></span>00071 <span class="comment">// LIS3L02 control register 2 bit defines</span><a name="l00072"></a><a class="code" href="lis3l02_8h.html#a30">00072</a> <span class="preprocessor">#define LIS3L02_CTRLREG2_DAS    0x01    </span><span class="comment">///&lt; LIS3L02 CtrlReg2 Data Alignment Selection</span><a name="l00073"></a><a class="code" href="lis3l02_8h.html#a31">00073</a> <span class="comment"></span>#define LIS3L02_CTRLREG2_SIM    0x02    <span class="comment">///&lt; LIS3L02 CtrlReg2 SPI Mode Select</span><a name="l00074"></a><a class="code" href="lis3l02_8h.html#a32">00074</a> <span class="comment"></span>#define LIS3L02_CTRLREG2_DRDY   0x04    <span class="comment">///&lt; LIS3L02 CtrlReg2 Enable Data-Ready generation</span><a name="l00075"></a><a class="code" href="lis3l02_8h.html#a33">00075</a> <span class="comment"></span>#define LIS3L02_CTRLREG2_IEN    0x08    <span class="comment">///&lt; LIS3L02 CtrlReg2 Interrupt Enable</span><a name="l00076"></a><a class="code" href="lis3l02_8h.html#a34">00076</a> <span class="comment"></span>#define LIS3L02_CTRLREG2_BOOT   0x10    <span class="comment">///&lt; LIS3L02 CtrlReg2 Reboot from memory</span><a name="l00077"></a><a class="code" href="lis3l02_8h.html#a35">00077</a> <span class="comment"></span>#define LIS3L02_CTRLREG2_FS     0x80    <span class="comment">///&lt; LIS3L02 CtrlReg2 Full-scale Select (0=2g, 1=6g)</span>00078 <span class="comment"></span>00079 <span class="comment">// LIS3L02 WAKEUPCFG register bit defines</span><a name="l00080"></a><a class="code" href="lis3l02_8h.html#a36">00080</a> <span class="preprocessor">#define LIS3L02_WAKEUPCFG_MXL   0x01    </span><span class="comment">///&lt; LIS3L02 WAKEUPCFG Mask X Low Interrupt</span><a name="l00081"></a><a class="code" href="lis3l02_8h.html#a37">00081</a> <span class="comment"></span>#define LIS3L02_WAKEUPCFG_MXH   0x02    <span class="comment">///&lt; LIS3L02 WAKEUPCFG Mask X High Interrupt</span><a name="l00082"></a><a class="code" href="lis3l02_8h.html#a38">00082</a> <span class="comment"></span>#define LIS3L02_WAKEUPCFG_MYL   0x04    <span class="comment">///&lt; LIS3L02 WAKEUPCFG Mask Y Low Interrupt</span><a name="l00083"></a><a class="code" href="lis3l02_8h.html#a39">00083</a> <span class="comment"></span>#define LIS3L02_WAKEUPCFG_MYH   0x08    <span class="comment">///&lt; LIS3L02 WAKEUPCFG Mask Y High Interrupt</span><a name="l00084"></a><a class="code" href="lis3l02_8h.html#a40">00084</a> <span class="comment"></span>#define LIS3L02_WAKEUPCFG_MZL   0x10    <span class="comment">///&lt; LIS3L02 WAKEUPCFG Mask Z Low Interrupt</span><a name="l00085"></a><a class="code" href="lis3l02_8h.html#a41">00085</a> <span class="comment"></span>#define LIS3L02_WAKEUPCFG_MZH   0x20    <span class="comment">///&lt; LIS3L02 WAKEUPCFG Mask Z High Interrupt</span><a name="l00086"></a><a class="code" href="lis3l02_8h.html#a42">00086</a> <span class="comment"></span>#define LIS3L02_WAKEUPCFG_LIR   0x40    <span class="comment">///&lt; LIS3L02 WAKEUPCFG Latch Intr Request</span>00087 <span class="comment"></span>00088 <span class="comment">// LIS3L02 WAKEUPSRC register bit defines</span><a name="l00089"></a><a class="code" href="lis3l02_8h.html#a43">00089</a> <span class="preprocessor">#define LIS3L02_WAKEUPSRC_XL    0x01    </span><span class="comment">///&lt; LIS3L02 WAKEUPSRC X Low Interrupt</span><a name="l00090"></a><a class="code" href="lis3l02_8h.html#a44">00090</a> <span class="comment"></span>#define LIS3L02_WAKEUPSRC_XH    0x02    <span class="comment">///&lt; LIS3L02 WAKEUPSRC X High Interrupt</span><a name="l00091"></a><a class="code" href="lis3l02_8h.html#a45">00091</a> <span class="comment"></span>#define LIS3L02_WAKEUPSRC_YL    0x04    <span class="comment">///&lt; LIS3L02 WAKEUPSRC Y Low Interrupt</span><a name="l00092"></a><a class="code" href="lis3l02_8h.html#a46">00092</a> <span class="comment"></span>#define LIS3L02_WAKEUPSRC_YH    0x08    <span class="comment">///&lt; LIS3L02 WAKEUPSRC Y High Interrupt</span><a name="l00093"></a><a class="code" href="lis3l02_8h.html#a47">00093</a> <span class="comment"></span>#define LIS3L02_WAKEUPSRC_ZL    0x10    <span class="comment">///&lt; LIS3L02 WAKEUPSRC Z Low Interrupt</span><a name="l00094"></a><a class="code" href="lis3l02_8h.html#a48">00094</a> <span class="comment"></span>#define LIS3L02_WAKEUPSRC_ZH    0x20    <span class="comment">///&lt; LIS3L02 WAKEUPSRC Z High Interrupt</span><a name="l00095"></a><a class="code" href="lis3l02_8h.html#a49">00095</a> <span class="comment"></span>#define LIS3L02_WAKEUPSRC_IA    0x40    <span class="comment">///&lt; LIS3L02 WAKEUPSRC Interrupt Active</span>00096 <span class="comment"></span>00097 <span class="comment">// LIS3L02 WAKEUPSRC register bit defines</span><a name="l00098"></a><a class="code" href="lis3l02_8h.html#a50">00098</a> <span class="preprocessor">#define LIS3L02_STATUS_XDA      0x01    </span><span class="comment">///&lt; LIS3L02 STATUS X New Data Available</span><a name="l00099"></a><a class="code" href="lis3l02_8h.html#a51">00099</a> <span class="comment"></span>#define LIS3L02_STATUS_YDA      0x02    <span class="comment">///&lt; LIS3L02 STATUS Y New Data Available</span><a name="l00100"></a><a class="code" href="lis3l02_8h.html#a52">00100</a> <span class="comment"></span>#define LIS3L02_STATUS_ZDA      0x04    <span class="comment">///&lt; LIS3L02 STATUS Z New Data Available</span><a name="l00101"></a><a class="code" href="lis3l02_8h.html#a53">00101</a> <span class="comment"></span>#define LIS3L02_STATUS_ZYXDA    0x08    <span class="comment">///&lt; LIS3L02 STATUS XYZ New Data Available</span><a name="l00102"></a><a class="code" href="lis3l02_8h.html#a54">00102</a> <span class="comment"></span>#define LIS3L02_STATUS_XOR      0x10    <span class="comment">///&lt; LIS3L02 STATUS X-axis Data Overrun</span><a name="l00103"></a><a class="code" href="lis3l02_8h.html#a55">00103</a> <span class="comment"></span>#define LIS3L02_STATUS_YOR      0x20    <span class="comment">///&lt; LIS3L02 STATUS Y-axis Data Overrun</span><a name="l00104"></a><a class="code" href="lis3l02_8h.html#a56">00104</a> <span class="comment"></span>#define LIS3L02_STATUS_ZOR      0x40    <span class="comment">///&lt; LIS3L02 STATUS Z-axis Data Overrun</span><a name="l00105"></a><a class="code" href="lis3l02_8h.html#a57">00105</a> <span class="comment"></span>#define LIS3L02_STATUS_ZYXOR    0x80    <span class="comment">///&lt; LIS3L02 STATUS XYZ-axis Data Overrun</span>00106 <span class="comment"></span>00107 <span class="comment">// functions</span>00108 <span class="comment"></span>00109 <span class="comment">//! Initialize the LIS3L02 chip.</span>00110 <span class="comment">/// returns:</span>00111 <span class="comment">/// 0 if successful, </span>00112 <span class="comment">/// non-zero if unsuccessful (chip not present).</span>00113 <span class="comment"></span>u08 <a class="code" href="lis3l02_8c.html#a0">lis3l02Init</a>(<span class="keywordtype">void</span>);00114 <span class="comment"></span>00115 <span class="comment">//! Reset the LIS3L02 chip.</span>00116 <span class="comment"></span>u08 <a class="code" href="lis3l02_8c.html#a1">lis3l02Reset</a>(<span class="keywordtype">void</span>);00117 <span class="comment"></span>00118 <span class="comment">//! Read a LIS3L02 register.</span>00119 <span class="comment"></span>u08 <a class="code" href="lis3l02_8c.html#a2">lis3l02ReadReg</a>(u08 reg);00120 <span class="comment"></span>00121 <span class="comment">//! Write a LIS3L02 register.</span>00122 <span class="comment"></span>u08 <a class="code" href="lis3l02_8c.html#a3">lis3l02WriteReg</a>(u08 reg, u08 data);00123 <span class="comment"></span>00124 <span class="comment">//! Get an acceleration reading from the LIS3L02 sensor.</span>00125 <span class="comment"></span>s16 <a class="code" href="lis3l02_8c.html#a4">lis3l02GetAccel</a>(u08 chxyz);00126 00127 <span class="preprocessor">#endif</span></pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:07 2006 for Procyon AVRlib by&nbsp;<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -