forked from analogdevicesinc/pyadi-iio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update tests Remove offset attribute property from driver Update scale as read-only attribute Rename V to mV Use argparse and update example script Rename all occurances of ad7091r to ad7091rx Signed-off-by: SGudla <[email protected]>
- Loading branch information
1 parent
c22d8ea
commit 3bdf58c
Showing
10 changed files
with
92 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
doc/source/devices/adi.ad7091r.rst → doc/source/devices/adi.ad7091rx.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
ad7091r | ||
ad7091rx | ||
================= | ||
|
||
.. automodule:: adi.ad7091r | ||
.. automodule:: adi.ad7091rx | ||
:members: | ||
:undoc-members: | ||
:show-inheritance: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<?xml version="1.0" encoding="utf-8"?><!DOCTYPE context [<!ELEMENT context (device | context-attribute)*><!ELEMENT context-attribute EMPTY><!ELEMENT device (channel | attribute | debug-attribute | buffer-attribute)*><!ELEMENT channel (scan-element?, attribute*)><!ELEMENT attribute EMPTY><!ELEMENT scan-element EMPTY><!ELEMENT debug-attribute EMPTY><!ELEMENT buffer-attribute EMPTY><!ATTLIST context name CDATA #REQUIRED description CDATA #IMPLIED><!ATTLIST context-attribute name CDATA #REQUIRED value CDATA #REQUIRED><!ATTLIST device id CDATA #REQUIRED name CDATA #IMPLIED><!ATTLIST channel id CDATA #REQUIRED type (input|output) #REQUIRED name CDATA #IMPLIED><!ATTLIST scan-element index CDATA #REQUIRED format CDATA #REQUIRED scale CDATA #IMPLIED><!ATTLIST attribute name CDATA #REQUIRED filename CDATA #IMPLIED value CDATA #IMPLIED><!ATTLIST debug-attribute name CDATA #REQUIRED value CDATA #IMPLIED><!ATTLIST buffer-attribute name CDATA #REQUIRED value CDATA #IMPLIED>]><context name="network" description="192.168.1.3 Linux raspberrypi 6.8.0-rc4-v8+ #4 SMP PREEMPT Thu Feb 15 10:45:25 -03 2024 aarch64" ><context-attribute name="local,kernel" value="6.8.0-rc4-v8+" /><context-attribute name="uri" value="ip:192.168.1.3" /><context-attribute name="ip,ip-addr" value="192.168.1.3" /><device id="iio:device0" name="ad7091r-8" ><channel id="voltage1" type="input" ><attribute name="raw" filename="in_voltage1_raw" value="2603" /><attribute name="scale" filename="in_voltage_scale" value="0.610351562" /></channel><channel id="voltage5" type="input" ><attribute name="raw" filename="in_voltage5_raw" value="0" /><attribute name="scale" filename="in_voltage_scale" value="0.610351562" /></channel><channel id="voltage2" type="input" ><attribute name="raw" filename="in_voltage2_raw" value="533" /><attribute name="scale" filename="in_voltage_scale" value="0.610351562" /></channel><channel id="voltage6" type="input" ><attribute name="raw" filename="in_voltage6_raw" value="1076" /><attribute name="scale" filename="in_voltage_scale" value="0.610351562" /></channel><channel id="voltage3" type="input" ><attribute name="raw" filename="in_voltage3_raw" value="1922" /><attribute name="scale" filename="in_voltage_scale" value="0.610351562" /></channel><channel id="voltage7" type="input" ><attribute name="raw" filename="in_voltage7_raw" value="1747" /><attribute name="scale" filename="in_voltage_scale" value="0.610351562" /></channel><channel id="voltage0" type="input" ><attribute name="raw" filename="in_voltage0_raw" value="2229" /><attribute name="scale" filename="in_voltage_scale" value="0.610351562" /></channel><channel id="voltage4" type="input" ><attribute name="raw" filename="in_voltage4_raw" value="2376" /><attribute name="scale" filename="in_voltage_scale" value="0.610351562" /></channel><attribute name="waiting_for_supplier" value="0" /></device></context> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import pytest | ||
|
||
hardware = "ad7091r8" | ||
classname = "adi.ad7091rx" | ||
|
||
######################################### | ||
@pytest.mark.iio_hardware(hardware) | ||
@pytest.mark.parametrize("classname", [(classname)]) | ||
@pytest.mark.parametrize( | ||
"attr, start, stop, step, tol, repeats, sub_channel", | ||
[ | ||
("raw", 0, 4000, 1000, 1, 3, "voltage0_dac"), | ||
("raw", 0, 4000, 1000, 1, 3, "voltage2_dac"), | ||
("raw", 0, 4000, 1000, 1, 3, "voltage3_dac"), | ||
], | ||
) | ||
def test_ad7091rx_raw_attr( | ||
test_attribute_single_value, | ||
iio_uri, | ||
classname, | ||
attr, | ||
start, | ||
stop, | ||
step, | ||
tol, | ||
repeats, | ||
sub_channel, | ||
): | ||
test_attribute_single_value( | ||
iio_uri, classname, attr, start, stop, step, tol, repeats, sub_channel | ||
) |