Skip to content

Commit

Permalink
Add support for Analog Discovery 3
Browse files Browse the repository at this point in the history
  • Loading branch information
mariusgreuel committed Oct 31, 2024
1 parent 754930c commit 6a70ebb
Show file tree
Hide file tree
Showing 11 changed files with 358 additions and 40 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.12'
- name: Install Dependencies
run: pip install -r requirements.txt
- name: Check pylint, mypy, black
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Create Release
id: create_release
uses: actions/create-release@v1
Expand All @@ -40,11 +40,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'
python-version: '3.12'
- name: Install Dependencies
run: pip install build twine
- name: Build Package
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
__pycache__/
*.egg-info/
dist/
.mypy_cache/

# Visual Studio
.vs/
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ with dwf.AnalogDiscovery2() as device:
- Low-level API with complete access to the Digilent Waveforms API.
- Powerful high-level API that supports one-line configuration statements.
- Supports all sub-modules, such as oscilloscope, arbitrary waveform generator, logic analyzer, pattern generator, digital I/O, and power supplies.
- Works with all WaveForms devices, such as the **Analog Discovery 2** or the **Digital Discovery**.
- Works with all WaveForms devices, such as the **Analog Discovery 2**, the **Analog Discovery 3**, or the **Digital Discovery**.

## Installing DwfPy

Expand All @@ -32,7 +32,7 @@ You can install the [DwfPy package](https://pypi.org/project/dwfpy/) from PyPI u
pip install dwfpy
```

In order to use the **DwfPy** package, you need **Python 3.6** or higher.
In order to use the **DwfPy** package, you need **Python 3.8** or higher.

As **DwfPy** builds on top of the WaveForms API, you need to install the [WaveForms software][WaveForms-Software], which includes the required runtime components to access the WaveForms devices.

Expand Down
17 changes: 9 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@ build-backend = "setuptools.build_meta"
[tool.pylint.messages_control]
max-line-length = 120
disable = [
"cyclic-import",
"duplicate-code",
"no-else-return",
"redefined-builtin",
"too-few-public-methods",
"too-many-arguments",
"too-many-locals",
"too-many-branches",
"too-many-instance-attributes",
"too-many-public-methods",
"too-many-lines",
"too-many-branches",
"too-many-locals",
"too-many-positional-arguments",
"too-many-public-methods",
"too-many-return-statements",
"too-few-public-methods",
"no-else-return",
"duplicate-code",
"cyclic-import",
"redefined-builtin",
]

[[tool.mypy.overrides]]
Expand Down
6 changes: 3 additions & 3 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
[metadata]
name = dwfpy
version = 1.1.2
version = 1.1.3
description = Python Bindings for Digilent WaveForms API
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/mariusgreuel/dwfpy
author = Marius Greuel
author_email = [email protected]
license = MIT
keywords = digilent,waveforms,analog discovery,digital discovery,ad2
keywords = digilent,waveforms,analog discovery,digital discovery,ad2,ad3
classifiers =
Programming Language :: Python :: 3
License :: OSI Approved :: MIT License
Expand All @@ -20,7 +20,7 @@ project_urls =
package_dir =
= src
packages = find:
python_requires = >=3.6
python_requires = >=3.8
install_requires =
numpy

Expand Down
1 change: 1 addition & 0 deletions src/dwfpy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
ElectronicsExplorer,
AnalogDiscovery,
AnalogDiscovery2,
AnalogDiscovery3,
DigitalDiscovery,
)
from dwfpy.application import Application
Expand Down
136 changes: 129 additions & 7 deletions src/dwfpy/bindings.py

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions src/dwfpy/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ class DeviceId(enum.IntEnum):
ANALOG_DISCOVERY2 = 3
DIGITAL_DISCOVERY = 4
ADP3X50 = 6
ECLYPSE = 7
ADP5250 = 8
DPS3340 = 9
ANALOG_DISCOVERY3 = 10


class DeviceType(enum.IntEnum):
Expand Down
Loading

0 comments on commit 6a70ebb

Please sign in to comment.