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
|
<!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/transfer.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/transfer.h</h1><a href="transfer_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_TRANSFER__</span>
<a name="l00024"></a>00024 <span class="preprocessor"></span><span class="preprocessor">#define __ANALOGY_TRANSFER__</span>
<a name="l00025"></a>00025 <span class="preprocessor"></span>
<a name="l00026"></a>00026 <span class="preprocessor">#ifndef DOXYGEN_CPP</span>
<a name="l00027"></a>00027 <span class="preprocessor"></span>
<a name="l00028"></a>00028 <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="l00029"></a>00029 <span class="preprocessor">#include <<a class="code" href="subdevice_8h.html" title="Analogy for Linux, subdevice related features.">analogy/subdevice.h</a>></span>
<a name="l00030"></a>00030 <span class="preprocessor">#include <<a class="code" href="analogy_2buffer_8h.html" title="Analogy for Linux, buffer related features.">analogy/buffer.h</a>></span>
<a name="l00031"></a>00031
<a name="l00032"></a>00032 <span class="comment">/* Status flags / bits */</span>
<a name="l00033"></a>00033 <span class="preprocessor">#define A4L_TSF_CLEAN 0</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035 <span class="comment">/* Fields init values */</span>
<a name="l00036"></a>00036 <span class="preprocessor">#define A4L_IRQ_UNUSED (unsigned int)((unsigned short)(~0))</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#define A4L_IDX_UNUSED (unsigned int)(~0)</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00039"></a>00039 <span class="comment">/* TODO: IRQ handling must leave transfer for os_facilities */</span>
<a name="l00040"></a>00040
<a name="l00041"></a>00041 <span class="comment">/* IRQ types */</span>
<a name="l00042"></a>00042 <span class="preprocessor">#define A4L_IRQ_SHARED RTDM_IRQTYPE_SHARED</span>
<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define A4L_IRQ_EDGE RTDM_IRQTYPE_EDGE</span>
<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#define A4L_IRQ_DISABLED 0</span>
<a name="l00045"></a>00045 <span class="preprocessor"></span>
<a name="l00046"></a>00046 <span class="comment">/* Poll timeout values */</span>
<a name="l00047"></a>00047 <span class="preprocessor">#define A4L_INFINITE 0</span>
<a name="l00048"></a>00048 <span class="preprocessor"></span><span class="preprocessor">#define A4L_NONBLOCK (-1)</span>
<a name="l00049"></a>00049 <span class="preprocessor"></span>
<a name="l00050"></a>00050 <span class="preprocessor">#ifdef __KERNEL__</span>
<a name="l00051"></a>00051 <span class="preprocessor"></span>
<a name="l00052"></a>00052 <span class="keyword">struct </span>a4l_device;
<a name="l00053"></a>00053 <span class="comment">/* Analogy transfer descriptor */</span>
<a name="l00054"></a>00054 <span class="keyword">struct </span>a4l_transfer {
<a name="l00055"></a>00055
<a name="l00056"></a>00056 <span class="comment">/* Subdevices desc */</span>
<a name="l00057"></a>00057 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> nb_subd;
<a name="l00058"></a>00058 <a class="code" href="structa4l__subdevice.html" title="Structure describing the subdevice.">a4l_subd_t</a> **subds;
<a name="l00059"></a>00059
<a name="l00060"></a>00060 <span class="comment">/* IRQ in use */</span>
<a name="l00061"></a>00061 <span class="comment">/* TODO: irq_desc should vanish */</span>
<a name="l00062"></a>00062 a4l_irq_desc_t irq_desc;
<a name="l00063"></a>00063 };
<a name="l00064"></a>00064 <span class="keyword">typedef</span> <span class="keyword">struct </span>a4l_transfer a4l_trf_t;
<a name="l00065"></a>00065
<a name="l00066"></a>00066 <span class="comment">/* --- Proc function --- */</span>
<a name="l00067"></a>00067
<a name="l00068"></a>00068 <span class="keywordtype">int</span> a4l_rdproc_transfer(<span class="keywordtype">char</span> *page,
<a name="l00069"></a>00069 <span class="keywordtype">char</span> **start,
<a name="l00070"></a>00070 off_t off, <span class="keywordtype">int</span> count, <span class="keywordtype">int</span> *eof, <span class="keywordtype">void</span> *data);
<a name="l00071"></a>00071
<a name="l00072"></a>00072 <span class="comment">/* --- Upper layer functions --- */</span>
<a name="l00073"></a>00073
<a name="l00074"></a>00074 <span class="keywordtype">void</span> a4l_presetup_transfer(a4l_cxt_t * cxt);
<a name="l00075"></a>00075 <span class="keywordtype">int</span> a4l_setup_transfer(a4l_cxt_t * cxt);
<a name="l00076"></a>00076 <span class="keywordtype">int</span> a4l_precleanup_transfer(a4l_cxt_t * cxt);
<a name="l00077"></a>00077 <span class="keywordtype">int</span> a4l_cleanup_transfer(a4l_cxt_t * cxt);
<a name="l00078"></a>00078 <span class="keywordtype">int</span> a4l_reserve_transfer(a4l_cxt_t * cxt, <span class="keywordtype">int</span> idx_subd);
<a name="l00079"></a>00079 <span class="keywordtype">int</span> a4l_init_transfer(a4l_cxt_t * cxt, <a class="code" href="structa4l__cmd__desc.html" title="Structure describing the asynchronous instruction.">a4l_cmd_t</a> * cmd);
<a name="l00080"></a>00080 <span class="keywordtype">int</span> a4l_cancel_transfer(a4l_cxt_t * cxt, <span class="keywordtype">int</span> idx_subd);
<a name="l00081"></a>00081 <span class="keywordtype">int</span> a4l_cancel_transfers(a4l_cxt_t * cxt);
<a name="l00082"></a>00082
<a name="l00083"></a>00083 ssize_t a4l_put(a4l_cxt_t * cxt, <span class="keywordtype">void</span> *buf, <span class="keywordtype">size_t</span> nbytes);
<a name="l00084"></a>00084 ssize_t a4l_get(a4l_cxt_t * cxt, <span class="keywordtype">void</span> *buf, <span class="keywordtype">size_t</span> nbytes);
<a name="l00085"></a>00085
<a name="l00086"></a>00086 <span class="keywordtype">int</span> <a class="code" href="group__analogy__interrupt.html#g2a3eb695fa1f5f97c1d6829039979d54" title="Register an interrupt handler for a specific device.">a4l_request_irq</a>(<span class="keyword">struct</span> a4l_device *dev,
<a name="l00087"></a>00087 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> irq,
<a name="l00088"></a>00088 a4l_irq_hdlr_t handler,
<a name="l00089"></a>00089 <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> flags, <span class="keywordtype">void</span> *cookie);
<a name="l00090"></a>00090 <span class="keywordtype">int</span> <a class="code" href="group__analogy__interrupt.html#g6377e1975bd391b58fbe3ddb2d2c2b8e" title="Release an interrupt handler for a specific device.">a4l_free_irq</a>(<span class="keyword">struct</span> a4l_device *dev, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> irq);
<a name="l00091"></a>00091 <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="group__analogy__interrupt.html#g482cc3464879c72b2359bd4b642f0a96" title="Get the interrupt number in use for a specific device.">a4l_get_irq</a>(<span class="keyword">struct</span> a4l_device *dev);
<a name="l00092"></a>00092
<a name="l00093"></a>00093 <span class="keywordtype">int</span> a4l_ioctl_cancel(a4l_cxt_t * cxt, <span class="keywordtype">void</span> *arg);
<a name="l00094"></a>00094
<a name="l00095"></a>00095 <span class="preprocessor">#endif </span><span class="comment">/* __KERNEL__ */</span>
<a name="l00096"></a>00096
<a name="l00097"></a>00097 <span class="preprocessor">#endif </span><span class="comment">/* !DOXYGEN_CPP */</span>
<a name="l00098"></a>00098
<a name="l00099"></a>00099 <span class="preprocessor">#endif </span><span class="comment">/* __ANALOGY_TRANSFER__ */</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>
|