This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
resources:tools-software:linux-drivers:iio-dac:ad5593r [23 Feb 2016 13:37] – [Description] Michael Hennerich | resources:tools-software:linux-drivers:iio-dac:ad5593r [07 Jun 2016 16:36] – [Status] Michael Hennerich | ||
---|---|---|---|
Line 32: | Line 32: | ||
^ Source ^ Mainlined? ^ | ^ Source ^ Mainlined? ^ | ||
- | | [[linux.github>xcomm_zynq?drivers/ | + | | [[git.linux.org> |
===== Files ===== | ===== Files ===== | ||
Line 181: | Line 181: | ||
</ | </ | ||
+ | === IIO sysfs interface === | ||
+ | |||
+ | < | ||
+ | root@linaro-ubuntu-desktop:/ | ||
+ | total 0 | ||
+ | drwxr-xr-x 3 root root 0 Jan 1 1970 . | ||
+ | drwxr-xr-x 5 root root 0 Jan 1 1970 .. | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 dev | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 in_temp_offset | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 in_temp_raw | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 in_temp_scale | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 in_voltage1_raw | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 in_voltage2_raw | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 in_voltage3_raw | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 in_voltage_scale | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 in_voltage_scale_available | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 name | ||
+ | lrwxrwxrwx 1 root root 0 Jan 1 1970 of_node -> ../ | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 out_voltage0_raw | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 out_voltage2_raw | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 out_voltage3_raw | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 out_voltage_scale | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 out_voltage_scale_available | ||
+ | drwxrwxrwx 2 root root 0 Jan 1 1970 power | ||
+ | lrwxrwxrwx 1 root root 0 Jan 1 1970 subsystem -> ../ | ||
+ | -rw-rw-rw- 1 root root 4096 Jan 1 1970 uevent | ||
+ | root@linaro-ubuntu-desktop:/ | ||
+ | </ | ||
+ | |||
+ | < | ||
+ | root@linaro-ubuntu-desktop:/ | ||
+ | dev:252:2 | ||
+ | in_temp_offset: | ||
+ | in_temp_raw: | ||
+ | in_temp_scale: | ||
+ | in_voltage1_raw: | ||
+ | in_voltage2_raw: | ||
+ | in_voltage3_raw: | ||
+ | in_voltage_scale: | ||
+ | in_voltage_scale_available: | ||
+ | name: | ||
+ | out_voltage0_raw: | ||
+ | out_voltage2_raw: | ||
+ | out_voltage3_raw: | ||
+ | out_voltage_scale: | ||
+ | out_voltage_scale_available: | ||
+ | uevent: | ||
+ | uevent: | ||
+ | uevent: | ||
+ | uevent: | ||
+ | uevent: | ||
+ | uevent: | ||
+ | uevent: | ||
+ | </ | ||
+ | |||
+ | == Example obtaining the temperature in °C == | ||
+ | |||
+ | |||
+ | |||
+ | T = ( in_temp_raw + in_temp_offset ) * in_temp_scale | ||
+ | |||
+ | T = ( 810 - 753 ) * 376.78975 = 21477 mdeg C = 21.5 °C | ||
+ | |||
+ | For more information see also here: [[git.linux.org> | ||
=== GPIO Testing | === GPIO Testing | ||
Line 186: | Line 250: | ||
The GPIO sysfs interface allows users to manipulate any GPIO from userspace. Userspace utilizes a sysfs control interface to dynamically request and release individual GPIOs. Once a GPIO has been requested, writing to the newly created path allows you to control the direction and the data while reading from it returns the GPIO data (which usually corresponds to a 0 or 1 which represents the signal level). | The GPIO sysfs interface allows users to manipulate any GPIO from userspace. Userspace utilizes a sysfs control interface to dynamically request and release individual GPIOs. Once a GPIO has been requested, writing to the newly created path allows you to control the direction and the data while reading from it returns the GPIO data (which usually corresponds to a 0 or 1 which represents the signal level). | ||
- | For more information see also here: [[git.linux.org> | + | For more information see also here: [[git.linux.org> |
< | < |