unsigned int chanspec[],
unsigned int n_chans, int timed)
{
- const struct ni_board_struct *board = comedi_board(dev);
struct ni_private *devpriv = dev->private;
unsigned int range;
unsigned int chan;
int invert = 0;
if (timed) {
- for (i = 0; i < board->n_aochan; ++i) {
+ for (i = 0; i < s->n_chan; ++i) {
devpriv->ao_conf[i] &= ~MSeries_AO_Update_Timed_Bit;
ni_writeb(dev, devpriv->ao_conf[i],
M_Offset_AO_Config_Bank(i));
unsigned int chanspec[],
unsigned int n_chans)
{
- const struct ni_board_struct *board = comedi_board(dev);
struct ni_private *devpriv = dev->private;
unsigned int range;
unsigned int chan;
if (comedi_range_is_bipolar(s, range)) {
conf |= AO_Bipolar;
- invert = (1 << (board->aobits - 1));
+ invert = (s->maxdata + 1) >> 1;
} else {
invert = 0;
}