From 61ec9202f5e43d23a0db8eadf677bbe35d0b2dea Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Wed, 25 Sep 2024 12:26:55 -0600 Subject: [PATCH 1/5] Add AD9213 class Signed-off-by: Travis F. Collins --- adi/__init__.py | 1 + adi/ad9213.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 adi/ad9213.py diff --git a/adi/__init__.py b/adi/__init__.py index ddd870361..f3f50c614 100644 --- a/adi/__init__.py +++ b/adi/__init__.py @@ -44,6 +44,7 @@ from adi.ad9162 import ad9162 from adi.ad9166 import ad9166 from adi.ad9172 import ad9172 +from adi.ad9213 import ad9213 from adi.ad9250 import ad9250 from adi.ad9265 import ad9265 from adi.ad9434 import ad9434 diff --git a/adi/ad9213.py b/adi/ad9213.py new file mode 100644 index 000000000..c9dbc4691 --- /dev/null +++ b/adi/ad9213.py @@ -0,0 +1,18 @@ +# Copyright (C) 2024 Analog Devices, Inc. +# +# SPDX short identifier: ADIBSD + +from adi.context_manager import context_manager +from adi.rx_tx import rx_def + + +class ad9213(rx_def, context_manager): + """ AD9213 High-Speed ADC """ + + _complex_data = False + _rx_channel_names = ["voltage0"] + _control_device_name = "axi-ad9213-rx-hpc" + _rx_data_device_name = "axi-ad9213-rx-hpc" + _device_name = "" + + From 46dc18e496ea2982ce1bb65902ea9f96d12faaea Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Wed, 25 Sep 2024 12:28:08 -0600 Subject: [PATCH 2/5] Add doc for AD9213 Signed-off-by: Travis F. Collins --- doc/source/devices/adi.ad9213.rst | 7 +++++++ doc/source/devices/index.rst | 1 + 2 files changed, 8 insertions(+) create mode 100644 doc/source/devices/adi.ad9213.rst diff --git a/doc/source/devices/adi.ad9213.rst b/doc/source/devices/adi.ad9213.rst new file mode 100644 index 000000000..61e53abac --- /dev/null +++ b/doc/source/devices/adi.ad9213.rst @@ -0,0 +1,7 @@ +ad9213 +================= + +.. automodule:: adi.ad9213 + :members: + :undoc-members: + :show-inheritance: diff --git a/doc/source/devices/index.rst b/doc/source/devices/index.rst index 6059c8fea..52df1b849 100644 --- a/doc/source/devices/index.rst +++ b/doc/source/devices/index.rst @@ -48,6 +48,7 @@ Supported Devices adi.ad9162 adi.ad9166 adi.ad9172 + adi.ad9213 adi.ad9250 adi.ad9265 adi.ad936x From b76271a5071db3d357216e6af370389b0b614358 Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Wed, 25 Sep 2024 12:28:21 -0600 Subject: [PATCH 3/5] Add testing for AD9213 Signed-off-by: Travis F. Collins --- test/test_ad9213_p.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 test/test_ad9213_p.py diff --git a/test/test_ad9213_p.py b/test/test_ad9213_p.py new file mode 100644 index 000000000..71b0da3c4 --- /dev/null +++ b/test/test_ad9213_p.py @@ -0,0 +1,11 @@ +import pytest + +hardware = "ad9213" +classname = "adi.ad9213" + + +@pytest.mark.iio_hardware(hardware, True) +@pytest.mark.parametrize("classname", [(classname)]) +@pytest.mark.parametrize("channel", [0]) +def test_ad9680_rx_data(test_dma_rx, iio_uri, classname, channel): + test_dma_rx(iio_uri, classname, channel, buffer_size=2 ** 11) From a1b769053ae39014c7bd7d1b4affc06caf1d86c0 Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Wed, 25 Sep 2024 13:54:28 -0600 Subject: [PATCH 4/5] Fix lint issues Signed-off-by: Travis F. Collins --- adi/ad9213.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/adi/ad9213.py b/adi/ad9213.py index c9dbc4691..0bcb14ff3 100644 --- a/adi/ad9213.py +++ b/adi/ad9213.py @@ -14,5 +14,3 @@ class ad9213(rx_def, context_manager): _control_device_name = "axi-ad9213-rx-hpc" _rx_data_device_name = "axi-ad9213-rx-hpc" _device_name = "" - - From 4acdb8ef7f41ff43a8a1a749450df0291181118b Mon Sep 17 00:00:00 2001 From: "Travis F. Collins" Date: Wed, 25 Sep 2024 13:55:37 -0600 Subject: [PATCH 5/5] Update dependent doc for AD9213 Signed-off-by: Travis F. Collins --- supported_parts.md | 1 + tasks.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/supported_parts.md b/supported_parts.md index 313da888c..b99b05617 100644 --- a/supported_parts.md +++ b/supported_parts.md @@ -103,6 +103,7 @@ - AD9162 - AD9166 - AD9172 +- AD9213 - AD9250 - AD9265 - AD936X (Pluto, FMComms2/3/4/5, ADRV936X) diff --git a/tasks.py b/tasks.py index fe5f1cf87..d4291aa00 100644 --- a/tasks.py +++ b/tasks.py @@ -181,6 +181,7 @@ def checkparts(c): "ad777x", "ad579x", "adaq42xx", + "ad9213", ] for c in dir(mod): if ( @@ -244,6 +245,7 @@ def checkemulation(c): "ad9152", "ad9162", "ad9166", + "ad9213", "ad9250", "ad936x", "ad937x",