doc/doxygen/html/lincan_8h-source.html
author etisserant
Mon, 12 Nov 2007 14:38:34 +0100
changeset 314 68e83c3ffbb5
parent 240 34654679f262
permissions -rw-r--r--
Better EMCY support. Now EMCY COB-ID depend on OD 1014h entry, as told in DS-301.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>CanFestival: drivers/can_lincan/lincan.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.1 -->
<div class="tabs">
  <ul>
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
    <li id="current"><a href="files.html"><span>Files</span></a></li>
    <li><a href="dirs.html"><span>Directories</span></a></li>
  </ul></div>
<div class="tabs">
  <ul>
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
    <li><a href="globals.html"><span>Globals</span></a></li>
  </ul></div>
<div class="nav">
<a class="el" href="dir_65dd258ff9b9ef4cd7bd0d22f5e58dba.html">drivers</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_daf7036eef6d5824a8b65c083e166f12.html">can_lincan</a></div>
<h1>lincan.h</h1><a href="lincan_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* can.h</span>
<a name="l00002"></a>00002 <span class="comment"> * Header file for the Linux CAN-bus driver.</span>
<a name="l00003"></a>00003 <span class="comment"> * Written by Arnaud Westenberg email:arnaud@wanadoo.nl</span>
<a name="l00004"></a>00004 <span class="comment"> * Rewritten for new CAN queues by Pavel Pisa - OCERA team member</span>
<a name="l00005"></a>00005 <span class="comment"> * email:pisa@cmp.felk.cvut.cz</span>
<a name="l00006"></a>00006 <span class="comment"> * This software is released under the GPL-License.</span>
<a name="l00007"></a>00007 <span class="comment"> * Version lincan-0.3  17 Jun 2004</span>
<a name="l00008"></a>00008 <span class="comment"> */</span>
<a name="l00009"></a>00009 
<a name="l00010"></a>00010 <span class="preprocessor">#ifndef _CAN_DRVAPI_T_H</span>
<a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define _CAN_DRVAPI_T_H</span>
<a name="l00012"></a>00012 <span class="preprocessor"></span>
<a name="l00013"></a>00013 <span class="preprocessor">#ifdef __KERNEL__</span>
<a name="l00014"></a>00014 <span class="preprocessor"></span>
<a name="l00015"></a>00015 <span class="preprocessor">#include &lt;linux/time.h&gt;</span>
<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;linux/types.h&gt;</span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;linux/ioctl.h&gt;</span>
<a name="l00018"></a>00018 
<a name="l00019"></a>00019 <span class="preprocessor">#else </span><span class="comment">/* __KERNEL__ */</span>
<a name="l00020"></a>00020 
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;sys/time.h&gt;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;sys/types.h&gt;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;sys/ioctl.h&gt;</span>
<a name="l00024"></a>00024 
<a name="l00025"></a>00025 <span class="preprocessor">#endif </span><span class="comment">/* __KERNEL__ */</span>
<a name="l00026"></a>00026 
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="canmsg_8h.html">./canmsg.h</a>"</span>
<a name="l00028"></a>00028 
<a name="l00029"></a>00029 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
<a name="l00031"></a>00031 <span class="preprocessor">#endif</span>
<a name="l00032"></a>00032 <span class="preprocessor"></span>
<a name="l00033"></a>00033 <span class="comment">/* CAN ioctl magic number */</span>
<a name="l00034"></a><a class="code" href="lincan_8h.html#3fed1f1de80f7782903a336ea0c4ac15">00034</a> <span class="preprocessor">#define CAN_IOC_MAGIC 'd'</span>
<a name="l00035"></a>00035 <span class="preprocessor"></span>
<a name="l00036"></a><a class="code" href="lincan_8h.html#95ca9694cf55ba2b9c5cac34c5f823fd">00036</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="lincan_8h.html#95ca9694cf55ba2b9c5cac34c5f823fd">bittiming_t</a>;
<a name="l00037"></a><a class="code" href="lincan_8h.html#1b66950737246f472aeb61324d54f2af">00037</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="lincan_8h.html#1b66950737246f472aeb61324d54f2af">channel_t</a>;
<a name="l00038"></a>00038 
<a name="l00049"></a><a class="code" href="structcan__baudparams__t.html">00049</a> <span class="keyword">struct </span><a class="code" href="structcan__baudparams__t.html">can_baudparams_t</a> {
<a name="l00050"></a><a class="code" href="structcan__baudparams__t.html#9df7872cba81f953caf974fd8f1175d5">00050</a>         <span class="keywordtype">long</span> <a class="code" href="structcan__baudparams__t.html#9df7872cba81f953caf974fd8f1175d5">flags</a>;
<a name="l00051"></a><a class="code" href="structcan__baudparams__t.html#efc2282bdf0074879313723afbc6cbb2">00051</a>         <span class="keywordtype">long</span> <a class="code" href="structcan__baudparams__t.html#efc2282bdf0074879313723afbc6cbb2">baudrate</a>;
<a name="l00052"></a><a class="code" href="structcan__baudparams__t.html#3d7a965f711e361c0acf66c7b7a1e3e3">00052</a>         <span class="keywordtype">long</span> <a class="code" href="structcan__baudparams__t.html#3d7a965f711e361c0acf66c7b7a1e3e3">sjw</a>;
<a name="l00053"></a><a class="code" href="structcan__baudparams__t.html#79f0add3bed6c2d19cb6b08aa1fe2a6a">00053</a>         <span class="keywordtype">long</span> <a class="code" href="structcan__baudparams__t.html#79f0add3bed6c2d19cb6b08aa1fe2a6a">sample_pt</a>;
<a name="l00054"></a>00054 };
<a name="l00055"></a>00055 
<a name="l00056"></a>00056 <span class="comment">/* CAN ioctl functions */</span>
<a name="l00057"></a><a class="code" href="lincan_8h.html#f46f5bb558603e14bd82b1c21806373a">00057</a> <span class="preprocessor">#define CAN_DRV_QUERY _IO(CAN_IOC_MAGIC, 0)</span>
<a name="l00058"></a><a class="code" href="lincan_8h.html#915236ced66cf74ddc9469659176fbdc">00058</a> <span class="preprocessor"></span><span class="preprocessor">#define CAN_DRV_QRY_BRANCH    0 </span><span class="comment">/* returns driver branch value - "LINC" for LinCAN driver */</span>
<a name="l00059"></a><a class="code" href="lincan_8h.html#6d2e15bd84811e5d28691e149854b093">00059</a> <span class="preprocessor">#define CAN_DRV_QRY_VERSION   1 </span><span class="comment">/* returns driver version as (major&lt;&lt;16) | (minor&lt;&lt;8) | patch */</span>
<a name="l00060"></a><a class="code" href="lincan_8h.html#b4622051bed0cc55a23e541f771c0cda">00060</a> <span class="preprocessor">#define CAN_DRV_QRY_MSGFORMAT 2 </span><span class="comment">/* format of canmsg_t structure */</span>
<a name="l00061"></a>00061 
<a name="l00062"></a><a class="code" href="lincan_8h.html#cf4a3256fed957baeda35e83fb385efd">00062</a> <span class="preprocessor">#define CMD_START _IOW(CAN_IOC_MAGIC, 1, channel_t)</span>
<a name="l00063"></a><a class="code" href="lincan_8h.html#c0fcbd216490e0566f46dffffc1aa7ba">00063</a> <span class="preprocessor"></span><span class="preprocessor">#define CMD_STOP _IOW(CAN_IOC_MAGIC, 2, channel_t)</span>
<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="comment">//#define CMD_RESET 3</span>
<a name="l00065"></a>00065 
<a name="l00066"></a><a class="code" href="lincan_8h.html#08b6b14516c690d57825c1a620cc3c47">00066</a> <span class="preprocessor">#define CONF_BAUD _IOW(CAN_IOC_MAGIC, 4, bittiming_t)</span>
<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="comment">//#define CONF_ACCM</span>
<a name="l00068"></a>00068 <span class="comment">//#define CONF_XTDACCM</span>
<a name="l00069"></a>00069 <span class="comment">//#define CONF_TIMING</span>
<a name="l00070"></a>00070 <span class="comment">//#define CONF_OMODE</span>
<a name="l00071"></a><a class="code" href="lincan_8h.html#cdf45e20e3c088762e82844b21630547">00071</a> <span class="preprocessor">#define CONF_FILTER _IOW(CAN_IOC_MAGIC, 8, unsigned char)</span>
<a name="l00072"></a>00072 <span class="preprocessor"></span>
<a name="l00073"></a>00073 <span class="comment">//#define CONF_FENABLE</span>
<a name="l00074"></a>00074 <span class="comment">//#define CONF_FDISABLE</span>
<a name="l00075"></a>00075 
<a name="l00076"></a><a class="code" href="lincan_8h.html#377940ced46c65e01361c28929196726">00076</a> <span class="preprocessor">#define STAT _IO(CAN_IOC_MAGIC, 9)</span>
<a name="l00077"></a><a class="code" href="lincan_8h.html#51c1d13caec3912207c797cba4af1853">00077</a> <span class="preprocessor"></span><span class="preprocessor">#define CANQUE_FILTER _IOW(CAN_IOC_MAGIC, 10, struct canfilt_t)</span>
<a name="l00078"></a><a class="code" href="lincan_8h.html#38cb66c5a570c41a29a201eb4f33bd6d">00078</a> <span class="preprocessor"></span><span class="preprocessor">#define CANQUE_FLUSH  _IO(CAN_IOC_MAGIC, 11)</span>
<a name="l00079"></a><a class="code" href="lincan_8h.html#af8106f38e412e2f78e028e12db0421b">00079</a> <span class="preprocessor"></span><span class="preprocessor">#define CONF_BAUDPARAMS  _IOW(CAN_IOC_MAGIC, 11, struct can_baudparams_t)</span>
<a name="l00080"></a><a class="code" href="lincan_8h.html#5345d8a283046886c2a8033ce6d38433">00080</a> <span class="preprocessor"></span><span class="preprocessor">#define CANRTR_READ  _IOWR(CAN_IOC_MAGIC, 12, struct canmsg_t)</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span>
<a name="l00082"></a>00082 <span class="preprocessor">#ifdef __cplusplus</span>
<a name="l00083"></a>00083 <span class="preprocessor"></span>} <span class="comment">/* extern "C"*/</span>
<a name="l00084"></a>00084 <span class="preprocessor">#endif</span>
<a name="l00085"></a>00085 <span class="preprocessor"></span>
<a name="l00086"></a>00086 <span class="preprocessor">#endif </span><span class="comment">/*_CAN_DRVAPI_T_H*/</span>
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Mon Jul 2 19:10:16 2007 for CanFestival by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
</body>
</html>