[prev in list] [next in list] [prev in thread] [next in thread]
List: comedi
Subject: Re: comedilib-0.7.12
From: "Gerard Vermeulen (CRTBT)" <gvermeul () labs ! polycnrs-gre ! fr>
Date: 2000-10-13 8:36:23
[Download RAW message or body]
David Schleef wrote:
> > - the 8255 stand-alone driver (for a DAS-8255 card) is broken: at least my
> > test programs do not work anymore (makes me still stick to 0.7.9/0.7.42).
>
> I'm looking into this. What exactly isn't working?
>
The attached program tries all positions on a programmable RF attenuator.
The attenuation is visible by LEDS. Running the program does not toggle
the LEDS. No crashes or hang-ups: it looks like a disconnected cable.
I do not remember to have seen debugging output on dmesg (sorry, but
the experiment is running, I will check if circumstances allow).
Going back to 0.7.9/0.7.42 makes everything work again.
Gerard
--
Gerard Vermeulen | TEL: 33 (0)4 76 88 12 53
CRTBT | or 33 (0)4 76 88 12 61
BP 166 -- 38042 Grenoble Cedex 9 -- France | Fax: 33 (0)4 76 87 50 60
http://www-crtbt.polycnrs-gre.fr/he3pol
["attenuator.c" (text/plain)]
#include <unistd.h>
#include <comedilib.h>
int main()
{
char *filename = "/dev/comedi2";
comedi_t *dev;
int subdev;
int n_channels;
int i, chan;
dev = comedi_open(filename);
subdev = comedi_find_subdevice_by_type(dev, COMEDI_SUBD_DIO, 0);
n_channels = comedi_get_n_channels(dev, subdev);
printf("DIO subdev %d has %d channels\n", subdev, n_channels);
/* configure 1 channel of a port is OK */
comedi_dio_config(dev, subdev, 0, COMEDI_OUTPUT);
for (i=0; i<256; i++) {
for (chan=0; chan<8; chan++)
comedi_dio_write(dev, subdev, chan, (i>>chan) & 1);
sleep(1);
}
return 0;
}
/*
* Local Variables:
* mode: C
* c-file-style: "linux"
* End:
*/
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic