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

📄 lis3l02_8h-source.html

📁 avr应用测试程序
💻 HTML
📖 第 1 页 / 共 2 页
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>Procyon AVRlib: lis3l02.h Source File</title><link href="dox.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.2 --><div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div><h1>lis3l02.h</h1><a href="lis3l02_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment">00001 <span class="comment">/*! \file lis3l02.h \brief ST LIS3L02 3-axis I2C Accelerometer Library. */</span>00002 <span class="comment">//*****************************************************************************</span>00003 <span class="comment">//</span>00004 <span class="comment">// File Name    : 'lis3l02.h'</span>00005 <span class="comment">// Title        : ST LIS3L02 3-axis I2C Accelerometer Library</span>00006 <span class="comment">// Author       : Pascal Stang - Copyright (C) 2004</span>00007 <span class="comment">// Created      : 2004.10.23</span>00008 <span class="comment">// Revised      : 2004.12.14</span>00009 <span class="comment">// Version      : 0.1</span>00010 <span class="comment">// Target MCU   : Atmel AVR Series</span>00011 <span class="comment">// Editor Tabs  : 4</span>00012 <span class="comment">//</span>00013 <span class="comment">// NOTE: This code is currently below version 1.0, and therefore is considered</span>00014 <span class="comment">// to be lacking in some functionality or documentation, or may not be fully</span>00015 <span class="comment">// tested.  Nonetheless, you can expect most functions to work.</span>00016 <span class="comment">//</span><span class="comment"></span>00017 <span class="comment">/// \ingroup driver_hw</span>00018 <span class="comment">/// \defgroup lis3l02 ST LIS3L02 3-axis I2C Accelerometer Library (lis3l02.c)</span>00019 <span class="comment">/// \code #include "lis3l02.h" \endcode</span>00020 <span class="comment">/// \par Overview</span>00021 <span class="comment">///     This library provides an interface to the ST LIS3L02 integrated 3-axis</span>00022 <span class="comment">/// accelerometer.  The LIS3L02 has a built-in A/D converter to capture analog</span>00023 <span class="comment">/// acceleration data and make it available over an I2C interface.</span>00024 <span class="comment"></span><span class="comment">//</span>00025 <span class="comment">// This code is distributed under the GNU Public License</span>00026 <span class="comment">//      which can be found at http://www.gnu.org/licenses/gpl.txt</span>00027 <span class="comment">//</span>00028 <span class="comment">//*****************************************************************************</span>00029 00030 <span class="preprocessor">#ifndef LIS3L02_H</span>00031 <span class="preprocessor"></span><span class="preprocessor">#define LIS3L02_H</span>00032 <span class="preprocessor"></span>00033 <span class="preprocessor">#include "<a class="code" href="global_8h.html">global.h</a>"</span>00034 00035 <span class="comment">// constants/macros/typdefs</span><a name="l00036"></a><a class="code" href="lis3l02_8h.html#a0">00036</a> <span class="preprocessor">#define LIS3L02_I2C_ADDR        0x3A    </span><span class="comment">///&lt; Base I2C address of LIS3L02 device</span>00037 <span class="comment"></span>00038 <span class="comment">// LIS3L02 register address defines</span><a name="l00039"></a><a class="code" href="lis3l02_8h.html#a1">00039</a> <span class="preprocessor">#define LIS3L02_REG_OFFSETX     0x16    </span><span class="comment">///&lt; LIS3L02 X-axis digital offset trim</span><a name="l00040"></a><a class="code" href="lis3l02_8h.html#a2">00040</a> <span class="comment"></span>#define LIS3L02_REG_OFFSETY     0x17    <span class="comment">///&lt; LIS3L02 Y-axis digital offset trim</span><a name="l00041"></a><a class="code" href="lis3l02_8h.html#a3">00041</a> <span class="comment"></span>#define LIS3L02_REG_OFFSETZ     0x18    <span class="comment">///&lt; LIS3L02 Z-axis digital offset trim</span><a name="l00042"></a><a class="code" href="lis3l02_8h.html#a4">00042</a> <span class="comment"></span>#define LIS3L02_REG_GAINX       0x19    <span class="comment">///&lt; LIS3L02 X-axis digital gain trim</span><a name="l00043"></a><a class="code" href="lis3l02_8h.html#a5">00043</a> <span class="comment"></span>#define LIS3L02_REG_GAINY       0x1A    <span class="comment">///&lt; LIS3L02 Y-axis digital gain trim</span><a name="l00044"></a><a class="code" href="lis3l02_8h.html#a6">00044</a> <span class="comment"></span>#define LIS3L02_REG_GAINZ       0x1B    <span class="comment">///&lt; LIS3L02 Z-axis digital gain trim</span><a name="l00045"></a><a class="code" href="lis3l02_8h.html#a7">00045</a> <span class="comment"></span>#define LIS3L02_REG_CTRLREG1    0x20    <span class="comment">///&lt; LIS3L02 interface/operation control</span><a name="l00046"></a><a class="code" href="lis3l02_8h.html#a8">00046</a> <span class="comment"></span>#define LIS3L02_REG_CTRLREG2    0x21    <span class="comment">///&lt; LIS3L02 interface/operation control</span><a name="l00047"></a><a class="code" href="lis3l02_8h.html#a9">00047</a> <span class="comment"></span>#define LIS3L02_REG_WAKEUPCFG   0x23    <span class="comment">///&lt; LIS3L02 interrupt/wakeup config</span><a name="l00048"></a><a class="code" href="lis3l02_8h.html#a10">00048</a> <span class="comment"></span>#define LIS3L02_REG_WAKEUPSRC   0x24    <span class="comment">///&lt; LIS3L02 interrupt/wakeup source indicator</span><a name="l00049"></a><a class="code" href="lis3l02_8h.html#a11">00049</a> <span class="comment"></span>#define LIS3L02_REG_WAKEUPACK   0x25    <span class="comment">///&lt; LIS3L02 wakeup source clear</span><a name="l00050"></a><a class="code" href="lis3l02_8h.html#a12">00050</a> <span class="comment"></span>#define LIS3L02_REG_STATUS      0x27    <span class="comment">///&lt; LIS3L02 Accelerometer Status</span><a name="l00051"></a><a class="code" href="lis3l02_8h.html#a13">00051</a> <span class="comment"></span>#define LIS3L02_REG_OUTXL       0x28    <span class="comment">///&lt; LIS3L02 Accelerometer X Output Low-byte</span><a name="l00052"></a><a class="code" href="lis3l02_8h.html#a14">00052</a> <span class="comment"></span>#define LIS3L02_REG_OUTXH       0x29    <span class="comment">///&lt; LIS3L02 Accelerometer X Output High-byte</span><a name="l00053"></a><a class="code" href="lis3l02_8h.html#a15">00053</a> <span class="comment"></span>#define LIS3L02_REG_OUTYL       0x2A    <span class="comment">///&lt; LIS3L02 Accelerometer Y Output Low-byte</span><a name="l00054"></a><a class="code" href="lis3l02_8h.html#a16">00054</a> <span class="comment"></span>#define LIS3L02_REG_OUTYH       0x2B    <span class="comment">///&lt; LIS3L02 Accelerometer Y Output High-byte</span><a name="l00055"></a><a class="code" href="lis3l02_8h.html#a17">00055</a> <span class="comment"></span>#define LIS3L02_REG_OUTZL       0x2C    <span class="comment">///&lt; LIS3L02 Accelerometer Z Output Low-byte</span><a name="l00056"></a><a class="code" href="lis3l02_8h.html#a18">00056</a> <span class="comment"></span>#define LIS3L02_REG_OUTZH       0x2D    <span class="comment">///&lt; LIS3L02 Accelerometer Z Output High-byte</span><a name="l00057"></a><a class="code" href="lis3l02_8h.html#a19">00057</a> <span class="comment"></span>#define LIS3L02_REG_THSL        0x2E    <span class="comment">///&lt; LIS3L02 Accelerometer Threshold Low-byte</span><a name="l00058"></a><a class="code" href="lis3l02_8h.html#a20">00058</a> <span class="comment"></span>#define LIS3L02_REG_THSH        0x2F    <span class="comment">///&lt; LIS3L02 Accelerometer Threshold High-byte</span><a name="l00059"></a><a class="code" href="lis3l02_8h.html#a21">00059</a> <span class="comment"></span>#define LIS3L02_REG_MULTIREAD   0x80    <span class="comment">///&lt; LIS3L02 Mutliple Read Bit</span>00060 <span class="comment"></span>00061 <span class="comment">// LIS3L02 control register 1 bit defines</span><a name="l00062"></a><a class="code" href="lis3l02_8h.html#a22">00062</a> <span class="preprocessor">#define LIS3L02_CTRLREG1_XEN    0x01    </span><span class="comment">///&lt; LIS3L02 CtrlReg1 X-axis Enable</span><a name="l00063"></a><a class="code" href="lis3l02_8h.html#a23">00063</a> <span class="comment"></span>#define LIS3L02_CTRLREG1_YEN    0x02    <span class="comment">///&lt; LIS3L02 CtrlReg1 Y-axis Enable</span>

⌨️ 快捷键说明

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