Xenomai API  2.6.5
command.h File Reference

Analogy for Linux, driver facilities. More...

Include dependency graph for command.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  a4l_cmd_desc
 Structure describing the asynchronous instruction. More...
 

Macros

ANALOGY_CMD_xxx

Common command flags definitions

#define A4L_CMD_SIMUL   0x1
 Do not execute the command, just check it.
 
#define A4L_CMD_BULK   0x2
 Perform data recovery / transmission in bulk mode.
 
#define A4L_CMD_WRITE   0x4
 Perform a command which will write data to the device.
 
TRIG_xxx

Command triggers flags definitions

#define TRIG_NONE   0x00000001
 Never trigger.
 
#define TRIG_NOW   0x00000002
 Trigger now + N ns.
 
#define TRIG_FOLLOW   0x00000004
 Trigger on next lower level trig.
 
#define TRIG_TIME   0x00000008
 Trigger at time N ns.
 
#define TRIG_TIMER   0x00000010
 Trigger at rate N ns.
 
#define TRIG_COUNT   0x00000020
 Trigger when count reaches N.
 
#define TRIG_EXT   0x00000040
 Trigger on external signal N.
 
#define TRIG_INT   0x00000080
 Trigger on analogy-internal signal N.
 
#define TRIG_OTHER   0x00000100
 Driver defined trigger.
 
#define TRIG_WAKE_EOS   0x0020
 Wake up on end-of-scan.
 
#define TRIG_ROUND_MASK   0x00030000
 Trigger not implemented yet.
 
#define TRIG_ROUND_NEAREST   0x00000000
 Trigger not implemented yet.
 
#define TRIG_ROUND_DOWN   0x00010000
 Trigger not implemented yet.
 
#define TRIG_ROUND_UP   0x00020000
 Trigger not implemented yet.
 
#define TRIG_ROUND_UP_NEXT   0x00030000
 Trigger not implemented yet.
 
Channel macros

Specific precompilation macros and constants useful for the channels descriptors tab located in the command structure

#define CHAN(a)   ((a) & 0xffff)
 Channel indication macro.
 
#define RNG(a)   (((a) & 0xff) << 16)
 Range definition macro.
 
#define AREF(a)   (((a) & 0xf) << 24)
 Reference definition macro.
 
#define FLAGS(a)   ((a) & CR_FLAGS_MASK)
 Flags definition macro.
 
#define PACK(a, b, c)   (CHAN(a) | RNG(b) | AREF(c))
 Channel + range + reference definition macro.
 
#define PACK_FLAGS(a, b, c, d)   (CHAN(a) | RNG(b) | AREF(c) | FLAGS(d))
 Channel + range + reference + flags definition macro.
 
#define AREF_GROUND   0x00
 Analog reference is analog ground.
 
#define AREF_COMMON   0x01
 Analog reference is analog common.
 
#define AREF_DIFF   0x02
 Analog reference is differential.
 
#define AREF_OTHER   0x03
 Analog reference is undefined.
 

Detailed Description

Analogy for Linux, driver facilities.

Note
Copyright (C) 1997-2000 David A. Schleef ds@sc.nosp@m.hlee.nosp@m.f.org
Copyright (C) 2008 Alexis Berlemont alexi.nosp@m.s.be.nosp@m.rlemo.nosp@m.nt@f.nosp@m.ree.f.nosp@m.r

Xenomai is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

Xenomai is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with Xenomai; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.