
The continuous mode feature allows the ADC to work in the background.

The single-channel continuous conversion mode converts a single channel continuouslyĪnd indefinitely in regular channel conversion. To read a single ADC output from a particular channel this interface can be cat /sys/bus/iio/devices/iio\:device0/in_voltageX_rawīy doing this you just read one raw value of the channel X of the ADC. (one-shot mode), or loop back and schedule again (continuous mode). When the ADC sequencer finishes cycling through all the enabled channels, the user can decide if the sequencer should stop Continuous conversions of a single channel at a time using the /dev/iio:device0 character device file.One-shot conversions performed by reading the in_voltage0_raw~ in_voltage3_raw files in /sys/bus/iio/devices/iio:device0/.The ADC Linux drivers usually support two modes of performing conversations: More information about the IIO framework: However, the internal ADCs are anyway not meant to be used for high-speed applications.Īpart from Colibri T20 all modules use a driver that is based on the Industrial Input/Output (IIO) framework. Keep in mind that opening and closing a file for every ADC read-out is relatively slow and rather resource-intensive.

Access through sysfs is easy to implement since it only involves reading a regular file. All current drivers provide ADC access through sysfs. Depending on the module type the analogue inputs are connected via different ADCs (see ADC) therefore ADC read-out is supported by various drivers.
