Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .codespell-whitelist
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ som
sinc
byteorder
inout
indx
11 changes: 7 additions & 4 deletions .github/scripts/_prism_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ def _github_identity() -> dict[str, Any]:
}
if repository and run_id:
server = os.getenv("GITHUB_SERVER_URL", "https://github.com").rstrip("/")
ci[
"run_url"
] = f"{server}/{repository}/actions/runs/{run_id}/attempts/{attempt}"
ci["run_url"] = (
f"{server}/{repository}/actions/runs/{run_id}/attempts/{attempt}"
)
raw_matrix = os.getenv("PRISM_CI_MATRIX")
if raw_matrix:
try:
Expand Down Expand Up @@ -159,7 +159,10 @@ def detect_ci(*, job_url: str | None = None) -> dict[str, Any] | None:

class PrismClient:
def __init__(
self, base_url: str, token: str | None = None, insecure: bool = False,
self,
base_url: str,
token: str | None = None,
insecure: bool = False,
) -> None:
"""Initialize authentication and the HTTP transport."""
# Reject non-http(s) schemes up front so the noqa: S310 below is true.
Expand Down
6 changes: 3 additions & 3 deletions adi/QuadMxFE_multi.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class QuadMxFE_multi(object):
JESD object(s) associated with secondary ADQUADMXFExEBZ(s)
"""

__rx_buffer_size_multi = 2 ** 14
__rx_buffer_size_multi = 2**14
secondaries: List[QuadMxFE] = []

def __init__(
Expand Down Expand Up @@ -59,7 +59,7 @@ def __init__(
self.primary._clock_chip_ext = self.primary._ctx.find_device("hmc7044-ext")

def reinitialize(self):
""" reinitialize: reinitialize all transceivers """
"""reinitialize: reinitialize all transceivers"""
for dev in self.secondaries + [self.primary]:
property_names = [p for p in dir(dev) if "reinitialize" in p]
for p in property_names:
Expand Down Expand Up @@ -262,7 +262,7 @@ def __dds_sync_enable(self, enable):
dev.tx_sync_start = "arm"

def sysref_request(self):
""" sysref_request: Sysref request for parent HMC7044 """
"""sysref_request: Sysref request for parent HMC7044"""
self.primary._clock_chip_ext.attrs["sysref_request"].value = "1"

def __refill_samples(self, dev, is_primary):
Expand Down
2 changes: 1 addition & 1 deletion adi/ad353xr.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def operating_mode(self, value):


class ad353xr(tx_chan_comp):
""" AD353xr DAC """
"""AD353xr DAC"""

channel = [] # type: ignore
compatible_parts = ["ad3530r", "ad3531r", "ad3532r"]
Expand Down
4 changes: 2 additions & 2 deletions adi/ad3552r.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def __init__(self, ctrl, channel_name, output=None):
@property
def raw(self):
"""Get channel raw value
DAC code in the range 0-65535"""
DAC code in the range 0-65535"""
return self._get_iio_attr(self.name, "raw", True)

@raw.setter
Expand Down Expand Up @@ -49,7 +49,7 @@ def scale(self, value):


class ad3552r(tx_chan_comp):
""" AD3552R DAC """
"""AD3552R DAC"""

compatible_parts = ["ad3552r", "ad3542r"]
_complex_data = False
Expand Down
2 changes: 1 addition & 1 deletion adi/ad3552r_hs.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def sample_rate(self, value):
@property
def raw(self):
"""Get channel raw value
DAC code in the range 0-65535"""
DAC code in the range 0-65535"""
return self._get_iio_attr(self.name, "raw", True)

@raw.setter
Expand Down
2 changes: 1 addition & 1 deletion adi/ad405x.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def scale(self, value):


class ad405x(rx_chan_comp):
""" AD405x ADC """
"""AD405x ADC"""

compatible_parts = ["ad4052", "ad4050", "ad4062", "ad4060"]
_device_name = ""
Expand Down
12 changes: 7 additions & 5 deletions adi/ad4630.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,7 @@ def _bitmask(nbits):


class ad4630(rx, context_manager, attribute):

""" AD4630 is low power precision SAR ADC family supporting 16-bit, 20-bit, and 24-bit variants """
"""AD4630 is low power precision SAR ADC family supporting 16-bit, 20-bit, and 24-bit variants"""

_compatible_parts = [
"ad4630-24",
Expand Down Expand Up @@ -177,7 +176,11 @@ def oversampling_ratio(self, n_sample):
"""Set the oversampling ratio. Only available in 30bit averaged mode."""
if str(n_sample) in str(self.oversampling_ratio_avail):
self._set_iio_attr(
self.name, "oversampling_ratio", False, str(n_sample), self._ctrl,
self.name,
"oversampling_ratio",
False,
str(n_sample),
self._ctrl,
)
else:
raise ValueError(
Expand All @@ -187,8 +190,7 @@ def oversampling_ratio(self, n_sample):


class adaq42xx(ad4630):

""" ADAQ4224 is a 24-bit precision SAR ADC data acquisition module """
"""ADAQ4224 is a 24-bit precision SAR ADC data acquisition module"""

_compatible_parts = ["adaq4224", "adaq4216", "adaq4220"]

Expand Down
2 changes: 1 addition & 1 deletion adi/ad514x.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class ad514x(context_manager, attribute):
""" AD514x DigiPOTs """
"""AD514x DigiPOTs"""

compatible_parts = ["AD5141", "AD5142", "AD5142A", "AD5143", "AD5144"]
_complex_data = False
Expand Down
2 changes: 1 addition & 1 deletion adi/ad5627.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class ad5627(tx, context_manager):
""" AD5627 Low Power Dual nanoDAC """
"""AD5627 Low Power Dual nanoDAC"""

_complex_data = False
_tx_channel_names = ["voltage0", "voltage1"]
Expand Down
4 changes: 2 additions & 2 deletions adi/ad5686.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def raw(self):

@raw.setter
def raw(self, value):
value = max(0, min(int(value), (2 ** self._format.bits) - 1))
value = max(0, min(int(value), (2**self._format.bits) - 1))
self._set_iio_attr(self.name, "raw", True, value)

@property
Expand Down Expand Up @@ -83,7 +83,7 @@ def voltage(self, val: float):


class ad5686(tx_chan_comp):
""" AD5686 DAC """
"""AD5686 DAC"""

class powerdown_mode(Enum):
"""AD5686 Powerdown Mode Enumeration"""
Expand Down
2 changes: 1 addition & 1 deletion adi/ad5706r.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def output_state(self, value):


class ad5706r(tx_chan_comp):
""" ad5706r DAC """
"""ad5706r DAC"""

_complex_data = False
_device_name = ""
Expand Down
2 changes: 1 addition & 1 deletion adi/ad5710r.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@


class ad5710r(tx_chan_comp):
""" AD5710r DAC """
"""AD5710r DAC"""

_complex_data = False
_device_name = ""
Expand Down
4 changes: 2 additions & 2 deletions adi/ad5754r.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def __init__(self, ctrl, channel_name):
@property
def raw(self):
"""Get channel raw value
DAC code in the range 0-65535"""
DAC code in the range 0-65535"""
return self._get_iio_attr(self.name, "raw", True)

