aboutsummaryrefslogtreecommitdiffstats
path: root/host/tests/devtest/devtest_x4x0.py
diff options
context:
space:
mode:
authorLane Kolbly <lane.kolbly@ni.com>2021-10-29 15:08:45 -0500
committerLane Kolbly <lane@rscheme.org>2022-03-23 21:09:39 -0500
commit24eddf75febfb56f4f6184a5e80f2817c86269e6 (patch)
tree840c37f878c87bfb0700f00b56596f1c175862af /host/tests/devtest/devtest_x4x0.py
parent897384aabf121383c259457313b09744c16fb55f (diff)
downloaduhd-24eddf75febfb56f4f6184a5e80f2817c86269e6.tar.gz
uhd-24eddf75febfb56f4f6184a5e80f2817c86269e6.tar.bz2
uhd-24eddf75febfb56f4f6184a5e80f2817c86269e6.zip
test: x410: Add GPIO tests to X410 devtest
Diffstat (limited to 'host/tests/devtest/devtest_x4x0.py')
-rw-r--r--host/tests/devtest/devtest_x4x0.py26
1 files changed, 23 insertions, 3 deletions
diff --git a/host/tests/devtest/devtest_x4x0.py b/host/tests/devtest/devtest_x4x0.py
index d1add6a66..8a23e9a41 100644
--- a/host/tests/devtest/devtest_x4x0.py
+++ b/host/tests/devtest/devtest_x4x0.py
@@ -67,9 +67,29 @@ from rx_samples_to_file_test import rx_samples_to_file_test
from tx_bursts_test import uhd_tx_bursts_test
from test_pps_test import uhd_test_pps_test
-# Enable these when GPIO API is enabled
-# from gpio_test import gpio_test
-# from bitbang_test import bitbang_test
+from gpio_test import gpio_test
+gpio_test.tests = {}
+for port in ["GPIO0", "GPIO1"]:
+ for bank,driver in [("GPIOA", "DB0_RF0")]:
+ gpio_test.tests[f"{port}_{driver}"] = {
+ "addl_args": ["--src", " ".join([driver]*12), "--bank", bank, "--port", port, "--bits", "12"],
+ }
+
+from gpio_test import gpio_x410_set_get_source_test
+gpio_x410_set_get_source_test.test_params = {
+ "possible_sources": ["PS", "MPM", "USER_APP", "DB0_RF0", "DB0_RF1", "DB0_SPI", "DB1_RF0", "DB1_RF1", "DB1_SPI"],
+ "num_pins": 12,
+}
+
+from gpio_test import x410_gpio_power_test
+
+from bitbang_test import bitbang_test
+bitbang_test.tests = {}
+for port in ["GPIO0", "GPIO1"]:
+ for bank,driver in [("GPIOA", "DB0_RF0"), ("GPIOB", "DB1_RF0")]:
+ bitbang_test.tests[f"{port}_{driver}"] = {
+ "addl_args": ["--bank", bank, "--port", port, "--src", " ".join([driver]*12)]
+ }
from gpio_test import gpio_atr_readback_test
gpio_atr_readback_test.test_params = [