s->insn_bits = ni_pfi_insn_bits;
s->insn_config = ni_pfi_insn_config;
ni_set_bits(dev, IO_Bidirection_Pin_Register, ~0, 0);
-
+ unsigned i;
+ for(i = 0; i < NUM_PFI_OUTPUT_SELECT_REGS; ++i)
+ {
+ ni_writew(devpriv->pfi_output_select_reg[i], M_Offset_PFI_Output_Select(i + 1));
+ }
/* cs5529 calibration adc */
s = dev->subdevices + 8;
if(boardtype.reg_type & ni_reg_67xx_mask)
#define _bit1 0x0002
#define _bit0 0x0001
+#define NUM_PFI_OUTPUT_SELECT_REGS 6
+
/* Registers in the National Instruments DAQ-STC chip */
#define Interrupt_A_Ack_Register 2
};
static inline unsigned M_Offset_PFI_Output_Select(unsigned n)
{
- if(n < 1 || n > 6)
+ if(n < 1 || n > NUM_PFI_OUTPUT_SELECT_REGS)
{
rt_printk("%s: invalid pfi output select register=%i\n", __FUNCTION__, n);
return M_Offset_PFI_Output_Select_1;
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[6]; \
+ unsigned short pfi_output_select_reg[NUM_PFI_OUTPUT_SELECT_REGS]; \
\
unsigned clock_ns; \
unsigned clock_source; \