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,
+ NITIO_INPUT_SEL_REG(counter->counter_index), ~0,
0);
if (ni_tio_counting_mode_registers_present(counter_dev)) {
ni_tio_set_bits(counter,
if (mode & NI_GPCT_INVERT_OUTPUT_BIT)
input_select_bits |= Gi_Output_Polarity_Bit;
ni_tio_set_bits(counter,
- NITIO_Gi_Input_Select_Reg(counter->counter_index),
+ NITIO_INPUT_SEL_REG(counter->counter_index),
Gi_Gate_Select_Load_Source_Bit | Gi_Or_Gate_Bit |
Gi_Output_Polarity_Bit, input_select_bits);
if (clock_source & NI_GPCT_INVERT_CLOCK_SRC_BIT)
input_select_bits |= Gi_Source_Polarity_Bit;
ni_tio_set_bits(counter,
- NITIO_Gi_Input_Select_Reg(counter->counter_index),
+ NITIO_INPUT_SEL_REG(counter->counter_index),
Gi_Source_Select_Mask | Gi_Source_Polarity_Bit,
input_select_bits);
ni_tio_set_source_subselect(counter, clock_source);
unsigned bits = 0;
if (ni_tio_get_soft_copy(counter,
- NITIO_Gi_Input_Select_Reg
+ NITIO_INPUT_SEL_REG
(counter->counter_index)) &
Gi_Source_Polarity_Bit)
bits |= NI_GPCT_INVERT_CLOCK_SRC_BIT;
unsigned clock_source = 0;
unsigned i;
const unsigned input_select = (ni_tio_get_soft_copy(counter,
- NITIO_Gi_Input_Select_Reg
+ NITIO_INPUT_SEL_REG
(counter->counter_index))
& Gi_Source_Select_Mask) >>
Gi_Source_Select_Shift;
unsigned clock_source = 0;
unsigned i;
const unsigned input_select = (ni_tio_get_soft_copy(counter,
- NITIO_Gi_Input_Select_Reg
+ NITIO_INPUT_SEL_REG
(counter->counter_index))
& Gi_Source_Select_Mask) >>
Gi_Source_Select_Shift;
break;
}
ni_tio_set_bits(counter,
- NITIO_Gi_Input_Select_Reg(counter->counter_index),
+ NITIO_INPUT_SEL_REG(counter->counter_index),
Gi_Gate_Select_Mask,
Gi_Gate_Select_Bits(ni_660x_gate_select));
return 0;
break;
}
ni_tio_set_bits(counter,
- NITIO_Gi_Input_Select_Reg(counter->counter_index),
+ NITIO_INPUT_SEL_REG(counter->counter_index),
Gi_Gate_Select_Mask,
Gi_Gate_Select_Bits(ni_m_series_gate_select));
return 0;
} else {
gate_select_bits =
(ni_tio_get_soft_copy(counter,
- NITIO_Gi_Input_Select_Reg
+ NITIO_INPUT_SEL_REG
(counter->counter_index)) &
Gi_Gate_Select_Mask) >> Gi_Gate_Select_Shift;
}
#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))
+#define NITIO_INPUT_SEL_REG(x) (NITIO_G0_INPUT_SEL + (x))
static inline enum ni_gpct_register NITIO_Gi_Counting_Mode_Reg(unsigned idx)
{
return 0;
}
-static inline enum ni_gpct_register NITIO_Gi_Input_Select_Reg(unsigned idx)
-{
- switch (idx) {
- case 0:
- return NITIO_G0_INPUT_SEL;
- case 1:
- return NITIO_G1_INPUT_SEL;
- case 2:
- return NITIO_G2_INPUT_SEL;
- case 3:
- return NITIO_G3_INPUT_SEL;
- }
- return 0;
-}
-
static inline enum ni_gpct_register NITIO_Gxx_Joint_Reset_Reg(unsigned idx)
{
switch (idx) {