Line No. | Rev | Author | Line |
---|---|---|---|
1 | 6 | kaklik | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 | <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> |
||
3 | <title>Procyon AVRlib: TI ADS7870 SPI A/D Converter Driver (ads7870.c)</title> |
||
4 | <link href="dox.css" rel="stylesheet" type="text/css"> |
||
5 | </head><body> |
||
6 | <!-- Generated by Doxygen 1.4.2 --> |
||
7 | <div class="qindex"><a class="qindex" href="main.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="annotated.html">Data Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File List</a> | <a class="qindex" href="functions.html">Data Fields</a> | <a class="qindex" href="globals.html">Globals</a> | <a class="qindex" href="pages.html">Related Pages</a></div> |
||
8 | <h1>TI ADS7870 SPI A/D Converter Driver (ads7870.c)<br> |
||
9 | <small> |
||
10 | [<a class="el" href="group__driver__hw.html">Drivers (for external hardware)</a>]</small> |
||
11 | </h1><hr><a name="_details"></a><h2>Detailed Description</h2> |
||
12 | <div class="fragment"><pre class="fragment"><span class="preprocessor"> #include "<a class="code" href="ads7870_8h.html">ads7870.h</a>"</span> |
||
13 | </pre></div> <dl compact><dt><b>Overview</b></dt><dd>This library provides high-level functions for accessing the Texas Instruments ADS7870 I2C A/D Converter.</dd></dl> |
||
14 | The basic specs of the ADS7870 are:<ul> |
||
15 | <li>Fast SPI interface (up to 20MHz)</li><li>12-bit results</li><li>8 single-ended or 4 differential input channels</li><li>Programmable gain stage (1,2,4,5,8,10,16,20x gains)</li><li>Software or hardware triggered conversion</li><li>4-bit auxiliary digital I/O lines (controlled via serial interface)</li><li>Up to 50KHz conversion rate</li><li>External reference or internal 2.5V, 2.048V, 1.15V reference</li><li>NOTE: use pin-compatible ADS7871 for 14-bit results </li></ul> |
||
16 | |||
17 | <p> |
||
18 | <table border="0" cellpadding="0" cellspacing="0"> |
||
19 | <tr><td></td></tr> |
||
20 | <tr><td colspan="2"><br><h2>Defines</h2></td></tr> |
||
21 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga6" doxytag="ads7870::ADS7870_CS_PORT"></a> |
||
22 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CS_PORT</b> PORTB</td></tr> |
||
23 | |||
24 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga7" doxytag="ads7870::ADS7870_CS_DDR"></a> |
||
25 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CS_DDR</b> DDRB</td></tr> |
||
26 | |||
27 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga8" doxytag="ads7870::ADS7870_CS_PIN"></a> |
||
28 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CS_PIN</b> PB0</td></tr> |
||
29 | |||
30 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga9" doxytag="ads7870::ADS7870_CONVERT"></a> |
||
31 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CONVERT</b> 0x80</td></tr> |
||
32 | |||
33 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga10" doxytag="ads7870::ADS7870_REG_READ"></a> |
||
34 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_REG_READ</b> 0x40</td></tr> |
||
35 | |||
36 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga11" doxytag="ads7870::ADS7870_REG_WRITE"></a> |
||
37 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_REG_WRITE</b> 0x00</td></tr> |
||
38 | |||
39 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga12" doxytag="ads7870::ADS7870_REG_16BIT"></a> |
||
40 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_REG_16BIT</b> 0x20</td></tr> |
||
41 | |||
42 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga13" doxytag="ads7870::ADS7870_RESULTLO"></a> |
||
43 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_RESULTLO</b> 0x00</td></tr> |
||
44 | |||
45 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga14" doxytag="ads7870::ADS7870_RESULTHI"></a> |
||
46 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_RESULTHI</b> 0x01</td></tr> |
||
47 | |||
48 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga15" doxytag="ads7870::ADS7870_PGAVALID"></a> |
||
49 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_PGAVALID</b> 0x02</td></tr> |
||
50 | |||
51 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga16" doxytag="ads7870::ADS7870_ADCTRL"></a> |
||
52 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_ADCTRL</b> 0x03</td></tr> |
||
53 | |||
54 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga17" doxytag="ads7870::ADS7870_GAINMUX"></a> |
||
55 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_GAINMUX</b> 0x04</td></tr> |
||
56 | |||
57 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga18" doxytag="ads7870::ADS7870_DIGIOSTATE"></a> |
||
58 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_DIGIOSTATE</b> 0x05</td></tr> |
||
59 | |||
60 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga19" doxytag="ads7870::ADS7870_DIGIOCTRL"></a> |
||
61 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_DIGIOCTRL</b> 0x06</td></tr> |
||
62 | |||
63 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga20" doxytag="ads7870::ADS7870_REFOSC"></a> |
||
64 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_REFOSC</b> 0x07</td></tr> |
||
65 | |||
66 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga21" doxytag="ads7870::ADS7870_SERIFCTRL"></a> |
||
67 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_SERIFCTRL</b> 0x18</td></tr> |
||
68 | |||
69 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga22" doxytag="ads7870::ADS7870_ID"></a> |
||
70 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_ID</b> 0x1F</td></tr> |
||
71 | |||
72 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga23" doxytag="ads7870::ADS7870_RESULTLO_OVR"></a> |
||
73 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_RESULTLO_OVR</b> 0x01</td></tr> |
||
74 | |||
75 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga24" doxytag="ads7870::ADS7870_ADCTRL_BIN"></a> |
||
76 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_ADCTRL_BIN</b> 0x20</td></tr> |
||
77 | |||
78 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga25" doxytag="ads7870::ADS7870_ADCTRL_RMB1"></a> |
||
79 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_ADCTRL_RMB1</b> 0x08</td></tr> |
||
80 | |||
81 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga26" doxytag="ads7870::ADS7870_ADCTRL_RMB0"></a> |
||
82 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_ADCTRL_RMB0</b> 0x04</td></tr> |
||
83 | |||
84 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga27" doxytag="ads7870::ADS7870_ADCTRL_CFD1"></a> |
||
85 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_ADCTRL_CFD1</b> 0x02</td></tr> |
||
86 | |||
87 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga28" doxytag="ads7870::ADS7870_ADCTRL_CFD0"></a> |
||
88 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_ADCTRL_CFD0</b> 0x01</td></tr> |
||
89 | |||
90 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga29" doxytag="ads7870::ADS7870_GAINMUX_CNVBSY"></a> |
||
91 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_GAINMUX_CNVBSY</b> 0x80</td></tr> |
||
92 | |||
93 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga30" doxytag="ads7870::ADS7870_REFOSC_OSCR"></a> |
||
94 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_REFOSC_OSCR</b> 0x20</td></tr> |
||
95 | |||
96 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga31" doxytag="ads7870::ADS7870_REFOSC_OSCE"></a> |
||
97 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_REFOSC_OSCE</b> 0x10</td></tr> |
||
98 | |||
99 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga32" doxytag="ads7870::ADS7870_REFOSC_REFE"></a> |
||
100 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_REFOSC_REFE</b> 0x08</td></tr> |
||
101 | |||
102 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga33" doxytag="ads7870::ADS7870_REFOSC_BUFE"></a> |
||
103 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_REFOSC_BUFE</b> 0x04</td></tr> |
||
104 | |||
105 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga34" doxytag="ads7870::ADS7870_REFOSC_R2V"></a> |
||
106 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_REFOSC_R2V</b> 0x02</td></tr> |
||
107 | |||
108 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga35" doxytag="ads7870::ADS7870_REFOSC_RBG"></a> |
||
109 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_REFOSC_RBG</b> 0x01</td></tr> |
||
110 | |||
111 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga36" doxytag="ads7870::ADS7870_SERIFCTRL_LSB"></a> |
||
112 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_SERIFCTRL_LSB</b> 0x01</td></tr> |
||
113 | |||
114 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga37" doxytag="ads7870::ADS7870_SERIFCTRL_2W3W"></a> |
||
115 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_SERIFCTRL_2W3W</b> 0x02</td></tr> |
||
116 | |||
117 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga38" doxytag="ads7870::ADS7870_SERIFCTRL_8051"></a> |
||
118 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_SERIFCTRL_8051</b> 0x04</td></tr> |
||
119 | |||
120 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga39" doxytag="ads7870::ADS7870_ID_VALUE"></a> |
||
121 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_ID_VALUE</b> 0x01</td></tr> |
||
122 | |||
123 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga40" doxytag="ads7870::ADS7870_GAIN_1X"></a> |
||
124 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_GAIN_1X</b> 0x00</td></tr> |
||
125 | |||
126 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga41" doxytag="ads7870::ADS7870_GAIN_2X"></a> |
||
127 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_GAIN_2X</b> 0x10</td></tr> |
||
128 | |||
129 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga42" doxytag="ads7870::ADS7870_GAIN_4X"></a> |
||
130 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_GAIN_4X</b> 0x20</td></tr> |
||
131 | |||
132 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga43" doxytag="ads7870::ADS7870_GAIN_5X"></a> |
||
133 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_GAIN_5X</b> 0x30</td></tr> |
||
134 | |||
135 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga44" doxytag="ads7870::ADS7870_GAIN_8X"></a> |
||
136 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_GAIN_8X</b> 0x40</td></tr> |
||
137 | |||
138 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga45" doxytag="ads7870::ADS7870_GAIN_10X"></a> |
||
139 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_GAIN_10X</b> 0x50</td></tr> |
||
140 | |||
141 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga46" doxytag="ads7870::ADS7870_GAIN_16X"></a> |
||
142 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_GAIN_16X</b> 0x60</td></tr> |
||
143 | |||
144 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga47" doxytag="ads7870::ADS7870_GAIN_20X"></a> |
||
145 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_GAIN_20X</b> 0x70</td></tr> |
||
146 | |||
147 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga48" doxytag="ads7870::ADS7870_CH_0_1_DIFF"></a> |
||
148 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_0_1_DIFF</b> 0x00</td></tr> |
||
149 | |||
150 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga49" doxytag="ads7870::ADS7870_CH_2_3_DIFF"></a> |
||
151 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_2_3_DIFF</b> 0x01</td></tr> |
||
152 | |||
153 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga50" doxytag="ads7870::ADS7870_CH_4_5_DIFF"></a> |
||
154 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_4_5_DIFF</b> 0x02</td></tr> |
||
155 | |||
156 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga51" doxytag="ads7870::ADS7870_CH_6_7_DIFF"></a> |
||
157 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_6_7_DIFF</b> 0x03</td></tr> |
||
158 | |||
159 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga52" doxytag="ads7870::ADS7870_CH_1_0_DIFF"></a> |
||
160 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_1_0_DIFF</b> 0x04</td></tr> |
||
161 | |||
162 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga53" doxytag="ads7870::ADS7870_CH_3_2_DIFF"></a> |
||
163 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_3_2_DIFF</b> 0x05</td></tr> |
||
164 | |||
165 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga54" doxytag="ads7870::ADS7870_CH_5_4_DIFF"></a> |
||
166 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_5_4_DIFF</b> 0x06</td></tr> |
||
167 | |||
168 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga55" doxytag="ads7870::ADS7870_CH_7_6_DIFF"></a> |
||
169 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_7_6_DIFF</b> 0x07</td></tr> |
||
170 | |||
171 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga56" doxytag="ads7870::ADS7870_CH_SINGLE_ENDED"></a> |
||
172 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_SINGLE_ENDED</b> 0x08</td></tr> |
||
173 | |||
174 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga57" doxytag="ads7870::ADS7870_CH_0"></a> |
||
175 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_0</b> 0x08</td></tr> |
||
176 | |||
177 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga58" doxytag="ads7870::ADS7870_CH_1"></a> |
||
178 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_1</b> 0x09</td></tr> |
||
179 | |||
180 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga59" doxytag="ads7870::ADS7870_CH_2"></a> |
||
181 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_2</b> 0x0A</td></tr> |
||
182 | |||
183 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga60" doxytag="ads7870::ADS7870_CH_3"></a> |
||
184 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_3</b> 0x0B</td></tr> |
||
185 | |||
186 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga61" doxytag="ads7870::ADS7870_CH_4"></a> |
||
187 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_4</b> 0x0C</td></tr> |
||
188 | |||
189 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga62" doxytag="ads7870::ADS7870_CH_5"></a> |
||
190 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_5</b> 0x0D</td></tr> |
||
191 | |||
192 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga63" doxytag="ads7870::ADS7870_CH_6"></a> |
||
193 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_6</b> 0x0E</td></tr> |
||
194 | |||
195 | <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ga64" doxytag="ads7870::ADS7870_CH_7"></a> |
||
196 | #define </td><td class="memItemRight" valign="bottom"><b>ADS7870_CH_7</b> 0x0F</td></tr> |
||
197 | |||
198 | <tr><td colspan="2"><br><h2>Functions</h2></td></tr> |
||
199 | <tr><td class="memItemLeft" nowrap align="right" valign="top">u08 </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ads7870.html#ga0">ads7870Init</a> (void)</td></tr> |
||
200 | |||
201 | <tr><td class="memItemLeft" nowrap align="right" valign="top">s16 </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ads7870.html#ga1">ads7870Convert</a> (u08 channel)</td></tr> |
||
202 | |||
203 | <tr><td class="memItemLeft" nowrap align="right" valign="top">s16 </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ads7870.html#ga2">ads7870ConvertDiff</a> (u08 channel)</td></tr> |
||
204 | |||
205 | <tr><td class="memItemLeft" nowrap align="right" valign="top">s16 </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ads7870.html#ga3">ads7870ConvertRaw</a> (u08 channel)</td></tr> |
||
206 | |||
207 | <tr><td class="memItemLeft" nowrap align="right" valign="top">u08 </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ads7870.html#ga4">ads7870ReadReg</a> (u08 reg)</td></tr> |
||
208 | |||
209 | <tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ads7870.html#ga5">ads7870WriteReg</a> (u08 reg, u08 value)</td></tr> |
||
210 | |||
211 | </table> |
||
212 | <hr><h2>Function Documentation</h2> |
||
213 | <a class="anchor" name="ga1" doxytag="ads7870.h::ads7870Convert"></a><p> |
||
214 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
||
215 | <tr> |
||
216 | <td class="mdRow"> |
||
217 | <table cellpadding="0" cellspacing="0" border="0"> |
||
218 | <tr> |
||
219 | <td class="md" nowrap valign="top">s16 ads7870Convert </td> |
||
220 | <td class="md" valign="top">( </td> |
||
221 | <td class="md" nowrap valign="top">u08 </td> |
||
222 | <td class="mdname1" valign="top" nowrap> <em>channel</em> </td> |
||
223 | <td class="md" valign="top"> ) </td> |
||
224 | <td class="md" nowrap></td> |
||
225 | </tr> |
||
226 | </table> |
||
227 | </td> |
||
228 | </tr> |
||
229 | </table> |
||
230 | <table cellspacing="5" cellpadding="0" border="0"> |
||
231 | <tr> |
||
232 | <td> |
||
233 | |
||
234 | </td> |
||
235 | <td> |
||
236 | |||
237 | <p> |
||
238 | Begin single-ended conversion on given logical channel#0-7, and return result. <dl compact><dt><b>Note:</b></dt><dd>Result is returned left-justified. </dd></dl> |
||
239 | |||
240 | <p> |
||
241 | Definition at line <a class="el" href="ads7870_8c-source.html#l00056">56</a> of file <a class="el" href="ads7870_8c-source.html">ads7870.c</a>. </td> |
||
242 | </tr> |
||
243 | </table> |
||
244 | <a class="anchor" name="ga2" doxytag="ads7870.h::ads7870ConvertDiff"></a><p> |
||
245 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
||
246 | <tr> |
||
247 | <td class="mdRow"> |
||
248 | <table cellpadding="0" cellspacing="0" border="0"> |
||
249 | <tr> |
||
250 | <td class="md" nowrap valign="top">s16 ads7870ConvertDiff </td> |
||
251 | <td class="md" valign="top">( </td> |
||
252 | <td class="md" nowrap valign="top">u08 </td> |
||
253 | <td class="mdname1" valign="top" nowrap> <em>channel</em> </td> |
||
254 | <td class="md" valign="top"> ) </td> |
||
255 | <td class="md" nowrap></td> |
||
256 | </tr> |
||
257 | </table> |
||
258 | </td> |
||
259 | </tr> |
||
260 | </table> |
||
261 | <table cellspacing="5" cellpadding="0" border="0"> |
||
262 | <tr> |
||
263 | <td> |
||
264 | |
||
265 | </td> |
||
266 | <td> |
||
267 | |||
268 | <p> |
||
269 | Begin differential conversion on given channel pair, and return result. <dl compact><dt><b>Note:</b></dt><dd>Result is returned left-justified. </dd></dl> |
||
270 | |||
271 | <p> |
||
272 | Definition at line <a class="el" href="ads7870_8c-source.html#l00064">64</a> of file <a class="el" href="ads7870_8c-source.html">ads7870.c</a>. </td> |
||
273 | </tr> |
||
274 | </table> |
||
275 | <a class="anchor" name="ga3" doxytag="ads7870.h::ads7870ConvertRaw"></a><p> |
||
276 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
||
277 | <tr> |
||
278 | <td class="mdRow"> |
||
279 | <table cellpadding="0" cellspacing="0" border="0"> |
||
280 | <tr> |
||
281 | <td class="md" nowrap valign="top">s16 ads7870ConvertRaw </td> |
||
282 | <td class="md" valign="top">( </td> |
||
283 | <td class="md" nowrap valign="top">u08 </td> |
||
284 | <td class="mdname1" valign="top" nowrap> <em>channel</em> </td> |
||
285 | <td class="md" valign="top"> ) </td> |
||
286 | <td class="md" nowrap></td> |
||
287 | </tr> |
||
288 | </table> |
||
289 | </td> |
||
290 | </tr> |
||
291 | </table> |
||
292 | <table cellspacing="5" cellpadding="0" border="0"> |
||
293 | <tr> |
||
294 | <td> |
||
295 | |
||
296 | </td> |
||
297 | <td> |
||
298 | |||
299 | <p> |
||
300 | Begin conversion on given raw channel#, and return result. <dl compact><dt><b>Note:</b></dt><dd>Result is returned left-justified. </dd></dl> |
||
301 | |||
302 | <p> |
||
303 | Definition at line <a class="el" href="ads7870_8c-source.html#l00072">72</a> of file <a class="el" href="ads7870_8c-source.html">ads7870.c</a>. </td> |
||
304 | </tr> |
||
305 | </table> |
||
306 | <a class="anchor" name="ga0" doxytag="ads7870.h::ads7870Init"></a><p> |
||
307 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
||
308 | <tr> |
||
309 | <td class="mdRow"> |
||
310 | <table cellpadding="0" cellspacing="0" border="0"> |
||
311 | <tr> |
||
312 | <td class="md" nowrap valign="top">u08 ads7870Init </td> |
||
313 | <td class="md" valign="top">( </td> |
||
314 | <td class="md" nowrap valign="top">void </td> |
||
315 | <td class="mdname1" valign="top" nowrap> </td> |
||
316 | <td class="md" valign="top"> ) </td> |
||
317 | <td class="md" nowrap></td> |
||
318 | </tr> |
||
319 | </table> |
||
320 | </td> |
||
321 | </tr> |
||
322 | </table> |
||
323 | <table cellspacing="5" cellpadding="0" border="0"> |
||
324 | <tr> |
||
325 | <td> |
||
326 | |
||
327 | </td> |
||
328 | <td> |
||
329 | |||
330 | <p> |
||
331 | Initialize the ADS7870 chip. Returns: TRUE if successful, FALSE if unsuccessful (chip not responding). |
||
332 | <p> |
||
333 | Definition at line <a class="el" href="ads7870_8c-source.html#l00032">32</a> of file <a class="el" href="ads7870_8c-source.html">ads7870.c</a>. </td> |
||
334 | </tr> |
||
335 | </table> |
||
336 | <a class="anchor" name="ga4" doxytag="ads7870.h::ads7870ReadReg"></a><p> |
||
337 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
||
338 | <tr> |
||
339 | <td class="mdRow"> |
||
340 | <table cellpadding="0" cellspacing="0" border="0"> |
||
341 | <tr> |
||
342 | <td class="md" nowrap valign="top">u08 ads7870ReadReg </td> |
||
343 | <td class="md" valign="top">( </td> |
||
344 | <td class="md" nowrap valign="top">u08 </td> |
||
345 | <td class="mdname1" valign="top" nowrap> <em>reg</em> </td> |
||
346 | <td class="md" valign="top"> ) </td> |
||
347 | <td class="md" nowrap></td> |
||
348 | </tr> |
||
349 | </table> |
||
350 | </td> |
||
351 | </tr> |
||
352 | </table> |
||
353 | <table cellspacing="5" cellpadding="0" border="0"> |
||
354 | <tr> |
||
355 | <td> |
||
356 | |
||
357 | </td> |
||
358 | <td> |
||
359 | |||
360 | <p> |
||
361 | Read value from ADS7870 register. |
||
362 | <p> |
||
363 | Definition at line <a class="el" href="ads7870_8c-source.html#l00093">93</a> of file <a class="el" href="ads7870_8c-source.html">ads7870.c</a>. </td> |
||
364 | </tr> |
||
365 | </table> |
||
366 | <a class="anchor" name="ga5" doxytag="ads7870.h::ads7870WriteReg"></a><p> |
||
367 | <table class="mdTable" cellpadding="2" cellspacing="0"> |
||
368 | <tr> |
||
369 | <td class="mdRow"> |
||
370 | <table cellpadding="0" cellspacing="0" border="0"> |
||
371 | <tr> |
||
372 | <td class="md" nowrap valign="top">void ads7870WriteReg </td> |
||
373 | <td class="md" valign="top">( </td> |
||
374 | <td class="md" nowrap valign="top">u08 </td> |
||
375 | <td class="mdname" nowrap> <em>reg</em>, </td> |
||
376 | </tr> |
||
377 | <tr> |
||
378 | <td class="md" nowrap align="right"></td> |
||
379 | <td class="md"></td> |
||
380 | <td class="md" nowrap>u08 </td> |
||
381 | <td class="mdname" nowrap> <em>value</em></td> |
||
382 | </tr> |
||
383 | <tr> |
||
384 | <td class="md"></td> |
||
385 | <td class="md">) </td> |
||
386 | <td class="md" colspan="2"></td> |
||
387 | </tr> |
||
388 | </table> |
||
389 | </td> |
||
390 | </tr> |
||
391 | </table> |
||
392 | <table cellspacing="5" cellpadding="0" border="0"> |
||
393 | <tr> |
||
394 | <td> |
||
395 | |
||
396 | </td> |
||
397 | <td> |
||
398 | |||
399 | <p> |
||
400 | Write value into ADS7870 register. |
||
401 | <p> |
||
402 | Definition at line <a class="el" href="ads7870_8c-source.html#l00108">108</a> of file <a class="el" href="ads7870_8c-source.html">ads7870.c</a>. </td> |
||
403 | </tr> |
||
404 | </table> |
||
405 | <hr size="1"><address style="align: right;"><small>Generated on Sun Oct 29 03:41:09 2006 for Procyon AVRlib by |
||
406 | <a href="http://www.doxygen.org/index.html"> |
||
407 | <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.2 </small></address> |
||
408 | </body> |
||
409 | </html> |
Powered by WebSVN v2.8.3