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: include/analogy/instruction.h Source File
</title>
4 <link href=
"doxygen.css" rel=
"stylesheet" type=
"text/css">
5 <link href=
"tabs.css" rel=
"stylesheet" type=
"text/css">
7 <!-- Generated by Doxygen 1.5.6 -->
8 <div class=
"navigation" id=
"top">
11 <li><a href=
"main.html"><span>Main
Page
</span></a></li>
12 <li><a href=
"pages.html"><span>Related
Pages
</span></a></li>
13 <li><a href=
"modules.html"><span>Modules
</span></a></li>
14 <li><a href=
"annotated.html"><span>Data
Structures
</span></a></li>
15 <li class=
"current"><a href=
"files.html"><span>Files
</span></a></li>
16 <li><a href=
"examples.html"><span>Examples
</span></a></li>
18 <form action=
"search.php" method=
"get">
19 <table cellspacing=
"0" cellpadding=
"0" border=
"0">
21 <td><label> <u>S
</u>earch
for
</label></td>
22 <td><input type=
"text" name=
"query" value=
"" size=
"20" accesskey=
"s"/></td>
29 <h1>include/analogy/instruction.h
</h1><a href=
"instruction_8h.html">Go to the documentation of this file.
</a><div class=
"fragment"><pre class=
"fragment"><a name=
"l00001"></a>00001
30 <a name=
"l00023"></a>00023 <span class=
"preprocessor">#ifndef __ANALOGY_INSTRUCTION__
</span>
31 <a name=
"l00024"></a>00024 <span class=
"preprocessor"></span><span class=
"preprocessor">#define __ANALOGY_INSTRUCTION__
</span>
32 <a name=
"l00025"></a>00025 <span class=
"preprocessor"></span>
33 <a name=
"l00026"></a>00026 <span class=
"preprocessor">#include
<<a class=
"code" href=
"analogy_2types_8h.html" title=
"Analogy for Linux, misc declarations.">analogy/types.h
</a>></span>
34 <a name=
"l00027"></a>00027 <span class=
"preprocessor">#include
<<a class=
"code" href=
"context_8h.html" title=
"Analogy for Linux, context structure / macros declarations.">analogy/context.h
</a>></span>
35 <a name=
"l00028"></a>00028
36 <a name=
"l00029"></a>00029 <span class=
"preprocessor">#define A4L_INSN_MASK_READ
0x8000000</span>
37 <a name=
"l00030"></a>00030 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_MASK_WRITE
0x4000000</span>
38 <a name=
"l00031"></a>00031 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_MASK_SPECIAL
0x2000000</span>
39 <a name=
"l00032"></a>00032 <span class=
"preprocessor"></span>
40 <a name=
"l00047"></a><a class=
"code" href=
"group__sync1__lib.html#g63e8c577aa294bf49711299240c29354">00047</a> <span class=
"preprocessor">#define A4L_INSN_READ (
0 | A4L_INSN_MASK_READ)
</span>
41 <a name=
"l00048"></a>00048 <span class=
"preprocessor"></span>
42 <a name=
"l00051"></a><a class=
"code" href=
"group__sync1__lib.html#g3039f40be8811e7393a8c1d3e0eebe6e">00051</a> <span class=
"preprocessor">#define A4L_INSN_WRITE (
1 | A4L_INSN_MASK_WRITE)
</span>
43 <a name=
"l00052"></a>00052 <span class=
"preprocessor"></span>
44 <a name=
"l00055"></a><a class=
"code" href=
"group__sync1__lib.html#gd02735fca71fa7e07dad273e4cd957a8">00055</a> <span class=
"preprocessor">#define A4L_INSN_BITS (
2 | A4L_INSN_MASK_READ | \
</span>
45 <a name=
"l00056"></a>00056 <span class=
"preprocessor"> A4L_INSN_MASK_WRITE)
</span>
46 <a name=
"l00057"></a>00057 <span class=
"preprocessor"></span>
47 <a name=
"l00060"></a><a class=
"code" href=
"group__sync1__lib.html#ga5e0f8dade0defa8b9c9f0788dbf6e6f">00060</a> <span class=
"preprocessor">#define A4L_INSN_CONFIG (
3 | A4L_INSN_MASK_READ | \
</span>
48 <a name=
"l00061"></a>00061 <span class=
"preprocessor"> A4L_INSN_MASK_WRITE)
</span>
49 <a name=
"l00062"></a>00062 <span class=
"preprocessor"></span>
50 <a name=
"l00065"></a><a class=
"code" href=
"group__sync1__lib.html#gd342149a83edc18ca7960274b6775681">00065</a> <span class=
"preprocessor">#define A4L_INSN_GTOD (
4 | A4L_INSN_MASK_READ | \
</span>
51 <a name=
"l00066"></a>00066 <span class=
"preprocessor"> A4L_INSN_MASK_SPECIAL)
</span>
52 <a name=
"l00067"></a>00067 <span class=
"preprocessor"></span>
53 <a name=
"l00070"></a><a class=
"code" href=
"group__sync1__lib.html#g1b099a4e1edc630ac74e3e64aa4d479b">00070</a> <span class=
"preprocessor">#define A4L_INSN_WAIT (
5 | A4L_INSN_MASK_WRITE | \
</span>
54 <a name=
"l00071"></a>00071 <span class=
"preprocessor"> A4L_INSN_MASK_SPECIAL)
</span>
55 <a name=
"l00072"></a>00072 <span class=
"preprocessor"></span>
56 <a name=
"l00075"></a><a class=
"code" href=
"group__sync1__lib.html#g7ad6aa3c3f85aba61da5335d54c41b56">00075</a> <span class=
"preprocessor">#define A4L_INSN_INTTRIG (
6 | A4L_INSN_MASK_WRITE | \
</span>
57 <a name=
"l00076"></a>00076 <span class=
"preprocessor"> A4L_INSN_MASK_SPECIAL)
</span>
58 <a name=
"l00077"></a>00077 <span class=
"preprocessor"></span>
59 <a name=
"l00083"></a><a class=
"code" href=
"group__sync1__lib.html#g976d8de479578a3e1f5d844401fe4153">00083</a> <span class=
"preprocessor">#define A4L_INSN_WAIT_MAX
100000</span>
60 <a name=
"l00084"></a>00084 <span class=
"preprocessor"></span>
61 <a name=
"l00091"></a>00091 <span class=
"preprocessor">#define A4L_INSN_CONFIG_DIO_INPUT
0</span>
62 <a name=
"l00092"></a>00092 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_DIO_OUTPUT
1</span>
63 <a name=
"l00093"></a>00093 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_DIO_OPENDRAIN
2</span>
64 <a name=
"l00094"></a>00094 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_ANALOG_TRIG
16</span>
65 <a name=
"l00095"></a>00095 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_ALT_SOURCE
20</span>
66 <a name=
"l00096"></a>00096 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_DIGITAL_TRIG
21</span>
67 <a name=
"l00097"></a>00097 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_BLOCK_SIZE
22</span>
68 <a name=
"l00098"></a>00098 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_TIMER_1
23</span>
69 <a name=
"l00099"></a>00099 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_FILTER
24</span>
70 <a name=
"l00100"></a>00100 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_CHANGE_NOTIFY
25</span>
71 <a name=
"l00101"></a>00101 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_SERIAL_CLOCK
26</span>
72 <a name=
"l00102"></a>00102 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_BIDIRECTIONAL_DATA
27</span>
73 <a name=
"l00103"></a>00103 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_DIO_QUERY
28</span>
74 <a name=
"l00104"></a>00104 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_PWM_OUTPUT
29</span>
75 <a name=
"l00105"></a>00105 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_GET_PWM_OUTPUT
30</span>
76 <a name=
"l00106"></a>00106 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_ARM
31</span>
77 <a name=
"l00107"></a>00107 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_DISARM
32</span>
78 <a name=
"l00108"></a>00108 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_GET_COUNTER_STATUS
33</span>
79 <a name=
"l00109"></a>00109 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_RESET
34</span>
80 <a name=
"l00110"></a>00110 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_GPCT_SINGLE_PULSE_GENERATOR
1001 </span><span class=
"comment">/* Use CTR as single pulsegenerator */
</span>
81 <a name=
"l00111"></a>00111 <span class=
"preprocessor">#define A4L_INSN_CONFIG_GPCT_PULSE_TRAIN_GENERATOR
1002 </span><span class=
"comment">/* Use CTR as pulsetraingenerator */
</span>
82 <a name=
"l00112"></a>00112 <span class=
"preprocessor">#define A4L_INSN_CONFIG_GPCT_QUADRATURE_ENCODER
1003 </span><span class=
"comment">/* Use the counter as encoder */
</span>
83 <a name=
"l00113"></a>00113 <span class=
"preprocessor">#define A4L_INSN_CONFIG_SET_GATE_SRC
2001 </span><span class=
"comment">/* Set gate source */
</span>
84 <a name=
"l00114"></a>00114 <span class=
"preprocessor">#define A4L_INSN_CONFIG_GET_GATE_SRC
2002 </span><span class=
"comment">/* Get gate source */
</span>
85 <a name=
"l00115"></a>00115 <span class=
"preprocessor">#define A4L_INSN_CONFIG_SET_CLOCK_SRC
2003 </span><span class=
"comment">/* Set master clock source */
</span>
86 <a name=
"l00116"></a>00116 <span class=
"preprocessor">#define A4L_INSN_CONFIG_GET_CLOCK_SRC
2004 </span><span class=
"comment">/* Get master clock source */
</span>
87 <a name=
"l00117"></a>00117 <span class=
"preprocessor">#define A4L_INSN_CONFIG_SET_OTHER_SRC
2005 </span><span class=
"comment">/* Set other source */
</span>
88 <a name=
"l00118"></a>00118 <span class=
"preprocessor">#define A4L_INSN_CONFIG_SET_COUNTER_MODE
4097</span>
89 <a name=
"l00119"></a>00119 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_SET_ROUTING
4099</span>
90 <a name=
"l00120"></a>00120 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_INSN_CONFIG_GET_ROUTING
4109</span>
91 <a name=
"l00121"></a>00121 <span class=
"preprocessor"></span>
92 <a name=
"l00130"></a>00130 <span class=
"preprocessor">#define A4L_COUNTER_ARMED
0x1</span>
93 <a name=
"l00131"></a>00131 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_COUNTER_COUNTING
0x2</span>
94 <a name=
"l00132"></a>00132 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_COUNTER_TERMINAL_COUNT
0x4</span>
95 <a name=
"l00133"></a>00133 <span class=
"preprocessor"></span>
96 <a name=
"l00142"></a>00142 <span class=
"preprocessor">#define A4L_INPUT
0</span>
97 <a name=
"l00143"></a>00143 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_OUTPUT
1</span>
98 <a name=
"l00144"></a>00144 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_OPENDRAIN
2</span>
99 <a name=
"l00145"></a>00145 <span class=
"preprocessor"></span>
100 <a name=
"l00156"></a>00156 <span class=
"preprocessor">#define A4L_EV_START
0x00040000</span>
101 <a name=
"l00157"></a>00157 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_EV_SCAN_BEGIN
0x00080000</span>
102 <a name=
"l00158"></a>00158 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_EV_CONVERT
0x00100000</span>
103 <a name=
"l00159"></a>00159 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_EV_SCAN_END
0x00200000</span>
104 <a name=
"l00160"></a>00160 <span class=
"preprocessor"></span><span class=
"preprocessor">#define A4L_EV_STOP
0x00400000</span>
105 <a name=
"l00161"></a>00161 <span class=
"preprocessor"></span>
106 <a name=
"l00169"></a><a class=
"code" href=
"structa4l__instruction.html">00169</a> <span class=
"keyword">struct
</span><a class=
"code" href=
"structa4l__instruction.html" title=
"Structure describing the synchronous instruction.">a4l_instruction
</a> {
107 <a name=
"l00170"></a>00170 <span class=
"keywordtype">unsigned
</span> <span class=
"keywordtype">int
</span> <a class=
"code" href=
"structa4l__instruction.html#4dfe466c1efa7b13f6cb408268652e4c" title=
"Instruction type.">type
</a>;
108 <a name=
"l00172"></a>00172 <span class=
"keywordtype">unsigned
</span> <span class=
"keywordtype">int
</span> <a class=
"code" href=
"structa4l__instruction.html#2ce723188a437c94b474d62b690d241b" title=
"Subdevice to which the instruction will be applied.">idx_subd
</a>;
109 <a name=
"l00174"></a>00174 <span class=
"keywordtype">unsigned
</span> <span class=
"keywordtype">int
</span> <a class=
"code" href=
"structa4l__instruction.html#c13c98dc1071dabdbc02035437c913d1" title=
"Channel descriptor.">chan_desc
</a>;
110 <a name=
"l00176"></a>00176 <span class=
"keywordtype">unsigned
</span> <span class=
"keywordtype">int
</span> <a class=
"code" href=
"structa4l__instruction.html#57a3362a9c56de0a3318116eda8583fe" title=
"Size of the intruction data.">data_size
</a>;
111 <a name=
"l00178"></a>00178 <span class=
"keywordtype">void
</span> *
<a class=
"code" href=
"structa4l__instruction.html#ea22840417a04202cd0740515420d467" title=
"Instruction data.">data
</a>;
112 <a name=
"l00180"></a>00180 };
113 <a name=
"l00181"></a>00181 <span class=
"keyword">typedef
</span> <span class=
"keyword">struct
</span><a class=
"code" href=
"structa4l__instruction.html" title=
"Structure describing the synchronous instruction.">a4l_instruction
</a> <a class=
"code" href=
"structa4l__instruction.html" title=
"Structure describing the synchronous instruction.">a4l_insn_t
</a>;
114 <a name=
"l00182"></a>00182
115 <a name=
"l00188"></a><a class=
"code" href=
"structa4l__instruction__list.html">00188</a> <span class=
"keyword">struct
</span><a class=
"code" href=
"structa4l__instruction__list.html" title=
"Structure describing the list of synchronous instructions.">a4l_instruction_list
</a> {
116 <a name=
"l00189"></a>00189 <span class=
"keywordtype">unsigned
</span> <span class=
"keywordtype">int
</span> <a class=
"code" href=
"structa4l__instruction__list.html#0c5e7ef9613f2493698e5adda0f2dbf4" title=
"Instructions count.">count
</a>;
117 <a name=
"l00191"></a>00191 <a class=
"code" href=
"structa4l__instruction.html" title=
"Structure describing the synchronous instruction.">a4l_insn_t
</a> *
<a class=
"code" href=
"structa4l__instruction__list.html#e0da793580d6ad2a8a1be208a1d41b5c" title=
"Tab containing the instructions pointers.">insns
</a>;
118 <a name=
"l00193"></a>00193 };
119 <a name=
"l00194"></a>00194 <span class=
"keyword">typedef
</span> <span class=
"keyword">struct
</span><a class=
"code" href=
"structa4l__instruction__list.html" title=
"Structure describing the list of synchronous instructions.">a4l_instruction_list
</a> <a class=
"code" href=
"structa4l__instruction__list.html" title=
"Structure describing the list of synchronous instructions.">a4l_insnlst_t
</a>;
120 <a name=
"l00195"></a>00195
121 <a name=
"l00198"></a>00198 <span class=
"preprocessor">#if defined(__KERNEL__)
&& !defined(DOXYGEN_CPP)
</span>
122 <a name=
"l00199"></a>00199 <span class=
"preprocessor"></span>
123 <a name=
"l00200"></a>00200 <span class=
"keyword">struct
</span>a4l_kernel_instruction {
124 <a name=
"l00201"></a>00201 <span class=
"keywordtype">unsigned
</span> <span class=
"keywordtype">int
</span> type;
125 <a name=
"l00202"></a>00202 <span class=
"keywordtype">unsigned
</span> <span class=
"keywordtype">int
</span> idx_subd;
126 <a name=
"l00203"></a>00203 <span class=
"keywordtype">unsigned
</span> <span class=
"keywordtype">int
</span> chan_desc;
127 <a name=
"l00204"></a>00204 <span class=
"keywordtype">unsigned
</span> <span class=
"keywordtype">int
</span> data_size;
128 <a name=
"l00205"></a>00205 <span class=
"keywordtype">void
</span> *data;
129 <a name=
"l00206"></a>00206 <span class=
"keywordtype">void
</span> *__udata;
130 <a name=
"l00207"></a>00207 };
131 <a name=
"l00208"></a>00208 <span class=
"keyword">typedef
</span> <span class=
"keyword">struct
</span>a4l_kernel_instruction a4l_kinsn_t;
132 <a name=
"l00209"></a>00209
133 <a name=
"l00210"></a>00210 <span class=
"keyword">struct
</span>a4l_kernel_instruction_list {
134 <a name=
"l00211"></a>00211 <span class=
"keywordtype">unsigned
</span> <span class=
"keywordtype">int
</span> count;
135 <a name=
"l00212"></a>00212 a4l_kinsn_t *insns;
136 <a name=
"l00213"></a>00213 <a class=
"code" href=
"structa4l__instruction.html" title=
"Structure describing the synchronous instruction.">a4l_insn_t
</a> *__uinsns;
137 <a name=
"l00214"></a>00214 };
138 <a name=
"l00215"></a>00215 <span class=
"keyword">typedef
</span> <span class=
"keyword">struct
</span>a4l_kernel_instruction_list a4l_kilst_t;
139 <a name=
"l00216"></a>00216
140 <a name=
"l00217"></a>00217 <span class=
"comment">/* Instruction related functions */
</span>
141 <a name=
"l00218"></a>00218
142 <a name=
"l00219"></a>00219 <span class=
"comment">/* Upper layer functions */
</span>
143 <a name=
"l00220"></a>00220 <span class=
"keywordtype">int
</span> a4l_ioctl_insnlist(a4l_cxt_t * cxt,
<span class=
"keywordtype">void
</span> *arg);
144 <a name=
"l00221"></a>00221 <span class=
"keywordtype">int
</span> a4l_ioctl_insn(a4l_cxt_t * cxt,
<span class=
"keywordtype">void
</span> *arg);
145 <a name=
"l00222"></a>00222
146 <a name=
"l00223"></a>00223 <span class=
"preprocessor">#endif
</span><span class=
"comment">/* __KERNEL__
&& !DOXYGEN_CPP */
</span>
147 <a name=
"l00224"></a>00224
148 <a name=
"l00225"></a>00225 <span class=
"preprocessor">#endif
</span><span class=
"comment">/* __ANALOGY_INSTRUCTION__ */
</span>
150 <hr size=
"1"><address style=
"text-align: right;"><small>Generated on Tue Mar
8 13:
02:
04 2011 for Xenomai API by
151 <a href=
"http://www.doxygen.org/index.html">
152 <img src=
"doxygen.png" alt=
"doxygen" align=
"middle" border=
"0"></a> 1.5.6 </small></address>