using ADC

I have a ADC device on my development board with QNX on board.
I would like to get access to it?

How can I do It from code?
Help! :frowning:

What exactly ADC do you have?
Does the manufacturer provide any drivers? Any drivers with the source code?

I dont know to be honest - I am trying to figure out how to connect a button to my sh7760
I have a device /dev/adc but Its probably used for the touch screen (?)

nevertheless I used this code to read the value of the ADC
( It gives results but dont know yet whether they are sensible ):

int fildes;
int value;
fildes = open ( “/dev/adc/1”,O_RDONLY);
printf("ADC channel 1 %d,value);

the value returned oscilate a little bit around LSB so could be that I got that one right ;)

I’m guessing that you are correct, and that “/dev/adc” is a device that was created by a device driver provided by your vendor. I would do a “pidin arg” to see if there is a process running that has a name that indicates that it is the driver for your device. If you find one, I would also try doing "use " to see what startup options are available to you.

If your board vendor hasn’t provided you with the source code, I would go back to them and ask for it. There may be some "devctl()’ functions implemented to support changing sampling frequencies, and other ADC device options.