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

What:		/sys/bus/iio/devices/iio:deviceX/in_altvoltageY_compare_interval
Date:		October 2016
KernelVersion:	4.9
Contact:	Peter Rosin <peda@axentia.se>
Description:
		Number of milliseconds to wait for the comparator in each
		step of the binary search for the input peak level. Needs
		to relate to the frequency of the input signal.