Specifications
Comedi
34 / 148
5.3.2 comedi_t
The data type comedi_t is used to represent an open Comedi device:
typedef struct comedi_t_struct comedi_t;
A valid comedi_t pointer is returned by a successful call to comedi_open(), and should be used for subsequent access to the
device. It is an opaque type, and pointers to type comedi_t should not be dereferenced by the application.
5.3.3 sampl_t
typedef unsigned short sampl_t;
The data type sampl_t is one of the generic types used to represent data values in Comedilib. It is used in a few places where a
data type shorter than lsampl_t is useful. On most architectures it is a 16-bit, unsigned integer.
Most drivers represent data transferred by read() and write() functions using sampl_t. Applications should check the subde-
vice flag SDF_LSAMPL to determine if the subdevice uses sampl_t or lsampl_t.
5.3.4 lsampl_t
typedef unsigned int lsampl_t;
The data type lsampl_t is the data type typically used to represent data values in Comedilib. On most architectures it is a 32-bit,
unsigned integer.
5.3.5 comedi_trig (deprecated)
typedef struct comedi_trig_struct comedi_trig;
struct comedi_trig_struct{
unsigned int subdev; /
*
subdevice
*
/
unsigned int mode; /
*
mode
*
/
unsigned int flags;
unsigned int n_chan; /
*
number of channels
*
/
unsigned int
*
chanlist; /
*
channel/range list
*
/
sampl_t
*
data; /
*
data list, size depends on subd flags
*
/
unsigned int n; /
*
number of scans
*
/
unsigned int trigsrc;
unsigned int trigvar;
unsigned int trigvar1;
unsigned int data_len;
unsigned int unused[3];
};
The comedi_trig structure is a control structure used by the COMEDI_TRIG ioctl, an older method of communicating instructions
to the driver and hardware. Use of comedi_trig is deprecated, and is no longer implemented by the Comedi kernel layer.
5.3.6 comedi_sv_t (deprecated)
typedef struct comedi_sv_struct comedi_sv_t;
struct comedi_sv_struct{
comedi_t
*
dev;
unsigned int subdevice;
unsigned int chan;