int chan;
/* Pointers to functions that differ for A and B counters: */
- /* Return interrupt source. */
- uint16_t (*get_int_src)(struct comedi_device *dev,
- const struct s626_enc_info *k);
/* Return standardized operating mode. */
uint16_t (*get_mode)(struct comedi_device *dev,
const struct s626_enc_info *k);
devpriv->counter_int_enabs |= k->my_event_bits[int_source];
}
-static uint16_t s626_get_int_src_a(struct comedi_device *dev,
- const struct s626_enc_info *k)
-{
- return S626_GET_CRA_INTSRC_A(s626_debi_read(dev,
- S626_LP_CRA(k->chan)));
-}
-
-static uint16_t s626_get_int_src_b(struct comedi_device *dev,
- const struct s626_enc_info *k)
+#ifdef unused
+static uint16_t s626_get_int_src(struct comedi_device *dev,
+ const struct s626_enc_info *k)
{
- return S626_GET_CRB_INTSRC_B(s626_debi_read(dev,
- S626_LP_CRB(k->chan)));
+ if (chan < 3)
+ return S626_GET_CRA_INTSRC_A(s626_debi_read(dev,
+ S626_LP_CRA(k->chan)));
+ else
+ return S626_GET_CRB_INTSRC_B(s626_debi_read(dev,
+ S626_LP_CRB(k->chan)));
}
+#endif
#ifdef unused
/*
static const struct s626_enc_info s626_enc_chan_info[] = {
{
.chan = 0,
- .get_int_src = s626_get_int_src_a,
.get_mode = s626_get_mode_a,
.pulse_index = s626_pulse_index_a,
.set_mode = s626_set_mode_a,
.my_event_bits = S626_EVBITS(0),
}, {
.chan = 1,
- .get_int_src = s626_get_int_src_a,
.get_mode = s626_get_mode_a,
.pulse_index = s626_pulse_index_a,
.set_mode = s626_set_mode_a,
.my_event_bits = S626_EVBITS(1),
}, {
.chan = 2,
- .get_int_src = s626_get_int_src_a,
.get_mode = s626_get_mode_a,
.pulse_index = s626_pulse_index_a,
.set_mode = s626_set_mode_a,
.my_event_bits = S626_EVBITS(2),
}, {
.chan = 3,
- .get_int_src = s626_get_int_src_b,
.get_mode = s626_get_mode_b,
.pulse_index = s626_pulse_index_b,
.set_mode = s626_set_mode_b,
.my_event_bits = S626_EVBITS(3),
}, {
.chan = 4,
- .get_int_src = s626_get_int_src_b,
.get_mode = s626_get_mode_b,
.pulse_index = s626_pulse_index_b,
.set_mode = s626_set_mode_b,
.my_event_bits = S626_EVBITS(4),
}, {
.chan = 5,
- .get_int_src = s626_get_int_src_b,
.get_mode = s626_get_mode_b,
.pulse_index = s626_pulse_index_b,
.set_mode = s626_set_mode_b,