counter_dev->
regs[NITIO_LOADA_REG(counter->counter_index)],
NITIO_LOADA_REG(counter->counter_index));
- counter_dev->regs[NITIO_Gi_LoadB_Reg(counter->counter_index)] = 0x0;
+ counter_dev->regs[NITIO_LOADB_REG(counter->counter_index)] = 0x0;
write_register(counter,
counter_dev->
- regs[NITIO_Gi_LoadB_Reg(counter->counter_index)],
- NITIO_Gi_LoadB_Reg(counter->counter_index));
+ regs[NITIO_LOADB_REG(counter->counter_index)],
+ NITIO_LOADB_REG(counter->counter_index));
ni_tio_set_bits(counter,
NITIO_Gi_Input_Select_Reg(counter->counter_index), ~0,
0);
case 2:
data[0] =
counter_dev->
- regs[NITIO_Gi_LoadB_Reg(counter->counter_index)];
+ regs[NITIO_LOADB_REG(counter->counter_index)];
break;
}
return 0;
counter_index));
if (bits & Gi_Next_Load_Source_Bit(counter->counter_index))
- return NITIO_Gi_LoadB_Reg(counter->counter_index);
+ return NITIO_LOADB_REG(counter->counter_index);
else
return NITIO_LOADA_REG(counter->counter_index);
}
NITIO_LOADA_REG(counter->counter_index));
break;
case 2:
- counter_dev->regs[NITIO_Gi_LoadB_Reg(counter->counter_index)] =
+ counter_dev->regs[NITIO_LOADB_REG(counter->counter_index)] =
data[0];
write_register(counter, data[0],
- NITIO_Gi_LoadB_Reg(counter->counter_index));
+ NITIO_LOADB_REG(counter->counter_index));
break;
default:
return -EINVAL;
#define NITIO_SW_SAVE_REG(x) (NITIO_G0_SW_SAVE + (x))
#define NITIO_MODE_REG(x) (NITIO_G0_MODE + (x))
#define NITIO_LOADA_REG(x) (NITIO_G0_LOADA + (x))
+#define NITIO_LOADB_REG(x) (NITIO_G0_LOADB + (x))
static inline enum ni_gpct_register NITIO_Gi_Counting_Mode_Reg(unsigned idx)
{
return 0;
}
-static inline enum ni_gpct_register NITIO_Gi_LoadB_Reg(unsigned idx)
-{
- switch (idx) {
- case 0:
- return NITIO_G0_LOADB;
- case 1:
- return NITIO_G1_LOADB;
- case 2:
- return NITIO_G2_LOADB;
- case 3:
- return NITIO_G3_LOADB;
- }
- return 0;
-}
-
static inline enum ni_gpct_register NITIO_Gi_Second_Gate_Reg(unsigned idx)
{
switch (idx) {