doc: regenerate
[xenomai-head.git] / doc / generated / html / api / group__descriptor__sys.html
blobdaaaa393f7b277f54cd0068641f6114899506d0d
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
3 <title>Xenomai API: Descriptor Syscall API</title>
4 <link href="doxygen.css" rel="stylesheet" type="text/css">
5 <link href="tabs.css" rel="stylesheet" type="text/css">
6 </head><body>
7 <!-- Generated by Doxygen 1.5.6 -->
8 <div class="navigation" id="top">
9 <div class="tabs">
10 <ul>
11 <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
12 <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
13 <li><a href="modules.html"><span>Modules</span></a></li>
14 <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
15 <li><a href="files.html"><span>Files</span></a></li>
16 <li><a href="examples.html"><span>Examples</span></a></li>
17 <li>
18 <form action="search.php" method="get">
19 <table cellspacing="0" cellpadding="0" border="0">
20 <tr>
21 <td><label>&nbsp;<u>S</u>earch&nbsp;for&nbsp;</label></td>
22 <td><input type="text" name="query" value="" size="20" accesskey="s"/></td>
23 </tr>
24 </table>
25 </form>
26 </li>
27 </ul>
28 </div>
29 </div>
30 <div class="contents">
31 <h1>Descriptor Syscall API<br>
32 <small>
33 [<a class="el" href="group__syscall.html">Level 0 API (Syscall API)</a>]</small>
34 </h1>
35 <p>
36 <div class="dynheader">
37 Collaboration diagram for Descriptor Syscall API:</div>
38 <div class="dynsection">
39 <center><table><tr><td><img src="group__descriptor__sys.png" border="0" alt="" usemap="#group____descriptor____sys_map">
40 <map name="group____descriptor____sys_map">
41 <area shape="rect" href="group__syscall.html" title="Level 0 API (Syscall API)" alt="" coords="7,5,177,32"></map></td></tr></table></center>
42 </div>
44 <p>
45 <table border="0" cellpadding="0" cellspacing="0">
46 <tr><td></td></tr>
47 <tr><td colspan="2"><br><h2>Data Structures</h2></td></tr>
48 <tr><td class="memItemLeft" nowrap align="right" valign="top">struct &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="structa4l__descriptor.html">a4l_descriptor</a></td></tr>
50 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Structure containing device-information useful to users. <a href="structa4l__descriptor.html#_details">More...</a><br></td></tr>
51 <tr><td colspan="2"><br><h2>ANALOGY_xxx_DESC</h2></td></tr>
52 <tr><td colspan="2">Constants used as argument so as to define the description depth to recover<p>
53 <a class="anchor" name="ANALOGY_xxx_DESC"></a> <br><br></td></tr>
54 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="g9bac966c050032d5f29c3205b80ebe74"></a><!-- doxytag: member="descriptor_sys::A4L_BSC_DESC" ref="g9bac966c050032d5f29c3205b80ebe74" args="" -->
55 #define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__descriptor__sys.html#g9bac966c050032d5f29c3205b80ebe74">A4L_BSC_DESC</a>&nbsp;&nbsp;&nbsp;0x0</td></tr>
57 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">BSC stands for basic descriptor (device data). <br></td></tr>
58 <tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="gefe74d60fa5f6c85021c66993d2cf306"></a><!-- doxytag: member="descriptor_sys::A4L_CPLX_DESC" ref="gefe74d60fa5f6c85021c66993d2cf306" args="" -->
59 #define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__descriptor__sys.html#gefe74d60fa5f6c85021c66993d2cf306">A4L_CPLX_DESC</a>&nbsp;&nbsp;&nbsp;0x1</td></tr>
61 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">CPLX stands for complex descriptor (subdevice + channel + range data). <br></td></tr>
62 <tr><td colspan="2"><br><h2>Functions</h2></td></tr>
63 <tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__descriptor__sys.html#g1e2ec4c91556e9bb1d1c54a7fc6e4b28">a4l_sys_desc</a> (int fd, <a class="el" href="structa4l__descriptor.html">a4l_desc_t</a> *dsc, int pass)</td></tr>
65 <tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a descriptor on an attached device. <a href="#g1e2ec4c91556e9bb1d1c54a7fc6e4b28"></a><br></td></tr>
66 </table>
67 <hr><h2>Function Documentation</h2>
68 <a class="anchor" name="g1e2ec4c91556e9bb1d1c54a7fc6e4b28"></a><!-- doxytag: member="descriptor.c::a4l_sys_desc" ref="g1e2ec4c91556e9bb1d1c54a7fc6e4b28" args="(int fd, a4l_desc_t *dsc, int pass)" -->
69 <div class="memitem">
70 <div class="memproto">
71 <table class="memname">
72 <tr>
73 <td class="memname">int a4l_sys_desc </td>
74 <td>(</td>
75 <td class="paramtype">int&nbsp;</td>
76 <td class="paramname"> <em>fd</em>, </td>
77 </tr>
78 <tr>
79 <td class="paramkey"></td>
80 <td></td>
81 <td class="paramtype"><a class="el" href="structa4l__descriptor.html">a4l_desc_t</a> *&nbsp;</td>
82 <td class="paramname"> <em>dsc</em>, </td>
83 </tr>
84 <tr>
85 <td class="paramkey"></td>
86 <td></td>
87 <td class="paramtype">int&nbsp;</td>
88 <td class="paramname"> <em>pass</em></td><td>&nbsp;</td>
89 </tr>
90 <tr>
91 <td></td>
92 <td>)</td>
93 <td></td><td></td><td></td>
94 </tr>
95 </table>
96 </div>
97 <div class="memdoc">
99 <p>
100 Get a descriptor on an attached device.
102 Once the device has been attached, the function a4l_get_desc() retrieves various information on the device (subdevices, channels, ranges, etc.). The function a4l_get_desc() can be called twice:<ul>
103 <li>The first time, almost all the fields, except sbdata, are set (board_name, nb_subd, idx_read_subd, idx_write_subd, magic, sbsize); the last field , sbdata, is supposed to be a pointer on a buffer, which size is defined by the field sbsize.</li><li>The second time, the buffer pointed by sbdata is filled with data about the subdevices, the channels and the ranges.</li></ul>
105 Between the two calls, an allocation must be performed in order to recover a buffer large enough to contain all the data. These data are set up according a root-leaf organization (device -&gt; subdevice -&gt; channel -&gt; range). They cannot be accessed directly; specific functions are available so as to retrieve them:<ul>
106 <li><a class="el" href="group__descriptor1__lib.html#g4200a3b0f33b20fedeadc0494491cc9c" title="Get an information structure on a specified subdevice.">a4l_get_subdinfo()</a> to get some subdevice's characteristics.</li><li>a4l_get_chaninfo() to get some channel's characteristics.</li><li><a class="el" href="group__descriptor1__lib.html#g1baacb426ed57054a99020c6b2a42baf" title="Get an information structure on a specified range.">a4l_get_rnginfo()</a> to get some range's characteristics.</li></ul>
108 <dl compact><dt><b>Parameters:</b></dt><dd>
109 <table border="0" cellspacing="2" cellpadding="0">
110 <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>fd</em>&nbsp;</td><td>Driver file descriptor </td></tr>
111 <tr><td valign="top"><tt>[out]</tt>&nbsp;</td><td valign="top"><em>dsc</em>&nbsp;</td><td>Device descriptor </td></tr>
112 <tr><td valign="top"><tt>[in]</tt>&nbsp;</td><td valign="top"><em>pass</em>&nbsp;</td><td>Description level to retrieve:<ul>
113 <li>A4L_BSC_DESC to get the basic descriptor (notably the size of the data buffer to allocate).</li><li>A4L_CPLX_DESC to get the complex descriptor, the data buffer is filled with characteristics about the subdevices, the channels and the ranges.</li></ul>
114 </td></tr>
115 </table>
116 </dl>
117 <dl class="return" compact><dt><b>Returns:</b></dt><dd>0 on success. Otherwise:</dd></dl>
118 <ul>
119 <li>-EINVAL is returned if some argument is missing or wrong; the pass argument should be checked; check also the kernel log ("dmesg")</li><li>-EFAULT is returned if a user &lt;-&gt; kernel transfer went wrong</li><li>-ENODEV is returned if the descriptor is incoherent (the device may be unattached) </li></ul>
121 <p>References <a class="el" href="descriptor_8h-source.html#l00049">A4L_BSC_DESC</a>, <a class="el" href="descriptor_8h-source.html#l00078">a4l_descriptor::magic</a>, and <a class="el" href="descriptor_8h-source.html#l00080">a4l_descriptor::sbsize</a>.</p>
123 <p>Referenced by <a class="el" href="descriptor_8c-source.html#l00364">a4l_fill_desc()</a>, and <a class="el" href="descriptor_8c-source.html#l00297">a4l_open()</a>.</p>
125 </div>
126 </div><p>
127 </div>
128 <hr size="1"><address style="text-align: right;"><small>Generated on Tue Mar 8 13:02:08 2011 for Xenomai API by&nbsp;
129 <a href="http://www.doxygen.org/index.html">
130 <img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.6 </small></address>
131 </body>
132 </html>