3 #define SLOT0_INTERVAL 1200
4 #define FAST_INTERVAL 1200
5 #define MEDIUM_INTERVAL 10000
6 #define SLOW_INTERVAL 30000
8 #define SCXI_LINE_MOSI 0
10 #define SCXI_LINE_SS 2
11 #define SCXI_LINE_MISO 4
13 #define SCXI_DIO_NONE 0
17 #define SCXI_AIO_NONE 0
21 struct scxi_board_struct {
22 unsigned int device_id;
25 unsigned int clock_interval;
26 int dio_type, aio_type, channels, status_reg, data_reg;
27 int config_reg, eeprom_reg, gain_reg;
30 typedef struct scxi_board_struct scxi_board_t;
32 const scxi_board_t scxi_boards[] = {
33 { 0, "unknown\0", 2, SLOW_INTERVAL, 0, 0, 0, 0, 0, 0, 0, 0 },
34 { 0xffffffff, "empty\0", 2, SLOW_INTERVAL, 0, 0, 0, 0, 0, 0, 0, 0 },
35 { 0x06, "SCXI-1100\0", 1, FAST_INTERVAL, SCXI_DIO_NONE, SCXI_AIO_AI, 32,
36 0x00, 0x00, 0x00, 0x00, 0x00 },
37 { 0x1e, "SCXI-1102\0", 2, FAST_INTERVAL, SCXI_DIO_NONE, SCXI_AIO_AI, 32,
38 0x02, 0x05, 0x01, 0x03, 0x04 },
39 //{ 0x14, "SCXI-1124\0", 2, SLOW_INTERVAL, SCXI_DIO_NONE, SCXI_AIO_AO, 6,
40 // 0x02, 0x08, 0x00, 0x03, 0x00 },
43 #define n_scxi_boards ((sizeof(scxi_boards)/sizeof(scxi_boards[0])))
45 struct scxi_module_struct {
48 unsigned int dio_subdev, ser_subdev;
49 unsigned int chassis, slot;
52 typedef struct scxi_module_struct scxi_mod_t;
58 int comedi_scxi_serial_readwrite(comedi_t *it, unsigned char out_bits, unsigned char *in_bits);
59 int comedi_scxi_serial_config(comedi_t *it, unsigned int clock_interval);