drivers/comedi/drivers/jr3_pci.h

Source file repositories/reference/linux-study-clean/drivers/comedi/drivers/jr3_pci.h

File Facts

System
Linux kernel
Corpus path
drivers/comedi/drivers/jr3_pci.h
Extension
.h
Size
26399 bytes
Lines
736
Domain
Driver Families
Bucket
drivers/comedi
Inferred role
Driver Families: implementation source
Status
source implementation candidate

Why This File Exists

Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.

Dependency Surface

Detected Declarations

Annotated Snippet

struct raw_channel {
	u32 raw_time;
	s32 raw_data;
	s32 reserved[2];
};

/*
 * The force_array structure shows the layout for the decoupled and
 * filtered force data.
 */
struct force_array {
	s32 fx;
	s32 fy;
	s32 fz;
	s32 mx;
	s32 my;
	s32 mz;
	s32 v1;
	s32 v2;
};

/*
 * The six_axis_array structure shows the layout for the offsets and
 * the full scales.
 */
struct six_axis_array {
	s32 fx;
	s32 fy;
	s32 fz;
	s32 mx;
	s32 my;
	s32 mz;
};

/* VECT_BITS */
/*
 * The vect_bits structure shows the layout for indicating
 * which axes to use in computing the vectors. Each bit signifies
 * selection of a single axis. The V1x axis bit corresponds to a hex
 * value of 0x0001 and the V2z bit corresponds to a hex value of
 * 0x0020. Example: to specify the axes V1x, V1y, V2x, and V2z the
 * pattern would be 0x002b. Vector 1 defaults to a force vector and
 * vector 2 defaults to a moment vector. It is possible to change one
 * or the other so that two force vectors or two moment vectors are
 * calculated. Setting the changeV1 bit or the changeV2 bit will
 * change that vector to be the opposite of its default. Therefore to
 * have two force vectors, set changeV1 to 1.
 */

/* vect_bits appears to be unused at this time */
enum {
	fx = 0x0001,
	fy = 0x0002,
	fz = 0x0004,
	mx = 0x0008,
	my = 0x0010,
	mz = 0x0020,
	changeV2 = 0x0040,
	changeV1 = 0x0080
};

/* WARNING_BITS */
/*
 * The warning_bits structure shows the bit pattern for the warning
 * word. The bit fields are shown from bit 0 (lsb) to bit 15 (msb).
 */

/* XX_NEAR_SET */
/*
 * The xx_near_sat bits signify that the indicated axis has reached or
 * exceeded the near saturation value.
 */

enum {
	fx_near_sat = 0x0001,
	fy_near_sat = 0x0002,
	fz_near_sat = 0x0004,
	mx_near_sat = 0x0008,
	my_near_sat = 0x0010,
	mz_near_sat = 0x0020
};

/* ERROR_BITS */
/* XX_SAT */
/* MEMORY_ERROR */
/* SENSOR_CHANGE */

/*
 * The error_bits structure shows the bit pattern for the error word.
 * The bit fields are shown from bit 0 (lsb) to bit 15 (msb). The

Annotation

Implementation Notes