Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for LTC2672 #558

Merged
merged 1 commit into from
Apr 19, 2024

Conversation

SaikiranGudla
Copy link
Contributor

@SaikiranGudla SaikiranGudla commented Apr 17, 2024

Description

Add ltc2672.py driver
Add test script, example code
Update index.rst, init.py, supported_parts.md files Add ltc2672 rst file

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 A
  • Test B

Test Configuration:

  • Hardware:
  • OS:

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

@SaikiranGudla SaikiranGudla force-pushed the ltc2672_support branch 3 times, most recently from 145697c to 41535d4 Compare April 17, 2024 09:05
@SaikiranGudla
Copy link
Contributor Author

Hi @tfcollins ,
This PR is ready to be reviewed.

adi/ltc2672.py Outdated
"""LTC2672 DAC"""

_complex_data = False
channel = []
Copy link
Collaborator

Choose a reason for hiding this comment

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

channel should not be a class property or it needs to be reset within the constructor. This creates an issue when you have multiple instances of the class. channel will keep growing

# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
# THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

from adi.ltc2672 import *
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please do not use * imports. Just import what you need

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.

Just a few minor changes

Add ltc2672.py driver
Add test script, example code
Update index.rst, init.py, supported_parts.md files
Add ltc2672 rst file
Add iio-emu xml file for ltc2672
Update hardware_map.yml emulation context map

Signed-off-by: SGudla <Saikiran.Gudla@analog.com>
@SaikiranGudla
Copy link
Contributor Author

Change log: Addressed review comments

Import ltc2672 class in example file
Make channel an instance attribute instead of class attribute

@tfcollins tfcollins merged commit bb9dce7 into analogdevicesinc:main Apr 19, 2024
26 checks passed
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.

2 participants