doc/doxygen/html/lincan_8h-source.html
author greg
Fri, 06 Jul 2007 10:53:15 +0200
changeset 239 f45fd4cd3832
parent 215 f49e5a6b7804
child 240 34654679f262
permissions -rw-r--r--
add auto-mapping tool (config_utils)
fix little bugs
215
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
     1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
     2
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
     3
<title>CanFestival: drivers/can_lincan/lincan.h Source File</title>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
     4
<link href="doxygen.css" rel="stylesheet" type="text/css">
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
     5
<link href="tabs.css" rel="stylesheet" type="text/css">
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
     6
</head><body>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
     7
<!-- Generated by Doxygen 1.5.1 -->
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
     8
<div class="tabs">
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
     9
  <ul>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    10
    <li><a href="main.html"><span>Main&nbsp;Page</span></a></li>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    11
    <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    12
    <li id="current"><a href="files.html"><span>Files</span></a></li>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    13
    <li><a href="dirs.html"><span>Directories</span></a></li>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    14
  </ul></div>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    15
<div class="tabs">
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    16
  <ul>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    17
    <li><a href="files.html"><span>File&nbsp;List</span></a></li>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    18
    <li><a href="globals.html"><span>Globals</span></a></li>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    19
  </ul></div>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    20
<div class="nav">
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    21
<a class="el" href="dir_d58fb241e647de6212c31ecccf9cbace.html">drivers</a>&nbsp;&raquo&nbsp;<a class="el" href="dir_8cdda103ce035ff7e5ef31864566c615.html">can_lincan</a></div>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    22
<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>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    23
<a name="l00002"></a>00002 <span class="comment"> * Header file for the Linux CAN-bus driver.</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    24
<a name="l00003"></a>00003 <span class="comment"> * Written by Arnaud Westenberg email:arnaud@wanadoo.nl</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    25
<a name="l00004"></a>00004 <span class="comment"> * Rewritten for new CAN queues by Pavel Pisa - OCERA team member</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    26
<a name="l00005"></a>00005 <span class="comment"> * email:pisa@cmp.felk.cvut.cz</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    27
<a name="l00006"></a>00006 <span class="comment"> * This software is released under the GPL-License.</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    28
<a name="l00007"></a>00007 <span class="comment"> * Version lincan-0.3  17 Jun 2004</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    29
<a name="l00008"></a>00008 <span class="comment"> */</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    30
<a name="l00009"></a>00009 
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    31
<a name="l00010"></a>00010 <span class="preprocessor">#ifndef _CAN_DRVAPI_T_H</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    32
<a name="l00011"></a>00011 <span class="preprocessor"></span><span class="preprocessor">#define _CAN_DRVAPI_T_H</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    33
<a name="l00012"></a>00012 <span class="preprocessor"></span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    34
<a name="l00013"></a>00013 <span class="preprocessor">#ifdef __KERNEL__</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    35
<a name="l00014"></a>00014 <span class="preprocessor"></span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    36
<a name="l00015"></a>00015 <span class="preprocessor">#include &lt;linux/time.h&gt;</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    37
<a name="l00016"></a>00016 <span class="preprocessor">#include &lt;linux/types.h&gt;</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    38
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;linux/ioctl.h&gt;</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    39
<a name="l00018"></a>00018 
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    40
<a name="l00019"></a>00019 <span class="preprocessor">#else </span><span class="comment">/* __KERNEL__ */</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    41
<a name="l00020"></a>00020 
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    42
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;sys/time.h&gt;</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    43
<a name="l00022"></a>00022 <span class="preprocessor">#include &lt;sys/types.h&gt;</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    44
<a name="l00023"></a>00023 <span class="preprocessor">#include &lt;sys/ioctl.h&gt;</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    45
<a name="l00024"></a>00024 
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    46
<a name="l00025"></a>00025 <span class="preprocessor">#endif </span><span class="comment">/* __KERNEL__ */</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    47
<a name="l00026"></a>00026 
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    48
<a name="l00027"></a>00027 <span class="preprocessor">#include "<a class="code" href="canmsg_8h.html">./canmsg.h</a>"</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    49
<a name="l00028"></a>00028 
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    50
<a name="l00029"></a>00029 <span class="preprocessor">#ifdef __cplusplus</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    51
<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="keyword">extern</span> <span class="stringliteral">"C"</span> {
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    52
<a name="l00031"></a>00031 <span class="preprocessor">#endif</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    53
<a name="l00032"></a>00032 <span class="preprocessor"></span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    54
<a name="l00033"></a>00033 <span class="comment">/* CAN ioctl magic number */</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    55
<a name="l00034"></a><a class="code" href="lincan_8h.html#edfec349e7eb84dc1e60924b7f262a0e">00034</a> <span class="preprocessor">#define CAN_IOC_MAGIC 'd'</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    56
<a name="l00035"></a>00035 <span class="preprocessor"></span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    57
<a name="l00036"></a><a class="code" href="lincan_8h.html#a4668d3e5f141bf55821db4c528a9231">00036</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="lincan_8h.html#a4668d3e5f141bf55821db4c528a9231">bittiming_t</a>;
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    58
<a name="l00037"></a><a class="code" href="lincan_8h.html#e6ce5c58553fdefeba893c2263f476d3">00037</a> <span class="keyword">typedef</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">short</span> <a class="code" href="lincan_8h.html#e6ce5c58553fdefeba893c2263f476d3">channel_t</a>;
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    59
<a name="l00038"></a>00038 
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    60
<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> {
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    61
<a name="l00050"></a><a class="code" href="structcan__baudparams__t.html#6186d236aabd8604eb9d39f518b014fa">00050</a>         <span class="keywordtype">long</span> <a class="code" href="structcan__baudparams__t.html#6186d236aabd8604eb9d39f518b014fa">flags</a>;
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    62
<a name="l00051"></a><a class="code" href="structcan__baudparams__t.html#b9e5b5418206d02cc1ff852b6bc61d5e">00051</a>         <span class="keywordtype">long</span> <a class="code" href="structcan__baudparams__t.html#b9e5b5418206d02cc1ff852b6bc61d5e">baudrate</a>;
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    63
<a name="l00052"></a><a class="code" href="structcan__baudparams__t.html#a81e104a371b1efc2cc08031afac924c">00052</a>         <span class="keywordtype">long</span> <a class="code" href="structcan__baudparams__t.html#a81e104a371b1efc2cc08031afac924c">sjw</a>;
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    64
<a name="l00053"></a><a class="code" href="structcan__baudparams__t.html#b5d2e0ccd2e1f474d9e9d08d3d7fa9ed">00053</a>         <span class="keywordtype">long</span> <a class="code" href="structcan__baudparams__t.html#b5d2e0ccd2e1f474d9e9d08d3d7fa9ed">sample_pt</a>;
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    65
<a name="l00054"></a>00054 };
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    66
<a name="l00055"></a>00055 
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    67
<a name="l00056"></a>00056 <span class="comment">/* CAN ioctl functions */</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    68
<a name="l00057"></a><a class="code" href="lincan_8h.html#3b049542c0383cbce199aad5d240a2dc">00057</a> <span class="preprocessor">#define CAN_DRV_QUERY _IO(CAN_IOC_MAGIC, 0)</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    69
<a name="l00058"></a><a class="code" href="lincan_8h.html#df0a0b486c35c338028d6054e469d976">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>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    70
<a name="l00059"></a><a class="code" href="lincan_8h.html#c50df3601f78c81c90f46fdf29ad926b">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>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    71
<a name="l00060"></a><a class="code" href="lincan_8h.html#fda0151d8d8e5ffd9609890f4e35447b">00060</a> <span class="preprocessor">#define CAN_DRV_QRY_MSGFORMAT 2 </span><span class="comment">/* format of canmsg_t structure */</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    72
<a name="l00061"></a>00061 
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    73
<a name="l00062"></a><a class="code" href="lincan_8h.html#b905e6aff2332984df0552c6b50203f2">00062</a> <span class="preprocessor">#define CMD_START _IOW(CAN_IOC_MAGIC, 1, channel_t)</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    74
<a name="l00063"></a><a class="code" href="lincan_8h.html#46dc7ae84992bfe62cc00731959a67f4">00063</a> <span class="preprocessor"></span><span class="preprocessor">#define CMD_STOP _IOW(CAN_IOC_MAGIC, 2, channel_t)</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    75
<a name="l00064"></a>00064 <span class="preprocessor"></span><span class="comment">//#define CMD_RESET 3</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    76
<a name="l00065"></a>00065 
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    77
<a name="l00066"></a><a class="code" href="lincan_8h.html#f9438e3cb11f76f235f619f485820e97">00066</a> <span class="preprocessor">#define CONF_BAUD _IOW(CAN_IOC_MAGIC, 4, bittiming_t)</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    78
<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="comment">//#define CONF_ACCM</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    79
<a name="l00068"></a>00068 <span class="comment">//#define CONF_XTDACCM</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    80
<a name="l00069"></a>00069 <span class="comment">//#define CONF_TIMING</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    81
<a name="l00070"></a>00070 <span class="comment">//#define CONF_OMODE</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    82
<a name="l00071"></a><a class="code" href="lincan_8h.html#c50db35e4beea548c3e66447f25d30c6">00071</a> <span class="preprocessor">#define CONF_FILTER _IOW(CAN_IOC_MAGIC, 8, unsigned char)</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    83
<a name="l00072"></a>00072 <span class="preprocessor"></span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    84
<a name="l00073"></a>00073 <span class="comment">//#define CONF_FENABLE</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    85
<a name="l00074"></a>00074 <span class="comment">//#define CONF_FDISABLE</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    86
<a name="l00075"></a>00075 
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    87
<a name="l00076"></a><a class="code" href="lincan_8h.html#47c1b9c9a7b4183ac4fd96dc5ca8e820">00076</a> <span class="preprocessor">#define STAT _IO(CAN_IOC_MAGIC, 9)</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    88
<a name="l00077"></a><a class="code" href="lincan_8h.html#76a2a98cbf8a80fd83fb5c6d4df17340">00077</a> <span class="preprocessor"></span><span class="preprocessor">#define CANQUE_FILTER _IOW(CAN_IOC_MAGIC, 10, struct canfilt_t)</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    89
<a name="l00078"></a><a class="code" href="lincan_8h.html#4472b7dda19ee82821f9b7b8d063c79f">00078</a> <span class="preprocessor"></span><span class="preprocessor">#define CANQUE_FLUSH  _IO(CAN_IOC_MAGIC, 11)</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    90
<a name="l00079"></a><a class="code" href="lincan_8h.html#fb3bb74a3850e5eb2dbe5ae1c295f748">00079</a> <span class="preprocessor"></span><span class="preprocessor">#define CONF_BAUDPARAMS  _IOW(CAN_IOC_MAGIC, 11, struct can_baudparams_t)</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    91
<a name="l00080"></a><a class="code" href="lincan_8h.html#af40c0873e8b794d0e252751898fee43">00080</a> <span class="preprocessor"></span><span class="preprocessor">#define CANRTR_READ  _IOWR(CAN_IOC_MAGIC, 12, struct canmsg_t)</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    92
<a name="l00081"></a>00081 <span class="preprocessor"></span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    93
<a name="l00082"></a>00082 <span class="preprocessor">#ifdef __cplusplus</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    94
<a name="l00083"></a>00083 <span class="preprocessor"></span>} <span class="comment">/* extern "C"*/</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    95
<a name="l00084"></a>00084 <span class="preprocessor">#endif</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    96
<a name="l00085"></a>00085 <span class="preprocessor"></span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    97
<a name="l00086"></a>00086 <span class="preprocessor">#endif </span><span class="comment">/*_CAN_DRVAPI_T_H*/</span>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    98
</pre></div><hr size="1"><address style="align: right;"><small>Generated on Fri Jun 8 08:51:38 2007 for CanFestival by&nbsp;
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
    99
<a href="http://www.doxygen.org/index.html">
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
   100
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.1 </small></address>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
   101
</body>
f49e5a6b7804 Manual and Documentation finish
nico
parents:
diff changeset
   102
</html>