include/uapi/linux/comedi.h

Source file repositories/reference/linux-study-clean/include/uapi/linux/comedi.h

File Facts

System
Linux kernel
Corpus path
include/uapi/linux/comedi.h
Extension
.h
Size
55530 bytes
Lines
1529
Domain
Core OS
Bucket
Core Kernel Interface
Inferred role
Core OS: implementation source
Status
source implementation candidate

Why This File Exists

Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.

Dependency Surface

Detected Declarations

Annotated Snippet

struct comedi_insn {
	unsigned int insn;
	unsigned int n;
	unsigned int __user *data;
	unsigned int subdev;
	unsigned int chanspec;
	unsigned int unused[3];
};

/**
 * struct comedi_insnlist - list of COMEDI instructions
 * @n_insns:	Number of COMEDI instructions.
 * @insns:	Pointer to array COMEDI instructions.
 *
 * This is used with the %COMEDI_INSNLIST ioctl.
 */
struct comedi_insnlist {
	unsigned int n_insns;
	struct comedi_insn __user *insns;
};

/**
 * struct comedi_cmd - COMEDI asynchronous acquisition command details
 * @subdev:		Subdevice index.
 * @flags:		Command flags (%CMDF_xxx).
 * @start_src:		"Start acquisition" trigger source (%TRIG_xxx).
 * @start_arg:		"Start acquisition" trigger argument.
 * @scan_begin_src:	"Scan begin" trigger source.
 * @scan_begin_arg:	"Scan begin" trigger argument.
 * @convert_src:	"Convert" trigger source.
 * @convert_arg:	"Convert" trigger argument.
 * @scan_end_src:	"Scan end" trigger source.
 * @scan_end_arg:	"Scan end" trigger argument.
 * @stop_src:		"Stop acquisition" trigger source.
 * @stop_arg:		"Stop acquisition" trigger argument.
 * @chanlist:		Pointer to array of "chanspec" values, containing a
 *			sequence of channel numbers packed with analog range
 *			index, etc.
 * @chanlist_len:	Number of channels in sequence.
 * @data:		Pointer to miscellaneous set-up data (not used).
 * @data_len:		Length of miscellaneous set-up data.
 *
 * This is used with the %COMEDI_CMD or %COMEDI_CMDTEST ioctl to set-up
 * or validate an asynchronous acquisition command.  The ioctl may modify
 * the &struct comedi_cmd and copy it back to the caller.
 *
 * Optional command @flags values that can be ORed together...
 *
 * %CMDF_BOGUS - makes %COMEDI_CMD ioctl return error %EAGAIN instead of
 * starting the command.
 *
 * %CMDF_PRIORITY - requests "hard real-time" processing (which is not
 * supported in this version of COMEDI).
 *
 * %CMDF_WAKE_EOS - requests the command makes data available for reading
 * after every "scan" period.
 *
 * %CMDF_WRITE - marks the command as being in the "write" (to device)
 * direction.  This does not need to be specified by the caller unless the
 * subdevice supports commands in either direction.
 *
 * %CMDF_RAWDATA - prevents the command from "munging" the data between the
 * COMEDI sample format and the raw hardware sample format.
 *
 * %CMDF_ROUND_NEAREST - requests timing periods to be rounded to nearest
 * supported values.
 *
 * %CMDF_ROUND_DOWN - requests timing periods to be rounded down to supported
 * values (frequencies rounded up).
 *
 * %CMDF_ROUND_UP - requests timing periods to be rounded up to supported
 * values (frequencies rounded down).
 *
 * Trigger source values for @start_src, @scan_begin_src, @convert_src,
 * @scan_end_src, and @stop_src...
 *
 * %TRIG_ANY - "all ones" value used to test which trigger sources are
 * supported.
 *
 * %TRIG_INVALID - "all zeroes" value used to indicate that all requested
 * trigger sources are invalid.
 *
 * %TRIG_NONE - never trigger (often used as a @stop_src value).
 *
 * %TRIG_NOW - trigger after '_arg' nanoseconds.
 *
 * %TRIG_FOLLOW - trigger follows another event.
 *
 * %TRIG_TIMER - trigger every '_arg' nanoseconds.
 *

Annotation

Implementation Notes