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 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218
|
<!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/subdevice.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 Page</span></a></li>
<li><a href="pages.html"><span>Related Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Data 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> <u>S</u>earch for </label></td>
<td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
</tr>
</table>
</form>
</li>
</ul>
</div>
<h1>include/analogy/subdevice.h</h1><a href="subdevice_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_SUBDEVICE__</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define __ANALOGY_SUBDEVICE__</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00026"></a>00026 <span class="preprocessor">#ifdef __KERNEL__</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#include <linux/list.h></span>
<a name="l00028"></a>00028 <span class="preprocessor">#endif </span><span class="comment">/* __KERNEL__ */</span>
<a name="l00029"></a>00029
<a name="l00030"></a>00030 <span class="preprocessor">#include <<a class="code" href="analogy_2types_8h.html" title="Analogy for Linux, misc declarations.">analogy/types.h</a>></span>
<a name="l00031"></a>00031 <span class="preprocessor">#include <<a class="code" href="context_8h.html" title="Analogy for Linux, context structure / macros declarations.">analogy/context.h</a>></span>
<a name="l00032"></a>00032 <span class="preprocessor">#include <<a class="code" href="instruction_8h.html" title="Analogy for Linux, instruction related features.">analogy/instruction.h</a>></span>
<a name="l00033"></a>00033 <span class="preprocessor">#include <<a class="code" href="command_8h.html" title="Analogy for Linux, driver facilities.">analogy/command.h</a>></span>
<a name="l00034"></a>00034 <span class="preprocessor">#include <<a class="code" href="channel__range_8h.html" title="Analogy for Linux, channel, range related features.">analogy/channel_range.h</a>></span>
<a name="l00035"></a>00035
<a name="l00036"></a>00036 <span class="comment">/* --- Subdevice flags desc stuff --- */</span>
<a name="l00037"></a>00037
<a name="l00038"></a>00038 <span class="comment">/* TODO: replace ANALOGY_SUBD_AI with ANALOGY_SUBD_ANALOG</span>
<a name="l00039"></a>00039 <span class="comment"> and ANALOGY_SUBD_INPUT */</span>
<a name="l00040"></a>00040
<a name="l00041"></a>00041 <span class="comment">/* Subdevice types masks */</span>
<a name="l00042"></a>00042 <span class="preprocessor">#define A4L_SUBD_MASK_READ 0x80000000</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define A4L_SUBD_MASK_WRITE 0x40000000</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#define A4L_SUBD_MASK_SPECIAL 0x20000000</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span>
<a name="l00060"></a><a class="code" href="group__subdevice.html#g0c70964ed18393fdeb7f6b985d7ae4f1">00060</a> <span class="preprocessor">#define A4L_SUBD_UNUSED (A4L_SUBD_MASK_SPECIAL|0x1)</span>
<a name="l00061"></a>00061 <span class="preprocessor"></span>
<a name="l00064"></a><a class="code" href="group__subdevice.html#gfe08fcb0bd2ac9015e058a1a38ebfade">00064</a> <span class="preprocessor">#define A4L_SUBD_AI (A4L_SUBD_MASK_READ|0x2)</span>
<a name="l00065"></a>00065 <span class="preprocessor"></span>
<a name="l00068"></a><a class="code" href="group__subdevice.html#g5285a5093bd9279588a4b8fd05bb7c3f">00068</a> <span class="preprocessor">#define A4L_SUBD_AO (A4L_SUBD_MASK_WRITE|0x4)</span>
<a name="l00069"></a>00069 <span class="preprocessor"></span>
<a name="l00072"></a><a class="code" href="group__subdevice.html#gd4b6ee48948dc35895606488de102e14">00072</a> <span class="preprocessor">#define A4L_SUBD_DI (A4L_SUBD_MASK_READ|0x8)</span>
<a name="l00073"></a>00073 <span class="preprocessor"></span>
<a name="l00076"></a><a class="code" href="group__subdevice.html#gf86e53e7a480bfb73df538dfd230efa2">00076</a> <span class="preprocessor">#define A4L_SUBD_DO (A4L_SUBD_MASK_WRITE|0x10)</span>
<a name="l00077"></a>00077 <span class="preprocessor"></span>
<a name="l00080"></a><a class="code" href="group__subdevice.html#g56fb70a0e2cf39e1be994d4b1e346162">00080</a> <span class="preprocessor">#define A4L_SUBD_DIO (A4L_SUBD_MASK_SPECIAL|0x20)</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span>
<a name="l00084"></a><a class="code" href="group__subdevice.html#g9769a5004db6f3d45c1ac908fd1b9123">00084</a> <span class="preprocessor">#define A4L_SUBD_COUNTER (A4L_SUBD_MASK_SPECIAL|0x40)</span>
<a name="l00085"></a>00085 <span class="preprocessor"></span>
<a name="l00088"></a><a class="code" href="group__subdevice.html#ge4e41940b17d812ba852ac8739165262">00088</a> <span class="preprocessor">#define A4L_SUBD_TIMER (A4L_SUBD_MASK_SPECIAL|0x80)</span>
<a name="l00089"></a>00089 <span class="preprocessor"></span>
<a name="l00092"></a><a class="code" href="group__subdevice.html#ga38f1355eb6a7874ce5dcf8f90072d14">00092</a> <span class="preprocessor">#define A4L_SUBD_MEMORY (A4L_SUBD_MASK_SPECIAL|0x100)</span>
<a name="l00093"></a>00093 <span class="preprocessor"></span>
<a name="l00096"></a><a class="code" href="group__subdevice.html#ge9eee756dede608de5263143191edec2">00096</a> <span class="preprocessor">#define A4L_SUBD_CALIB (A4L_SUBD_MASK_SPECIAL|0x200)</span>
<a name="l00097"></a>00097 <span class="preprocessor"></span>
<a name="l00100"></a><a class="code" href="group__subdevice.html#gcf4d6837ce92a27aaf9b78d59fb6ba8e">00100</a> <span class="preprocessor">#define A4L_SUBD_PROC (A4L_SUBD_MASK_SPECIAL|0x400)</span>
<a name="l00101"></a>00101 <span class="preprocessor"></span>
<a name="l00104"></a><a class="code" href="group__subdevice.html#g14c863f8e99d6be9a0d6371bcbe8fff1">00104</a> <span class="preprocessor">#define A4L_SUBD_SERIAL (A4L_SUBD_MASK_SPECIAL|0x800)</span>
<a name="l00105"></a>00105 <span class="preprocessor"></span>
<a name="l00108"></a><a class="code" href="group__subdevice.html#gffcb131508d9920aa4436c7df18a8ab1">00108</a> <span class="preprocessor">#define A4L_SUBD_TYPES (A4L_SUBD_UNUSED | \</span>
<a name="l00109"></a>00109 <span class="preprocessor"> A4L_SUBD_AI | \</span>
<a name="l00110"></a>00110 <span class="preprocessor"> A4L_SUBD_AO | \</span>
<a name="l00111"></a>00111 <span class="preprocessor"> A4L_SUBD_DI | \</span>
<a name="l00112"></a>00112 <span class="preprocessor"> A4L_SUBD_DO | \</span>
<a name="l00113"></a>00113 <span class="preprocessor"> A4L_SUBD_DIO | \</span>
<a name="l00114"></a>00114 <span class="preprocessor"> A4L_SUBD_COUNTER | \</span>
<a name="l00115"></a>00115 <span class="preprocessor"> A4L_SUBD_TIMER | \</span>
<a name="l00116"></a>00116 <span class="preprocessor"> A4L_SUBD_MEMORY | \</span>
<a name="l00117"></a>00117 <span class="preprocessor"> A4L_SUBD_CALIB | \</span>
<a name="l00118"></a>00118 <span class="preprocessor"> A4L_SUBD_PROC | \</span>
<a name="l00119"></a>00119 <span class="preprocessor"> A4L_SUBD_SERIAL)</span>
<a name="l00120"></a>00120 <span class="preprocessor"></span>
<a name="l00129"></a>00129 <span class="comment">/* Subdevice capabilities */</span>
<a name="l00134"></a><a class="code" href="group__subdevice.html#ge57f549ab2689782e35af2c8941aeecf">00134</a> <span class="preprocessor">#define A4L_SUBD_CMD 0x1000</span>
<a name="l00135"></a>00135 <span class="preprocessor"></span>
<a name="l00140"></a><a class="code" href="group__subdevice.html#g4ec26f0982c64fe7aab38678af7a20a4">00140</a> <span class="preprocessor">#define A4L_SUBD_MMAP 0x8000</span>
<a name="l00141"></a>00141 <span class="preprocessor"></span>
<a name="l00150"></a>00150 <span class="comment">/* Subdevice status flag(s) */</span>
<a name="l00155"></a><a class="code" href="group__subdevice.html#g943b015c909276644de277f4135e7579">00155</a> <span class="preprocessor">#define A4L_SUBD_BUSY_NR 0</span>
<a name="l00156"></a><a class="code" href="group__subdevice.html#gf6114bf76458b8c6fd84813fa30f9338">00156</a> <span class="preprocessor"></span><span class="preprocessor">#define A4L_SUBD_BUSY (1 << A4L_SUBD_BUSY_NR)</span>
<a name="l00157"></a>00157 <span class="preprocessor"></span>
<a name="l00162"></a><a class="code" href="group__subdevice.html#g6992c2972bde497a4039a21c5436dc75">00162</a> <span class="preprocessor">#define A4L_SUBD_CLEAN_NR 1</span>
<a name="l00163"></a><a class="code" href="group__subdevice.html#g9cb84629a30d54bf81ea9daacc077238">00163</a> <span class="preprocessor"></span><span class="preprocessor">#define A4L_SUBD_CLEAN (1 << A4L_SUBD_CLEAN_NR)</span>
<a name="l00164"></a>00164 <span class="preprocessor"></span>
<a name="l00165"></a>00165
<a name="l00168"></a>00168 <span class="preprocessor">#ifdef __KERNEL__</span>
<a name="l00169"></a>00169 <span class="preprocessor"></span>
<a name="l00170"></a>00170 <span class="comment">/* --- Subdevice descriptor structure --- */</span>
<a name="l00171"></a>00171
<a name="l00172"></a>00172 <span class="keyword">struct </span>a4l_device;
<a name="l00173"></a>00173 <span class="keyword">struct </span>a4l_buffer;
<a name="l00174"></a>00174
<a name="l00180"></a><a class="code" href="structa4l__subdevice.html">00180</a> <span class="keyword">struct </span><a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subdevice</a> {
<a name="l00181"></a>00181
<a name="l00182"></a><a class="code" href="structa4l__subdevice.html#3231505de3d86eea6446e5df3d508ef2">00182</a> <span class="keyword">struct </span>list_head <a class="code" href="structa4l__subdevice.html#3231505de3d86eea6446e5df3d508ef2" title="List stuff.">list</a>;
<a name="l00185"></a><a class="code" href="structa4l__subdevice.html#7c24cee67a888f7c6786e76a5375b534">00185</a> <span class="keyword">struct </span>a4l_device *<a class="code" href="structa4l__subdevice.html#7c24cee67a888f7c6786e76a5375b534" title="Containing device.">dev</a>;
<a name="l00188"></a>00188 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="structa4l__subdevice.html#d19d9a857a45957e0bbbb8d28baab791" title="Subdevice index.">idx</a>;
<a name="l00191"></a><a class="code" href="structa4l__subdevice.html#102957cf30f6328e9b9cac05e4f980ec">00191</a> <span class="keyword">struct </span>a4l_buffer *<a class="code" href="structa4l__subdevice.html#102957cf30f6328e9b9cac05e4f980ec" title="Linked buffer.">buf</a>;
<a name="l00194"></a>00194 <span class="comment">/* Subdevice's status (busy, linked?) */</span>
<a name="l00195"></a>00195 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="structa4l__subdevice.html#f9aac6252faa3c04e045819823977ac8" title="Subdevice&#39;s status.">status</a>;
<a name="l00198"></a>00198 <span class="comment">/* Descriptors stuff */</span>
<a name="l00199"></a>00199 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="structa4l__subdevice.html#1c2510cef59e5ec58cb3edee397d886f" title="Type flags.">flags</a>;
<a name="l00201"></a>00201 <a class="code" href="structa4l__channels__desc.html" title="Structure describing a channels set.">a4l_chdesc_t</a> *<a class="code" href="structa4l__subdevice.html#435021004757c2b3d30422183f5c9ef5" title="Tab of channels descriptors pointers.">chan_desc</a>;
<a name="l00203"></a>00203 a4l_rngdesc_t *<a class="code" href="structa4l__subdevice.html#79d92d091d353625d8e63c4e550d7d32" title="Tab of ranges descriptors pointers.">rng_desc</a>;
<a name="l00205"></a>00205 <a class="code" href="structa4l__cmd__desc.html" title="Structure describing the asynchronous instruction.">a4l_cmd_t</a> *<a class="code" href="structa4l__subdevice.html#d15a08eed66ded21d0e918d1565801bf" title="Command capabilities mask.">cmd_mask</a>;
<a name="l00208"></a>00208 <span class="comment">/* Functions stuff */</span>
<a name="l00209"></a>00209 int (*<a class="code" href="structa4l__subdevice.html#626df8c670bdb8626857e9759f62b9c3" title="Callback for the instruction &quot;read&quot;.">insn_read</a>) (<span class="keyword">struct </span><a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subdevice</a> *, a4l_kinsn_t *);
<a name="l00211"></a>00211 int (*<a class="code" href="structa4l__subdevice.html#2cbf983f259840e38545f0a30a8f2ecf" title="Callback for the instruction &quot;write&quot;.">insn_write</a>) (<span class="keyword">struct </span><a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subdevice</a> *, a4l_kinsn_t *);
<a name="l00213"></a>00213 int (*<a class="code" href="structa4l__subdevice.html#2057bd2551d99b8fb160b6aad1d5cfe2" title="Callback for the instruction &quot;bits&quot;.">insn_bits</a>) (<span class="keyword">struct </span><a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subdevice</a> *, a4l_kinsn_t *);
<a name="l00215"></a>00215 int (*<a class="code" href="structa4l__subdevice.html#c0934a305068ea942ed221c1726ae50f" title="Callback for the configuration instruction.">insn_config</a>) (<span class="keyword">struct </span><a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subdevice</a> *, a4l_kinsn_t *);
<a name="l00217"></a>00217 int (*<a class="code" href="structa4l__subdevice.html#1d1840a2330c4a11119d50d0e39bbab8" title="Callback for command handling.">do_cmd</a>) (<span class="keyword">struct </span><a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subdevice</a> *, <a class="code" href="structa4l__cmd__desc.html" title="Structure describing the asynchronous instruction.">a4l_cmd_t</a> *);
<a name="l00219"></a>00219 int (*<a class="code" href="structa4l__subdevice.html#3ab89e39a80609d9677ca8fca5960112" title="Callback for command checking.">do_cmdtest</a>) (<span class="keyword">struct </span><a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subdevice</a> *, <a class="code" href="structa4l__cmd__desc.html" title="Structure describing the asynchronous instruction.">a4l_cmd_t</a> *);
<a name="l00221"></a>00221 int (*<a class="code" href="structa4l__subdevice.html#8496445f2e1f5efbe0f8537240b9f74d" title="Callback for asynchronous transfer cancellation.">cancel</a>) (<span class="keyword">struct </span><a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subdevice</a> *);
<a name="l00223"></a>00223 void (*<a class="code" href="structa4l__subdevice.html#582da21902802d224e94fbc4906cbf56" title="Callback for munge operation.">munge</a>) (<span class="keyword">struct </span><a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subdevice</a> *, <span class="keywordtype">void</span> *, <span class="keywordtype">unsigned</span> long);
<a name="l00225"></a>00225 int (*<a class="code" href="structa4l__subdevice.html#82cde111d28d6629e10884611dcf122c" title="Callback for trigger operation.">trigger</a>) (<span class="keyword">struct </span><a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subdevice</a> *, lsampl_t);
<a name="l00228"></a>00228 <span class="keywordtype">char</span> <a class="code" href="structa4l__subdevice.html#e6526aded52b0793cd9f032472bc5b41" title="Private data.">priv</a>[0];
<a name="l00230"></a>00230 };
<a name="l00231"></a>00231 <span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subdevice</a> <a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subd_t</a>;
<a name="l00232"></a>00232
<a name="l00233"></a>00233 <span class="preprocessor">#endif </span><span class="comment">/* __KERNEL__ */</span>
<a name="l00234"></a>00234
<a name="l00237"></a>00237 <span class="preprocessor">#ifndef DOXYGEN_CPP</span>
<a name="l00238"></a>00238 <span class="preprocessor"></span>
<a name="l00239"></a>00239 <span class="comment">/* --- Subdevice related IOCTL arguments structures --- */</span>
<a name="l00240"></a>00240
<a name="l00241"></a>00241 <span class="comment">/* SUDBINFO IOCTL argument */</span>
<a name="l00242"></a>00242 <span class="keyword">struct </span>a4l_subd_info {
<a name="l00243"></a>00243 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> flags;
<a name="l00244"></a>00244 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> status;
<a name="l00245"></a>00245 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> nb_chan;
<a name="l00246"></a>00246 };
<a name="l00247"></a>00247 <span class="keyword">typedef</span> <span class="keyword">struct </span>a4l_subd_info a4l_sbinfo_t;
<a name="l00248"></a>00248
<a name="l00249"></a>00249 <span class="comment">/* CHANINFO / NBCHANINFO IOCTL arguments */</span>
<a name="l00250"></a>00250 <span class="keyword">struct </span>a4l_chan_info {
<a name="l00251"></a>00251 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> chan_flags;
<a name="l00252"></a>00252 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> nb_rng;
<a name="l00253"></a>00253 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> nb_bits;
<a name="l00254"></a>00254 };
<a name="l00255"></a>00255 <span class="keyword">typedef</span> <span class="keyword">struct </span>a4l_chan_info a4l_chinfo_t;
<a name="l00256"></a>00256
<a name="l00257"></a>00257 <span class="keyword">struct </span>a4l_chinfo_arg {
<a name="l00258"></a>00258 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> idx_subd;
<a name="l00259"></a>00259 <span class="keywordtype">void</span> *info;
<a name="l00260"></a>00260 };
<a name="l00261"></a>00261 <span class="keyword">typedef</span> <span class="keyword">struct </span>a4l_chinfo_arg a4l_chinfo_arg_t;
<a name="l00262"></a>00262
<a name="l00263"></a>00263 <span class="comment">/* RNGINFO / NBRNGINFO IOCTL arguments */</span>
<a name="l00264"></a>00264 <span class="keyword">struct </span>a4l_rng_info {
<a name="l00265"></a>00265 <span class="keywordtype">long</span> min;
<a name="l00266"></a>00266 <span class="keywordtype">long</span> max;
<a name="l00267"></a>00267 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> flags;
<a name="l00268"></a>00268 };
<a name="l00269"></a>00269 <span class="keyword">typedef</span> <span class="keyword">struct </span>a4l_rng_info a4l_rnginfo_t;
<a name="l00270"></a>00270
<a name="l00271"></a>00271 <span class="keyword">struct </span>a4l_rng_info_arg {
<a name="l00272"></a>00272 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> idx_subd;
<a name="l00273"></a>00273 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> idx_chan;
<a name="l00274"></a>00274 <span class="keywordtype">void</span> *info;
<a name="l00275"></a>00275 };
<a name="l00276"></a>00276 <span class="keyword">typedef</span> <span class="keyword">struct </span>a4l_rng_info_arg a4l_rnginfo_arg_t;
<a name="l00277"></a>00277
<a name="l00278"></a>00278 <span class="preprocessor">#ifdef __KERNEL__</span>
<a name="l00279"></a>00279 <span class="preprocessor"></span>
<a name="l00280"></a>00280 <span class="comment">/* --- Subdevice related functions and macros --- */</span>
<a name="l00281"></a>00281
<a name="l00282"></a>00282 <a class="code" href="structa4l__channel.html" title="Structure describing some channel&#39;s characteristics.">a4l_chan_t</a> *a4l_get_chfeat(<a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subd_t</a> * sb, <span class="keywordtype">int</span> idx);
<a name="l00283"></a>00283 <a class="code" href="structa4l__range.html" title="Structure describing a (unique) range.">a4l_rng_t</a> *a4l_get_rngfeat(<a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subd_t</a> * sb, <span class="keywordtype">int</span> chidx, <span class="keywordtype">int</span> rngidx);
<a name="l00284"></a>00284 <span class="keywordtype">int</span> a4l_check_chanlist(<a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subd_t</a> * subd,
<a name="l00285"></a>00285 <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> nb_chan, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *chans);
<a name="l00286"></a>00286
<a name="l00287"></a>00287 <span class="preprocessor">#define a4l_subd_is_input(x) ((A4L_SUBD_MASK_READ & (x)->flags) != 0)</span>
<a name="l00288"></a>00288 <span class="preprocessor"></span><span class="comment">/* The following macro considers that a DIO subdevice is firstly an</span>
<a name="l00289"></a>00289 <span class="comment"> output subdevice */</span>
<a name="l00290"></a>00290 <span class="preprocessor">#define a4l_subd_is_output(x) \</span>
<a name="l00291"></a>00291 <span class="preprocessor"> ((A4L_SUBD_MASK_WRITE & (x)->flags) != 0 || \</span>
<a name="l00292"></a>00292 <span class="preprocessor"> (A4L_SUBD_DIO & (x)->flags) != 0)</span>
<a name="l00293"></a>00293 <span class="preprocessor"></span>
<a name="l00294"></a>00294 <span class="comment">/* --- Upper layer functions --- */</span>
<a name="l00295"></a>00295
<a name="l00296"></a>00296 <a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subd_t</a> * <a class="code" href="group__subdevice.html#ga8b2dfadeac340e288725e1f2ce9b63b" title="Get a pointer to the subdevice descriptor referenced by its registration index.">a4l_get_subd</a>(<span class="keyword">struct</span> a4l_device *dev, <span class="keywordtype">int</span> idx);
<a name="l00297"></a>00297 <a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subd_t</a> * <a class="code" href="group__subdevice.html#g32595b3806dd3e73038a2022c0b1e204" title="Allocate a subdevice descriptor.">a4l_alloc_subd</a>(<span class="keywordtype">int</span> sizeof_priv,
<a name="l00298"></a>00298 <span class="keywordtype">void</span> (*setup)(<a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subd_t</a> *));
<a name="l00299"></a>00299 <span class="keywordtype">int</span> <a class="code" href="group__subdevice.html#g229e7725db234534da6e6973c63f1cef" title="Add a subdevice to the driver descriptor.">a4l_add_subd</a>(<span class="keyword">struct</span> a4l_device *dev, <a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subd_t</a> * subd);
<a name="l00300"></a>00300 <span class="keywordtype">int</span> a4l_ioctl_subdinfo(a4l_cxt_t * cxt, <span class="keywordtype">void</span> *arg);
<a name="l00301"></a>00301 <span class="keywordtype">int</span> a4l_ioctl_chaninfo(a4l_cxt_t * cxt, <span class="keywordtype">void</span> *arg);
<a name="l00302"></a>00302 <span class="keywordtype">int</span> a4l_ioctl_rnginfo(a4l_cxt_t * cxt, <span class="keywordtype">void</span> *arg);
<a name="l00303"></a>00303 <span class="keywordtype">int</span> a4l_ioctl_nbchaninfo(a4l_cxt_t * cxt, <span class="keywordtype">void</span> *arg);
<a name="l00304"></a>00304 <span class="keywordtype">int</span> a4l_ioctl_nbrnginfo(a4l_cxt_t * cxt, <span class="keywordtype">void</span> *arg);
<a name="l00305"></a>00305
<a name="l00306"></a>00306 <span class="preprocessor">#endif </span><span class="comment">/* __KERNEL__ */</span>
<a name="l00307"></a>00307
<a name="l00308"></a>00308 <span class="preprocessor">#endif </span><span class="comment">/* !DOXYGEN_CPP */</span>
<a name="l00309"></a>00309
<a name="l00310"></a>00310 <span class="preprocessor">#endif </span><span class="comment">/* __ANALOGY_SUBDEVICE__ */</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
<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>
|