Skip to content

Conversation

@amiclaus
Copy link
Contributor

Description

Add pyadi-iio support for adf4350.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How has this been tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Test Configuration:

  • Hardware: Ad4880 Evaluation board
  • OS: Linux

Documentation

If this is a new feature or example please mention or link any documentation. All new hardware interface classes require documentation.

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have signed off all commits and they contain "Signed-off by: "
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@github-actions
Copy link

Generated documentation for this PR is available at Link

@github-actions
Copy link

github-actions bot commented Mar 25, 2025

Test Results

1 714 tests  ±0     462 ✅ ±0   12m 4s ⏱️ ±0s
    1 suites ±0   1 252 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit 3eb82a7. ± Comparison against base commit b89168a.

This pull request removes 4 and adds 4 tests. Note that renamed tests count towards both.
test.test_adrv9002_p ‑ test_adrv9002_hardware_gain[attr=rx_hardwaregain_chan0-val=[0.5, 11.0, 33.0, 31.0, 30.0, 14.0, 11.0, 4.0, 10.5, 1.0]-depends={'gain_control_mode_chan0': 'spi', 'rx_ensm_mode_chan0': 'rf_enabled'}-classname=adi.adrv9002]
test.test_adrv9002_p ‑ test_adrv9002_hardware_gain[attr=rx_hardwaregain_chan0-val=[8.0, 7.0, 12.0, 5.0, 19.5, 21.5, 25.0, 19.5, 24.5, 24.5]-depends={'gain_control_mode_chan1': 'spi', 'rx_ensm_mode_chan1': 'rf_enabled'}-classname=adi.adrv9002]
test.test_adrv9002_p ‑ test_adrv9002_hardware_gain[attr=tx_hardwaregain_chan0-val=[-32.7, -23.7, -3.0, -31.25, -6.9, -28.45, -1.05, -18.0, -19.4, -1.45]-depends={'atten_control_mode_chan0': 'spi'}-classname=adi.adrv9002]
test.test_adrv9002_p ‑ test_adrv9002_hardware_gain[attr=tx_hardwaregain_chan1-val=[-5.55, -17.9, -11.85, -33.15, -25.7, -37.1, -16.25, -2.5, -29.4, -22.25]-depends={'atten_control_mode_chan1': 'spi'}-classname=adi.adrv9002]
test.test_adrv9002_p ‑ test_adrv9002_hardware_gain[attr=rx_hardwaregain_chan0-val=[3.0, 16.5, 0.5, 14.0, 30.5, 19.5, 28.5, 12.5, 29.5, 19.0]-depends={'gain_control_mode_chan0': 'spi', 'rx_ensm_mode_chan0': 'rf_enabled'}-classname=adi.adrv9002]
test.test_adrv9002_p ‑ test_adrv9002_hardware_gain[attr=rx_hardwaregain_chan0-val=[5.0, 15.5, 21.5, 5.5, 31.0, 28.5, 7.5, 26.0, 32.5, 19.0]-depends={'gain_control_mode_chan1': 'spi', 'rx_ensm_mode_chan1': 'rf_enabled'}-classname=adi.adrv9002]
test.test_adrv9002_p ‑ test_adrv9002_hardware_gain[attr=tx_hardwaregain_chan0-val=[-6.15, -37.3, -13.5, -21.55, -34.75, -15.65, -22.35, -16.9, -3.2, -24.15]-depends={'atten_control_mode_chan0': 'spi'}-classname=adi.adrv9002]
test.test_adrv9002_p ‑ test_adrv9002_hardware_gain[attr=tx_hardwaregain_chan1-val=[-4.2, -18.9, -17.8, -2.9, -21.5, -34.6, -15.1, -36.15, -29.55, -22.75]-depends={'atten_control_mode_chan1': 'spi'}-classname=adi.adrv9002]

♻️ This comment has been updated with latest results.

@tfcollins tfcollins self-requested a review April 14, 2025 19:25
Copy link
Collaborator

@tfcollins tfcollins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need naming and doc updates

adi/adf4350.py Outdated
raise Exception("ADF4350 device not found")

@property
def frequency_altvolt0(self):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove the channel suffix here (_altvolt0) to all the related properties as it doesn’t provide much value


@frequency_altvolt0.setter
def frequency_altvolt0(self, value):
self._set_iio_attr("altvoltage0", "frequency", True, value, self._ctrl)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add docstrings for all public properties

Copy link
Contributor Author

@amiclaus amiclaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v2:

  • drop _altvolt0 suffix
  • add docstrings

@amiclaus amiclaus changed the title asf4350: add support adf4350: add support Apr 17, 2025
Copy link
Contributor Author

@amiclaus amiclaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rebase with main branch to get the build fixes.

@amiclaus amiclaus requested a review from tfcollins May 20, 2025 08:14
Add pyadi-iio support for adf4350 device.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Copy link
Contributor Author

@amiclaus amiclaus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v3:

  • fix conflicts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants