-
Notifications
You must be signed in to change notification settings - Fork 106
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
adi:ad4170: Add support for ad4170 #579
adi:ad4170: Add support for ad4170 #579
Conversation
a117d2a
to
e1436bd
Compare
Changelog: Fixed pylint and build errors |
@tfcollins - Could you please review these changes when you get a chance? |
""" AD4170 ADC """ | ||
|
||
_complex_data = False | ||
channels = [] # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs to be defined or reset (set to []) in the constructor. Otherwise you cannot use multiple instances of this class in the same session.
adi/ad4170.py
Outdated
self._set_iio_attr(self.name, "scale", False, str(Decimal(value).real)) | ||
|
||
def to_volts(self, index, val): | ||
"""Converts raw value to SI""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Inputs need documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor changes needed
fc15a70
to
8145d5b
Compare
Changelog: Addressed review comments
|
@tfcollins - Do these changes look good now? |
adi/ad4170.py
Outdated
# | ||
# Redistribution and use in source and binary forms, with or without modification, | ||
# are permitted provided that the following conditions are met: | ||
# - Redistributions of source code must retain the above copyright | ||
# notice, this list of conditions and the following disclaimer. | ||
# - Redistributions in binary form must reproduce the above copyright | ||
# notice, this list of conditions and the following disclaimer in | ||
# the documentation and/or other materials provided with the | ||
# distribution. | ||
# - Neither the name of Analog Devices, Inc. nor the names of its | ||
# contributors may be used to endorse or promote products derived | ||
# from this software without specific prior written permission. | ||
# - The use of this software may or may not infringe the patent rights | ||
# of one or more patent holders. This license does not release you | ||
# from the requirement that you obtain separate licenses from these | ||
# patent holders to use this software. | ||
# - Use of the software either in source or binary form, must be run | ||
# on or directly connected to an Analog Devices Inc. component. | ||
# | ||
# THIS SOFTWARE IS PROVIDED BY ANALOG DEVICES "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, | ||
# INCLUDING, BUT NOT LIMITED TO, NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A | ||
# PARTICULAR PURPOSE ARE DISCLAIMED. | ||
# | ||
# IN NO EVENT SHALL ANALOG DEVICES BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, INTELLECTUAL PROPERTY | ||
# RIGHTS, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR | ||
# BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
# 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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry missed this the first time. This long form license can be removed. Just need the SPDX line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just license blurb update and we'll merge
1. Add pyadi driver for ad4170 family 2. Add example script for data capture with ad4170 3. Add documentation Signed-off-by: Janani Sunil <[email protected]>
8145d5b
to
3e95767
Compare
Changelog: Address review comments
|
Description
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
Fixes # (issue)
Type of change
Please delete options that are not relevant.
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:
Documentation
If this is a new feature or example please mention or link any documentation. All new hardware interface classes require documentation.
Checklist: