File: channel__range_8h-source.html

package info (click to toggle)
xenomai 2.5.4-3squeeze1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 36,140 kB
  • ctags: 35,509
  • sloc: ansic: 109,084; sh: 11,745; makefile: 2,205; xml: 1,356; asm: 613; php: 316; perl: 155
file content (148 lines) | stat: -rw-r--r-- 15,947 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Xenomai API: include/analogy/channel_range.h Source File</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.6 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    <li>
      <form action="search.php" method="get">
        <table cellspacing="0" cellpadding="0" border="0">
          <tr>
            <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
            <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
          </tr>
        </table>
      </form>
    </li>
    </ul>
  </div>
<h1>include/analogy/channel_range.h</h1><a href="channel__range_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 
<a name="l00023"></a>00023 <span class="preprocessor">#ifndef __ANALOGY_CHANNEL_RANGE__</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define __ANALOGY_CHANNEL_RANGE__</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00026"></a>00026 <span class="preprocessor">#if __GNUC__ &gt;= 3</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define GCC_ZERO_LENGTH_ARRAY</span>
<a name="l00028"></a>00028 <span class="preprocessor"></span><span class="preprocessor">#else</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define GCC_ZERO_LENGTH_ARRAY 0</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00031"></a>00031 <span class="preprocessor"></span>
<a name="l00128"></a>00128 <span class="comment">/* --- Channel section --- */</span>
<a name="l00129"></a>00129 
<a name="l00139"></a><a class="code" href="group__channelrange.html#g910bc672f6e55346643f9c69d175134f">00139</a> <span class="preprocessor">#define A4L_CHAN_AREF_GROUND 0x1</span>
<a name="l00140"></a>00140 <span class="preprocessor"></span>
<a name="l00143"></a><a class="code" href="group__channelrange.html#g7f3e39e0773ea29526aa72497a738474">00143</a> <span class="preprocessor">#define A4L_CHAN_AREF_COMMON 0x2</span>
<a name="l00144"></a>00144 <span class="preprocessor"></span>
<a name="l00147"></a><a class="code" href="group__channelrange.html#g8e544207dc38e33b48d5cc35f8a62846">00147</a> <span class="preprocessor">#define A4L_CHAN_AREF_DIFF 0x4</span>
<a name="l00148"></a>00148 <span class="preprocessor"></span>
<a name="l00151"></a><a class="code" href="group__channelrange.html#gc53c87ed54169ca73244961fa5089331">00151</a> <span class="preprocessor">#define A4L_CHAN_AREF_OTHER 0x8</span>
<a name="l00152"></a>00152 <span class="preprocessor"></span>
<a name="l00158"></a><a class="code" href="group__channelrange.html#g8c3a61f5ed001486d244d26c60915552">00158</a> <span class="preprocessor">#define A4L_CHAN_GLOBAL 0x10</span>
<a name="l00159"></a>00159 <span class="preprocessor"></span>
<a name="l00164"></a><a class="code" href="structa4l__channel.html">00164</a> <span class="keyword">struct </span><a class="code" href="structa4l__channel.html" title="Structure describing some channel&amp;#39;s characteristics.">a4l_channel</a> {
<a name="l00165"></a><a class="code" href="structa4l__channel.html#629fd5faa5d0ea2d47aed56d96edc851">00165</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="structa4l__channel.html#629fd5faa5d0ea2d47aed56d96edc851">flags</a>; 
<a name="l00166"></a><a class="code" href="structa4l__channel.html#592787623448a2c5d4d74a53b523c90d">00166</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="structa4l__channel.html#592787623448a2c5d4d74a53b523c90d">nb_bits</a>; 
<a name="l00167"></a>00167 };
<a name="l00168"></a>00168 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structa4l__channel.html" title="Structure describing some channel&amp;#39;s characteristics.">a4l_channel</a> <a class="code" href="structa4l__channel.html" title="Structure describing some channel&amp;#39;s characteristics.">a4l_chan_t</a>;
<a name="l00169"></a>00169 
<a name="l00181"></a><a class="code" href="group__channelrange.html#g516bba6698176241370dabf67868b565">00181</a> <span class="preprocessor">#define A4L_CHAN_GLOBAL_CHANDESC 0</span>
<a name="l00182"></a>00182 <span class="preprocessor"></span>
<a name="l00185"></a><a class="code" href="group__channelrange.html#gcc93cd2c7eeac7ed4b26ffdb3b9622d2">00185</a> <span class="preprocessor">#define A4L_CHAN_PERCHAN_CHANDESC 1</span>
<a name="l00186"></a>00186 <span class="preprocessor"></span>
<a name="l00193"></a><a class="code" href="structa4l__channels__desc.html">00193</a> <span class="keyword">struct </span><a class="code" href="structa4l__channels__desc.html" title="Structure describing a channels set.">a4l_channels_desc</a> {
<a name="l00194"></a><a class="code" href="structa4l__channels__desc.html#8e19986b80e020e6c419ff0ddd87aa31">00194</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="structa4l__channels__desc.html#8e19986b80e020e6c419ff0ddd87aa31">mode</a>; 
<a name="l00195"></a><a class="code" href="structa4l__channels__desc.html#243b1f336bb8963b6bd55b7b6d202700">00195</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="structa4l__channels__desc.html#243b1f336bb8963b6bd55b7b6d202700">length</a>; 
<a name="l00196"></a><a class="code" href="structa4l__channels__desc.html#64137ea7eaf47b8547fe1017e5e6909f">00196</a>         <a class="code" href="structa4l__channel.html" title="Structure describing some channel&amp;#39;s characteristics.">a4l_chan_t</a> <a class="code" href="structa4l__channels__desc.html#64137ea7eaf47b8547fe1017e5e6909f">chans</a>[GCC_ZERO_LENGTH_ARRAY]; 
<a name="l00197"></a>00197 };
<a name="l00198"></a>00198 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structa4l__channels__desc.html" title="Structure describing a channels set.">a4l_channels_desc</a> <a class="code" href="structa4l__channels__desc.html" title="Structure describing a channels set.">a4l_chdesc_t</a>;
<a name="l00199"></a>00199 
<a name="l00200"></a>00200 <span class="comment">/* --- Range section --- */</span>
<a name="l00201"></a>00201 
<a name="l00204"></a><a class="code" href="group__channelrange.html#g0a6e191046fb86c68ca3fb24cbff8fe8">00204</a> <span class="preprocessor">#define A4L_RNG_FACTOR 1000000</span>
<a name="l00205"></a>00205 <span class="preprocessor"></span>
<a name="l00209"></a><a class="code" href="group__channelrange.html#gb98b3cfc59541c6af311aeb6b52ff813">00209</a> <span class="preprocessor">#define A4L_RNG_VOLT_UNIT 0x0</span>
<a name="l00210"></a>00210 <span class="preprocessor"></span>
<a name="l00213"></a><a class="code" href="group__channelrange.html#gf116b68a39fa375929c2f121b108ec84">00213</a> <span class="preprocessor">#define A4L_RNG_MAMP_UNIT 0x1</span>
<a name="l00214"></a>00214 <span class="preprocessor"></span>
<a name="l00217"></a><a class="code" href="group__channelrange.html#gbe170a121b3315a6f29be6a350bd1de6">00217</a> <span class="preprocessor">#define A4L_RNG_NO_UNIT 0x2</span>
<a name="l00218"></a>00218 <span class="preprocessor"></span>
<a name="l00221"></a><a class="code" href="group__channelrange.html#ge66f382921343a8c186f6f0668ab52e0">00221</a> <span class="preprocessor">#define A4L_RNG_EXT_UNIT 0x4</span>
<a name="l00222"></a>00222 <span class="preprocessor"></span>
<a name="l00225"></a><a class="code" href="group__channelrange.html#gf7d0075068143351a7e34a660369cec2">00225</a> <span class="preprocessor">#define A4L_RNG_UNIT(x) (x &amp; (A4L_RNG_VOLT_UNIT |       \</span>
<a name="l00226"></a>00226 <span class="preprocessor">                              A4L_RNG_MAMP_UNIT |       \</span>
<a name="l00227"></a>00227 <span class="preprocessor">                              A4L_RNG_NO_UNIT |         \</span>
<a name="l00228"></a>00228 <span class="preprocessor">                              A4L_RNG_EXT_UNIT))</span>
<a name="l00229"></a>00229 <span class="preprocessor"></span>
<a name="l00233"></a><a class="code" href="group__channelrange.html#g59c40f7bdf368265e66c6e9a80ffa862">00233</a> <span class="preprocessor">#define A4L_RNG_GLOBAL 0x8</span>
<a name="l00234"></a>00234 <span class="preprocessor"></span>
<a name="l00239"></a><a class="code" href="structa4l__range.html">00239</a> <span class="keyword">struct </span><a class="code" href="structa4l__range.html" title="Structure describing a (unique) range.">a4l_range</a> {
<a name="l00240"></a><a class="code" href="structa4l__range.html#81c139fc8dda69559c9a4d2e4a9a3465">00240</a>         <span class="keywordtype">long</span> <a class="code" href="structa4l__range.html#81c139fc8dda69559c9a4d2e4a9a3465">min</a>; 
<a name="l00241"></a><a class="code" href="structa4l__range.html#e6ae7be4195c43f3f56b312dd46c55a1">00241</a>         <span class="keywordtype">long</span> <a class="code" href="structa4l__range.html#e6ae7be4195c43f3f56b312dd46c55a1">max</a>; 
<a name="l00242"></a><a class="code" href="structa4l__range.html#7504ba2a31c4c0dabd67f5f7a8b660b3">00242</a>         <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="structa4l__range.html#7504ba2a31c4c0dabd67f5f7a8b660b3">flags</a>; 
<a name="l00243"></a>00243 };
<a name="l00244"></a>00244 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structa4l__range.html" title="Structure describing a (unique) range.">a4l_range</a> <a class="code" href="structa4l__range.html" title="Structure describing a (unique) range.">a4l_rng_t</a>;
<a name="l00245"></a>00245 
<a name="l00249"></a><a class="code" href="group__channelrange.html#g9cb4bca9f87b9fb4a34d0db84323e32d">00249</a> <span class="preprocessor">#define RANGE(x,y) {(x * A4L_RNG_FACTOR), (y * A4L_RNG_FACTOR), \</span>
<a name="l00250"></a>00250 <span class="preprocessor">                        A4L_RNG_NO_UNIT}</span>
<a name="l00251"></a>00251 <span class="preprocessor"></span>
<a name="l00254"></a><a class="code" href="group__channelrange.html#g83f988df3128b75fe9b112eb1805d528">00254</a> <span class="preprocessor">#define RANGE_V(x,y) {(x * A4L_RNG_FACTOR),(y * A4L_RNG_FACTOR), \</span>
<a name="l00255"></a>00255 <span class="preprocessor">                        A4L_RNG_VOLT_UNIT}</span>
<a name="l00256"></a>00256 <span class="preprocessor"></span>
<a name="l00259"></a><a class="code" href="group__channelrange.html#g6d9b9f63e82704bf3b7d421bf81e09a5">00259</a> <span class="preprocessor">#define RANGE_mA(x,y) {(x * A4L_RNG_FACTOR),(y * A4L_RNG_FACTOR), \</span>
<a name="l00260"></a>00260 <span class="preprocessor">                        A4L_RNG_MAMP_UNIT}</span>
<a name="l00261"></a>00261 <span class="preprocessor"></span>
<a name="l00264"></a><a class="code" href="group__channelrange.html#gf2ad48e400262267fe1b82c7bf36ed8d">00264</a> <span class="preprocessor">#define RANGE_ext(x,y) {(x * A4L_RNG_FACTOR),(y * A4L_RNG_FACTOR), \</span>
<a name="l00265"></a>00265 <span class="preprocessor">                        A4L_RNG_EXT_UNIT}</span>
<a name="l00266"></a>00266 <span class="preprocessor"></span>
<a name="l00267"></a>00267 
<a name="l00268"></a>00268 <span class="comment">/* Ranges tab descriptor */</span>
<a name="l00269"></a>00269 <span class="preprocessor">#define A4L_RNGTAB(x)                           \</span>
<a name="l00270"></a>00270 <span class="preprocessor">        struct {                                \</span>
<a name="l00271"></a>00271 <span class="preprocessor">                unsigned char length;           \</span>
<a name="l00272"></a>00272 <span class="preprocessor">                a4l_rng_t rngs[x];              \</span>
<a name="l00273"></a>00273 <span class="preprocessor">        }</span>
<a name="l00274"></a>00274 <span class="preprocessor"></span><span class="keyword">typedef</span> A4L_RNGTAB(GCC_ZERO_LENGTH_ARRAY) a4l_rngtab_t;
<a name="l00275"></a>00275 
<a name="l00279"></a><a class="code" href="group__channelrange.html#g2db9f4e0fea6bd9279f40944bc0eb8d8">00279</a> <span class="preprocessor">#define A4L_RNG_GLOBAL_RNGDESC 0</span>
<a name="l00280"></a>00280 <span class="preprocessor"></span>
<a name="l00283"></a><a class="code" href="group__channelrange.html#gff4af8964f6535142618e8c9c0377791">00283</a> <span class="preprocessor">#define A4L_RNG_PERCHAN_RNGDESC 1</span>
<a name="l00284"></a>00284 <span class="preprocessor"></span>
<a name="l00285"></a>00285 <span class="comment">/* Global ranges descriptor */</span>
<a name="l00286"></a>00286 <span class="preprocessor">#define A4L_RNGDESC(x)                          \</span>
<a name="l00287"></a>00287 <span class="preprocessor">        struct {                                \</span>
<a name="l00288"></a>00288 <span class="preprocessor">                unsigned char mode;             \</span>
<a name="l00289"></a>00289 <span class="preprocessor">                unsigned char length;           \</span>
<a name="l00290"></a>00290 <span class="preprocessor">                a4l_rngtab_t *rngtabs[x];       \</span>
<a name="l00291"></a>00291 <span class="preprocessor">        }</span>
<a name="l00292"></a>00292 <span class="preprocessor"></span><span class="keyword">typedef</span> A4L_RNGDESC(GCC_ZERO_LENGTH_ARRAY) a4l_rngdesc_t;
<a name="l00293"></a>00293 
<a name="l00297"></a><a class="code" href="group__channelrange.html#gbb8a61456a5088a58dbd7392872af4f0">00297</a> <span class="preprocessor">#define RNG_GLOBAL(x) {                         \</span>
<a name="l00298"></a>00298 <span class="preprocessor">        .mode = A4L_RNG_GLOBAL_RNGDESC,         \</span>
<a name="l00299"></a>00299 <span class="preprocessor">        .length =  1,                           \</span>
<a name="l00300"></a>00300 <span class="preprocessor">        .rngtabs = {&amp;(x)}, }</span>
<a name="l00301"></a>00301 <span class="preprocessor"></span>
<a name="l00302"></a>00302 <span class="keyword">extern</span> a4l_rngdesc_t range_bipolar10;
<a name="l00303"></a>00303 <span class="keyword">extern</span> a4l_rngdesc_t range_bipolar5;
<a name="l00304"></a>00304 <span class="keyword">extern</span> a4l_rngdesc_t range_unipolar10;
<a name="l00305"></a>00305 <span class="keyword">extern</span> a4l_rngdesc_t range_unipolar5;
<a name="l00306"></a>00306 <span class="keyword">extern</span> a4l_rngdesc_t range_unknown;
<a name="l00307"></a>00307 <span class="keyword">extern</span> a4l_rngdesc_t range_fake;
<a name="l00308"></a>00308 
<a name="l00309"></a>00309 <span class="preprocessor">#define range_digital range_unipolar5</span>
<a name="l00310"></a>00310 <span class="preprocessor"></span>
<a name="l00313"></a>00313 <span class="preprocessor">#endif </span><span class="comment">/* __ANALOGY_CHANNEL_RANGE__ */</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>Generated on Mon Aug 2 12:48:36 2010 for Xenomai API by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
</body>
</html>