1What: /sys/bus/iio/devices/iio:deviceX/in_altvoltageY_invert 2Date: October 2016 3KernelVersion: 4.9 4Contact: Peter Rosin <peda@axentia.se> 5Description: 6 The DAC is used to find the peak level of an alternating 7 voltage input signal by a binary search using the output 8 of a comparator wired to an interrupt pin. Like so: 9 _ 10 | \ 11 input +------>-------|+ \ 12 | \ 13 .-------. | }---. 14 | | | / | 15 | dac|-->--|- / | 16 | | |_/ | 17 | | | 18 | | | 19 | irq|------<-------' 20 | | 21 '-------' 22 The boolean invert attribute (0/1) should be set when the 23 input signal is centered around the maximum value of the 24 dac instead of zero. The envelope detector will search 25 from below in this case and will also invert the result. 26 The edge/level of the interrupt is also switched to its 27 opposite value. 28 29What: /sys/bus/iio/devices/iio:deviceX/in_altvoltageY_compare_interval 30Date: October 2016 31KernelVersion: 4.9 32Contact: Peter Rosin <peda@axentia.se> 33Description: 34 Number of milliseconds to wait for the comparator in each 35 step of the binary search for the input peak level. Needs 36 to relate to the frequency of the input signal. 37