/******************************************************************************
 * BASED ON sample program from ICS ADVENT AIO16 Documentation
 * This program will prompt user for voltage between 0 and 5V
 * Output value on DAC channel 0 and read it back on ADC channel 0
 * setting scan limits (task 1)
 * performing data conversion (tak 3)
 * outputting to DAC (task 15)
 * NOTE:	we are running the system as root, note that if we are
 *		going to run it under user we must implement the following
 *		as a device driver.
 ****************************************************************************/

#ifndef __ANALOG_IN_C_
   #define __ANALOG_IN_C_



//unsigned int BASEADDRESS = 0x0300; 




void write_port_data(unsigned char current[3]);
void startConversion(int fd);
int readVolt(int fd, unsigned int channel, float& voltage, float& raw);


#endif
