Poster of Linux kernelThe best gift for a Linux geek
COMEDI_DIO_BITFIELD2

COMEDI_DIO_BITFIELD2

Section: (3) Updated: 28 October 2007
Local index Up

 

NAME

comedi_dio_bitfield2 - read/write multiple digital channels  

SYNOPSIS

#include <comedilib.h>

int comedi_dio_bitfield2 (comedi_t * device, unsigned int subdevice, unsigned int write_mask, unsigned int * bits, unsigned int base_channel);  

DESCRIPTION

The function comedi_dio_bitfield2() allows multiple channels to be read or written together on a digital input, output, or configurable digital I/O device. The parameter write_mask and the value pointed to by bits are interpreted as bit fields, with the least significant bit representing channel base_channel. For each bit in write_mask that is set to 1, the cooresponding bit in *bits is written to the digital output channel. After writing all the output channels, each channel is read, and the result placed in the approprate bits in *bits. The result of reading an output channel is the last value written to the output channel.

All the channels may not be read or written at the exact same time. For example, the driver may need to sequentially write to several ports in order to set all the digital channels specified by the write_mask.


 

Index

NAME
SYNOPSIS
DESCRIPTION

This document was created by man2html, using the manual pages.
Time: 21:43:39 GMT, April 16, 2011