Name

comedi_dio_write — write single bit to digital channel

Synopsis

#include <comedilib.h>
int comedi_dio_write(comedi_t * device,
 unsigned int subdevice,
 unsigned int channel,
 unsigned int bit);
 

Description

The function writes the value bit to the channel channel belonging to the subdevice subdevice of device device. This function is equivalent to:

comedi_data_write(device, subdevice, channel, 0, 0, bit);

This function does not require a digital subdevice or a subdevice with a maximum data value of 1 to work properly.

If you wish to write multiple digital channels at once, it is more efficient to use comedi_dio_bitfield2 than to call this function multiple times.

Return value

Return values and errors are the same as comedi_data_write.