@raw.setter
Expand Down Expand Up @@ -100,7 +100,7 @@ def dac_register(self, value):


class ad5754r(tx_chan_comp_no_buff):
""" AD5754R DAC """
"""AD5754R DAC"""

channel = []
compatible_parts = ["ad5754r"]
Expand Down
2 changes: 1 addition & 1 deletion adi/ad579x.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def powerdown_available(self):


class ad579x(tx_chan_comp):
""" AD579x DAC """
"""AD579x DAC"""

channel = [] # type: ignore
compatible_parts = [
Expand Down
7 changes: 5 additions & 2 deletions adi/ad5940.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@


class ad5940(rx_chan_comp):
""" ad5940 CDC """
"""ad5940 CDC"""

_complex_data = False
channel = [] # type: ignore
Expand Down Expand Up @@ -47,7 +47,10 @@ def __init__(self, uri=""):
def _add_channel_instances(self):
"""Preserve the public BIA-only OrderedDict channel container."""
self.channel = OrderedDict(
(ch.id, self._bia_channel(self, self._ctrl, ch.id),)
(
ch.id,
self._bia_channel(self, self._ctrl, ch.id),
)
for ch in self._ctrl.channels
if ch.name == "bia"
)
Expand Down
2 changes: 1 addition & 1 deletion adi/ad6676.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@


class ad6676(rx_def):
""" AD6676 Wideband IF Receiver Subsystem """
"""AD6676 Wideband IF Receiver Subsystem"""

_complex_data = True
_rx_channel_names = ["voltage0", "voltage1"]
Expand Down
2 changes: 1 addition & 1 deletion adi/ad7091rx.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def scale(self):

class ad7091rx(rx_chan_comp_no_buff):
"""AD7091R-2/AD7091R-4/AD7091R-8 SPI interface,
2-/4-/8-channel, 12-bit SAR ADC"""
2-/4-/8-channel, 12-bit SAR ADC"""

compatible_parts = ["ad7091r-8", "ad7091r-4", "ad7091r-2"]
_complex_data = False
Expand Down
2 changes: 1 addition & 1 deletion adi/ad7291.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def __call__(self):


class ad7291(rx_chan_comp_no_buff):
""" AD7291 ADC """
"""AD7291 ADC"""

compatible_parts = ["ad7291"]
_device_name = ""
Expand Down
3 changes: 1 addition & 2 deletions adi/ad7405.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ def offset(self):


class ad7405(rx_chan_comp):

""" AD7405 ADC """
"""AD7405 ADC"""

compatible_parts = ["adum7701", "adum7702", "adum7703", "ad7405"]
_complex_data = False
Expand Down
2 changes: 1 addition & 1 deletion adi/ad7746.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@


class ad7746(rx_chan_comp):
""" AD7746 CDC """
"""AD7746 CDC"""

_complex_data = False
channel = [] # type: ignore
Expand Down
6 changes: 2 additions & 4 deletions adi/ad7768.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@


class ad7768(rx_def):

""" AD7768 8-channel, Simultaneous Sampling Sigma-Delta ADC """
"""AD7768 8-channel, Simultaneous Sampling Sigma-Delta ADC"""

compatible_parts = ["ad7768", "cf_axi_adc"]
_rx_data_type = np.int32
Expand Down Expand Up @@ -82,8 +81,7 @@ def filter_type(self, ftype):


class ad7768_4(ad7768):

""" AD7768 4-channel, Simultaneous Sampling Sigma-Delta ADC """
"""AD7768 4-channel, Simultaneous Sampling Sigma-Delta ADC"""

_control_device_name = "cf_axi_adc"
_rx_data_device_name = "cf_axi_adc"
Expand Down
2 changes: 1 addition & 1 deletion adi/ad7799.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def value(self):


class ad7799(rx_chan_comp):
""" AD7799 ADC """
"""AD7799 ADC"""

compatible_parts = ["AD7799"]
_rx_channel_names = ["channel0", "channel1", "channel2"]
Expand Down
Loading
Loading