#define COMEDI_NUM_BOARD_MINORS 0x30
#define COMEDI_FIRST_SUBDEVICE_MINOR COMEDI_NUM_BOARD_MINORS
-typedef struct comedi_lrange_struct comedi_lrange;
-
typedef struct device device_create_result_type;
#define COMEDI_DEVICE_CREATE(cs, parent, devt, drvdata, device, fmt...) \
unsigned int settling_time_0;
- const comedi_lrange *range_table;
- const comedi_lrange *const *range_table_list;
+ const struct comedi_lrange *range_table;
+ const struct comedi_lrange *const *range_table_list;
unsigned int *chanlist; /* driver-owned chanlist (not used) */
#define BIP_RANGE(a) {-(a)*1e6, (a)*1e6, 0}
#define UNI_RANGE(a) {0, (a)*1e6, 0}
-extern const comedi_lrange range_bipolar10;
-extern const comedi_lrange range_bipolar5;
-extern const comedi_lrange range_bipolar2_5;
-extern const comedi_lrange range_unipolar10;
-extern const comedi_lrange range_unipolar5;
-extern const comedi_lrange range_unknown;
+extern const struct comedi_lrange range_bipolar10;
+extern const struct comedi_lrange range_bipolar5;
+extern const struct comedi_lrange range_bipolar2_5;
+extern const struct comedi_lrange range_unipolar10;
+extern const struct comedi_lrange range_unipolar5;
+extern const struct comedi_lrange range_unknown;
#define range_digital range_unipolar5
#define GCC_ZERO_LENGTH_ARRAY 0
#endif
-struct comedi_lrange_struct {
+struct comedi_lrange {
int length;
comedi_krange range[GCC_ZERO_LENGTH_ARRAY];
};
typedef unsigned int DWORD, *PDWORD; /* 32-bit */
typedef unsigned long ULONG_PTR;
-typedef const comedi_lrange *PCRANGE;
+typedef const struct comedi_lrange *PCRANGE;
#define LOBYTE(W) (BYTE)((W) & 0xFF)
#define HIBYTE(W) (BYTE)(((W) >> 8) & 0xFF)
//MODULE INFO STRUCTURE
-static const comedi_lrange range_apci1710_ttl = { 4, {
+static const struct comedi_lrange range_apci1710_ttl = { 4, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2),
}
};
-static const comedi_lrange range_apci1710_ssi = { 4, {
+static const struct comedi_lrange range_apci1710_ssi = { 4, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2),
}
};
-static const comedi_lrange range_apci1710_inccpt = { 4, {
+static const struct comedi_lrange range_apci1710_inccpt = { 4, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2),
} Config_Parameters_Main;
/* ANALOG INPUT RANGE */
-comedi_lrange range_apci035_ai = { 8, {
+struct comedi_lrange range_apci035_ai = { 8, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2),
#ifdef __KERNEL__
-static const comedi_lrange range_apci16xx_ttl = { 12,
+static const struct comedi_lrange range_apci16xx_ttl = { 12,
{BIP_RANGE(1),
BIP_RANGE(1),
BIP_RANGE(1),
// comedi related defines
//ANALOG INPUT RANGE
-static const comedi_lrange range_apci3120_ai = { 8, {
+static const struct comedi_lrange range_apci3120_ai = { 8, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2),
};
// ANALOG OUTPUT RANGE
-static const comedi_lrange range_apci3120_ao = { 2, {
+static const struct comedi_lrange range_apci3120_ao = { 2, {
BIP_RANGE(10),
UNI_RANGE(10)
}
Config_Parameters_Module3, Config_Parameters_Module4;
//ANALOG INPUT RANGE
-static const comedi_lrange range_apci3200_ai = { 8, {
+static const struct comedi_lrange range_apci3200_ai = { 8, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2),
}
};
-static const comedi_lrange range_apci3300_ai = { 4, {
+static const struct comedi_lrange range_apci3300_ai = { 4, {
UNI_RANGE(10),
UNI_RANGE(5),
UNI_RANGE(2),
#define MODE0 0
#define MODE1 1
// ANALOG OUTPUT RANGE
-comedi_lrange range_apci3501_ao = { 2, {
+struct comedi_lrange range_apci3501_ao = { 2, {
BIP_RANGE(10),
UNI_RANGE(10)
}
#ifdef __KERNEL__
-static const comedi_lrange range_apci3XXX_ai = { 8, {BIP_RANGE(10),
+static const struct comedi_lrange range_apci3XXX_ai = { 8, {BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2),
BIP_RANGE(1),
UNI_RANGE(1)}
};
-static const comedi_lrange range_apci3XXX_ttl = { 12, {BIP_RANGE(1),
+static const struct comedi_lrange range_apci3XXX_ttl = { 12, {BIP_RANGE(1),
BIP_RANGE(1),
BIP_RANGE(1),
BIP_RANGE(1),
BIP_RANGE(1)}
};
-static const comedi_lrange range_apci3XXX_ao = { 2, {BIP_RANGE(10),
+static const struct comedi_lrange range_apci3XXX_ao = { 2, {BIP_RANGE(10),
UNI_RANGE(10)}
};
#endif
static void pci9111_ai_munge(struct comedi_device * dev, struct comedi_subdevice * s,
void *data, unsigned int num_bytes, unsigned int start_chan_index);
-static const comedi_lrange pci9111_hr_ai_range = {
+static const struct comedi_lrange pci9111_hr_ai_range = {
5,
{
BIP_RANGE(10),
int ai_resolution_mask;
int ao_resolution; // resolution of D/A
int ao_resolution_mask;
- const comedi_lrange *ai_range_list; // rangelist for A/D
- const comedi_lrange *ao_range_list; // rangelist for D/A
+ const struct comedi_lrange *ai_range_list; // rangelist for A/D
+ const struct comedi_lrange *ao_range_list; // rangelist for D/A
unsigned int ai_acquisition_period_min_ns;
} pci9111_board_struct;
#define EXTTRG_AI 0 /* ext trg is used by AI */
-static const comedi_lrange range_pci9118dg_hr = { 8, {
+static const struct comedi_lrange range_pci9118dg_hr = { 8, {
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
}
};
-static const comedi_lrange range_pci9118hg = { 8, {
+static const struct comedi_lrange range_pci9118hg = { 8, {
BIP_RANGE(5),
BIP_RANGE(0.5),
BIP_RANGE(0.05),
int n_aochan; // num of D/A chans
int ai_maxdata; // resolution of A/D
int ao_maxdata; // resolution of D/A
- const comedi_lrange *rangelist_ai; // rangelist for A/D
- const comedi_lrange *rangelist_ao; // rangelist for D/A
+ const struct comedi_lrange *rangelist_ai; // rangelist for A/D
+ const struct comedi_lrange *rangelist_ao; // rangelist for D/A
unsigned int ai_ns_min; // max sample speed of card v ns
unsigned int ai_pacer_min; // minimal pacer value (c1*c2 or c1 in burst)
int half_fifo_size; // size of FIFO/2
#define TIMEOUT 20
// available ranges through the PGA gains
-static const comedi_lrange range_adq12b_ai_bipolar = { 4, {
+static const struct comedi_lrange range_adq12b_ai_bipolar = { 4, {
BIP_RANGE( 5 ),
BIP_RANGE( 2 ),
BIP_RANGE( 1 ),
BIP_RANGE( 0.5 )
}};
-static const comedi_lrange range_adq12b_ai_unipolar = { 4, {
+static const struct comedi_lrange range_adq12b_ai_unipolar = { 4, {
UNI_RANGE( 5 ),
UNI_RANGE( 2 ),
UNI_RANGE( 1 ),
// D/A synchronized control (PCI1720_SYNCONT)
#define Syncont_SC0 1 /* set synchronous output mode */
-static const comedi_lrange range_pci1710_3 = { 9, {
+static const struct comedi_lrange range_pci1710_3 = { 9, {
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
static const char range_codes_pci1710_3[] =
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x10, 0x11, 0x12, 0x13 };
-static const comedi_lrange range_pci1710hg = { 12, {
+static const struct comedi_lrange range_pci1710hg = { 12, {
BIP_RANGE(5),
BIP_RANGE(0.5),
BIP_RANGE(0.05),
{ 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x10, 0x11, 0x12,
0x13 };
-static const comedi_lrange range_pci17x1 = { 5, {
+static const struct comedi_lrange range_pci17x1 = { 5, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2.5),
static const char range_codes_pci17x1[] = { 0x00, 0x01, 0x02, 0x03, 0x04 };
-static const comedi_lrange range_pci1720 = { 4, {
+static const struct comedi_lrange range_pci1720 = { 4, {
UNI_RANGE(5),
UNI_RANGE(10),
BIP_RANGE(5),
}
};
-static const comedi_lrange range_pci171x_da = { 2, {
+static const struct comedi_lrange range_pci171x_da = { 2, {
UNI_RANGE(5),
UNI_RANGE(10),
}
int n_counter; // num of counters
int ai_maxdata; // resolution of A/D
int ao_maxdata; // resolution of D/A
- const comedi_lrange *rangelist_ai; // rangelist for A/D
+ const struct comedi_lrange *rangelist_ai; // rangelist for A/D
const char *rangecode_ai; // range codes for programming
- const comedi_lrange *rangelist_ao; // rangelist for D/A
+ const struct comedi_lrange *rangelist_ao; // rangelist for D/A
unsigned int ai_ns_min; // max sample speed of card v ns
unsigned int fifo_half_size; // size of FIFO/2
} boardtype;
//static unsigned short pci_list_builded=0; /*=1 list of card is know */
-static const comedi_lrange range_pci1723 = { 1, {
+static const struct comedi_lrange range_pci1723 = { 1, {
BIP_RANGE(10)
}
};
int n_aochan; // num of D/A chans
int n_diochan; // num of DIO chans
int ao_maxdata; // resolution of D/A
- const comedi_lrange *rangelist_ao; // rangelist for D/A
+ const struct comedi_lrange *rangelist_ao; // rangelist for D/A
} boardtype;
static const boardtype boardtypes[] = {
return insn->n;
}
-static const comedi_lrange range_aio_aio12_8 = {
+static const struct comedi_lrange range_aio_aio12_8 = {
4,
{
UNI_RANGE(5),
*/
/* The software selectable internal ranges for PCI224 (option[2] == 0). */
-static const comedi_lrange range_pci224_internal = {
+static const struct comedi_lrange range_pci224_internal = {
8,
{
BIP_RANGE(10),
};
/* The software selectable external ranges for PCI224 (option[2] == 1). */
-static const comedi_lrange range_pci224_external = {
+static const struct comedi_lrange range_pci224_external = {
2,
{
RANGE_ext(-1, 1), /* bipolar [-Vref,+Vref] */
/* The hardware selectable Vref*2 external range for PCI234
* (option[2] == 1, option[3+n] == 0). */
-static const comedi_lrange range_pci234_ext2 = {
+static const struct comedi_lrange range_pci234_ext2 = {
1,
{
RANGE_ext(-2, 2),
/* The hardware selectable Vref external range for PCI234
* (option[2] == 1, option[3+n] == 1). */
-static const comedi_lrange range_pci234_ext = {
+static const struct comedi_lrange range_pci234_ext = {
1,
{
RANGE_ext(-1, 1),
/* Sort out channel range options. */
if (thisboard->model == pci234_model) {
/* PCI234 range options. */
- const comedi_lrange **range_table_list;
+ const struct comedi_lrange **range_table_list;
s->range_table_list = range_table_list =
- kmalloc(sizeof(comedi_lrange *) * s->n_chan,
+ kmalloc(sizeof(struct comedi_lrange *) * s->n_chan,
GFP_KERNEL);
if (!s->range_table_list) {
return -ENOMEM;
};
/* PCI230 analogue input range table */
-static const comedi_lrange pci230_ai_range = { 7, {
+static const struct comedi_lrange pci230_ai_range = { 7, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2.5),
static const unsigned char pci230_ai_bipolar[7] = { 1, 1, 1, 1, 0, 0, 0 };
/* PCI230 analogue output range table */
-static const comedi_lrange pci230_ao_range = { 2, {
+static const struct comedi_lrange pci230_ao_range = { 2, {
UNI_RANGE(10),
BIP_RANGE(10)
}
static struct pcmcia_device *cur_dev = NULL;
-static const comedi_lrange das16cs_ai_range = { 4, {
+static const struct comedi_lrange das16cs_ai_range = { 4, {
RANGE(-10, 10),
RANGE(-5, 5),
RANGE(-2.5, 2.5),
// bit in hexadecimal representation of range index that indicates unipolar input range
#define IS_UNIPOLAR 0x4
// analog input ranges for most boards
-static const comedi_lrange cb_pcidas_ranges = {
+static const struct comedi_lrange cb_pcidas_ranges = {
8,
{
BIP_RANGE(10),
};
// pci-das1001 input ranges
-static const comedi_lrange cb_pcidas_alt_ranges = {
+static const struct comedi_lrange cb_pcidas_alt_ranges = {
8,
{
BIP_RANGE(10),
};
// analog output ranges
-static const comedi_lrange cb_pcidas_ao_ranges = {
+static const struct comedi_lrange cb_pcidas_ao_ranges = {
4,
{
BIP_RANGE(5),
int has_ao_fifo; // analog output has fifo
int ao_scan_speed; // analog output speed for 1602 series (for a scan, not conversion)
int fifo_size; // number of samples fifo can hold
- const comedi_lrange *ranges;
+ const struct comedi_lrange *ranges;
enum trimpot_model trimpot;
unsigned has_dac08:1;
} cb_pcidas_board;
};
// analog input ranges for 64xx boards
-static const comedi_lrange ai_ranges_64xx = {
+static const struct comedi_lrange ai_ranges_64xx = {
8,
{
BIP_RANGE(10),
};
/* analog input ranges for 60xx boards */
-static const comedi_lrange ai_ranges_60xx = {
+static const struct comedi_lrange ai_ranges_60xx = {
4,
{
BIP_RANGE(10),
};
/* analog input ranges for 6030, etc boards */
-static const comedi_lrange ai_ranges_6030 = {
+static const struct comedi_lrange ai_ranges_6030 = {
14,
{
BIP_RANGE(10),
};
/* analog input ranges for 6052, etc boards */
-static const comedi_lrange ai_ranges_6052 = {
+static const struct comedi_lrange ai_ranges_6052 = {
15,
{
BIP_RANGE(10),
};
// analog input ranges for 4020 board
-static const comedi_lrange ai_ranges_4020 = {
+static const struct comedi_lrange ai_ranges_4020 = {
2,
{
BIP_RANGE(5),
};
// analog output ranges
-static const comedi_lrange ao_ranges_64xx = {
+static const struct comedi_lrange ao_ranges_64xx = {
4,
{
BIP_RANGE(5),
0x3,
};
-static const comedi_lrange ao_ranges_60xx = {
+static const struct comedi_lrange ao_ranges_60xx = {
1,
{
BIP_RANGE(10),
0x0,
};
-static const comedi_lrange ao_ranges_6030 = {
+static const struct comedi_lrange ao_ranges_6030 = {
2,
{
BIP_RANGE(10),
0x2,
};
-static const comedi_lrange ao_ranges_4020 = {
+static const struct comedi_lrange ao_ranges_4020 = {
2,
{
BIP_RANGE(5),
int ai_se_chans; // number of ai inputs in single-ended mode
int ai_bits; // analog input resolution
int ai_speed; // fastest conversion period in ns
- const comedi_lrange *ai_range_table;
+ const struct comedi_lrange *ai_range_table;
int ao_nchan; // number of analog out channels
int ao_bits; // analog output resolution
int ao_scan_speed; // analog output speed (for a scan, not conversion)
- const comedi_lrange *ao_range_table;
+ const struct comedi_lrange *ao_range_table;
const int *ao_range_code;
const hw_fifo_info_t *const ai_fifo;
enum register_layout layout; // different board families have slightly different registers
#define DADATA 8 // FIRST D/A DATA REGISTER (0)
-static const comedi_lrange cb_pcidda_ranges = {
+static const struct comedi_lrange cb_pcidda_ranges = {
6,
{
BIP_RANGE(10),
unsigned short device_id;
int ao_chans;
int ao_bits;
- const comedi_lrange *ranges;
+ const struct comedi_lrange *ranges;
} cb_pcidda_board;
static const cb_pcidda_board cb_pcidda_boards[] = {
{
int fifo_size; // number of samples fifo can hold
int dio_bits; // number of dio bits
int has_dio; // has DIO
- const comedi_lrange *ranges;
+ const struct comedi_lrange *ranges;
} cb_pcimdas_board;
static const cb_pcimdas_board cb_pcimdas_boards[] = {
static const int nano_per_micro = 1000;
/* fake analog input ranges */
-static const comedi_lrange waveform_ai_ranges = {
+static const struct comedi_lrange waveform_ai_ranges = {
2,
{
BIP_RANGE(10),
#define DAQBOARD2000_CPLD_DONE 0x0004
// Available ranges
-static const comedi_lrange range_daqboard2000_ai = { 13, {
+static const struct comedi_lrange range_daqboard2000_ai = { 13, {
RANGE(-10, 10),
RANGE(-5, 5),
RANGE(-2.5, 2.5),
}
};
-static const comedi_lrange range_daqboard2000_ao = { 1, {
+static const struct comedi_lrange range_daqboard2000_ao = { 1, {
RANGE(-10, 10)
}
};
static void i8254_set_mode_low(unsigned int base, int channel,
unsigned int mode);
-static const comedi_lrange range_das08_pgl = { 9, {
+static const struct comedi_lrange range_das08_pgl = { 9, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2.5),
UNI_RANGE(1.25)
}
};
-static const comedi_lrange range_das08_pgh = { 12, {
+static const struct comedi_lrange range_das08_pgh = { 12, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(1),
UNI_RANGE(0.01),
}
};
-static const comedi_lrange range_das08_pgm = { 9, {
+static const struct comedi_lrange range_das08_pgm = { 9, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(0.5),
*/
-static const comedi_lrange *const das08_ai_lranges[] = {
+static const struct comedi_lrange *const das08_ai_lranges[] = {
&range_unknown,
&range_bipolar5,
&range_das08_pgh,
#define DAS1600_WS 0x02
#define DAS1600_CLK_10MHZ 0x01
-static const comedi_lrange range_das1x01_bip = { 4, {
+static const struct comedi_lrange range_das1x01_bip = { 4, {
BIP_RANGE(10),
BIP_RANGE(1),
BIP_RANGE(0.1),
BIP_RANGE(0.01),
}
};
-static const comedi_lrange range_das1x01_unip = { 4, {
+static const struct comedi_lrange range_das1x01_unip = { 4, {
UNI_RANGE(10),
UNI_RANGE(1),
UNI_RANGE(0.1),
UNI_RANGE(0.01),
}
};
-static const comedi_lrange range_das1x02_bip = { 4, {
+static const struct comedi_lrange range_das1x02_bip = { 4, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
}
};
-static const comedi_lrange range_das1x02_unip = { 4, {
+static const struct comedi_lrange range_das1x02_unip = { 4, {
UNI_RANGE(10),
UNI_RANGE(5),
UNI_RANGE(2.5),
UNI_RANGE(1.25),
}
};
-static const comedi_lrange range_das16jr = { 9, {
+static const struct comedi_lrange range_das16jr = { 9, {
// also used by 16/330
BIP_RANGE(10),
BIP_RANGE(5),
UNI_RANGE(1.25),
}
};
-static const comedi_lrange range_das16jr_16 = { 8, {
+static const struct comedi_lrange range_das16jr_16 = { 8, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2.5),
das1600_gainlist,
das1600_gainlist,
};
-static const comedi_lrange *const das16_ai_uni_lranges[] = {
+static const struct comedi_lrange *const das16_ai_uni_lranges[] = {
&range_unknown,
&range_das16jr,
&range_das16jr_16,
&range_das1x01_unip,
&range_das1x02_unip,
};
-static const comedi_lrange *const das16_ai_bip_lranges[] = {
+static const struct comedi_lrange *const das16_ai_bip_lranges[] = {
&range_unknown,
&range_das16jr,
&range_das16jr_16,
unsigned int current_buffer;
volatile unsigned int dma_transfer_size; // target number of bytes to transfer per dma shot
// user-defined analog input and output ranges defined from config options
- comedi_lrange *user_ai_range_table;
- comedi_lrange *user_ao_range_table;
+ struct comedi_lrange *user_ai_range_table;
+ struct comedi_lrange *user_ao_range_table;
struct timer_list timer; // for timed interrupt
volatile short timer_running;
(it->options[4] || it->options[5])) {
// allocate single-range range table
devpriv->user_ai_range_table =
- kmalloc(sizeof(comedi_lrange) + sizeof(comedi_krange),
+ kmalloc(sizeof(struct comedi_lrange) + sizeof(comedi_krange),
GFP_KERNEL);
// initialize ai range
devpriv->user_ai_range_table->length = 1;
if (it->options[6] || it->options[7]) {
// allocate single-range range table
devpriv->user_ao_range_table =
- kmalloc(sizeof(comedi_lrange) + sizeof(comedi_krange),
+ kmalloc(sizeof(struct comedi_lrange) + sizeof(comedi_krange),
GFP_KERNEL);
// initialize ao range
devpriv->user_ao_range_table->length = 1;
#define DAS16M1_82C55 0x400
#define DAS16M1_8254_THIRD 0x404
-static const comedi_lrange range_das16m1 = { 9,
+static const struct comedi_lrange range_das16m1 = { 9,
{
BIP_RANGE(5),
BIP_RANGE(2.5),
static unsigned int suggest_transfer_size(comedi_cmd * cmd);
// analog input ranges
-static const comedi_lrange range_ai_das1801 = {
+static const struct comedi_lrange range_ai_das1801 = {
8,
{
RANGE(-5, 5),
}
};
-static const comedi_lrange range_ai_das1802 = {
+static const struct comedi_lrange range_ai_das1802 = {
8,
{
RANGE(-10, 10),
int do_n_chan; /* number of digital output channels */
int ao_ability; /* 0 == no analog out, 1 == basic analog out, 2 == waveform analog out */
int ao_n_chan; /* number of analog out channels */
- const comedi_lrange *range_ai; /* available input ranges */
+ const struct comedi_lrange *range_ai; /* available input ranges */
} das1800_board;
/* Warning: the maximum conversion speeds listed below are
#define devpriv ((das1800_private *)dev->private)
// analog out range for boards with basic analog out
-static const comedi_lrange range_ao_1 = {
+static const struct comedi_lrange range_ao_1 = {
1,
{
RANGE(-10, 10),
// analog out range for 'ao' boards
/*
-static const comedi_lrange range_ao_2 = {
+static const struct comedi_lrange range_ao_2 = {
2,
{
RANGE(-10, 10),
typedef struct das800_board_struct {
const char *name;
int ai_speed;
- const comedi_lrange *ai_range;
+ const struct comedi_lrange *ai_range;
int resolution;
} das800_board;
//analog input ranges
-static const comedi_lrange range_das800_ai = {
+static const struct comedi_lrange range_das800_ai = {
1,
{
RANGE(-5, 5),
}
};
-static const comedi_lrange range_das801_ai = {
+static const struct comedi_lrange range_das801_ai = {
9,
{
RANGE(-5, 5),
}
};
-static const comedi_lrange range_cio_das801_ai = {
+static const struct comedi_lrange range_cio_das801_ai = {
9,
{
RANGE(-5, 5),
}
};
-static const comedi_lrange range_das802_ai = {
+static const struct comedi_lrange range_das802_ai = {
9,
{
RANGE(-5, 5),
}
};
-static const comedi_lrange range_das80216_ai = {
+static const struct comedi_lrange range_das80216_ai = {
8,
{
RANGE(-10, 10),
#define DMM32AT_DIRCH 0x08
/* board AI ranges in comedi structure */
-static const comedi_lrange dmm32at_airanges = {
+static const struct comedi_lrange dmm32at_airanges = {
4,
{
UNI_RANGE(10),
/* only one of these ranges is valid, as set by a jumper on the
* board. The application should only use the range set by the jumper
*/
-static const comedi_lrange dmm32at_aoranges = {
+static const struct comedi_lrange dmm32at_aoranges = {
4,
{
UNI_RANGE(10),
const char *name;
int ai_chans;
int ai_bits;
- const comedi_lrange *ai_ranges;
+ const struct comedi_lrange *ai_ranges;
int ao_chans;
int ao_bits;
- const comedi_lrange *ao_ranges;
+ const struct comedi_lrange *ao_ranges;
int have_dio;
int dio_chans;
} dmm32at_board;
#if 0
// ignore 'defined but not used' warning
-static const comedi_lrange range_dt2801_ai_pgh_bipolar = { 4, {
+static const struct comedi_lrange range_dt2801_ai_pgh_bipolar = { 4, {
RANGE(-10, 10),
RANGE(-5, 5),
RANGE(-2.5, 2.5),
}
};
#endif
-static const comedi_lrange range_dt2801_ai_pgl_bipolar = { 4, {
+static const struct comedi_lrange range_dt2801_ai_pgl_bipolar = { 4, {
RANGE(-10, 10),
RANGE(-1, 1),
RANGE(-0.1, 0.1),
#if 0
// ignore 'defined but not used' warning
-static const comedi_lrange range_dt2801_ai_pgh_unipolar = { 4, {
+static const struct comedi_lrange range_dt2801_ai_pgh_unipolar = { 4, {
RANGE(0, 10),
RANGE(0, 5),
RANGE(0, 2.5),
}
};
#endif
-static const comedi_lrange range_dt2801_ai_pgl_unipolar = { 4, {
+static const struct comedi_lrange range_dt2801_ai_pgl_unipolar = { 4, {
RANGE(0, 10),
RANGE(0, 1),
RANGE(0, 0.1),
#define boardtype (*(const boardtype_t *)dev->board_ptr)
typedef struct {
- const comedi_lrange *dac_range_types[2];
+ const struct comedi_lrange *dac_range_types[2];
unsigned int ao_readback[2];
} dt2801_private;
#define devpriv ((dt2801_private *)dev->private)
return n_chans;
}
-static const comedi_lrange *dac_range_table[] = {
+static const struct comedi_lrange *dac_range_table[] = {
&range_bipolar10,
&range_bipolar5,
&range_bipolar2_5,
&range_unipolar5
};
-static const comedi_lrange *dac_range_lkup(int opt)
+static const struct comedi_lrange *dac_range_lkup(int opt)
{
if (opt < 0 || opt > 5)
return &range_unknown;
return dac_range_table[opt];
}
-static const comedi_lrange *ai_range_lkup(int type, int opt)
+static const struct comedi_lrange *ai_range_lkup(int type, int opt)
{
switch (type) {
case 0:
static const char *driver_name = "dt2811";
-static const comedi_lrange range_dt2811_pgh_ai_5_unipolar = { 4, {
+static const struct comedi_lrange range_dt2811_pgh_ai_5_unipolar = { 4, {
RANGE(0, 5),
RANGE(0, 2.5),
RANGE(0, 1.25),
RANGE(0, 0.625)
}
};
-static const comedi_lrange range_dt2811_pgh_ai_2_5_bipolar = { 4, {
+static const struct comedi_lrange range_dt2811_pgh_ai_2_5_bipolar = { 4, {
RANGE(-2.5, 2.5),
RANGE(-1.25, 1.25),
RANGE(-0.625, 0.625),
RANGE(-0.3125, 0.3125)
}
};
-static const comedi_lrange range_dt2811_pgh_ai_5_bipolar = { 4, {
+static const struct comedi_lrange range_dt2811_pgh_ai_5_bipolar = { 4, {
RANGE(-5, 5),
RANGE(-2.5, 2.5),
RANGE(-1.25, 1.25),
RANGE(-0.625, 0.625)
}
};
-static const comedi_lrange range_dt2811_pgl_ai_5_unipolar = { 4, {
+static const struct comedi_lrange range_dt2811_pgl_ai_5_unipolar = { 4, {
RANGE(0, 5),
RANGE(0, 0.5),
RANGE(0, 0.05),
RANGE(0, 0.01)
}
};
-static const comedi_lrange range_dt2811_pgl_ai_2_5_bipolar = { 4, {
+static const struct comedi_lrange range_dt2811_pgl_ai_2_5_bipolar = { 4, {
RANGE(-2.5, 2.5),
RANGE(-0.25, 0.25),
RANGE(-0.025, 0.025),
RANGE(-0.005, 0.005)
}
};
-static const comedi_lrange range_dt2811_pgl_ai_5_bipolar = { 4, {
+static const struct comedi_lrange range_dt2811_pgl_ai_5_bipolar = { 4, {
RANGE(-5, 5),
RANGE(-0.5, 0.5),
RANGE(-0.05, 0.05),
typedef struct {
const char *name;
- const comedi_lrange *bip_5;
- const comedi_lrange *bip_2_5;
- const comedi_lrange *unip_5;
+ const struct comedi_lrange *bip_5;
+ const struct comedi_lrange *bip_2_5;
+ const struct comedi_lrange *unip_5;
} boardtype;
static const boardtype boardtypes[] = {
{"dt2811-pgh",
enum {
dac_bipolar_5, dac_bipolar_2_5, dac_unipolar_5
} dac_range[2];
- const comedi_lrange *range_type_list[2];
+ const struct comedi_lrange *range_type_list[2];
unsigned int ao_readback[2];
} dt2811_private;
#define devpriv ((dt2811_private *)dev->private)
-static const comedi_lrange *dac_range_types[] = {
+static const struct comedi_lrange *dac_range_types[] = {
&range_bipolar5,
&range_bipolar2_5,
&range_unipolar5
#include <linux/ioport.h>
#include <linux/delay.h>
-static const comedi_lrange range_dt2815_ao_32_current = { 1, {
+static const struct comedi_lrange range_dt2815_ao_32_current = { 1, {
RANGE_mA(0, 32)
}
};
-static const comedi_lrange range_dt2815_ao_20_current = { 1, {
+static const struct comedi_lrange range_dt2815_ao_20_current = { 1, {
RANGE_mA(4, 20)
}
};
static void dt2815_free_resources(struct comedi_device * dev);
typedef struct {
- const comedi_lrange *range_type_list[8];
+ const struct comedi_lrange *range_type_list[8];
unsigned int ao_readback[8];
} dt2815_private;
{
struct comedi_subdevice *s;
int i;
- const comedi_lrange *current_range_type, *voltage_range_type;
+ const struct comedi_lrange *current_range_type, *voltage_range_type;
unsigned long iobase;
iobase = it->options[0];
#define DT2821_XCLK 0x0002 /* (R/W) external clock enable */
#define DT2821_BDINIT 0x0001 /* (W) initialize board */
-static const comedi_lrange range_dt282x_ai_lo_bipolar = { 4, {
+static const struct comedi_lrange range_dt282x_ai_lo_bipolar = { 4, {
RANGE(-10, 10),
RANGE(-5, 5),
RANGE(-2.5, 2.5),
RANGE(-1.25, 1.25)
}
};
-static const comedi_lrange range_dt282x_ai_lo_unipolar = { 4, {
+static const struct comedi_lrange range_dt282x_ai_lo_unipolar = { 4, {
RANGE(0, 10),
RANGE(0, 5),
RANGE(0, 2.5),
RANGE(0, 1.25)
}
};
-static const comedi_lrange range_dt282x_ai_5_bipolar = { 4, {
+static const struct comedi_lrange range_dt282x_ai_5_bipolar = { 4, {
RANGE(-5, 5),
RANGE(-2.5, 2.5),
RANGE(-1.25, 1.25),
RANGE(-0.625, 0.625),
}
};
-static const comedi_lrange range_dt282x_ai_5_unipolar = { 4, {
+static const struct comedi_lrange range_dt282x_ai_5_unipolar = { 4, {
RANGE(0, 5),
RANGE(0, 2.5),
RANGE(0, 1.25),
RANGE(0, 0.625),
}
};
-static const comedi_lrange range_dt282x_ai_hi_bipolar = { 4, {
+static const struct comedi_lrange range_dt282x_ai_hi_bipolar = { 4, {
RANGE(-10, 10),
RANGE(-1, 1),
RANGE(-0.1, 0.1),
RANGE(-0.02, 0.02)
}
};
-static const comedi_lrange range_dt282x_ai_hi_unipolar = { 4, {
+static const struct comedi_lrange range_dt282x_ai_hi_unipolar = { 4, {
RANGE(0, 10),
RANGE(0, 1),
RANGE(0, 0.1),
int da0_2scomp; /* same, for DAC0 */
int da1_2scomp; /* same, for DAC1 */
- const comedi_lrange *darangelist[2];
+ const struct comedi_lrange *darangelist[2];
short ao[2];
return 1;
}
-static const comedi_lrange *const ai_range_table[] = {
+static const struct comedi_lrange *const ai_range_table[] = {
&range_dt282x_ai_lo_bipolar,
&range_dt282x_ai_lo_unipolar,
&range_dt282x_ai_5_bipolar,
&range_dt282x_ai_5_unipolar
};
-static const comedi_lrange *const ai_range_pgl_table[] = {
+static const struct comedi_lrange *const ai_range_pgl_table[] = {
&range_dt282x_ai_hi_bipolar,
&range_dt282x_ai_hi_unipolar
};
-static const comedi_lrange *opt_ai_range_lkup(int ispgl, int x)
+static const struct comedi_lrange *opt_ai_range_lkup(int ispgl, int x)
{
if (ispgl) {
if (x < 0 || x >= 2)
return ai_range_table[x];
}
}
-static const comedi_lrange *const ao_range_table[] = {
+static const struct comedi_lrange *const ao_range_table[] = {
&range_bipolar10,
&range_unipolar10,
&range_bipolar5,
&range_unipolar5,
&range_bipolar2_5
};
-static const comedi_lrange *opt_ao_range_lkup(int x)
+static const struct comedi_lrange *opt_ao_range_lkup(int x)
{
if (x < 0 || x >= 5)
x = 0;
#define PCI_VENDOR_ID_DT 0x1116
-static const comedi_lrange range_dt3000_ai = { 4, {
+static const struct comedi_lrange range_dt3000_ai = { 4, {
RANGE(-10, 10),
RANGE(-5, 5),
RANGE(-2.5, 2.5),
RANGE(-1.25, 1.25)
}
};
-static const comedi_lrange range_dt3000_ai_pgl = { 4, {
+static const struct comedi_lrange range_dt3000_ai_pgl = { 4, {
RANGE(-10, 10),
RANGE(-1, 1),
RANGE(-0.1, 0.1),
int adchan;
int adbits;
int ai_speed;
- const comedi_lrange *adrange;
+ const struct comedi_lrange *adrange;
int dachan;
int dabits;
} dt3k_boardtype;
struct comedi_dt9812 *comedi;
};
-static const comedi_lrange dt9812_10_ain_range = { 1, {
+static const struct comedi_lrange dt9812_10_ain_range = { 1, {
BIP_RANGE(10),
}
};
-static const comedi_lrange dt9812_2pt5_ain_range = { 1, {
+static const struct comedi_lrange dt9812_2pt5_ain_range = { 1, {
UNI_RANGE(2.5),
}
};
-static const comedi_lrange dt9812_10_aout_range = { 1, {
+static const struct comedi_lrange dt9812_10_aout_range = { 1, {
BIP_RANGE(10),
}
};
-static const comedi_lrange dt9812_2pt5_aout_range = { 1, {
+static const struct comedi_lrange dt9812_2pt5_aout_range = { 1, {
UNI_RANGE(2.5),
}
};
} fl512_private;
#define devpriv ((fl512_private *) dev->private)
-static const comedi_lrange range_fl512 = { 4, {
+static const struct comedi_lrange range_fl512 = { 4, {
BIP_RANGE(0.5),
BIP_RANGE(1),
BIP_RANGE(5),
#define Status_IRQ 0x00ff /* All interrupts */
/* Define analogue range */
-static const comedi_lrange range_analog = { 4, {
+static const struct comedi_lrange range_analog = { 4, {
UNI_RANGE(5),
UNI_RANGE(10),
BIP_RANGE(5),
int n_ctrs; /* num of counters */
int ai_maxdata; /* resolution of A/D */
int ao_maxdata; /* resolution of D/A */
- const comedi_lrange *rangelist_ai; /* rangelist for A/D */
+ const struct comedi_lrange *rangelist_ai; /* rangelist for A/D */
const char *rangecode; /* range codes for programming */
- const comedi_lrange *rangelist_ao; /* rangelist for D/A */
+ const struct comedi_lrange *rangelist_ao; /* rangelist for D/A */
};
static const struct boardtype boardtypes[] = {
void *iobase;
struct {
void *iobase;
- const comedi_lrange *ao_range_list[2]; /* range of channels of ao module */
+ const struct comedi_lrange *ao_range_list[2]; /* range of channels of ao module */
unsigned int last_data[2];
} pci20006;
struct {
static int pci20006_insn_write(struct comedi_device * dev, struct comedi_subdevice * s,
comedi_insn * insn, unsigned int * data);
-static const comedi_lrange *pci20006_range_list[] = {
+static const struct comedi_lrange *pci20006_range_list[] = {
&range_bipolar10,
&range_unipolar10,
&range_bipolar5,
static const int pci20341_timebase[] = { 0x00, 0x00, 0x00, 0x04 };
static const int pci20341_settling_time[] = { 0x58, 0x58, 0x93, 0x99 };
-static const comedi_lrange range_bipolar0_5 = { 1, {BIP_RANGE(0.5)} };
-static const comedi_lrange range_bipolar0_05 = { 1, {BIP_RANGE(0.05)} };
-static const comedi_lrange range_bipolar0_025 = { 1, {BIP_RANGE(0.025)} };
+static const struct comedi_lrange range_bipolar0_5 = { 1, {BIP_RANGE(0.5)} };
+static const struct comedi_lrange range_bipolar0_05 = { 1, {BIP_RANGE(0.05)} };
+static const struct comedi_lrange range_bipolar0_025 = { 1, {BIP_RANGE(0.025)} };
-static const comedi_lrange *const pci20341_ranges[] = {
+static const struct comedi_lrange *const pci20341_ranges[] = {
&range_bipolar5,
&range_bipolar0_5,
&range_bipolar0_05,
int length;
comedi_krange range;
} range[9];
- const comedi_lrange *range_table_list[8 * 7 + 2];
+ const struct comedi_lrange *range_table_list[8 * 7 + 2];
unsigned int maxdata_list[8 * 7 + 2];
u16 errors;
int retries;
p->range[j].range.max = 1000000;
for (k = 0; k < 7; k++) {
p->range_table_list[j + k * 8] =
- (comedi_lrange *) & p->range[j];
+ (struct comedi_lrange *) & p->range[j];
p->maxdata_list[j + k * 8] = 0x7fff;
}
}
p->range[8].range.max = 65536;
p->range_table_list[56] =
- (comedi_lrange *) & p->range[8];
+ (struct comedi_lrange *) & p->range[8];
p->range_table_list[57] =
- (comedi_lrange *) & p->range[8];
+ (struct comedi_lrange *) & p->range[8];
p->maxdata_list[56] = 0xffff;
p->maxdata_list[57] = 0xffff;
// Channel specific range and maxdata
return value;
}
-static const comedi_lrange me4000_ai_range = {
+static const struct comedi_lrange me4000_ai_range = {
4,
{
UNI_RANGE(2.5),
}
};
-static const comedi_lrange me4000_ao_range = {
+static const struct comedi_lrange me4000_ao_range = {
1,
{
BIP_RANGE(10),
static int me_attach(struct comedi_device *dev, comedi_devconfig *it);
static int me_detach(struct comedi_device *dev);
-static const comedi_lrange me2000_ai_range = {
+static const struct comedi_lrange me2000_ai_range = {
8,
{
BIP_RANGE(10),
}
};
-static const comedi_lrange me2600_ai_range = {
+static const struct comedi_lrange me2600_ai_range = {
8,
{
BIP_RANGE(10),
}
};
-static const comedi_lrange me2600_ao_range = {
+static const struct comedi_lrange me2600_ao_range = {
3,
{
BIP_RANGE(10),
int ao_channel_nbr; /* DA config */
int ao_resolution;
int ao_resolution_mask;
- const comedi_lrange *ao_range_list;
+ const struct comedi_lrange *ao_range_list;
int ai_channel_nbr; /* AD config */
int ai_resolution;
int ai_resolution_mask;
- const comedi_lrange *ai_range_list;
+ const struct comedi_lrange *ai_range_list;
int dio_channel_nbr; /* DIO config */
};
#define devpriv ((skel_private *)dev->private)
//----------------------------------------------------------------------------
-static const comedi_lrange range_mpc624_bipolar1 = {
+static const struct comedi_lrange range_mpc624_bipolar1 = {
1,
{
// BIP_RANGE(1.01) // this is correct,
BIP_RANGE(2.02)
}
};
-static const comedi_lrange range_mpc624_bipolar10 = {
+static const struct comedi_lrange range_mpc624_bipolar10 = {
1,
{
// BIP_RANGE(10.1) // this is correct,
COMEDI_PCI_INITCLEANUP(driver_ni_670x, ni_670x_pci_table);
-static comedi_lrange range_0_20mA = { 1, {RANGE_mA(0, 20)} };
+static struct comedi_lrange range_0_20mA = { 1, {RANGE_mA(0, 20)} };
static int ni_670x_find_device(struct comedi_device * dev, int bus, int slot);
s->n_chan = thisboard->ao_chans;
s->maxdata = 0xffff;
if (s->n_chan == 32) {
- const comedi_lrange **range_table_list;
+ const struct comedi_lrange **range_table_list;
- range_table_list = kmalloc(sizeof(comedi_lrange *) * 32,
+ range_table_list = kmalloc(sizeof(struct comedi_lrange *) * 32,
GFP_KERNEL);
if (!range_table_list)
return -ENOMEM;
} a2150_board;
//analog input range
-static const comedi_lrange range_a2150 = {
+static const struct comedi_lrange range_a2150 = {
1,
{
RANGE(-2.828, 2.828),
COMEDI_INITCLEANUP(driver_atmio16d);
/* range structs */
-static const comedi_lrange range_atmio16d_ai_10_bipolar = { 4, {
+static const struct comedi_lrange range_atmio16d_ai_10_bipolar = { 4, {
BIP_RANGE(10),
BIP_RANGE(1),
BIP_RANGE(0.1),
}
};
-static const comedi_lrange range_atmio16d_ai_5_bipolar = { 4, {
+static const struct comedi_lrange range_atmio16d_ai_5_bipolar = { 4, {
BIP_RANGE(5),
BIP_RANGE(0.5),
BIP_RANGE(0.05),
}
};
-static const comedi_lrange range_atmio16d_ai_unipolar = { 4, {
+static const struct comedi_lrange range_atmio16d_ai_unipolar = { 4, {
UNI_RANGE(10),
UNI_RANGE(1),
UNI_RANGE(0.1),
enum { dac_bipolar, dac_unipolar } dac0_range, dac1_range;
enum { dac_internal, dac_external } dac0_reference, dac1_reference;
enum { dac_2comp, dac_straight } dac0_coding, dac1_coding;
- const comedi_lrange *ao_range_type_list[2];
+ const struct comedi_lrange *ao_range_type_list[2];
unsigned int ao_readback[2];
unsigned int com_reg_1_state; /* current state of command register 1 */
unsigned int com_reg_2_state; /* current state of command register 2 */
0x60,
0x70,
};
-static const comedi_lrange range_labpc_plus_ai = {
+static const struct comedi_lrange range_labpc_plus_ai = {
NUM_LABPC_PLUS_AI_RANGES,
{
BIP_RANGE(5),
0x60,
0x70,
};
-const comedi_lrange range_labpc_1200_ai = {
+const struct comedi_lrange range_labpc_1200_ai = {
NUM_LABPC_1200_AI_RANGES,
{
BIP_RANGE(5),
//analog output ranges
#define AO_RANGE_IS_UNIPOLAR 0x1
-static const comedi_lrange range_labpc_ao = {
+static const struct comedi_lrange range_labpc_ao = {
2,
{
BIP_RANGE(5),
enum labpc_bustype bustype; // ISA/PCI/etc.
enum labpc_register_layout register_layout; // 1200 has extra registers compared to pc+
int has_ao; // has analog output true/false
- const comedi_lrange *ai_range_table;
+ const struct comedi_lrange *ai_range_table;
const int *ai_range_code;
const int *ai_range_is_unipolar;
unsigned ai_scan_up:1; // board can auto scan up in ai channels, not just down
extern const int labpc_1200_is_unipolar[];
extern const int labpc_1200_ai_gain_bits[];
-extern const comedi_lrange range_labpc_1200_ai;
+extern const struct comedi_lrange range_labpc_1200_ai;
#endif /* _NI_LABPC_H */
[ai_gain_6143] = {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
};
-static const comedi_lrange range_ni_E_ai = { 16, {
+static const struct comedi_lrange range_ni_E_ai = { 16, {
RANGE(-10, 10),
RANGE(-5, 5),
RANGE(-2.5, 2.5),
RANGE(0, 0.1),
}
};
-static const comedi_lrange range_ni_E_ai_limited = { 8, {
+static const struct comedi_lrange range_ni_E_ai_limited = { 8, {
RANGE(-10, 10),
RANGE(-5, 5),
RANGE(-1, 1),
RANGE(0, 0.1),
}
};
-static const comedi_lrange range_ni_E_ai_limited14 = { 14, {
+static const struct comedi_lrange range_ni_E_ai_limited14 = { 14, {
RANGE(-10, 10),
RANGE(-5, 5),
RANGE(-2, 2),
RANGE(0, 0.1),
}
};
-static const comedi_lrange range_ni_E_ai_bipolar4 = { 4, {
+static const struct comedi_lrange range_ni_E_ai_bipolar4 = { 4, {
RANGE(-10, 10),
RANGE(-5, 5),
RANGE(-0.5, 0.5),
RANGE(-0.05, 0.05),
}
};
-static const comedi_lrange range_ni_E_ai_611x = { 8, {
+static const struct comedi_lrange range_ni_E_ai_611x = { 8, {
RANGE(-50, 50),
RANGE(-20, 20),
RANGE(-10, 10),
RANGE(-0.2, 0.2),
}
};
-static const comedi_lrange range_ni_M_ai_622x = { 4, {
+static const struct comedi_lrange range_ni_M_ai_622x = { 4, {
RANGE(-10, 10),
RANGE(-5, 5),
RANGE(-1, 1),
RANGE(-0.2, 0.2),
}
};
-static const comedi_lrange range_ni_M_ai_628x = { 7, {
+static const struct comedi_lrange range_ni_M_ai_628x = { 7, {
RANGE(-10, 10),
RANGE(-5, 5),
RANGE(-2, 2),
RANGE(-0.1, 0.1),
}
};
-static const comedi_lrange range_ni_S_ai_6143 = { 1, {
+static const struct comedi_lrange range_ni_S_ai_6143 = { 1, {
RANGE(-5, +5),
}
};
-static const comedi_lrange range_ni_E_ao_ext = { 4, {
+static const struct comedi_lrange range_ni_E_ao_ext = { 4, {
RANGE(-10, 10),
RANGE(0, 10),
RANGE_ext(-1, 1),
}
};
-static const comedi_lrange *const ni_range_lkup[] = {
+static const struct comedi_lrange *const ni_range_lkup[] = {
[ai_gain_16] = &range_ni_E_ai,
[ai_gain_8] = &range_ni_E_ai_limited,
[ai_gain_14] = &range_ni_E_ai_limited14,
63 different possibilities. An AO channel
can not act as it's own OFFSET or REFERENCE.
*/
-static const comedi_lrange range_ni_M_628x_ao = { 8, {
+static const struct comedi_lrange range_ni_M_628x_ao = { 8, {
RANGE(-10, 10),
RANGE(-5, 5),
RANGE(-2, 2),
RANGE_ext(-1, 1)
}
};
-static const comedi_lrange range_ni_M_625x_ao = { 3, {
+static const struct comedi_lrange range_ni_M_625x_ao = { 3, {
RANGE(-10, 10),
RANGE(-5, 5),
RANGE_ext(-1, 1)
}
};
-static const comedi_lrange range_ni_M_622x_ao = { 1, {
+static const struct comedi_lrange range_ni_M_622x_ao = { 1, {
RANGE(-10, 10),
}
};
ni_reg_6143 = 0x20
};
-static const comedi_lrange range_ni_E_ao_ext;
+static const struct comedi_lrange range_ni_E_ao_ext;
enum m_series_register_offsets {
M_Offset_CDIO_DMA_Select = 0x7, // write
int n_aochan;
int aobits;
int ao_fifo_depth;
- const comedi_lrange *ao_range_table;
+ const struct comedi_lrange *ao_range_table;
unsigned ao_speed;
unsigned num_p0_dio_channels;
#define PCL711_DO_LO 13
#define PCL711_DO_HI 14
-static const comedi_lrange range_pcl711b_ai = { 5, {
+static const struct comedi_lrange range_pcl711b_ai = { 5, {
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
BIP_RANGE(0.3125)
}
};
-static const comedi_lrange range_acl8112hg_ai = { 12, {
+static const struct comedi_lrange range_acl8112hg_ai = { 12, {
BIP_RANGE(5),
BIP_RANGE(0.5),
BIP_RANGE(0.05),
BIP_RANGE(0.01)
}
};
-static const comedi_lrange range_acl8112dg_ai = { 9, {
+static const struct comedi_lrange range_acl8112dg_ai = { 9, {
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
int n_aichan;
int n_aochan;
int maxirq;
- const comedi_lrange *ai_range_type;
+ const struct comedi_lrange *ai_range_type;
} boardtype;
static const boardtype boardtypes[] = {
#define PCL727_DI_HI 0
#define PCL727_DI_LO 1
-static const comedi_lrange range_4_20mA = { 1, {RANGE_mA(4, 20)} };
-static const comedi_lrange range_0_20mA = { 1, {RANGE_mA(0, 20)} };
+static const struct comedi_lrange range_4_20mA = { 1, {RANGE_mA(4, 20)} };
+static const struct comedi_lrange range_0_20mA = { 1, {RANGE_mA(0, 20)} };
-static const comedi_lrange *const rangelist_726[] = {
+static const struct comedi_lrange *const rangelist_726[] = {
&range_unipolar5, &range_unipolar10,
&range_bipolar5, &range_bipolar10,
&range_4_20mA, &range_unknown
};
-static const comedi_lrange *const rangelist_727[] = {
+static const struct comedi_lrange *const rangelist_727[] = {
&range_unipolar5, &range_unipolar10,
&range_bipolar5,
&range_4_20mA
};
-static const comedi_lrange *const rangelist_728[] = {
+static const struct comedi_lrange *const rangelist_728[] = {
&range_unipolar5, &range_unipolar10,
&range_bipolar5, &range_bipolar10,
&range_4_20mA, &range_0_20mA
int di_lo;
int do_hi;
int do_lo;
- const comedi_lrange *const *range_type_list; // list of supported ranges
+ const struct comedi_lrange *const *range_type_list; // list of supported ranges
} boardtype;
static const boardtype boardtypes[] = {
typedef struct {
int bipolar[12];
- const comedi_lrange *rangelist[12];
+ const struct comedi_lrange *rangelist[12];
unsigned int ao_readback[12];
} pcl726_private;
#define devpriv ((pcl726_private *)dev->private)
#define MAX_CHANLIST_LEN 256 /* length of scan list */
-static const comedi_lrange range_pcl812pg_ai = { 5, {
+static const struct comedi_lrange range_pcl812pg_ai = { 5, {
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
BIP_RANGE(0.3125),
}
};
-static const comedi_lrange range_pcl812pg2_ai = { 5, {
+static const struct comedi_lrange range_pcl812pg2_ai = { 5, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(0.625),
}
};
-static const comedi_lrange range812_bipolar1_25 = { 1, {
+static const struct comedi_lrange range812_bipolar1_25 = { 1, {
BIP_RANGE(1.25),
}
};
-static const comedi_lrange range812_bipolar0_625 = { 1, {
+static const struct comedi_lrange range812_bipolar0_625 = { 1, {
BIP_RANGE(0.625),
}
};
-static const comedi_lrange range812_bipolar0_3125 = { 1, {
+static const struct comedi_lrange range812_bipolar0_3125 = { 1, {
BIP_RANGE(0.3125),
}
};
-static const comedi_lrange range_pcl813b_ai = { 4, {
+static const struct comedi_lrange range_pcl813b_ai = { 4, {
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
BIP_RANGE(0.625),
}
};
-static const comedi_lrange range_pcl813b2_ai = { 4, {
+static const struct comedi_lrange range_pcl813b2_ai = { 4, {
UNI_RANGE(10),
UNI_RANGE(5),
UNI_RANGE(2.5),
UNI_RANGE(1.25),
}
};
-static const comedi_lrange range_iso813_1_ai = { 5, {
+static const struct comedi_lrange range_iso813_1_ai = { 5, {
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
BIP_RANGE(0.3125),
}
};
-static const comedi_lrange range_iso813_1_2_ai = { 5, {
+static const struct comedi_lrange range_iso813_1_2_ai = { 5, {
UNI_RANGE(10),
UNI_RANGE(5),
UNI_RANGE(2.5),
UNI_RANGE(0.625),
}
};
-static const comedi_lrange range_iso813_2_ai = { 4, {
+static const struct comedi_lrange range_iso813_2_ai = { 4, {
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
BIP_RANGE(0.625),
}
};
-static const comedi_lrange range_iso813_2_2_ai = { 4, {
+static const struct comedi_lrange range_iso813_2_2_ai = { 4, {
UNI_RANGE(10),
UNI_RANGE(5),
UNI_RANGE(2.5),
UNI_RANGE(1.25),
}
};
-static const comedi_lrange range_acl8113_1_ai = { 4, {
+static const struct comedi_lrange range_acl8113_1_ai = { 4, {
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
BIP_RANGE(0.625),
}
};
-static const comedi_lrange range_acl8113_1_2_ai = { 4, {
+static const struct comedi_lrange range_acl8113_1_2_ai = { 4, {
UNI_RANGE(10),
UNI_RANGE(5),
UNI_RANGE(2.5),
UNI_RANGE(1.25),
}
};
-static const comedi_lrange range_acl8113_2_ai = { 3, {
+static const struct comedi_lrange range_acl8113_2_ai = { 3, {
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
}
};
-static const comedi_lrange range_acl8113_2_2_ai = { 3, {
+static const struct comedi_lrange range_acl8113_2_2_ai = { 3, {
UNI_RANGE(10),
UNI_RANGE(5),
UNI_RANGE(2.5),
}
};
-static const comedi_lrange range_acl8112dg_ai = { 9, {
+static const struct comedi_lrange range_acl8112dg_ai = { 9, {
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
BIP_RANGE(10),
}
};
-static const comedi_lrange range_acl8112hg_ai = { 12, {
+static const struct comedi_lrange range_acl8112hg_ai = { 12, {
BIP_RANGE(5),
BIP_RANGE(0.5),
BIP_RANGE(0.05),
BIP_RANGE(0.01),
}
};
-static const comedi_lrange range_a821pgh_ai = { 4, {
+static const struct comedi_lrange range_a821pgh_ai = { 4, {
BIP_RANGE(5),
BIP_RANGE(0.5),
BIP_RANGE(0.05),
int ai_maxdata; // AI resolution
unsigned int ai_ns_min; // max sample speed of card v ns
unsigned int i8254_osc_base; // clock base
- const comedi_lrange *rangelist_ai; // rangelist for A/D
- const comedi_lrange *rangelist_ao; // rangelist for D/A
+ const struct comedi_lrange *rangelist_ai; // rangelist for A/D
+ const struct comedi_lrange *rangelist_ao; // rangelist for D/A
unsigned int IRQbits; // allowed IRQ
unsigned char DMAbits; // allowed DMA chans
unsigned char io_range; // iorange for this board
#define MAGIC_DMA_WORD 0x5a5a
-static const comedi_lrange range_pcl816 = { 8, {
+static const struct comedi_lrange range_pcl816 = { 8, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2.5),
int n_aochan; // num of D/A chans
int n_dichan; // num of DI chans
int n_dochan; // num of DO chans
- const comedi_lrange *ai_range_type; // default A/D rangelist
- const comedi_lrange *ao_range_type; // dafault D/A rangelist
+ const struct comedi_lrange *ai_range_type; // default A/D rangelist
+ const struct comedi_lrange *ao_range_type; // dafault D/A rangelist
unsigned int io_range; // len of IO space
unsigned int IRQbits; // allowed interrupts
unsigned int DMAbits; // allowed DMA chans
#define MAGIC_DMA_WORD 0x5a5a
-static const comedi_lrange range_pcl818h_ai = { 9, {
+static const struct comedi_lrange range_pcl818h_ai = { 9, {
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
}
};
-static const comedi_lrange range_pcl818hg_ai = { 10, {
+static const struct comedi_lrange range_pcl818hg_ai = { 10, {
BIP_RANGE(5),
BIP_RANGE(0.5),
BIP_RANGE(0.05),
}
};
-static const comedi_lrange range_pcl818l_l_ai = { 4, {
+static const struct comedi_lrange range_pcl818l_l_ai = { 4, {
BIP_RANGE(5),
BIP_RANGE(2.5),
BIP_RANGE(1.25),
}
};
-static const comedi_lrange range_pcl818l_h_ai = { 4, {
+static const struct comedi_lrange range_pcl818l_h_ai = { 4, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2.5),
}
};
-static const comedi_lrange range718_bipolar1 = { 1, {BIP_RANGE(1),} };
-static const comedi_lrange range718_bipolar0_5 = { 1, {BIP_RANGE(0.5),} };
-static const comedi_lrange range718_unipolar2 = { 1, {UNI_RANGE(2),} };
-static const comedi_lrange range718_unipolar1 = { 1, {BIP_RANGE(1),} };
+static const struct comedi_lrange range718_bipolar1 = { 1, {BIP_RANGE(1),} };
+static const struct comedi_lrange range718_bipolar0_5 = { 1, {BIP_RANGE(0.5),} };
+static const struct comedi_lrange range718_unipolar2 = { 1, {UNI_RANGE(2),} };
+static const struct comedi_lrange range718_unipolar1 = { 1, {BIP_RANGE(1),} };
static int pcl818_attach(struct comedi_device * dev, comedi_devconfig * it);
static int pcl818_detach(struct comedi_device * dev);
int n_aochan; // num of D/A chans
int n_dichan; // num of DI chans
int n_dochan; // num of DO chans
- const comedi_lrange *ai_range_type; // default A/D rangelist
- const comedi_lrange *ao_range_type; // default D/A rangelist
+ const struct comedi_lrange *ai_range_type; // default A/D rangelist
+ const struct comedi_lrange *ao_range_type; // default D/A rangelist
unsigned int io_range; // len of IO space
unsigned int IRQbits; // allowed interrupts
unsigned int DMAbits; // allowed DMA chans
/* note these have no effect and are merely here for reference..
these are configured by jumpering the board! */
-static const comedi_lrange pcmda12_ranges = {
+static const struct comedi_lrange pcmda12_ranges = {
3,
{
UNI_RANGE(5), UNI_RANGE(10), BIP_RANGE(5)
const int ao_bits;
const int n_ai_chans;
const int n_ao_chans;
- const comedi_lrange *ai_range_table, *ao_range_table;
+ const struct comedi_lrange *ai_range_table, *ao_range_table;
comedi_insn_fn_t ai_rinsn, ao_rinsn, ao_winsn;
} pcmmio_board;
-static const comedi_lrange ranges_ai =
+static const struct comedi_lrange ranges_ai =
{ 4, {RANGE(-5., 5.), RANGE(-10., 10.), RANGE(0., 5.), RANGE(0.,
10.)}
};
-static const comedi_lrange ranges_ao =
+static const struct comedi_lrange ranges_ao =
{ 6, {RANGE(0., 5.), RANGE(0., 10.), RANGE(-5., 5.), RANGE(-10., 10.),
RANGE(-2.5, 2.5), RANGE(-2.5, 7.5)}
};
unsigned int *);
int (*insnbits) (struct comedi_device *, struct comedi_subdevice *, comedi_insn *,
unsigned int *);
- const comedi_lrange *range;
+ const struct comedi_lrange *range;
};
static const struct boarddef_struct boards[] = {
{
* +/- 1.25V, and the D/A converter has only one: +/- 5V.
*/
-static const comedi_lrange range_daqp_ai = { 4, {
+static const struct comedi_lrange range_daqp_ai = { 4, {
BIP_RANGE(10),
BIP_RANGE(5),
BIP_RANGE(2.5),
}
};
-static const comedi_lrange range_daqp_ao = { 1, {BIP_RANGE(5)} };
+static const struct comedi_lrange range_daqp_ao = { 1, {BIP_RANGE(5)} };
/*====================================================================*/
/*
The board has 3 input modes and the gains of 1,2,4,...32 (, 64, 128)
*/
-static const comedi_lrange rtd_ai_7520_range = { 18, {
+static const struct comedi_lrange rtd_ai_7520_range = { 18, {
/* +-5V input range gain steps */
BIP_RANGE(5.0),
BIP_RANGE(5.0 / 2),
};
/* PCI4520 has two more gains (6 more entries) */
-static const comedi_lrange rtd_ai_4520_range = { 24, {
+static const struct comedi_lrange rtd_ai_4520_range = { 24, {
/* +-5V input range gain steps */
BIP_RANGE(5.0),
BIP_RANGE(5.0 / 2),
};
/* Table order matches range values */
-static const comedi_lrange rtd_ao_range = { 4, {
+static const struct comedi_lrange rtd_ao_range = { 4, {
RANGE(0, 5),
RANGE(0, 10),
RANGE(-5, 5),
#include "am9513.h"
-static const comedi_lrange range_rti800_ai_10_bipolar = { 4, {
+static const struct comedi_lrange range_rti800_ai_10_bipolar = { 4, {
BIP_RANGE(10),
BIP_RANGE(1),
BIP_RANGE(0.1),
BIP_RANGE(0.02)
}
};
-static const comedi_lrange range_rti800_ai_5_bipolar = { 4, {
+static const struct comedi_lrange range_rti800_ai_5_bipolar = { 4, {
BIP_RANGE(5),
BIP_RANGE(0.5),
BIP_RANGE(0.05),
BIP_RANGE(0.01)
}
};
-static const comedi_lrange range_rti800_ai_unipolar = { 4, {
+static const struct comedi_lrange range_rti800_ai_unipolar = { 4, {
UNI_RANGE(10),
UNI_RANGE(1),
UNI_RANGE(0.1),
enum {
dac_2comp, dac_straight
} dac0_coding, dac1_coding;
- const comedi_lrange *ao_range_type_list[2];
+ const struct comedi_lrange *ao_range_type_list[2];
unsigned int ao_readback[2];
int muxgain_bits;
} rti800_private;
enum {
dac_2comp, dac_straight
} dac_coding[8];
- const comedi_lrange *range_type_list[8];
+ const struct comedi_lrange *range_type_list[8];
unsigned int ao_readback[8];
} rti802_private;
#define I2C_B1(ATTR, VAL) (((ATTR) << 4) | ((VAL) << 16))
#define I2C_B0(ATTR, VAL) (((ATTR) << 2) | ((VAL) << 8))
-static const comedi_lrange s626_range_table = { 2, {
+static const struct comedi_lrange s626_range_table = { 2, {
RANGE(-5, 5),
RANGE(-10, 10),
}
}
if (c) {
struct comedi_subdevice *s;
- const comedi_lrange **range_table_list = NULL;
+ const struct comedi_lrange **range_table_list = NULL;
unsigned int *maxdata_list;
int j, chan;
range[j].range.max =
c[j].max;
range_table_list[chan] =
- (const
+ (const struct
comedi_lrange *)
&range[j];
}
/**************************************************/
/* comedi constants */
-static const comedi_lrange range_usbdux_ai_range = { 4, {
+static const struct comedi_lrange range_usbdux_ai_range = { 4, {
BIP_RANGE(4.096),
BIP_RANGE(4.096 / 2),
UNI_RANGE(4.096),
}
};
-static const comedi_lrange range_usbdux_ao_range = { 2, {
+static const struct comedi_lrange range_usbdux_ao_range = { 2, {
BIP_RANGE(4.096),
UNI_RANGE(4.096),
}
/*
* comedi constants
*/
-static const comedi_lrange range_usbduxfast_ai_range = {
+static const struct comedi_lrange range_usbduxfast_ai_range = {
2, { BIP_RANGE(0.75), BIP_RANGE(0.5) }
};
{
struct comedi_device *dev = (struct comedi_device *) d;
struct comedi_subdevice *s = dev->subdevices + subdevice;
- const comedi_lrange *lr;
+ const struct comedi_lrange *lr;
if (s->range_table_list) {
lr = s->range_table_list[chan];
#include "comedidev.h"
#include <asm/uaccess.h>
-const comedi_lrange range_bipolar10 = { 1, {BIP_RANGE(10)} };
-const comedi_lrange range_bipolar5 = { 1, {BIP_RANGE(5)} };
-const comedi_lrange range_bipolar2_5 = { 1, {BIP_RANGE(2.5)} };
-const comedi_lrange range_unipolar10 = { 1, {UNI_RANGE(10)} };
-const comedi_lrange range_unipolar5 = { 1, {UNI_RANGE(5)} };
-const comedi_lrange range_unknown = { 1, {{0, 1000000, UNIT_none}} };
+const struct comedi_lrange range_bipolar10 = { 1, {BIP_RANGE(10)} };
+const struct comedi_lrange range_bipolar5 = { 1, {BIP_RANGE(5)} };
+const struct comedi_lrange range_bipolar2_5 = { 1, {BIP_RANGE(2.5)} };
+const struct comedi_lrange range_unipolar10 = { 1, {UNI_RANGE(10)} };
+const struct comedi_lrange range_unipolar5 = { 1, {UNI_RANGE(5)} };
+const struct comedi_lrange range_unknown = { 1, {{0, 1000000, UNIT_none}} };
/*
COMEDI_RANGEINFO
{
comedi_rangeinfo it;
int subd, chan;
- const comedi_lrange *lr;
+ const struct comedi_lrange *lr;
struct comedi_subdevice *s;
if (copy_from_user(&it, arg, sizeof(comedi_rangeinfo)))