drivers/comedi/drivers/ni_stc.h
Source file repositories/reference/linux-study-clean/drivers/comedi/drivers/ni_stc.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/comedi/drivers/ni_stc.h- Extension
.h- Size
- 44053 bytes
- Lines
- 1141
- 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.
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
ni_tio.hni_routes.h
Detected Declarations
struct ni_board_structstruct ni_privateenum caldac_enumenum ni_reg_type
Annotated Snippet
struct ni_board_struct {
const char *name;
const char *alt_route_name;
int device_id;
int isapnp_id;
int n_adchan;
unsigned int ai_maxdata;
int ai_fifo_depth;
unsigned int alwaysdither:1;
int gainlkup;
int ai_speed;
int n_aochan;
unsigned int ao_maxdata;
int ao_fifo_depth;
const struct comedi_lrange *ao_range_table;
unsigned int ao_speed;
int reg_type;
unsigned int has_8255:1;
unsigned int has_32dio_chan:1;
unsigned int dio_speed; /* not for e-series */
enum caldac_enum caldac[3];
};
#define MAX_N_CALDACS 34
#define MAX_N_AO_CHAN 8
#define NUM_GPCT 2
#define NUM_PFI_OUTPUT_SELECT_REGS 6
#define NUM_RTSI_SHARED_MUXS (NI_RTSI_BRD(-1) - NI_RTSI_BRD(0) + 1)
#define M_SERIES_EEPROM_SIZE 1024
struct ni_private {
unsigned short dio_output;
unsigned short dio_control;
int aimode;
unsigned int ai_calib_source;
unsigned int ai_calib_source_enabled;
/* protects access to windowed registers */
spinlock_t window_lock;
/* protects interrupt/dma register access */
spinlock_t soft_reg_copy_lock;
/* protects mite DMA channel request/release */
spinlock_t mite_channel_lock;
int changain_state;
unsigned int changain_spec;
unsigned int caldac_maxdata_list[MAX_N_CALDACS];
unsigned short caldacs[MAX_N_CALDACS];
unsigned short ai_cmd2;
unsigned short ao_conf[MAX_N_AO_CHAN];
unsigned short ao_mode1;
unsigned short ao_mode2;
unsigned short ao_mode3;
unsigned short ao_cmd1;
unsigned short ao_cmd2;
struct ni_gpct_device *counter_dev;
unsigned short an_trig_etc_reg;
unsigned int ai_offset[512];
unsigned long serial_interval_ns;
unsigned char serial_hw_mode;
unsigned short clock_and_fout;
unsigned short clock_and_fout2;
unsigned short int_a_enable_reg;
unsigned short int_b_enable_reg;
unsigned short io_bidirection_pin_reg;
unsigned short rtsi_trig_direction_reg;
unsigned short rtsi_trig_a_output_reg;
unsigned short rtsi_trig_b_output_reg;
unsigned short pfi_output_select_reg[NUM_PFI_OUTPUT_SELECT_REGS];
unsigned short ai_ao_select_reg;
unsigned short g0_g1_select_reg;
unsigned short cdio_dma_select_reg;
unsigned int clock_ns;
unsigned int clock_source;
unsigned short pwm_up_count;
Annotation
- Immediate include surface: `ni_tio.h`, `ni_routes.h`.
- Detected declarations: `struct ni_board_struct`, `struct ni_private`, `enum caldac_enum`, `enum ni_reg_type`.
- Atlas domain: Driver Families / drivers/comedi.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.