From 30f07fbf22bfb7e19e27f062d1ab39ab83e7b067 Mon Sep 17 00:00:00 2001 From: microDev <70126934+microDev1@users.noreply.github.com> Date: Wed, 26 Oct 2022 18:19:15 +0530 Subject: [PATCH 01/75] schedule pr jobs based on commit specific changes --- .github/workflows/build.yml | 27 ++-- tools/ci_changes_per_commit.py | 227 +++++++++++++++++++++++++++++++++ tools/ci_set_matrix.py | 25 +++- 3 files changed, 266 insertions(+), 13 deletions(-) create mode 100644 tools/ci_changes_per_commit.py diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8338528c42..c0ab361594 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -125,20 +125,29 @@ jobs: [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-amd64-linux-${{ env.CP_VERSION }} --no-progress --region us-east-1 [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1 - - name: "Get changes" + - name: Get last commit with checks + id: get-last-commit-with-checks if: github.event_name == 'pull_request' - uses: dorny/paths-filter@v2 - id: filter + working-directory: tools + env: + REPO: ${{ github.repository }} + PULL: ${{ github.event.number }} + GITHUB_TOKEN: ${{ github.token }} + EXCLUDE_COMMIT: ${{ github.event.after }} + run: python3 -u ci_changes_per_commit.py + - name: Get changes + id: get-changes + if: github.event_name == 'pull_request' + uses: tj-actions/changed-files@v34 with: - list-files: json - filters: | - changed: - - '**' - - name: "Set matrix" + json: "true" + base_sha: ${{ steps.get-last-commit-with-checks.outputs.commit }} + - name: Set matrix id: set-matrix working-directory: tools env: - CHANGED_FILES: ${{ steps.filter.outputs.changed_files }} + CHANGED_FILES: ${{ toJSON(steps.get-changes.outputs.all_changed_and_modified_files) }} + LAST_FAILED_JOBS: ${{ steps.get-last-commit-with-checks.outputs.checkruns }} run: python3 -u ci_set_matrix.py diff --git a/tools/ci_changes_per_commit.py b/tools/ci_changes_per_commit.py new file mode 100644 index 0000000000..dd957b2a56 --- /dev/null +++ b/tools/ci_changes_per_commit.py @@ -0,0 +1,227 @@ +#! /usr/bin/env python3 + +# SPDX-FileCopyrightText: 2021 microDev +# +# SPDX-License-Identifier: MIT + +# GraphQL Query + +QUERY_COMMITS = """ +query ($owner: String!, $name: String!, $pullNumber: Int!, $commitsPerPage: Int!, $beforeCommit: String) { + repository(owner: $owner, name: $name) { + pullRequest(number: $pullNumber) { + commits(last: $commitsPerPage, before: $beforeCommit) { + totalCount + pageInfo { + startCursor + hasPreviousPage + } + nodes { + commit { + checkSuites(first: 3) { + nodes { + conclusion + workflowRun { + workflow { + name + } + } + id + } + totalCount + } + oid + } + } + } + } + } +} +""" + +QUERY_CHECKRUNS = """ +query ($checkSuiteID: ID!, + $afterFailedRun: String, $afterIncompleteRun: String, + $includeFailedRuns: Boolean!, $includeIncompleteRuns: Boolean!) { + node(id: $checkSuiteID) { + ... on CheckSuite { + failedRuns: checkRuns( + first: 100 + after: $afterFailedRun + filterBy: {checkType: LATEST, conclusions: [ACTION_REQUIRED, TIMED_OUT, CANCELLED, FAILURE, NEUTRAL, STARTUP_FAILURE]} + ) @include(if: $includeFailedRuns) { + nodes { + name + } + pageInfo { + endCursor + hasNextPage + } + } + incompleteRuns: checkRuns( + first: 100 + after: $afterIncompleteRun + filterBy: {checkType: LATEST, statuses: [QUEUED, IN_PROGRESS, WAITING, PENDING, REQUESTED]} + ) @include(if: $includeIncompleteRuns) { + nodes { + name + } + pageInfo { + endCursor + hasNextPage + } + } + } + } +} +""" + + +import os +import re +import json +import requests + + +query_variables_commits = { + "owner": "", + "name": "", + "pullNumber": int(os.environ["PULL"]), + "commitsPerPage": 20, + "beforeCommit": None, +} + + +query_variables_checkruns = { + "checkSuiteID": "", + "afterFailedRun": None, + "afterIncompleteRun": None, + "includeFailedRuns": True, + "includeIncompleteRuns": True, +} + + +headers = {"Authorization": f"Bearer {os.environ['GITHUB_TOKEN']}"} + + +class Query: + def __init__(self, query, variables={}, headers={}): + self.query = query + self.variables = variables + self.headers = headers + + def paginate(self, page_info, name): + has_page = ( + page_info["hasNextPage"] if name.startswith("after") else page_info["hasPreviousPage"] + ) + if has_page: + self.variables[name] = ( + page_info["endCursor"] if name.startswith("after") else page_info["startCursor"] + ) + return has_page + + def fetch(self): + request = requests.post( + "https://api.github.com/graphql", + json={"query": self.query, "variables": self.variables}, + headers=self.headers, + ) + if request.status_code == 200: + return request.json() + else: + raise Exception("Query Failed: {}".format(request.status_code)) + + +def set_output(name, value): + if "GITHUB_OUTPUT" in os.environ: + with open(os.environ["GITHUB_OUTPUT"], "at") as f: + print(f"{name}={value}", file=f) + else: + print(f"Would set GitHub actions output {name} to '{value}'") + + +def get_commit_and_checksuite(query_commits): + commits = query_commits.fetch()["data"]["repository"]["pullRequest"]["commits"] + + if commits["totalCount"] > 0: + for commit in reversed(commits["nodes"]): + commit = commit["commit"] + commit_sha = commit["oid"] + if commit_sha == os.environ["EXCLUDE_COMMIT"]: + continue + checksuites = commit["checkSuites"] + if checksuites["totalCount"] > 0: + for checksuite in checksuites["nodes"]: + if checksuite["workflowRun"]["workflow"]["name"] == "Build CI": + return [ + commit_sha, + checksuite["id"] if checksuite["conclusion"] != "SUCCESS" else None, + ] + else: + if query_commits.paginate(commits["pageInfo"], "beforeCommit"): + return get_commit_and_checksuite(query_commits) + + return [None, None] + + +def append_runs_to_list(runs, list): + regex_matrix = re.compile("^build-[^ ]+") + regex_board = re.compile("\([^ ]+\)$") + for run in runs["nodes"]: + name = run["name"] + res_matrix = regex_matrix.search(name) + if res_matrix: + matrix = res_matrix.group() + if matrix not in list: + list[matrix] = [] + list[matrix].append(regex_board.search(name).group()[1:-1]) + + +def get_bad_checkruns(query_checkruns, list={}): + checkruns = query_checkruns.fetch()["data"]["node"] + run_types = ["failed", "incomplete"] + paginate = False + + for run_type in run_types: + run_type_camel = run_type.capitalize() + "Run" + run_type = run_type + "Runs" + + append_runs_to_list(checkruns[run_type], list) + + if query_checkruns.paginate(checkruns[run_type]["pageInfo"], "after" + run_type_camel): + query_checkruns.variables["include" + run_type_camel] = True + paginate = True + + return get_bad_checkruns(query_checkruns, list) if paginate else list + + +def main(): + query_commits = Query(QUERY_COMMITS, query_variables_commits, headers) + query_commits.variables["owner"], query_commits.variables["name"] = os.environ["REPO"].split( + "/" + ) + + commit, checksuite = get_commit_and_checksuite(query_commits) + + if checksuite is None: + if commit is None: + print("No checkSuites found -> Abort") + else: + set_output("commit", commit) + quit() + + query_checkruns = Query(QUERY_CHECKRUNS, query_variables_checkruns, headers) + query_checkruns.variables["checkSuiteID"] = checksuite + + checkruns = get_bad_checkruns(query_checkruns) + + if len(checkruns) == 0: + print("No checkRuns found -> Abort") + quit() + + set_output("commit", commit) + set_output("checkruns", json.dumps(checkruns)) + + +if __name__ == "__main__": + main() diff --git a/tools/ci_set_matrix.py b/tools/ci_set_matrix.py index f22840fad7..081cf8d4fa 100755 --- a/tools/ci_set_matrix.py +++ b/tools/ci_set_matrix.py @@ -25,7 +25,6 @@ import re import os import sys import json -import yaml import pathlib from concurrent.futures import ThreadPoolExecutor @@ -62,6 +61,7 @@ IGNORE = [ if len(sys.argv) > 1: print("Using files list on commandline") changed_files = sys.argv[1:] + last_failed_jobs = {} else: c = os.environ["CHANGED_FILES"] if c == "": @@ -69,7 +69,14 @@ else: changed_files = [] else: print("Using files list in CHANGED_FILES") - changed_files = json.loads(os.environ["CHANGED_FILES"]) + changed_files = json.loads(c) + + j = os.environ["LAST_FAILED_JOBS"] + if j == "": + print("LAST_FAILED_JOBS is in environment, but value is empty") + last_failed_jobs = {} + else: + last_failed_jobs = json.loads(j) def set_output(name, value): @@ -196,7 +203,7 @@ def set_boards_to_build(build_all): # Split boards by architecture. print("Building boards:") arch_to_boards = {"aarch": [], "arm": [], "riscv": [], "espressif": []} - for board in sorted(boards_to_build): + for board in boards_to_build: print(" ", board) port = board_to_port.get(board) # A board can appear due to its _deletion_ (rare) @@ -208,10 +215,20 @@ def set_boards_to_build(build_all): # Set the step outputs for each architecture for arch in arch_to_boards: + # Append previous failed jobs + if f"build-{arch}" in last_failed_jobs: + failed_boards = last_failed_jobs[f"build-{arch}"] + for board in failed_boards: + if not board in arch_to_boards[arch]: + arch_to_boards[arch].append(board) + # Set Output set_output(f"boards-{arch}", json.dumps(sorted(arch_to_boards[arch]))) def set_docs_to_build(build_all): + if "build-doc" in last_failed_jobs: + build_all = True + doc_match = build_all if not build_all: doc_pattern = re.compile( @@ -224,7 +241,7 @@ def set_docs_to_build(build_all): # Set the step outputs print("Building docs:", doc_match) - set_output(f"build-doc", doc_match) + set_output("build-doc", doc_match) def check_changed_files(): From 0e0c1067400cdd91ad5605f020df9e04ac3d3357 Mon Sep 17 00:00:00 2001 From: dronecz Date: Thu, 27 Oct 2022 01:06:38 +0200 Subject: [PATCH 02/75] Add Maker badge board --- .../adafruit_circuitpython_pr.md | 13 + .../.github/workflows/build.yml | 77 ++++ .../.github/workflows/failure-help-text.yml | 19 + .../.github/workflows/release.yml | 88 ++++ .../Adafruit_CircuitPython_SSD1680/.gitignore | 47 ++ .../.pre-commit-config.yaml | 42 ++ .../Adafruit_CircuitPython_SSD1680/.pylintrc | 436 ++++++++++++++++++ .../.readthedocs.yaml | 19 + .../CODE_OF_CONDUCT.md | 137 ++++++ frozen/Adafruit_CircuitPython_SSD1680/LICENSE | 21 + .../LICENSES/CC-BY-4.0.txt | 324 +++++++++++++ .../LICENSES/MIT.txt | 19 + .../LICENSES/Unlicense.txt | 20 + .../Adafruit_CircuitPython_SSD1680/README.rst | 138 ++++++ .../README.rst.license | 3 + .../adafruit_ssd1680.py | 100 ++++ .../docs/_static/favicon.ico | Bin 0 -> 4414 bytes .../docs/_static/favicon.ico.license | 3 + .../docs/api.rst | 8 + .../docs/api.rst.license | 4 + .../docs/conf.py | 194 ++++++++ .../docs/examples.rst | 8 + .../docs/examples.rst.license | 4 + .../docs/index.rst | 50 ++ .../docs/index.rst.license | 4 + .../docs/requirements.txt | 5 + .../examples/display-ruler.bmp | Bin 0 -> 360122 bytes .../examples/display-ruler.bmp.license | 2 + .../examples/ssd1680_simpletest.py | 60 +++ .../optional_requirements.txt | 3 + .../pyproject.toml | 47 ++ .../requirements.txt | 5 + .../adafruit_circuitpython_pr.md | 13 + .../.github/workflows/build.yml | 77 ++++ .../.github/workflows/failure-help-text.yml | 19 + .../.github/workflows/release.yml | 88 ++++ .../Adafruit_CircuitPython_UC8151D/.gitignore | 47 ++ .../.pre-commit-config.yaml | 42 ++ .../Adafruit_CircuitPython_UC8151D/.pylintrc | 436 ++++++++++++++++++ .../.readthedocs.yaml | 19 + .../CODE_OF_CONDUCT.md | 141 ++++++ frozen/Adafruit_CircuitPython_UC8151D/LICENSE | 21 + .../LICENSES/CC-BY-4.0.txt | 324 +++++++++++++ .../LICENSES/MIT.txt | 19 + .../LICENSES/Unlicense.txt | 20 + .../Adafruit_CircuitPython_UC8151D/README.rst | 149 ++++++ .../README.rst.license | 3 + .../adafruit_uc8151d.py | 132 ++++++ .../docs/_static/favicon.ico | Bin 0 -> 4414 bytes .../docs/_static/favicon.ico.license | 3 + .../docs/api.rst | 8 + .../docs/api.rst.license | 4 + .../docs/conf.py | 195 ++++++++ .../docs/examples.rst | 8 + .../docs/examples.rst.license | 4 + .../docs/index.rst | 51 ++ .../docs/index.rst.license | 4 + .../docs/requirements.txt | 5 + .../examples/display-ruler.bmp | Bin 0 -> 360122 bytes .../examples/display-ruler.bmp.license | 2 + .../examples/uc8151d_grayscale_test.py | 68 +++ .../examples/uc8151d_simpletest.py | 48 ++ .../optional_requirements.txt | 3 + .../pyproject.toml | 50 ++ .../requirements.txt | 6 + ports/espressif/boards/maker_badge/board.c | 63 +++ .../boards/maker_badge/mpconfigboard.h | 55 +++ .../boards/maker_badge/mpconfigboard.mk | 29 ++ ports/espressif/boards/maker_badge/pins.c | 87 ++++ 69 files changed, 4143 insertions(+) create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/build.yml create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/failure-help-text.yml create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/release.yml create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/.gitignore create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/.pre-commit-config.yaml create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/.pylintrc create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/.readthedocs.yaml create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/CODE_OF_CONDUCT.md create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/LICENSE create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/LICENSES/CC-BY-4.0.txt create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/LICENSES/MIT.txt create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/LICENSES/Unlicense.txt create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/README.rst create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/README.rst.license create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/adafruit_ssd1680.py create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/_static/favicon.ico create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/_static/favicon.ico.license create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/api.rst create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/api.rst.license create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/conf.py create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/examples.rst create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/examples.rst.license create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/index.rst create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/index.rst.license create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/requirements.txt create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/examples/display-ruler.bmp create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/examples/display-ruler.bmp.license create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/examples/ssd1680_simpletest.py create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/optional_requirements.txt create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/pyproject.toml create mode 100644 frozen/Adafruit_CircuitPython_SSD1680/requirements.txt create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/build.yml create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/failure-help-text.yml create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/release.yml create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/.gitignore create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/.pre-commit-config.yaml create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/.pylintrc create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/.readthedocs.yaml create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/CODE_OF_CONDUCT.md create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/LICENSE create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/LICENSES/CC-BY-4.0.txt create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/LICENSES/MIT.txt create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/LICENSES/Unlicense.txt create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/README.rst create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/README.rst.license create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/adafruit_uc8151d.py create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/_static/favicon.ico create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/_static/favicon.ico.license create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/api.rst create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/api.rst.license create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/conf.py create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/examples.rst create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/examples.rst.license create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/index.rst create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/index.rst.license create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/requirements.txt create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/examples/display-ruler.bmp create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/examples/display-ruler.bmp.license create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/examples/uc8151d_grayscale_test.py create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/examples/uc8151d_simpletest.py create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/optional_requirements.txt create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/pyproject.toml create mode 100644 frozen/Adafruit_CircuitPython_UC8151D/requirements.txt create mode 100644 ports/espressif/boards/maker_badge/board.c create mode 100644 ports/espressif/boards/maker_badge/mpconfigboard.h create mode 100644 ports/espressif/boards/maker_badge/mpconfigboard.mk create mode 100644 ports/espressif/boards/maker_badge/pins.c diff --git a/frozen/Adafruit_CircuitPython_SSD1680/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md b/frozen/Adafruit_CircuitPython_SSD1680/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md new file mode 100644 index 0000000000..8de294e68a --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md @@ -0,0 +1,13 @@ +# SPDX-FileCopyrightText: 2021 Adafruit Industries +# +# SPDX-License-Identifier: MIT + +Thank you for contributing! Before you submit a pull request, please read the following. + +Make sure any changes you're submitting are in line with the CircuitPython Design Guide, available here: https://docs.circuitpython.org/en/latest/docs/design_guide.html + +If your changes are to documentation, please verify that the documentation builds locally by following the steps found here: https://adafru.it/build-docs + +Before submitting the pull request, make sure you've run Pylint and Black locally on your code. You can do this manually or using pre-commit. Instructions are available here: https://adafru.it/check-your-code + +Please remove all of this text before submitting. Include an explanation or list of changes included in your PR, as well as, if applicable, a link to any related issues. diff --git a/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/build.yml b/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/build.yml new file mode 100644 index 0000000000..cb2f60e36a --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/build.yml @@ -0,0 +1,77 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +name: Build CI + +on: [pull_request, push] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Translate Repo Name For Build Tools filename_prefix + id: repo-name + run: | + echo ::set-output name=repo-name::$( + echo ${{ github.repository }} | + awk -F '\/' '{ print tolower($2) }' | + tr '_' '-' + ) + - name: Set up Python 3.x + uses: actions/setup-python@v2 + with: + python-version: "3.x" + - name: Versions + run: | + python3 --version + - name: Checkout Current Repo + uses: actions/checkout@v1 + with: + submodules: true + - name: Checkout tools repo + uses: actions/checkout@v2 + with: + repository: adafruit/actions-ci-circuitpython-libs + path: actions-ci + - name: Install dependencies + # (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.) + run: | + source actions-ci/install.sh + - name: Pip install Sphinx, pre-commit + run: | + pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit + - name: Library version + run: git describe --dirty --always --tags + - name: Setup problem matchers + uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1 + - name: Pre-commit hooks + run: | + pre-commit run --all-files + - name: Build assets + run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . + - name: Archive bundles + uses: actions/upload-artifact@v2 + with: + name: bundles + path: ${{ github.workspace }}/bundles/ + - name: Build docs + working-directory: docs + run: sphinx-build -E -W -b html . _build/html + - name: Check For pyproject.toml + id: need-pypi + run: | + echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' ) + - name: Build Python package + if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') + run: | + pip install --upgrade build twine + for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do + sed -i -e "s/0.0.0+auto.0/1.2.3/" $file; + done; + python -m build + twine check dist/* diff --git a/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/failure-help-text.yml b/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/failure-help-text.yml new file mode 100644 index 0000000000..0b1194f0cd --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/failure-help-text.yml @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2021 Scott Shawcroft for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +name: Failure help text + +on: + workflow_run: + workflows: ["Build CI"] + types: + - completed + +jobs: + post-help: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event == 'pull_request' }} + steps: + - name: Post comment to help + uses: adafruit/circuitpython-action-library-ci-failed@v1 diff --git a/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/release.yml b/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/release.yml new file mode 100644 index 0000000000..f3a0325ba3 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/release.yml @@ -0,0 +1,88 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +name: Release Actions + +on: + release: + types: [published] + +jobs: + upload-release-assets: + runs-on: ubuntu-latest + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Translate Repo Name For Build Tools filename_prefix + id: repo-name + run: | + echo ::set-output name=repo-name::$( + echo ${{ github.repository }} | + awk -F '\/' '{ print tolower($2) }' | + tr '_' '-' + ) + - name: Set up Python 3.x + uses: actions/setup-python@v2 + with: + python-version: "3.x" + - name: Versions + run: | + python3 --version + - name: Checkout Current Repo + uses: actions/checkout@v1 + with: + submodules: true + - name: Checkout tools repo + uses: actions/checkout@v2 + with: + repository: adafruit/actions-ci-circuitpython-libs + path: actions-ci + - name: Install deps + run: | + source actions-ci/install.sh + - name: Build assets + run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . + - name: Upload Release Assets + # the 'official' actions version does not yet support dynamically + # supplying asset names to upload. @csexton's version chosen based on + # discussion in the issue below, as its the simplest to implement and + # allows for selecting files with a pattern. + # https://github.com/actions/upload-release-asset/issues/4 + #uses: actions/upload-release-asset@v1.0.1 + uses: csexton/release-asset-action@master + with: + pattern: "bundles/*" + github-token: ${{ secrets.GITHUB_TOKEN }} + + upload-pypi: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Check For pyproject.toml + id: need-pypi + run: | + echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' ) + - name: Set up Python + if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') + run: | + python -m pip install --upgrade pip + pip install --upgrade build twine + - name: Build and publish + if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') + env: + TWINE_USERNAME: ${{ secrets.pypi_username }} + TWINE_PASSWORD: ${{ secrets.pypi_password }} + run: | + for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do + sed -i -e "s/0.0.0+auto.0/${{github.event.release.tag_name}}/" $file; + done; + python -m build + twine upload dist/* diff --git a/frozen/Adafruit_CircuitPython_SSD1680/.gitignore b/frozen/Adafruit_CircuitPython_SSD1680/.gitignore new file mode 100644 index 0000000000..544ec4a695 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/.gitignore @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: 2022 Kattni Rembor, written for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +# Do not include files and directories created by your personal work environment, such as the IDE +# you use, except for those already listed here. Pull requests including changes to this file will +# not be accepted. + +# This .gitignore file contains rules for files generated by working with CircuitPython libraries, +# including building Sphinx, testing with pip, and creating a virual environment, as well as the +# MacOS and IDE-specific files generated by using MacOS in general, or the PyCharm or VSCode IDEs. + +# If you find that there are files being generated on your machine that should not be included in +# your git commit, you should create a .gitignore_global file on your computer to include the +# files created by your personal setup. To do so, follow the two steps below. + +# First, create a file called .gitignore_global somewhere convenient for you, and add rules for +# the files you want to exclude from git commits. + +# Second, configure Git to use the exclude file for all Git repositories by running the +# following via commandline, replacing "path/to/your/" with the actual path to your newly created +# .gitignore_global file: +# git config --global core.excludesfile path/to/your/.gitignore_global + +# CircuitPython-specific files +*.mpy + +# Python-specific files +__pycache__ +*.pyc + +# Sphinx build-specific files +_build + +# This file results from running `pip -e install .` in a local repository +*.egg-info + +# Virtual environment-specific files +.env + +# MacOS-specific files +*.DS_Store + +# IDE-specific files +.idea +.vscode +*~ diff --git a/frozen/Adafruit_CircuitPython_SSD1680/.pre-commit-config.yaml b/frozen/Adafruit_CircuitPython_SSD1680/.pre-commit-config.yaml new file mode 100644 index 0000000000..3343606412 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/.pre-commit-config.yaml @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò +# +# SPDX-License-Identifier: Unlicense + +repos: + - repo: https://github.com/python/black + rev: 22.3.0 + hooks: + - id: black + - repo: https://github.com/fsfe/reuse-tool + rev: v0.14.0 + hooks: + - id: reuse + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.2.0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + - repo: https://github.com/pycqa/pylint + rev: v2.11.1 + hooks: + - id: pylint + name: pylint (library code) + types: [python] + args: + - --disable=consider-using-f-string + exclude: "^(docs/|examples/|tests/|setup.py$)" + - id: pylint + name: pylint (example code) + description: Run pylint rules on "examples/*.py" files + types: [python] + files: "^examples/" + args: + - --disable=missing-docstring,invalid-name,consider-using-f-string,duplicate-code + - id: pylint + name: pylint (test code) + description: Run pylint rules on "tests/*.py" files + types: [python] + files: "^tests/" + args: + - --disable=missing-docstring,consider-using-f-string,duplicate-code diff --git a/frozen/Adafruit_CircuitPython_SSD1680/.pylintrc b/frozen/Adafruit_CircuitPython_SSD1680/.pylintrc new file mode 100644 index 0000000000..1f42e5de32 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/.pylintrc @@ -0,0 +1,436 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + +[MASTER] + +# A comma-separated list of package or module names from where C extensions may +# be loaded. Extensions are loading into the active Python interpreter and may +# run arbitrary code +extension-pkg-whitelist= + +# Add files or directories to the ignore-list. They should be base names, not +# paths. +ignore=CVS + +# Add files or directories matching the regex patterns to the ignore-list. The +# regex matches against base names, not paths. +ignore-patterns= + +# Python code to execute, usually for sys.path manipulation such as +# pygtk.require(). +#init-hook= + +# Use multiple processes to speed up Pylint. +jobs=1 + +# List of plugins (as comma separated values of python modules names) to load, +# usually to register additional checkers. +load-plugins= + +# Pickle collected data for later comparisons. +persistent=yes + +# Specify a configuration file. +#rcfile= + +# Allow loading of arbitrary C extensions. Extensions are imported into the +# active Python interpreter and may run arbitrary code. +unsafe-load-any-extension=no + + +[MESSAGES CONTROL] + +# Only show warnings with the listed confidence levels. Leave empty to show +# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED +confidence= + +# Disable the message, report, category or checker with the given id(s). You +# can either give multiple identifiers separated by comma (,) or put this +# option multiple times (only on the command line, not in the configuration +# file where it should appear only once).You can also use "--disable=all" to +# disable everything first and then reenable specific checks. For example, if +# you want to run only the similarities checker, you can use "--disable=all +# --enable=similarities". If you want to run only the classes checker, but have +# no Warning level messages displayed, use"--disable=all --enable=classes +# --disable=W" +# disable=import-error,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call +disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error,bad-continuation,pointless-string-statement,unspecified-encoding + +# Enable the message, report, category or checker with the given id(s). You can +# either give multiple identifier separated by comma (,) or put this option +# multiple time (only on the command line, not in the configuration file where +# it should appear only once). See also the "--disable" option for examples. +enable= + + +[REPORTS] + +# Python expression which should return a note less than 10 (10 is the highest +# note). You have access to the variables errors warning, statement which +# respectively contain the number of errors / warnings messages and the total +# number of statements analyzed. This is used by the global evaluation report +# (RP0004). +evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) + +# Template used to display messages. This is a python new-style format string +# used to format the message information. See doc for all details +#msg-template= + +# Set the output format. Available formats are text, parseable, colorized, json +# and msvs (visual studio).You can also give a reporter class, eg +# mypackage.mymodule.MyReporterClass. +output-format=text + +# Tells whether to display a full report or only the messages +reports=no + +# Activate the evaluation score. +score=yes + + +[REFACTORING] + +# Maximum number of nested blocks for function / method body +max-nested-blocks=5 + + +[LOGGING] + +# Logging modules to check that the string format arguments are in logging +# function parameter format +logging-modules=logging + + +[SPELLING] + +# Spelling dictionary name. Available dictionaries: none. To make it working +# install python-enchant package. +spelling-dict= + +# List of comma separated words that should not be checked. +spelling-ignore-words= + +# A path to a file that contains private dictionary; one word per line. +spelling-private-dict-file= + +# Tells whether to store unknown words to indicated private dictionary in +# --spelling-private-dict-file option instead of raising a message. +spelling-store-unknown-words=no + + +[MISCELLANEOUS] + +# List of note tags to take in consideration, separated by a comma. +# notes=FIXME,XXX,TODO +notes=FIXME,XXX + + +[TYPECHECK] + +# List of decorators that produce context managers, such as +# contextlib.contextmanager. Add to this list to register other decorators that +# produce valid context managers. +contextmanager-decorators=contextlib.contextmanager + +# List of members which are set dynamically and missed by pylint inference +# system, and so shouldn't trigger E1101 when accessed. Python regular +# expressions are accepted. +generated-members= + +# Tells whether missing members accessed in mixin class should be ignored. A +# mixin class is detected if its name ends with "mixin" (case insensitive). +ignore-mixin-members=yes + +# This flag controls whether pylint should warn about no-member and similar +# checks whenever an opaque object is returned when inferring. The inference +# can return multiple potential results while evaluating a Python object, but +# some branches might not be evaluated, which results in partial inference. In +# that case, it might be useful to still emit no-member and other checks for +# the rest of the inferred objects. +ignore-on-opaque-inference=yes + +# List of class names for which member attributes should not be checked (useful +# for classes with dynamically set attributes). This supports the use of +# qualified names. +ignored-classes=optparse.Values,thread._local,_thread._local + +# List of module names for which member attributes should not be checked +# (useful for modules/projects where namespaces are manipulated during runtime +# and thus existing member attributes cannot be deduced by static analysis. It +# supports qualified module names, as well as Unix pattern matching. +ignored-modules=board + +# Show a hint with possible names when a member name was not found. The aspect +# of finding the hint is based on edit distance. +missing-member-hint=yes + +# The minimum edit distance a name should have in order to be considered a +# similar match for a missing member name. +missing-member-hint-distance=1 + +# The total number of similar names that should be taken in consideration when +# showing a hint for a missing member. +missing-member-max-choices=1 + + +[VARIABLES] + +# List of additional names supposed to be defined in builtins. Remember that +# you should avoid to define new builtins when possible. +additional-builtins= + +# Tells whether unused global variables should be treated as a violation. +allow-global-unused-variables=yes + +# List of strings which can identify a callback function by name. A callback +# name must start or end with one of those strings. +callbacks=cb_,_cb + +# A regular expression matching the name of dummy variables (i.e. expectedly +# not used). +dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ + +# Argument names that match this expression will be ignored. Default to name +# with leading underscore +ignored-argument-names=_.*|^ignored_|^unused_ + +# Tells whether we should check for unused import in __init__ files. +init-import=no + +# List of qualified module names which can have objects that can redefine +# builtins. +redefining-builtins-modules=six.moves,future.builtins + + +[FORMAT] + +# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. +# expected-line-ending-format= +expected-line-ending-format=LF + +# Regexp for a line that is allowed to be longer than the limit. +ignore-long-lines=^\s*(# )??$ + +# Number of spaces of indent required inside a hanging or continued line. +indent-after-paren=4 + +# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 +# tab). +indent-string=' ' + +# Maximum number of characters on a single line. +max-line-length=100 + +# Maximum number of lines in a module +max-module-lines=1000 + +# List of optional constructs for which whitespace checking is disabled. `dict- +# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. +# `trailing-comma` allows a space between comma and closing bracket: (a, ). +# `empty-line` allows space-only lines. +no-space-check=trailing-comma,dict-separator + +# Allow the body of a class to be on the same line as the declaration if body +# contains single statement. +single-line-class-stmt=no + +# Allow the body of an if to be on the same line as the test if there is no +# else. +single-line-if-stmt=no + + +[SIMILARITIES] + +# Ignore comments when computing similarities. +ignore-comments=yes + +# Ignore docstrings when computing similarities. +ignore-docstrings=yes + +# Ignore imports when computing similarities. +ignore-imports=yes + +# Minimum lines number of a similarity. +min-similarity-lines=12 + + +[BASIC] + +# Naming hint for argument names +argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct argument names +argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Naming hint for attribute names +attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct attribute names +attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Bad variable names which should always be refused, separated by a comma +bad-names=foo,bar,baz,toto,tutu,tata + +# Naming hint for class attribute names +class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ + +# Regular expression matching correct class attribute names +class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ + +# Naming hint for class names +# class-name-hint=[A-Z_][a-zA-Z0-9]+$ +class-name-hint=[A-Z_][a-zA-Z0-9_]+$ + +# Regular expression matching correct class names +# class-rgx=[A-Z_][a-zA-Z0-9]+$ +class-rgx=[A-Z_][a-zA-Z0-9_]+$ + +# Naming hint for constant names +const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$ + +# Regular expression matching correct constant names +const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ + +# Minimum line length for functions/classes that require docstrings, shorter +# ones are exempt. +docstring-min-length=-1 + +# Naming hint for function names +function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct function names +function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Good variable names which should always be accepted, separated by a comma +# good-names=i,j,k,ex,Run,_ +good-names=r,g,b,w,i,j,k,n,x,y,z,ex,ok,Run,_ + +# Include a hint for the correct naming format with invalid-name +include-naming-hint=no + +# Naming hint for inline iteration names +inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$ + +# Regular expression matching correct inline iteration names +inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ + +# Naming hint for method names +method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct method names +method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Naming hint for module names +module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ + +# Regular expression matching correct module names +module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ + +# Colon-delimited sets of names that determine each other's naming style when +# the name regexes allow several styles. +name-group= + +# Regular expression which should only match function or class names that do +# not require a docstring. +no-docstring-rgx=^_ + +# List of decorators that produce properties, such as abc.abstractproperty. Add +# to this list to register other decorators that produce valid properties. +property-classes=abc.abstractproperty + +# Naming hint for variable names +variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct variable names +variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + + +[IMPORTS] + +# Allow wildcard imports from modules that define __all__. +allow-wildcard-with-all=no + +# Analyse import fallback blocks. This can be used to support both Python 2 and +# 3 compatible code, which means that the block might have code that exists +# only in one or another interpreter, leading to false positives when analysed. +analyse-fallback-blocks=no + +# Deprecated modules which should not be used, separated by a comma +deprecated-modules=optparse,tkinter.tix + +# Create a graph of external dependencies in the given file (report RP0402 must +# not be disabled) +ext-import-graph= + +# Create a graph of every (i.e. internal and external) dependencies in the +# given file (report RP0402 must not be disabled) +import-graph= + +# Create a graph of internal dependencies in the given file (report RP0402 must +# not be disabled) +int-import-graph= + +# Force import order to recognize a module as part of the standard +# compatibility libraries. +known-standard-library= + +# Force import order to recognize a module as part of a third party library. +known-third-party=enchant + + +[CLASSES] + +# List of method names used to declare (i.e. assign) instance attributes. +defining-attr-methods=__init__,__new__,setUp + +# List of member names, which should be excluded from the protected access +# warning. +exclude-protected=_asdict,_fields,_replace,_source,_make + +# List of valid names for the first argument in a class method. +valid-classmethod-first-arg=cls + +# List of valid names for the first argument in a metaclass class method. +valid-metaclass-classmethod-first-arg=mcs + + +[DESIGN] + +# Maximum number of arguments for function / method +max-args=5 + +# Maximum number of attributes for a class (see R0902). +# max-attributes=7 +max-attributes=11 + +# Maximum number of boolean expressions in a if statement +max-bool-expr=5 + +# Maximum number of branch for function / method body +max-branches=12 + +# Maximum number of locals for function / method body +max-locals=15 + +# Maximum number of parents for a class (see R0901). +max-parents=7 + +# Maximum number of public methods for a class (see R0904). +max-public-methods=20 + +# Maximum number of return / yield for function / method body +max-returns=6 + +# Maximum number of statements in function / method body +max-statements=50 + +# Minimum number of public methods for a class (see R0903). +min-public-methods=1 + + +[EXCEPTIONS] + +# Exceptions that will emit a warning when being caught. Defaults to +# "Exception" +overgeneral-exceptions=Exception diff --git a/frozen/Adafruit_CircuitPython_SSD1680/.readthedocs.yaml b/frozen/Adafruit_CircuitPython_SSD1680/.readthedocs.yaml new file mode 100644 index 0000000000..33c2a6108e --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/.readthedocs.yaml @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +build: + os: ubuntu-20.04 + tools: + python: "3" + +python: + install: + - requirements: docs/requirements.txt + - requirements: requirements.txt diff --git a/frozen/Adafruit_CircuitPython_SSD1680/CODE_OF_CONDUCT.md b/frozen/Adafruit_CircuitPython_SSD1680/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..d885b3605a --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/CODE_OF_CONDUCT.md @@ -0,0 +1,137 @@ + +# Adafruit Community Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and leaders pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level or type of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +We are committed to providing a friendly, safe and welcoming environment for +all. + +Examples of behavior that contributes to creating a positive environment +include: + +* Be kind and courteous to others +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Collaborating with other community members +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and sexual attention or advances +* The use of inappropriate images, including in a community member's avatar +* The use of inappropriate language, including in a community member's nickname +* Any spamming, flaming, baiting or other attention-stealing behavior +* Excessive or unwelcome helping; answering outside the scope of the question + asked +* Trolling, insulting/derogatory comments, and personal or political attacks +* Promoting or spreading disinformation, lies, or conspiracy theories against + a person, group, organisation, project, or community +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate + +The goal of the standards and moderation guidelines outlined here is to build +and maintain a respectful community. We ask that you don’t just aim to be +"technically unimpeachable", but rather try to be your best self. + +We value many things beyond technical expertise, including collaboration and +supporting others within our community. Providing a positive experience for +other community members can have a much more significant impact than simply +providing the correct answer. + +## Our Responsibilities + +Project leaders are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project leaders have the right and responsibility to remove, edit, or +reject messages, comments, commits, code, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any community member for other behaviors that they deem +inappropriate, threatening, offensive, or harmful. + +## Moderation + +Instances of behaviors that violate the Adafruit Community Code of Conduct +may be reported by any member of the community. Community members are +encouraged to report these situations, including situations they witness +involving other community members. + +You may report in the following ways: + +In any situation, you may send an email to . + +On the Adafruit Discord, you may send an open message from any channel +to all Community Moderators by tagging @community moderators. You may +also send an open message from any channel, or a direct message to +@kattni#1507, @tannewt#4653, @danh#1614, @cater#2442, +@sommersoft#0222, @Mr. Certainly#0472 or @Andon#8175. + +Email and direct message reports will be kept confidential. + +In situations on Discord where the issue is particularly egregious, possibly +illegal, requires immediate action, or violates the Discord terms of service, +you should also report the message directly to Discord. + +These are the steps for upholding our community’s standards of conduct. + +1. Any member of the community may report any situation that violates the +Adafruit Community Code of Conduct. All reports will be reviewed and +investigated. +2. If the behavior is an egregious violation, the community member who +committed the violation may be banned immediately, without warning. +3. Otherwise, moderators will first respond to such behavior with a warning. +4. Moderators follow a soft "three strikes" policy - the community member may +be given another chance, if they are receptive to the warning and change their +behavior. +5. If the community member is unreceptive or unreasonable when warned by a +moderator, or the warning goes unheeded, they may be banned for a first or +second offense. Repeated offenses will result in the community member being +banned. + +## Scope + +This Code of Conduct and the enforcement policies listed above apply to all +Adafruit Community venues. This includes but is not limited to any community +spaces (both public and private), the entire Adafruit Discord server, and +Adafruit GitHub repositories. Examples of Adafruit Community spaces include +but are not limited to meet-ups, audio chats on the Adafruit Discord, or +interaction at a conference. + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. As a community +member, you are representing our community, and are expected to behave +accordingly. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant], +version 1.4, available at +, +and the [Rust Code of Conduct](https://www.rust-lang.org/en-US/conduct.html). + +For other projects adopting the Adafruit Community Code of +Conduct, please contact the maintainers of those projects for enforcement. +If you wish to use this code of conduct for your own project, consider +explicitly mentioning your moderation policy or making a copy with your +own moderation policy so as to avoid confusion. + +[Contributor Covenant]: https://www.contributor-covenant.org diff --git a/frozen/Adafruit_CircuitPython_SSD1680/LICENSE b/frozen/Adafruit_CircuitPython_SSD1680/LICENSE new file mode 100644 index 0000000000..88160406de --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/CC-BY-4.0.txt b/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/CC-BY-4.0.txt new file mode 100644 index 0000000000..3f92dfc5fd --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/CC-BY-4.0.txt @@ -0,0 +1,324 @@ +Creative Commons Attribution 4.0 International Creative Commons Corporation +("Creative Commons") is not a law firm and does not provide legal services +or legal advice. Distribution of Creative Commons public licenses does not +create a lawyer-client or other relationship. Creative Commons makes its licenses +and related information available on an "as-is" basis. Creative Commons gives +no warranties regarding its licenses, any material licensed under their terms +and conditions, or any related information. Creative Commons disclaims all +liability for damages resulting from their use to the fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and conditions +that creators and other rights holders may use to share original works of +authorship and other material subject to copyright and certain other rights +specified in the public license below. The following considerations are for +informational purposes only, are not exhaustive, and do not form part of our +licenses. + +Considerations for licensors: Our public licenses are intended for use by +those authorized to give the public permission to use material in ways otherwise +restricted by copyright and certain other rights. Our licenses are irrevocable. +Licensors should read and understand the terms and conditions of the license +they choose before applying it. Licensors should also secure all rights necessary +before applying our licenses so that the public can reuse the material as +expected. Licensors should clearly mark any material not subject to the license. +This includes other CC-licensed material, or material used under an exception +or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors + +Considerations for the public: By using one of our public licenses, a licensor +grants the public permission to use the licensed material under specified +terms and conditions. If the licensor's permission is not necessary for any +reason–for example, because of any applicable exception or limitation to copyright–then +that use is not regulated by the license. Our licenses grant only permissions +under copyright and certain other rights that a licensor has authority to +grant. Use of the licensed material may still be restricted for other reasons, +including because others have copyright or other rights in the material. A +licensor may make special requests, such as asking that all changes be marked +or described. Although not required by our licenses, you are encouraged to +respect those requests where reasonable. More considerations for the public +: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution +4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree to +be bound by the terms and conditions of this Creative Commons Attribution +4.0 International Public License ("Public License"). To the extent this Public +License may be interpreted as a contract, You are granted the Licensed Rights +in consideration of Your acceptance of these terms and conditions, and the +Licensor grants You such rights in consideration of benefits the Licensor +receives from making the Licensed Material available under these terms and +conditions. + +Section 1 – Definitions. + +a. Adapted Material means material subject to Copyright and Similar Rights +that is derived from or based upon the Licensed Material and in which the +Licensed Material is translated, altered, arranged, transformed, or otherwise +modified in a manner requiring permission under the Copyright and Similar +Rights held by the Licensor. For purposes of this Public License, where the +Licensed Material is a musical work, performance, or sound recording, Adapted +Material is always produced where the Licensed Material is synched in timed +relation with a moving image. + +b. Adapter's License means the license You apply to Your Copyright and Similar +Rights in Your contributions to Adapted Material in accordance with the terms +and conditions of this Public License. + +c. Copyright and Similar Rights means copyright and/or similar rights closely +related to copyright including, without limitation, performance, broadcast, +sound recording, and Sui Generis Database Rights, without regard to how the +rights are labeled or categorized. For purposes of this Public License, the +rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + +d. Effective Technological Measures means those measures that, in the absence +of proper authority, may not be circumvented under laws fulfilling obligations +under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, +and/or similar international agreements. + +e. Exceptions and Limitations means fair use, fair dealing, and/or any other +exception or limitation to Copyright and Similar Rights that applies to Your +use of the Licensed Material. + +f. Licensed Material means the artistic or literary work, database, or other +material to which the Licensor applied this Public License. + +g. Licensed Rights means the rights granted to You subject to the terms and +conditions of this Public License, which are limited to all Copyright and +Similar Rights that apply to Your use of the Licensed Material and that the +Licensor has authority to license. + +h. Licensor means the individual(s) or entity(ies) granting rights under this +Public License. + +i. Share means to provide material to the public by any means or process that +requires permission under the Licensed Rights, such as reproduction, public +display, public performance, distribution, dissemination, communication, or +importation, and to make material available to the public including in ways +that members of the public may access the material from a place and at a time +individually chosen by them. + +j. Sui Generis Database Rights means rights other than copyright resulting +from Directive 96/9/EC of the European Parliament and of the Council of 11 +March 1996 on the legal protection of databases, as amended and/or succeeded, +as well as other essentially equivalent rights anywhere in the world. + +k. You means the individual or entity exercising the Licensed Rights under +this Public License. Your has a corresponding meaning. + +Section 2 – Scope. + + a. License grant. + +1. Subject to the terms and conditions of this Public License, the Licensor +hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, +irrevocable license to exercise the Licensed Rights in the Licensed Material +to: + + A. reproduce and Share the Licensed Material, in whole or in part; and + + B. produce, reproduce, and Share Adapted Material. + +2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions +and Limitations apply to Your use, this Public License does not apply, and +You do not need to comply with its terms and conditions. + + 3. Term. The term of this Public License is specified in Section 6(a). + +4. Media and formats; technical modifications allowed. The Licensor authorizes +You to exercise the Licensed Rights in all media and formats whether now known +or hereafter created, and to make technical modifications necessary to do +so. The Licensor waives and/or agrees not to assert any right or authority +to forbid You from making technical modifications necessary to exercise the +Licensed Rights, including technical modifications necessary to circumvent +Effective Technological Measures. For purposes of this Public License, simply +making modifications authorized by this Section 2(a)(4) never produces Adapted +Material. + + 5. Downstream recipients. + +A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed +Material automatically receives an offer from the Licensor to exercise the +Licensed Rights under the terms and conditions of this Public License. + +B. No downstream restrictions. You may not offer or impose any additional +or different terms or conditions on, or apply any Effective Technological +Measures to, the Licensed Material if doing so restricts exercise of the Licensed +Rights by any recipient of the Licensed Material. + +6. No endorsement. Nothing in this Public License constitutes or may be construed +as permission to assert or imply that You are, or that Your use of the Licensed +Material is, connected with, or sponsored, endorsed, or granted official status +by, the Licensor or others designated to receive attribution as provided in +Section 3(a)(1)(A)(i). + + b. Other rights. + +1. Moral rights, such as the right of integrity, are not licensed under this +Public License, nor are publicity, privacy, and/or other similar personality +rights; however, to the extent possible, the Licensor waives and/or agrees +not to assert any such rights held by the Licensor to the limited extent necessary +to allow You to exercise the Licensed Rights, but not otherwise. + +2. Patent and trademark rights are not licensed under this Public License. + +3. To the extent possible, the Licensor waives any right to collect royalties +from You for the exercise of the Licensed Rights, whether directly or through +a collecting society under any voluntary or waivable statutory or compulsory +licensing scheme. In all other cases the Licensor expressly reserves any right +to collect such royalties. + +Section 3 – License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the following +conditions. + + a. Attribution. + +1. If You Share the Licensed Material (including in modified form), You must: + +A. retain the following if it is supplied by the Licensor with the Licensed +Material: + +i. identification of the creator(s) of the Licensed Material and any others +designated to receive attribution, in any reasonable manner requested by the +Licensor (including by pseudonym if designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of warranties; + +v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + +B. indicate if You modified the Licensed Material and retain an indication +of any previous modifications; and + +C. indicate the Licensed Material is licensed under this Public License, and +include the text of, or the URI or hyperlink to, this Public License. + +2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner +based on the medium, means, and context in which You Share the Licensed Material. +For example, it may be reasonable to satisfy the conditions by providing a +URI or hyperlink to a resource that includes the required information. + +3. If requested by the Licensor, You must remove any of the information required +by Section 3(a)(1)(A) to the extent reasonably practicable. + +4. If You Share Adapted Material You produce, the Adapter's License You apply +must not prevent recipients of the Adapted Material from complying with this +Public License. + +Section 4 – Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that apply to +Your use of the Licensed Material: + +a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, +reuse, reproduce, and Share all or a substantial portion of the contents of +the database; + +b. if You include all or a substantial portion of the database contents in +a database in which You have Sui Generis Database Rights, then the database +in which You have Sui Generis Database Rights (but not its individual contents) +is Adapted Material; and + +c. You must comply with the conditions in Section 3(a) if You Share all or +a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not replace +Your obligations under this Public License where the Licensed Rights include +other Copyright and Similar Rights. + +Section 5 – Disclaimer of Warranties and Limitation of Liability. + +a. Unless otherwise separately undertaken by the Licensor, to the extent possible, +the Licensor offers the Licensed Material as-is and as-available, and makes +no representations or warranties of any kind concerning the Licensed Material, +whether express, implied, statutory, or other. This includes, without limitation, +warranties of title, merchantability, fitness for a particular purpose, non-infringement, +absence of latent or other defects, accuracy, or the presence or absence of +errors, whether or not known or discoverable. Where disclaimers of warranties +are not allowed in full or in part, this disclaimer may not apply to You. + +b. To the extent possible, in no event will the Licensor be liable to You +on any legal theory (including, without limitation, negligence) or otherwise +for any direct, special, indirect, incidental, consequential, punitive, exemplary, +or other losses, costs, expenses, or damages arising out of this Public License +or use of the Licensed Material, even if the Licensor has been advised of +the possibility of such losses, costs, expenses, or damages. Where a limitation +of liability is not allowed in full or in part, this limitation may not apply +to You. + +c. The disclaimer of warranties and limitation of liability provided above +shall be interpreted in a manner that, to the extent possible, most closely +approximates an absolute disclaimer and waiver of all liability. + +Section 6 – Term and Termination. + +a. This Public License applies for the term of the Copyright and Similar Rights +licensed here. However, if You fail to comply with this Public License, then +Your rights under this Public License terminate automatically. + +b. Where Your right to use the Licensed Material has terminated under Section +6(a), it reinstates: + +1. automatically as of the date the violation is cured, provided it is cured +within 30 days of Your discovery of the violation; or + + 2. upon express reinstatement by the Licensor. + +c. For the avoidance of doubt, this Section 6(b) does not affect any right +the Licensor may have to seek remedies for Your violations of this Public +License. + +d. For the avoidance of doubt, the Licensor may also offer the Licensed Material +under separate terms or conditions or stop distributing the Licensed Material +at any time; however, doing so will not terminate this Public License. + + e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +Section 7 – Other Terms and Conditions. + +a. The Licensor shall not be bound by any additional or different terms or +conditions communicated by You unless expressly agreed. + +b. Any arrangements, understandings, or agreements regarding the Licensed +Material not stated herein are separate from and independent of the terms +and conditions of this Public License. + +Section 8 – Interpretation. + +a. For the avoidance of doubt, this Public License does not, and shall not +be interpreted to, reduce, limit, restrict, or impose conditions on any use +of the Licensed Material that could lawfully be made without permission under +this Public License. + +b. To the extent possible, if any provision of this Public License is deemed +unenforceable, it shall be automatically reformed to the minimum extent necessary +to make it enforceable. If the provision cannot be reformed, it shall be severed +from this Public License without affecting the enforceability of the remaining +terms and conditions. + +c. No term or condition of this Public License will be waived and no failure +to comply consented to unless expressly agreed to by the Licensor. + +d. Nothing in this Public License constitutes or may be interpreted as a limitation +upon, or waiver of, any privileges and immunities that apply to the Licensor +or You, including from the legal processes of any jurisdiction or authority. + +Creative Commons is not a party to its public licenses. Notwithstanding, Creative +Commons may elect to apply one of its public licenses to material it publishes +and in those instances will be considered the "Licensor." The text of the +Creative Commons public licenses is dedicated to the public domain under the +CC0 Public Domain Dedication. Except for the limited purpose of indicating +that material is shared under a Creative Commons public license or as otherwise +permitted by the Creative Commons policies published at creativecommons.org/policies, +Creative Commons does not authorize the use of the trademark "Creative Commons" +or any other trademark or logo of Creative Commons without its prior written +consent including, without limitation, in connection with any unauthorized +modifications to any of its public licenses or any other arrangements, understandings, +or agreements concerning use of licensed material. For the avoidance of doubt, +this paragraph does not form part of the public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/MIT.txt b/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/MIT.txt new file mode 100644 index 0000000000..204b93da48 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/MIT.txt @@ -0,0 +1,19 @@ +MIT License Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/Unlicense.txt b/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/Unlicense.txt new file mode 100644 index 0000000000..24a8f90199 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/Unlicense.txt @@ -0,0 +1,20 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or distribute +this software, either in source code form or as a compiled binary, for any +purpose, commercial or non-commercial, and by any means. + +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and +to the detriment of our heirs and successors. We intend this dedication to +be an overt act of relinquishment in perpetuity of all present and future +rights to this software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH +THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, +please refer to diff --git a/frozen/Adafruit_CircuitPython_SSD1680/README.rst b/frozen/Adafruit_CircuitPython_SSD1680/README.rst new file mode 100644 index 0000000000..0ff9a3382d --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/README.rst @@ -0,0 +1,138 @@ +Introduction +============ + +.. image:: https://readthedocs.org/projects/adafruit-circuitpython-ssd1680/badge/?version=latest + :target: https://docs.circuitpython.org/projects/ssd1680/en/latest/ + :alt: Documentation Status + + +.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg + :target: https://adafru.it/discord + :alt: Discord + + +.. image:: https://github.com/adafruit/Adafruit_CircuitPython_SSD1680/workflows/Build%20CI/badge.svg + :target: https://github.com/adafruit/Adafruit_CircuitPython_SSD1680/actions + :alt: Build Status + + +.. image:: https://img.shields.io/badge/code%20style-black-000000.svg + :target: https://github.com/psf/black + :alt: Code Style: Black + +CircuitPython `displayio` driver for SSD1680-based ePaper displays + +Dependencies +============= +This driver depends on: + +* `Adafruit CircuitPython `_ + +Please ensure all dependencies are available on the CircuitPython filesystem. +This is easily achieved by downloading +`the Adafruit library and driver bundle `_ +or individual libraries can be installed using +`circup `_. + +* Adafruit 2.13" 250x122 Tri-Color eInk / ePaper Display with SRAM - SSD1680 Driver + +`Purchase the Breakout from the Adafruit shop `_ + +* Adafruit 2.13" HD Tri-Color eInk / ePaper Display FeatherWing - 250x122 RW Panel with SSD1680 + +`Purchase the FeatherWing from the Adafruit shop `_ + +Installing from PyPI +===================== + +On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from +PyPI `_. To install for current user: + +.. code-block:: shell + + pip3 install adafruit-circuitpython-ssd1680 + +To install system-wide (this may be required in some cases): + +.. code-block:: shell + + sudo pip3 install adafruit-circuitpython-ssd1680 + +To install in a virtual environment in your current project: + +.. code-block:: shell + + mkdir project-name && cd project-name + python3 -m venv .venv + source .venv/bin/activate + pip3 install adafruit-circuitpython-ssd1680 + +Usage Example +============= + +.. code-block:: python + + import time + import board + import displayio + import adafruit_ssd1680 + + displayio.release_displays() + + # This pinout works on a Metro M4 and may need to be altered for other boards. + spi = board.SPI() # Uses SCK and MOSI + epd_cs = board.D9 + epd_dc = board.D10 + epd_reset = board.D8 # Set to None for FeatherWing + epd_busy = board.D7 # Set to None for FeatherWing + + display_bus = displayio.FourWire( + spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000 + ) + time.sleep(1) + + display = adafruit_ssd1680.SSD1680( + display_bus, + width=250, + height=122, + busy_pin=epd_busy, + highlight_color=0xFF0000, + rotation=270, + ) + + g = displayio.Group() + + # CircuitPython 6 & 7 compatible + f = open("/display-ruler.bmp", "rb") + pic = displayio.OnDiskBitmap(f) + t = displayio.TileGrid( + pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter()) + ) + + # # CircuitPython 7 compatible only + # pic = displayio.OnDiskBitmap("/display-ruler.bmp") + # t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) + + g.append(t) + + display.show(g) + + display.refresh() + print("refreshed") + + time.sleep(120) + + +Documentation +============= + +API documentation for this library can be found on `Read the Docs `_. + +For information on building library documentation, please check out `this guide `_. + +Contributing +============ + +Contributions are welcome! Please read our `Code of Conduct +`_ +before contributing to help this project stay welcoming. diff --git a/frozen/Adafruit_CircuitPython_SSD1680/README.rst.license b/frozen/Adafruit_CircuitPython_SSD1680/README.rst.license new file mode 100644 index 0000000000..87eb036957 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/README.rst.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries +SPDX-License-Identifier: MIT diff --git a/frozen/Adafruit_CircuitPython_SSD1680/adafruit_ssd1680.py b/frozen/Adafruit_CircuitPython_SSD1680/adafruit_ssd1680.py new file mode 100644 index 0000000000..490725fed6 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/adafruit_ssd1680.py @@ -0,0 +1,100 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries +# +# SPDX-License-Identifier: MIT +""" +`adafruit_ssd1680` +================================================================================ + +CircuitPython `displayio` driver for SSD1680-based ePaper displays + + +* Author(s): Melissa LeBlanc-Williams + +Implementation Notes +-------------------- + +**Hardware:** + +* `Adafruit 2.13" Tri-Color eInk Display Breakout `_ +* `Adafruit 2.13" Tri-Color eInk Display FeatherWing `_ + + +**Software and Dependencies:** + +* Adafruit CircuitPython firmware for the supported boards: + https://github.com/adafruit/circuitpython/releases + +""" + +import displayio + +__version__ = "0.0.0+auto.0" +__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_SSD1680.git" + +_START_SEQUENCE = ( + b"\x12\x80\x14" # soft reset and wait 20ms + b"\x11\x01\x03" # Ram data entry mode + b"\x3C\x01\x05" # border color + b"\x2c\x01\x36" # Set vcom voltage + b"\x03\x01\x17" # Set gate voltage + b"\x04\x03\x41\x00\x32" # Set source voltage + b"\x4e\x01\x01" # ram x count + b"\x4f\x02\x00\x00" # ram y count + b"\x01\x03\x00\x00\x00" # set display size + b"\x22\x01\xf4" # display update mode +) + +_STOP_SEQUENCE = b"\x10\x81\x01\x64" # Deep Sleep +# pylint: disable=too-few-public-methods +class SSD1680(displayio.EPaperDisplay): + r"""SSD1680 driver + + :param bus: The data bus the display is on + :param \**kwargs: + See below + + :Keyword Arguments: + * *width* (``int``) -- + Display width + * *height* (``int``) -- + Display height + * *rotation* (``int``) -- + Display rotation + """ + + def __init__(self, bus: displayio.Fourwire, **kwargs) -> None: + stop_sequence = bytearray(_STOP_SEQUENCE) + try: + bus.reset() + except RuntimeError: + # No reset pin defined, so no deep sleeping + stop_sequence = b"" + + start_sequence = bytearray(_START_SEQUENCE) + width = kwargs["width"] + height = kwargs["height"] + if "rotation" in kwargs and kwargs["rotation"] % 180 != 90: + width, height = height, width + start_sequence[29] = (width - 1) & 0xFF + start_sequence[30] = ((width - 1) >> 8) & 0xFF + + super().__init__( + bus, + start_sequence, + stop_sequence, + **kwargs, + ram_width=250, + ram_height=296, + busy_state=True, + write_black_ram_command=0x24, + write_color_ram_command=0x26, + black_bits_inverted=False, + set_column_window_command=0x44, + set_row_window_command=0x45, + set_current_column_command=0x4E, + set_current_row_command=0x4F, + refresh_display_command=0x20, + colstart=1, + always_toggle_chip_select=True, + ) diff --git a/frozen/Adafruit_CircuitPython_SSD1680/docs/_static/favicon.ico b/frozen/Adafruit_CircuitPython_SSD1680/docs/_static/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..5aca98376a1f7e593ebd9cf41a808512c2135635 GIT binary patch literal 4414 zcmd^BX;4#F6n=SG-XmlONeGrD5E6J{RVh+e928U#MG!$jWvO+UsvWh`x&VqGNx*en zx=qox7Dqv{kPwo%fZC$dDwVpRtz{HzTkSs8QhG0)%Y=-3@Kt!4ag|JcIo?$-F|?bXVS9UDUyev>MVZQ(H8K4#;BQW-t2CPorj8^KJrMX}QK zp+e<;4ldpXz~=)2GxNy811&)gt-}Q*yVQpsxr@VMoA##{)$1~=bZ1MmjeFw?uT(`8 z^g=09<=zW%r%buwN%iHtuKSg|+r7HkT0PYN*_u9k1;^Ss-Z!RBfJ?Un4w(awqp2b3 z%+myoFis_lTlCrGx2z$0BQdh+7?!JK#9K9@Z!VrG zNj6gK5r(b4?YDOLw|DPRoN7bdP{(>GEG41YcN~4r_SUHU2hgVtUwZG@s%edC;k7Sn zC)RvEnlq~raE2mY2ko64^m1KQL}3riixh?#J{o)IT+K-RdHae2eRX91-+g!y`8^># z-zI0ir>P%Xon)!@xp-BK2bDYUB9k613NRrY6%lVjbFcQc*pRqiK~8xtkNPLxt}e?&QsTB}^!39t_%Qb)~Ukn0O%iC;zt z<&A-y;3h++)>c1br`5VFM~5(83!HKx$L+my8sW_c#@x*|*vB1yU)_dt3vH;2hqPWx zAl^6@?ipx&U7pf`a*>Yq6C85nb+B=Fnn+(id$W#WB^uHAcZVG`qg;rWB}ubvi(Y>D z$ei>REw$#xp0SHAd^|1hq&9HJ=jKK8^zTH~nk)G?yUcmTh9vUM6Y0LMw4(gYVY$D$ zGl&WY&H<)BbJ&3sYbKjx1j^=3-0Q#f^}(aP1?8^`&FUWMp|rmtpK)bLQ1Zo?^s4jqK=Lfg*9&geMGVQ z#^-*!V`fG@;H&{M9S8%+;|h&Qrxym0Ar>WT4BCVLR8cGXF=JmEYN(sNT(9vl+S|%g z8r7nXQ(95i^`=+XHo|){$vf2$?=`F$^&wFlYXyXg$B{a>$-Fp+V}+D;9k=~Xl~?C4 zAB-;RKXdUzBJE{V&d&%R>aEfFe;vxqI$0@hwVM}gFeQR@j}a>DDxR+n+-*6|_)k%% z*mSpDV|=5I9!&VC&9tD%fcVygWZV!iIo2qFtm#!*(s|@ZT33*Ad;+<|3^+yrp*;oH zBSYLV(H1zTU?2WjrCQoQW)Z>J2a=dTriuvezBmu16`tM2fm7Q@d4^iqII-xFpwHGI zn9CL}QE*1vdj2PX{PIuqOe5dracsciH6OlAZATvE8rj6ykqdIjal2 z0S0S~PwHb-5?OQ-tU-^KTG@XNrEVSvo|HIP?H;7ZhYeZkhSqh-{reE!5di;1zk$#Y zCe7rOnlzFYJ6Z#Hm$GoidKB=2HBCwm`BbZVeZY4ukmG%1uz7p2URs6c9j-Gjj^oQV zsdDb3@k2e`C$1I5ML5U0Qs0C1GAp^?!*`=|Nm(vWz3j*j*8ucum2;r0^-6Aca=Gv) zc%}&;!+_*S2tlnnJnz0EKeRmw-Y!@9ob!XQBwiv}^u9MkaXHvM=!<3YX;+2#5Cj5pp?FEK750S3BgeSDtaE^ zXUM@xoV6yBFKfzvY20V&Lr0yC + Adafruit 2.13" HD Tri-Color eInk / ePaper Display FeatherWing + +.. toctree:: + :caption: Other Links + + Download from GitHub + Download Library Bundle + CircuitPython Reference Documentation + CircuitPython Support Forum + Discord Chat + Adafruit Learning System + Adafruit Blog + Adafruit Store + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/frozen/Adafruit_CircuitPython_SSD1680/docs/index.rst.license b/frozen/Adafruit_CircuitPython_SSD1680/docs/index.rst.license new file mode 100644 index 0000000000..52de478909 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/docs/index.rst.license @@ -0,0 +1,4 @@ +SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries + +SPDX-License-Identifier: MIT diff --git a/frozen/Adafruit_CircuitPython_SSD1680/docs/requirements.txt b/frozen/Adafruit_CircuitPython_SSD1680/docs/requirements.txt new file mode 100644 index 0000000000..88e67331eb --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/docs/requirements.txt @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + +sphinx>=4.0.0 diff --git a/frozen/Adafruit_CircuitPython_SSD1680/examples/display-ruler.bmp b/frozen/Adafruit_CircuitPython_SSD1680/examples/display-ruler.bmp new file mode 100644 index 0000000000000000000000000000000000000000..726b5e026fd30b7e5baf5c23323d159b0eb5f65d GIT binary patch literal 360122 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 T`pMSbh(J1r2r{u6#p?e9C4JK7 literal 0 HcmV?d00001 diff --git a/frozen/Adafruit_CircuitPython_SSD1680/examples/display-ruler.bmp.license b/frozen/Adafruit_CircuitPython_SSD1680/examples/display-ruler.bmp.license new file mode 100644 index 0000000000..a784acfa32 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/examples/display-ruler.bmp.license @@ -0,0 +1,2 @@ +# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries +# SPDX-License-Identifier: MIT diff --git a/frozen/Adafruit_CircuitPython_SSD1680/examples/ssd1680_simpletest.py b/frozen/Adafruit_CircuitPython_SSD1680/examples/ssd1680_simpletest.py new file mode 100644 index 0000000000..48a4d4d8bd --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/examples/ssd1680_simpletest.py @@ -0,0 +1,60 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + +"""Simple test script for 2.13" 250x122 tri-color display. +Supported products: + * Adafruit 2.13" Tri-Color eInk Display Breakout + * https://www.adafruit.com/product/4947 + * Adafruit 2.13" Tri-Color eInk Display FeatherWing + * https://www.adafruit.com/product/4814 +""" + +import time +import board +import displayio +import adafruit_ssd1680 + +displayio.release_displays() + +# This pinout works on a Metro M4 and may need to be altered for other boards. +spi = board.SPI() # Uses SCK and MOSI +epd_cs = board.D9 +epd_dc = board.D10 +epd_reset = board.D8 # Set to None for FeatherWing +epd_busy = board.D7 # Set to None for FeatherWing + +display_bus = displayio.FourWire( + spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000 +) +time.sleep(1) + +display = adafruit_ssd1680.SSD1680( + display_bus, + width=250, + height=122, + busy_pin=epd_busy, + highlight_color=0xFF0000, + rotation=270, +) + +g = displayio.Group() + +with open("/display-ruler.bmp", "rb") as f: + pic = displayio.OnDiskBitmap(f) + # CircuitPython 6 & 7 compatible + t = displayio.TileGrid( + pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter()) + ) + # CircuitPython 7 compatible only + # t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) + g.append(t) + + display.show(g) + + display.refresh() + + print("refreshed") + + time.sleep(120) diff --git a/frozen/Adafruit_CircuitPython_SSD1680/optional_requirements.txt b/frozen/Adafruit_CircuitPython_SSD1680/optional_requirements.txt new file mode 100644 index 0000000000..d4e27c4d74 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/optional_requirements.txt @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2022 Alec Delaney, for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense diff --git a/frozen/Adafruit_CircuitPython_SSD1680/pyproject.toml b/frozen/Adafruit_CircuitPython_SSD1680/pyproject.toml new file mode 100644 index 0000000000..b36b2d7afb --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/pyproject.toml @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: 2022 Alec Delaney for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +[build-system] +requires = [ + "setuptools", + "wheel", + "setuptools-scm", +] + +[project] +name = "adafruit-circuitpython-ssd1680" +description = "CircuitPython `displayio` drivers for SSD1680-based ePaper displays" +version = "0.0.0+auto.0" +readme = "README.rst" +authors = [ + {name = "Adafruit Industries", email = "circuitpython@adafruit.com"} +] +urls = {Homepage = "https://github.com/adafruit/Adafruit_CircuitPython_SSD1680"} +keywords = [ + "adafruit", + "blinka", + "circuitpython", + "micropython", + "ssd1680", + "displayio", + "epd", + "epaper", +] +license = {text = "MIT"} +classifiers = [ + "Intended Audience :: Developers", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Embedded Systems", + "Topic :: System :: Hardware", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", +] +dynamic = ["dependencies", "optional-dependencies"] + +[tool.setuptools] +py-modules = ["adafruit_ssd1680"] + +[tool.setuptools.dynamic] +dependencies = {file = ["requirements.txt"]} +optional-dependencies = {optional = {file = ["optional_requirements.txt"]}} diff --git a/frozen/Adafruit_CircuitPython_SSD1680/requirements.txt b/frozen/Adafruit_CircuitPython_SSD1680/requirements.txt new file mode 100644 index 0000000000..7a984a4739 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680/requirements.txt @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2022 Alec Delaney, for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + +Adafruit-Blinka diff --git a/frozen/Adafruit_CircuitPython_UC8151D/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md b/frozen/Adafruit_CircuitPython_UC8151D/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md new file mode 100644 index 0000000000..8de294e68a --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md @@ -0,0 +1,13 @@ +# SPDX-FileCopyrightText: 2021 Adafruit Industries +# +# SPDX-License-Identifier: MIT + +Thank you for contributing! Before you submit a pull request, please read the following. + +Make sure any changes you're submitting are in line with the CircuitPython Design Guide, available here: https://docs.circuitpython.org/en/latest/docs/design_guide.html + +If your changes are to documentation, please verify that the documentation builds locally by following the steps found here: https://adafru.it/build-docs + +Before submitting the pull request, make sure you've run Pylint and Black locally on your code. You can do this manually or using pre-commit. Instructions are available here: https://adafru.it/check-your-code + +Please remove all of this text before submitting. Include an explanation or list of changes included in your PR, as well as, if applicable, a link to any related issues. diff --git a/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/build.yml b/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/build.yml new file mode 100644 index 0000000000..cb2f60e36a --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/build.yml @@ -0,0 +1,77 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +name: Build CI + +on: [pull_request, push] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Translate Repo Name For Build Tools filename_prefix + id: repo-name + run: | + echo ::set-output name=repo-name::$( + echo ${{ github.repository }} | + awk -F '\/' '{ print tolower($2) }' | + tr '_' '-' + ) + - name: Set up Python 3.x + uses: actions/setup-python@v2 + with: + python-version: "3.x" + - name: Versions + run: | + python3 --version + - name: Checkout Current Repo + uses: actions/checkout@v1 + with: + submodules: true + - name: Checkout tools repo + uses: actions/checkout@v2 + with: + repository: adafruit/actions-ci-circuitpython-libs + path: actions-ci + - name: Install dependencies + # (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.) + run: | + source actions-ci/install.sh + - name: Pip install Sphinx, pre-commit + run: | + pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit + - name: Library version + run: git describe --dirty --always --tags + - name: Setup problem matchers + uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1 + - name: Pre-commit hooks + run: | + pre-commit run --all-files + - name: Build assets + run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . + - name: Archive bundles + uses: actions/upload-artifact@v2 + with: + name: bundles + path: ${{ github.workspace }}/bundles/ + - name: Build docs + working-directory: docs + run: sphinx-build -E -W -b html . _build/html + - name: Check For pyproject.toml + id: need-pypi + run: | + echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' ) + - name: Build Python package + if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') + run: | + pip install --upgrade build twine + for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do + sed -i -e "s/0.0.0+auto.0/1.2.3/" $file; + done; + python -m build + twine check dist/* diff --git a/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/failure-help-text.yml b/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/failure-help-text.yml new file mode 100644 index 0000000000..0b1194f0cd --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/failure-help-text.yml @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2021 Scott Shawcroft for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +name: Failure help text + +on: + workflow_run: + workflows: ["Build CI"] + types: + - completed + +jobs: + post-help: + runs-on: ubuntu-latest + if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event == 'pull_request' }} + steps: + - name: Post comment to help + uses: adafruit/circuitpython-action-library-ci-failed@v1 diff --git a/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/release.yml b/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/release.yml new file mode 100644 index 0000000000..f3a0325ba3 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/release.yml @@ -0,0 +1,88 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +name: Release Actions + +on: + release: + types: [published] + +jobs: + upload-release-assets: + runs-on: ubuntu-latest + steps: + - name: Dump GitHub context + env: + GITHUB_CONTEXT: ${{ toJson(github) }} + run: echo "$GITHUB_CONTEXT" + - name: Translate Repo Name For Build Tools filename_prefix + id: repo-name + run: | + echo ::set-output name=repo-name::$( + echo ${{ github.repository }} | + awk -F '\/' '{ print tolower($2) }' | + tr '_' '-' + ) + - name: Set up Python 3.x + uses: actions/setup-python@v2 + with: + python-version: "3.x" + - name: Versions + run: | + python3 --version + - name: Checkout Current Repo + uses: actions/checkout@v1 + with: + submodules: true + - name: Checkout tools repo + uses: actions/checkout@v2 + with: + repository: adafruit/actions-ci-circuitpython-libs + path: actions-ci + - name: Install deps + run: | + source actions-ci/install.sh + - name: Build assets + run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . + - name: Upload Release Assets + # the 'official' actions version does not yet support dynamically + # supplying asset names to upload. @csexton's version chosen based on + # discussion in the issue below, as its the simplest to implement and + # allows for selecting files with a pattern. + # https://github.com/actions/upload-release-asset/issues/4 + #uses: actions/upload-release-asset@v1.0.1 + uses: csexton/release-asset-action@master + with: + pattern: "bundles/*" + github-token: ${{ secrets.GITHUB_TOKEN }} + + upload-pypi: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v1 + - name: Check For pyproject.toml + id: need-pypi + run: | + echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' ) + - name: Set up Python + if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') + uses: actions/setup-python@v2 + with: + python-version: '3.x' + - name: Install dependencies + if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') + run: | + python -m pip install --upgrade pip + pip install --upgrade build twine + - name: Build and publish + if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') + env: + TWINE_USERNAME: ${{ secrets.pypi_username }} + TWINE_PASSWORD: ${{ secrets.pypi_password }} + run: | + for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do + sed -i -e "s/0.0.0+auto.0/${{github.event.release.tag_name}}/" $file; + done; + python -m build + twine upload dist/* diff --git a/frozen/Adafruit_CircuitPython_UC8151D/.gitignore b/frozen/Adafruit_CircuitPython_UC8151D/.gitignore new file mode 100644 index 0000000000..544ec4a695 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/.gitignore @@ -0,0 +1,47 @@ +# SPDX-FileCopyrightText: 2022 Kattni Rembor, written for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +# Do not include files and directories created by your personal work environment, such as the IDE +# you use, except for those already listed here. Pull requests including changes to this file will +# not be accepted. + +# This .gitignore file contains rules for files generated by working with CircuitPython libraries, +# including building Sphinx, testing with pip, and creating a virual environment, as well as the +# MacOS and IDE-specific files generated by using MacOS in general, or the PyCharm or VSCode IDEs. + +# If you find that there are files being generated on your machine that should not be included in +# your git commit, you should create a .gitignore_global file on your computer to include the +# files created by your personal setup. To do so, follow the two steps below. + +# First, create a file called .gitignore_global somewhere convenient for you, and add rules for +# the files you want to exclude from git commits. + +# Second, configure Git to use the exclude file for all Git repositories by running the +# following via commandline, replacing "path/to/your/" with the actual path to your newly created +# .gitignore_global file: +# git config --global core.excludesfile path/to/your/.gitignore_global + +# CircuitPython-specific files +*.mpy + +# Python-specific files +__pycache__ +*.pyc + +# Sphinx build-specific files +_build + +# This file results from running `pip -e install .` in a local repository +*.egg-info + +# Virtual environment-specific files +.env + +# MacOS-specific files +*.DS_Store + +# IDE-specific files +.idea +.vscode +*~ diff --git a/frozen/Adafruit_CircuitPython_UC8151D/.pre-commit-config.yaml b/frozen/Adafruit_CircuitPython_UC8151D/.pre-commit-config.yaml new file mode 100644 index 0000000000..3343606412 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/.pre-commit-config.yaml @@ -0,0 +1,42 @@ +# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò +# +# SPDX-License-Identifier: Unlicense + +repos: + - repo: https://github.com/python/black + rev: 22.3.0 + hooks: + - id: black + - repo: https://github.com/fsfe/reuse-tool + rev: v0.14.0 + hooks: + - id: reuse + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.2.0 + hooks: + - id: check-yaml + - id: end-of-file-fixer + - id: trailing-whitespace + - repo: https://github.com/pycqa/pylint + rev: v2.11.1 + hooks: + - id: pylint + name: pylint (library code) + types: [python] + args: + - --disable=consider-using-f-string + exclude: "^(docs/|examples/|tests/|setup.py$)" + - id: pylint + name: pylint (example code) + description: Run pylint rules on "examples/*.py" files + types: [python] + files: "^examples/" + args: + - --disable=missing-docstring,invalid-name,consider-using-f-string,duplicate-code + - id: pylint + name: pylint (test code) + description: Run pylint rules on "tests/*.py" files + types: [python] + files: "^tests/" + args: + - --disable=missing-docstring,consider-using-f-string,duplicate-code diff --git a/frozen/Adafruit_CircuitPython_UC8151D/.pylintrc b/frozen/Adafruit_CircuitPython_UC8151D/.pylintrc new file mode 100644 index 0000000000..1f42e5de32 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/.pylintrc @@ -0,0 +1,436 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + +[MASTER] + +# A comma-separated list of package or module names from where C extensions may +# be loaded. Extensions are loading into the active Python interpreter and may +# run arbitrary code +extension-pkg-whitelist= + +# Add files or directories to the ignore-list. They should be base names, not +# paths. +ignore=CVS + +# Add files or directories matching the regex patterns to the ignore-list. The +# regex matches against base names, not paths. +ignore-patterns= + +# Python code to execute, usually for sys.path manipulation such as +# pygtk.require(). +#init-hook= + +# Use multiple processes to speed up Pylint. +jobs=1 + +# List of plugins (as comma separated values of python modules names) to load, +# usually to register additional checkers. +load-plugins= + +# Pickle collected data for later comparisons. +persistent=yes + +# Specify a configuration file. +#rcfile= + +# Allow loading of arbitrary C extensions. Extensions are imported into the +# active Python interpreter and may run arbitrary code. +unsafe-load-any-extension=no + + +[MESSAGES CONTROL] + +# Only show warnings with the listed confidence levels. Leave empty to show +# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED +confidence= + +# Disable the message, report, category or checker with the given id(s). You +# can either give multiple identifiers separated by comma (,) or put this +# option multiple times (only on the command line, not in the configuration +# file where it should appear only once).You can also use "--disable=all" to +# disable everything first and then reenable specific checks. For example, if +# you want to run only the similarities checker, you can use "--disable=all +# --enable=similarities". If you want to run only the classes checker, but have +# no Warning level messages displayed, use"--disable=all --enable=classes +# --disable=W" +# disable=import-error,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call +disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error,bad-continuation,pointless-string-statement,unspecified-encoding + +# Enable the message, report, category or checker with the given id(s). You can +# either give multiple identifier separated by comma (,) or put this option +# multiple time (only on the command line, not in the configuration file where +# it should appear only once). See also the "--disable" option for examples. +enable= + + +[REPORTS] + +# Python expression which should return a note less than 10 (10 is the highest +# note). You have access to the variables errors warning, statement which +# respectively contain the number of errors / warnings messages and the total +# number of statements analyzed. This is used by the global evaluation report +# (RP0004). +evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) + +# Template used to display messages. This is a python new-style format string +# used to format the message information. See doc for all details +#msg-template= + +# Set the output format. Available formats are text, parseable, colorized, json +# and msvs (visual studio).You can also give a reporter class, eg +# mypackage.mymodule.MyReporterClass. +output-format=text + +# Tells whether to display a full report or only the messages +reports=no + +# Activate the evaluation score. +score=yes + + +[REFACTORING] + +# Maximum number of nested blocks for function / method body +max-nested-blocks=5 + + +[LOGGING] + +# Logging modules to check that the string format arguments are in logging +# function parameter format +logging-modules=logging + + +[SPELLING] + +# Spelling dictionary name. Available dictionaries: none. To make it working +# install python-enchant package. +spelling-dict= + +# List of comma separated words that should not be checked. +spelling-ignore-words= + +# A path to a file that contains private dictionary; one word per line. +spelling-private-dict-file= + +# Tells whether to store unknown words to indicated private dictionary in +# --spelling-private-dict-file option instead of raising a message. +spelling-store-unknown-words=no + + +[MISCELLANEOUS] + +# List of note tags to take in consideration, separated by a comma. +# notes=FIXME,XXX,TODO +notes=FIXME,XXX + + +[TYPECHECK] + +# List of decorators that produce context managers, such as +# contextlib.contextmanager. Add to this list to register other decorators that +# produce valid context managers. +contextmanager-decorators=contextlib.contextmanager + +# List of members which are set dynamically and missed by pylint inference +# system, and so shouldn't trigger E1101 when accessed. Python regular +# expressions are accepted. +generated-members= + +# Tells whether missing members accessed in mixin class should be ignored. A +# mixin class is detected if its name ends with "mixin" (case insensitive). +ignore-mixin-members=yes + +# This flag controls whether pylint should warn about no-member and similar +# checks whenever an opaque object is returned when inferring. The inference +# can return multiple potential results while evaluating a Python object, but +# some branches might not be evaluated, which results in partial inference. In +# that case, it might be useful to still emit no-member and other checks for +# the rest of the inferred objects. +ignore-on-opaque-inference=yes + +# List of class names for which member attributes should not be checked (useful +# for classes with dynamically set attributes). This supports the use of +# qualified names. +ignored-classes=optparse.Values,thread._local,_thread._local + +# List of module names for which member attributes should not be checked +# (useful for modules/projects where namespaces are manipulated during runtime +# and thus existing member attributes cannot be deduced by static analysis. It +# supports qualified module names, as well as Unix pattern matching. +ignored-modules=board + +# Show a hint with possible names when a member name was not found. The aspect +# of finding the hint is based on edit distance. +missing-member-hint=yes + +# The minimum edit distance a name should have in order to be considered a +# similar match for a missing member name. +missing-member-hint-distance=1 + +# The total number of similar names that should be taken in consideration when +# showing a hint for a missing member. +missing-member-max-choices=1 + + +[VARIABLES] + +# List of additional names supposed to be defined in builtins. Remember that +# you should avoid to define new builtins when possible. +additional-builtins= + +# Tells whether unused global variables should be treated as a violation. +allow-global-unused-variables=yes + +# List of strings which can identify a callback function by name. A callback +# name must start or end with one of those strings. +callbacks=cb_,_cb + +# A regular expression matching the name of dummy variables (i.e. expectedly +# not used). +dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ + +# Argument names that match this expression will be ignored. Default to name +# with leading underscore +ignored-argument-names=_.*|^ignored_|^unused_ + +# Tells whether we should check for unused import in __init__ files. +init-import=no + +# List of qualified module names which can have objects that can redefine +# builtins. +redefining-builtins-modules=six.moves,future.builtins + + +[FORMAT] + +# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. +# expected-line-ending-format= +expected-line-ending-format=LF + +# Regexp for a line that is allowed to be longer than the limit. +ignore-long-lines=^\s*(# )??$ + +# Number of spaces of indent required inside a hanging or continued line. +indent-after-paren=4 + +# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 +# tab). +indent-string=' ' + +# Maximum number of characters on a single line. +max-line-length=100 + +# Maximum number of lines in a module +max-module-lines=1000 + +# List of optional constructs for which whitespace checking is disabled. `dict- +# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. +# `trailing-comma` allows a space between comma and closing bracket: (a, ). +# `empty-line` allows space-only lines. +no-space-check=trailing-comma,dict-separator + +# Allow the body of a class to be on the same line as the declaration if body +# contains single statement. +single-line-class-stmt=no + +# Allow the body of an if to be on the same line as the test if there is no +# else. +single-line-if-stmt=no + + +[SIMILARITIES] + +# Ignore comments when computing similarities. +ignore-comments=yes + +# Ignore docstrings when computing similarities. +ignore-docstrings=yes + +# Ignore imports when computing similarities. +ignore-imports=yes + +# Minimum lines number of a similarity. +min-similarity-lines=12 + + +[BASIC] + +# Naming hint for argument names +argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct argument names +argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Naming hint for attribute names +attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct attribute names +attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Bad variable names which should always be refused, separated by a comma +bad-names=foo,bar,baz,toto,tutu,tata + +# Naming hint for class attribute names +class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ + +# Regular expression matching correct class attribute names +class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ + +# Naming hint for class names +# class-name-hint=[A-Z_][a-zA-Z0-9]+$ +class-name-hint=[A-Z_][a-zA-Z0-9_]+$ + +# Regular expression matching correct class names +# class-rgx=[A-Z_][a-zA-Z0-9]+$ +class-rgx=[A-Z_][a-zA-Z0-9_]+$ + +# Naming hint for constant names +const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$ + +# Regular expression matching correct constant names +const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ + +# Minimum line length for functions/classes that require docstrings, shorter +# ones are exempt. +docstring-min-length=-1 + +# Naming hint for function names +function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct function names +function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Good variable names which should always be accepted, separated by a comma +# good-names=i,j,k,ex,Run,_ +good-names=r,g,b,w,i,j,k,n,x,y,z,ex,ok,Run,_ + +# Include a hint for the correct naming format with invalid-name +include-naming-hint=no + +# Naming hint for inline iteration names +inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$ + +# Regular expression matching correct inline iteration names +inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ + +# Naming hint for method names +method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct method names +method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Naming hint for module names +module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ + +# Regular expression matching correct module names +module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ + +# Colon-delimited sets of names that determine each other's naming style when +# the name regexes allow several styles. +name-group= + +# Regular expression which should only match function or class names that do +# not require a docstring. +no-docstring-rgx=^_ + +# List of decorators that produce properties, such as abc.abstractproperty. Add +# to this list to register other decorators that produce valid properties. +property-classes=abc.abstractproperty + +# Naming hint for variable names +variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + +# Regular expression matching correct variable names +variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ + + +[IMPORTS] + +# Allow wildcard imports from modules that define __all__. +allow-wildcard-with-all=no + +# Analyse import fallback blocks. This can be used to support both Python 2 and +# 3 compatible code, which means that the block might have code that exists +# only in one or another interpreter, leading to false positives when analysed. +analyse-fallback-blocks=no + +# Deprecated modules which should not be used, separated by a comma +deprecated-modules=optparse,tkinter.tix + +# Create a graph of external dependencies in the given file (report RP0402 must +# not be disabled) +ext-import-graph= + +# Create a graph of every (i.e. internal and external) dependencies in the +# given file (report RP0402 must not be disabled) +import-graph= + +# Create a graph of internal dependencies in the given file (report RP0402 must +# not be disabled) +int-import-graph= + +# Force import order to recognize a module as part of the standard +# compatibility libraries. +known-standard-library= + +# Force import order to recognize a module as part of a third party library. +known-third-party=enchant + + +[CLASSES] + +# List of method names used to declare (i.e. assign) instance attributes. +defining-attr-methods=__init__,__new__,setUp + +# List of member names, which should be excluded from the protected access +# warning. +exclude-protected=_asdict,_fields,_replace,_source,_make + +# List of valid names for the first argument in a class method. +valid-classmethod-first-arg=cls + +# List of valid names for the first argument in a metaclass class method. +valid-metaclass-classmethod-first-arg=mcs + + +[DESIGN] + +# Maximum number of arguments for function / method +max-args=5 + +# Maximum number of attributes for a class (see R0902). +# max-attributes=7 +max-attributes=11 + +# Maximum number of boolean expressions in a if statement +max-bool-expr=5 + +# Maximum number of branch for function / method body +max-branches=12 + +# Maximum number of locals for function / method body +max-locals=15 + +# Maximum number of parents for a class (see R0901). +max-parents=7 + +# Maximum number of public methods for a class (see R0904). +max-public-methods=20 + +# Maximum number of return / yield for function / method body +max-returns=6 + +# Maximum number of statements in function / method body +max-statements=50 + +# Minimum number of public methods for a class (see R0903). +min-public-methods=1 + + +[EXCEPTIONS] + +# Exceptions that will emit a warning when being caught. Defaults to +# "Exception" +overgeneral-exceptions=Exception diff --git a/frozen/Adafruit_CircuitPython_UC8151D/.readthedocs.yaml b/frozen/Adafruit_CircuitPython_UC8151D/.readthedocs.yaml new file mode 100644 index 0000000000..33c2a6108e --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/.readthedocs.yaml @@ -0,0 +1,19 @@ +# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + +# Read the Docs configuration file +# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details + +# Required +version: 2 + +build: + os: ubuntu-20.04 + tools: + python: "3" + +python: + install: + - requirements: docs/requirements.txt + - requirements: requirements.txt diff --git a/frozen/Adafruit_CircuitPython_UC8151D/CODE_OF_CONDUCT.md b/frozen/Adafruit_CircuitPython_UC8151D/CODE_OF_CONDUCT.md new file mode 100644 index 0000000000..01a7515796 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/CODE_OF_CONDUCT.md @@ -0,0 +1,141 @@ + +# Adafruit Community Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and leaders pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level or type of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +We are committed to providing a friendly, safe and welcoming environment for +all. + +Examples of behavior that contributes to creating a positive environment +include: + +* Be kind and courteous to others +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Collaborating with other community members +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and sexual attention or advances +* The use of inappropriate images, including in a community member's avatar +* The use of inappropriate language, including in a community member's nickname +* Any spamming, flaming, baiting or other attention-stealing behavior +* Excessive or unwelcome helping; answering outside the scope of the question + asked +* Discussion or promotion of activities or projects that intend or pose a risk of + significant harm +* Trolling, insulting/derogatory comments, and personal or political attacks +* Promoting or spreading disinformation, lies, or conspiracy theories against + a person, group, organisation, project, or community +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate + +The goal of the standards and moderation guidelines outlined here is to build +and maintain a respectful community. We ask that you don’t just aim to be +"technically unimpeachable", but rather try to be your best self. + +We value many things beyond technical expertise, including collaboration and +supporting others within our community. Providing a positive experience for +other community members can have a much more significant impact than simply +providing the correct answer. + +## Our Responsibilities + +Project leaders are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project leaders have the right and responsibility to remove, edit, or +reject messages, comments, commits, code, issues, and other contributions +that are not aligned to this Code of Conduct, or to ban temporarily or +permanently any community member for other behaviors that they deem +inappropriate, threatening, offensive, or harmful. + +## Moderation + +Instances of behaviors that violate the Adafruit Community Code of Conduct +may be reported by any member of the community. Community members are +encouraged to report these situations, including situations they witness +involving other community members. + +You may report in the following ways: + +In any situation, you may email . + +On the Adafruit Discord, you may send an open message from any channel +to all Community Moderators by tagging @community moderators. You may +also send an open message from any channel, or a direct message to +any Community Moderator. + +Email and direct message reports will be kept confidential. + +In situations on Discord where the issue is particularly offensive, possibly +illegal, requires immediate action, or violates the Discord terms of service, +you should also report the message directly to [Discord](https://discord.com/safety). + +These are the steps for upholding our community’s standards of conduct. + +1. Any member of the community may report any situation that violates the + CircuitPython Community Code of Conduct. All reports will be reviewed and + investigated. +2. If the behavior is a severe violation, the community member who + committed the violation may be banned immediately, without warning. +3. Otherwise, moderators will first respond to such behavior with a warning. +4. Moderators follow a soft "three strikes" policy - the community member may + be given another chance, if they are receptive to the warning and change their + behavior. +5. If the community member is unreceptive or unreasonable when warned by a + moderator, or the warning goes unheeded, they may be banned for a first or + second offense. Repeated offenses will result in the community member being + banned. +6. Disciplinary actions (warnings, bans, etc) for Code of Conduct violations apply + to the platform where the violation occurred. However, depending on the severity + of the violation, the disciplinary action may be applied across Adafruit's other + community platforms. For example, a severe violation on the Adafruit Discord + server may result in a ban on not only the Adafruit Discord server, but also on + the Adafruit GitHub organisation, Adafruit Forums, Adafruit Twitter, etc. + +## Scope + +This Code of Conduct and the enforcement policies listed above apply to all +Adafruit Community venues. This includes but is not limited to any community +spaces (both public and private), the entire Adafruit Discord server, and +Adafruit GitHub repositories. Examples of Adafruit Community spaces include +but are not limited to meet-ups, audio chats on the Adafruit Discord, or +interaction at a conference. + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. As a community +member, you are representing our community, and are expected to behave +accordingly. + +## Attribution + +This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), +version 1.4, available on [contributor-covenant.org](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html), +and the [Rust Code of Conduct](https://www.rust-lang.org/en-US/conduct.html). + +For other projects adopting the Adafruit Community Code of +Conduct, please contact the maintainers of those projects for enforcement. +If you wish to use this code of conduct for your own project, consider +explicitly mentioning your moderation policy or making a copy with your +own moderation policy so as to avoid confusion. diff --git a/frozen/Adafruit_CircuitPython_UC8151D/LICENSE b/frozen/Adafruit_CircuitPython_UC8151D/LICENSE new file mode 100644 index 0000000000..88160406de --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/CC-BY-4.0.txt b/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/CC-BY-4.0.txt new file mode 100644 index 0000000000..3f92dfc5fd --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/CC-BY-4.0.txt @@ -0,0 +1,324 @@ +Creative Commons Attribution 4.0 International Creative Commons Corporation +("Creative Commons") is not a law firm and does not provide legal services +or legal advice. Distribution of Creative Commons public licenses does not +create a lawyer-client or other relationship. Creative Commons makes its licenses +and related information available on an "as-is" basis. Creative Commons gives +no warranties regarding its licenses, any material licensed under their terms +and conditions, or any related information. Creative Commons disclaims all +liability for damages resulting from their use to the fullest extent possible. + +Using Creative Commons Public Licenses + +Creative Commons public licenses provide a standard set of terms and conditions +that creators and other rights holders may use to share original works of +authorship and other material subject to copyright and certain other rights +specified in the public license below. The following considerations are for +informational purposes only, are not exhaustive, and do not form part of our +licenses. + +Considerations for licensors: Our public licenses are intended for use by +those authorized to give the public permission to use material in ways otherwise +restricted by copyright and certain other rights. Our licenses are irrevocable. +Licensors should read and understand the terms and conditions of the license +they choose before applying it. Licensors should also secure all rights necessary +before applying our licenses so that the public can reuse the material as +expected. Licensors should clearly mark any material not subject to the license. +This includes other CC-licensed material, or material used under an exception +or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors + +Considerations for the public: By using one of our public licenses, a licensor +grants the public permission to use the licensed material under specified +terms and conditions. If the licensor's permission is not necessary for any +reason–for example, because of any applicable exception or limitation to copyright–then +that use is not regulated by the license. Our licenses grant only permissions +under copyright and certain other rights that a licensor has authority to +grant. Use of the licensed material may still be restricted for other reasons, +including because others have copyright or other rights in the material. A +licensor may make special requests, such as asking that all changes be marked +or described. Although not required by our licenses, you are encouraged to +respect those requests where reasonable. More considerations for the public +: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution +4.0 International Public License + +By exercising the Licensed Rights (defined below), You accept and agree to +be bound by the terms and conditions of this Creative Commons Attribution +4.0 International Public License ("Public License"). To the extent this Public +License may be interpreted as a contract, You are granted the Licensed Rights +in consideration of Your acceptance of these terms and conditions, and the +Licensor grants You such rights in consideration of benefits the Licensor +receives from making the Licensed Material available under these terms and +conditions. + +Section 1 – Definitions. + +a. Adapted Material means material subject to Copyright and Similar Rights +that is derived from or based upon the Licensed Material and in which the +Licensed Material is translated, altered, arranged, transformed, or otherwise +modified in a manner requiring permission under the Copyright and Similar +Rights held by the Licensor. For purposes of this Public License, where the +Licensed Material is a musical work, performance, or sound recording, Adapted +Material is always produced where the Licensed Material is synched in timed +relation with a moving image. + +b. Adapter's License means the license You apply to Your Copyright and Similar +Rights in Your contributions to Adapted Material in accordance with the terms +and conditions of this Public License. + +c. Copyright and Similar Rights means copyright and/or similar rights closely +related to copyright including, without limitation, performance, broadcast, +sound recording, and Sui Generis Database Rights, without regard to how the +rights are labeled or categorized. For purposes of this Public License, the +rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. + +d. Effective Technological Measures means those measures that, in the absence +of proper authority, may not be circumvented under laws fulfilling obligations +under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, +and/or similar international agreements. + +e. Exceptions and Limitations means fair use, fair dealing, and/or any other +exception or limitation to Copyright and Similar Rights that applies to Your +use of the Licensed Material. + +f. Licensed Material means the artistic or literary work, database, or other +material to which the Licensor applied this Public License. + +g. Licensed Rights means the rights granted to You subject to the terms and +conditions of this Public License, which are limited to all Copyright and +Similar Rights that apply to Your use of the Licensed Material and that the +Licensor has authority to license. + +h. Licensor means the individual(s) or entity(ies) granting rights under this +Public License. + +i. Share means to provide material to the public by any means or process that +requires permission under the Licensed Rights, such as reproduction, public +display, public performance, distribution, dissemination, communication, or +importation, and to make material available to the public including in ways +that members of the public may access the material from a place and at a time +individually chosen by them. + +j. Sui Generis Database Rights means rights other than copyright resulting +from Directive 96/9/EC of the European Parliament and of the Council of 11 +March 1996 on the legal protection of databases, as amended and/or succeeded, +as well as other essentially equivalent rights anywhere in the world. + +k. You means the individual or entity exercising the Licensed Rights under +this Public License. Your has a corresponding meaning. + +Section 2 – Scope. + + a. License grant. + +1. Subject to the terms and conditions of this Public License, the Licensor +hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, +irrevocable license to exercise the Licensed Rights in the Licensed Material +to: + + A. reproduce and Share the Licensed Material, in whole or in part; and + + B. produce, reproduce, and Share Adapted Material. + +2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions +and Limitations apply to Your use, this Public License does not apply, and +You do not need to comply with its terms and conditions. + + 3. Term. The term of this Public License is specified in Section 6(a). + +4. Media and formats; technical modifications allowed. The Licensor authorizes +You to exercise the Licensed Rights in all media and formats whether now known +or hereafter created, and to make technical modifications necessary to do +so. The Licensor waives and/or agrees not to assert any right or authority +to forbid You from making technical modifications necessary to exercise the +Licensed Rights, including technical modifications necessary to circumvent +Effective Technological Measures. For purposes of this Public License, simply +making modifications authorized by this Section 2(a)(4) never produces Adapted +Material. + + 5. Downstream recipients. + +A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed +Material automatically receives an offer from the Licensor to exercise the +Licensed Rights under the terms and conditions of this Public License. + +B. No downstream restrictions. You may not offer or impose any additional +or different terms or conditions on, or apply any Effective Technological +Measures to, the Licensed Material if doing so restricts exercise of the Licensed +Rights by any recipient of the Licensed Material. + +6. No endorsement. Nothing in this Public License constitutes or may be construed +as permission to assert or imply that You are, or that Your use of the Licensed +Material is, connected with, or sponsored, endorsed, or granted official status +by, the Licensor or others designated to receive attribution as provided in +Section 3(a)(1)(A)(i). + + b. Other rights. + +1. Moral rights, such as the right of integrity, are not licensed under this +Public License, nor are publicity, privacy, and/or other similar personality +rights; however, to the extent possible, the Licensor waives and/or agrees +not to assert any such rights held by the Licensor to the limited extent necessary +to allow You to exercise the Licensed Rights, but not otherwise. + +2. Patent and trademark rights are not licensed under this Public License. + +3. To the extent possible, the Licensor waives any right to collect royalties +from You for the exercise of the Licensed Rights, whether directly or through +a collecting society under any voluntary or waivable statutory or compulsory +licensing scheme. In all other cases the Licensor expressly reserves any right +to collect such royalties. + +Section 3 – License Conditions. + +Your exercise of the Licensed Rights is expressly made subject to the following +conditions. + + a. Attribution. + +1. If You Share the Licensed Material (including in modified form), You must: + +A. retain the following if it is supplied by the Licensor with the Licensed +Material: + +i. identification of the creator(s) of the Licensed Material and any others +designated to receive attribution, in any reasonable manner requested by the +Licensor (including by pseudonym if designated); + + ii. a copyright notice; + + iii. a notice that refers to this Public License; + + iv. a notice that refers to the disclaimer of warranties; + +v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; + +B. indicate if You modified the Licensed Material and retain an indication +of any previous modifications; and + +C. indicate the Licensed Material is licensed under this Public License, and +include the text of, or the URI or hyperlink to, this Public License. + +2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner +based on the medium, means, and context in which You Share the Licensed Material. +For example, it may be reasonable to satisfy the conditions by providing a +URI or hyperlink to a resource that includes the required information. + +3. If requested by the Licensor, You must remove any of the information required +by Section 3(a)(1)(A) to the extent reasonably practicable. + +4. If You Share Adapted Material You produce, the Adapter's License You apply +must not prevent recipients of the Adapted Material from complying with this +Public License. + +Section 4 – Sui Generis Database Rights. + +Where the Licensed Rights include Sui Generis Database Rights that apply to +Your use of the Licensed Material: + +a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, +reuse, reproduce, and Share all or a substantial portion of the contents of +the database; + +b. if You include all or a substantial portion of the database contents in +a database in which You have Sui Generis Database Rights, then the database +in which You have Sui Generis Database Rights (but not its individual contents) +is Adapted Material; and + +c. You must comply with the conditions in Section 3(a) if You Share all or +a substantial portion of the contents of the database. + +For the avoidance of doubt, this Section 4 supplements and does not replace +Your obligations under this Public License where the Licensed Rights include +other Copyright and Similar Rights. + +Section 5 – Disclaimer of Warranties and Limitation of Liability. + +a. Unless otherwise separately undertaken by the Licensor, to the extent possible, +the Licensor offers the Licensed Material as-is and as-available, and makes +no representations or warranties of any kind concerning the Licensed Material, +whether express, implied, statutory, or other. This includes, without limitation, +warranties of title, merchantability, fitness for a particular purpose, non-infringement, +absence of latent or other defects, accuracy, or the presence or absence of +errors, whether or not known or discoverable. Where disclaimers of warranties +are not allowed in full or in part, this disclaimer may not apply to You. + +b. To the extent possible, in no event will the Licensor be liable to You +on any legal theory (including, without limitation, negligence) or otherwise +for any direct, special, indirect, incidental, consequential, punitive, exemplary, +or other losses, costs, expenses, or damages arising out of this Public License +or use of the Licensed Material, even if the Licensor has been advised of +the possibility of such losses, costs, expenses, or damages. Where a limitation +of liability is not allowed in full or in part, this limitation may not apply +to You. + +c. The disclaimer of warranties and limitation of liability provided above +shall be interpreted in a manner that, to the extent possible, most closely +approximates an absolute disclaimer and waiver of all liability. + +Section 6 – Term and Termination. + +a. This Public License applies for the term of the Copyright and Similar Rights +licensed here. However, if You fail to comply with this Public License, then +Your rights under this Public License terminate automatically. + +b. Where Your right to use the Licensed Material has terminated under Section +6(a), it reinstates: + +1. automatically as of the date the violation is cured, provided it is cured +within 30 days of Your discovery of the violation; or + + 2. upon express reinstatement by the Licensor. + +c. For the avoidance of doubt, this Section 6(b) does not affect any right +the Licensor may have to seek remedies for Your violations of this Public +License. + +d. For the avoidance of doubt, the Licensor may also offer the Licensed Material +under separate terms or conditions or stop distributing the Licensed Material +at any time; however, doing so will not terminate this Public License. + + e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. + +Section 7 – Other Terms and Conditions. + +a. The Licensor shall not be bound by any additional or different terms or +conditions communicated by You unless expressly agreed. + +b. Any arrangements, understandings, or agreements regarding the Licensed +Material not stated herein are separate from and independent of the terms +and conditions of this Public License. + +Section 8 – Interpretation. + +a. For the avoidance of doubt, this Public License does not, and shall not +be interpreted to, reduce, limit, restrict, or impose conditions on any use +of the Licensed Material that could lawfully be made without permission under +this Public License. + +b. To the extent possible, if any provision of this Public License is deemed +unenforceable, it shall be automatically reformed to the minimum extent necessary +to make it enforceable. If the provision cannot be reformed, it shall be severed +from this Public License without affecting the enforceability of the remaining +terms and conditions. + +c. No term or condition of this Public License will be waived and no failure +to comply consented to unless expressly agreed to by the Licensor. + +d. Nothing in this Public License constitutes or may be interpreted as a limitation +upon, or waiver of, any privileges and immunities that apply to the Licensor +or You, including from the legal processes of any jurisdiction or authority. + +Creative Commons is not a party to its public licenses. Notwithstanding, Creative +Commons may elect to apply one of its public licenses to material it publishes +and in those instances will be considered the "Licensor." The text of the +Creative Commons public licenses is dedicated to the public domain under the +CC0 Public Domain Dedication. Except for the limited purpose of indicating +that material is shared under a Creative Commons public license or as otherwise +permitted by the Creative Commons policies published at creativecommons.org/policies, +Creative Commons does not authorize the use of the trademark "Creative Commons" +or any other trademark or logo of Creative Commons without its prior written +consent including, without limitation, in connection with any unauthorized +modifications to any of its public licenses or any other arrangements, understandings, +or agreements concerning use of licensed material. For the avoidance of doubt, +this paragraph does not form part of the public licenses. + +Creative Commons may be contacted at creativecommons.org. diff --git a/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/MIT.txt b/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/MIT.txt new file mode 100644 index 0000000000..204b93da48 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/MIT.txt @@ -0,0 +1,19 @@ +MIT License Copyright (c) + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is furnished +to do so, subject to the following conditions: + +The above copyright notice and this permission notice (including the next +paragraph) shall be included in all copies or substantial portions of the +Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, +WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF +OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/Unlicense.txt b/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/Unlicense.txt new file mode 100644 index 0000000000..24a8f90199 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/Unlicense.txt @@ -0,0 +1,20 @@ +This is free and unencumbered software released into the public domain. + +Anyone is free to copy, modify, publish, use, compile, sell, or distribute +this software, either in source code form or as a compiled binary, for any +purpose, commercial or non-commercial, and by any means. + +In jurisdictions that recognize copyright laws, the author or authors of this +software dedicate any and all copyright interest in the software to the public +domain. We make this dedication for the benefit of the public at large and +to the detriment of our heirs and successors. We intend this dedication to +be an overt act of relinquishment in perpetuity of all present and future +rights to this software under copyright law. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS +BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH +THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, +please refer to diff --git a/frozen/Adafruit_CircuitPython_UC8151D/README.rst b/frozen/Adafruit_CircuitPython_UC8151D/README.rst new file mode 100644 index 0000000000..08efe2f99b --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/README.rst @@ -0,0 +1,149 @@ +Introduction +============ + + +.. image:: https://readthedocs.org/projects/adafruit-circuitpython-uc8151d/badge/?version=latest + :target: https://docs.circuitpython.org/projects/uc8151d/en/latest/ + :alt: Documentation Status + + +.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg + :target: https://adafru.it/discord + :alt: Discord + + +.. image:: https://github.com/adafruit/Adafruit_CircuitPython_UC8151D/workflows/Build%20CI/badge.svg + :target: https://github.com/adafruit/Adafruit_CircuitPython_UC8151D/actions + :alt: Build Status + + +.. image:: https://img.shields.io/badge/code%20style-black-000000.svg + :target: https://github.com/psf/black + :alt: Code Style: Black + +CircuitPython `displayio` driver for US8151D-based ePaper displays + + +Dependencies +============= +This driver depends on: + +* `Adafruit CircuitPython `_ + +Please ensure all dependencies are available on the CircuitPython filesystem. +This is easily achieved by downloading +`the Adafruit library and driver bundle `_ +or individual libraries can be installed using +`circup `_. + +Adafruit 2.9" Flexible 296x128 Monochrome eInk / ePaper Display + +`Purchase one from the Adafruit shop `_ + + +Installing from PyPI +===================== + +On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from +PyPI `_. +To install for current user: + +.. code-block:: shell + + pip3 install adafruit-circuitpython-uc8151d + +To install system-wide (this may be required in some cases): + +.. code-block:: shell + + sudo pip3 install adafruit-circuitpython-uc8151d + +To install in a virtual environment in your current project: + +.. code-block:: shell + + mkdir project-name && cd project-name + python3 -m venv .venv + source .venv/bin/activate + pip3 install adafruit-circuitpython-uc8151d + + + +Installing to a Connected CircuitPython Device with Circup +========================================================== + +Make sure that you have ``circup`` installed in your Python environment. +Install it with the following command if necessary: + +.. code-block:: shell + + pip3 install circup + +With ``circup`` installed and your CircuitPython device connected use the +following command to install: + +.. code-block:: shell + + circup install uc8151d + +Or the following command to update an existing version: + +.. code-block:: shell + + circup update + +Usage Example +============= + +.. code-block:: python + + import time + import board + import displayio + import adafruit_uc8151d + + displayio.release_displays() + + # This pinout works on a Feather M4 and may need to be altered for other boards. + spi = board.SPI() # Uses SCK and MOSI + epd_cs = board.D9 + epd_dc = board.D10 + epd_reset = board.D5 + epd_busy = None + + display_bus = displayio.FourWire( + spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000 + ) + time.sleep(1) + + display = adafruit_uc8151d.UC8151D( + display_bus, width=296, height=128, rotation=90, busy_pin=epd_busy + ) + + g = displayio.Group() + + with open("/display-ruler.bmp", "rb") as f: + pic = displayio.OnDiskBitmap(f) + t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) + g.append(t) + + display.show(g) + + display.refresh() + + time.sleep(120) + + +Documentation +============= + +API documentation for this library can be found on `Read the Docs `_. + +For information on building library documentation, please check out `this guide `_. + +Contributing +============ + +Contributions are welcome! Please read our `Code of Conduct +`_ +before contributing to help this project stay welcoming. diff --git a/frozen/Adafruit_CircuitPython_UC8151D/README.rst.license b/frozen/Adafruit_CircuitPython_UC8151D/README.rst.license new file mode 100644 index 0000000000..87eb036957 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/README.rst.license @@ -0,0 +1,3 @@ +SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries +SPDX-License-Identifier: MIT diff --git a/frozen/Adafruit_CircuitPython_UC8151D/adafruit_uc8151d.py b/frozen/Adafruit_CircuitPython_UC8151D/adafruit_uc8151d.py new file mode 100644 index 0000000000..1055d3d562 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/adafruit_uc8151d.py @@ -0,0 +1,132 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries +# +# SPDX-License-Identifier: MIT +""" +`adafruit_uc8151d` +================================================================================ + +CircuitPython `displayio` driver for US8151D-based ePaper displays + + +* Author(s): Melissa LeBlanc-Williams + +Implementation Notes +-------------------- + +**Hardware:** + +* `Adafruit Flexible 2.9" Black and White `_ + +**Software and Dependencies:** + +* Adafruit CircuitPython firmware for the supported boards: + https://github.com/adafruit/circuitpython/releases + +""" + +import displayio + +__version__ = "0.0.0+auto.0" +__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_UC8151D.git" + +_START_SEQUENCE = ( + # b"\x01\x05\x03\x00\x2b\x2b\x09" # power setting + # b"\x06\x03\x17\x17\x17" # booster soft start + b"\x04\x80\xc8" # power on and wait 10 ms + b"\x00\x01\x1f" # panel setting. Further filled in below. + b"\x50\x01\x97" # CDI setting +) + +_GRAYSCALE_START_SEQUENCE = ( + b"\x04\x80\xc8" # Power on + b"\x00\x01\xbf" # Panel setting + b"\x50\x01\x97" # CDI setting + # Common voltage + b"\x20\x2a" + b"\x00\x0A\x00\x00\x00\x01" + b"\x60\x14\x14\x00\x00\x01" + b"\x00\x14\x00\x00\x00\x01" + b"\x00\x13\x0A\x01\x00\x01" + b"\x00\x00\x00\x00\x00\x00" + b"\x00\x00\x00\x00\x00\x00" + b"\x00\x00\x00\x00\x00\x00" + # White to White + b"\x21\x2a" + b"\x40\x0A\x00\x00\x00\x01" + b"\x90\x14\x14\x00\x00\x01" + b"\x10\x14\x0A\x00\x00\x01" + b"\xA0\x13\x01\x00\x00\x01" + b"\x00\x00\x00\x00\x00\x00" + b"\x00\x00\x00\x00\x00\x00" + b"\x00\x00\x00\x00\x00\x00" + # Black to White + b"\x22\x2a" + b"\x40\x0A\x00\x00\x00\x01" + b"\x90\x14\x14\x00\x00\x01" + b"\x00\x14\x0A\x00\x00\x01" + b"\x99\x0B\x04\x04\x01\x01" + b"\x00\x00\x00\x00\x00\x00" + b"\x00\x00\x00\x00\x00\x00" + b"\x00\x00\x00\x00\x00\x00" + # White to Black + b"\x23\x2a" + b"\x40\x0A\x00\x00\x00\x01" + b"\x90\x14\x14\x00\x00\x01" + b"\x00\x14\x0A\x00\x00\x01" + b"\x99\x0C\x01\x03\x04\x01" + b"\x00\x00\x00\x00\x00\x00" + b"\x00\x00\x00\x00\x00\x00" + b"\x00\x00\x00\x00\x00\x00" + # Black to Black + b"\x24\x2a" + b"\x80\x0A\x00\x00\x00\x01" + b"\x90\x14\x14\x00\x00\x01" + b"\x20\x14\x0A\x00\x00\x01" + b"\x50\x13\x01\x00\x00\x01" + b"\x00\x00\x00\x00\x00\x00" + b"\x00\x00\x00\x00\x00\x00" + b"\x00\x00\x00\x00\x00\x00" +) + + +_STOP_SEQUENCE = b"\x50\x01\xf7" b"\x07\x01\xA5" # CDI setting # Deep Sleep +# pylint: disable=too-few-public-methods +class UC8151D(displayio.EPaperDisplay): + r"""UC8151D driver + + :param bus: The data bus the display is on + :param \**kwargs: + See below + + :Keyword Arguments: + * *width* (``int``) -- + Display width + * *height* (``int``) -- + Display height + * *rotation* (``int``) -- + Display rotation + """ + + def __init__(self, bus: displayio.FourWire, **kwargs) -> None: + if kwargs.get("grayscale", False): + start_sequence = bytearray(_GRAYSCALE_START_SEQUENCE) + else: + start_sequence = bytearray(_START_SEQUENCE) + width = kwargs["width"] + height = kwargs["height"] + if "rotation" in kwargs and kwargs["rotation"] % 180 != 0: + width, height = height, width + + super().__init__( + bus, + start_sequence, + _STOP_SEQUENCE, + **kwargs, + ram_width=128, + ram_height=296, + busy_state=False, + write_black_ram_command=0x13, + write_color_ram_command=0x10, + refresh_display_command=0x12, + ) diff --git a/frozen/Adafruit_CircuitPython_UC8151D/docs/_static/favicon.ico b/frozen/Adafruit_CircuitPython_UC8151D/docs/_static/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..5aca98376a1f7e593ebd9cf41a808512c2135635 GIT binary patch literal 4414 zcmd^BX;4#F6n=SG-XmlONeGrD5E6J{RVh+e928U#MG!$jWvO+UsvWh`x&VqGNx*en zx=qox7Dqv{kPwo%fZC$dDwVpRtz{HzTkSs8QhG0)%Y=-3@Kt!4ag|JcIo?$-F|?bXVS9UDUyev>MVZQ(H8K4#;BQW-t2CPorj8^KJrMX}QK zp+e<;4ldpXz~=)2GxNy811&)gt-}Q*yVQpsxr@VMoA##{)$1~=bZ1MmjeFw?uT(`8 z^g=09<=zW%r%buwN%iHtuKSg|+r7HkT0PYN*_u9k1;^Ss-Z!RBfJ?Un4w(awqp2b3 z%+myoFis_lTlCrGx2z$0BQdh+7?!JK#9K9@Z!VrG zNj6gK5r(b4?YDOLw|DPRoN7bdP{(>GEG41YcN~4r_SUHU2hgVtUwZG@s%edC;k7Sn zC)RvEnlq~raE2mY2ko64^m1KQL}3riixh?#J{o)IT+K-RdHae2eRX91-+g!y`8^># z-zI0ir>P%Xon)!@xp-BK2bDYUB9k613NRrY6%lVjbFcQc*pRqiK~8xtkNPLxt}e?&QsTB}^!39t_%Qb)~Ukn0O%iC;zt z<&A-y;3h++)>c1br`5VFM~5(83!HKx$L+my8sW_c#@x*|*vB1yU)_dt3vH;2hqPWx zAl^6@?ipx&U7pf`a*>Yq6C85nb+B=Fnn+(id$W#WB^uHAcZVG`qg;rWB}ubvi(Y>D z$ei>REw$#xp0SHAd^|1hq&9HJ=jKK8^zTH~nk)G?yUcmTh9vUM6Y0LMw4(gYVY$D$ zGl&WY&H<)BbJ&3sYbKjx1j^=3-0Q#f^}(aP1?8^`&FUWMp|rmtpK)bLQ1Zo?^s4jqK=Lfg*9&geMGVQ z#^-*!V`fG@;H&{M9S8%+;|h&Qrxym0Ar>WT4BCVLR8cGXF=JmEYN(sNT(9vl+S|%g z8r7nXQ(95i^`=+XHo|){$vf2$?=`F$^&wFlYXyXg$B{a>$-Fp+V}+D;9k=~Xl~?C4 zAB-;RKXdUzBJE{V&d&%R>aEfFe;vxqI$0@hwVM}gFeQR@j}a>DDxR+n+-*6|_)k%% z*mSpDV|=5I9!&VC&9tD%fcVygWZV!iIo2qFtm#!*(s|@ZT33*Ad;+<|3^+yrp*;oH zBSYLV(H1zTU?2WjrCQoQW)Z>J2a=dTriuvezBmu16`tM2fm7Q@d4^iqII-xFpwHGI zn9CL}QE*1vdj2PX{PIuqOe5dracsciH6OlAZATvE8rj6ykqdIjal2 z0S0S~PwHb-5?OQ-tU-^KTG@XNrEVSvo|HIP?H;7ZhYeZkhSqh-{reE!5di;1zk$#Y zCe7rOnlzFYJ6Z#Hm$GoidKB=2HBCwm`BbZVeZY4ukmG%1uz7p2URs6c9j-Gjj^oQV zsdDb3@k2e`C$1I5ML5U0Qs0C1GAp^?!*`=|Nm(vWz3j*j*8ucum2;r0^-6Aca=Gv) zc%}&;!+_*S2tlnnJnz0EKeRmw-Y!@9ob!XQBwiv}^u9MkaXHvM=!<3YX;+2#5Cj5pp?FEK750S3BgeSDtaE^ zXUM@xoV6yBFKfzvY20V&Lr0yC + +.. toctree:: + :caption: Related Products + +Adafruit 2.9" Flexible 296x128 Monochrome eInk / ePaper Display + +.. toctree:: + :caption: Other Links + + Download from GitHub + Download Library Bundle + CircuitPython Reference Documentation + CircuitPython Support Forum + Discord Chat + Adafruit Learning System + Adafruit Blog + Adafruit Store + +Indices and tables +================== + +* :ref:`genindex` +* :ref:`modindex` +* :ref:`search` diff --git a/frozen/Adafruit_CircuitPython_UC8151D/docs/index.rst.license b/frozen/Adafruit_CircuitPython_UC8151D/docs/index.rst.license new file mode 100644 index 0000000000..52de478909 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/docs/index.rst.license @@ -0,0 +1,4 @@ +SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries + +SPDX-License-Identifier: MIT diff --git a/frozen/Adafruit_CircuitPython_UC8151D/docs/requirements.txt b/frozen/Adafruit_CircuitPython_UC8151D/docs/requirements.txt new file mode 100644 index 0000000000..88e67331eb --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/docs/requirements.txt @@ -0,0 +1,5 @@ +# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + +sphinx>=4.0.0 diff --git a/frozen/Adafruit_CircuitPython_UC8151D/examples/display-ruler.bmp b/frozen/Adafruit_CircuitPython_UC8151D/examples/display-ruler.bmp new file mode 100644 index 0000000000000000000000000000000000000000..726b5e026fd30b7e5baf5c23323d159b0eb5f65d GIT binary patch literal 360122 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 T`pMSbh(J1r2r{u6#p?e9C4JK7 literal 0 HcmV?d00001 diff --git a/frozen/Adafruit_CircuitPython_UC8151D/examples/display-ruler.bmp.license b/frozen/Adafruit_CircuitPython_UC8151D/examples/display-ruler.bmp.license new file mode 100644 index 0000000000..a784acfa32 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/examples/display-ruler.bmp.license @@ -0,0 +1,2 @@ +# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries +# SPDX-License-Identifier: MIT diff --git a/frozen/Adafruit_CircuitPython_UC8151D/examples/uc8151d_grayscale_test.py b/frozen/Adafruit_CircuitPython_UC8151D/examples/uc8151d_grayscale_test.py new file mode 100644 index 0000000000..71b8316a87 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/examples/uc8151d_grayscale_test.py @@ -0,0 +1,68 @@ +# SPDX-FileCopyrightText: 2022 Martin Refseth, written for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + +"""Simple test script for 1.54" 152x152 grayscale display. + +Supported products: + * 1.54" Grayscale Display (GDEW0154T8D) + """ +# pylint: disable=no-member + +import time +import board +import displayio +import busio +import adafruit_uc8151d + +displayio.release_displays() + +# Pinout intended for use with a Raspberry Pi Pico +clk = board.GP10 +si = board.GP11 +dc = board.GP8 +cs = board.GP9 +rst = board.GP12 +busy = board.GP13 + +display_bus = displayio.FourWire( + busio.SPI(clk, si), command=dc, chip_select=cs, reset=rst, baudrate=1000000 +) + +time.sleep(1) + +display = adafruit_uc8151d.UC8151D( + display_bus, width=152, height=152, busy_pin=busy, rotation=180, grayscale=True +) + + +bitmap = displayio.Bitmap(152, 152, 4) + +# Draw Black +for x in range(0, 152): + for y in range(0, 38): + bitmap[x, y] = 0 +# Draw Dark Gray +for x in range(0, 152): + for y in range(38, 76): + bitmap[x, y] = 1 +# Draw Light Gray +for x in range(0, 152): + for y in range(76, 114): + bitmap[x, y] = 2 +# Draw White +for x in range(0, 152): + for y in range(114, 152): + bitmap[x, y] = 3 + +palette = displayio.Palette(4) +palette[0] = 0x000000 # Black +palette[1] = 0x404040 # Dark Gray +palette[2] = 0x808080 # Light Gray +palette[3] = 0xFFFFFF # White + +g = displayio.Group() +t = displayio.TileGrid(bitmap, pixel_shader=palette) +g.append(t) +display.show(g) +display.refresh() diff --git a/frozen/Adafruit_CircuitPython_UC8151D/examples/uc8151d_simpletest.py b/frozen/Adafruit_CircuitPython_UC8151D/examples/uc8151d_simpletest.py new file mode 100644 index 0000000000..a6a068fc2d --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/examples/uc8151d_simpletest.py @@ -0,0 +1,48 @@ +# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries +# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + +"""Simple test script for 2.9" 296x128 monochrome display. + +Supported products: + * Adafruit Flexible 2.9" Monochrome + * https://www.adafruit.com/product/4262 + """ +# pylint: disable=no-member + +import time +import board +import displayio +import adafruit_uc8151d + +displayio.release_displays() + +# This pinout works on a Feather M4 and may need to be altered for other boards. +spi = board.SPI() # Uses SCK and MOSI +epd_cs = board.D9 +epd_dc = board.D10 +epd_reset = board.D5 +epd_busy = None + +display_bus = displayio.FourWire( + spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000 +) +time.sleep(1) + +display = adafruit_uc8151d.UC8151D( + display_bus, width=296, height=128, rotation=90, busy_pin=epd_busy +) + +g = displayio.Group() + +with open("/display-ruler.bmp", "rb") as f: + pic = displayio.OnDiskBitmap(f) + t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) + g.append(t) + + display.show(g) + + display.refresh() + + time.sleep(120) diff --git a/frozen/Adafruit_CircuitPython_UC8151D/optional_requirements.txt b/frozen/Adafruit_CircuitPython_UC8151D/optional_requirements.txt new file mode 100644 index 0000000000..d4e27c4d74 --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/optional_requirements.txt @@ -0,0 +1,3 @@ +# SPDX-FileCopyrightText: 2022 Alec Delaney, for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense diff --git a/frozen/Adafruit_CircuitPython_UC8151D/pyproject.toml b/frozen/Adafruit_CircuitPython_UC8151D/pyproject.toml new file mode 100644 index 0000000000..4c3129c59f --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/pyproject.toml @@ -0,0 +1,50 @@ +# SPDX-FileCopyrightText: 2022 Alec Delaney for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +[build-system] +requires = [ + "setuptools", + "wheel", + "setuptools-scm", +] + +[project] +name = "adafruit-circuitpython-uc8151d" +description = "CircuitPython `displayio` driver for US8151D-based ePaper displays" +version = "0.0.0+auto.0" +readme = "README.rst" +authors = [ + {name = "Adafruit Industries", email = "circuitpython@adafruit.com"} +] +urls = {Homepage = "https://github.com/adafruit/Adafruit_CircuitPython_UC8151D.git"} +keywords = [ + "adafruit", + "blinka", + "circuitpython", + "micropython", + "uc8151d", + "uc8151", + "us8151d", + "displayio", + "epd", + "epaper", + "flexible", +] +license = {text = "MIT"} +classifiers = [ + "Intended Audience :: Developers", + "Topic :: Software Development :: Libraries", + "Topic :: Software Development :: Embedded Systems", + "Topic :: System :: Hardware", + "License :: OSI Approved :: MIT License", + "Programming Language :: Python :: 3", +] +dynamic = ["dependencies", "optional-dependencies"] + +[tool.setuptools] +py-modules = ["adafruit_uc8151d"] + +[tool.setuptools.dynamic] +dependencies = {file = ["requirements.txt"]} +optional-dependencies = {optional = {file = ["optional_requirements.txt"]}} diff --git a/frozen/Adafruit_CircuitPython_UC8151D/requirements.txt b/frozen/Adafruit_CircuitPython_UC8151D/requirements.txt new file mode 100644 index 0000000000..274b851a2d --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D/requirements.txt @@ -0,0 +1,6 @@ +# SPDX-FileCopyrightText: 2022 Alec Delaney, for Adafruit Industries +# +# SPDX-License-Identifier: Unlicense + +Adafruit-Blinka +adafruit-blinka-displayio diff --git a/ports/espressif/boards/maker_badge/board.c b/ports/espressif/boards/maker_badge/board.c new file mode 100644 index 0000000000..7f2b45c2c5 --- /dev/null +++ b/ports/espressif/boards/maker_badge/board.c @@ -0,0 +1,63 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-module/displayio/__init__.h" +#include "supervisor/shared/board.h" + +#include "components/log/include/esp_log.h" + +#define DELAY 0x80 + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif /* DEBUG */ + +} + +//busio_spi_obj_t *spi = common_hal_board_create_spi(); + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/espressif/boards/maker_badge/mpconfigboard.h b/ports/espressif/boards/maker_badge/mpconfigboard.h new file mode 100644 index 0000000000..3c4a993364 --- /dev/null +++ b/ports/espressif/boards/maker_badge/mpconfigboard.h @@ -0,0 +1,55 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "Maker badge by Czech maker" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) +#define MICROPY_HW_NEOPIXEL_COUNT (4) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO9) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO8) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) + +// USB is always used internally so skip the pin objects for it. +#define IGNORE_PIN_GPIO18 1 +#define IGNORE_PIN_GPIO19 1 + +#define DOUBLE_TAP_PIN (&pin_GPIO38) diff --git a/ports/espressif/boards/maker_badge/mpconfigboard.mk b/ports/espressif/boards/maker_badge/mpconfigboard.mk new file mode 100644 index 0000000000..6faba2aed3 --- /dev/null +++ b/ports/espressif/boards/maker_badge/mpconfigboard.mk @@ -0,0 +1,29 @@ +USB_VID = 0x239A +USB_PID = 0x2030 +USB_PRODUCT = "Maker badge" +USB_MANUFACTURER = "Czech maker" + +IDF_TARGET = esp32s2 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP32_CAMERA = 0 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wroom + +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Display_Text +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_UC8151D +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SSD1680 diff --git a/ports/espressif/boards/maker_badge/pins.c b/ports/espressif/boards/maker_badge/pins.c new file mode 100644 index 0000000000..f573b20be8 --- /dev/null +++ b/ports/espressif/boards/maker_badge/pins.c @@ -0,0 +1,87 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_CAP5), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_CAP4), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_CAP3), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_CAP2), MP_ROM_PTR(&pin_GPIO4) }, + + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_CAP1), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_GPIO6) }, + + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO14) }, + + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO16) }, + + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER_INVERTED), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_GPIO33) }, + + { MP_ROM_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_GPIO34) }, + + { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, + + { MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, + + { MP_ROM_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) }, + + { MP_ROM_QSTR(MP_QSTR_D38), MP_ROM_PTR(&pin_GPIO38) }, + + { MP_ROM_QSTR(MP_QSTR_D39), MP_ROM_PTR(&pin_GPIO39) }, + + { MP_ROM_QSTR(MP_QSTR_D40), MP_ROM_PTR(&pin_GPIO40) }, + + { MP_ROM_QSTR(MP_QSTR_D41), MP_ROM_PTR(&pin_GPIO41) }, + + { MP_ROM_QSTR(MP_QSTR_D42), MP_ROM_PTR(&pin_GPIO42) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From d774f3d34f0c18028516f253c3c401c0c933e380 Mon Sep 17 00:00:00 2001 From: dronecz Date: Thu, 27 Oct 2022 15:02:44 +0200 Subject: [PATCH 03/75] Update board.c Fix for CLI --- ports/espressif/boards/maker_badge/board.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/maker_badge/board.c b/ports/espressif/boards/maker_badge/board.c index 7f2b45c2c5..4b244087f6 100644 --- a/ports/espressif/boards/maker_badge/board.c +++ b/ports/espressif/boards/maker_badge/board.c @@ -49,7 +49,7 @@ void board_init(void) { } -//busio_spi_obj_t *spi = common_hal_board_create_spi(); +// busio_spi_obj_t *spi = common_hal_board_create_spi(); bool board_requests_safe_mode(void) { return false; From 5d7c58da5db472de09f9c38adbb63222d0687067 Mon Sep 17 00:00:00 2001 From: dronecz Date: Sun, 30 Oct 2022 01:52:09 +0200 Subject: [PATCH 04/75] Update pins.c Attempt to fix build issue --- ports/espressif/boards/maker_badge/pins.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/espressif/boards/maker_badge/pins.c b/ports/espressif/boards/maker_badge/pins.c index f573b20be8..abecb7fef3 100644 --- a/ports/espressif/boards/maker_badge/pins.c +++ b/ports/espressif/boards/maker_badge/pins.c @@ -82,6 +82,5 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, - }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From ae8f415bd59db285f81d84935f0ab923f21bd024 Mon Sep 17 00:00:00 2001 From: dronecz Date: Sun, 30 Oct 2022 02:17:38 +0200 Subject: [PATCH 05/75] Update board.c --- ports/espressif/boards/maker_badge/board.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ports/espressif/boards/maker_badge/board.c b/ports/espressif/boards/maker_badge/board.c index 4b244087f6..19dba31c57 100644 --- a/ports/espressif/boards/maker_badge/board.c +++ b/ports/espressif/boards/maker_badge/board.c @@ -49,8 +49,6 @@ void board_init(void) { } -// busio_spi_obj_t *spi = common_hal_board_create_spi(); - bool board_requests_safe_mode(void) { return false; } From 468709abcc4960bd69c6b2dc86fa9ac07fb3d92a Mon Sep 17 00:00:00 2001 From: dronecz Date: Sun, 30 Oct 2022 18:51:46 +0100 Subject: [PATCH 06/75] Update pins.c Hopefully last change nefore merge. --- ports/espressif/boards/maker_badge/pins.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ports/espressif/boards/maker_badge/pins.c b/ports/espressif/boards/maker_badge/pins.c index abecb7fef3..f97eed60d5 100644 --- a/ports/espressif/boards/maker_badge/pins.c +++ b/ports/espressif/boards/maker_badge/pins.c @@ -7,7 +7,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_CAP5), MP_ROM_PTR(&pin_GPIO1) }, - + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_CAP4), MP_ROM_PTR(&pin_GPIO2) }, @@ -19,19 +19,19 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, { MP_ROM_QSTR(MP_QSTR_CAP1), MP_ROM_PTR(&pin_GPIO5) }, - + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, - + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, - + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO9) }, - + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) }, { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) }, @@ -58,7 +58,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_GPIO33) }, - + { MP_ROM_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_GPIO34) }, { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, @@ -73,11 +73,11 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D38), MP_ROM_PTR(&pin_GPIO38) }, { MP_ROM_QSTR(MP_QSTR_D39), MP_ROM_PTR(&pin_GPIO39) }, - + { MP_ROM_QSTR(MP_QSTR_D40), MP_ROM_PTR(&pin_GPIO40) }, - + { MP_ROM_QSTR(MP_QSTR_D41), MP_ROM_PTR(&pin_GPIO41) }, - + { MP_ROM_QSTR(MP_QSTR_D42), MP_ROM_PTR(&pin_GPIO42) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, From 01ea436b5cf9d2c000bbc41bc704aa7c3ea96d1b Mon Sep 17 00:00:00 2001 From: test Date: Sun, 30 Oct 2022 21:16:36 +0000 Subject: [PATCH 07/75] Add translate file --- locale/circuitpython.pot | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 768daa8651..ac6dd92211 100755 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -3843,6 +3843,10 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/espressif/boards/maker_badge/mpconfigboard.h +msgid "pressing boot button at start up.\n" +msgstr "" + #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "" From 3601bd1fb35d71215e350e2aa8750625245b872e Mon Sep 17 00:00:00 2001 From: dronecz Date: Mon, 31 Oct 2022 21:38:54 +0100 Subject: [PATCH 08/75] Delete frozen/Adafruit_CircuitPython_SSD1680 directory --- .../adafruit_circuitpython_pr.md | 13 - .../.github/workflows/build.yml | 77 ---- .../.github/workflows/failure-help-text.yml | 19 - .../.github/workflows/release.yml | 88 ---- .../Adafruit_CircuitPython_SSD1680/.gitignore | 47 -- .../.pre-commit-config.yaml | 42 -- .../Adafruit_CircuitPython_SSD1680/.pylintrc | 436 ------------------ .../.readthedocs.yaml | 19 - .../CODE_OF_CONDUCT.md | 137 ------ frozen/Adafruit_CircuitPython_SSD1680/LICENSE | 21 - .../LICENSES/CC-BY-4.0.txt | 324 ------------- .../LICENSES/MIT.txt | 19 - .../LICENSES/Unlicense.txt | 20 - .../Adafruit_CircuitPython_SSD1680/README.rst | 138 ------ .../README.rst.license | 3 - .../adafruit_ssd1680.py | 100 ---- .../docs/_static/favicon.ico | Bin 4414 -> 0 bytes .../docs/_static/favicon.ico.license | 3 - .../docs/api.rst | 8 - .../docs/api.rst.license | 4 - .../docs/conf.py | 194 -------- .../docs/examples.rst | 8 - .../docs/examples.rst.license | 4 - .../docs/index.rst | 50 -- .../docs/index.rst.license | 4 - .../docs/requirements.txt | 5 - .../examples/display-ruler.bmp | Bin 360122 -> 0 bytes .../examples/display-ruler.bmp.license | 2 - .../examples/ssd1680_simpletest.py | 60 --- .../optional_requirements.txt | 3 - .../pyproject.toml | 47 -- .../requirements.txt | 5 - 32 files changed, 1900 deletions(-) delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/build.yml delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/failure-help-text.yml delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/release.yml delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/.gitignore delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/.pre-commit-config.yaml delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/.pylintrc delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/.readthedocs.yaml delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/CODE_OF_CONDUCT.md delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/LICENSE delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/LICENSES/CC-BY-4.0.txt delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/LICENSES/MIT.txt delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/LICENSES/Unlicense.txt delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/README.rst delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/README.rst.license delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/adafruit_ssd1680.py delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/_static/favicon.ico delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/_static/favicon.ico.license delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/api.rst delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/api.rst.license delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/conf.py delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/examples.rst delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/examples.rst.license delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/index.rst delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/index.rst.license delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/docs/requirements.txt delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/examples/display-ruler.bmp delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/examples/display-ruler.bmp.license delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/examples/ssd1680_simpletest.py delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/optional_requirements.txt delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/pyproject.toml delete mode 100644 frozen/Adafruit_CircuitPython_SSD1680/requirements.txt diff --git a/frozen/Adafruit_CircuitPython_SSD1680/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md b/frozen/Adafruit_CircuitPython_SSD1680/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md deleted file mode 100644 index 8de294e68a..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Adafruit Industries -# -# SPDX-License-Identifier: MIT - -Thank you for contributing! Before you submit a pull request, please read the following. - -Make sure any changes you're submitting are in line with the CircuitPython Design Guide, available here: https://docs.circuitpython.org/en/latest/docs/design_guide.html - -If your changes are to documentation, please verify that the documentation builds locally by following the steps found here: https://adafru.it/build-docs - -Before submitting the pull request, make sure you've run Pylint and Black locally on your code. You can do this manually or using pre-commit. Instructions are available here: https://adafru.it/check-your-code - -Please remove all of this text before submitting. Include an explanation or list of changes included in your PR, as well as, if applicable, a link to any related issues. diff --git a/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/build.yml b/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/build.yml deleted file mode 100644 index cb2f60e36a..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/build.yml +++ /dev/null @@ -1,77 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -# -# SPDX-License-Identifier: MIT - -name: Build CI - -on: [pull_request, push] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: echo "$GITHUB_CONTEXT" - - name: Translate Repo Name For Build Tools filename_prefix - id: repo-name - run: | - echo ::set-output name=repo-name::$( - echo ${{ github.repository }} | - awk -F '\/' '{ print tolower($2) }' | - tr '_' '-' - ) - - name: Set up Python 3.x - uses: actions/setup-python@v2 - with: - python-version: "3.x" - - name: Versions - run: | - python3 --version - - name: Checkout Current Repo - uses: actions/checkout@v1 - with: - submodules: true - - name: Checkout tools repo - uses: actions/checkout@v2 - with: - repository: adafruit/actions-ci-circuitpython-libs - path: actions-ci - - name: Install dependencies - # (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.) - run: | - source actions-ci/install.sh - - name: Pip install Sphinx, pre-commit - run: | - pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit - - name: Library version - run: git describe --dirty --always --tags - - name: Setup problem matchers - uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1 - - name: Pre-commit hooks - run: | - pre-commit run --all-files - - name: Build assets - run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . - - name: Archive bundles - uses: actions/upload-artifact@v2 - with: - name: bundles - path: ${{ github.workspace }}/bundles/ - - name: Build docs - working-directory: docs - run: sphinx-build -E -W -b html . _build/html - - name: Check For pyproject.toml - id: need-pypi - run: | - echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' ) - - name: Build Python package - if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') - run: | - pip install --upgrade build twine - for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do - sed -i -e "s/0.0.0+auto.0/1.2.3/" $file; - done; - python -m build - twine check dist/* diff --git a/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/failure-help-text.yml b/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/failure-help-text.yml deleted file mode 100644 index 0b1194f0cd..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/failure-help-text.yml +++ /dev/null @@ -1,19 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Scott Shawcroft for Adafruit Industries -# -# SPDX-License-Identifier: MIT - -name: Failure help text - -on: - workflow_run: - workflows: ["Build CI"] - types: - - completed - -jobs: - post-help: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event == 'pull_request' }} - steps: - - name: Post comment to help - uses: adafruit/circuitpython-action-library-ci-failed@v1 diff --git a/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/release.yml b/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/release.yml deleted file mode 100644 index f3a0325ba3..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/.github/workflows/release.yml +++ /dev/null @@ -1,88 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -# -# SPDX-License-Identifier: MIT - -name: Release Actions - -on: - release: - types: [published] - -jobs: - upload-release-assets: - runs-on: ubuntu-latest - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: echo "$GITHUB_CONTEXT" - - name: Translate Repo Name For Build Tools filename_prefix - id: repo-name - run: | - echo ::set-output name=repo-name::$( - echo ${{ github.repository }} | - awk -F '\/' '{ print tolower($2) }' | - tr '_' '-' - ) - - name: Set up Python 3.x - uses: actions/setup-python@v2 - with: - python-version: "3.x" - - name: Versions - run: | - python3 --version - - name: Checkout Current Repo - uses: actions/checkout@v1 - with: - submodules: true - - name: Checkout tools repo - uses: actions/checkout@v2 - with: - repository: adafruit/actions-ci-circuitpython-libs - path: actions-ci - - name: Install deps - run: | - source actions-ci/install.sh - - name: Build assets - run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . - - name: Upload Release Assets - # the 'official' actions version does not yet support dynamically - # supplying asset names to upload. @csexton's version chosen based on - # discussion in the issue below, as its the simplest to implement and - # allows for selecting files with a pattern. - # https://github.com/actions/upload-release-asset/issues/4 - #uses: actions/upload-release-asset@v1.0.1 - uses: csexton/release-asset-action@master - with: - pattern: "bundles/*" - github-token: ${{ secrets.GITHUB_TOKEN }} - - upload-pypi: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Check For pyproject.toml - id: need-pypi - run: | - echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' ) - - name: Set up Python - if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') - run: | - python -m pip install --upgrade pip - pip install --upgrade build twine - - name: Build and publish - if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') - env: - TWINE_USERNAME: ${{ secrets.pypi_username }} - TWINE_PASSWORD: ${{ secrets.pypi_password }} - run: | - for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do - sed -i -e "s/0.0.0+auto.0/${{github.event.release.tag_name}}/" $file; - done; - python -m build - twine upload dist/* diff --git a/frozen/Adafruit_CircuitPython_SSD1680/.gitignore b/frozen/Adafruit_CircuitPython_SSD1680/.gitignore deleted file mode 100644 index 544ec4a695..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/.gitignore +++ /dev/null @@ -1,47 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Kattni Rembor, written for Adafruit Industries -# -# SPDX-License-Identifier: MIT - -# Do not include files and directories created by your personal work environment, such as the IDE -# you use, except for those already listed here. Pull requests including changes to this file will -# not be accepted. - -# This .gitignore file contains rules for files generated by working with CircuitPython libraries, -# including building Sphinx, testing with pip, and creating a virual environment, as well as the -# MacOS and IDE-specific files generated by using MacOS in general, or the PyCharm or VSCode IDEs. - -# If you find that there are files being generated on your machine that should not be included in -# your git commit, you should create a .gitignore_global file on your computer to include the -# files created by your personal setup. To do so, follow the two steps below. - -# First, create a file called .gitignore_global somewhere convenient for you, and add rules for -# the files you want to exclude from git commits. - -# Second, configure Git to use the exclude file for all Git repositories by running the -# following via commandline, replacing "path/to/your/" with the actual path to your newly created -# .gitignore_global file: -# git config --global core.excludesfile path/to/your/.gitignore_global - -# CircuitPython-specific files -*.mpy - -# Python-specific files -__pycache__ -*.pyc - -# Sphinx build-specific files -_build - -# This file results from running `pip -e install .` in a local repository -*.egg-info - -# Virtual environment-specific files -.env - -# MacOS-specific files -*.DS_Store - -# IDE-specific files -.idea -.vscode -*~ diff --git a/frozen/Adafruit_CircuitPython_SSD1680/.pre-commit-config.yaml b/frozen/Adafruit_CircuitPython_SSD1680/.pre-commit-config.yaml deleted file mode 100644 index 3343606412..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/.pre-commit-config.yaml +++ /dev/null @@ -1,42 +0,0 @@ -# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò -# -# SPDX-License-Identifier: Unlicense - -repos: - - repo: https://github.com/python/black - rev: 22.3.0 - hooks: - - id: black - - repo: https://github.com/fsfe/reuse-tool - rev: v0.14.0 - hooks: - - id: reuse - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 - hooks: - - id: check-yaml - - id: end-of-file-fixer - - id: trailing-whitespace - - repo: https://github.com/pycqa/pylint - rev: v2.11.1 - hooks: - - id: pylint - name: pylint (library code) - types: [python] - args: - - --disable=consider-using-f-string - exclude: "^(docs/|examples/|tests/|setup.py$)" - - id: pylint - name: pylint (example code) - description: Run pylint rules on "examples/*.py" files - types: [python] - files: "^examples/" - args: - - --disable=missing-docstring,invalid-name,consider-using-f-string,duplicate-code - - id: pylint - name: pylint (test code) - description: Run pylint rules on "tests/*.py" files - types: [python] - files: "^tests/" - args: - - --disable=missing-docstring,consider-using-f-string,duplicate-code diff --git a/frozen/Adafruit_CircuitPython_SSD1680/.pylintrc b/frozen/Adafruit_CircuitPython_SSD1680/.pylintrc deleted file mode 100644 index 1f42e5de32..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/.pylintrc +++ /dev/null @@ -1,436 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -# -# SPDX-License-Identifier: Unlicense - -[MASTER] - -# A comma-separated list of package or module names from where C extensions may -# be loaded. Extensions are loading into the active Python interpreter and may -# run arbitrary code -extension-pkg-whitelist= - -# Add files or directories to the ignore-list. They should be base names, not -# paths. -ignore=CVS - -# Add files or directories matching the regex patterns to the ignore-list. The -# regex matches against base names, not paths. -ignore-patterns= - -# Python code to execute, usually for sys.path manipulation such as -# pygtk.require(). -#init-hook= - -# Use multiple processes to speed up Pylint. -jobs=1 - -# List of plugins (as comma separated values of python modules names) to load, -# usually to register additional checkers. -load-plugins= - -# Pickle collected data for later comparisons. -persistent=yes - -# Specify a configuration file. -#rcfile= - -# Allow loading of arbitrary C extensions. Extensions are imported into the -# active Python interpreter and may run arbitrary code. -unsafe-load-any-extension=no - - -[MESSAGES CONTROL] - -# Only show warnings with the listed confidence levels. Leave empty to show -# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED -confidence= - -# Disable the message, report, category or checker with the given id(s). You -# can either give multiple identifiers separated by comma (,) or put this -# option multiple times (only on the command line, not in the configuration -# file where it should appear only once).You can also use "--disable=all" to -# disable everything first and then reenable specific checks. For example, if -# you want to run only the similarities checker, you can use "--disable=all -# --enable=similarities". If you want to run only the classes checker, but have -# no Warning level messages displayed, use"--disable=all --enable=classes -# --disable=W" -# disable=import-error,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call -disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error,bad-continuation,pointless-string-statement,unspecified-encoding - -# Enable the message, report, category or checker with the given id(s). You can -# either give multiple identifier separated by comma (,) or put this option -# multiple time (only on the command line, not in the configuration file where -# it should appear only once). See also the "--disable" option for examples. -enable= - - -[REPORTS] - -# Python expression which should return a note less than 10 (10 is the highest -# note). You have access to the variables errors warning, statement which -# respectively contain the number of errors / warnings messages and the total -# number of statements analyzed. This is used by the global evaluation report -# (RP0004). -evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) - -# Template used to display messages. This is a python new-style format string -# used to format the message information. See doc for all details -#msg-template= - -# Set the output format. Available formats are text, parseable, colorized, json -# and msvs (visual studio).You can also give a reporter class, eg -# mypackage.mymodule.MyReporterClass. -output-format=text - -# Tells whether to display a full report or only the messages -reports=no - -# Activate the evaluation score. -score=yes - - -[REFACTORING] - -# Maximum number of nested blocks for function / method body -max-nested-blocks=5 - - -[LOGGING] - -# Logging modules to check that the string format arguments are in logging -# function parameter format -logging-modules=logging - - -[SPELLING] - -# Spelling dictionary name. Available dictionaries: none. To make it working -# install python-enchant package. -spelling-dict= - -# List of comma separated words that should not be checked. -spelling-ignore-words= - -# A path to a file that contains private dictionary; one word per line. -spelling-private-dict-file= - -# Tells whether to store unknown words to indicated private dictionary in -# --spelling-private-dict-file option instead of raising a message. -spelling-store-unknown-words=no - - -[MISCELLANEOUS] - -# List of note tags to take in consideration, separated by a comma. -# notes=FIXME,XXX,TODO -notes=FIXME,XXX - - -[TYPECHECK] - -# List of decorators that produce context managers, such as -# contextlib.contextmanager. Add to this list to register other decorators that -# produce valid context managers. -contextmanager-decorators=contextlib.contextmanager - -# List of members which are set dynamically and missed by pylint inference -# system, and so shouldn't trigger E1101 when accessed. Python regular -# expressions are accepted. -generated-members= - -# Tells whether missing members accessed in mixin class should be ignored. A -# mixin class is detected if its name ends with "mixin" (case insensitive). -ignore-mixin-members=yes - -# This flag controls whether pylint should warn about no-member and similar -# checks whenever an opaque object is returned when inferring. The inference -# can return multiple potential results while evaluating a Python object, but -# some branches might not be evaluated, which results in partial inference. In -# that case, it might be useful to still emit no-member and other checks for -# the rest of the inferred objects. -ignore-on-opaque-inference=yes - -# List of class names for which member attributes should not be checked (useful -# for classes with dynamically set attributes). This supports the use of -# qualified names. -ignored-classes=optparse.Values,thread._local,_thread._local - -# List of module names for which member attributes should not be checked -# (useful for modules/projects where namespaces are manipulated during runtime -# and thus existing member attributes cannot be deduced by static analysis. It -# supports qualified module names, as well as Unix pattern matching. -ignored-modules=board - -# Show a hint with possible names when a member name was not found. The aspect -# of finding the hint is based on edit distance. -missing-member-hint=yes - -# The minimum edit distance a name should have in order to be considered a -# similar match for a missing member name. -missing-member-hint-distance=1 - -# The total number of similar names that should be taken in consideration when -# showing a hint for a missing member. -missing-member-max-choices=1 - - -[VARIABLES] - -# List of additional names supposed to be defined in builtins. Remember that -# you should avoid to define new builtins when possible. -additional-builtins= - -# Tells whether unused global variables should be treated as a violation. -allow-global-unused-variables=yes - -# List of strings which can identify a callback function by name. A callback -# name must start or end with one of those strings. -callbacks=cb_,_cb - -# A regular expression matching the name of dummy variables (i.e. expectedly -# not used). -dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ - -# Argument names that match this expression will be ignored. Default to name -# with leading underscore -ignored-argument-names=_.*|^ignored_|^unused_ - -# Tells whether we should check for unused import in __init__ files. -init-import=no - -# List of qualified module names which can have objects that can redefine -# builtins. -redefining-builtins-modules=six.moves,future.builtins - - -[FORMAT] - -# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. -# expected-line-ending-format= -expected-line-ending-format=LF - -# Regexp for a line that is allowed to be longer than the limit. -ignore-long-lines=^\s*(# )??$ - -# Number of spaces of indent required inside a hanging or continued line. -indent-after-paren=4 - -# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 -# tab). -indent-string=' ' - -# Maximum number of characters on a single line. -max-line-length=100 - -# Maximum number of lines in a module -max-module-lines=1000 - -# List of optional constructs for which whitespace checking is disabled. `dict- -# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. -# `trailing-comma` allows a space between comma and closing bracket: (a, ). -# `empty-line` allows space-only lines. -no-space-check=trailing-comma,dict-separator - -# Allow the body of a class to be on the same line as the declaration if body -# contains single statement. -single-line-class-stmt=no - -# Allow the body of an if to be on the same line as the test if there is no -# else. -single-line-if-stmt=no - - -[SIMILARITIES] - -# Ignore comments when computing similarities. -ignore-comments=yes - -# Ignore docstrings when computing similarities. -ignore-docstrings=yes - -# Ignore imports when computing similarities. -ignore-imports=yes - -# Minimum lines number of a similarity. -min-similarity-lines=12 - - -[BASIC] - -# Naming hint for argument names -argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Regular expression matching correct argument names -argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Naming hint for attribute names -attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Regular expression matching correct attribute names -attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Bad variable names which should always be refused, separated by a comma -bad-names=foo,bar,baz,toto,tutu,tata - -# Naming hint for class attribute names -class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ - -# Regular expression matching correct class attribute names -class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ - -# Naming hint for class names -# class-name-hint=[A-Z_][a-zA-Z0-9]+$ -class-name-hint=[A-Z_][a-zA-Z0-9_]+$ - -# Regular expression matching correct class names -# class-rgx=[A-Z_][a-zA-Z0-9]+$ -class-rgx=[A-Z_][a-zA-Z0-9_]+$ - -# Naming hint for constant names -const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$ - -# Regular expression matching correct constant names -const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ - -# Minimum line length for functions/classes that require docstrings, shorter -# ones are exempt. -docstring-min-length=-1 - -# Naming hint for function names -function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Regular expression matching correct function names -function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Good variable names which should always be accepted, separated by a comma -# good-names=i,j,k,ex,Run,_ -good-names=r,g,b,w,i,j,k,n,x,y,z,ex,ok,Run,_ - -# Include a hint for the correct naming format with invalid-name -include-naming-hint=no - -# Naming hint for inline iteration names -inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$ - -# Regular expression matching correct inline iteration names -inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ - -# Naming hint for method names -method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Regular expression matching correct method names -method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Naming hint for module names -module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ - -# Regular expression matching correct module names -module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ - -# Colon-delimited sets of names that determine each other's naming style when -# the name regexes allow several styles. -name-group= - -# Regular expression which should only match function or class names that do -# not require a docstring. -no-docstring-rgx=^_ - -# List of decorators that produce properties, such as abc.abstractproperty. Add -# to this list to register other decorators that produce valid properties. -property-classes=abc.abstractproperty - -# Naming hint for variable names -variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Regular expression matching correct variable names -variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - - -[IMPORTS] - -# Allow wildcard imports from modules that define __all__. -allow-wildcard-with-all=no - -# Analyse import fallback blocks. This can be used to support both Python 2 and -# 3 compatible code, which means that the block might have code that exists -# only in one or another interpreter, leading to false positives when analysed. -analyse-fallback-blocks=no - -# Deprecated modules which should not be used, separated by a comma -deprecated-modules=optparse,tkinter.tix - -# Create a graph of external dependencies in the given file (report RP0402 must -# not be disabled) -ext-import-graph= - -# Create a graph of every (i.e. internal and external) dependencies in the -# given file (report RP0402 must not be disabled) -import-graph= - -# Create a graph of internal dependencies in the given file (report RP0402 must -# not be disabled) -int-import-graph= - -# Force import order to recognize a module as part of the standard -# compatibility libraries. -known-standard-library= - -# Force import order to recognize a module as part of a third party library. -known-third-party=enchant - - -[CLASSES] - -# List of method names used to declare (i.e. assign) instance attributes. -defining-attr-methods=__init__,__new__,setUp - -# List of member names, which should be excluded from the protected access -# warning. -exclude-protected=_asdict,_fields,_replace,_source,_make - -# List of valid names for the first argument in a class method. -valid-classmethod-first-arg=cls - -# List of valid names for the first argument in a metaclass class method. -valid-metaclass-classmethod-first-arg=mcs - - -[DESIGN] - -# Maximum number of arguments for function / method -max-args=5 - -# Maximum number of attributes for a class (see R0902). -# max-attributes=7 -max-attributes=11 - -# Maximum number of boolean expressions in a if statement -max-bool-expr=5 - -# Maximum number of branch for function / method body -max-branches=12 - -# Maximum number of locals for function / method body -max-locals=15 - -# Maximum number of parents for a class (see R0901). -max-parents=7 - -# Maximum number of public methods for a class (see R0904). -max-public-methods=20 - -# Maximum number of return / yield for function / method body -max-returns=6 - -# Maximum number of statements in function / method body -max-statements=50 - -# Minimum number of public methods for a class (see R0903). -min-public-methods=1 - - -[EXCEPTIONS] - -# Exceptions that will emit a warning when being caught. Defaults to -# "Exception" -overgeneral-exceptions=Exception diff --git a/frozen/Adafruit_CircuitPython_SSD1680/.readthedocs.yaml b/frozen/Adafruit_CircuitPython_SSD1680/.readthedocs.yaml deleted file mode 100644 index 33c2a6108e..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/.readthedocs.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries -# -# SPDX-License-Identifier: Unlicense - -# Read the Docs configuration file -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - -# Required -version: 2 - -build: - os: ubuntu-20.04 - tools: - python: "3" - -python: - install: - - requirements: docs/requirements.txt - - requirements: requirements.txt diff --git a/frozen/Adafruit_CircuitPython_SSD1680/CODE_OF_CONDUCT.md b/frozen/Adafruit_CircuitPython_SSD1680/CODE_OF_CONDUCT.md deleted file mode 100644 index d885b3605a..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,137 +0,0 @@ - -# Adafruit Community Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and leaders pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level or type of -experience, education, socio-economic status, nationality, personal appearance, -race, religion, or sexual identity and orientation. - -## Our Standards - -We are committed to providing a friendly, safe and welcoming environment for -all. - -Examples of behavior that contributes to creating a positive environment -include: - -* Be kind and courteous to others -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Collaborating with other community members -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and sexual attention or advances -* The use of inappropriate images, including in a community member's avatar -* The use of inappropriate language, including in a community member's nickname -* Any spamming, flaming, baiting or other attention-stealing behavior -* Excessive or unwelcome helping; answering outside the scope of the question - asked -* Trolling, insulting/derogatory comments, and personal or political attacks -* Promoting or spreading disinformation, lies, or conspiracy theories against - a person, group, organisation, project, or community -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate - -The goal of the standards and moderation guidelines outlined here is to build -and maintain a respectful community. We ask that you don’t just aim to be -"technically unimpeachable", but rather try to be your best self. - -We value many things beyond technical expertise, including collaboration and -supporting others within our community. Providing a positive experience for -other community members can have a much more significant impact than simply -providing the correct answer. - -## Our Responsibilities - -Project leaders are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project leaders have the right and responsibility to remove, edit, or -reject messages, comments, commits, code, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any community member for other behaviors that they deem -inappropriate, threatening, offensive, or harmful. - -## Moderation - -Instances of behaviors that violate the Adafruit Community Code of Conduct -may be reported by any member of the community. Community members are -encouraged to report these situations, including situations they witness -involving other community members. - -You may report in the following ways: - -In any situation, you may send an email to . - -On the Adafruit Discord, you may send an open message from any channel -to all Community Moderators by tagging @community moderators. You may -also send an open message from any channel, or a direct message to -@kattni#1507, @tannewt#4653, @danh#1614, @cater#2442, -@sommersoft#0222, @Mr. Certainly#0472 or @Andon#8175. - -Email and direct message reports will be kept confidential. - -In situations on Discord where the issue is particularly egregious, possibly -illegal, requires immediate action, or violates the Discord terms of service, -you should also report the message directly to Discord. - -These are the steps for upholding our community’s standards of conduct. - -1. Any member of the community may report any situation that violates the -Adafruit Community Code of Conduct. All reports will be reviewed and -investigated. -2. If the behavior is an egregious violation, the community member who -committed the violation may be banned immediately, without warning. -3. Otherwise, moderators will first respond to such behavior with a warning. -4. Moderators follow a soft "three strikes" policy - the community member may -be given another chance, if they are receptive to the warning and change their -behavior. -5. If the community member is unreceptive or unreasonable when warned by a -moderator, or the warning goes unheeded, they may be banned for a first or -second offense. Repeated offenses will result in the community member being -banned. - -## Scope - -This Code of Conduct and the enforcement policies listed above apply to all -Adafruit Community venues. This includes but is not limited to any community -spaces (both public and private), the entire Adafruit Discord server, and -Adafruit GitHub repositories. Examples of Adafruit Community spaces include -but are not limited to meet-ups, audio chats on the Adafruit Discord, or -interaction at a conference. - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. As a community -member, you are representing our community, and are expected to behave -accordingly. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant], -version 1.4, available at -, -and the [Rust Code of Conduct](https://www.rust-lang.org/en-US/conduct.html). - -For other projects adopting the Adafruit Community Code of -Conduct, please contact the maintainers of those projects for enforcement. -If you wish to use this code of conduct for your own project, consider -explicitly mentioning your moderation policy or making a copy with your -own moderation policy so as to avoid confusion. - -[Contributor Covenant]: https://www.contributor-covenant.org diff --git a/frozen/Adafruit_CircuitPython_SSD1680/LICENSE b/frozen/Adafruit_CircuitPython_SSD1680/LICENSE deleted file mode 100644 index 88160406de..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/CC-BY-4.0.txt b/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/CC-BY-4.0.txt deleted file mode 100644 index 3f92dfc5fd..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/CC-BY-4.0.txt +++ /dev/null @@ -1,324 +0,0 @@ -Creative Commons Attribution 4.0 International Creative Commons Corporation -("Creative Commons") is not a law firm and does not provide legal services -or legal advice. Distribution of Creative Commons public licenses does not -create a lawyer-client or other relationship. Creative Commons makes its licenses -and related information available on an "as-is" basis. Creative Commons gives -no warranties regarding its licenses, any material licensed under their terms -and conditions, or any related information. Creative Commons disclaims all -liability for damages resulting from their use to the fullest extent possible. - -Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and conditions -that creators and other rights holders may use to share original works of -authorship and other material subject to copyright and certain other rights -specified in the public license below. The following considerations are for -informational purposes only, are not exhaustive, and do not form part of our -licenses. - -Considerations for licensors: Our public licenses are intended for use by -those authorized to give the public permission to use material in ways otherwise -restricted by copyright and certain other rights. Our licenses are irrevocable. -Licensors should read and understand the terms and conditions of the license -they choose before applying it. Licensors should also secure all rights necessary -before applying our licenses so that the public can reuse the material as -expected. Licensors should clearly mark any material not subject to the license. -This includes other CC-licensed material, or material used under an exception -or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors - -Considerations for the public: By using one of our public licenses, a licensor -grants the public permission to use the licensed material under specified -terms and conditions. If the licensor's permission is not necessary for any -reason–for example, because of any applicable exception or limitation to copyright–then -that use is not regulated by the license. Our licenses grant only permissions -under copyright and certain other rights that a licensor has authority to -grant. Use of the licensed material may still be restricted for other reasons, -including because others have copyright or other rights in the material. A -licensor may make special requests, such as asking that all changes be marked -or described. Although not required by our licenses, you are encouraged to -respect those requests where reasonable. More considerations for the public -: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution -4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree to -be bound by the terms and conditions of this Creative Commons Attribution -4.0 International Public License ("Public License"). To the extent this Public -License may be interpreted as a contract, You are granted the Licensed Rights -in consideration of Your acceptance of these terms and conditions, and the -Licensor grants You such rights in consideration of benefits the Licensor -receives from making the Licensed Material available under these terms and -conditions. - -Section 1 – Definitions. - -a. Adapted Material means material subject to Copyright and Similar Rights -that is derived from or based upon the Licensed Material and in which the -Licensed Material is translated, altered, arranged, transformed, or otherwise -modified in a manner requiring permission under the Copyright and Similar -Rights held by the Licensor. For purposes of this Public License, where the -Licensed Material is a musical work, performance, or sound recording, Adapted -Material is always produced where the Licensed Material is synched in timed -relation with a moving image. - -b. Adapter's License means the license You apply to Your Copyright and Similar -Rights in Your contributions to Adapted Material in accordance with the terms -and conditions of this Public License. - -c. Copyright and Similar Rights means copyright and/or similar rights closely -related to copyright including, without limitation, performance, broadcast, -sound recording, and Sui Generis Database Rights, without regard to how the -rights are labeled or categorized. For purposes of this Public License, the -rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. - -d. Effective Technological Measures means those measures that, in the absence -of proper authority, may not be circumvented under laws fulfilling obligations -under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, -and/or similar international agreements. - -e. Exceptions and Limitations means fair use, fair dealing, and/or any other -exception or limitation to Copyright and Similar Rights that applies to Your -use of the Licensed Material. - -f. Licensed Material means the artistic or literary work, database, or other -material to which the Licensor applied this Public License. - -g. Licensed Rights means the rights granted to You subject to the terms and -conditions of this Public License, which are limited to all Copyright and -Similar Rights that apply to Your use of the Licensed Material and that the -Licensor has authority to license. - -h. Licensor means the individual(s) or entity(ies) granting rights under this -Public License. - -i. Share means to provide material to the public by any means or process that -requires permission under the Licensed Rights, such as reproduction, public -display, public performance, distribution, dissemination, communication, or -importation, and to make material available to the public including in ways -that members of the public may access the material from a place and at a time -individually chosen by them. - -j. Sui Generis Database Rights means rights other than copyright resulting -from Directive 96/9/EC of the European Parliament and of the Council of 11 -March 1996 on the legal protection of databases, as amended and/or succeeded, -as well as other essentially equivalent rights anywhere in the world. - -k. You means the individual or entity exercising the Licensed Rights under -this Public License. Your has a corresponding meaning. - -Section 2 – Scope. - - a. License grant. - -1. Subject to the terms and conditions of this Public License, the Licensor -hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, -irrevocable license to exercise the Licensed Rights in the Licensed Material -to: - - A. reproduce and Share the Licensed Material, in whole or in part; and - - B. produce, reproduce, and Share Adapted Material. - -2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions -and Limitations apply to Your use, this Public License does not apply, and -You do not need to comply with its terms and conditions. - - 3. Term. The term of this Public License is specified in Section 6(a). - -4. Media and formats; technical modifications allowed. The Licensor authorizes -You to exercise the Licensed Rights in all media and formats whether now known -or hereafter created, and to make technical modifications necessary to do -so. The Licensor waives and/or agrees not to assert any right or authority -to forbid You from making technical modifications necessary to exercise the -Licensed Rights, including technical modifications necessary to circumvent -Effective Technological Measures. For purposes of this Public License, simply -making modifications authorized by this Section 2(a)(4) never produces Adapted -Material. - - 5. Downstream recipients. - -A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed -Material automatically receives an offer from the Licensor to exercise the -Licensed Rights under the terms and conditions of this Public License. - -B. No downstream restrictions. You may not offer or impose any additional -or different terms or conditions on, or apply any Effective Technological -Measures to, the Licensed Material if doing so restricts exercise of the Licensed -Rights by any recipient of the Licensed Material. - -6. No endorsement. Nothing in this Public License constitutes or may be construed -as permission to assert or imply that You are, or that Your use of the Licensed -Material is, connected with, or sponsored, endorsed, or granted official status -by, the Licensor or others designated to receive attribution as provided in -Section 3(a)(1)(A)(i). - - b. Other rights. - -1. Moral rights, such as the right of integrity, are not licensed under this -Public License, nor are publicity, privacy, and/or other similar personality -rights; however, to the extent possible, the Licensor waives and/or agrees -not to assert any such rights held by the Licensor to the limited extent necessary -to allow You to exercise the Licensed Rights, but not otherwise. - -2. Patent and trademark rights are not licensed under this Public License. - -3. To the extent possible, the Licensor waives any right to collect royalties -from You for the exercise of the Licensed Rights, whether directly or through -a collecting society under any voluntary or waivable statutory or compulsory -licensing scheme. In all other cases the Licensor expressly reserves any right -to collect such royalties. - -Section 3 – License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the following -conditions. - - a. Attribution. - -1. If You Share the Licensed Material (including in modified form), You must: - -A. retain the following if it is supplied by the Licensor with the Licensed -Material: - -i. identification of the creator(s) of the Licensed Material and any others -designated to receive attribution, in any reasonable manner requested by the -Licensor (including by pseudonym if designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of warranties; - -v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; - -B. indicate if You modified the Licensed Material and retain an indication -of any previous modifications; and - -C. indicate the Licensed Material is licensed under this Public License, and -include the text of, or the URI or hyperlink to, this Public License. - -2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner -based on the medium, means, and context in which You Share the Licensed Material. -For example, it may be reasonable to satisfy the conditions by providing a -URI or hyperlink to a resource that includes the required information. - -3. If requested by the Licensor, You must remove any of the information required -by Section 3(a)(1)(A) to the extent reasonably practicable. - -4. If You Share Adapted Material You produce, the Adapter's License You apply -must not prevent recipients of the Adapted Material from complying with this -Public License. - -Section 4 – Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that apply to -Your use of the Licensed Material: - -a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, -reuse, reproduce, and Share all or a substantial portion of the contents of -the database; - -b. if You include all or a substantial portion of the database contents in -a database in which You have Sui Generis Database Rights, then the database -in which You have Sui Generis Database Rights (but not its individual contents) -is Adapted Material; and - -c. You must comply with the conditions in Section 3(a) if You Share all or -a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not replace -Your obligations under this Public License where the Licensed Rights include -other Copyright and Similar Rights. - -Section 5 – Disclaimer of Warranties and Limitation of Liability. - -a. Unless otherwise separately undertaken by the Licensor, to the extent possible, -the Licensor offers the Licensed Material as-is and as-available, and makes -no representations or warranties of any kind concerning the Licensed Material, -whether express, implied, statutory, or other. This includes, without limitation, -warranties of title, merchantability, fitness for a particular purpose, non-infringement, -absence of latent or other defects, accuracy, or the presence or absence of -errors, whether or not known or discoverable. Where disclaimers of warranties -are not allowed in full or in part, this disclaimer may not apply to You. - -b. To the extent possible, in no event will the Licensor be liable to You -on any legal theory (including, without limitation, negligence) or otherwise -for any direct, special, indirect, incidental, consequential, punitive, exemplary, -or other losses, costs, expenses, or damages arising out of this Public License -or use of the Licensed Material, even if the Licensor has been advised of -the possibility of such losses, costs, expenses, or damages. Where a limitation -of liability is not allowed in full or in part, this limitation may not apply -to You. - -c. The disclaimer of warranties and limitation of liability provided above -shall be interpreted in a manner that, to the extent possible, most closely -approximates an absolute disclaimer and waiver of all liability. - -Section 6 – Term and Termination. - -a. This Public License applies for the term of the Copyright and Similar Rights -licensed here. However, if You fail to comply with this Public License, then -Your rights under this Public License terminate automatically. - -b. Where Your right to use the Licensed Material has terminated under Section -6(a), it reinstates: - -1. automatically as of the date the violation is cured, provided it is cured -within 30 days of Your discovery of the violation; or - - 2. upon express reinstatement by the Licensor. - -c. For the avoidance of doubt, this Section 6(b) does not affect any right -the Licensor may have to seek remedies for Your violations of this Public -License. - -d. For the avoidance of doubt, the Licensor may also offer the Licensed Material -under separate terms or conditions or stop distributing the Licensed Material -at any time; however, doing so will not terminate this Public License. - - e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. - -Section 7 – Other Terms and Conditions. - -a. The Licensor shall not be bound by any additional or different terms or -conditions communicated by You unless expressly agreed. - -b. Any arrangements, understandings, or agreements regarding the Licensed -Material not stated herein are separate from and independent of the terms -and conditions of this Public License. - -Section 8 – Interpretation. - -a. For the avoidance of doubt, this Public License does not, and shall not -be interpreted to, reduce, limit, restrict, or impose conditions on any use -of the Licensed Material that could lawfully be made without permission under -this Public License. - -b. To the extent possible, if any provision of this Public License is deemed -unenforceable, it shall be automatically reformed to the minimum extent necessary -to make it enforceable. If the provision cannot be reformed, it shall be severed -from this Public License without affecting the enforceability of the remaining -terms and conditions. - -c. No term or condition of this Public License will be waived and no failure -to comply consented to unless expressly agreed to by the Licensor. - -d. Nothing in this Public License constitutes or may be interpreted as a limitation -upon, or waiver of, any privileges and immunities that apply to the Licensor -or You, including from the legal processes of any jurisdiction or authority. - -Creative Commons is not a party to its public licenses. Notwithstanding, Creative -Commons may elect to apply one of its public licenses to material it publishes -and in those instances will be considered the "Licensor." The text of the -Creative Commons public licenses is dedicated to the public domain under the -CC0 Public Domain Dedication. Except for the limited purpose of indicating -that material is shared under a Creative Commons public license or as otherwise -permitted by the Creative Commons policies published at creativecommons.org/policies, -Creative Commons does not authorize the use of the trademark "Creative Commons" -or any other trademark or logo of Creative Commons without its prior written -consent including, without limitation, in connection with any unauthorized -modifications to any of its public licenses or any other arrangements, understandings, -or agreements concerning use of licensed material. For the avoidance of doubt, -this paragraph does not form part of the public licenses. - -Creative Commons may be contacted at creativecommons.org. diff --git a/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/MIT.txt b/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/MIT.txt deleted file mode 100644 index 204b93da48..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/MIT.txt +++ /dev/null @@ -1,19 +0,0 @@ -MIT License Copyright (c) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice (including the next -paragraph) shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/Unlicense.txt b/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/Unlicense.txt deleted file mode 100644 index 24a8f90199..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/LICENSES/Unlicense.txt +++ /dev/null @@ -1,20 +0,0 @@ -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or distribute -this software, either in source code form or as a compiled binary, for any -purpose, commercial or non-commercial, and by any means. - -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and -to the detriment of our heirs and successors. We intend this dedication to -be an overt act of relinquishment in perpetuity of all present and future -rights to this software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH -THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, -please refer to diff --git a/frozen/Adafruit_CircuitPython_SSD1680/README.rst b/frozen/Adafruit_CircuitPython_SSD1680/README.rst deleted file mode 100644 index 0ff9a3382d..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/README.rst +++ /dev/null @@ -1,138 +0,0 @@ -Introduction -============ - -.. image:: https://readthedocs.org/projects/adafruit-circuitpython-ssd1680/badge/?version=latest - :target: https://docs.circuitpython.org/projects/ssd1680/en/latest/ - :alt: Documentation Status - - -.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg - :target: https://adafru.it/discord - :alt: Discord - - -.. image:: https://github.com/adafruit/Adafruit_CircuitPython_SSD1680/workflows/Build%20CI/badge.svg - :target: https://github.com/adafruit/Adafruit_CircuitPython_SSD1680/actions - :alt: Build Status - - -.. image:: https://img.shields.io/badge/code%20style-black-000000.svg - :target: https://github.com/psf/black - :alt: Code Style: Black - -CircuitPython `displayio` driver for SSD1680-based ePaper displays - -Dependencies -============= -This driver depends on: - -* `Adafruit CircuitPython `_ - -Please ensure all dependencies are available on the CircuitPython filesystem. -This is easily achieved by downloading -`the Adafruit library and driver bundle `_ -or individual libraries can be installed using -`circup `_. - -* Adafruit 2.13" 250x122 Tri-Color eInk / ePaper Display with SRAM - SSD1680 Driver - -`Purchase the Breakout from the Adafruit shop `_ - -* Adafruit 2.13" HD Tri-Color eInk / ePaper Display FeatherWing - 250x122 RW Panel with SSD1680 - -`Purchase the FeatherWing from the Adafruit shop `_ - -Installing from PyPI -===================== - -On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from -PyPI `_. To install for current user: - -.. code-block:: shell - - pip3 install adafruit-circuitpython-ssd1680 - -To install system-wide (this may be required in some cases): - -.. code-block:: shell - - sudo pip3 install adafruit-circuitpython-ssd1680 - -To install in a virtual environment in your current project: - -.. code-block:: shell - - mkdir project-name && cd project-name - python3 -m venv .venv - source .venv/bin/activate - pip3 install adafruit-circuitpython-ssd1680 - -Usage Example -============= - -.. code-block:: python - - import time - import board - import displayio - import adafruit_ssd1680 - - displayio.release_displays() - - # This pinout works on a Metro M4 and may need to be altered for other boards. - spi = board.SPI() # Uses SCK and MOSI - epd_cs = board.D9 - epd_dc = board.D10 - epd_reset = board.D8 # Set to None for FeatherWing - epd_busy = board.D7 # Set to None for FeatherWing - - display_bus = displayio.FourWire( - spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000 - ) - time.sleep(1) - - display = adafruit_ssd1680.SSD1680( - display_bus, - width=250, - height=122, - busy_pin=epd_busy, - highlight_color=0xFF0000, - rotation=270, - ) - - g = displayio.Group() - - # CircuitPython 6 & 7 compatible - f = open("/display-ruler.bmp", "rb") - pic = displayio.OnDiskBitmap(f) - t = displayio.TileGrid( - pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter()) - ) - - # # CircuitPython 7 compatible only - # pic = displayio.OnDiskBitmap("/display-ruler.bmp") - # t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) - - g.append(t) - - display.show(g) - - display.refresh() - print("refreshed") - - time.sleep(120) - - -Documentation -============= - -API documentation for this library can be found on `Read the Docs `_. - -For information on building library documentation, please check out `this guide `_. - -Contributing -============ - -Contributions are welcome! Please read our `Code of Conduct -`_ -before contributing to help this project stay welcoming. diff --git a/frozen/Adafruit_CircuitPython_SSD1680/README.rst.license b/frozen/Adafruit_CircuitPython_SSD1680/README.rst.license deleted file mode 100644 index 87eb036957..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/README.rst.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries -SPDX-License-Identifier: MIT diff --git a/frozen/Adafruit_CircuitPython_SSD1680/adafruit_ssd1680.py b/frozen/Adafruit_CircuitPython_SSD1680/adafruit_ssd1680.py deleted file mode 100644 index 490725fed6..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/adafruit_ssd1680.py +++ /dev/null @@ -1,100 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries -# -# SPDX-License-Identifier: MIT -""" -`adafruit_ssd1680` -================================================================================ - -CircuitPython `displayio` driver for SSD1680-based ePaper displays - - -* Author(s): Melissa LeBlanc-Williams - -Implementation Notes --------------------- - -**Hardware:** - -* `Adafruit 2.13" Tri-Color eInk Display Breakout `_ -* `Adafruit 2.13" Tri-Color eInk Display FeatherWing `_ - - -**Software and Dependencies:** - -* Adafruit CircuitPython firmware for the supported boards: - https://github.com/adafruit/circuitpython/releases - -""" - -import displayio - -__version__ = "0.0.0+auto.0" -__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_SSD1680.git" - -_START_SEQUENCE = ( - b"\x12\x80\x14" # soft reset and wait 20ms - b"\x11\x01\x03" # Ram data entry mode - b"\x3C\x01\x05" # border color - b"\x2c\x01\x36" # Set vcom voltage - b"\x03\x01\x17" # Set gate voltage - b"\x04\x03\x41\x00\x32" # Set source voltage - b"\x4e\x01\x01" # ram x count - b"\x4f\x02\x00\x00" # ram y count - b"\x01\x03\x00\x00\x00" # set display size - b"\x22\x01\xf4" # display update mode -) - -_STOP_SEQUENCE = b"\x10\x81\x01\x64" # Deep Sleep -# pylint: disable=too-few-public-methods -class SSD1680(displayio.EPaperDisplay): - r"""SSD1680 driver - - :param bus: The data bus the display is on - :param \**kwargs: - See below - - :Keyword Arguments: - * *width* (``int``) -- - Display width - * *height* (``int``) -- - Display height - * *rotation* (``int``) -- - Display rotation - """ - - def __init__(self, bus: displayio.Fourwire, **kwargs) -> None: - stop_sequence = bytearray(_STOP_SEQUENCE) - try: - bus.reset() - except RuntimeError: - # No reset pin defined, so no deep sleeping - stop_sequence = b"" - - start_sequence = bytearray(_START_SEQUENCE) - width = kwargs["width"] - height = kwargs["height"] - if "rotation" in kwargs and kwargs["rotation"] % 180 != 90: - width, height = height, width - start_sequence[29] = (width - 1) & 0xFF - start_sequence[30] = ((width - 1) >> 8) & 0xFF - - super().__init__( - bus, - start_sequence, - stop_sequence, - **kwargs, - ram_width=250, - ram_height=296, - busy_state=True, - write_black_ram_command=0x24, - write_color_ram_command=0x26, - black_bits_inverted=False, - set_column_window_command=0x44, - set_row_window_command=0x45, - set_current_column_command=0x4E, - set_current_row_command=0x4F, - refresh_display_command=0x20, - colstart=1, - always_toggle_chip_select=True, - ) diff --git a/frozen/Adafruit_CircuitPython_SSD1680/docs/_static/favicon.ico b/frozen/Adafruit_CircuitPython_SSD1680/docs/_static/favicon.ico deleted file mode 100644 index 5aca98376a1f7e593ebd9cf41a808512c2135635..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4414 zcmd^BX;4#F6n=SG-XmlONeGrD5E6J{RVh+e928U#MG!$jWvO+UsvWh`x&VqGNx*en zx=qox7Dqv{kPwo%fZC$dDwVpRtz{HzTkSs8QhG0)%Y=-3@Kt!4ag|JcIo?$-F|?bXVS9UDUyev>MVZQ(H8K4#;BQW-t2CPorj8^KJrMX}QK zp+e<;4ldpXz~=)2GxNy811&)gt-}Q*yVQpsxr@VMoA##{)$1~=bZ1MmjeFw?uT(`8 z^g=09<=zW%r%buwN%iHtuKSg|+r7HkT0PYN*_u9k1;^Ss-Z!RBfJ?Un4w(awqp2b3 z%+myoFis_lTlCrGx2z$0BQdh+7?!JK#9K9@Z!VrG zNj6gK5r(b4?YDOLw|DPRoN7bdP{(>GEG41YcN~4r_SUHU2hgVtUwZG@s%edC;k7Sn zC)RvEnlq~raE2mY2ko64^m1KQL}3riixh?#J{o)IT+K-RdHae2eRX91-+g!y`8^># z-zI0ir>P%Xon)!@xp-BK2bDYUB9k613NRrY6%lVjbFcQc*pRqiK~8xtkNPLxt}e?&QsTB}^!39t_%Qb)~Ukn0O%iC;zt z<&A-y;3h++)>c1br`5VFM~5(83!HKx$L+my8sW_c#@x*|*vB1yU)_dt3vH;2hqPWx zAl^6@?ipx&U7pf`a*>Yq6C85nb+B=Fnn+(id$W#WB^uHAcZVG`qg;rWB}ubvi(Y>D z$ei>REw$#xp0SHAd^|1hq&9HJ=jKK8^zTH~nk)G?yUcmTh9vUM6Y0LMw4(gYVY$D$ zGl&WY&H<)BbJ&3sYbKjx1j^=3-0Q#f^}(aP1?8^`&FUWMp|rmtpK)bLQ1Zo?^s4jqK=Lfg*9&geMGVQ z#^-*!V`fG@;H&{M9S8%+;|h&Qrxym0Ar>WT4BCVLR8cGXF=JmEYN(sNT(9vl+S|%g z8r7nXQ(95i^`=+XHo|){$vf2$?=`F$^&wFlYXyXg$B{a>$-Fp+V}+D;9k=~Xl~?C4 zAB-;RKXdUzBJE{V&d&%R>aEfFe;vxqI$0@hwVM}gFeQR@j}a>DDxR+n+-*6|_)k%% z*mSpDV|=5I9!&VC&9tD%fcVygWZV!iIo2qFtm#!*(s|@ZT33*Ad;+<|3^+yrp*;oH zBSYLV(H1zTU?2WjrCQoQW)Z>J2a=dTriuvezBmu16`tM2fm7Q@d4^iqII-xFpwHGI zn9CL}QE*1vdj2PX{PIuqOe5dracsciH6OlAZATvE8rj6ykqdIjal2 z0S0S~PwHb-5?OQ-tU-^KTG@XNrEVSvo|HIP?H;7ZhYeZkhSqh-{reE!5di;1zk$#Y zCe7rOnlzFYJ6Z#Hm$GoidKB=2HBCwm`BbZVeZY4ukmG%1uz7p2URs6c9j-Gjj^oQV zsdDb3@k2e`C$1I5ML5U0Qs0C1GAp^?!*`=|Nm(vWz3j*j*8ucum2;r0^-6Aca=Gv) zc%}&;!+_*S2tlnnJnz0EKeRmw-Y!@9ob!XQBwiv}^u9MkaXHvM=!<3YX;+2#5Cj5pp?FEK750S3BgeSDtaE^ zXUM@xoV6yBFKfzvY20V&Lr0yC - Adafruit 2.13" HD Tri-Color eInk / ePaper Display FeatherWing - -.. toctree:: - :caption: Other Links - - Download from GitHub - Download Library Bundle - CircuitPython Reference Documentation - CircuitPython Support Forum - Discord Chat - Adafruit Learning System - Adafruit Blog - Adafruit Store - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/frozen/Adafruit_CircuitPython_SSD1680/docs/index.rst.license b/frozen/Adafruit_CircuitPython_SSD1680/docs/index.rst.license deleted file mode 100644 index 52de478909..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/docs/index.rst.license +++ /dev/null @@ -1,4 +0,0 @@ -SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries - -SPDX-License-Identifier: MIT diff --git a/frozen/Adafruit_CircuitPython_SSD1680/docs/requirements.txt b/frozen/Adafruit_CircuitPython_SSD1680/docs/requirements.txt deleted file mode 100644 index 88e67331eb..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/docs/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries -# -# SPDX-License-Identifier: Unlicense - -sphinx>=4.0.0 diff --git a/frozen/Adafruit_CircuitPython_SSD1680/examples/display-ruler.bmp b/frozen/Adafruit_CircuitPython_SSD1680/examples/display-ruler.bmp deleted file mode 100644 index 726b5e026fd30b7e5baf5c23323d159b0eb5f65d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 360122 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 T`pMSbh(J1r2r{u6#p?e9C4JK7 diff --git a/frozen/Adafruit_CircuitPython_SSD1680/examples/display-ruler.bmp.license b/frozen/Adafruit_CircuitPython_SSD1680/examples/display-ruler.bmp.license deleted file mode 100644 index a784acfa32..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/examples/display-ruler.bmp.license +++ /dev/null @@ -1,2 +0,0 @@ -# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries -# SPDX-License-Identifier: MIT diff --git a/frozen/Adafruit_CircuitPython_SSD1680/examples/ssd1680_simpletest.py b/frozen/Adafruit_CircuitPython_SSD1680/examples/ssd1680_simpletest.py deleted file mode 100644 index 48a4d4d8bd..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/examples/ssd1680_simpletest.py +++ /dev/null @@ -1,60 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries -# -# SPDX-License-Identifier: Unlicense - -"""Simple test script for 2.13" 250x122 tri-color display. -Supported products: - * Adafruit 2.13" Tri-Color eInk Display Breakout - * https://www.adafruit.com/product/4947 - * Adafruit 2.13" Tri-Color eInk Display FeatherWing - * https://www.adafruit.com/product/4814 -""" - -import time -import board -import displayio -import adafruit_ssd1680 - -displayio.release_displays() - -# This pinout works on a Metro M4 and may need to be altered for other boards. -spi = board.SPI() # Uses SCK and MOSI -epd_cs = board.D9 -epd_dc = board.D10 -epd_reset = board.D8 # Set to None for FeatherWing -epd_busy = board.D7 # Set to None for FeatherWing - -display_bus = displayio.FourWire( - spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000 -) -time.sleep(1) - -display = adafruit_ssd1680.SSD1680( - display_bus, - width=250, - height=122, - busy_pin=epd_busy, - highlight_color=0xFF0000, - rotation=270, -) - -g = displayio.Group() - -with open("/display-ruler.bmp", "rb") as f: - pic = displayio.OnDiskBitmap(f) - # CircuitPython 6 & 7 compatible - t = displayio.TileGrid( - pic, pixel_shader=getattr(pic, "pixel_shader", displayio.ColorConverter()) - ) - # CircuitPython 7 compatible only - # t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) - g.append(t) - - display.show(g) - - display.refresh() - - print("refreshed") - - time.sleep(120) diff --git a/frozen/Adafruit_CircuitPython_SSD1680/optional_requirements.txt b/frozen/Adafruit_CircuitPython_SSD1680/optional_requirements.txt deleted file mode 100644 index d4e27c4d74..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/optional_requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Alec Delaney, for Adafruit Industries -# -# SPDX-License-Identifier: Unlicense diff --git a/frozen/Adafruit_CircuitPython_SSD1680/pyproject.toml b/frozen/Adafruit_CircuitPython_SSD1680/pyproject.toml deleted file mode 100644 index b36b2d7afb..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/pyproject.toml +++ /dev/null @@ -1,47 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Alec Delaney for Adafruit Industries -# -# SPDX-License-Identifier: MIT - -[build-system] -requires = [ - "setuptools", - "wheel", - "setuptools-scm", -] - -[project] -name = "adafruit-circuitpython-ssd1680" -description = "CircuitPython `displayio` drivers for SSD1680-based ePaper displays" -version = "0.0.0+auto.0" -readme = "README.rst" -authors = [ - {name = "Adafruit Industries", email = "circuitpython@adafruit.com"} -] -urls = {Homepage = "https://github.com/adafruit/Adafruit_CircuitPython_SSD1680"} -keywords = [ - "adafruit", - "blinka", - "circuitpython", - "micropython", - "ssd1680", - "displayio", - "epd", - "epaper", -] -license = {text = "MIT"} -classifiers = [ - "Intended Audience :: Developers", - "Topic :: Software Development :: Libraries", - "Topic :: Software Development :: Embedded Systems", - "Topic :: System :: Hardware", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3", -] -dynamic = ["dependencies", "optional-dependencies"] - -[tool.setuptools] -py-modules = ["adafruit_ssd1680"] - -[tool.setuptools.dynamic] -dependencies = {file = ["requirements.txt"]} -optional-dependencies = {optional = {file = ["optional_requirements.txt"]}} diff --git a/frozen/Adafruit_CircuitPython_SSD1680/requirements.txt b/frozen/Adafruit_CircuitPython_SSD1680/requirements.txt deleted file mode 100644 index 7a984a4739..0000000000 --- a/frozen/Adafruit_CircuitPython_SSD1680/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Alec Delaney, for Adafruit Industries -# -# SPDX-License-Identifier: Unlicense - -Adafruit-Blinka From 8c41eb900ea940f1348cfa0e982a00ddc829b48a Mon Sep 17 00:00:00 2001 From: dronecz Date: Mon, 31 Oct 2022 21:39:12 +0100 Subject: [PATCH 09/75] Delete frozen/Adafruit_CircuitPython_UC8151D directory --- .../adafruit_circuitpython_pr.md | 13 - .../.github/workflows/build.yml | 77 ---- .../.github/workflows/failure-help-text.yml | 19 - .../.github/workflows/release.yml | 88 ---- .../Adafruit_CircuitPython_UC8151D/.gitignore | 47 -- .../.pre-commit-config.yaml | 42 -- .../Adafruit_CircuitPython_UC8151D/.pylintrc | 436 ------------------ .../.readthedocs.yaml | 19 - .../CODE_OF_CONDUCT.md | 141 ------ frozen/Adafruit_CircuitPython_UC8151D/LICENSE | 21 - .../LICENSES/CC-BY-4.0.txt | 324 ------------- .../LICENSES/MIT.txt | 19 - .../LICENSES/Unlicense.txt | 20 - .../Adafruit_CircuitPython_UC8151D/README.rst | 149 ------ .../README.rst.license | 3 - .../adafruit_uc8151d.py | 132 ------ .../docs/_static/favicon.ico | Bin 4414 -> 0 bytes .../docs/_static/favicon.ico.license | 3 - .../docs/api.rst | 8 - .../docs/api.rst.license | 4 - .../docs/conf.py | 195 -------- .../docs/examples.rst | 8 - .../docs/examples.rst.license | 4 - .../docs/index.rst | 51 -- .../docs/index.rst.license | 4 - .../docs/requirements.txt | 5 - .../examples/display-ruler.bmp | Bin 360122 -> 0 bytes .../examples/display-ruler.bmp.license | 2 - .../examples/uc8151d_grayscale_test.py | 68 --- .../examples/uc8151d_simpletest.py | 48 -- .../optional_requirements.txt | 3 - .../pyproject.toml | 50 -- .../requirements.txt | 6 - 33 files changed, 2009 deletions(-) delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/build.yml delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/failure-help-text.yml delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/release.yml delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/.gitignore delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/.pre-commit-config.yaml delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/.pylintrc delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/.readthedocs.yaml delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/CODE_OF_CONDUCT.md delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/LICENSE delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/LICENSES/CC-BY-4.0.txt delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/LICENSES/MIT.txt delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/LICENSES/Unlicense.txt delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/README.rst delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/README.rst.license delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/adafruit_uc8151d.py delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/_static/favicon.ico delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/_static/favicon.ico.license delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/api.rst delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/api.rst.license delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/conf.py delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/examples.rst delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/examples.rst.license delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/index.rst delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/index.rst.license delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/docs/requirements.txt delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/examples/display-ruler.bmp delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/examples/display-ruler.bmp.license delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/examples/uc8151d_grayscale_test.py delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/examples/uc8151d_simpletest.py delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/optional_requirements.txt delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/pyproject.toml delete mode 100644 frozen/Adafruit_CircuitPython_UC8151D/requirements.txt diff --git a/frozen/Adafruit_CircuitPython_UC8151D/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md b/frozen/Adafruit_CircuitPython_UC8151D/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md deleted file mode 100644 index 8de294e68a..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/.github/PULL_REQUEST_TEMPLATE/adafruit_circuitpython_pr.md +++ /dev/null @@ -1,13 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Adafruit Industries -# -# SPDX-License-Identifier: MIT - -Thank you for contributing! Before you submit a pull request, please read the following. - -Make sure any changes you're submitting are in line with the CircuitPython Design Guide, available here: https://docs.circuitpython.org/en/latest/docs/design_guide.html - -If your changes are to documentation, please verify that the documentation builds locally by following the steps found here: https://adafru.it/build-docs - -Before submitting the pull request, make sure you've run Pylint and Black locally on your code. You can do this manually or using pre-commit. Instructions are available here: https://adafru.it/check-your-code - -Please remove all of this text before submitting. Include an explanation or list of changes included in your PR, as well as, if applicable, a link to any related issues. diff --git a/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/build.yml b/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/build.yml deleted file mode 100644 index cb2f60e36a..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/build.yml +++ /dev/null @@ -1,77 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -# -# SPDX-License-Identifier: MIT - -name: Build CI - -on: [pull_request, push] - -jobs: - test: - runs-on: ubuntu-latest - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: echo "$GITHUB_CONTEXT" - - name: Translate Repo Name For Build Tools filename_prefix - id: repo-name - run: | - echo ::set-output name=repo-name::$( - echo ${{ github.repository }} | - awk -F '\/' '{ print tolower($2) }' | - tr '_' '-' - ) - - name: Set up Python 3.x - uses: actions/setup-python@v2 - with: - python-version: "3.x" - - name: Versions - run: | - python3 --version - - name: Checkout Current Repo - uses: actions/checkout@v1 - with: - submodules: true - - name: Checkout tools repo - uses: actions/checkout@v2 - with: - repository: adafruit/actions-ci-circuitpython-libs - path: actions-ci - - name: Install dependencies - # (e.g. - apt-get: gettext, etc; pip: circuitpython-build-tools, requirements.txt; etc.) - run: | - source actions-ci/install.sh - - name: Pip install Sphinx, pre-commit - run: | - pip install --force-reinstall Sphinx sphinx-rtd-theme pre-commit - - name: Library version - run: git describe --dirty --always --tags - - name: Setup problem matchers - uses: adafruit/circuitpython-action-library-ci-problem-matchers@v1 - - name: Pre-commit hooks - run: | - pre-commit run --all-files - - name: Build assets - run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . - - name: Archive bundles - uses: actions/upload-artifact@v2 - with: - name: bundles - path: ${{ github.workspace }}/bundles/ - - name: Build docs - working-directory: docs - run: sphinx-build -E -W -b html . _build/html - - name: Check For pyproject.toml - id: need-pypi - run: | - echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' ) - - name: Build Python package - if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') - run: | - pip install --upgrade build twine - for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do - sed -i -e "s/0.0.0+auto.0/1.2.3/" $file; - done; - python -m build - twine check dist/* diff --git a/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/failure-help-text.yml b/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/failure-help-text.yml deleted file mode 100644 index 0b1194f0cd..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/failure-help-text.yml +++ /dev/null @@ -1,19 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Scott Shawcroft for Adafruit Industries -# -# SPDX-License-Identifier: MIT - -name: Failure help text - -on: - workflow_run: - workflows: ["Build CI"] - types: - - completed - -jobs: - post-help: - runs-on: ubuntu-latest - if: ${{ github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event == 'pull_request' }} - steps: - - name: Post comment to help - uses: adafruit/circuitpython-action-library-ci-failed@v1 diff --git a/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/release.yml b/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/release.yml deleted file mode 100644 index f3a0325ba3..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/.github/workflows/release.yml +++ /dev/null @@ -1,88 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -# -# SPDX-License-Identifier: MIT - -name: Release Actions - -on: - release: - types: [published] - -jobs: - upload-release-assets: - runs-on: ubuntu-latest - steps: - - name: Dump GitHub context - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - run: echo "$GITHUB_CONTEXT" - - name: Translate Repo Name For Build Tools filename_prefix - id: repo-name - run: | - echo ::set-output name=repo-name::$( - echo ${{ github.repository }} | - awk -F '\/' '{ print tolower($2) }' | - tr '_' '-' - ) - - name: Set up Python 3.x - uses: actions/setup-python@v2 - with: - python-version: "3.x" - - name: Versions - run: | - python3 --version - - name: Checkout Current Repo - uses: actions/checkout@v1 - with: - submodules: true - - name: Checkout tools repo - uses: actions/checkout@v2 - with: - repository: adafruit/actions-ci-circuitpython-libs - path: actions-ci - - name: Install deps - run: | - source actions-ci/install.sh - - name: Build assets - run: circuitpython-build-bundles --filename_prefix ${{ steps.repo-name.outputs.repo-name }} --library_location . - - name: Upload Release Assets - # the 'official' actions version does not yet support dynamically - # supplying asset names to upload. @csexton's version chosen based on - # discussion in the issue below, as its the simplest to implement and - # allows for selecting files with a pattern. - # https://github.com/actions/upload-release-asset/issues/4 - #uses: actions/upload-release-asset@v1.0.1 - uses: csexton/release-asset-action@master - with: - pattern: "bundles/*" - github-token: ${{ secrets.GITHUB_TOKEN }} - - upload-pypi: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v1 - - name: Check For pyproject.toml - id: need-pypi - run: | - echo ::set-output name=pyproject-toml::$( find . -wholename './pyproject.toml' ) - - name: Set up Python - if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') - uses: actions/setup-python@v2 - with: - python-version: '3.x' - - name: Install dependencies - if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') - run: | - python -m pip install --upgrade pip - pip install --upgrade build twine - - name: Build and publish - if: contains(steps.need-pypi.outputs.pyproject-toml, 'pyproject.toml') - env: - TWINE_USERNAME: ${{ secrets.pypi_username }} - TWINE_PASSWORD: ${{ secrets.pypi_password }} - run: | - for file in $(find -not -path "./.*" -not -path "./docs*" \( -name "*.py" -o -name "*.toml" \) ); do - sed -i -e "s/0.0.0+auto.0/${{github.event.release.tag_name}}/" $file; - done; - python -m build - twine upload dist/* diff --git a/frozen/Adafruit_CircuitPython_UC8151D/.gitignore b/frozen/Adafruit_CircuitPython_UC8151D/.gitignore deleted file mode 100644 index 544ec4a695..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/.gitignore +++ /dev/null @@ -1,47 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Kattni Rembor, written for Adafruit Industries -# -# SPDX-License-Identifier: MIT - -# Do not include files and directories created by your personal work environment, such as the IDE -# you use, except for those already listed here. Pull requests including changes to this file will -# not be accepted. - -# This .gitignore file contains rules for files generated by working with CircuitPython libraries, -# including building Sphinx, testing with pip, and creating a virual environment, as well as the -# MacOS and IDE-specific files generated by using MacOS in general, or the PyCharm or VSCode IDEs. - -# If you find that there are files being generated on your machine that should not be included in -# your git commit, you should create a .gitignore_global file on your computer to include the -# files created by your personal setup. To do so, follow the two steps below. - -# First, create a file called .gitignore_global somewhere convenient for you, and add rules for -# the files you want to exclude from git commits. - -# Second, configure Git to use the exclude file for all Git repositories by running the -# following via commandline, replacing "path/to/your/" with the actual path to your newly created -# .gitignore_global file: -# git config --global core.excludesfile path/to/your/.gitignore_global - -# CircuitPython-specific files -*.mpy - -# Python-specific files -__pycache__ -*.pyc - -# Sphinx build-specific files -_build - -# This file results from running `pip -e install .` in a local repository -*.egg-info - -# Virtual environment-specific files -.env - -# MacOS-specific files -*.DS_Store - -# IDE-specific files -.idea -.vscode -*~ diff --git a/frozen/Adafruit_CircuitPython_UC8151D/.pre-commit-config.yaml b/frozen/Adafruit_CircuitPython_UC8151D/.pre-commit-config.yaml deleted file mode 100644 index 3343606412..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/.pre-commit-config.yaml +++ /dev/null @@ -1,42 +0,0 @@ -# SPDX-FileCopyrightText: 2020 Diego Elio Pettenò -# -# SPDX-License-Identifier: Unlicense - -repos: - - repo: https://github.com/python/black - rev: 22.3.0 - hooks: - - id: black - - repo: https://github.com/fsfe/reuse-tool - rev: v0.14.0 - hooks: - - id: reuse - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.2.0 - hooks: - - id: check-yaml - - id: end-of-file-fixer - - id: trailing-whitespace - - repo: https://github.com/pycqa/pylint - rev: v2.11.1 - hooks: - - id: pylint - name: pylint (library code) - types: [python] - args: - - --disable=consider-using-f-string - exclude: "^(docs/|examples/|tests/|setup.py$)" - - id: pylint - name: pylint (example code) - description: Run pylint rules on "examples/*.py" files - types: [python] - files: "^examples/" - args: - - --disable=missing-docstring,invalid-name,consider-using-f-string,duplicate-code - - id: pylint - name: pylint (test code) - description: Run pylint rules on "tests/*.py" files - types: [python] - files: "^tests/" - args: - - --disable=missing-docstring,consider-using-f-string,duplicate-code diff --git a/frozen/Adafruit_CircuitPython_UC8151D/.pylintrc b/frozen/Adafruit_CircuitPython_UC8151D/.pylintrc deleted file mode 100644 index 1f42e5de32..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/.pylintrc +++ /dev/null @@ -1,436 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -# -# SPDX-License-Identifier: Unlicense - -[MASTER] - -# A comma-separated list of package or module names from where C extensions may -# be loaded. Extensions are loading into the active Python interpreter and may -# run arbitrary code -extension-pkg-whitelist= - -# Add files or directories to the ignore-list. They should be base names, not -# paths. -ignore=CVS - -# Add files or directories matching the regex patterns to the ignore-list. The -# regex matches against base names, not paths. -ignore-patterns= - -# Python code to execute, usually for sys.path manipulation such as -# pygtk.require(). -#init-hook= - -# Use multiple processes to speed up Pylint. -jobs=1 - -# List of plugins (as comma separated values of python modules names) to load, -# usually to register additional checkers. -load-plugins= - -# Pickle collected data for later comparisons. -persistent=yes - -# Specify a configuration file. -#rcfile= - -# Allow loading of arbitrary C extensions. Extensions are imported into the -# active Python interpreter and may run arbitrary code. -unsafe-load-any-extension=no - - -[MESSAGES CONTROL] - -# Only show warnings with the listed confidence levels. Leave empty to show -# all. Valid levels: HIGH, INFERENCE, INFERENCE_FAILURE, UNDEFINED -confidence= - -# Disable the message, report, category or checker with the given id(s). You -# can either give multiple identifiers separated by comma (,) or put this -# option multiple times (only on the command line, not in the configuration -# file where it should appear only once).You can also use "--disable=all" to -# disable everything first and then reenable specific checks. For example, if -# you want to run only the similarities checker, you can use "--disable=all -# --enable=similarities". If you want to run only the classes checker, but have -# no Warning level messages displayed, use"--disable=all --enable=classes -# --disable=W" -# disable=import-error,print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call -disable=print-statement,parameter-unpacking,unpacking-in-except,old-raise-syntax,backtick,long-suffix,old-ne-operator,old-octal-literal,import-star-module-level,raw-checker-failed,bad-inline-option,locally-disabled,locally-enabled,file-ignored,suppressed-message,useless-suppression,deprecated-pragma,apply-builtin,basestring-builtin,buffer-builtin,cmp-builtin,coerce-builtin,execfile-builtin,file-builtin,long-builtin,raw_input-builtin,reduce-builtin,standarderror-builtin,unicode-builtin,xrange-builtin,coerce-method,delslice-method,getslice-method,setslice-method,no-absolute-import,old-division,dict-iter-method,dict-view-method,next-method-called,metaclass-assignment,indexing-exception,raising-string,reload-builtin,oct-method,hex-method,nonzero-method,cmp-method,input-builtin,round-builtin,intern-builtin,unichr-builtin,map-builtin-not-iterating,zip-builtin-not-iterating,range-builtin-not-iterating,filter-builtin-not-iterating,using-cmp-argument,eq-without-hash,div-method,idiv-method,rdiv-method,exception-message-attribute,invalid-str-codec,sys-max-int,bad-python3-import,deprecated-string-function,deprecated-str-translate-call,import-error,bad-continuation,pointless-string-statement,unspecified-encoding - -# Enable the message, report, category or checker with the given id(s). You can -# either give multiple identifier separated by comma (,) or put this option -# multiple time (only on the command line, not in the configuration file where -# it should appear only once). See also the "--disable" option for examples. -enable= - - -[REPORTS] - -# Python expression which should return a note less than 10 (10 is the highest -# note). You have access to the variables errors warning, statement which -# respectively contain the number of errors / warnings messages and the total -# number of statements analyzed. This is used by the global evaluation report -# (RP0004). -evaluation=10.0 - ((float(5 * error + warning + refactor + convention) / statement) * 10) - -# Template used to display messages. This is a python new-style format string -# used to format the message information. See doc for all details -#msg-template= - -# Set the output format. Available formats are text, parseable, colorized, json -# and msvs (visual studio).You can also give a reporter class, eg -# mypackage.mymodule.MyReporterClass. -output-format=text - -# Tells whether to display a full report or only the messages -reports=no - -# Activate the evaluation score. -score=yes - - -[REFACTORING] - -# Maximum number of nested blocks for function / method body -max-nested-blocks=5 - - -[LOGGING] - -# Logging modules to check that the string format arguments are in logging -# function parameter format -logging-modules=logging - - -[SPELLING] - -# Spelling dictionary name. Available dictionaries: none. To make it working -# install python-enchant package. -spelling-dict= - -# List of comma separated words that should not be checked. -spelling-ignore-words= - -# A path to a file that contains private dictionary; one word per line. -spelling-private-dict-file= - -# Tells whether to store unknown words to indicated private dictionary in -# --spelling-private-dict-file option instead of raising a message. -spelling-store-unknown-words=no - - -[MISCELLANEOUS] - -# List of note tags to take in consideration, separated by a comma. -# notes=FIXME,XXX,TODO -notes=FIXME,XXX - - -[TYPECHECK] - -# List of decorators that produce context managers, such as -# contextlib.contextmanager. Add to this list to register other decorators that -# produce valid context managers. -contextmanager-decorators=contextlib.contextmanager - -# List of members which are set dynamically and missed by pylint inference -# system, and so shouldn't trigger E1101 when accessed. Python regular -# expressions are accepted. -generated-members= - -# Tells whether missing members accessed in mixin class should be ignored. A -# mixin class is detected if its name ends with "mixin" (case insensitive). -ignore-mixin-members=yes - -# This flag controls whether pylint should warn about no-member and similar -# checks whenever an opaque object is returned when inferring. The inference -# can return multiple potential results while evaluating a Python object, but -# some branches might not be evaluated, which results in partial inference. In -# that case, it might be useful to still emit no-member and other checks for -# the rest of the inferred objects. -ignore-on-opaque-inference=yes - -# List of class names for which member attributes should not be checked (useful -# for classes with dynamically set attributes). This supports the use of -# qualified names. -ignored-classes=optparse.Values,thread._local,_thread._local - -# List of module names for which member attributes should not be checked -# (useful for modules/projects where namespaces are manipulated during runtime -# and thus existing member attributes cannot be deduced by static analysis. It -# supports qualified module names, as well as Unix pattern matching. -ignored-modules=board - -# Show a hint with possible names when a member name was not found. The aspect -# of finding the hint is based on edit distance. -missing-member-hint=yes - -# The minimum edit distance a name should have in order to be considered a -# similar match for a missing member name. -missing-member-hint-distance=1 - -# The total number of similar names that should be taken in consideration when -# showing a hint for a missing member. -missing-member-max-choices=1 - - -[VARIABLES] - -# List of additional names supposed to be defined in builtins. Remember that -# you should avoid to define new builtins when possible. -additional-builtins= - -# Tells whether unused global variables should be treated as a violation. -allow-global-unused-variables=yes - -# List of strings which can identify a callback function by name. A callback -# name must start or end with one of those strings. -callbacks=cb_,_cb - -# A regular expression matching the name of dummy variables (i.e. expectedly -# not used). -dummy-variables-rgx=_+$|(_[a-zA-Z0-9_]*[a-zA-Z0-9]+?$)|dummy|^ignored_|^unused_ - -# Argument names that match this expression will be ignored. Default to name -# with leading underscore -ignored-argument-names=_.*|^ignored_|^unused_ - -# Tells whether we should check for unused import in __init__ files. -init-import=no - -# List of qualified module names which can have objects that can redefine -# builtins. -redefining-builtins-modules=six.moves,future.builtins - - -[FORMAT] - -# Expected format of line ending, e.g. empty (any line ending), LF or CRLF. -# expected-line-ending-format= -expected-line-ending-format=LF - -# Regexp for a line that is allowed to be longer than the limit. -ignore-long-lines=^\s*(# )??$ - -# Number of spaces of indent required inside a hanging or continued line. -indent-after-paren=4 - -# String used as indentation unit. This is usually " " (4 spaces) or "\t" (1 -# tab). -indent-string=' ' - -# Maximum number of characters on a single line. -max-line-length=100 - -# Maximum number of lines in a module -max-module-lines=1000 - -# List of optional constructs for which whitespace checking is disabled. `dict- -# separator` is used to allow tabulation in dicts, etc.: {1 : 1,\n222: 2}. -# `trailing-comma` allows a space between comma and closing bracket: (a, ). -# `empty-line` allows space-only lines. -no-space-check=trailing-comma,dict-separator - -# Allow the body of a class to be on the same line as the declaration if body -# contains single statement. -single-line-class-stmt=no - -# Allow the body of an if to be on the same line as the test if there is no -# else. -single-line-if-stmt=no - - -[SIMILARITIES] - -# Ignore comments when computing similarities. -ignore-comments=yes - -# Ignore docstrings when computing similarities. -ignore-docstrings=yes - -# Ignore imports when computing similarities. -ignore-imports=yes - -# Minimum lines number of a similarity. -min-similarity-lines=12 - - -[BASIC] - -# Naming hint for argument names -argument-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Regular expression matching correct argument names -argument-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Naming hint for attribute names -attr-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Regular expression matching correct attribute names -attr-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Bad variable names which should always be refused, separated by a comma -bad-names=foo,bar,baz,toto,tutu,tata - -# Naming hint for class attribute names -class-attribute-name-hint=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ - -# Regular expression matching correct class attribute names -class-attribute-rgx=([A-Za-z_][A-Za-z0-9_]{2,30}|(__.*__))$ - -# Naming hint for class names -# class-name-hint=[A-Z_][a-zA-Z0-9]+$ -class-name-hint=[A-Z_][a-zA-Z0-9_]+$ - -# Regular expression matching correct class names -# class-rgx=[A-Z_][a-zA-Z0-9]+$ -class-rgx=[A-Z_][a-zA-Z0-9_]+$ - -# Naming hint for constant names -const-name-hint=(([A-Z_][A-Z0-9_]*)|(__.*__))$ - -# Regular expression matching correct constant names -const-rgx=(([A-Z_][A-Z0-9_]*)|(__.*__))$ - -# Minimum line length for functions/classes that require docstrings, shorter -# ones are exempt. -docstring-min-length=-1 - -# Naming hint for function names -function-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Regular expression matching correct function names -function-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Good variable names which should always be accepted, separated by a comma -# good-names=i,j,k,ex,Run,_ -good-names=r,g,b,w,i,j,k,n,x,y,z,ex,ok,Run,_ - -# Include a hint for the correct naming format with invalid-name -include-naming-hint=no - -# Naming hint for inline iteration names -inlinevar-name-hint=[A-Za-z_][A-Za-z0-9_]*$ - -# Regular expression matching correct inline iteration names -inlinevar-rgx=[A-Za-z_][A-Za-z0-9_]*$ - -# Naming hint for method names -method-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Regular expression matching correct method names -method-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Naming hint for module names -module-name-hint=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ - -# Regular expression matching correct module names -module-rgx=(([a-z_][a-z0-9_]*)|([A-Z][a-zA-Z0-9]+))$ - -# Colon-delimited sets of names that determine each other's naming style when -# the name regexes allow several styles. -name-group= - -# Regular expression which should only match function or class names that do -# not require a docstring. -no-docstring-rgx=^_ - -# List of decorators that produce properties, such as abc.abstractproperty. Add -# to this list to register other decorators that produce valid properties. -property-classes=abc.abstractproperty - -# Naming hint for variable names -variable-name-hint=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - -# Regular expression matching correct variable names -variable-rgx=(([a-z][a-z0-9_]{2,30})|(_[a-z0-9_]*))$ - - -[IMPORTS] - -# Allow wildcard imports from modules that define __all__. -allow-wildcard-with-all=no - -# Analyse import fallback blocks. This can be used to support both Python 2 and -# 3 compatible code, which means that the block might have code that exists -# only in one or another interpreter, leading to false positives when analysed. -analyse-fallback-blocks=no - -# Deprecated modules which should not be used, separated by a comma -deprecated-modules=optparse,tkinter.tix - -# Create a graph of external dependencies in the given file (report RP0402 must -# not be disabled) -ext-import-graph= - -# Create a graph of every (i.e. internal and external) dependencies in the -# given file (report RP0402 must not be disabled) -import-graph= - -# Create a graph of internal dependencies in the given file (report RP0402 must -# not be disabled) -int-import-graph= - -# Force import order to recognize a module as part of the standard -# compatibility libraries. -known-standard-library= - -# Force import order to recognize a module as part of a third party library. -known-third-party=enchant - - -[CLASSES] - -# List of method names used to declare (i.e. assign) instance attributes. -defining-attr-methods=__init__,__new__,setUp - -# List of member names, which should be excluded from the protected access -# warning. -exclude-protected=_asdict,_fields,_replace,_source,_make - -# List of valid names for the first argument in a class method. -valid-classmethod-first-arg=cls - -# List of valid names for the first argument in a metaclass class method. -valid-metaclass-classmethod-first-arg=mcs - - -[DESIGN] - -# Maximum number of arguments for function / method -max-args=5 - -# Maximum number of attributes for a class (see R0902). -# max-attributes=7 -max-attributes=11 - -# Maximum number of boolean expressions in a if statement -max-bool-expr=5 - -# Maximum number of branch for function / method body -max-branches=12 - -# Maximum number of locals for function / method body -max-locals=15 - -# Maximum number of parents for a class (see R0901). -max-parents=7 - -# Maximum number of public methods for a class (see R0904). -max-public-methods=20 - -# Maximum number of return / yield for function / method body -max-returns=6 - -# Maximum number of statements in function / method body -max-statements=50 - -# Minimum number of public methods for a class (see R0903). -min-public-methods=1 - - -[EXCEPTIONS] - -# Exceptions that will emit a warning when being caught. Defaults to -# "Exception" -overgeneral-exceptions=Exception diff --git a/frozen/Adafruit_CircuitPython_UC8151D/.readthedocs.yaml b/frozen/Adafruit_CircuitPython_UC8151D/.readthedocs.yaml deleted file mode 100644 index 33c2a6108e..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/.readthedocs.yaml +++ /dev/null @@ -1,19 +0,0 @@ -# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries -# -# SPDX-License-Identifier: Unlicense - -# Read the Docs configuration file -# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details - -# Required -version: 2 - -build: - os: ubuntu-20.04 - tools: - python: "3" - -python: - install: - - requirements: docs/requirements.txt - - requirements: requirements.txt diff --git a/frozen/Adafruit_CircuitPython_UC8151D/CODE_OF_CONDUCT.md b/frozen/Adafruit_CircuitPython_UC8151D/CODE_OF_CONDUCT.md deleted file mode 100644 index 01a7515796..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/CODE_OF_CONDUCT.md +++ /dev/null @@ -1,141 +0,0 @@ - -# Adafruit Community Code of Conduct - -## Our Pledge - -In the interest of fostering an open and welcoming environment, we as -contributors and leaders pledge to making participation in our project and -our community a harassment-free experience for everyone, regardless of age, body -size, disability, ethnicity, gender identity and expression, level or type of -experience, education, socio-economic status, nationality, personal appearance, -race, religion, or sexual identity and orientation. - -## Our Standards - -We are committed to providing a friendly, safe and welcoming environment for -all. - -Examples of behavior that contributes to creating a positive environment -include: - -* Be kind and courteous to others -* Using welcoming and inclusive language -* Being respectful of differing viewpoints and experiences -* Collaborating with other community members -* Gracefully accepting constructive criticism -* Focusing on what is best for the community -* Showing empathy towards other community members - -Examples of unacceptable behavior by participants include: - -* The use of sexualized language or imagery and sexual attention or advances -* The use of inappropriate images, including in a community member's avatar -* The use of inappropriate language, including in a community member's nickname -* Any spamming, flaming, baiting or other attention-stealing behavior -* Excessive or unwelcome helping; answering outside the scope of the question - asked -* Discussion or promotion of activities or projects that intend or pose a risk of - significant harm -* Trolling, insulting/derogatory comments, and personal or political attacks -* Promoting or spreading disinformation, lies, or conspiracy theories against - a person, group, organisation, project, or community -* Public or private harassment -* Publishing others' private information, such as a physical or electronic - address, without explicit permission -* Other conduct which could reasonably be considered inappropriate - -The goal of the standards and moderation guidelines outlined here is to build -and maintain a respectful community. We ask that you don’t just aim to be -"technically unimpeachable", but rather try to be your best self. - -We value many things beyond technical expertise, including collaboration and -supporting others within our community. Providing a positive experience for -other community members can have a much more significant impact than simply -providing the correct answer. - -## Our Responsibilities - -Project leaders are responsible for clarifying the standards of acceptable -behavior and are expected to take appropriate and fair corrective action in -response to any instances of unacceptable behavior. - -Project leaders have the right and responsibility to remove, edit, or -reject messages, comments, commits, code, issues, and other contributions -that are not aligned to this Code of Conduct, or to ban temporarily or -permanently any community member for other behaviors that they deem -inappropriate, threatening, offensive, or harmful. - -## Moderation - -Instances of behaviors that violate the Adafruit Community Code of Conduct -may be reported by any member of the community. Community members are -encouraged to report these situations, including situations they witness -involving other community members. - -You may report in the following ways: - -In any situation, you may email . - -On the Adafruit Discord, you may send an open message from any channel -to all Community Moderators by tagging @community moderators. You may -also send an open message from any channel, or a direct message to -any Community Moderator. - -Email and direct message reports will be kept confidential. - -In situations on Discord where the issue is particularly offensive, possibly -illegal, requires immediate action, or violates the Discord terms of service, -you should also report the message directly to [Discord](https://discord.com/safety). - -These are the steps for upholding our community’s standards of conduct. - -1. Any member of the community may report any situation that violates the - CircuitPython Community Code of Conduct. All reports will be reviewed and - investigated. -2. If the behavior is a severe violation, the community member who - committed the violation may be banned immediately, without warning. -3. Otherwise, moderators will first respond to such behavior with a warning. -4. Moderators follow a soft "three strikes" policy - the community member may - be given another chance, if they are receptive to the warning and change their - behavior. -5. If the community member is unreceptive or unreasonable when warned by a - moderator, or the warning goes unheeded, they may be banned for a first or - second offense. Repeated offenses will result in the community member being - banned. -6. Disciplinary actions (warnings, bans, etc) for Code of Conduct violations apply - to the platform where the violation occurred. However, depending on the severity - of the violation, the disciplinary action may be applied across Adafruit's other - community platforms. For example, a severe violation on the Adafruit Discord - server may result in a ban on not only the Adafruit Discord server, but also on - the Adafruit GitHub organisation, Adafruit Forums, Adafruit Twitter, etc. - -## Scope - -This Code of Conduct and the enforcement policies listed above apply to all -Adafruit Community venues. This includes but is not limited to any community -spaces (both public and private), the entire Adafruit Discord server, and -Adafruit GitHub repositories. Examples of Adafruit Community spaces include -but are not limited to meet-ups, audio chats on the Adafruit Discord, or -interaction at a conference. - -This Code of Conduct applies both within project spaces and in public spaces -when an individual is representing the project or its community. As a community -member, you are representing our community, and are expected to behave -accordingly. - -## Attribution - -This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), -version 1.4, available on [contributor-covenant.org](https://www.contributor-covenant.org/version/1/4/code-of-conduct.html), -and the [Rust Code of Conduct](https://www.rust-lang.org/en-US/conduct.html). - -For other projects adopting the Adafruit Community Code of -Conduct, please contact the maintainers of those projects for enforcement. -If you wish to use this code of conduct for your own project, consider -explicitly mentioning your moderation policy or making a copy with your -own moderation policy so as to avoid confusion. diff --git a/frozen/Adafruit_CircuitPython_UC8151D/LICENSE b/frozen/Adafruit_CircuitPython_UC8151D/LICENSE deleted file mode 100644 index 88160406de..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/LICENSE +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in all -copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -SOFTWARE. diff --git a/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/CC-BY-4.0.txt b/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/CC-BY-4.0.txt deleted file mode 100644 index 3f92dfc5fd..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/CC-BY-4.0.txt +++ /dev/null @@ -1,324 +0,0 @@ -Creative Commons Attribution 4.0 International Creative Commons Corporation -("Creative Commons") is not a law firm and does not provide legal services -or legal advice. Distribution of Creative Commons public licenses does not -create a lawyer-client or other relationship. Creative Commons makes its licenses -and related information available on an "as-is" basis. Creative Commons gives -no warranties regarding its licenses, any material licensed under their terms -and conditions, or any related information. Creative Commons disclaims all -liability for damages resulting from their use to the fullest extent possible. - -Using Creative Commons Public Licenses - -Creative Commons public licenses provide a standard set of terms and conditions -that creators and other rights holders may use to share original works of -authorship and other material subject to copyright and certain other rights -specified in the public license below. The following considerations are for -informational purposes only, are not exhaustive, and do not form part of our -licenses. - -Considerations for licensors: Our public licenses are intended for use by -those authorized to give the public permission to use material in ways otherwise -restricted by copyright and certain other rights. Our licenses are irrevocable. -Licensors should read and understand the terms and conditions of the license -they choose before applying it. Licensors should also secure all rights necessary -before applying our licenses so that the public can reuse the material as -expected. Licensors should clearly mark any material not subject to the license. -This includes other CC-licensed material, or material used under an exception -or limitation to copyright. More considerations for licensors : wiki.creativecommons.org/Considerations_for_licensors - -Considerations for the public: By using one of our public licenses, a licensor -grants the public permission to use the licensed material under specified -terms and conditions. If the licensor's permission is not necessary for any -reason–for example, because of any applicable exception or limitation to copyright–then -that use is not regulated by the license. Our licenses grant only permissions -under copyright and certain other rights that a licensor has authority to -grant. Use of the licensed material may still be restricted for other reasons, -including because others have copyright or other rights in the material. A -licensor may make special requests, such as asking that all changes be marked -or described. Although not required by our licenses, you are encouraged to -respect those requests where reasonable. More considerations for the public -: wiki.creativecommons.org/Considerations_for_licensees Creative Commons Attribution -4.0 International Public License - -By exercising the Licensed Rights (defined below), You accept and agree to -be bound by the terms and conditions of this Creative Commons Attribution -4.0 International Public License ("Public License"). To the extent this Public -License may be interpreted as a contract, You are granted the Licensed Rights -in consideration of Your acceptance of these terms and conditions, and the -Licensor grants You such rights in consideration of benefits the Licensor -receives from making the Licensed Material available under these terms and -conditions. - -Section 1 – Definitions. - -a. Adapted Material means material subject to Copyright and Similar Rights -that is derived from or based upon the Licensed Material and in which the -Licensed Material is translated, altered, arranged, transformed, or otherwise -modified in a manner requiring permission under the Copyright and Similar -Rights held by the Licensor. For purposes of this Public License, where the -Licensed Material is a musical work, performance, or sound recording, Adapted -Material is always produced where the Licensed Material is synched in timed -relation with a moving image. - -b. Adapter's License means the license You apply to Your Copyright and Similar -Rights in Your contributions to Adapted Material in accordance with the terms -and conditions of this Public License. - -c. Copyright and Similar Rights means copyright and/or similar rights closely -related to copyright including, without limitation, performance, broadcast, -sound recording, and Sui Generis Database Rights, without regard to how the -rights are labeled or categorized. For purposes of this Public License, the -rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights. - -d. Effective Technological Measures means those measures that, in the absence -of proper authority, may not be circumvented under laws fulfilling obligations -under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, -and/or similar international agreements. - -e. Exceptions and Limitations means fair use, fair dealing, and/or any other -exception or limitation to Copyright and Similar Rights that applies to Your -use of the Licensed Material. - -f. Licensed Material means the artistic or literary work, database, or other -material to which the Licensor applied this Public License. - -g. Licensed Rights means the rights granted to You subject to the terms and -conditions of this Public License, which are limited to all Copyright and -Similar Rights that apply to Your use of the Licensed Material and that the -Licensor has authority to license. - -h. Licensor means the individual(s) or entity(ies) granting rights under this -Public License. - -i. Share means to provide material to the public by any means or process that -requires permission under the Licensed Rights, such as reproduction, public -display, public performance, distribution, dissemination, communication, or -importation, and to make material available to the public including in ways -that members of the public may access the material from a place and at a time -individually chosen by them. - -j. Sui Generis Database Rights means rights other than copyright resulting -from Directive 96/9/EC of the European Parliament and of the Council of 11 -March 1996 on the legal protection of databases, as amended and/or succeeded, -as well as other essentially equivalent rights anywhere in the world. - -k. You means the individual or entity exercising the Licensed Rights under -this Public License. Your has a corresponding meaning. - -Section 2 – Scope. - - a. License grant. - -1. Subject to the terms and conditions of this Public License, the Licensor -hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, -irrevocable license to exercise the Licensed Rights in the Licensed Material -to: - - A. reproduce and Share the Licensed Material, in whole or in part; and - - B. produce, reproduce, and Share Adapted Material. - -2. Exceptions and Limitations. For the avoidance of doubt, where Exceptions -and Limitations apply to Your use, this Public License does not apply, and -You do not need to comply with its terms and conditions. - - 3. Term. The term of this Public License is specified in Section 6(a). - -4. Media and formats; technical modifications allowed. The Licensor authorizes -You to exercise the Licensed Rights in all media and formats whether now known -or hereafter created, and to make technical modifications necessary to do -so. The Licensor waives and/or agrees not to assert any right or authority -to forbid You from making technical modifications necessary to exercise the -Licensed Rights, including technical modifications necessary to circumvent -Effective Technological Measures. For purposes of this Public License, simply -making modifications authorized by this Section 2(a)(4) never produces Adapted -Material. - - 5. Downstream recipients. - -A. Offer from the Licensor – Licensed Material. Every recipient of the Licensed -Material automatically receives an offer from the Licensor to exercise the -Licensed Rights under the terms and conditions of this Public License. - -B. No downstream restrictions. You may not offer or impose any additional -or different terms or conditions on, or apply any Effective Technological -Measures to, the Licensed Material if doing so restricts exercise of the Licensed -Rights by any recipient of the Licensed Material. - -6. No endorsement. Nothing in this Public License constitutes or may be construed -as permission to assert or imply that You are, or that Your use of the Licensed -Material is, connected with, or sponsored, endorsed, or granted official status -by, the Licensor or others designated to receive attribution as provided in -Section 3(a)(1)(A)(i). - - b. Other rights. - -1. Moral rights, such as the right of integrity, are not licensed under this -Public License, nor are publicity, privacy, and/or other similar personality -rights; however, to the extent possible, the Licensor waives and/or agrees -not to assert any such rights held by the Licensor to the limited extent necessary -to allow You to exercise the Licensed Rights, but not otherwise. - -2. Patent and trademark rights are not licensed under this Public License. - -3. To the extent possible, the Licensor waives any right to collect royalties -from You for the exercise of the Licensed Rights, whether directly or through -a collecting society under any voluntary or waivable statutory or compulsory -licensing scheme. In all other cases the Licensor expressly reserves any right -to collect such royalties. - -Section 3 – License Conditions. - -Your exercise of the Licensed Rights is expressly made subject to the following -conditions. - - a. Attribution. - -1. If You Share the Licensed Material (including in modified form), You must: - -A. retain the following if it is supplied by the Licensor with the Licensed -Material: - -i. identification of the creator(s) of the Licensed Material and any others -designated to receive attribution, in any reasonable manner requested by the -Licensor (including by pseudonym if designated); - - ii. a copyright notice; - - iii. a notice that refers to this Public License; - - iv. a notice that refers to the disclaimer of warranties; - -v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable; - -B. indicate if You modified the Licensed Material and retain an indication -of any previous modifications; and - -C. indicate the Licensed Material is licensed under this Public License, and -include the text of, or the URI or hyperlink to, this Public License. - -2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner -based on the medium, means, and context in which You Share the Licensed Material. -For example, it may be reasonable to satisfy the conditions by providing a -URI or hyperlink to a resource that includes the required information. - -3. If requested by the Licensor, You must remove any of the information required -by Section 3(a)(1)(A) to the extent reasonably practicable. - -4. If You Share Adapted Material You produce, the Adapter's License You apply -must not prevent recipients of the Adapted Material from complying with this -Public License. - -Section 4 – Sui Generis Database Rights. - -Where the Licensed Rights include Sui Generis Database Rights that apply to -Your use of the Licensed Material: - -a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, -reuse, reproduce, and Share all or a substantial portion of the contents of -the database; - -b. if You include all or a substantial portion of the database contents in -a database in which You have Sui Generis Database Rights, then the database -in which You have Sui Generis Database Rights (but not its individual contents) -is Adapted Material; and - -c. You must comply with the conditions in Section 3(a) if You Share all or -a substantial portion of the contents of the database. - -For the avoidance of doubt, this Section 4 supplements and does not replace -Your obligations under this Public License where the Licensed Rights include -other Copyright and Similar Rights. - -Section 5 – Disclaimer of Warranties and Limitation of Liability. - -a. Unless otherwise separately undertaken by the Licensor, to the extent possible, -the Licensor offers the Licensed Material as-is and as-available, and makes -no representations or warranties of any kind concerning the Licensed Material, -whether express, implied, statutory, or other. This includes, without limitation, -warranties of title, merchantability, fitness for a particular purpose, non-infringement, -absence of latent or other defects, accuracy, or the presence or absence of -errors, whether or not known or discoverable. Where disclaimers of warranties -are not allowed in full or in part, this disclaimer may not apply to You. - -b. To the extent possible, in no event will the Licensor be liable to You -on any legal theory (including, without limitation, negligence) or otherwise -for any direct, special, indirect, incidental, consequential, punitive, exemplary, -or other losses, costs, expenses, or damages arising out of this Public License -or use of the Licensed Material, even if the Licensor has been advised of -the possibility of such losses, costs, expenses, or damages. Where a limitation -of liability is not allowed in full or in part, this limitation may not apply -to You. - -c. The disclaimer of warranties and limitation of liability provided above -shall be interpreted in a manner that, to the extent possible, most closely -approximates an absolute disclaimer and waiver of all liability. - -Section 6 – Term and Termination. - -a. This Public License applies for the term of the Copyright and Similar Rights -licensed here. However, if You fail to comply with this Public License, then -Your rights under this Public License terminate automatically. - -b. Where Your right to use the Licensed Material has terminated under Section -6(a), it reinstates: - -1. automatically as of the date the violation is cured, provided it is cured -within 30 days of Your discovery of the violation; or - - 2. upon express reinstatement by the Licensor. - -c. For the avoidance of doubt, this Section 6(b) does not affect any right -the Licensor may have to seek remedies for Your violations of this Public -License. - -d. For the avoidance of doubt, the Licensor may also offer the Licensed Material -under separate terms or conditions or stop distributing the Licensed Material -at any time; however, doing so will not terminate this Public License. - - e. Sections 1, 5, 6, 7, and 8 survive termination of this Public License. - -Section 7 – Other Terms and Conditions. - -a. The Licensor shall not be bound by any additional or different terms or -conditions communicated by You unless expressly agreed. - -b. Any arrangements, understandings, or agreements regarding the Licensed -Material not stated herein are separate from and independent of the terms -and conditions of this Public License. - -Section 8 – Interpretation. - -a. For the avoidance of doubt, this Public License does not, and shall not -be interpreted to, reduce, limit, restrict, or impose conditions on any use -of the Licensed Material that could lawfully be made without permission under -this Public License. - -b. To the extent possible, if any provision of this Public License is deemed -unenforceable, it shall be automatically reformed to the minimum extent necessary -to make it enforceable. If the provision cannot be reformed, it shall be severed -from this Public License without affecting the enforceability of the remaining -terms and conditions. - -c. No term or condition of this Public License will be waived and no failure -to comply consented to unless expressly agreed to by the Licensor. - -d. Nothing in this Public License constitutes or may be interpreted as a limitation -upon, or waiver of, any privileges and immunities that apply to the Licensor -or You, including from the legal processes of any jurisdiction or authority. - -Creative Commons is not a party to its public licenses. Notwithstanding, Creative -Commons may elect to apply one of its public licenses to material it publishes -and in those instances will be considered the "Licensor." The text of the -Creative Commons public licenses is dedicated to the public domain under the -CC0 Public Domain Dedication. Except for the limited purpose of indicating -that material is shared under a Creative Commons public license or as otherwise -permitted by the Creative Commons policies published at creativecommons.org/policies, -Creative Commons does not authorize the use of the trademark "Creative Commons" -or any other trademark or logo of Creative Commons without its prior written -consent including, without limitation, in connection with any unauthorized -modifications to any of its public licenses or any other arrangements, understandings, -or agreements concerning use of licensed material. For the avoidance of doubt, -this paragraph does not form part of the public licenses. - -Creative Commons may be contacted at creativecommons.org. diff --git a/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/MIT.txt b/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/MIT.txt deleted file mode 100644 index 204b93da48..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/MIT.txt +++ /dev/null @@ -1,19 +0,0 @@ -MIT License Copyright (c) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is furnished -to do so, subject to the following conditions: - -The above copyright notice and this permission notice (including the next -paragraph) shall be included in all copies or substantial portions of the -Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, -WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF -OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/Unlicense.txt b/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/Unlicense.txt deleted file mode 100644 index 24a8f90199..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/LICENSES/Unlicense.txt +++ /dev/null @@ -1,20 +0,0 @@ -This is free and unencumbered software released into the public domain. - -Anyone is free to copy, modify, publish, use, compile, sell, or distribute -this software, either in source code form or as a compiled binary, for any -purpose, commercial or non-commercial, and by any means. - -In jurisdictions that recognize copyright laws, the author or authors of this -software dedicate any and all copyright interest in the software to the public -domain. We make this dedication for the benefit of the public at large and -to the detriment of our heirs and successors. We intend this dedication to -be an overt act of relinquishment in perpetuity of all present and future -rights to this software under copyright law. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS -FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS -BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH -THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. For more information, -please refer to diff --git a/frozen/Adafruit_CircuitPython_UC8151D/README.rst b/frozen/Adafruit_CircuitPython_UC8151D/README.rst deleted file mode 100644 index 08efe2f99b..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/README.rst +++ /dev/null @@ -1,149 +0,0 @@ -Introduction -============ - - -.. image:: https://readthedocs.org/projects/adafruit-circuitpython-uc8151d/badge/?version=latest - :target: https://docs.circuitpython.org/projects/uc8151d/en/latest/ - :alt: Documentation Status - - -.. image:: https://raw.githubusercontent.com/adafruit/Adafruit_CircuitPython_Bundle/main/badges/adafruit_discord.svg - :target: https://adafru.it/discord - :alt: Discord - - -.. image:: https://github.com/adafruit/Adafruit_CircuitPython_UC8151D/workflows/Build%20CI/badge.svg - :target: https://github.com/adafruit/Adafruit_CircuitPython_UC8151D/actions - :alt: Build Status - - -.. image:: https://img.shields.io/badge/code%20style-black-000000.svg - :target: https://github.com/psf/black - :alt: Code Style: Black - -CircuitPython `displayio` driver for US8151D-based ePaper displays - - -Dependencies -============= -This driver depends on: - -* `Adafruit CircuitPython `_ - -Please ensure all dependencies are available on the CircuitPython filesystem. -This is easily achieved by downloading -`the Adafruit library and driver bundle `_ -or individual libraries can be installed using -`circup `_. - -Adafruit 2.9" Flexible 296x128 Monochrome eInk / ePaper Display - -`Purchase one from the Adafruit shop `_ - - -Installing from PyPI -===================== - -On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from -PyPI `_. -To install for current user: - -.. code-block:: shell - - pip3 install adafruit-circuitpython-uc8151d - -To install system-wide (this may be required in some cases): - -.. code-block:: shell - - sudo pip3 install adafruit-circuitpython-uc8151d - -To install in a virtual environment in your current project: - -.. code-block:: shell - - mkdir project-name && cd project-name - python3 -m venv .venv - source .venv/bin/activate - pip3 install adafruit-circuitpython-uc8151d - - - -Installing to a Connected CircuitPython Device with Circup -========================================================== - -Make sure that you have ``circup`` installed in your Python environment. -Install it with the following command if necessary: - -.. code-block:: shell - - pip3 install circup - -With ``circup`` installed and your CircuitPython device connected use the -following command to install: - -.. code-block:: shell - - circup install uc8151d - -Or the following command to update an existing version: - -.. code-block:: shell - - circup update - -Usage Example -============= - -.. code-block:: python - - import time - import board - import displayio - import adafruit_uc8151d - - displayio.release_displays() - - # This pinout works on a Feather M4 and may need to be altered for other boards. - spi = board.SPI() # Uses SCK and MOSI - epd_cs = board.D9 - epd_dc = board.D10 - epd_reset = board.D5 - epd_busy = None - - display_bus = displayio.FourWire( - spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000 - ) - time.sleep(1) - - display = adafruit_uc8151d.UC8151D( - display_bus, width=296, height=128, rotation=90, busy_pin=epd_busy - ) - - g = displayio.Group() - - with open("/display-ruler.bmp", "rb") as f: - pic = displayio.OnDiskBitmap(f) - t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) - g.append(t) - - display.show(g) - - display.refresh() - - time.sleep(120) - - -Documentation -============= - -API documentation for this library can be found on `Read the Docs `_. - -For information on building library documentation, please check out `this guide `_. - -Contributing -============ - -Contributions are welcome! Please read our `Code of Conduct -`_ -before contributing to help this project stay welcoming. diff --git a/frozen/Adafruit_CircuitPython_UC8151D/README.rst.license b/frozen/Adafruit_CircuitPython_UC8151D/README.rst.license deleted file mode 100644 index 87eb036957..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/README.rst.license +++ /dev/null @@ -1,3 +0,0 @@ -SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries -SPDX-License-Identifier: MIT diff --git a/frozen/Adafruit_CircuitPython_UC8151D/adafruit_uc8151d.py b/frozen/Adafruit_CircuitPython_UC8151D/adafruit_uc8151d.py deleted file mode 100644 index 1055d3d562..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/adafruit_uc8151d.py +++ /dev/null @@ -1,132 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries -# -# SPDX-License-Identifier: MIT -""" -`adafruit_uc8151d` -================================================================================ - -CircuitPython `displayio` driver for US8151D-based ePaper displays - - -* Author(s): Melissa LeBlanc-Williams - -Implementation Notes --------------------- - -**Hardware:** - -* `Adafruit Flexible 2.9" Black and White `_ - -**Software and Dependencies:** - -* Adafruit CircuitPython firmware for the supported boards: - https://github.com/adafruit/circuitpython/releases - -""" - -import displayio - -__version__ = "0.0.0+auto.0" -__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_UC8151D.git" - -_START_SEQUENCE = ( - # b"\x01\x05\x03\x00\x2b\x2b\x09" # power setting - # b"\x06\x03\x17\x17\x17" # booster soft start - b"\x04\x80\xc8" # power on and wait 10 ms - b"\x00\x01\x1f" # panel setting. Further filled in below. - b"\x50\x01\x97" # CDI setting -) - -_GRAYSCALE_START_SEQUENCE = ( - b"\x04\x80\xc8" # Power on - b"\x00\x01\xbf" # Panel setting - b"\x50\x01\x97" # CDI setting - # Common voltage - b"\x20\x2a" - b"\x00\x0A\x00\x00\x00\x01" - b"\x60\x14\x14\x00\x00\x01" - b"\x00\x14\x00\x00\x00\x01" - b"\x00\x13\x0A\x01\x00\x01" - b"\x00\x00\x00\x00\x00\x00" - b"\x00\x00\x00\x00\x00\x00" - b"\x00\x00\x00\x00\x00\x00" - # White to White - b"\x21\x2a" - b"\x40\x0A\x00\x00\x00\x01" - b"\x90\x14\x14\x00\x00\x01" - b"\x10\x14\x0A\x00\x00\x01" - b"\xA0\x13\x01\x00\x00\x01" - b"\x00\x00\x00\x00\x00\x00" - b"\x00\x00\x00\x00\x00\x00" - b"\x00\x00\x00\x00\x00\x00" - # Black to White - b"\x22\x2a" - b"\x40\x0A\x00\x00\x00\x01" - b"\x90\x14\x14\x00\x00\x01" - b"\x00\x14\x0A\x00\x00\x01" - b"\x99\x0B\x04\x04\x01\x01" - b"\x00\x00\x00\x00\x00\x00" - b"\x00\x00\x00\x00\x00\x00" - b"\x00\x00\x00\x00\x00\x00" - # White to Black - b"\x23\x2a" - b"\x40\x0A\x00\x00\x00\x01" - b"\x90\x14\x14\x00\x00\x01" - b"\x00\x14\x0A\x00\x00\x01" - b"\x99\x0C\x01\x03\x04\x01" - b"\x00\x00\x00\x00\x00\x00" - b"\x00\x00\x00\x00\x00\x00" - b"\x00\x00\x00\x00\x00\x00" - # Black to Black - b"\x24\x2a" - b"\x80\x0A\x00\x00\x00\x01" - b"\x90\x14\x14\x00\x00\x01" - b"\x20\x14\x0A\x00\x00\x01" - b"\x50\x13\x01\x00\x00\x01" - b"\x00\x00\x00\x00\x00\x00" - b"\x00\x00\x00\x00\x00\x00" - b"\x00\x00\x00\x00\x00\x00" -) - - -_STOP_SEQUENCE = b"\x50\x01\xf7" b"\x07\x01\xA5" # CDI setting # Deep Sleep -# pylint: disable=too-few-public-methods -class UC8151D(displayio.EPaperDisplay): - r"""UC8151D driver - - :param bus: The data bus the display is on - :param \**kwargs: - See below - - :Keyword Arguments: - * *width* (``int``) -- - Display width - * *height* (``int``) -- - Display height - * *rotation* (``int``) -- - Display rotation - """ - - def __init__(self, bus: displayio.FourWire, **kwargs) -> None: - if kwargs.get("grayscale", False): - start_sequence = bytearray(_GRAYSCALE_START_SEQUENCE) - else: - start_sequence = bytearray(_START_SEQUENCE) - width = kwargs["width"] - height = kwargs["height"] - if "rotation" in kwargs and kwargs["rotation"] % 180 != 0: - width, height = height, width - - super().__init__( - bus, - start_sequence, - _STOP_SEQUENCE, - **kwargs, - ram_width=128, - ram_height=296, - busy_state=False, - write_black_ram_command=0x13, - write_color_ram_command=0x10, - refresh_display_command=0x12, - ) diff --git a/frozen/Adafruit_CircuitPython_UC8151D/docs/_static/favicon.ico b/frozen/Adafruit_CircuitPython_UC8151D/docs/_static/favicon.ico deleted file mode 100644 index 5aca98376a1f7e593ebd9cf41a808512c2135635..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4414 zcmd^BX;4#F6n=SG-XmlONeGrD5E6J{RVh+e928U#MG!$jWvO+UsvWh`x&VqGNx*en zx=qox7Dqv{kPwo%fZC$dDwVpRtz{HzTkSs8QhG0)%Y=-3@Kt!4ag|JcIo?$-F|?bXVS9UDUyev>MVZQ(H8K4#;BQW-t2CPorj8^KJrMX}QK zp+e<;4ldpXz~=)2GxNy811&)gt-}Q*yVQpsxr@VMoA##{)$1~=bZ1MmjeFw?uT(`8 z^g=09<=zW%r%buwN%iHtuKSg|+r7HkT0PYN*_u9k1;^Ss-Z!RBfJ?Un4w(awqp2b3 z%+myoFis_lTlCrGx2z$0BQdh+7?!JK#9K9@Z!VrG zNj6gK5r(b4?YDOLw|DPRoN7bdP{(>GEG41YcN~4r_SUHU2hgVtUwZG@s%edC;k7Sn zC)RvEnlq~raE2mY2ko64^m1KQL}3riixh?#J{o)IT+K-RdHae2eRX91-+g!y`8^># z-zI0ir>P%Xon)!@xp-BK2bDYUB9k613NRrY6%lVjbFcQc*pRqiK~8xtkNPLxt}e?&QsTB}^!39t_%Qb)~Ukn0O%iC;zt z<&A-y;3h++)>c1br`5VFM~5(83!HKx$L+my8sW_c#@x*|*vB1yU)_dt3vH;2hqPWx zAl^6@?ipx&U7pf`a*>Yq6C85nb+B=Fnn+(id$W#WB^uHAcZVG`qg;rWB}ubvi(Y>D z$ei>REw$#xp0SHAd^|1hq&9HJ=jKK8^zTH~nk)G?yUcmTh9vUM6Y0LMw4(gYVY$D$ zGl&WY&H<)BbJ&3sYbKjx1j^=3-0Q#f^}(aP1?8^`&FUWMp|rmtpK)bLQ1Zo?^s4jqK=Lfg*9&geMGVQ z#^-*!V`fG@;H&{M9S8%+;|h&Qrxym0Ar>WT4BCVLR8cGXF=JmEYN(sNT(9vl+S|%g z8r7nXQ(95i^`=+XHo|){$vf2$?=`F$^&wFlYXyXg$B{a>$-Fp+V}+D;9k=~Xl~?C4 zAB-;RKXdUzBJE{V&d&%R>aEfFe;vxqI$0@hwVM}gFeQR@j}a>DDxR+n+-*6|_)k%% z*mSpDV|=5I9!&VC&9tD%fcVygWZV!iIo2qFtm#!*(s|@ZT33*Ad;+<|3^+yrp*;oH zBSYLV(H1zTU?2WjrCQoQW)Z>J2a=dTriuvezBmu16`tM2fm7Q@d4^iqII-xFpwHGI zn9CL}QE*1vdj2PX{PIuqOe5dracsciH6OlAZATvE8rj6ykqdIjal2 z0S0S~PwHb-5?OQ-tU-^KTG@XNrEVSvo|HIP?H;7ZhYeZkhSqh-{reE!5di;1zk$#Y zCe7rOnlzFYJ6Z#Hm$GoidKB=2HBCwm`BbZVeZY4ukmG%1uz7p2URs6c9j-Gjj^oQV zsdDb3@k2e`C$1I5ML5U0Qs0C1GAp^?!*`=|Nm(vWz3j*j*8ucum2;r0^-6Aca=Gv) zc%}&;!+_*S2tlnnJnz0EKeRmw-Y!@9ob!XQBwiv}^u9MkaXHvM=!<3YX;+2#5Cj5pp?FEK750S3BgeSDtaE^ zXUM@xoV6yBFKfzvY20V&Lr0yC - -.. toctree:: - :caption: Related Products - -Adafruit 2.9" Flexible 296x128 Monochrome eInk / ePaper Display - -.. toctree:: - :caption: Other Links - - Download from GitHub - Download Library Bundle - CircuitPython Reference Documentation - CircuitPython Support Forum - Discord Chat - Adafruit Learning System - Adafruit Blog - Adafruit Store - -Indices and tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/frozen/Adafruit_CircuitPython_UC8151D/docs/index.rst.license b/frozen/Adafruit_CircuitPython_UC8151D/docs/index.rst.license deleted file mode 100644 index 52de478909..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/docs/index.rst.license +++ /dev/null @@ -1,4 +0,0 @@ -SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries - -SPDX-License-Identifier: MIT diff --git a/frozen/Adafruit_CircuitPython_UC8151D/docs/requirements.txt b/frozen/Adafruit_CircuitPython_UC8151D/docs/requirements.txt deleted file mode 100644 index 88e67331eb..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/docs/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -# SPDX-FileCopyrightText: 2021 Kattni Rembor for Adafruit Industries -# -# SPDX-License-Identifier: Unlicense - -sphinx>=4.0.0 diff --git a/frozen/Adafruit_CircuitPython_UC8151D/examples/display-ruler.bmp b/frozen/Adafruit_CircuitPython_UC8151D/examples/display-ruler.bmp deleted file mode 100644 index 726b5e026fd30b7e5baf5c23323d159b0eb5f65d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 360122 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 T`pMSbh(J1r2r{u6#p?e9C4JK7 diff --git a/frozen/Adafruit_CircuitPython_UC8151D/examples/display-ruler.bmp.license b/frozen/Adafruit_CircuitPython_UC8151D/examples/display-ruler.bmp.license deleted file mode 100644 index a784acfa32..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/examples/display-ruler.bmp.license +++ /dev/null @@ -1,2 +0,0 @@ -# SPDX-FileCopyrightText: 2021 ladyada for Adafruit Industries -# SPDX-License-Identifier: MIT diff --git a/frozen/Adafruit_CircuitPython_UC8151D/examples/uc8151d_grayscale_test.py b/frozen/Adafruit_CircuitPython_UC8151D/examples/uc8151d_grayscale_test.py deleted file mode 100644 index 71b8316a87..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/examples/uc8151d_grayscale_test.py +++ /dev/null @@ -1,68 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Martin Refseth, written for Adafruit Industries -# -# SPDX-License-Identifier: Unlicense - -"""Simple test script for 1.54" 152x152 grayscale display. - -Supported products: - * 1.54" Grayscale Display (GDEW0154T8D) - """ -# pylint: disable=no-member - -import time -import board -import displayio -import busio -import adafruit_uc8151d - -displayio.release_displays() - -# Pinout intended for use with a Raspberry Pi Pico -clk = board.GP10 -si = board.GP11 -dc = board.GP8 -cs = board.GP9 -rst = board.GP12 -busy = board.GP13 - -display_bus = displayio.FourWire( - busio.SPI(clk, si), command=dc, chip_select=cs, reset=rst, baudrate=1000000 -) - -time.sleep(1) - -display = adafruit_uc8151d.UC8151D( - display_bus, width=152, height=152, busy_pin=busy, rotation=180, grayscale=True -) - - -bitmap = displayio.Bitmap(152, 152, 4) - -# Draw Black -for x in range(0, 152): - for y in range(0, 38): - bitmap[x, y] = 0 -# Draw Dark Gray -for x in range(0, 152): - for y in range(38, 76): - bitmap[x, y] = 1 -# Draw Light Gray -for x in range(0, 152): - for y in range(76, 114): - bitmap[x, y] = 2 -# Draw White -for x in range(0, 152): - for y in range(114, 152): - bitmap[x, y] = 3 - -palette = displayio.Palette(4) -palette[0] = 0x000000 # Black -palette[1] = 0x404040 # Dark Gray -palette[2] = 0x808080 # Light Gray -palette[3] = 0xFFFFFF # White - -g = displayio.Group() -t = displayio.TileGrid(bitmap, pixel_shader=palette) -g.append(t) -display.show(g) -display.refresh() diff --git a/frozen/Adafruit_CircuitPython_UC8151D/examples/uc8151d_simpletest.py b/frozen/Adafruit_CircuitPython_UC8151D/examples/uc8151d_simpletest.py deleted file mode 100644 index a6a068fc2d..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/examples/uc8151d_simpletest.py +++ /dev/null @@ -1,48 +0,0 @@ -# SPDX-FileCopyrightText: 2017 Scott Shawcroft, written for Adafruit Industries -# SPDX-FileCopyrightText: Copyright (c) 2021 Melissa LeBlanc-Williams for Adafruit Industries -# -# SPDX-License-Identifier: Unlicense - -"""Simple test script for 2.9" 296x128 monochrome display. - -Supported products: - * Adafruit Flexible 2.9" Monochrome - * https://www.adafruit.com/product/4262 - """ -# pylint: disable=no-member - -import time -import board -import displayio -import adafruit_uc8151d - -displayio.release_displays() - -# This pinout works on a Feather M4 and may need to be altered for other boards. -spi = board.SPI() # Uses SCK and MOSI -epd_cs = board.D9 -epd_dc = board.D10 -epd_reset = board.D5 -epd_busy = None - -display_bus = displayio.FourWire( - spi, command=epd_dc, chip_select=epd_cs, reset=epd_reset, baudrate=1000000 -) -time.sleep(1) - -display = adafruit_uc8151d.UC8151D( - display_bus, width=296, height=128, rotation=90, busy_pin=epd_busy -) - -g = displayio.Group() - -with open("/display-ruler.bmp", "rb") as f: - pic = displayio.OnDiskBitmap(f) - t = displayio.TileGrid(pic, pixel_shader=pic.pixel_shader) - g.append(t) - - display.show(g) - - display.refresh() - - time.sleep(120) diff --git a/frozen/Adafruit_CircuitPython_UC8151D/optional_requirements.txt b/frozen/Adafruit_CircuitPython_UC8151D/optional_requirements.txt deleted file mode 100644 index d4e27c4d74..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/optional_requirements.txt +++ /dev/null @@ -1,3 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Alec Delaney, for Adafruit Industries -# -# SPDX-License-Identifier: Unlicense diff --git a/frozen/Adafruit_CircuitPython_UC8151D/pyproject.toml b/frozen/Adafruit_CircuitPython_UC8151D/pyproject.toml deleted file mode 100644 index 4c3129c59f..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/pyproject.toml +++ /dev/null @@ -1,50 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Alec Delaney for Adafruit Industries -# -# SPDX-License-Identifier: MIT - -[build-system] -requires = [ - "setuptools", - "wheel", - "setuptools-scm", -] - -[project] -name = "adafruit-circuitpython-uc8151d" -description = "CircuitPython `displayio` driver for US8151D-based ePaper displays" -version = "0.0.0+auto.0" -readme = "README.rst" -authors = [ - {name = "Adafruit Industries", email = "circuitpython@adafruit.com"} -] -urls = {Homepage = "https://github.com/adafruit/Adafruit_CircuitPython_UC8151D.git"} -keywords = [ - "adafruit", - "blinka", - "circuitpython", - "micropython", - "uc8151d", - "uc8151", - "us8151d", - "displayio", - "epd", - "epaper", - "flexible", -] -license = {text = "MIT"} -classifiers = [ - "Intended Audience :: Developers", - "Topic :: Software Development :: Libraries", - "Topic :: Software Development :: Embedded Systems", - "Topic :: System :: Hardware", - "License :: OSI Approved :: MIT License", - "Programming Language :: Python :: 3", -] -dynamic = ["dependencies", "optional-dependencies"] - -[tool.setuptools] -py-modules = ["adafruit_uc8151d"] - -[tool.setuptools.dynamic] -dependencies = {file = ["requirements.txt"]} -optional-dependencies = {optional = {file = ["optional_requirements.txt"]}} diff --git a/frozen/Adafruit_CircuitPython_UC8151D/requirements.txt b/frozen/Adafruit_CircuitPython_UC8151D/requirements.txt deleted file mode 100644 index 274b851a2d..0000000000 --- a/frozen/Adafruit_CircuitPython_UC8151D/requirements.txt +++ /dev/null @@ -1,6 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Alec Delaney, for Adafruit Industries -# -# SPDX-License-Identifier: Unlicense - -Adafruit-Blinka -adafruit-blinka-displayio From d6fe37845672475e62cf73ca059bb69e95784dab Mon Sep 17 00:00:00 2001 From: dronecz Date: Wed, 2 Nov 2022 22:05:39 +0100 Subject: [PATCH 10/75] Update mpconfigboard.h --- ports/espressif/boards/maker_badge/mpconfigboard.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/ports/espressif/boards/maker_badge/mpconfigboard.h b/ports/espressif/boards/maker_badge/mpconfigboard.h index 3c4a993364..18f98a693b 100644 --- a/ports/espressif/boards/maker_badge/mpconfigboard.h +++ b/ports/espressif/boards/maker_badge/mpconfigboard.h @@ -34,8 +34,6 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") - #define AUTORESET_DELAY_MS 500 #define DEFAULT_I2C_BUS_SCL (&pin_GPIO9) From 71b5e6088b525e099bf6fb67922be7c06665d73a Mon Sep 17 00:00:00 2001 From: dronecz Date: Wed, 2 Nov 2022 22:07:28 +0100 Subject: [PATCH 11/75] Update mpconfigboard.mk --- ports/espressif/boards/maker_badge/mpconfigboard.mk | 9 --------- 1 file changed, 9 deletions(-) diff --git a/ports/espressif/boards/maker_badge/mpconfigboard.mk b/ports/espressif/boards/maker_badge/mpconfigboard.mk index 6faba2aed3..bb96550da0 100644 --- a/ports/espressif/boards/maker_badge/mpconfigboard.mk +++ b/ports/espressif/boards/maker_badge/mpconfigboard.mk @@ -3,15 +3,6 @@ USB_PID = 0x2030 USB_PRODUCT = "Maker badge" USB_MANUFACTURER = "Czech maker" -IDF_TARGET = esp32s2 - -INTERNAL_FLASH_FILESYSTEM = 1 -LONGINT_IMPL = MPZ - -# The default queue depth of 16 overflows on release builds, -# so increase it to 32. -CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 - CIRCUITPY_ESP32_CAMERA = 0 CIRCUITPY_ESP_FLASH_MODE=dio From 882100a87a9fdb9df78f4132b9453c427a0a4303 Mon Sep 17 00:00:00 2001 From: dronecz Date: Wed, 2 Nov 2022 22:10:44 +0100 Subject: [PATCH 12/75] Create sdkonfig --- ports/espressif/boards/maker_badge/sdkonfig | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 ports/espressif/boards/maker_badge/sdkonfig diff --git a/ports/espressif/boards/maker_badge/sdkonfig b/ports/espressif/boards/maker_badge/sdkonfig new file mode 100644 index 0000000000..5a33657fdc --- /dev/null +++ b/ports/espressif/boards/maker_badge/sdkonfig @@ -0,0 +1,6 @@ +CONFIG_ESP32S2_SPIRAM_SUPPORT=n + +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP From 722f4561c4428c711b86261c17e4a5edc3b0101a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 3 Nov 2022 15:38:46 -0500 Subject: [PATCH 13/75] Update circuitpython.pot --- locale/circuitpython.pot | 4 ---- 1 file changed, 4 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index ac6dd92211..768daa8651 100755 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -3843,10 +3843,6 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/espressif/boards/maker_badge/mpconfigboard.h -msgid "pressing boot button at start up.\n" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "" From ad9db01f5f6c52e11ab434051f76d5fba2721b63 Mon Sep 17 00:00:00 2001 From: Matthew McGowan Date: Fri, 4 Nov 2022 13:15:15 -0700 Subject: [PATCH 14/75] Implements PDMIn for STM32L4 using the SAI peripheral and decimation/filtering in software. --- locale/circuitpython.pot | 10 + ports/stm/Makefile | 11 + ports/stm/boards/swan_r5/mpconfigboard.mk | 8 +- ports/stm/boards/swan_r5/pins.c | 3 + ports/stm/common-hal/audiobusio/I2SOut.c | 1 + ports/stm/common-hal/audiobusio/I2SOut.h | 1 + ports/stm/common-hal/audiobusio/MEMS_Audio.c | 72 ++++ ports/stm/common-hal/audiobusio/MEMS_Audio.h | 132 +++++++ .../stm/common-hal/audiobusio/MEMS_Audio_ll.h | 50 +++ .../audiobusio/MEMS_Audio_ll_stm32l4.c | 361 ++++++++++++++++++ .../audiobusio/MEMS_Audio_ll_stm32l4.h | 184 +++++++++ .../stm/common-hal/audiobusio/OpenPDMFilter.c | 302 +++++++++++++++ .../stm/common-hal/audiobusio/OpenPDMFilter.h | 112 ++++++ ports/stm/common-hal/audiobusio/PDMIn.c | 199 ++++++++++ ports/stm/common-hal/audiobusio/PDMIn.h | 56 +++ ports/stm/common-hal/audiobusio/__init__.c | 0 supervisor/shared/memory.c | 3 + 17 files changed, 1502 insertions(+), 3 deletions(-) create mode 100644 ports/stm/common-hal/audiobusio/I2SOut.c create mode 100644 ports/stm/common-hal/audiobusio/I2SOut.h create mode 100644 ports/stm/common-hal/audiobusio/MEMS_Audio.c create mode 100644 ports/stm/common-hal/audiobusio/MEMS_Audio.h create mode 100644 ports/stm/common-hal/audiobusio/MEMS_Audio_ll.h create mode 100644 ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.c create mode 100644 ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.h create mode 100644 ports/stm/common-hal/audiobusio/OpenPDMFilter.c create mode 100644 ports/stm/common-hal/audiobusio/OpenPDMFilter.h create mode 100644 ports/stm/common-hal/audiobusio/PDMIn.c create mode 100644 ports/stm/common-hal/audiobusio/PDMIn.h create mode 100644 ports/stm/common-hal/audiobusio/__init__.c diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 768daa8651..348ef33021 100755 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -3714,10 +3714,20 @@ msgid "offset out of bounds" msgstr "" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" diff --git a/ports/stm/Makefile b/ports/stm/Makefile index afde51bdc0..cd37a9bda0 100755 --- a/ports/stm/Makefile +++ b/ports/stm/Makefile @@ -234,6 +234,17 @@ SRC_C += \ peripherals/stm32$(MCU_SERIES_LOWER)/$(MCU_VARIANT_LOWER)/periph.c \ packages/$(MCU_PACKAGE).c +ifneq ($(CIRCUITPY_AUDIOBUSIO_PDMIN),0) + SRC_C += \ + common-hal/audiobusio/MEMS_Audio.c \ + common-hal/audiobusio/MEMS_Audio_ll_stm32l4.c \ + common-hal/audiobusio/OpenPDMFilter.c + + SRC_STM32 += \ + $(HAL_DIR)/Src/stm32$(MCU_SERIES_LOWER)xx_hal_sai.c + +endif + ifneq ($(CIRCUITPY_USB),0) SRC_C += lib/tinyusb/src/portable/st/synopsys/dcd_synopsys.c endif diff --git a/ports/stm/boards/swan_r5/mpconfigboard.mk b/ports/stm/boards/swan_r5/mpconfigboard.mk index 2ebaa9c23f..9e5be99bfa 100644 --- a/ports/stm/boards/swan_r5/mpconfigboard.mk +++ b/ports/stm/boards/swan_r5/mpconfigboard.mk @@ -41,10 +41,9 @@ CIRCUITPY_PULSEIO = 1 CIRCUITPY_PWMIO = 1 CIRCUITPY_AUDIOPWMIO = 1 CIRCUITPY_CANIO = 0 -CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_I2CTARGET = 0 # Requires SPI, PulseIO (stub ok): -CIRCUITPY_DISPLAYIO = 0 +CIRCUITPY_DISPLAYIO = 1 # These modules are implemented in shared-module/ - they can be included in # any port once their prerequisites in common-hal are complete. @@ -71,5 +70,8 @@ CIRCUITPY_BUSDEVICE = 0 CIRCUITPY_KEYPAD = 1 CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_RTC = 1 - CIRCUITPY_BUILD_EXTENSIONS = bin,uf2 +CIRCUITPY_ENABLE_MPY_NATIVE = 1 +CIRCUITPY_AUDIOBUSIO = 1 +CIRCUITPY_AUDIOBUSIO_I2SOUT = 0 +CIRCUITPY_AUDIOBUSIO_PDMIN = 1 diff --git a/ports/stm/boards/swan_r5/pins.c b/ports/stm/boards/swan_r5/pins.c index cf97c3587a..dc273cb6d4 100644 --- a/ports/stm/boards/swan_r5/pins.c +++ b/ports/stm/boards/swan_r5/pins.c @@ -129,5 +129,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + + { MP_ROM_QSTR(MP_QSTR_MICROPHONE_CLOCK), MP_ROM_PTR(&pin_PA03) }, + { MP_ROM_QSTR(MP_QSTR_MICROPHONE_DATA), MP_ROM_PTR(&pin_PC03) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/stm/common-hal/audiobusio/I2SOut.c b/ports/stm/common-hal/audiobusio/I2SOut.c new file mode 100644 index 0000000000..b63c3e7b22 --- /dev/null +++ b/ports/stm/common-hal/audiobusio/I2SOut.c @@ -0,0 +1 @@ +// Although IS2Out is not enabled on the STM32L4 family, this file is still required for the build to pass diff --git a/ports/stm/common-hal/audiobusio/I2SOut.h b/ports/stm/common-hal/audiobusio/I2SOut.h new file mode 100644 index 0000000000..b63c3e7b22 --- /dev/null +++ b/ports/stm/common-hal/audiobusio/I2SOut.h @@ -0,0 +1 @@ +// Although IS2Out is not enabled on the STM32L4 family, this file is still required for the build to pass diff --git a/ports/stm/common-hal/audiobusio/MEMS_Audio.c b/ports/stm/common-hal/audiobusio/MEMS_Audio.c new file mode 100644 index 0000000000..4371b609c0 --- /dev/null +++ b/ports/stm/common-hal/audiobusio/MEMS_Audio.c @@ -0,0 +1,72 @@ +#include +#include + +#include "MEMS_Audio.h" +#include "MEMS_Audio_ll.h" + +static void default_pcm_data_available(MemsAudio *audio, pcm_sample_t *pcmSamples, size_t pcmLength) { +} + + + +/** + * @brief Initializes the MemsAudio instance. Only one instance can be initialized and used at a given time. + * + * @param audio + * @return mems_audio_err_t + */ +mems_audio_err_t mems_audio_init(MemsAudio *audio) { + if (!audio->pcm_data_available) { + audio->pcm_data_available = default_pcm_data_available; + } + return mems_audio_ll_init(audio); +} + +/** + * @brief Uninitializes the MemsAudio instance. + * + * @param audio + * @return mems_audio_err_t + */ +mems_audio_err_t mems_audio_uninit(MemsAudio *audio) { + return mems_audio_ll_uninit(audio); +} + +/** + * @brief Asynchronously records audio. + * + * @param audio + * @param pdmBuffer + * @param pdmBufferLength + * @return mems_audio_err_t + */ +mems_audio_err_t mems_audio_record(MemsAudio *audio) { + return mems_audio_ll_record(audio); +} + +/** + * @brief Pause recording audio. + */ +mems_audio_err_t mems_audio_pause(MemsAudio *audio) { + return mems_audio_ll_pause(audio); +} + +/** + * @brief Resume recording audio. + * + * @param audio + * @return mems_audio_err_t + */ +mems_audio_err_t mems_audio_resume(MemsAudio *audio) { + return mems_audio_ll_resume(audio); +} + +/** + * @brief Stop recording audio and + * + * @param audio + * @return mems_audio_err_t + */ +mems_audio_err_t mems_audio_stop(MemsAudio *audio) { + return mems_audio_ll_stop(audio); +} diff --git a/ports/stm/common-hal/audiobusio/MEMS_Audio.h b/ports/stm/common-hal/audiobusio/MEMS_Audio.h new file mode 100644 index 0000000000..a26b94fef3 --- /dev/null +++ b/ports/stm/common-hal/audiobusio/MEMS_Audio.h @@ -0,0 +1,132 @@ +#ifndef _MEMS_AUDIO_H_ +#define _MEMS_AUDIO_H_ + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + * @brief How many milliseconds of audio can fit in the audio buffer(s). + * Interrupts for recieved data fire at half this duration / twice the frequency. + */ +#ifndef MEMS_AUDIO_MS_BUFFER +#define MEMS_AUDIO_MS_BUFFER (1) +#endif + + +/** + * @brief The number of bits per sample of the PCM output + */ +#define PCM_OUT_RESOLUTION 16 + +/** + * @brief The output frequency of PCM samples in Hz. + */ +#define PCM_OUT_SAMPLING_FREQUENCY 16000 + +/** + * @brief type for describing error conditions. + */ +typedef int32_t mems_audio_err_t; + +/** + * @brief The datatype that holds an output PCM sample. + */ +typedef int16_t pcm_sample_t; +_Static_assert(PCM_OUT_RESOLUTION==16, "Output PCM resolution must be 16-bits"); + + +typedef enum { + MEMS_AUDIO_OK = 0, + MEMS_AUDIO_ERROR_ALREADY_INITIALIZED = -1, + MEMS_AUDIO_ERROR_NOT_INITIALIZED = -2 +} mems_audio_err_enum_t; + +#define IS_MEMS_AUDIO_ERROR(e) (e) +#define CHECK_MEMS_AUDIO_ERROR(e) { if (IS_MEMS_AUDIO_ERROR(e)) return e; } +#define CHECK_MEMS_AUDIO_INITIALIZED(x) { if (!x) return MEMS_AUDIO_ERROR_NOT_INITIALIZED; } + +typedef struct MemsAudio_t MemsAudio; + +/** + * @brief Callback informing that PCM samples are available for processing. + */ +typedef void (*pcm_data_available_t)(MemsAudio* audio, pcm_sample_t* pcmSamples, size_t pcmLength); + +/** + * @brief MemsAudio manages the filter, buffers and callbacks used to capture PDM audio samples and convert to PCM. + * + */ +typedef struct MemsAudio_t { + + /** + * @brief The buffer to store PCM audio samples + */ + volatile pcm_sample_t* volatile pcmOutputBuffer; + + /** + * @brief The length of the PCM buffer. SHould be at least MEMS_AUDIO_PCM_BUFFER_LENGTH + */ + volatile size_t pcmOutputBufferLength; + + /** + * @brief Optional callback for when PCM data is available. + */ + pcm_data_available_t pcm_data_available; + + void* audioImpl; + void* userData; +} MemsAudio; + + +mems_audio_err_t mems_audio_init(MemsAudio* audio); + +/** + * @brief Uninitializes the MemsAudio instance. + * + * @param audio + * @return mems_audio_err_t + */ +mems_audio_err_t mems_audio_uninit(MemsAudio* audio); + +/** + * @brief Asynchronously records audio. + * + * @param audio + * @param pdmBuffer + * @param pdmBufferLength + * @return mems_audio_err_t + */ +mems_audio_err_t mems_audio_record(MemsAudio* audio); + +/** + * @brief Pause recording audio. + */ +mems_audio_err_t mems_audio_pause(MemsAudio* audio); + +/** + * @brief Resume recording audio. + * + * @param audio + * @return mems_audio_err_t + */ +mems_audio_err_t mems_audio_resume(MemsAudio* audio); + +/** + * @brief Stop recording audio and + * + * @param audio + * @return mems_audio_err_t + */ +mems_audio_err_t mems_audio_stop(MemsAudio* audio); + +#ifdef __cplusplus +} +#endif + + +#endif // _MEMS_AUDIO_H_ diff --git a/ports/stm/common-hal/audiobusio/MEMS_Audio_ll.h b/ports/stm/common-hal/audiobusio/MEMS_Audio_ll.h new file mode 100644 index 0000000000..6419b90959 --- /dev/null +++ b/ports/stm/common-hal/audiobusio/MEMS_Audio_ll.h @@ -0,0 +1,50 @@ +#ifndef _MEMS_AUDIO_LL_H_ +#define _MEMS_AUDIO_LL_H_ + +#include "MEMS_Audio.h" + +#ifdef __cplusplus +extern "C" { +#endif + + +mems_audio_err_t mems_audio_ll_init(MemsAudio *audio); +mems_audio_err_t mems_audio_ll_uninit(MemsAudio *audio); + +/** + * @brief Asynchronously records audio. + * + * @param audio + * @param pdmBuffer + * @param pdmBufferLength + * @return mems_audio_err_t + */ +mems_audio_err_t mems_audio_ll_record(MemsAudio *audio); + +/** + * @brief Pause recording audio. + */ +mems_audio_err_t mems_audio_ll_pause(MemsAudio *audio); + +/** + * @brief Resume recording audio. + * + * @param audio + * @return mems_audio_err_t + */ +mems_audio_err_t mems_audio_ll_resume(MemsAudio *audio); + +/** + * @brief Stop recording audio and + * + * @param audio + * @return mems_audio_err_t + */ +mems_audio_err_t mems_audio_ll_stop(MemsAudio *audio); + +#ifdef __cplusplus +} +#endif + + +#endif // _MEMS_AUDIO_LL_H_ diff --git a/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.c b/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.c new file mode 100644 index 0000000000..71f046f9b9 --- /dev/null +++ b/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.c @@ -0,0 +1,361 @@ +#include +#include "MEMS_Audio_ll_stm32l4.h" +#include "MEMS_Audio.h" + +/** + * @brief The implementation is a singleton. + * + */ +MemsAudio_STM32L4SAIPDM* volatile audioImpl; + +static mems_audio_err_t MX_DMA_Init(void); +static mems_audio_err_t MX_DMA_Uninit(void); +static mems_audio_err_t MX_SAI1_Init(void); + +#define CHECK_HAL_ERROR(x, e) \ + { \ + if ((x) != HAL_OK) \ + return e; \ + } + +/** + * @brief Checks the HAL return code and returns from a void function on error. The + * error is saved to lastError. + */ +#define CHECK_HAL_ERROR_VOID(x, e) \ + { \ + if ((x) != HAL_OK) { \ + audioImpl->lastError = e; \ + return; \ + } \ + } + +#define CHECK_MEMS_AUDIO_ERROR_LAST() \ + { \ + if (audioImpl->lastError != MEMS_AUDIO_OK) \ + return audioImpl->lastError; \ + } + +static bool default_pdm_data_available(MemsAudio_STM32L4SAIPDM* audio, pdm_sample_t* pdmSamples, size_t count) +{ + return true; +} + +int filter_pdm(MemsAudio_STM32L4SAIPDM* impl, pdm_sample_t* input, pcm_sample_t* output) +{ + if (impl->filter.Decimation==64) { + Open_PDM_Filter_64(input, output, 1, &impl->filter); + } + else { + Open_PDM_Filter_128(input, output, 1, &impl->filter); + } + return impl->filter.nSamples; +} + +static void mems_audio_init_filter(MemsAudio_STM32L4SAIPDM *impl) +{ + TPDMFilter_InitStruct* filter = &impl->filter; + filter->Fs = PCM_OUT_SAMPLING_FREQUENCY; + filter->nSamples = MEMS_AUDIO_PCM_BUFFER_LENGTH; + filter->LP_HZ = PCM_OUT_SAMPLING_FREQUENCY / 2; // The Nyquist frequency + filter->HP_HZ = 10; // high pass to remove DC offset + filter->In_MicChannels = 1; + filter->Out_MicChannels = 1; + filter->Decimation = PDM_IN_DECIMATION_FACTOR; + Open_PDM_Filter_Init(filter); +} +volatile unsigned ignore_dma_count; + +/** + * @brief Converts PDM samples + * + * @param pdmBuffer The buffer holding the PDM samples + * @param pdmBufferLength The number of samples available + */ +void pdm2pcm(uint8_t *pdmBuffer, size_t pdmBufferLength) +{ + MemsAudio_STM32L4SAIPDM *impl = audioImpl; + if (impl) + { + bool convert = impl->discard_dma || impl->pdm_data_available(impl, pdmBuffer, pdmBufferLength); + if (convert) + { + MemsAudio* audio = impl->audio; + filter_pdm(impl, pdmBuffer, (pcm_sample_t*)audio->pcmOutputBuffer); + if (!impl->discard_dma) + audio->pcm_data_available(audio, (pcm_sample_t*)audio->pcmOutputBuffer, impl->filter.nSamples); + else + impl->discard_dma--; + } + } +} + +/** + * @brief Initialize the PDM interface ready to begin capture. + * @retval + */ +mems_audio_err_t mems_audio_ll_init(MemsAudio *audio) +{ + mems_audio_init_filter(audioImpl); + if (!audioImpl->pdm_data_available) { + audioImpl->pdm_data_available = &default_pdm_data_available; + } + + CHECK_MEMS_AUDIO_ERROR(MX_DMA_Init()); + CHECK_MEMS_AUDIO_ERROR(MX_SAI1_Init()); + return MEMS_AUDIO_OK; +} + +mems_audio_err_t uninit(void) { + if (audioImpl) { + MemsAudio_STM32L4SAIPDM* impl = audioImpl; + audioImpl = NULL; + mems_audio_ll_stop(impl->audio); + CHECK_HAL_ERROR(HAL_SAI_DeInit(&impl->hSAI_BlockA1), MEMS_AUDIO_ERROR_SAI_DEINIT); + CHECK_MEMS_AUDIO_ERROR(MX_DMA_Uninit()); + } + return MEMS_AUDIO_OK; +} + +/** + * @brief Uninitialize low level PDM capture + */ +mems_audio_err_t mems_audio_ll_uninit(MemsAudio *audio) +{ + if (audioImpl->audio == audio) { + uninit(); + } + return MEMS_AUDIO_OK; +} + +mems_audio_err_t mems_audio_ll_record(MemsAudio *audio) +{ + audioImpl->discard_dma = (100/MEMS_AUDIO_MS_BUFFER)+1; + CHECK_HAL_ERROR(HAL_SAI_Receive_DMA(&audioImpl->hSAI_BlockA1, audioImpl->pdmBuffer, audioImpl->pdmBufferLength), + MEMS_AUDIO_ERROR_DMA_START); + return MEMS_AUDIO_OK; +} + +mems_audio_err_t mems_audio_ll_stop(MemsAudio *audio) +{ + CHECK_HAL_ERROR(HAL_SAI_DMAStop(&audioImpl->hSAI_BlockA1), MEMS_AUDIO_ERROR_DMA_STOP); + return MEMS_AUDIO_OK; +} + +mems_audio_err_t mems_audio_ll_pause(MemsAudio *audio) +{ + CHECK_HAL_ERROR(HAL_SAI_DMAPause(&audioImpl->hSAI_BlockA1), MEMS_AUDIO_ERROR_DMA_PAUSE); + return MEMS_AUDIO_OK; +} + +mems_audio_err_t mems_audio_ll_resume(MemsAudio *audio) +{ + CHECK_HAL_ERROR(HAL_SAI_DMAResume(&audioImpl->hSAI_BlockA1), MEMS_AUDIO_ERROR_DMA_RESUME); + return MEMS_AUDIO_OK; +} + +/** + * @brief SAI1 Initialization Function + * @param None + * @retval None + */ +static mems_audio_err_t MX_SAI1_Init(void) +{ + __HAL_RCC_GPIOA_CLK_ENABLE(); + __HAL_RCC_GPIOC_CLK_ENABLE(); + + SAI_HandleTypeDef hSAI_BlockA1 = {0}; + MemsAudio_STM32L4SAIPDM* impl = audioImpl; + CHECK_MEMS_AUDIO_INITIALIZED(impl); + hSAI_BlockA1.Instance = SAI1_Block_A; + hSAI_BlockA1.Init.Protocol = SAI_FREE_PROTOCOL; + hSAI_BlockA1.Init.AudioMode = SAI_MODEMASTER_RX; + /* The PDM interface provides 8 1-bit samples at a time */ + hSAI_BlockA1.Init.DataSize = SAI_DATASIZE_8; + hSAI_BlockA1.Init.FirstBit = SAI_FIRSTBIT_MSB; + + hSAI_BlockA1.Init.ClockStrobing = SAI_CLOCKSTROBING_FALLINGEDGE; + hSAI_BlockA1.Init.Synchro = SAI_ASYNCHRONOUS; /* asynchronous - not chained to other SAI blocks */ + hSAI_BlockA1.Init.OutputDrive = SAI_OUTPUTDRIVE_DISABLE; /* Not driving the primary SAI clock */ + hSAI_BlockA1.Init.NoDivider = SAI_MASTERDIVIDER_DISABLE; + hSAI_BlockA1.Init.MckOverSampling = SAI_MCK_OVERSAMPLING_DISABLE; + hSAI_BlockA1.Init.FIFOThreshold = SAI_FIFOTHRESHOLD_FULL; + hSAI_BlockA1.Init.MonoStereoMode = SAI_MONOMODE; /* PDM is intrinsicly stereo, sampling on */ + hSAI_BlockA1.Init.CompandingMode = SAI_NOCOMPANDING; + hSAI_BlockA1.Init.PdmInit.Activation = ENABLE; /* Enable PDM interface in the SAI */ + hSAI_BlockA1.Init.PdmInit.MicPairsNbr = 1; /* 1 pair - 2 mics */ + hSAI_BlockA1.Init.PdmInit.ClockEnable = SAI_PDM_CLOCK1_ENABLE; + hSAI_BlockA1.FrameInit.FrameLength = 16; + hSAI_BlockA1.FrameInit.ActiveFrameLength = 1; + hSAI_BlockA1.FrameInit.FSDefinition = SAI_FS_STARTFRAME; /* FS is not really used */ + hSAI_BlockA1.FrameInit.FSPolarity = SAI_FS_ACTIVE_HIGH; + hSAI_BlockA1.FrameInit.FSOffset = SAI_FS_FIRSTBIT; + hSAI_BlockA1.SlotInit.FirstBitOffset = 0; + hSAI_BlockA1.SlotInit.SlotSize = SAI_SLOTSIZE_DATASIZE; + hSAI_BlockA1.SlotInit.SlotNumber = 2; + hSAI_BlockA1.SlotInit.SlotActive = 0x0001; + impl->hSAI_BlockA1 = hSAI_BlockA1; + CHECK_HAL_ERROR(HAL_SAI_Init(&impl->hSAI_BlockA1), MEMS_AUDIO_ERROR_SAI_INIT); + CHECK_MEMS_AUDIO_ERROR_LAST(); + return MEMS_AUDIO_OK; +} + +#define MEMS_AUDIO_DMA_IRQn DMA1_Channel6_IRQn +#define MEMS_AUDIO_DMA_CHANNEL DMA1_Channel6 +#define MEMS_AUDIO_DMA_PRIORITY 6 +#define DMA_HANDLER DMA1_Channel6_IRQHandler + +void HAL_SAI_MspInit(SAI_HandleTypeDef *hsai) +{ + GPIO_InitTypeDef GPIO_InitStruct = {0}; + RCC_PeriphCLKInitTypeDef PeriphClkInit = {0}; + /* SAI1 */ + MemsAudio_STM32L4SAIPDM* impl = audioImpl; + if (hsai->Instance == SAI1_Block_A && impl) + { + PeriphClkInit.PeriphClockSelection = RCC_PERIPHCLK_SAI1; + PeriphClkInit.Sai1ClockSelection = RCC_SAI1CLKSOURCE_PLLSAI1; + PeriphClkInit.PLLSAI1.PLLSAI1Source = RCC_PLLSOURCE_MSI; + PeriphClkInit.PLLSAI1.PLLSAI1M = MEMS_AUDIO_CLOCK_PLLM; + PeriphClkInit.PLLSAI1.PLLSAI1N = MEMS_AUDIO_CLOCK_PLLN; + PeriphClkInit.PLLSAI1.PLLSAI1P = MEMS_AUDIO_CLOCK_PLLP; + PeriphClkInit.PLLSAI1.PLLSAI1Q = RCC_PLLQ_DIV2; + PeriphClkInit.PLLSAI1.PLLSAI1R = RCC_PLLR_DIV2; + PeriphClkInit.PLLSAI1.PLLSAI1ClockOut = RCC_PLLSAI1_SAI1CLK; + CHECK_HAL_ERROR_VOID(HAL_RCCEx_PeriphCLKConfig(&PeriphClkInit), MEMS_AUDIO_ERROR_SAI_CLOCK); + + if (impl->SAI1_client == 0) + { + __HAL_RCC_SAI1_CLK_ENABLE(); + } + impl->SAI1_client++; + + /**SAI1_A_Block_A GPIO Configuration + PC3 ------> SAI1_D1 + PA3 ------> SAI1_CK1 + */ + GPIO_InitStruct.Pin = GPIO_PIN_3; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + GPIO_InitStruct.Alternate = GPIO_AF3_SAI1; + HAL_GPIO_Init(GPIOC, &GPIO_InitStruct); + + GPIO_InitStruct.Pin = GPIO_PIN_3; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; + GPIO_InitStruct.Alternate = GPIO_AF3_SAI1; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + + /* Peripheral DMA init*/ + DMA_HandleTypeDef hdma_sai1_a = {0}; + hdma_sai1_a.Instance = MEMS_AUDIO_DMA_CHANNEL; + hdma_sai1_a.Init.Request = DMA_REQUEST_SAI1_A; + hdma_sai1_a.Init.Direction = DMA_PERIPH_TO_MEMORY; + hdma_sai1_a.Init.PeriphInc = DMA_PINC_DISABLE; + hdma_sai1_a.Init.MemInc = DMA_MINC_ENABLE; + hdma_sai1_a.Init.PeriphDataAlignment = DMA_PDATAALIGN_BYTE; + hdma_sai1_a.Init.MemDataAlignment = DMA_MDATAALIGN_BYTE; + hdma_sai1_a.Init.Mode = DMA_CIRCULAR; + hdma_sai1_a.Init.Priority = DMA_PRIORITY_HIGH; + impl->hdma_sai1_a = hdma_sai1_a; + CHECK_HAL_ERROR_VOID(HAL_DMA_Init(&impl->hdma_sai1_a), MEMS_AUDIO_ERROR_SAI_DMA_INIT); + + /* Several peripheral DMA handle pointers point to the same DMA handle. + Be aware that there is only one channel to perform all the requested DMAs. */ + __HAL_LINKDMA(hsai, hdmarx, impl->hdma_sai1_a); + + __HAL_LINKDMA(hsai, hdmatx, impl->hdma_sai1_a); + } +} + +void HAL_SAI_MspDeInit(SAI_HandleTypeDef *hsai) +{ + /* SAI1 */ + MemsAudio_STM32L4SAIPDM* impl = audioImpl; + if (hsai->Instance == SAI1_Block_A && impl) + { + impl->SAI1_client--; + if (impl->SAI1_client == 0) + { + /* Peripheral clock disable */ + __HAL_RCC_SAI1_CLK_DISABLE(); + } + + /**SAI1_A_Block_A GPIO Configuration + PC3 ------> SAI1_D1 + PA3 ------> SAI1_CK1 + */ + HAL_GPIO_DeInit(GPIOC, GPIO_PIN_3); + + HAL_GPIO_DeInit(GPIOA, GPIO_PIN_3); + + /* SAI1 DMA Deinit */ + HAL_DMA_DeInit(hsai->hdmarx); + HAL_DMA_DeInit(hsai->hdmatx); + } +} + +/** + * @brief Initialize the DMA peripheral + * + */ +static mems_audio_err_t MX_DMA_Init(void) +{ + + /* DMA controller clock enable */ + __HAL_RCC_DMAMUX1_CLK_ENABLE(); + __HAL_RCC_DMA1_CLK_ENABLE(); + + /* DMA interrupt init */ + /* DMA1_Channel1_IRQn interrupt configuration */ + HAL_NVIC_SetPriority(MEMS_AUDIO_DMA_IRQn, MEMS_AUDIO_DMA_PRIORITY, 0); + HAL_NVIC_EnableIRQ(MEMS_AUDIO_DMA_IRQn); + return MEMS_AUDIO_OK; +} + +static mems_audio_err_t MX_DMA_Uninit(void) +{ + HAL_NVIC_DisableIRQ(MEMS_AUDIO_DMA_IRQn); + return MEMS_AUDIO_OK; +} + +/** + * @brief Global handler for the DMA interrupt. Forwards to the HAL for further processing. + * + */ +void DMA_HANDLER(void) +{ + HAL_DMA_IRQHandler(&audioImpl->hdma_sai1_a); +} + +/** + * @brief Converts PDM samples in the upper half of the PDM buffer. + * + * @param hSai + */ +void HAL_SAI_RxHalfCpltCallback(SAI_HandleTypeDef *hSai) +{ + (void)hSai; + pdm2pcm(audioImpl->pdmBuffer, audioImpl->pdmBufferLength>>1); +} + +/** + * @brief Converts PDM samples in the upper half of the PDM buffer. + * + * @param hSai + */ +void HAL_SAI_RxCpltCallback(SAI_HandleTypeDef *hSai) +{ + (void)hSai; + pdm2pcm(audioImpl->pdmBuffer+(audioImpl->pdmBufferLength>>1), audioImpl->pdmBufferLength>>1); +} + +mems_audio_err_t mems_audio_init_stm32l4_sai_pdm(MemsAudio* audio, MemsAudio_STM32L4SAIPDM* impl) +{ + uninit(); + audioImpl = impl; + impl->audio = audio; + return mems_audio_init(audio); +} diff --git a/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.h b/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.h new file mode 100644 index 0000000000..c76ccce5e1 --- /dev/null +++ b/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.h @@ -0,0 +1,184 @@ +#ifndef _MEMS_AUDIO_LL_STM32L4_H_ +#define _MEMS_AUDIO_LL_STM32L4_H_ + +#include +#include +#include +#include "OpenPDMFilter.h" +#include "MEMS_Audio.h" +#include "MEMS_Audio_ll.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief The SAI PDM interface captures 8 bits from the PDM signal. + */ +typedef uint8_t pdm_sample_t; + +/** + * @brief The PDM sample frequency in kHz. (Bit samples per millisecond.) + */ +#define PDM_IN_FREQUENCY_KHZ 1024 + +#define PDM_IN_FREQUENCY (PDM_IN_FREQUENCY_KHZ * 1000) + +/** + * @brief The number of channels of audio captured + */ +#define PDM_IN_CHANNELS 1 + +/** + * @brief The decimation of the PDM bit stream to produce PCM samples at the desired output rate. + */ +#define PDM_IN_DECIMATION_FACTOR 64 + +/** + * @brief The number of pdm samples captured per millisecond from the PDM interface. + */ +#define MEMS_AUDIO_PDM_SAMPLES_PER_MS ((PDM_IN_FREQUENCY_KHZ / (sizeof(pdm_sample_t) * 8)) * PDM_IN_CHANNELS) + +/** + * @brief The size of the buffer used to hold PDM samples prior to conversion to PCM. + * Each half of the buffer generates an interrupt. + */ +#define MEMS_AUDIO_PDM_BUFFER_LENGTH (MEMS_AUDIO_PDM_SAMPLES_PER_MS * MEMS_AUDIO_MS_BUFFER * 2) + +/** + * @brief The length of the PCM buffer required to hold converted samples. + */ +#define MEMS_AUDIO_PCM_BUFFER_LENGTH (PCM_OUT_SAMPLING_FREQUENCY * MEMS_AUDIO_MS_BUFFER / 1000) + + +/** + * Presently the internal PDM parameters and output PCM parameters are fixed for the values given here. + */ + + +/** + * @brief 128 point decimation did not work with the OpenPDMFilter and just produced PCM output + * approaching a square wave. + */ +_Static_assert(PDM_IN_DECIMATION_FACTOR == 64 || PDM_IN_DECIMATION_FACTOR == 128, "A decomation factor of 64 or 128 is supported at present."); + + +/** + * @brief The PDM bitstream frequency divided by the decimation factor should be the same as the desired output PCM frequency. + */ +_Static_assert(PDM_IN_FREQUENCY / PDM_IN_DECIMATION_FACTOR == PCM_OUT_SAMPLING_FREQUENCY, "PDM output frequency should equal the input frequency divided by the decimation factor."); + +// +// SAI PDM interface clock configuration +// + +#define MEMS_AUDIO_MSI_FREQUENCY (48 * 1000 * 1000) +#define MEMS_AUDIO_CLOCK_PLLM (15) +#define MEMS_AUDIO_CLOCK_PLLN (16) +#define MEMS_AUDIO_CLOCK_PLLP (RCC_PLLP_DIV25) + +/** + * @brief The SAI PDM clock should be twice the desired PDM bitstream frequency + */ +_Static_assert((MEMS_AUDIO_MSI_FREQUENCY / MEMS_AUDIO_CLOCK_PLLM * MEMS_AUDIO_CLOCK_PLLN / MEMS_AUDIO_CLOCK_PLLP) == (PDM_IN_FREQUENCY_KHZ * 1000 * 2), "PDM clock should be twice the PDM sample frequency."); + +typedef struct MemsAudio_STM32L4SAIPDM_t MemsAudio_STM32L4SAIPDM; + +/** + * @brief Callback informing that PDM samples are available for processing. + * @param audio The MemsAudio instance + * @return `false` to skip conversion of PDM to PCM. `true` to convert the PDM samples to PCM. + */ +typedef bool (*pdm_data_available_t)(MemsAudio_STM32L4SAIPDM *audio, pdm_sample_t *pdmSamples, size_t pdmLength); + +/** + * @brief Implementation details for the STM32 SAI PDM implementation. + * + */ +/** + * @brief Audio capture from a MEMS microphone on the STM32L4 using the SAI PDM interface. + */ +typedef struct MemsAudio_STM32L4SAIPDM_t { + + MemsAudio *audio; + + /** + * @brief The last error that happened in a void function (e.g. HAL callback) + */ + mems_audio_err_t lastError; + + /** + * @brief The buffer to store PDM audio samples + */ + pdm_sample_t *pdmBuffer; + + /** + * @brief The length of the PDM buffer. Should be at least MEMS_AUDIO_PDM_BUFFER_LENGTH + */ + size_t pdmBufferLength; + + /** + * @brief Optional callback for when PDM data is available. + */ + pdm_data_available_t pdm_data_available; + + /** + * @brief A cound of the number of PDM clients in use. + */ + uint32_t SAI1_client; + + /** + * @brief The SAI peripheral handle being used for SAI A subclock 1. + */ + SAI_HandleTypeDef hSAI_BlockA1; + + /** + * @brief The DMA handle to transfer SAI data from the peripheral to memory. + */ + DMA_HandleTypeDef hdma_sai1_a; + + /** + * @brief An instance of the PDM filter that performs decimation, and high and low pass filtering. + * Unlike the DFSDM peripheral, the SAI PDM interface doesn't perform these operations in hardware. + */ + TPDMFilter_InitStruct filter; + + /** + * @brief The number of DMA transfers to ignore after starting recording. + */ + volatile uint16_t discard_dma; + +} MemsAudio_STM32L4SAIPDM; + +/** + * @brief Creates a MemsAudio instance that retrieves PDM samples from SAI A block 1 via the PDM interface, + * decimates and filters these in software to produce the PCM output stream. + * + * @param audio + * @param implementation + * @return meems_audio_error_t + */ +mems_audio_err_t mems_audio_init_stm32l4_sai_pdm(MemsAudio *audio, MemsAudio_STM32L4SAIPDM *implementation); + +/** + * @brief Implementation-specific error codes. + * + */ +typedef enum mems_audio_err_stm32l4_t { + MEMS_AUDIO_ERROR_SAI_DMA_INIT = 1, + MEMS_AUDIO_ERROR_SAI_CLOCK = 2, + MEMS_AUDIO_ERROR_SAI_INIT = 3, + MEMS_AUDIO_ERROR_SAI_DEINIT = 4, + MEMS_AUDIO_ERROR_DMA_START = 5, + MEMS_AUDIO_ERROR_DMA_STOP = 6, + MEMS_AUDIO_ERROR_DMA_PAUSE = 7, + MEMS_AUDIO_ERROR_DMA_RESUME = 8 +} mems_audio_err_stm32l4_t; + + +#ifdef __cplusplus +} +#endif + + +#endif // _MEMS_AUDIO_LL_STM32L4_H_ diff --git a/ports/stm/common-hal/audiobusio/OpenPDMFilter.c b/ports/stm/common-hal/audiobusio/OpenPDMFilter.c new file mode 100644 index 0000000000..c65353b146 --- /dev/null +++ b/ports/stm/common-hal/audiobusio/OpenPDMFilter.c @@ -0,0 +1,302 @@ +/** + ******************************************************************************* + * @file OpenPDMFilter.c + * @author CL + * @version V1.0.0 + * @date 9-September-2015 + * @brief Open PDM audio software decoding Library. + * This Library is used to decode and reconstruct the audio signal + * produced by ST MEMS microphone (MP45Dxxx, MP34Dxxx). + ******************************************************************************* + * @attention + * + *

© COPYRIGHT 2018 STMicroelectronics

+ * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************* + */ + + +/* Includes ------------------------------------------------------------------*/ + +#include "OpenPDMFilter.h" + + + +/* Functions -----------------------------------------------------------------*/ + +#ifdef USE_LUT +int32_t filter_table_mono_64(lut_t lut, uint8_t *data, uint8_t sincn) { + return (int32_t) + lut[data[0]][0][sincn] + + lut[data[1]][1][sincn] + + lut[data[2]][2][sincn] + + lut[data[3]][3][sincn] + + lut[data[4]][4][sincn] + + lut[data[5]][5][sincn] + + lut[data[6]][6][sincn] + + lut[data[7]][7][sincn]; +} +int32_t filter_table_stereo_64(lut_t lut, uint8_t *data, uint8_t sincn) { + return (int32_t) + lut[data[0]][0][sincn] + + lut[data[2]][1][sincn] + + lut[data[4]][2][sincn] + + lut[data[6]][3][sincn] + + lut[data[8]][4][sincn] + + lut[data[10]][5][sincn] + + lut[data[12]][6][sincn] + + lut[data[14]][7][sincn]; +} +#if DECIMATION_MAX == 128 +int32_t filter_table_mono_128(lut_t lut, uint8_t *data, uint8_t sincn) { + return (int32_t) + lut[data[0]][0][sincn] + + lut[data[1]][1][sincn] + + lut[data[2]][2][sincn] + + lut[data[3]][3][sincn] + + lut[data[4]][4][sincn] + + lut[data[5]][5][sincn] + + lut[data[6]][6][sincn] + + lut[data[7]][7][sincn] + + lut[data[8]][8][sincn] + + lut[data[9]][9][sincn] + + lut[data[10]][10][sincn] + + lut[data[11]][11][sincn] + + lut[data[12]][12][sincn] + + lut[data[13]][13][sincn] + + lut[data[14]][14][sincn] + + lut[data[15]][15][sincn]; +} +int32_t filter_table_stereo_128(lut_t lut, uint8_t *data, uint8_t sincn) { + return (int32_t) + lut[data[0]][0][sincn] + + lut[data[2]][1][sincn] + + lut[data[4]][2][sincn] + + lut[data[6]][3][sincn] + + lut[data[8]][4][sincn] + + lut[data[10]][5][sincn] + + lut[data[12]][6][sincn] + + lut[data[14]][7][sincn] + + lut[data[16]][8][sincn] + + lut[data[18]][9][sincn] + + lut[data[20]][10][sincn] + + lut[data[22]][11][sincn] + + lut[data[24]][12][sincn] + + lut[data[26]][13][sincn] + + lut[data[28]][14][sincn] + + lut[data[30]][15][sincn]; +} +#endif +int32_t (*filter_tables_64[2])(lut_t lut, uint8_t *data, uint8_t sincn) = {filter_table_mono_64, filter_table_stereo_64}; +#if DECIMATION_MAX == 128 +int32_t (*filter_tables_128[2])(lut_t lut, uint8_t *data, uint8_t sincn) = {filter_table_mono_128, filter_table_stereo_128}; +#endif +#else +int32_t filter_table(uint8_t *data, uint8_t sincn, TPDMFilter_InitStruct *param) { + uint8_t c, i; + uint16_t data_index = 0; + uint32_t *coef_p = ¶m->coef[sincn][0]; + int32_t F = 0; + uint8_t decimation = param->Decimation; + uint8_t channels = param->In_MicChannels; + + for (i = 0; i < decimation; i += 8) { + c = data[data_index]; + F += ((c >> 7)) * coef_p[i ] + + ((c >> 6) & 0x01) * coef_p[i + 1] + + ((c >> 5) & 0x01) * coef_p[i + 2] + + ((c >> 4) & 0x01) * coef_p[i + 3] + + ((c >> 3) & 0x01) * coef_p[i + 4] + + ((c >> 2) & 0x01) * coef_p[i + 5] + + ((c >> 1) & 0x01) * coef_p[i + 6] + + ((c) & 0x01) * coef_p[i + 7]; + data_index += channels; + } + return F; +} +#endif + +void convolve(uint32_t Signal[] /* SignalLen */, unsigned short SignalLen, + uint32_t Kernel[] /* KernelLen */, unsigned short KernelLen, + uint32_t Result[] /* SignalLen + KernelLen - 1 */) { + uint16_t n; + + for (n = 0; n < SignalLen + KernelLen - 1; n++) + { + unsigned short kmin, kmax, k; + + Result[n] = 0; + + kmin = (n >= KernelLen - 1) ? n - (KernelLen - 1) : 0; + kmax = (n < SignalLen - 1) ? n : SignalLen - 1; + + for (k = kmin; k <= kmax; k++) { + Result[n] += Signal[k] * Kernel[n - k]; + } + } +} + +void Open_PDM_Filter_Init(TPDMFilter_InitStruct *Param) { + uint16_t i, j; + int64_t sum = 0; + + uint8_t decimation = Param->Decimation; + + for (i = 0; i < SINCN; i++) { + Param->Coef[i] = 0; + Param->bit[i] = 0; + } + for (i = 0; i < decimation; i++) { + Param->sinc1[i] = 1; + } + + Param->OldOut = Param->OldIn = Param->OldZ = 0; + Param->LP_ALFA = (Param->LP_HZ != 0 ? (uint16_t)((float)Param->LP_HZ * 256 / (Param->LP_HZ + Param->Fs / (2 * 3.14159))) : 0); + Param->HP_ALFA = (Param->HP_HZ != 0 ? (uint16_t)((float)Param->Fs * 256 / (2 * 3.14159 * Param->HP_HZ + Param->Fs)) : 0); + + Param->FilterLen = decimation * SINCN; + Param->sinc[0] = 0; + Param->sinc[decimation * SINCN - 1] = 0; + convolve(Param->sinc1, decimation, Param->sinc1, decimation, Param->sinc2); + convolve(Param->sinc2, (decimation << 1) - 1, Param->sinc1, decimation, &Param->sinc[1]); + for (j = 0; j < SINCN; j++) { + for (i = 0; i < decimation; i++) { + Param->coef[j][i] = Param->sinc[j * decimation + i]; + sum += Param->sinc[j * decimation + i]; + } + } + + Param->sub_const = sum >> 1; + uint32_t div_const = Param->sub_const * Param->MaxVolume / 32768 / FILTER_GAIN; + Param->div_const = (div_const == 0 ? 1 : div_const); + + #ifdef USE_LUT + /* Look-Up Table. */ + uint16_t c, d, s; + for (s = 0; s < SINCN; s++) + { + uint32_t *coef_p = &Param->coef[s][0]; + for (c = 0; c < 256; c++) { + for (d = 0; d < decimation / 8; d++) { + Param->lut[c][d][s] = ((c >> 7)) * coef_p[d * 8 ] + + ((c >> 6) & 0x01) * coef_p[d * 8 + 1] + + ((c >> 5) & 0x01) * coef_p[d * 8 + 2] + + ((c >> 4) & 0x01) * coef_p[d * 8 + 3] + + ((c >> 3) & 0x01) * coef_p[d * 8 + 4] + + ((c >> 2) & 0x01) * coef_p[d * 8 + 5] + + ((c >> 1) & 0x01) * coef_p[d * 8 + 6] + + ((c) & 0x01) * coef_p[d * 8 + 7]; + } + } + } + #endif +} + +int Open_PDM_Filter_64(uint8_t *data, int16_t *dataOut, uint16_t volume, TPDMFilter_InitStruct *Param) { + uint8_t i, data_out_index; + uint8_t channels = Param->In_MicChannels; + uint8_t data_inc = ((DECIMATION_MAX >> 4) * channels); + int64_t Z, Z0, Z1, Z2; + int64_t OldOut, OldIn, OldZ; + + OldOut = Param->OldOut; + OldIn = Param->OldIn; + OldZ = Param->OldZ; + + #ifdef USE_LUT + uint8_t j = channels - 1; + #endif + + for (i = 0, data_out_index = 0; i < Param->nSamples; i++, data_out_index += channels) { + #ifdef USE_LUT + Z0 = filter_tables_64[j](Param->lut, data, 0); + Z1 = filter_tables_64[j](Param->lut, data, 1); + Z2 = filter_tables_64[j](Param->lut, data, 2); + #else + Z0 = filter_table(data, 0, Param); + Z1 = filter_table(data, 1, Param); + Z2 = filter_table(data, 2, Param); + #endif + + Z = Param->Coef[1] + Z2 - Param->sub_const; + Param->Coef[1] = Param->Coef[0] + Z1; + Param->Coef[0] = Z0; + + OldOut = (Param->HP_ALFA * (OldOut + Z - OldIn)) >> 8; + OldIn = Z; + OldZ = ((256 - Param->LP_ALFA) * OldZ + Param->LP_ALFA * OldOut) >> 8; + + Z = OldZ * volume; + Z = RoundDiv(Z, (Param->div_const)); + Z = SaturaLH(Z, -32700, 32700); + + dataOut[data_out_index] = Z; + data += data_inc; + } + + Param->OldOut = OldOut; + Param->OldIn = OldIn; + Param->OldZ = OldZ; + return data_out_index; +} + +#if DECIMATION_MAX == 128 +int Open_PDM_Filter_128(uint8_t *data, int16_t *dataOut, uint16_t volume, TPDMFilter_InitStruct *Param) { + uint8_t i, data_out_index; + uint8_t channels = Param->In_MicChannels; + uint8_t data_inc = ((DECIMATION_MAX >> 3) * channels); + int64_t Z, Z0, Z1, Z2; + int64_t OldOut, OldIn, OldZ; + + OldOut = Param->OldOut; + OldIn = Param->OldIn; + OldZ = Param->OldZ; + + #ifdef USE_LUT + uint8_t j = channels - 1; + #endif + + for (i = 0, data_out_index = 0; i < Param->nSamples; i++, data_out_index += channels) { + #ifdef USE_LUT + Z0 = filter_tables_128[j](Param->lut, data, 0); + Z1 = filter_tables_128[j](Param->lut, data, 1); + Z2 = filter_tables_128[j](Param->lut, data, 2); + #else + Z0 = filter_table(data, 0, Param); + Z1 = filter_table(data, 1, Param); + Z2 = filter_table(data, 2, Param); + #endif + + Z = Param->Coef[1] + Z2 - Param->sub_const; + Param->Coef[1] = Param->Coef[0] + Z1; + Param->Coef[0] = Z0; + + OldOut = (Param->HP_ALFA * (OldOut + Z - OldIn)) >> 8; + OldIn = Z; + OldZ = ((256 - Param->LP_ALFA) * OldZ + Param->LP_ALFA * OldOut) >> 8; + + Z = OldZ * volume; + Z = RoundDiv(Z, (Param->div_const)); + Z = SaturaLH(Z, -32700, 32700); + + dataOut[data_out_index] = Z; + data += data_inc; + } + + Param->OldOut = OldOut; + Param->OldIn = OldIn; + Param->OldZ = OldZ; + return data_out_index; +} +#endif diff --git a/ports/stm/common-hal/audiobusio/OpenPDMFilter.h b/ports/stm/common-hal/audiobusio/OpenPDMFilter.h new file mode 100644 index 0000000000..a6e4a8c063 --- /dev/null +++ b/ports/stm/common-hal/audiobusio/OpenPDMFilter.h @@ -0,0 +1,112 @@ +/** + ******************************************************************************* + * @file OpenPDMFilter.h + * @author CL + * @version V1.0.0 + * @date 9-September-2015 + * @brief Header file for Open PDM audio software decoding Library. + * This Library is used to decode and reconstruct the audio signal + * produced by ST MEMS microphone (MP45Dxxx, MP34Dxxx). + ******************************************************************************* + * @attention + * + *

© COPYRIGHT 2018 STMicroelectronics

+ * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + ******************************************************************************* + */ + +/* Define to prevent recursive inclusion -------------------------------------*/ + +#ifndef __OPENPDMFILTER_H +#define __OPENPDMFILTER_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ + +#include + +/* Definitions ---------------------------------------------------------------*/ + +/* + * Enable to use a Look-Up Table to improve performances while using more FLASH + * and RAM memory. + * Note: Without Look-Up Table up to stereo@16KHz configuration is supported. + */ +#define USE_LUT + +#define SINCN 3 +#define DECIMATION_MAX 128 // can be 128 but this didn't work for me +#define FILTER_GAIN 16 + +#define HTONS(A) ((((uint16_t)(A) & 0xff00) >> 8) | \ + (((uint16_t)(A) & 0x00ff) << 8)) + +#define RoundDiv(a, b) (((a) > 0) ? (((a) + (b) / 2) / (b)) : (((a) - (b) / 2) / (b))) + +#define SaturaLH(N, L, H) (((N) < (L)) ? (L) : (((N) > (H)) ? (H) : (N))) + +/* Types ---------------------------------------------------------------------*/ + +typedef int32_t lut_t[256][DECIMATION_MAX / 8][SINCN]; + + +typedef struct +{ + /* Public */ + uint16_t LP_HZ; + uint16_t HP_HZ; + uint16_t Fs; + unsigned int nSamples; + uint8_t In_MicChannels; + uint8_t Out_MicChannels; + uint8_t Decimation; + uint8_t MaxVolume; + /* Private */ + uint32_t Coef[SINCN]; + uint16_t FilterLen; + int64_t OldOut, OldIn, OldZ; + uint16_t LP_ALFA; + uint16_t HP_ALFA; + uint16_t bit[5]; + uint16_t byte; + uint32_t div_const; + int64_t sub_const; + uint32_t sinc[DECIMATION_MAX * SINCN]; + uint32_t sinc1[DECIMATION_MAX]; + uint32_t sinc2[DECIMATION_MAX * 2]; + uint32_t coef[SINCN][DECIMATION_MAX]; + #ifdef USE_LUT + lut_t lut; + #endif +} TPDMFilter_InitStruct; + +/* Exported functions ------------------------------------------------------- */ + +void Open_PDM_Filter_Init(TPDMFilter_InitStruct *init_struct); +int Open_PDM_Filter_64(uint8_t *data, int16_t *data_out, uint16_t mic_gain, TPDMFilter_InitStruct *init_struct); + +#if DECIMATION_MAX == 128 +int Open_PDM_Filter_128(uint8_t *data, int16_t *data_out, uint16_t mic_gain, TPDMFilter_InitStruct *init_struct); +#endif + +#ifdef __cplusplus +} +#endif + +#endif // __OPENPDMFILTER_H + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/ports/stm/common-hal/audiobusio/PDMIn.c b/ports/stm/common-hal/audiobusio/PDMIn.c new file mode 100644 index 0000000000..b1aa2047d8 --- /dev/null +++ b/ports/stm/common-hal/audiobusio/PDMIn.c @@ -0,0 +1,199 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include +#include "common-hal/audiobusio/PDMIn.h" +#include "shared-bindings/audiobusio/PDMIn.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "py/runtime.h" +#include "supervisor/memory.h" +#include "MEMS_Audio_ll_stm32l4.h" + + +MemsAudio memsAudio; +MemsAudio_STM32L4SAIPDM memsAudioImpl; +pdm_sample_t pdmBuffer[MEMS_AUDIO_PDM_BUFFER_LENGTH]; +audiobusio_pdmin_obj_t *instance; + +static bool pdm_data_available(MemsAudio_STM32L4SAIPDM *impl, uint8_t *pdmBuffer, size_t pdmBufferLength); + +// Caller validates that pins are free. +void common_hal_audiobusio_pdmin_construct(audiobusio_pdmin_obj_t *self, + const mcu_pin_obj_t *clock_pin, + const mcu_pin_obj_t *data_pin, + uint32_t sample_rate, + uint8_t bit_depth, + bool mono, + uint8_t oversample) { + self->sample_rate = sample_rate; + self->mono = mono; + self->oversample = oversample; + self->recording_complete = true; + + + if (!mono) { + mp_raise_ValueError(translate("only mono is supported")); + } + if (sample_rate != 16000) { + mp_raise_ValueError(translate("only sample_rate=16000 is supported")); + } + if (bit_depth != 16) { + mp_raise_ValueError(translate("only bit_depth=16 is supported")); + } + if (oversample != 64) { + mp_raise_ValueError(translate("only oversample=64 is supported")); + } + + // wait for the previous instance to finish. + if (instance) { + common_hal_audiobusio_pdmin_deinit(instance); + } + instance = self; + + memset(&memsAudio, 0, sizeof(memsAudio)); + memset(&memsAudioImpl, 0, sizeof(memsAudioImpl)); + + common_hal_mcu_pin_claim(clock_pin); + self->clock_pin = clock_pin; + common_hal_mcu_pin_claim(data_pin); + self->data_pin = data_pin; + + self->audio = &memsAudio; + self->audio_impl = &memsAudioImpl; + self->audio_impl->pdmBuffer = pdmBuffer; + self->audio_impl->pdmBufferLength = sizeof(pdmBuffer) / sizeof(pdmBuffer[0]); + self->audio_impl->pdm_data_available = pdm_data_available; + + mems_audio_init_stm32l4_sai_pdm(self->audio, self->audio_impl); + mems_audio_record(self->audio); + mems_audio_pause(self->audio); +} + +bool common_hal_audiobusio_pdmin_deinited(audiobusio_pdmin_obj_t *self) { + return self->clock_pin == NULL; +} + +void wait_dma_complete(audiobusio_pdmin_obj_t *self) { + while (!self->recording_complete) { + MICROPY_VM_HOOK_LOOP; + } +} + +void common_hal_audiobusio_pdmin_deinit(audiobusio_pdmin_obj_t *self) { + if (instance != self) { + return; + } + instance = NULL; + if (self->audio) { + wait_dma_complete(self); + mems_audio_stop(self->audio); + mems_audio_uninit(self->audio); + self->audio = NULL; + self->audio_impl = NULL; + } + + if (self->data_pin) { + common_hal_reset_pin(self->data_pin); + self->data_pin = NULL; + } + if (self->clock_pin) { + common_hal_reset_pin(self->clock_pin); + self->clock_pin = NULL; + } + + +} + +uint8_t common_hal_audiobusio_pdmin_get_bit_depth(audiobusio_pdmin_obj_t *self) { + return 16; +} + +uint32_t common_hal_audiobusio_pdmin_get_sample_rate(audiobusio_pdmin_obj_t *self) { + return 16000; +} + +static bool pdm_data_available(MemsAudio_STM32L4SAIPDM *impl, uint8_t *pdmBuffer, size_t pdmBufferLength) { + // update the filter with the correct number of samples + + audiobusio_pdmin_obj_t *pdmIn = (audiobusio_pdmin_obj_t *)(impl->audio->userData); + MemsAudio *audio = impl->audio; + + uint32_t pcmSamplesAvailable = pdmBufferLength * 8 / PDM_IN_DECIMATION_FACTOR; + if (pcmSamplesAvailable > audio->pcmOutputBufferLength) { + pcmSamplesAvailable = audio->pcmOutputBufferLength; + } + + // ensure the filter doesn't try to produce more samples than available + pdmIn->audio_impl->filter.nSamples = pcmSamplesAvailable; + + return pcmSamplesAvailable > 0; +} + +static void pcm_data_available(MemsAudio *audio, int16_t *pcmBuffer, size_t pcmBufferLength) { + // data is already in the output buffer + audiobusio_pdmin_obj_t *pdmIn = (audiobusio_pdmin_obj_t *)(audio->userData); + + // if DMA copies more data than will fit into the output buffer, crop the length to what will fit + if (audio->pcmOutputBufferLength < pcmBufferLength) { + pcmBufferLength = audio->pcmOutputBufferLength; + } + + audio->pcmOutputBuffer += pcmBufferLength; + audio->pcmOutputBufferLength -= pcmBufferLength; + if (audio->pcmOutputBufferLength == 0) { + pdmIn->recording_complete = true; + mems_audio_pause(audio); + } +} + +uint32_t common_hal_audiobusio_pdmin_record_to_buffer(audiobusio_pdmin_obj_t *self, + uint16_t *output_buffer, uint32_t output_buffer_length) { + + MemsAudio *audio = self->audio; + + wait_dma_complete(self); + + audio->pcmOutputBuffer = (int16_t *)output_buffer; + audio->pcmOutputBufferLength = output_buffer_length; + audio->pcm_data_available = pcm_data_available; + audio->userData = self; /// reference back to the PDMIn instance + self->recording_complete = false; + + mems_audio_err_t err = mems_audio_resume(audio); + if (!IS_MEMS_AUDIO_ERROR(err)) { + wait_dma_complete(self); + } + + mems_audio_pause(audio); + int samples_output = (int)(output_buffer_length) - audio->pcmOutputBufferLength; + + // convert from signed to unsigned (min-point moves from 0 to 32k) + for (int i = 0; i < samples_output; i++) { + output_buffer[i] += 0x8000; + } + + return samples_output; +} diff --git a/ports/stm/common-hal/audiobusio/PDMIn.h b/ports/stm/common-hal/audiobusio/PDMIn.h new file mode 100644 index 0000000000..b6ef4ee8bf --- /dev/null +++ b/ports/stm/common-hal/audiobusio/PDMIn.h @@ -0,0 +1,56 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Jeff Epler for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_STM_COMMON_HAL_AUDIOBUSIO_AUDIOOUT_H +#define MICROPY_INCLUDED_STM_COMMON_HAL_AUDIOBUSIO_AUDIOOUT_H + +#include +#include "py/obj.h" +#include "peripherals/pins.h" +#include "supervisor/memory.h" + +typedef struct MemsAudio_t MemsAudio; +typedef struct MemsAudio_STM32L4SAIPDM_t MemsAudio_STM32L4SAIPDM; + +typedef struct { + mp_obj_base_t base; + const mcu_pin_obj_t *clock_pin; + const mcu_pin_obj_t *data_pin; + uint32_t sample_rate; + uint8_t bit_depth; + bool mono; + uint8_t oversample; + supervisor_allocation *audio_allocation; + MemsAudio *audio; + MemsAudio_STM32L4SAIPDM *audio_impl; + /** + * @brief Flag to indicate from the ISR that recording is complete. + */ + volatile bool recording_complete; +} audiobusio_pdmin_obj_t; + + +#endif diff --git a/ports/stm/common-hal/audiobusio/__init__.c b/ports/stm/common-hal/audiobusio/__init__.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/supervisor/shared/memory.c b/supervisor/shared/memory.c index 06c568b42e..a5f3296a28 100644 --- a/supervisor/shared/memory.c +++ b/supervisor/shared/memory.c @@ -58,6 +58,9 @@ enum { #endif + CIRCUITPY_PORT_NUM_SUPERVISOR_ALLOCATIONS + #if CIRCUITPY_AUDIOBUSIO_PDMIN + + 1 + #endif , CIRCUITPY_SUPERVISOR_MOVABLE_ALLOC_COUNT = From f1e658f8bb312c41fdd2fa64094e5b2413c9939c Mon Sep 17 00:00:00 2001 From: dronecz Date: Sun, 6 Nov 2022 22:07:12 +0100 Subject: [PATCH 15/75] Update sdkonfig --- ports/espressif/boards/maker_badge/sdkonfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/maker_badge/sdkonfig b/ports/espressif/boards/maker_badge/sdkonfig index 5a33657fdc..68689ed79e 100644 --- a/ports/espressif/boards/maker_badge/sdkonfig +++ b/ports/espressif/boards/maker_badge/sdkonfig @@ -2,5 +2,5 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=n # LWIP # -CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +CONFIG_LWIP_LOCAL_HOSTNAME="Maker_badge" # end of LWIP From a568a5c2e25bb873f183633befe22f082a48801b Mon Sep 17 00:00:00 2001 From: dronecz Date: Sun, 6 Nov 2022 22:14:19 +0100 Subject: [PATCH 16/75] Rename sdkonfig to sdkconfig --- ports/espressif/boards/maker_badge/{sdkonfig => sdkconfig} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename ports/espressif/boards/maker_badge/{sdkonfig => sdkconfig} (100%) diff --git a/ports/espressif/boards/maker_badge/sdkonfig b/ports/espressif/boards/maker_badge/sdkconfig similarity index 100% rename from ports/espressif/boards/maker_badge/sdkonfig rename to ports/espressif/boards/maker_badge/sdkconfig From 09f6919c93e6c182f138f5bdc5b6dc3a433380f3 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 8 Nov 2022 09:36:50 -0600 Subject: [PATCH 17/75] Add ability to read VOLTAGE_MONITOR on Pico W Because this must be treated like an in-use pin for all other purposes, unfortunately a special case must be added in shared-bindings. Multiple AnalogIn objects for VOLTAGE_MONITOR can be created (because in use tracking isn't working) but this causes no harm. Testing performed: Read the monitor, then imported wifi. When the pin state was insufficiently restored, the second step would fail with debug messages about do_ioctl timeout. ``` import analogio, board a = analogio.AnalogIn(board.VOLTAGE_MONITOR) print(a.value) import wifi ``` Closes: #7020 --- ports/raspberrypi/bindings/cyw43/__init__.c | 8 ++++ ports/raspberrypi/bindings/cyw43/__init__.h | 1 + .../boards/raspberry_pi_pico_w/pins.c | 4 ++ .../common-hal/analogio/AnalogIn.c | 39 +++++++++++++++---- shared-bindings/analogio/AnalogIn.c | 9 ++++- 5 files changed, 53 insertions(+), 8 deletions(-) diff --git a/ports/raspberrypi/bindings/cyw43/__init__.c b/ports/raspberrypi/bindings/cyw43/__init__.c index bf0cbc2e67..c72581a6e4 100644 --- a/ports/raspberrypi/bindings/cyw43/__init__.c +++ b/ports/raspberrypi/bindings/cyw43/__init__.c @@ -123,6 +123,14 @@ const mcu_pin_obj_t *validate_obj_is_pin_including_cyw43(mp_obj_t obj) { return MP_OBJ_TO_PTR(obj); } +const mcu_pin_obj_t *validate_obj_is_free_pin_or_gpio29(mp_obj_t obj) { + const mcu_pin_obj_t *pin = validate_obj_is_pin(obj); + if (obj != &pin_GPIO29) { + assert_pin_free(pin); + } + return pin; +} + const mcu_pin_obj_t *validate_obj_is_free_pin_including_cyw43(mp_obj_t obj) { const mcu_pin_obj_t *pin = validate_obj_is_pin_including_cyw43(obj); assert_pin_free(pin); diff --git a/ports/raspberrypi/bindings/cyw43/__init__.h b/ports/raspberrypi/bindings/cyw43/__init__.h index 2520c6c2d1..65e9813f99 100644 --- a/ports/raspberrypi/bindings/cyw43/__init__.h +++ b/ports/raspberrypi/bindings/cyw43/__init__.h @@ -32,6 +32,7 @@ extern const mp_obj_type_t cyw43_pin_type; const mcu_pin_obj_t *validate_obj_is_free_pin_including_cyw43(mp_obj_t obj); +const mcu_pin_obj_t *validate_obj_is_free_pin_or_gpio29(mp_obj_t obj); const mcu_pin_obj_t *validate_obj_is_pin_including_cyw43(mp_obj_t obj); #define CONSTANT_CYW43_PM_VALUE(pm_mode, pm2_sleep_ret_ms, li_beacon_period, li_dtim_period, li_assoc) \ diff --git a/ports/raspberrypi/boards/raspberry_pi_pico_w/pins.c b/ports/raspberrypi/boards/raspberry_pi_pico_w/pins.c index 5a63e43a6d..8c85642597 100644 --- a/ports/raspberrypi/boards/raspberry_pi_pico_w/pins.c +++ b/ports/raspberrypi/boards/raspberry_pi_pico_w/pins.c @@ -45,6 +45,10 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/common-hal/analogio/AnalogIn.c b/ports/raspberrypi/common-hal/analogio/AnalogIn.c index b827068e1a..1dc4749208 100644 --- a/ports/raspberrypi/common-hal/analogio/AnalogIn.c +++ b/ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -35,16 +35,26 @@ #define ADC_FIRST_PIN_NUMBER 26 #define ADC_PIN_COUNT 4 +// Voltage monitor is special on Pico W, because this pin is shared between the +// voltage monitor function and the wifi function. Special handling is required +// to read the analog voltage. +#if CIRCUITPY_CYW43 +#define SPECIAL_PIN(pin) (pin->number == 29) +#else +#define SPECIAL_PIN(pin) false +#endif + void common_hal_analogio_analogin_construct(analogio_analogin_obj_t *self, const mcu_pin_obj_t *pin) { if (pin->number < ADC_FIRST_PIN_NUMBER || pin->number > ADC_FIRST_PIN_NUMBER + ADC_PIN_COUNT) { raise_ValueError_invalid_pin(); } adc_init(); + if (!SPECIAL_PIN(pin)) { + adc_gpio_init(pin->number); + claim_pin(pin); + } - adc_gpio_init(pin->number); - - claim_pin(pin); self->pin = pin; } @@ -57,14 +67,29 @@ void common_hal_analogio_analogin_deinit(analogio_analogin_obj_t *self) { return; } - reset_pin_number(self->pin->number); + if (!SPECIAL_PIN(self->pin)) { + reset_pin_number(self->pin->number); + } self->pin = NULL; } uint16_t common_hal_analogio_analogin_get_value(analogio_analogin_obj_t *self) { - adc_select_input(self->pin->number - ADC_FIRST_PIN_NUMBER); - uint16_t value = adc_read(); - + uint16_t value; + if (SPECIAL_PIN(self->pin)) { + common_hal_mcu_disable_interrupts(); + uint32_t old_pad = padsbank0_hw->io[self->pin->number]; + uint32_t old_ctrl = iobank0_hw->io[self->pin->number].ctrl; + adc_gpio_init(self->pin->number); + adc_select_input(self->pin->number - ADC_FIRST_PIN_NUMBER); + value = adc_read(); + gpio_init(self->pin->number); + padsbank0_hw->io[self->pin->number] = old_pad; + iobank0_hw->io[self->pin->number].ctrl = old_ctrl; + common_hal_mcu_enable_interrupts(); + } else { + adc_select_input(self->pin->number - ADC_FIRST_PIN_NUMBER); + value = adc_read(); + } // Stretch 12-bit ADC reading to 16-bit range return (value << 4) | (value >> 8); } diff --git a/shared-bindings/analogio/AnalogIn.c b/shared-bindings/analogio/AnalogIn.c index 0ca0e09023..274bfa4806 100644 --- a/shared-bindings/analogio/AnalogIn.c +++ b/shared-bindings/analogio/AnalogIn.c @@ -36,6 +36,10 @@ #include "shared-bindings/analogio/AnalogIn.h" #include "shared-bindings/util.h" +#if CIRCUITPY_CYW43 +#include "bindings/cyw43/__init__.h" +#endif + //| class AnalogIn: //| """Read analog voltage levels //| @@ -60,8 +64,11 @@ STATIC mp_obj_t analogio_analogin_make_new(const mp_obj_type_t *type, mp_arg_check_num(n_args, n_kw, 1, 1, false); // 1st argument is the pin + #if CIRCUITPY_CYW43 + const mcu_pin_obj_t *pin = validate_obj_is_free_pin_or_gpio29(args[0]); + #else const mcu_pin_obj_t *pin = validate_obj_is_free_pin(args[0]); - + #endif analogio_analogin_obj_t *self = m_new_obj(analogio_analogin_obj_t); self->base.type = &analogio_analogin_type; common_hal_analogio_analogin_construct(self, pin); From 7f36a365cf855906f4a5e00305f18a4949039f02 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Tue, 8 Nov 2022 10:42:14 -0600 Subject: [PATCH 18/75] delay 100us for analog voltage to stabilize .. otherwise, depending on the prior state of the pin as a digital input, the value read could be 20% low. --- ports/raspberrypi/common-hal/analogio/AnalogIn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ports/raspberrypi/common-hal/analogio/AnalogIn.c b/ports/raspberrypi/common-hal/analogio/AnalogIn.c index 1dc4749208..0056eb17b5 100644 --- a/ports/raspberrypi/common-hal/analogio/AnalogIn.c +++ b/ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -26,6 +26,7 @@ #include "common-hal/analogio/AnalogIn.h" #include "shared-bindings/analogio/AnalogIn.h" +#include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/microcontroller/Pin.h" #include "py/runtime.h" #include "supervisor/shared/translate/translate.h" @@ -81,6 +82,7 @@ uint16_t common_hal_analogio_analogin_get_value(analogio_analogin_obj_t *self) { uint32_t old_ctrl = iobank0_hw->io[self->pin->number].ctrl; adc_gpio_init(self->pin->number); adc_select_input(self->pin->number - ADC_FIRST_PIN_NUMBER); + common_hal_mcu_delay_us(100); value = adc_read(); gpio_init(self->pin->number); padsbank0_hw->io[self->pin->number] = old_pad; From 843d6b42f9e2794a1cde117e99f06cccc932c3fe Mon Sep 17 00:00:00 2001 From: Matthew McGowan Date: Tue, 8 Nov 2022 12:04:30 -0800 Subject: [PATCH 19/75] formatting(swan_r5): lexicographically sorted the board module names in the swan_r5 makefile include [ci-skip][skip-ci]. Skip CI since this is a cosmetic change only. --- ports/stm/boards/swan_r5/mpconfigboard.mk | 91 +++++++++-------------- 1 file changed, 35 insertions(+), 56 deletions(-) diff --git a/ports/stm/boards/swan_r5/mpconfigboard.mk b/ports/stm/boards/swan_r5/mpconfigboard.mk index 9e5be99bfa..ea4125e02b 100644 --- a/ports/stm/boards/swan_r5/mpconfigboard.mk +++ b/ports/stm/boards/swan_r5/mpconfigboard.mk @@ -15,63 +15,42 @@ LD_DEFAULT = boards/STM32L4R5_default.ld LD_BOOT = boards/STM32L4R5_boot.ld UF2_OFFSET = 0x8010000 UF2_BOOTLOADER ?= 1 - -# Turn all of the below off while trying to get the thing to run -# These modules are implemented in ports//common-hal: - -# Typically the first module to create -CIRCUITPY_MICROCONTROLLER = 1 -CIRCUITPY_ALARM = 1 - -# Typically the second module to create -CIRCUITPY_DIGITALIO = 1 -# Other modules: - -CIRCUITPY_OS = 1 -CIRCUITPY_STORAGE = 1 -CIRCUITPY_USB_MSC = 1 -CIRCUITPY_UDB_CDC = 1 -CIRCUITPY_USB_VENDOR = 1 -CIRCUITPY_NVM = 0 - -CIRCUITPY_ANALOGIO = 1 -CIRCUITPY_BUSIO = 1 -CIRCUITPY_NEOPIXEL_WRITE = 0 -CIRCUITPY_PULSEIO = 1 -CIRCUITPY_PWMIO = 1 -CIRCUITPY_AUDIOPWMIO = 1 -CIRCUITPY_CANIO = 0 -CIRCUITPY_I2CTARGET = 0 -# Requires SPI, PulseIO (stub ok): -CIRCUITPY_DISPLAYIO = 1 - -# These modules are implemented in shared-module/ - they can be included in -# any port once their prerequisites in common-hal are complete. -# Requires DigitalIO: -CIRCUITPY_BITBANGIO = 1 -# Requires neopixel_write or SPI (dotstar) -CIRCUITPY_PIXELBUF = 0 -# Requires OS -CIRCUITPY_RANDOM = 1 -# Requires Microcontroller -CIRCUITPY_TOUCHIO = 1 -# Requires USB -CIRCUITPY_USB_HID = 0 -CIRCUITPY_USB_MIDI = 0 -# Does nothing without I2C -CIRCUITPY_REQUIRE_I2C_PULLUPS = 0 -# No requirements, but takes extra flash -CIRCUITPY_ULAB = 1 -# requires SPI -CIRCUITPY_SDCARDIO = 0 -CIRCUITPY_BLEIO_HCI = 0 -CIRCUITPY_BLEIO = 0 -CIRCUITPY_BUSDEVICE = 0 -CIRCUITPY_KEYPAD = 1 -CIRCUITPY_RGBMATRIX = 0 -CIRCUITPY_RTC = 1 CIRCUITPY_BUILD_EXTENSIONS = bin,uf2 -CIRCUITPY_ENABLE_MPY_NATIVE = 1 + +CIRCUITPY_ALARM = 1 +CIRCUITPY_ANALOGIO = 1 CIRCUITPY_AUDIOBUSIO = 1 CIRCUITPY_AUDIOBUSIO_I2SOUT = 0 CIRCUITPY_AUDIOBUSIO_PDMIN = 1 +CIRCUITPY_AUDIOPWMIO = 1 +CIRCUITPY_BITBANGIO = 1 +CIRCUITPY_BLEIO = 0 +CIRCUITPY_BLEIO_HCI = 0 +CIRCUITPY_BUSDEVICE = 0 +CIRCUITPY_BUSIO = 1 +CIRCUITPY_CANIO = 0 +CIRCUITPY_DIGITALIO = 1 +CIRCUITPY_DISPLAYIO = 1 +CIRCUITPY_ENABLE_MPY_NATIVE = 1 +CIRCUITPY_I2CTARGET = 0 +CIRCUITPY_KEYPAD = 1 +CIRCUITPY_MICROCONTROLLER = 1 +CIRCUITPY_NEOPIXEL_WRITE = 0 +CIRCUITPY_NVM = 0 +CIRCUITPY_OS = 1 +CIRCUITPY_PIXELBUF = 0 +CIRCUITPY_PULSEIO = 1 +CIRCUITPY_PWMIO = 1 +CIRCUITPY_RANDOM = 1 +CIRCUITPY_REQUIRE_I2C_PULLUPS = 0 +CIRCUITPY_RGBMATRIX = 0 +CIRCUITPY_RTC = 1 +CIRCUITPY_SDCARDIO = 0 +CIRCUITPY_STORAGE = 1 +CIRCUITPY_TOUCHIO = 1 +CIRCUITPY_UDB_CDC = 1 +CIRCUITPY_ULAB = 1 +CIRCUITPY_USB_HID = 0 +CIRCUITPY_USB_MIDI = 0 +CIRCUITPY_USB_MSC = 1 +CIRCUITPY_USB_VENDOR = 1 From 97f693d2d8b782bb805fad29e26acc31616ca490 Mon Sep 17 00:00:00 2001 From: Matthew McGowan Date: Tue, 8 Nov 2022 14:18:54 -0800 Subject: [PATCH 20/75] docs(swan_r5): updated copyright notices --- ports/stm/common-hal/audiobusio/MEMS_Audio.c | 24 ++++++++++++++++++ ports/stm/common-hal/audiobusio/MEMS_Audio.h | 24 ++++++++++++++++++ .../stm/common-hal/audiobusio/MEMS_Audio_ll.h | 25 +++++++++++++++++++ .../audiobusio/MEMS_Audio_ll_stm32l4.c | 25 +++++++++++++++++++ .../audiobusio/MEMS_Audio_ll_stm32l4.h | 25 +++++++++++++++++++ ports/stm/common-hal/audiobusio/PDMIn.c | 2 +- ports/stm/common-hal/audiobusio/PDMIn.h | 2 +- 7 files changed, 125 insertions(+), 2 deletions(-) diff --git a/ports/stm/common-hal/audiobusio/MEMS_Audio.c b/ports/stm/common-hal/audiobusio/MEMS_Audio.c index 4371b609c0..624ffc92b0 100644 --- a/ports/stm/common-hal/audiobusio/MEMS_Audio.c +++ b/ports/stm/common-hal/audiobusio/MEMS_Audio.c @@ -1,3 +1,27 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2022 Matthew McGowan for Blues Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + #include #include diff --git a/ports/stm/common-hal/audiobusio/MEMS_Audio.h b/ports/stm/common-hal/audiobusio/MEMS_Audio.h index a26b94fef3..2f670c8505 100644 --- a/ports/stm/common-hal/audiobusio/MEMS_Audio.h +++ b/ports/stm/common-hal/audiobusio/MEMS_Audio.h @@ -1,3 +1,27 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2022 Matthew McGowan for Blues Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + #ifndef _MEMS_AUDIO_H_ #define _MEMS_AUDIO_H_ diff --git a/ports/stm/common-hal/audiobusio/MEMS_Audio_ll.h b/ports/stm/common-hal/audiobusio/MEMS_Audio_ll.h index 6419b90959..13d218fd5d 100644 --- a/ports/stm/common-hal/audiobusio/MEMS_Audio_ll.h +++ b/ports/stm/common-hal/audiobusio/MEMS_Audio_ll.h @@ -1,3 +1,28 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2022 Matthew McGowan for Blues Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + + #ifndef _MEMS_AUDIO_LL_H_ #define _MEMS_AUDIO_LL_H_ diff --git a/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.c b/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.c index 71f046f9b9..d10cdcd23e 100644 --- a/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.c +++ b/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.c @@ -1,3 +1,28 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2022 Matthew McGowan for Blues Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + + #include #include "MEMS_Audio_ll_stm32l4.h" #include "MEMS_Audio.h" diff --git a/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.h b/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.h index c76ccce5e1..ce2c397d47 100644 --- a/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.h +++ b/ports/stm/common-hal/audiobusio/MEMS_Audio_ll_stm32l4.h @@ -1,3 +1,28 @@ +/* + * The MIT License (MIT) + * + * Copyright (c) 2022 Matthew McGowan for Blues Inc. + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + + #ifndef _MEMS_AUDIO_LL_STM32L4_H_ #define _MEMS_AUDIO_LL_STM32L4_H_ diff --git a/ports/stm/common-hal/audiobusio/PDMIn.c b/ports/stm/common-hal/audiobusio/PDMIn.c index b1aa2047d8..5deb785371 100644 --- a/ports/stm/common-hal/audiobusio/PDMIn.c +++ b/ports/stm/common-hal/audiobusio/PDMIn.c @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2019 Jeff Epler for Adafruit Industries + * Copyright (c) 2022 Matthew McGowan for Blues Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal diff --git a/ports/stm/common-hal/audiobusio/PDMIn.h b/ports/stm/common-hal/audiobusio/PDMIn.h index b6ef4ee8bf..64c0d2b167 100644 --- a/ports/stm/common-hal/audiobusio/PDMIn.h +++ b/ports/stm/common-hal/audiobusio/PDMIn.h @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2019 Jeff Epler for Adafruit Industries + * Copyright (c) 2022 Matthew McGowan for Blues Inc. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal From 11ce0743187197fc5abc3e8f4fec6524c14208dd Mon Sep 17 00:00:00 2001 From: dronecz Date: Tue, 8 Nov 2022 23:43:13 +0100 Subject: [PATCH 21/75] Update mpconfigboard.mk --- ports/espressif/boards/maker_badge/mpconfigboard.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/boards/maker_badge/mpconfigboard.mk b/ports/espressif/boards/maker_badge/mpconfigboard.mk index bb96550da0..75d713d904 100644 --- a/ports/espressif/boards/maker_badge/mpconfigboard.mk +++ b/ports/espressif/boards/maker_badge/mpconfigboard.mk @@ -9,7 +9,7 @@ CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=40m CIRCUITPY_ESP_FLASH_SIZE=4MB -CIRCUITPY_MODULE=wroom +IDF_TARGET = esp32s2 FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel From 93b6772c65c7f0b4b6b6cc8535bcf6d6aa4d2300 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Tue, 8 Nov 2022 01:25:20 +0000 Subject: [PATCH 22/75] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (993 of 993 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 4a6de92b4c..828e305c38 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2022-11-02 09:33+0000\n" +"PO-Revision-Date: 2022-11-09 10:48+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.14.2-dev\n" +"X-Generator: Weblate 4.15-dev\n" #: main.c msgid "" @@ -4271,7 +4271,7 @@ msgstr "tipo desconhecido '%q'" #: py/objstr.c #, c-format msgid "unmatched '%c' in format" -msgstr "" +msgstr "'%c' sem correspondência no formato" #: py/objtype.c py/runtime.c msgid "unreadable attribute" From 7a26443da8beecab71820d12cb066738e656aa4a Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Tue, 8 Nov 2022 08:25:00 +0000 Subject: [PATCH 23/75] Translated using Weblate (Swedish) Currently translated at 100.0% (993 of 993 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index d7dbb949b2..4c9bd6e193 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2022-10-31 13:02+0000\n" +"PO-Revision-Date: 2022-11-09 10:48+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.14.2-dev\n" +"X-Generator: Weblate 4.15-dev\n" #: main.c msgid "" @@ -4232,7 +4232,7 @@ msgstr "okänd typ '%q'" #: py/objstr.c #, c-format msgid "unmatched '%c' in format" -msgstr "" +msgstr "Omatchad '%c' i format" #: py/objtype.c py/runtime.c msgid "unreadable attribute" From e390e7142638f582a18233f3080ac7f4e4118b5b Mon Sep 17 00:00:00 2001 From: Ettore Atalan Date: Wed, 9 Nov 2022 18:29:11 +0000 Subject: [PATCH 24/75] Translated using Weblate (German) Currently translated at 99.7% (991 of 993 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/de/ --- locale/de_DE.po | 70 ++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/locale/de_DE.po b/locale/de_DE.po index 17676cfa51..99bc2e96df 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -6,14 +6,14 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2022-11-04 15:05+0000\n" +"PO-Revision-Date: 2022-11-09 19:20+0000\n" "Last-Translator: Ettore Atalan \n" "Language: de_DE\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.14.2-dev\n" +"X-Generator: Weblate 4.15-dev\n" #: main.c msgid "" @@ -38,7 +38,7 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" "\n" -"Bitte melden Sie ein Problem mit dem Inhalt Ihres CIRCUITPY-Laufwerks unter\n" +"Bitte melde ein Problem mit dem Inhalt Ihres CIRCUITPY-Laufwerks unter\n" "https://github.com/adafruit/circuitpython/issues\n" #: py/obj.c @@ -555,8 +555,8 @@ msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" msgstr "" -"Automatisches Neuladen ist aktiv. Speichere Dateien über USB um sie " -"auszuführen oder verbinde dich mit der REPL zum Deaktivieren.\n" +"Automatisches Neuladen ist aktiviert. Speichere Dateien einfach über USB, um " +"sie auszuführen, oder gib REPL ein, um sie zu deaktivieren.\n" #: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" @@ -820,8 +820,8 @@ msgid "" "Connection has been disconnected and can no longer be used. Create a new " "connection." msgstr "" -"Die Verbindung wurde getrennt und kann nicht mehr verwendet werden. " -"Erstellen Sie eine neue Verbindung." +"Die Verbindung wurde getrennt und kann nicht mehr verwendet werden. Erstelle " +"eine neue Verbindung." #: py/persistentcode.c msgid "Corrupt .mpy file" @@ -857,7 +857,7 @@ msgstr "DAC-Kanal-Initialisierungsfehler" #: ports/stm/common-hal/analogio/AnalogOut.c msgid "DAC Device Init Error" -msgstr "DAC Device Initialisierungs-Fehler" +msgstr "DAC-Gerät-Initialisierungsfehler" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "DAC already in use" @@ -1082,7 +1082,7 @@ msgstr "Die Funktion erwartet, dass der 'lock'-Befehl zuvor ausgeführt wurde" #: ports/cxd56/common-hal/gnss/GNSS.c msgid "GNSS init" -msgstr "GNSS Initialisierung" +msgstr "GNSS-Initialisierung" #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Generic Failure" @@ -1105,7 +1105,7 @@ msgstr "Hald-Duplex SPI is tnicht implementiert" #: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" -msgstr "Hardware beschäftigt, versuchen Sie alternative Pins" +msgstr "Hardware beschäftigt, versuche alternative Pins" #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "Hardware in use, try alternative pins" @@ -1117,7 +1117,7 @@ msgstr "Lese/Schreibe-operation an geschlossener Datei" #: ports/stm/common-hal/busio/I2C.c msgid "I2C init error" -msgstr "I2C Initialisierungsfehler" +msgstr "I2C-Initialisierungsfehler" #: ports/raspberrypi/common-hal/busio/I2C.c #: ports/raspberrypi/common-hal/i2ctarget/I2CTarget.c @@ -1142,7 +1142,7 @@ msgid "" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "mpy-update for more info." msgstr "" -"Inkompatible mpy-Datei. Bitte aktualisieren Sie alle mpy-Dateien. Siehe " +"Inkompatible .mpy-Datei. Bitte aktualisiere alle .mpy-Dateien. Siehe " "http://adafru.it/mpy-update für weitere Informationen." #: shared-bindings/_pew/PewPew.c @@ -1779,8 +1779,8 @@ msgid "" "constructor" msgstr "" "Pinbelegung verwendet %d Bytes pro Element, was mehr als die idealen %d " -"Bytes verbraucht. Wenn dies nicht vermieden werden kann, übergeben Sie " -"allow_inefficient = True an den Konstruktor" +"Bytes verbraucht. Wenn dies nicht vermieden werden kann, übergib " +"allow_inefficient=True an den Konstruktor" #: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c msgid "Pins must be sequential" @@ -1919,7 +1919,7 @@ msgstr "SD-Card CSD-Format nicht unterstützt" #: ports/cxd56/common-hal/sdioio/SDCard.c msgid "SDCard init" -msgstr "SDCard Initialisierung" +msgstr "SDCard-Initialisierung" #: ports/stm/common-hal/sdioio/SDCard.c #, c-format @@ -1937,7 +1937,7 @@ msgstr "SPI-Konfiguration fehlgeschlagen" #: ports/stm/common-hal/busio/SPI.c msgid "SPI init error" -msgstr "SPI Initialisierungsfehler" +msgstr "SPI-Initialisierungsfehler" #: ports/raspberrypi/common-hal/busio/SPI.c msgid "SPI peripheral in use" @@ -1954,7 +1954,7 @@ msgstr "Maßstabs-Abmeßungen müssen durch 3 teilbar sein" #: ports/espressif/common-hal/_bleio/Adapter.c #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Scan already in progess. Stop with stop_scan." -msgstr "Scannen Sie bereits in Bearbeitung. Stoppen Sie mit stop_scan." +msgstr "Scannen bereits in Bearbeitung. Stoppe mit stop_scan." #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c @@ -1996,7 +1996,7 @@ msgstr "Quell- und Zielbuffer müssen gleich lang sein" #: shared-bindings/paralleldisplay/ParallelBus.c msgid "Specify exactly one of data0 or data_pins" -msgstr "Geben Sie genau einen von data0 oder data_pins an" +msgstr "Gib genau einen von data0 oder data_pins an" #: extmod/modure.c msgid "Splitting with sub-captures" @@ -2012,11 +2012,11 @@ msgstr "Stereo rechts muss sich auf PWM-Kanal B befinden" #: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "Supply at least one UART pin" -msgstr "Geben Sie mindestens einen UART-Pin an" +msgstr "Gib mindestens einen UART-Pin an" #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" -msgstr "Geben Sie entweder monotonic_time oder epoch_time an" +msgstr "Gib entweder monotonic_time oder epoch_time an" #: shared-bindings/gnss/GNSS.c msgid "System entry must be gnss.SatelliteSystem" @@ -2036,7 +2036,7 @@ msgid "" "Increase the stack size if you know how. If not:" msgstr "" "Der Heap von CircuitPython wurde beschädigt, weil der Stack zu klein war.\n" -"Vergrößern Sie den Stack, wenn Sie wissen, wie. Wenn nicht:" +"Vergrößere den Stack, wenn du weißt, wie. Wenn nicht:" #: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h msgid "The SW38 button was pressed at start up.\n" @@ -2052,7 +2052,7 @@ msgid "" "exit safe mode." msgstr "" "Das Modul `microcontroller` wurde zum Booten in den abgesicherten Modus " -"verwendet. Drücken Sie Reset, um den abgesicherten Modus zu verlassen." +"verwendet. Drücke Reset, um den abgesicherten Modus zu verlassen." #: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h msgid "The central button was pressed at start up.\n" @@ -2072,10 +2072,9 @@ msgid "" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY)." msgstr "" -"Der Mikrocontroller hatte einen Stromausfall. Vergewissern Sie sich, dass " -"die\n" -"Stromversorgung genügend Strom für die gesamte Schaltung liefert und drücken " -"Sie Reset (nach dem Auswerfen von CIRCUITPY)." +"Der Mikrocontroller hatte einen Stromausfall. Vergewisser dich, dass die\n" +"Stromversorgung genügend Strom für die gesamte Schaltung liefert und\n" +"drücke Reset (nach dem Auswerfen von CIRCUITPY)." #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -2133,6 +2132,8 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without requesting safe mode." msgstr "" +"Zum Beenden setze bitte das Board zurück, ohne den abgesicherten Modus " +"aufzurufen." #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample" @@ -2176,11 +2177,11 @@ msgstr "UART wird de-initialisiert" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c #: ports/espressif/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "UART init" -msgstr "UART Initialisierung" +msgstr "UART-Initialisierung" #: ports/stm/common-hal/busio/UART.c msgid "UART re-init" -msgstr "UART wird wieder Initialisiert" +msgstr "UART wird erneut Initialisiert" #: ports/stm/common-hal/busio/UART.c msgid "UART write" @@ -2432,7 +2433,7 @@ msgstr "Schreiben nicht unterstüzt für diese Charakteristik" #: supervisor/shared/safe_mode.c msgid "You are in safe mode because:\n" -msgstr "Du bist im abgesicherten Modus weil:\n" +msgstr "Du befindest dich im abgesicherten Modus, weil:\n" #: supervisor/shared/safe_mode.c msgid "" @@ -2521,7 +2522,7 @@ msgstr "Versuch (arg)min/(arg)max einer leeren Sequenz zu holen" #: extmod/ulab/code/numpy/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" -msgstr "Sie haben versucht argmin/argmax einer leeren Sequenz zu erhalten" +msgstr "Versuch, argmin/argmax einer leeren Sequenz zu ermitteln" #: py/objstr.c msgid "attributes not supported yet" @@ -3449,8 +3450,8 @@ msgstr "" #: py/argcheck.c msgid "keyword argument(s) not yet implemented - use normal args instead" msgstr "" -"Schlüsselwort-Argument(e) noch nicht implementiert - verwenden Sie " -"stattdessen normale Argumente" +"Schlüsselwort-Argument(e) noch nicht implementiert - verwende stattdessen " +"normale Argumente" #: py/bc.c msgid "keywords must be strings" @@ -4091,8 +4092,7 @@ msgstr "String Indizes müssen Integer sein, nicht %q" #: py/stream.c msgid "string not supported; use bytes or bytearray" -msgstr "" -"Zeichenfolgen werden nicht unterstützt; Verwenden Sie bytes oder bytearray" +msgstr "Zeichenfolgen werden nicht unterstützt; verwende bytes oder bytearray" #: extmod/moductypes.c msgid "struct: can't index" @@ -4147,7 +4147,7 @@ msgstr "Zeitlimit beim warten auf v2 Karte" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "timer re-init" -msgstr "Timer wird neu initialisiert" +msgstr "Timer wird erneut initialisiert" #: shared-bindings/time/__init__.c msgid "timestamp out of range for platform time_t" From b46997fbcaa0527801c63d6a2d1938f41a3d470f Mon Sep 17 00:00:00 2001 From: Neradoc Date: Wed, 9 Nov 2022 16:30:17 +0000 Subject: [PATCH 25/75] Translated using Weblate (French) Currently translated at 99.2% (986 of 993 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index 0bba3c5c6a..1ed13f401d 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,14 +8,14 @@ msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2022-08-29 18:20+0000\n" -"Last-Translator: Maxime Leroy \n" +"PO-Revision-Date: 2022-11-09 19:20+0000\n" +"Last-Translator: Neradoc \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.14.1-dev\n" +"X-Generator: Weblate 4.15-dev\n" #: main.c msgid "" @@ -73,7 +73,7 @@ msgstr "%%c nécessite un chiffre entier 'int' ou un caractère 'char'" #: main.c #, c-format msgid "%02X" -msgstr "" +msgstr "%02X" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format @@ -1693,7 +1693,7 @@ msgstr "" #: ports/espressif/common-hal/alarm/coproc/CoprocAlarm.c #: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one %q can be set in deep sleep." -msgstr "" +msgstr "Une seul %q autorisée en sommeil profond." #: ports/espressif/common-hal/i2ctarget/I2CTarget.c #: ports/raspberrypi/common-hal/i2ctarget/I2CTarget.c @@ -2058,7 +2058,7 @@ msgstr "Délais de lecture de température dépassée" #: supervisor/shared/safe_mode.c msgid "The BOOT button was pressed at start up.\n" -msgstr "" +msgstr "Le bouton BOOT était pressé au démarrage.\n" #: supervisor/shared/safe_mode.c msgid "" @@ -2070,11 +2070,11 @@ msgstr "" #: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h msgid "The SW38 button was pressed at start up.\n" -msgstr "" +msgstr "Le bouton SW38 était pressé au démarrage.\n" #: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h msgid "The VOLUME button was pressed at start up.\n" -msgstr "" +msgstr "Le bouton VOLUME était pressé au démarrage.\n" #: supervisor/shared/safe_mode.c msgid "" @@ -2086,11 +2086,11 @@ msgstr "" #: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h msgid "The central button was pressed at start up.\n" -msgstr "" +msgstr "Le bouton central était pressé au démarrage.\n" #: ports/nrf/boards/aramcon2_badge/mpconfigboard.h msgid "The left button was pressed at start up.\n" -msgstr "" +msgstr "Le bouton gauche était pressé au démarrage.\n" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2160,7 +2160,7 @@ msgstr "Le délai est trop long : le délai maximal est de %d secondes" #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without requesting safe mode." -msgstr "" +msgstr "Pour le quitter, redémarrez sans demander le mode sans-échec." #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample" @@ -2215,8 +2215,9 @@ msgid "UART write" msgstr "Écriture UART" #: main.c +#, fuzzy msgid "UID:" -msgstr "" +msgstr "UID:" #: shared-module/usb_hid/Device.c msgid "USB busy" @@ -2284,7 +2285,7 @@ msgstr "Impossible de lancer la requête mDNS" #: shared-bindings/coproc/CoprocMemory.c msgid "Unable to write" -msgstr "" +msgstr "Écriture impossible" #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." @@ -2346,12 +2347,12 @@ msgstr "Faute inconnue du logiciel systême : %04x" #: ports/espressif/common-hal/_bleio/__init__.c #, c-format msgid "Unknown system firmware error: %d" -msgstr "Erreur du firmware système inconnue : %d" +msgstr "Erreur du logiciel système inconnue : %d" #: ports/raspberrypi/common-hal/wifi/__init__.c #, c-format msgid "Unkown error code %d" -msgstr "" +msgstr "Erreur inconnue %d" #: shared-bindings/adafruit_pixelbuf/PixelBuf.c #, c-format @@ -3039,6 +3040,8 @@ msgid "" "esp32_camera.Camera requires reserved PSRAM to be configured. See the " "documentation for instructions." msgstr "" +"esp32_camera.Camera nécessite la configuration de PSRAM réservée. Se référer " +"à la documentation." #: py/runtime.c msgid "exceptions must derive from BaseException" @@ -4293,7 +4296,7 @@ msgstr "type '%q' inconnu" #: py/objstr.c #, c-format msgid "unmatched '%c' in format" -msgstr "" +msgstr "'%c' sans correspondance dans le format" #: py/objtype.c py/runtime.c msgid "unreadable attribute" @@ -4374,7 +4377,7 @@ msgstr "wifi n’est pas activé" #: ports/raspberrypi/common-hal/wifi/Monitor.c msgid "wifi.Monitor not available" -msgstr "" +msgstr "wifi.Monitor non disponible" #: shared-bindings/_bleio/Adapter.c msgid "window must be <= interval" From 98ee03259c8e804db726cf69170bd6689b5219c1 Mon Sep 17 00:00:00 2001 From: Deleted User Date: Wed, 9 Nov 2022 15:52:46 +0000 Subject: [PATCH 26/75] Translated using Weblate (French) Currently translated at 99.2% (986 of 993 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/fr/ --- locale/fr.po | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/locale/fr.po b/locale/fr.po index 1ed13f401d..bc81a84ad3 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -9,7 +9,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" "PO-Revision-Date: 2022-11-09 19:20+0000\n" -"Last-Translator: Neradoc \n" +"Last-Translator: Deleted User \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -173,7 +173,7 @@ msgstr "%q doit être >= %d" #: shared-bindings/analogbufio/BufferedIn.c #: shared-bindings/audiocore/RawSample.c msgid "%q must be a bytearray or array of type 'h', 'H', 'b', or 'B'" -msgstr "" +msgstr "%q doit être a bytearray ou array de type 'h', 'H', 'b', ou 'B'" #: py/argcheck.c msgid "%q must be a string" @@ -602,7 +602,7 @@ msgstr "RX et TX requis pour le contrôle de flux" #: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h #: ports/atmel-samd/boards/meowmeow/mpconfigboard.h msgid "Both buttons were pressed at start up.\n" -msgstr "" +msgstr "Les deux boutons étaient pressés au démarrage.\n" #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" @@ -672,7 +672,7 @@ msgstr "La broche %d du bus est déjà utilisée" #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h msgid "Button A was pressed at start up.\n" -msgstr "" +msgstr "Le bouton A était pressé au démarrage.\n" #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." @@ -967,7 +967,7 @@ msgstr "Attendu un %q" #: ports/raspberrypi/bindings/cyw43/__init__.c msgid "Expected a %q or %q" -msgstr "" +msgstr "Attendu un %q ou %q" #: shared-bindings/alarm/__init__.c msgid "Expected an %q" @@ -1054,16 +1054,16 @@ msgstr "Filtres trop complexe" #: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware is duplicate" -msgstr "" +msgstr "Le logiciel est identique" #: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware is invalid" -msgstr "" +msgstr "Logiciel invalide" #: ports/espressif/common-hal/coproc/Coproc.c #: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware is too big" -msgstr "" +msgstr "Logiciel trop volumineux" #: shared-bindings/bitmaptools/__init__.c msgid "For L8 colorspace, input bitmap must have 8 bits per pixel" @@ -1597,11 +1597,11 @@ msgstr "Aucun minuteur disponible" #: supervisor/shared/safe_mode.c msgid "Nordic system firmware failure assertion." -msgstr "Assertion échouée du logiciel systême Nordic." +msgstr "Assertion échouée du logiciel système Nordic." #: ports/nrf/common-hal/_bleio/__init__.c msgid "Nordic system firmware out of memory" -msgstr "Logiciel systême Nordic hors de mémoire" +msgstr "Logiciel système Nordic n'a plus de mémoire" #: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c msgid "Not a valid IP string" @@ -1729,7 +1729,7 @@ msgstr "Timeout de l'opération" #: ports/espressif/common-hal/espidf/__init__.c ports/espressif/esp_error.c msgid "Out of memory" -msgstr "Hors de mémoire" +msgstr "Mémoire insuffisante" #: ports/espressif/common-hal/socketpool/Socket.c #: ports/raspberrypi/common-hal/socketpool/Socket.c @@ -2337,12 +2337,12 @@ msgstr "Erreur de sécurité inconnue : 0x%04x" #: ports/espressif/common-hal/_bleio/__init__.c #, c-format msgid "Unknown system firmware error at %s:%d: %d" -msgstr "Erreur du firmware système inconnue à %s:%d : %d" +msgstr "Erreur du logiciel système inconnue à %s:%d : %d" #: ports/nrf/common-hal/_bleio/__init__.c #, c-format msgid "Unknown system firmware error: %04x" -msgstr "Faute inconnue du logiciel systême : %04x" +msgstr "Faute inconnue du logiciel système : %04x" #: ports/espressif/common-hal/_bleio/__init__.c #, c-format @@ -2509,7 +2509,7 @@ msgstr "Le paramêtre argsort doit être un ndarray" #: extmod/ulab/code/numpy/numerical.c msgid "argsort is not implemented for flattened arrays" -msgstr "argsort n'est pas mis en œuvre pour les matrices aplatis" +msgstr "argsort n'est pas implémenté pour les matrices aplaties" #: py/runtime.c shared-bindings/supervisor/__init__.c msgid "argument has wrong type" From 3910557605c4133e2f6e245a5b8aa69ea8909d72 Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Wed, 9 Nov 2022 20:20:06 +0100 Subject: [PATCH 27/75] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 10 ++++++++++ locale/cs.po | 10 ++++++++++ locale/de_DE.po | 14 ++++++++++++-- locale/el.po | 10 ++++++++++ locale/en_GB.po | 10 ++++++++++ locale/es.po | 10 ++++++++++ locale/fil.po | 10 ++++++++++ locale/fr.po | 10 ++++++++++ locale/hi.po | 10 ++++++++++ locale/it_IT.po | 10 ++++++++++ locale/ja.po | 10 ++++++++++ locale/ko.po | 10 ++++++++++ locale/nl.po | 10 ++++++++++ locale/pl.po | 10 ++++++++++ locale/pt_BR.po | 10 ++++++++++ locale/ru.po | 10 ++++++++++ locale/sv.po | 10 ++++++++++ locale/tr.po | 10 ++++++++++ locale/zh_Latn_pinyin.po | 10 ++++++++++ 19 files changed, 192 insertions(+), 2 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 85089303e3..fe346373ef 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -3730,10 +3730,20 @@ msgid "offset out of bounds" msgstr "modul tidak ditemukan" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index c0a27df166..3ea4c2dcf3 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -3716,10 +3716,20 @@ msgid "offset out of bounds" msgstr "" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 99bc2e96df..d9c21c5742 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -1142,8 +1142,8 @@ msgid "" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "mpy-update for more info." msgstr "" -"Inkompatible .mpy-Datei. Bitte aktualisiere alle .mpy-Dateien. Siehe " -"http://adafru.it/mpy-update für weitere Informationen." +"Inkompatible .mpy-Datei. Bitte aktualisiere alle .mpy-Dateien. Siehe http://" +"adafru.it/mpy-update für weitere Informationen." #: shared-bindings/_pew/PewPew.c msgid "Incorrect buffer size" @@ -3795,10 +3795,20 @@ msgid "offset out of bounds" msgstr "offset außerhalb der Grenzen" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "nur eine bit_depth=16 wird unterstützt" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "nur eine sample_rate=16000 wird unterstützt" diff --git a/locale/el.po b/locale/el.po index 6441c013b8..d47a0c5399 100644 --- a/locale/el.po +++ b/locale/el.po @@ -3725,10 +3725,20 @@ msgid "offset out of bounds" msgstr "" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index f2941c143e..e6fabd93d9 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -3735,10 +3735,20 @@ msgid "offset out of bounds" msgstr "offset out of bounds" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "only bit_depth=16 is supported" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "only sample_rate=16000 is supported" diff --git a/locale/es.po b/locale/es.po index 477c7804d0..13cb9a3821 100644 --- a/locale/es.po +++ b/locale/es.po @@ -3782,10 +3782,20 @@ msgid "offset out of bounds" msgstr "offset fuera de límites" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "solo se admite bit_depth=16" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "solo se admite sample_rate=16000" diff --git a/locale/fil.po b/locale/fil.po index e6f7823269..f1e363b149 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -3734,10 +3734,20 @@ msgid "offset out of bounds" msgstr "wala sa sakop ang address" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" diff --git a/locale/fr.po b/locale/fr.po index bc81a84ad3..2a4d6b230f 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -3825,10 +3825,20 @@ msgid "offset out of bounds" msgstr "décalage hors limites" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "seul bit_depth = 16 est pris en charge" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "seul sample_rate = 16000 est pris en charge" diff --git a/locale/hi.po b/locale/hi.po index af78de1e3b..3c3496600b 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -3698,10 +3698,20 @@ msgid "offset out of bounds" msgstr "" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 09d98d9ae5..e1ba5c3827 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -3745,10 +3745,20 @@ msgid "offset out of bounds" msgstr "indirizzo fuori limite" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" diff --git a/locale/ja.po b/locale/ja.po index f647d9acc7..f0755961cf 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -3717,10 +3717,20 @@ msgid "offset out of bounds" msgstr "" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "bit_depth=16のみ対応しています" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" diff --git a/locale/ko.po b/locale/ko.po index 8ec7ede284..4ec7ff804f 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -3702,10 +3702,20 @@ msgid "offset out of bounds" msgstr "" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 990b6154df..fc1e1f77b8 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -3735,10 +3735,20 @@ msgid "offset out of bounds" msgstr "offset buiten bereik" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "alleen bit_depth=16 wordt ondersteund" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "alleen sample_rate=16000 wordt ondersteund" diff --git a/locale/pl.po b/locale/pl.po index 0f0ae884ec..22eacea387 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -3710,10 +3710,20 @@ msgid "offset out of bounds" msgstr "offset poza zakresem" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "obsługiwane jest tylko bit_depth=16" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "obsługiwane jest tylko sample_rate=16000" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 828e305c38..f59efab8c2 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -3798,10 +3798,20 @@ msgid "offset out of bounds" msgstr "desvio fora dos limites" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "apenas bit_depth = 16 é compatível" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "apenas sample_rate = 16000 é compatível" diff --git a/locale/ru.po b/locale/ru.po index 8516515291..a575f05a40 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -3747,10 +3747,20 @@ msgid "offset out of bounds" msgstr "" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" diff --git a/locale/sv.po b/locale/sv.po index 4c9bd6e193..9b4332e60b 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -3763,10 +3763,20 @@ msgid "offset out of bounds" msgstr "offset utanför gränserna" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "bara bit_depth=16 stöds" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "enbart sample_rate=16000 stöds" diff --git a/locale/tr.po b/locale/tr.po index 9734232c62..1d8eacdae0 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -3718,10 +3718,20 @@ msgid "offset out of bounds" msgstr "" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index e1313e5b06..8dee6b5f2e 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -3763,10 +3763,20 @@ msgid "offset out of bounds" msgstr "piānlí biānjiè" #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only bit_depth=16 is supported" msgstr "Jǐn zhīchí wèi shēndù = 16" +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only mono is supported" +msgstr "" + +#: ports/stm/common-hal/audiobusio/PDMIn.c +msgid "only oversample=64 is supported" +msgstr "" + #: ports/nrf/common-hal/audiobusio/PDMIn.c +#: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only sample_rate=16000 is supported" msgstr "Jǐn zhīchí cǎiyàng lǜ = 16000" From 5d974c35ee620e36efa2148a6f64e1e7df1b55f5 Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Thu, 10 Nov 2022 08:31:27 +0530 Subject: [PATCH 28/75] update protomatter to latest commit --- lib/protomatter | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/protomatter b/lib/protomatter index d0a07e14ad..cc93ff18c3 160000 --- a/lib/protomatter +++ b/lib/protomatter @@ -1 +1 @@ -Subproject commit d0a07e14adcd71a7c22bcceb16c55aadb5e0d104 +Subproject commit cc93ff18c3a20b25396cb2babaee8ed33bb79528 From 1f332e70077b70eac3c41b41d6721b4a5014da4e Mon Sep 17 00:00:00 2001 From: Kyle McCreery Date: Wed, 9 Nov 2022 23:15:38 -0500 Subject: [PATCH 29/75] Adding pillbug initial commit --- ports/nrf/boards/pillbug/board.c | 29 ++++++++++ ports/nrf/boards/pillbug/mpconfigboard.h | 45 ++++++++++++++++ ports/nrf/boards/pillbug/mpconfigboard.mk | 8 +++ ports/nrf/boards/pillbug/pins.c | 64 +++++++++++++++++++++++ 4 files changed, 146 insertions(+) create mode 100644 ports/nrf/boards/pillbug/board.c create mode 100644 ports/nrf/boards/pillbug/mpconfigboard.h create mode 100644 ports/nrf/boards/pillbug/mpconfigboard.mk create mode 100644 ports/nrf/boards/pillbug/pins.c diff --git a/ports/nrf/boards/pillbug/board.c b/ports/nrf/boards/pillbug/board.c new file mode 100644 index 0000000000..fb1ce4fb83 --- /dev/null +++ b/ports/nrf/boards/pillbug/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/nrf/boards/pillbug/mpconfigboard.h b/ports/nrf/boards/pillbug/mpconfigboard.h new file mode 100644 index 0000000000..d760b165d6 --- /dev/null +++ b/ports/nrf/boards/pillbug/mpconfigboard.h @@ -0,0 +1,45 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Glenn Ruben Bakke + * Copyright (c) 2018 Dan Halbert for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "nrfx/hal/nrf_gpio.h" + +#define MICROPY_HW_BOARD_NAME "PillBug" +#define MICROPY_HW_MCU_NAME "nRF52840" + +#define MICROPY_HW_LED_STATUS (&pin_P0_20) + +#define BOARD_HAS_CRYSTAL 1 + +#define DEFAULT_I2C_BUS_SCL (&pin_P0_13) +#define DEFAULT_I2C_BUS_SDA (&pin_P0_15) + +#define DEFAULT_SPI_BUS_SCK (&pin_P1_08) +#define DEFAULT_SPI_BUS_MOSI (&pin_P0_11) +#define DEFAULT_SPI_BUS_MISO (&pin_P0_26) + +#define DEFAULT_UART_BUS_RX (&pin_P0_08) +#define DEFAULT_UART_BUS_TX (&pin_P0_06) diff --git a/ports/nrf/boards/pillbug/mpconfigboard.mk b/ports/nrf/boards/pillbug/mpconfigboard.mk new file mode 100644 index 0000000000..d917ba0157 --- /dev/null +++ b/ports/nrf/boards/pillbug/mpconfigboard.mk @@ -0,0 +1,8 @@ +USB_VID = 0x16D0 +USB_PID = 0x10ED +USB_PRODUCT = "PillBug" +USB_MANUFACTURER = "Mechwild" + +MCU_CHIP = nrf52840 + +INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/nrf/boards/pillbug/pins.c b/ports/nrf/boards/pillbug/pins.c new file mode 100644 index 0000000000..503d6b0f1b --- /dev/null +++ b/ports/nrf/boards/pillbug/pins.c @@ -0,0 +1,64 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_P0_06), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_P0_08), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_P0_09), MP_ROM_PTR(&pin_P0_09) }, + { MP_ROM_QSTR(MP_QSTR_P0_10), MP_ROM_PTR(&pin_P0_10) }, + { MP_ROM_QSTR(MP_QSTR_P0_11), MP_ROM_PTR(&pin_P0_11) }, + { MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) }, + { MP_ROM_QSTR(MP_QSTR_P0_13), MP_ROM_PTR(&pin_P0_13) }, + { MP_ROM_QSTR(MP_QSTR_P0_15), MP_ROM_PTR(&pin_P0_15) }, + { MP_ROM_QSTR(MP_QSTR_P0_17), MP_ROM_PTR(&pin_P0_17) }, + { MP_ROM_QSTR(MP_QSTR_P0_20), MP_ROM_PTR(&pin_P0_20) }, + { MP_ROM_QSTR(MP_QSTR_P0_22), MP_ROM_PTR(&pin_P0_22) }, + { MP_ROM_QSTR(MP_QSTR_P0_24), MP_ROM_PTR(&pin_P0_24) }, + { MP_ROM_QSTR(MP_QSTR_P0_26), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_P0_29), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_P0_31), MP_ROM_PTR(&pin_P0_31) }, + { MP_ROM_QSTR(MP_QSTR_P1_00), MP_ROM_PTR(&pin_P1_00) }, + { MP_ROM_QSTR(MP_QSTR_P1_01), MP_ROM_PTR(&pin_P1_01) }, + { MP_ROM_QSTR(MP_QSTR_P1_02), MP_ROM_PTR(&pin_P1_02) }, + { MP_ROM_QSTR(MP_QSTR_P1_04), MP_ROM_PTR(&pin_P1_04) }, + { MP_ROM_QSTR(MP_QSTR_P1_06), MP_ROM_PTR(&pin_P1_06) }, + { MP_ROM_QSTR(MP_QSTR_P1_07), MP_ROM_PTR(&pin_P1_07) }, + { MP_ROM_QSTR(MP_QSTR_P1_11), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_P1_13), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_P1_15), MP_ROM_PTR(&pin_P1_15) }, + + + { MP_ROM_QSTR(MP_QSTR_AIN0), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_AIN2), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_AIN5), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_AIN7), MP_ROM_PTR(&pin_P0_31) }, + + { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, + { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, + + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_P0_04) }, // Read battery voltage divider + { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_P0_04) }, + + { MP_ROM_QSTR(MP_QSTR_VCC_OFF), MP_ROM_PTR(&pin_P1_07) }, // External VCC by MOSFET + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_20) }, // Blue LED, HIGH sets to on + + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P0_06) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_13) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_15) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_10) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P1_11) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; + +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 19df394437f6f041b293891a8b517320fe012008 Mon Sep 17 00:00:00 2001 From: dronecz Date: Thu, 10 Nov 2022 21:14:01 +0000 Subject: [PATCH 30/75] Adding frozen modules --- .gitmodules | 6 ++++++ frozen/Adafruit_CircuitPython_SSD1680 | 1 + frozen/Adafruit_CircuitPython_UC8151D | 1 + 3 files changed, 8 insertions(+) create mode 160000 frozen/Adafruit_CircuitPython_SSD1680 create mode 160000 frozen/Adafruit_CircuitPython_UC8151D diff --git a/.gitmodules b/.gitmodules index 0d521b5ff0..f13eb79e45 100644 --- a/.gitmodules +++ b/.gitmodules @@ -319,3 +319,9 @@ [submodule "lib/mbedtls"] path = lib/mbedtls url = https://github.com/ARMmbed/mbedtls.git +[submodule "frozen/Adafruit_CircuitPython_UC8151D"] + path = frozen/Adafruit_CircuitPython_UC8151D + url = https://github.com/adafruit/Adafruit_CircuitPython_UC8151D +[submodule "frozen/Adafruit_CircuitPython_SSD1680"] + path = frozen/Adafruit_CircuitPython_SSD1680 + url = https://github.com/adafruit/Adafruit_CircuitPython_SSD1680 diff --git a/frozen/Adafruit_CircuitPython_SSD1680 b/frozen/Adafruit_CircuitPython_SSD1680 new file mode 160000 index 0000000000..adff47d7be --- /dev/null +++ b/frozen/Adafruit_CircuitPython_SSD1680 @@ -0,0 +1 @@ +Subproject commit adff47d7be2a430b20e5ebcc59cb4e5a38fc171c diff --git a/frozen/Adafruit_CircuitPython_UC8151D b/frozen/Adafruit_CircuitPython_UC8151D new file mode 160000 index 0000000000..a64fad692c --- /dev/null +++ b/frozen/Adafruit_CircuitPython_UC8151D @@ -0,0 +1 @@ +Subproject commit a64fad692cc83fa1ac48b8f5ab1a955fd9b39251 From 0bf9df232a91aa209ee01ac571419d62acbd3a0b Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Fri, 11 Nov 2022 14:17:57 +0200 Subject: [PATCH 31/75] fix debug --- ports/raspberrypi/common-hal/wifi/Radio.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ports/raspberrypi/common-hal/wifi/Radio.c b/ports/raspberrypi/common-hal/wifi/Radio.c index 3e95ae5cd1..ff0549c14d 100644 --- a/ports/raspberrypi/common-hal/wifi/Radio.c +++ b/ports/raspberrypi/common-hal/wifi/Radio.c @@ -46,6 +46,7 @@ #include "components/mdns/include/mdns.h" #endif +#include "lwip/sys.h" #include "lwip/dns.h" #include "lwip/icmp.h" #include "lwip/raw.h" @@ -55,6 +56,15 @@ #define PING_ID 0xAFAF #endif +#ifndef PING_DEBUG +#define PING_DEBUG LWIP_DBG_ON +#endif + +#ifdef LWIP_DEBUG +static u32_t ping_time; +#endif + + #define MAC_ADDRESS_LENGTH 6 #define NETIF_STA (&cyw43_state.netif[CYW43_ITF_STA]) From e6a4e2982f670828d35c4265e746e88d4bf461ff Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Fri, 11 Nov 2022 14:40:47 +0200 Subject: [PATCH 32/75] Update ports/raspberrypi/common-hal/wifi/Radio.c u32_t -> uint32_t Co-authored-by: MicroDev <70126934+MicroDev1@users.noreply.github.com> --- ports/raspberrypi/common-hal/wifi/Radio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/common-hal/wifi/Radio.c b/ports/raspberrypi/common-hal/wifi/Radio.c index ff0549c14d..8073f57063 100644 --- a/ports/raspberrypi/common-hal/wifi/Radio.c +++ b/ports/raspberrypi/common-hal/wifi/Radio.c @@ -61,7 +61,7 @@ #endif #ifdef LWIP_DEBUG -static u32_t ping_time; +static uint32_t ping_time; #endif From 5d3484f61a051d1088e52b76db67afb4db7496b6 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 11 Nov 2022 08:57:06 -0600 Subject: [PATCH 33/75] Update frozen modules --- frozen/Adafruit_CircuitPython_LIS3DH | 2 +- frozen/Adafruit_CircuitPython_Requests | 2 +- frozen/Adafruit_CircuitPython_SSD1680 | 2 +- frozen/Adafruit_CircuitPython_UC8151D | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/frozen/Adafruit_CircuitPython_LIS3DH b/frozen/Adafruit_CircuitPython_LIS3DH index 18eaddb96a..5b4703428f 160000 --- a/frozen/Adafruit_CircuitPython_LIS3DH +++ b/frozen/Adafruit_CircuitPython_LIS3DH @@ -1 +1 @@ -Subproject commit 18eaddb96aa6599901ef2ff0e140e89a2de8c5d0 +Subproject commit 5b4703428fc299ac268d08350c885122b2af1e75 diff --git a/frozen/Adafruit_CircuitPython_Requests b/frozen/Adafruit_CircuitPython_Requests index a5d56f3e48..317f4bdb79 160000 --- a/frozen/Adafruit_CircuitPython_Requests +++ b/frozen/Adafruit_CircuitPython_Requests @@ -1 +1 @@ -Subproject commit a5d56f3e4866c8dbb343e03500355a42c46e557a +Subproject commit 317f4bdb799afa59b164def4ea0610f57db9922e diff --git a/frozen/Adafruit_CircuitPython_SSD1680 b/frozen/Adafruit_CircuitPython_SSD1680 index adff47d7be..168624262c 160000 --- a/frozen/Adafruit_CircuitPython_SSD1680 +++ b/frozen/Adafruit_CircuitPython_SSD1680 @@ -1 +1 @@ -Subproject commit adff47d7be2a430b20e5ebcc59cb4e5a38fc171c +Subproject commit 168624262c18f5ee80ec392c0844d6a4c6548760 diff --git a/frozen/Adafruit_CircuitPython_UC8151D b/frozen/Adafruit_CircuitPython_UC8151D index a64fad692c..565fed5151 160000 --- a/frozen/Adafruit_CircuitPython_UC8151D +++ b/frozen/Adafruit_CircuitPython_UC8151D @@ -1 +1 @@ -Subproject commit a64fad692cc83fa1ac48b8f5ab1a955fd9b39251 +Subproject commit 565fed515138f962c4bcce0ee756d32e708a151a From d5ea4d8f2f775597962b6dfc08b466c58a9e9f45 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Thu, 10 Nov 2022 18:40:57 +0000 Subject: [PATCH 34/75] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (995 of 995 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index f59efab8c2..c3f7475167 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2022-11-09 10:48+0000\n" +"PO-Revision-Date: 2022-11-11 18:49+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -3804,11 +3804,11 @@ msgstr "apenas bit_depth = 16 é compatível" #: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only mono is supported" -msgstr "" +msgstr "Apenas o mono é compatível" #: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only oversample=64 is supported" -msgstr "" +msgstr "apenas oversample=64 é compatível" #: ports/nrf/common-hal/audiobusio/PDMIn.c #: ports/stm/common-hal/audiobusio/PDMIn.c From b9ce2867a05efdcb357ffd1f45cd263eeca0eff1 Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Thu, 10 Nov 2022 08:36:07 +0000 Subject: [PATCH 35/75] Translated using Weblate (Swedish) Currently translated at 100.0% (995 of 995 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 9b4332e60b..1980477f4f 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2022-11-09 10:48+0000\n" +"PO-Revision-Date: 2022-11-11 18:49+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -3769,11 +3769,11 @@ msgstr "bara bit_depth=16 stöds" #: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only mono is supported" -msgstr "" +msgstr "endast mono stöds" #: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only oversample=64 is supported" -msgstr "" +msgstr "endast oversample=64 stöds" #: ports/nrf/common-hal/audiobusio/PDMIn.c #: ports/stm/common-hal/audiobusio/PDMIn.c From 983502d6e3fe7611130ebec8d9f0d8d87fdbfb93 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 11 Nov 2022 15:31:49 -0500 Subject: [PATCH 36/75] ignore pin changes before sleep --- ports/raspberrypi/common-hal/alarm/__init__.c | 3 +++ .../common-hal/alarm/pin/PinAlarm.c | 27 +++++++++++-------- .../common-hal/alarm/pin/PinAlarm.h | 2 +- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/ports/raspberrypi/common-hal/alarm/__init__.c b/ports/raspberrypi/common-hal/alarm/__init__.c index 656d15af5a..f6d36f702e 100644 --- a/ports/raspberrypi/common-hal/alarm/__init__.c +++ b/ports/raspberrypi/common-hal/alarm/__init__.c @@ -234,6 +234,9 @@ void NORETURN common_hal_alarm_enter_deep_sleep(void) { // Reset uses the watchdog. Use scratch registers to store wake reason watchdog_hw->scratch[RP_WKUP_SCRATCH_REG] = _get_wakeup_cause(); + + // Just before reset, enable the pinalarm interrupt. + alarm_pin_pinalarm_entering_deep_sleep(); reset_cpu(); } diff --git a/ports/raspberrypi/common-hal/alarm/pin/PinAlarm.c b/ports/raspberrypi/common-hal/alarm/pin/PinAlarm.c index 0af27cb44f..93b8ff3165 100644 --- a/ports/raspberrypi/common-hal/alarm/pin/PinAlarm.c +++ b/ports/raspberrypi/common-hal/alarm/pin/PinAlarm.c @@ -38,7 +38,7 @@ STATIC bool woke_up; STATIC uint64_t alarm_triggered_pins; // 36 actual pins STATIC uint64_t alarm_reserved_pins; // 36 actual pins -STATIC bool _pinalarm_set = false; +STATIC bool _not_yet_deep_sleeping = false; #define GPIO_IRQ_ALL_EVENTS 0x15u @@ -46,12 +46,21 @@ STATIC void gpio_callback(uint gpio, uint32_t events) { alarm_triggered_pins |= (1 << gpio); woke_up = true; - // does this need to be called, to prevent IRQ from constantly going off? - gpio_acknowledge_irq(gpio, events); + // gpio_acknowledge_irq(gpio, events) is called automatically, before this callback is called. - // Disable IRQ automatically - gpio_set_irq_enabled(gpio, events, false); - gpio_set_dormant_irq_enabled(gpio, events, false); + if (_not_yet_deep_sleeping) { + // Event went off prematurely, before we went to sleep, so set it again. + gpio_set_irq_enabled(gpio, events, false); + } else { + // Went off during sleep. + // Disable IRQ automatically. + gpio_set_irq_enabled(gpio, events, false); + gpio_set_dormant_irq_enabled(gpio, events, false); + } +} + +void alarm_pin_pinalarm_entering_deep_sleep() { + _not_yet_deep_sleeping = false; } void common_hal_alarm_pin_pinalarm_construct(alarm_pin_pinalarm_obj_t *self, const mcu_pin_obj_t *pin, bool value, bool edge, bool pull) { @@ -156,11 +165,7 @@ void alarm_pin_pinalarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_ob gpio_set_dormant_irq_enabled((uint)alarm->pin->number, event, true); } - _pinalarm_set = true; + _not_yet_deep_sleeping = true; } } } - -bool alarm_pin_pinalarm_is_set(void) { - return _pinalarm_set; -} diff --git a/ports/raspberrypi/common-hal/alarm/pin/PinAlarm.h b/ports/raspberrypi/common-hal/alarm/pin/PinAlarm.h index 9dcbf2b848..26c6c49a5e 100644 --- a/ports/raspberrypi/common-hal/alarm/pin/PinAlarm.h +++ b/ports/raspberrypi/common-hal/alarm/pin/PinAlarm.h @@ -46,4 +46,4 @@ void alarm_pin_pinalarm_reset(void); void alarm_pin_pinalarm_light_reset(void); void alarm_pin_pinalarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms); bool alarm_pin_pinalarm_woke_this_cycle(void); -bool alarm_pin_pinalarm_is_set(void); +void alarm_pin_pinalarm_entering_deep_sleep(void); From b544a3920a2006330f32f0c04e4fc51113295632 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 11 Nov 2022 14:44:13 -0600 Subject: [PATCH 37/75] update ulab to 6.0.1 --- extmod/ulab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extmod/ulab b/extmod/ulab index 57de23c1fb..25a825e41c 160000 --- a/extmod/ulab +++ b/extmod/ulab @@ -1 +1 @@ -Subproject commit 57de23c1fb434ba99aaafe1d00bd77d5cdf5d66b +Subproject commit 25a825e41c26cfcee018b762416741d0d63aeabf From 3c4d8c692690e33ec8a29c68ee143a780b418b2a Mon Sep 17 00:00:00 2001 From: foamyguy Date: Fri, 11 Nov 2022 17:50:07 -0600 Subject: [PATCH 38/75] implement self hidden property for vectorio shapes --- shared-bindings/vectorio/Circle.c | 4 ++++ shared-bindings/vectorio/Polygon.c | 4 ++++ shared-bindings/vectorio/Rectangle.c | 4 ++++ shared-bindings/vectorio/VectorShape.c | 27 ++++++++++++++++++++++++++ shared-bindings/vectorio/VectorShape.h | 4 ++++ shared-module/vectorio/VectorShape.c | 15 ++++++++++++++ shared-module/vectorio/VectorShape.h | 1 + 7 files changed, 59 insertions(+) diff --git a/shared-bindings/vectorio/Circle.c b/shared-bindings/vectorio/Circle.c index 91b0d3ae34..65428966ce 100644 --- a/shared-bindings/vectorio/Circle.c +++ b/shared-bindings/vectorio/Circle.c @@ -109,6 +109,9 @@ MP_PROPERTY_GETSET(vectorio_circle_color_index_obj, //| y: int //| """Y position of the center point of the circle in the parent.""" //| +//| hidden: boolean +//| """Hide the circle or not.""" +//| //| location: Tuple[int, int] //| """(X,Y) position of the center point of the circle in the parent.""" //| @@ -123,6 +126,7 @@ STATIC const mp_rom_map_elem_t vectorio_circle_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_radius), MP_ROM_PTR(&vectorio_circle_radius_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, { MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) }, + { MP_ROM_QSTR(MP_QSTR_hidden), MP_ROM_PTR(&vectorio_vector_shape_hidden_obj) }, { MP_ROM_QSTR(MP_QSTR_color_index), MP_ROM_PTR(&vectorio_circle_color_index_obj) }, { MP_ROM_QSTR(MP_QSTR_location), MP_ROM_PTR(&vectorio_vector_shape_location_obj) }, { MP_ROM_QSTR(MP_QSTR_pixel_shader), MP_ROM_PTR(&vectorio_vector_shape_pixel_shader_obj) }, diff --git a/shared-bindings/vectorio/Polygon.c b/shared-bindings/vectorio/Polygon.c index f4f07c66a0..c3a6b3f31b 100644 --- a/shared-bindings/vectorio/Polygon.c +++ b/shared-bindings/vectorio/Polygon.c @@ -118,6 +118,9 @@ MP_PROPERTY_GETSET(vectorio_polygon_color_index_obj, //| y: int //| """Y position of the 0,0 origin in the points list.""" //| +//| hidden: boolean +//| """Hide the polygon or not.""" +//| //| location: Tuple[int, int] //| """(X,Y) position of the 0,0 origin in the points list.""" //| @@ -132,6 +135,7 @@ STATIC const mp_rom_map_elem_t vectorio_polygon_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_points), MP_ROM_PTR(&vectorio_polygon_points_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, { MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) }, + { MP_ROM_QSTR(MP_QSTR_hidden), MP_ROM_PTR(&vectorio_vector_shape_hidden_obj) }, { MP_ROM_QSTR(MP_QSTR_color_index), MP_ROM_PTR(&vectorio_polygon_color_index_obj) }, { MP_ROM_QSTR(MP_QSTR_location), MP_ROM_PTR(&vectorio_vector_shape_location_obj) }, { MP_ROM_QSTR(MP_QSTR_pixel_shader), MP_ROM_PTR(&vectorio_vector_shape_pixel_shader_obj) }, diff --git a/shared-bindings/vectorio/Rectangle.c b/shared-bindings/vectorio/Rectangle.c index 5c163a7693..8f6c9ffd28 100644 --- a/shared-bindings/vectorio/Rectangle.c +++ b/shared-bindings/vectorio/Rectangle.c @@ -139,6 +139,9 @@ const mp_obj_property_t vectorio_rectangle_color_index_obj = { //| y: int //| """Y position of the top left corner of the rectangle in the parent.""" //| +//| hidden: boolean +//| """Hide the rectangle or not.""" +//| //| location: Tuple[int, int] //| """(X,Y) position of the top left corner of the rectangle in the parent.""" //| @@ -152,6 +155,7 @@ STATIC const mp_rom_map_elem_t vectorio_rectangle_locals_dict_table[] = { // Properties { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, { MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) }, + { MP_ROM_QSTR(MP_QSTR_hidden), MP_ROM_PTR(&vectorio_vector_shape_hidden_obj) }, { MP_ROM_QSTR(MP_QSTR_color_index), MP_ROM_PTR(&vectorio_rectangle_color_index_obj) }, { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&vectorio_rectangle_width_obj) }, { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&vectorio_rectangle_height_obj) }, diff --git a/shared-bindings/vectorio/VectorShape.c b/shared-bindings/vectorio/VectorShape.c index ba55cfb851..e5c806b943 100644 --- a/shared-bindings/vectorio/VectorShape.c +++ b/shared-bindings/vectorio/VectorShape.c @@ -181,6 +181,33 @@ MP_PROPERTY_GETSET(vectorio_vector_shape_location_obj, (mp_obj_t)&vectorio_vector_shape_set_location_obj); +// Stub checker does not approve of these shared properties. +// hidden: bool +// """Hide the shape or not.""" +// +STATIC mp_obj_t vectorio_vector_shape_obj_get_hidden(mp_obj_t wrapper_shape) { + // Relies on the fact that only vector_shape impl gets matched with a VectorShape. + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, wrapper_shape); + vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); + return mp_obj_new_bool(common_hal_vectorio_vector_shape_get_hidden(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(vectorio_vector_shape_get_hidden_obj, vectorio_vector_shape_obj_get_hidden); + +STATIC mp_obj_t vectorio_vector_shape_obj_set_hidden(mp_obj_t wrapper_shape, mp_obj_t hidden_obj) { + // Relies on the fact that only vector_shape impl gets matched with a VectorShape. + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, wrapper_shape); + vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); + + common_hal_vectorio_vector_shape_set_hidden(self, mp_obj_is_true(hidden_obj)); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_2(vectorio_vector_shape_set_hidden_obj, vectorio_vector_shape_obj_set_hidden); + +MP_PROPERTY_GETSET(vectorio_vector_shape_hidden_obj, + (mp_obj_t)&vectorio_vector_shape_get_hidden_obj, + (mp_obj_t)&vectorio_vector_shape_set_hidden_obj); + + // pixel_shader: Union[ColorConverter, Palette] // """The pixel shader of the shape.""" // diff --git a/shared-bindings/vectorio/VectorShape.h b/shared-bindings/vectorio/VectorShape.h index 13f62922f3..c94476c25a 100644 --- a/shared-bindings/vectorio/VectorShape.h +++ b/shared-bindings/vectorio/VectorShape.h @@ -31,6 +31,9 @@ void common_hal_vectorio_vector_shape_set_location(vectorio_vector_shape_t *self mp_int_t common_hal_vectorio_vector_shape_get_y(vectorio_vector_shape_t *self); void common_hal_vectorio_vector_shape_set_y(vectorio_vector_shape_t *self, mp_int_t y); +mp_int_t common_hal_vectorio_vector_shape_get_hidden(vectorio_vector_shape_t *self); +void common_hal_vectorio_vector_shape_set_hidden(vectorio_vector_shape_t *self, bool hidden); + mp_obj_t common_hal_vectorio_vector_shape_get_pixel_shader(vectorio_vector_shape_t *self); void common_hal_vectorio_vector_shape_set_pixel_shader(vectorio_vector_shape_t *self, mp_obj_t pixel_shader); @@ -40,6 +43,7 @@ void vectorio_vector_shape_update_transform(vectorio_vector_shape_t *self, displ extern vectorio_draw_protocol_impl_t vectorio_vector_shape_draw_protocol_impl; extern const mp_obj_property_getset_t vectorio_vector_shape_x_obj; extern const mp_obj_property_getset_t vectorio_vector_shape_y_obj; +extern const mp_obj_property_getset_t vectorio_vector_shape_hidden_obj; extern const mp_obj_property_getset_t vectorio_vector_shape_location_obj; extern const mp_obj_property_getset_t vectorio_vector_shape_pixel_shader_obj; extern const mp_obj_fun_builtin_fixed_t vectorio_vector_shape_contains_obj; diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index d9c13f54cc..20e1405d9a 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -293,6 +293,16 @@ void common_hal_vectorio_vector_shape_set_location(vectorio_vector_shape_t *self } } +mp_int_t common_hal_vectorio_vector_shape_get_hidden(vectorio_vector_shape_t *self) { + VECTORIO_SHAPE_DEBUG("%p get_hidden\n", self); + return self->hidden; +} + +void common_hal_vectorio_vector_shape_set_hidden(vectorio_vector_shape_t *self, bool hidden) { + VECTORIO_SHAPE_DEBUG("%p set_hidden %d\n", self, x); + self->hidden = hidden; + common_hal_vectorio_vector_shape_set_dirty(self); +} mp_obj_t common_hal_vectorio_vector_shape_get_pixel_shader(vectorio_vector_shape_t *self) { VECTORIO_SHAPE_DEBUG("%p get_pixel_shader\n", self); @@ -315,6 +325,11 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ uint64_t start = common_hal_time_monotonic_ns(); uint64_t pixel_time = 0; #endif + + if (self->hidden) { + return false; + } + VECTORIO_SHAPE_DEBUG("%p fill_area: fill: {(%5d,%5d), (%5d,%5d)}", self, area->x1, area->y1, area->x2, area->y2 diff --git a/shared-module/vectorio/VectorShape.h b/shared-module/vectorio/VectorShape.h index fdbae964a8..ce5823e40c 100644 --- a/shared-module/vectorio/VectorShape.h +++ b/shared-module/vectorio/VectorShape.h @@ -30,6 +30,7 @@ typedef struct { mp_obj_t pixel_shader; int16_t x; int16_t y; + bool hidden : 1; displayio_buffer_transform_t *absolute_transform; // Tracks current shape footprint and expands outward as the shape dirties and changes. // This is suboptimal if you move your shape far. Could add more state to only redraw From 56be5477542b31313d01731cd9730932b4eec66d Mon Sep 17 00:00:00 2001 From: foamyguy Date: Fri, 11 Nov 2022 20:18:42 -0600 Subject: [PATCH 39/75] fix type name --- shared-bindings/vectorio/Circle.c | 2 +- shared-bindings/vectorio/Polygon.c | 2 +- shared-bindings/vectorio/Rectangle.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/shared-bindings/vectorio/Circle.c b/shared-bindings/vectorio/Circle.c index 65428966ce..87cd46ad9a 100644 --- a/shared-bindings/vectorio/Circle.c +++ b/shared-bindings/vectorio/Circle.c @@ -109,7 +109,7 @@ MP_PROPERTY_GETSET(vectorio_circle_color_index_obj, //| y: int //| """Y position of the center point of the circle in the parent.""" //| -//| hidden: boolean +//| hidden: bool //| """Hide the circle or not.""" //| //| location: Tuple[int, int] diff --git a/shared-bindings/vectorio/Polygon.c b/shared-bindings/vectorio/Polygon.c index c3a6b3f31b..6ad102e6e6 100644 --- a/shared-bindings/vectorio/Polygon.c +++ b/shared-bindings/vectorio/Polygon.c @@ -118,7 +118,7 @@ MP_PROPERTY_GETSET(vectorio_polygon_color_index_obj, //| y: int //| """Y position of the 0,0 origin in the points list.""" //| -//| hidden: boolean +//| hidden: bool //| """Hide the polygon or not.""" //| //| location: Tuple[int, int] diff --git a/shared-bindings/vectorio/Rectangle.c b/shared-bindings/vectorio/Rectangle.c index 8f6c9ffd28..a4f3e12e69 100644 --- a/shared-bindings/vectorio/Rectangle.c +++ b/shared-bindings/vectorio/Rectangle.c @@ -139,7 +139,7 @@ const mp_obj_property_t vectorio_rectangle_color_index_obj = { //| y: int //| """Y position of the top left corner of the rectangle in the parent.""" //| -//| hidden: boolean +//| hidden: bool //| """Hide the rectangle or not.""" //| //| location: Tuple[int, int] From 6c3b9b64dacf16f128d069bb90e2ce3169ca569c Mon Sep 17 00:00:00 2001 From: root Date: Sat, 12 Nov 2022 03:22:15 +0000 Subject: [PATCH 40/75] add crcibernetica-ideaboard --- .../boards/crcibernetica-ideaboard/board.c | 29 +++++++++++ .../crcibernetica-ideaboard/mpconfigboard.h | 43 +++++++++++++++ .../crcibernetica-ideaboard/mpconfigboard.mk | 9 ++++ .../boards/crcibernetica-ideaboard/pins.c | 52 +++++++++++++++++++ 4 files changed, 133 insertions(+) create mode 100644 ports/espressif/boards/crcibernetica-ideaboard/board.c create mode 100644 ports/espressif/boards/crcibernetica-ideaboard/mpconfigboard.h create mode 100644 ports/espressif/boards/crcibernetica-ideaboard/mpconfigboard.mk create mode 100644 ports/espressif/boards/crcibernetica-ideaboard/pins.c diff --git a/ports/espressif/boards/crcibernetica-ideaboard/board.c b/ports/espressif/boards/crcibernetica-ideaboard/board.c new file mode 100644 index 0000000000..164430c88c --- /dev/null +++ b/ports/espressif/boards/crcibernetica-ideaboard/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/crcibernetica-ideaboard/mpconfigboard.h b/ports/espressif/boards/crcibernetica-ideaboard/mpconfigboard.h new file mode 100644 index 0000000000..2d20fff211 --- /dev/null +++ b/ports/espressif/boards/crcibernetica-ideaboard/mpconfigboard.h @@ -0,0 +1,43 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 Dan Halbert for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "CRCibernetica IdeaBoard" +#define MICROPY_HW_MCU_NAME "ESP32" + +#define CIRCUITPY_BOARD_I2C (1) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO22, .sda = &pin_GPIO21}} + +#define CIRCUITPY_BOARD_SPI (1) +#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO18, .mosi = &pin_GPIO23, .miso = &pin_GPIO19}} + +#define CIRCUITPY_BOARD_UART (1) +#define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO17, .rx = &pin_GPIO16}} + +// UART pins attached to the USB-serial converter chip +#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) +#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) diff --git a/ports/espressif/boards/crcibernetica-ideaboard/mpconfigboard.mk b/ports/espressif/boards/crcibernetica-ideaboard/mpconfigboard.mk new file mode 100644 index 0000000000..cbc468b3ec --- /dev/null +++ b/ports/espressif/boards/crcibernetica-ideaboard/mpconfigboard.mk @@ -0,0 +1,9 @@ +CIRCUITPY_CREATOR_ID = 0x0000303A +CIRCUITPY_CREATION_ID = 0x00320002 + +IDF_TARGET = esp32 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_SIZE = 16MB +CIRCUITPY_ESP32_CAMERA = 0 diff --git a/ports/espressif/boards/crcibernetica-ideaboard/pins.c b/ports/espressif/boards/crcibernetica-ideaboard/pins.c new file mode 100644 index 0000000000..8f90bc90a0 --- /dev/null +++ b/ports/espressif/boards/crcibernetica-ideaboard/pins.c @@ -0,0 +1,52 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_IO23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_IO25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_IO26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_IO27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_IO32), MP_ROM_PTR(&pin_GPIO32) }, + { MP_ROM_QSTR(MP_QSTR_IO33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_IO34), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From 512cda8b73d795e17c863da167233e218b58d9b4 Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Sat, 12 Nov 2022 10:03:00 +0530 Subject: [PATCH 41/75] enable `microcontroller.cpu.temperature` on esp32s3 --- ports/espressif/common-hal/microcontroller/Processor.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/espressif/common-hal/microcontroller/Processor.c b/ports/espressif/common-hal/microcontroller/Processor.c index 9b97b98cbd..bacc48c07b 100644 --- a/ports/espressif/common-hal/microcontroller/Processor.c +++ b/ports/espressif/common-hal/microcontroller/Processor.c @@ -40,13 +40,13 @@ #include "soc/efuse_reg.h" -#if !defined(CONFIG_IDF_TARGET_ESP32) && !defined(CONFIG_IDF_TARGET_ESP32S3) +#if !defined(CONFIG_IDF_TARGET_ESP32) #include "driver/temp_sensor.h" #endif float common_hal_mcu_processor_get_temperature(void) { float tsens_out; - #if defined(CONFIG_IDF_TARGET_ESP32S3) || defined(CONFIG_IDF_TARGET_ESP32) + #if defined(CONFIG_IDF_TARGET_ESP32) mp_raise_NotImplementedError(NULL); #else temp_sensor_config_t temp_sensor = TSENS_CONFIG_DEFAULT(); // DEFAULT: range:-10℃ ~ 80℃, error < 1℃. From 78fc43baab6517a91426480eb2d6e9919f6a998a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 12 Nov 2022 09:16:23 -0600 Subject: [PATCH 42/75] raspberrypi: Make port_idle_until_interrupt work This needs thorough testing before it's merged, as we tried and reverted this once before (#5341 and #5356). I think that besides checking for tinyusb having "something to do", the fact that `port_interrupt_after_ticks` and `port_disable_tick` weren't implemented that was causing a secondary problem. I've tested this on a pico w over reboot-cycles and ctrl-c-cycles, with and without drive automounting, with and without serial repl open, and on a power-only connection. I didn't notice the problem reported in #5356 after merely implementing port_idle_until_interrupt; but I did notice that sleeps in general would take over-long until "something" (like writing to the USB drive) happened; I think "something" was probably calling port_enable_tick(). When this problem was happening, sleeps would take a lot longer; for instance, `sleep(.001)` would take about 1/20s and `sleep(.1)` would take about 1/7s. --- ports/raspberrypi/Makefile | 1 + ports/raspberrypi/supervisor/port.c | 27 ++++++++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/ports/raspberrypi/Makefile b/ports/raspberrypi/Makefile index 5095c4c1f8..49a66c28aa 100644 --- a/ports/raspberrypi/Makefile +++ b/ports/raspberrypi/Makefile @@ -127,6 +127,7 @@ INC += \ -I../shared/timeutils \ -Iboards/$(BOARD) \ -Iboards/ \ + -isystem ./../../lib/cmsis/inc \ -isystem sdk/ \ -isystem sdk/src/common/pico_base/include/ \ -isystem sdk/src/common/pico_binary_info/include/ \ diff --git a/ports/raspberrypi/supervisor/port.c b/ports/raspberrypi/supervisor/port.c index 781d2b11d2..89e451a3b0 100644 --- a/ports/raspberrypi/supervisor/port.c +++ b/ports/raspberrypi/supervisor/port.c @@ -72,6 +72,9 @@ #include "supervisor/serial.h" +#include "tusb.h" +#include + extern volatile bool mp_msc_enabled; STATIC void _tick_callback(uint alarm_num); @@ -241,38 +244,48 @@ uint32_t port_get_saved_word(void) { return __scratch_x_start__; } +static volatile bool ticks_enabled; + uint64_t port_get_raw_ticks(uint8_t *subticks) { uint64_t microseconds = time_us_64(); return 1024 * (microseconds / 1000000) + (microseconds % 1000000) / 977; } STATIC void _tick_callback(uint alarm_num) { - supervisor_tick(); - hardware_alarm_set_target(0, delayed_by_us(get_absolute_time(), 977)); + if (ticks_enabled) { + supervisor_tick(); + hardware_alarm_set_target(0, delayed_by_us(get_absolute_time(), 977)); + } } // Enable 1/1024 second tick. void port_enable_tick(void) { + ticks_enabled = true; hardware_alarm_set_target(0, delayed_by_us(get_absolute_time(), 977)); } // Disable 1/1024 second tick. void port_disable_tick(void) { - // hardware_alarm_cancel(0); + // One additional _tick_callback may occur, but it will just return + // whenever !ticks_enabled. Cancel is not called just in case + // it could nuke a timeout set by port_interrupt_after_ticks. + ticks_enabled = false; } // This is called by sleep, we ignore it when our ticks are enabled because // they'll wake us up earlier. If we don't, we'll mess up ticks by overwriting // the next RTC wake up time. void port_interrupt_after_ticks(uint32_t ticks) { + if (!ticks_enabled) { + hardware_alarm_set_target(0, delayed_by_us(get_absolute_time(), ticks * 977)); + } } void port_idle_until_interrupt(void) { common_hal_mcu_disable_interrupts(); - if (!background_callback_pending()) { - // TODO: Does not work when board is power-cycled. - // asm volatile ("dsb 0xF" ::: "memory"); - // __wfi(); + if (!background_callback_pending() && !tud_task_event_ready()) { + __DSB(); + __WFI(); } common_hal_mcu_enable_interrupts(); } From e4d620f0556f76d1c55450e0a3fdc4837bae3851 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 12 Nov 2022 09:17:47 -0600 Subject: [PATCH 43/75] make whitespace match --- ports/raspberrypi/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ports/raspberrypi/Makefile b/ports/raspberrypi/Makefile index 49a66c28aa..cb4c80a23d 100644 --- a/ports/raspberrypi/Makefile +++ b/ports/raspberrypi/Makefile @@ -120,8 +120,8 @@ SRC_LWIP := endif INC += \ - -I. \ - -Ilwip_inc \ + -I. \ + -Ilwip_inc \ -I../.. \ -I../lib/mp-readline \ -I../shared/timeutils \ From 43566dec5b94f5bf8551611f2da7dee886e3bab1 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 13 Nov 2022 12:13:32 +0000 Subject: [PATCH 44/75] allow inclusion of board while blocking build files --- ports/espressif/.gitignore | 2 +- .../boards/crcibernetica-ideaboard/sdkconfig | 20 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 ports/espressif/boards/crcibernetica-ideaboard/sdkconfig diff --git a/ports/espressif/.gitignore b/ports/espressif/.gitignore index 51c080bb7f..d5350e07f9 100644 --- a/ports/espressif/.gitignore +++ b/ports/espressif/.gitignore @@ -1,5 +1,5 @@ # idf.py menuconfig -sdkconfig* +./sdkconfig* # lock files for examples and components dependencies.lock diff --git a/ports/espressif/boards/crcibernetica-ideaboard/sdkconfig b/ports/espressif/boards/crcibernetica-ideaboard/sdkconfig new file mode 100644 index 0000000000..6c0168c829 --- /dev/null +++ b/ports/espressif/boards/crcibernetica-ideaboard/sdkconfig @@ -0,0 +1,20 @@ +CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y +CONFIG_ESP32_SPIRAM_SUPPORT=n + +# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins +### # +### # ESP System Settings +### # +### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y +### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set +### CONFIG_ESP_CONSOLE_UART_CUSTOM=y +### CONFIG_ESP_CONSOLE_NONE is not set +### CONFIG_ESP_CONSOLE_UART=y +### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y +### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set +### CONFIG_ESP_CONSOLE_UART_NUM=0 +### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 +### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 +### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set +### # end of ESP System Settings From e1046b1050d21daab224b3044e8665fd5b6d859d Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Mon, 14 Nov 2022 14:04:07 +0000 Subject: [PATCH 45/75] Add support for the 16MB WeAct Studio Pico --- .../boards/weact_studio_pico_16mb/board.c | 29 ++++++++++ .../weact_studio_pico_16mb/mpconfigboard.h | 2 + .../weact_studio_pico_16mb/mpconfigboard.mk | 11 ++++ .../pico-sdk-configboard.h | 1 + .../boards/weact_studio_pico_16mb/pins.c | 53 +++++++++++++++++++ 5 files changed, 96 insertions(+) create mode 100644 ports/raspberrypi/boards/weact_studio_pico_16mb/board.c create mode 100644 ports/raspberrypi/boards/weact_studio_pico_16mb/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/weact_studio_pico_16mb/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/weact_studio_pico_16mb/pico-sdk-configboard.h create mode 100644 ports/raspberrypi/boards/weact_studio_pico_16mb/pins.c diff --git a/ports/raspberrypi/boards/weact_studio_pico_16mb/board.c b/ports/raspberrypi/boards/weact_studio_pico_16mb/board.c new file mode 100644 index 0000000000..76973aee30 --- /dev/null +++ b/ports/raspberrypi/boards/weact_studio_pico_16mb/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 Fabian Affolter + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/raspberrypi/boards/weact_studio_pico_16mb/mpconfigboard.h b/ports/raspberrypi/boards/weact_studio_pico_16mb/mpconfigboard.h new file mode 100644 index 0000000000..2dabc3eb1b --- /dev/null +++ b/ports/raspberrypi/boards/weact_studio_pico_16mb/mpconfigboard.h @@ -0,0 +1,2 @@ +#define MICROPY_HW_BOARD_NAME "WeAct Studio Pico 16MB" +#define MICROPY_HW_MCU_NAME "rp2040" diff --git a/ports/raspberrypi/boards/weact_studio_pico_16mb/mpconfigboard.mk b/ports/raspberrypi/boards/weact_studio_pico_16mb/mpconfigboard.mk new file mode 100644 index 0000000000..55209e1eb4 --- /dev/null +++ b/ports/raspberrypi/boards/weact_studio_pico_16mb/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x239A +USB_PID = 0x102E +USB_PRODUCT = "Pico" +USB_MANUFACTURER = "WeAct Studio" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q128JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/weact_studio_pico_16mb/pico-sdk-configboard.h b/ports/raspberrypi/boards/weact_studio_pico_16mb/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/weact_studio_pico_16mb/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/weact_studio_pico_16mb/pins.c b/ports/raspberrypi/boards/weact_studio_pico_16mb/pins.c new file mode 100644 index 0000000000..8632d9c322 --- /dev/null +++ b/ports/raspberrypi/boards/weact_studio_pico_16mb/pins.c @@ -0,0 +1,53 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_GP4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_GP5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_GP6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_GP7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_GP8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_GP9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_GP10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_GP11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_GP12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_GP13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_GP14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_GP15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_GP16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_GP17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_GP18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_GP19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, + + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_GP25), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_GP27_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO29) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); From cdab078d9dd24498f8abca423b96a40d18e05ae7 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 14 Nov 2022 07:50:18 -0600 Subject: [PATCH 46/75] shared-bindings: Get rid of CYW43 special cases in shared-bindings .. by moving it into a new weak function that can be replaced just by the picow build. --- ports/raspberrypi/common-hal/analogio/AnalogIn.c | 5 +++++ .../raspberrypi/common-hal/digitalio/DigitalInOut.c | 4 ++++ shared-bindings/analogio/AnalogIn.c | 12 ++++-------- shared-bindings/analogio/AnalogIn.h | 1 + shared-bindings/digitalio/DigitalInOut.c | 13 +++++-------- shared-bindings/digitalio/DigitalInOut.h | 1 + 6 files changed, 20 insertions(+), 16 deletions(-) diff --git a/ports/raspberrypi/common-hal/analogio/AnalogIn.c b/ports/raspberrypi/common-hal/analogio/AnalogIn.c index 0056eb17b5..8811cd54e4 100644 --- a/ports/raspberrypi/common-hal/analogio/AnalogIn.c +++ b/ports/raspberrypi/common-hal/analogio/AnalogIn.c @@ -40,7 +40,12 @@ // voltage monitor function and the wifi function. Special handling is required // to read the analog voltage. #if CIRCUITPY_CYW43 +#include "bindings/cyw43/__init__.h" #define SPECIAL_PIN(pin) (pin->number == 29) + +const mcu_pin_obj_t *common_hal_analogio_analogin_validate_pin(mp_obj_t obj) { + return validate_obj_is_free_pin_or_gpio29(obj); +} #else #define SPECIAL_PIN(pin) false #endif diff --git a/ports/raspberrypi/common-hal/digitalio/DigitalInOut.c b/ports/raspberrypi/common-hal/digitalio/DigitalInOut.c index 1490771661..eb498d3f19 100644 --- a/ports/raspberrypi/common-hal/digitalio/DigitalInOut.c +++ b/ports/raspberrypi/common-hal/digitalio/DigitalInOut.c @@ -41,6 +41,10 @@ #include "pico/cyw43_arch.h" #include "bindings/cyw43/__init__.h" #define IS_CYW(self) ((self)->pin->base.type == &cyw43_pin_type) + +const mcu_pin_obj_t *common_hal_digitalio_validate_pin(mp_obj_t obj) { + return validate_obj_is_free_pin_including_cyw43(obj); +} #endif digitalinout_result_t common_hal_digitalio_digitalinout_construct( diff --git a/shared-bindings/analogio/AnalogIn.c b/shared-bindings/analogio/AnalogIn.c index 274bfa4806..800c0bfa21 100644 --- a/shared-bindings/analogio/AnalogIn.c +++ b/shared-bindings/analogio/AnalogIn.c @@ -36,9 +36,9 @@ #include "shared-bindings/analogio/AnalogIn.h" #include "shared-bindings/util.h" -#if CIRCUITPY_CYW43 -#include "bindings/cyw43/__init__.h" -#endif +MP_WEAK const mcu_pin_obj_t *common_hal_analogio_analogin_validate_pin(mp_obj_t obj) { + return validate_obj_is_free_pin(obj); +} //| class AnalogIn: //| """Read analog voltage levels @@ -64,11 +64,7 @@ STATIC mp_obj_t analogio_analogin_make_new(const mp_obj_type_t *type, mp_arg_check_num(n_args, n_kw, 1, 1, false); // 1st argument is the pin - #if CIRCUITPY_CYW43 - const mcu_pin_obj_t *pin = validate_obj_is_free_pin_or_gpio29(args[0]); - #else - const mcu_pin_obj_t *pin = validate_obj_is_free_pin(args[0]); - #endif + const mcu_pin_obj_t *pin = common_hal_analogio_analogin_validate_pin(args[0]); analogio_analogin_obj_t *self = m_new_obj(analogio_analogin_obj_t); self->base.type = &analogio_analogin_type; common_hal_analogio_analogin_construct(self, pin); diff --git a/shared-bindings/analogio/AnalogIn.h b/shared-bindings/analogio/AnalogIn.h index 9f80416267..7d667ed3f4 100644 --- a/shared-bindings/analogio/AnalogIn.h +++ b/shared-bindings/analogio/AnalogIn.h @@ -32,6 +32,7 @@ extern const mp_obj_type_t analogio_analogin_type; +const mcu_pin_obj_t *common_hal_analogio_analogin_validate_pin(mp_obj_t obj); void common_hal_analogio_analogin_construct(analogio_analogin_obj_t *self, const mcu_pin_obj_t *pin); void common_hal_analogio_analogin_deinit(analogio_analogin_obj_t *self); bool common_hal_analogio_analogin_deinited(analogio_analogin_obj_t *self); diff --git a/shared-bindings/digitalio/DigitalInOut.c b/shared-bindings/digitalio/DigitalInOut.c index e42036bb1a..eb3c1ec69d 100644 --- a/shared-bindings/digitalio/DigitalInOut.c +++ b/shared-bindings/digitalio/DigitalInOut.c @@ -66,6 +66,10 @@ STATIC void check_result(digitalinout_result_t result) { } } +MP_WEAK const mcu_pin_obj_t *common_hal_digitalio_validate_pin(mp_obj_t obj) { + return validate_obj_is_free_pin(obj); +} + //| class DigitalInOut: //| """Digital input and output //| @@ -87,14 +91,7 @@ STATIC mp_obj_t digitalio_digitalinout_make_new(const mp_obj_type_t *type, digitalio_digitalinout_obj_t *self = m_new_obj(digitalio_digitalinout_obj_t); self->base.type = &digitalio_digitalinout_type; - #if CIRCUITPY_CYW43 - // The GPIO pin attached to the CYW43 co-processor can only be used for - // DigitalInOut, not for other purposes like PWM. That's why this check - // is here, and it's not rolled into validate_obj_is_free_pin. - const mcu_pin_obj_t *pin = validate_obj_is_free_pin_including_cyw43(args[0]); - #else - const mcu_pin_obj_t *pin = validate_obj_is_free_pin(args[0]); - #endif + const mcu_pin_obj_t *pin = common_hal_digitalio_validate_pin(args[0]); common_hal_digitalio_digitalinout_construct(self, pin); return MP_OBJ_FROM_PTR(self); diff --git a/shared-bindings/digitalio/DigitalInOut.h b/shared-bindings/digitalio/DigitalInOut.h index 9a751e93bb..80c3970f0e 100644 --- a/shared-bindings/digitalio/DigitalInOut.h +++ b/shared-bindings/digitalio/DigitalInOut.h @@ -55,6 +55,7 @@ typedef enum { DIGITALINOUT_REG_TOGGLE, } digitalinout_reg_op_t; +const mcu_pin_obj_t *common_hal_digitalio_validate_pin(mp_obj_t obj); digitalinout_result_t common_hal_digitalio_digitalinout_construct(digitalio_digitalinout_obj_t *self, const mcu_pin_obj_t *pin); void common_hal_digitalio_digitalinout_deinit(digitalio_digitalinout_obj_t *self); bool common_hal_digitalio_digitalinout_deinited(digitalio_digitalinout_obj_t *self); From adca341d3bff2ba123685b992267ad43c04c42e9 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 14 Nov 2022 09:14:39 -0600 Subject: [PATCH 47/75] Save code space by packing rgbw values into C union It's more efficient passing one register-sized structure than 4 arguments or 4 pointers; working on intermediate values of 'int' size is also more efficient in code size! On raspberry pi pico w, this increased free flash space by +104 bytes. It also increased the speed of my testing animation very slightly, from 187fps to 189fps when run 'unthrottled' --- shared-bindings/adafruit_pixelbuf/PixelBuf.h | 7 +++ shared-module/adafruit_pixelbuf/PixelBuf.c | 58 ++++++++++---------- 2 files changed, 35 insertions(+), 30 deletions(-) diff --git a/shared-bindings/adafruit_pixelbuf/PixelBuf.h b/shared-bindings/adafruit_pixelbuf/PixelBuf.h index 7ae3d6acf8..e73d3e02d6 100644 --- a/shared-bindings/adafruit_pixelbuf/PixelBuf.h +++ b/shared-bindings/adafruit_pixelbuf/PixelBuf.h @@ -31,6 +31,13 @@ extern const mp_obj_type_t pixelbuf_pixelbuf_type; +typedef union { + struct { + uint8_t r, g, b, w; + }; + uint32_t rgbw; +} color_u; + void common_hal_adafruit_pixelbuf_pixelbuf_construct(pixelbuf_pixelbuf_obj_t *self, size_t n, pixelbuf_byteorder_details_t *byteorder, mp_float_t brightness, bool auto_write, uint8_t *header, size_t header_len, uint8_t *trailer, size_t trailer_len); diff --git a/shared-module/adafruit_pixelbuf/PixelBuf.c b/shared-module/adafruit_pixelbuf/PixelBuf.c index cab97feace..e0c63306f9 100644 --- a/shared-module/adafruit_pixelbuf/PixelBuf.c +++ b/shared-module/adafruit_pixelbuf/PixelBuf.c @@ -152,50 +152,56 @@ STATIC uint8_t _pixelbuf_get_as_uint8(mp_obj_t obj) { translate("can't convert %q to %q"), mp_obj_get_type_qstr(obj), MP_QSTR_int); } -STATIC void _pixelbuf_parse_color(pixelbuf_pixelbuf_obj_t *self, mp_obj_t color, uint8_t *r, uint8_t *g, uint8_t *b, uint8_t *w) { +STATIC color_u _pixelbuf_parse_color(pixelbuf_pixelbuf_obj_t *self, mp_obj_t color) { + color_u result; pixelbuf_byteorder_details_t *byteorder = &self->byteorder; // w is shared between white in NeoPixels and brightness in dotstars (so that DotStars can have // per-pixel brightness). Set the defaults here in case it isn't set below. if (byteorder->is_dotstar) { - *w = 255; + result.w = 255; } else { - *w = 0; + result.w = 0; } if (mp_obj_is_int(color) || mp_obj_is_float(color)) { mp_int_t value = mp_obj_is_int(color) ? mp_obj_get_int_truncated(color) : (mp_int_t)mp_obj_get_float(color); - *r = value >> 16 & 0xff; - *g = (value >> 8) & 0xff; - *b = value & 0xff; + result.r = value >> 16 & 0xff; + result.g = (value >> 8) & 0xff; + result.b = value & 0xff; } else { mp_obj_t *items; size_t len; mp_obj_get_array(color, &len, &items); mp_arg_validate_length_range(len, 3, 4, MP_QSTR_color); - *r = _pixelbuf_get_as_uint8(items[PIXEL_R]); - *g = _pixelbuf_get_as_uint8(items[PIXEL_G]); - *b = _pixelbuf_get_as_uint8(items[PIXEL_B]); + result.r = _pixelbuf_get_as_uint8(items[PIXEL_R]); + result.g = _pixelbuf_get_as_uint8(items[PIXEL_G]); + result.b = _pixelbuf_get_as_uint8(items[PIXEL_B]); if (len > 3) { if (mp_obj_is_float(items[PIXEL_W])) { - *w = 255 * mp_obj_get_float(items[PIXEL_W]); + result.w = 255 * mp_obj_get_float(items[PIXEL_W]); } else { - *w = mp_obj_get_int_truncated(items[PIXEL_W]); + result.w = mp_obj_get_int_truncated(items[PIXEL_W]); } - return; + return result; } } // Int colors can't set white directly so convert to white when all components are equal. // Also handles RGBW values assigned an RGB tuple. - if (!byteorder->is_dotstar && byteorder->bpp == 4 && byteorder->has_white && *r == *g && *r == *b) { - *w = *r; - *r = 0; - *g = 0; - *b = 0; + if (!byteorder->is_dotstar && byteorder->bpp == 4 && byteorder->has_white && result.r == result.g && result.r == result.b) { + result.w = result.r; + result.r = 0; + result.g = 0; + result.b = 0; } + return result; } -STATIC void _pixelbuf_set_pixel_color(pixelbuf_pixelbuf_obj_t *self, size_t index, uint8_t r, uint8_t g, uint8_t b, uint8_t w) { +STATIC void _pixelbuf_set_pixel_color(pixelbuf_pixelbuf_obj_t *self, size_t index, color_u rgbw) { + int r = rgbw.r; + int g = rgbw.g; + int b = rgbw.b; + int w = rgbw.w; // DotStars don't have white, instead they have 5 bit brightness so pack it into w. Shift right // by three to leave the top five bits. if (self->bytes_per_pixel == 4 && self->byteorder.is_dotstar) { @@ -234,12 +240,8 @@ STATIC void _pixelbuf_set_pixel_color(pixelbuf_pixelbuf_obj_t *self, size_t inde } STATIC void _pixelbuf_set_pixel(pixelbuf_pixelbuf_obj_t *self, size_t index, mp_obj_t value) { - uint8_t r; - uint8_t g; - uint8_t b; - uint8_t w; - _pixelbuf_parse_color(self, value, &r, &g, &b, &w); - _pixelbuf_set_pixel_color(self, index, r, g, b, w); + color_u rgbw = _pixelbuf_parse_color(self, value); + _pixelbuf_set_pixel_color(self, index, rgbw); } void common_hal_adafruit_pixelbuf_pixelbuf_set_pixels(mp_obj_t self_in, size_t start, mp_int_t step, size_t slice_len, mp_obj_t *values, @@ -318,14 +320,10 @@ void common_hal_adafruit_pixelbuf_pixelbuf_show(mp_obj_t self_in) { void common_hal_adafruit_pixelbuf_pixelbuf_fill(mp_obj_t self_in, mp_obj_t fill_color) { pixelbuf_pixelbuf_obj_t *self = native_pixelbuf(self_in); - uint8_t r; - uint8_t g; - uint8_t b; - uint8_t w; - _pixelbuf_parse_color(self, fill_color, &r, &g, &b, &w); + color_u rgbw = _pixelbuf_parse_color(self, fill_color); for (size_t i = 0; i < self->pixel_count; i++) { - _pixelbuf_set_pixel_color(self, i, r, g, b, w); + _pixelbuf_set_pixel_color(self, i, rgbw); } if (self->auto_write) { common_hal_adafruit_pixelbuf_pixelbuf_show(self_in); From e53bbb1bd22a6c3842e7db2df1d05f144a23aa0b Mon Sep 17 00:00:00 2001 From: River Wang Date: Mon, 14 Nov 2022 15:46:58 +0000 Subject: [PATCH 48/75] Translated using Weblate (Chinese (Pinyin)) Currently translated at 97.3% (969 of 995 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 8dee6b5f2e..bee1c4d4b4 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,15 +7,15 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2022-08-20 14:09+0000\n" -"Last-Translator: hexthat \n" +"PO-Revision-Date: 2022-11-14 15:47+0000\n" +"Last-Translator: River Wang \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.14-dev\n" +"X-Generator: Weblate 4.15-dev\n" #: main.c msgid "" @@ -740,6 +740,7 @@ msgid "Cannot get temperature" msgstr "Wúfǎ huòqǔ wēndù" #: shared-bindings/_bleio/Adapter.c +#, fuzzy msgid "Cannot have scan responses for extended, connectable advertisements." msgstr "Nín wúfǎ sǎomiáo kuòzhǎn de, kě liánjiē de guǎnggào." From 2e6dd1bf1f1b41d0798a708e93559610e75aca6b Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Mon, 14 Nov 2022 18:36:42 +0200 Subject: [PATCH 49/75] Radio.c no longer needs ping.h --- ports/raspberrypi/common-hal/wifi/Radio.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/ports/raspberrypi/common-hal/wifi/Radio.c b/ports/raspberrypi/common-hal/wifi/Radio.c index 8073f57063..a59303a216 100644 --- a/ports/raspberrypi/common-hal/wifi/Radio.c +++ b/ports/raspberrypi/common-hal/wifi/Radio.c @@ -50,7 +50,6 @@ #include "lwip/dns.h" #include "lwip/icmp.h" #include "lwip/raw.h" -#include "lwip_src/ping.h" #ifndef PING_ID #define PING_ID 0xAFAF @@ -60,11 +59,6 @@ #define PING_DEBUG LWIP_DBG_ON #endif -#ifdef LWIP_DEBUG -static uint32_t ping_time; -#endif - - #define MAC_ADDRESS_LENGTH 6 #define NETIF_STA (&cyw43_state.netif[CYW43_ITF_STA]) @@ -305,6 +299,10 @@ void common_hal_wifi_radio_set_ipv4_address(wifi_radio_obj_t *self, mp_obj_t ipv } volatile bool ping_received; +u16_t ping_seq_num; + +void ping_set_target(const ip_addr_t *ping_addr); +int ping_send(struct raw_pcb *raw, const ip_addr_t *addr); static u8_t ping_recv(void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr) { @@ -313,6 +311,7 @@ ping_recv(void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr) if ((p->tot_len >= (PBUF_IP_HLEN + sizeof(struct icmp_echo_hdr))) && pbuf_remove_header(p, PBUF_IP_HLEN) == 0) { + uint32_t ping_time = sys_now(); iecho = (struct icmp_echo_hdr *)p->payload; if ((iecho->id == PING_ID) && (iecho->seqno == lwip_htons(ping_seq_num))) { From 14b20087b562d1551d1275d5c3297627f93c5a80 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 14 Nov 2022 11:29:18 -0600 Subject: [PATCH 50/75] only ignore sdkconfig* files in the espressif port's top directory danh and microdev1 noticed that this ignore pattern was over-broad and caused added sdkconfig files in boards/ (which should be committed) to be ignored and not proposed for addition by common tools like git status, git gui, etc. This pattern anchors the search so that it only matches in the ports/espressif directory, so ports/espressif/sdkconfig is ignored but ports/espressif/boards/example/sdkconfig is not ignored anymore --- ports/espressif/.gitignore | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/.gitignore b/ports/espressif/.gitignore index d5350e07f9..63e4a35878 100644 --- a/ports/espressif/.gitignore +++ b/ports/espressif/.gitignore @@ -1,5 +1,5 @@ # idf.py menuconfig -./sdkconfig* +/sdkconfig* # lock files for examples and components dependencies.lock From 6ad61a3fd1f40e9ed8832eb083c660a1aea6029d Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Mon, 14 Nov 2022 19:31:18 +0200 Subject: [PATCH 51/75] Radio.c work --- ports/raspberrypi/common-hal/wifi/Radio.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/raspberrypi/common-hal/wifi/Radio.c b/ports/raspberrypi/common-hal/wifi/Radio.c index a59303a216..4f32fad793 100644 --- a/ports/raspberrypi/common-hal/wifi/Radio.c +++ b/ports/raspberrypi/common-hal/wifi/Radio.c @@ -299,10 +299,9 @@ void common_hal_wifi_radio_set_ipv4_address(wifi_radio_obj_t *self, mp_obj_t ipv } volatile bool ping_received; -u16_t ping_seq_num; - -void ping_set_target(const ip_addr_t *ping_addr); int ping_send(struct raw_pcb *raw, const ip_addr_t *addr); +uint16_t ping_seq_num; +uint32_t ping_time; static u8_t ping_recv(void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr) { @@ -311,7 +310,7 @@ ping_recv(void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr) if ((p->tot_len >= (PBUF_IP_HLEN + sizeof(struct icmp_echo_hdr))) && pbuf_remove_header(p, PBUF_IP_HLEN) == 0) { - uint32_t ping_time = sys_now(); + iecho = (struct icmp_echo_hdr *)p->payload; if ((iecho->id == PING_ID) && (iecho->seqno == lwip_htons(ping_seq_num))) { @@ -331,6 +330,7 @@ ping_recv(void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr) } mp_int_t common_hal_wifi_radio_ping(wifi_radio_obj_t *self, mp_obj_t ip_address, mp_float_t timeout) { + ping_time = sys_now(); ip_addr_t ping_addr; ipaddress_ipaddress_to_lwip(ip_address, &ping_addr); From 398e9122a0a4b8ba7ba148f31c09921d01c4ab69 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Mon, 14 Nov 2022 19:33:06 +0200 Subject: [PATCH 52/75] remove lwip_src --- ports/raspberrypi/lwip_src/ping.c | 384 ------------------------------ ports/raspberrypi/lwip_src/ping.h | 25 -- 2 files changed, 409 deletions(-) delete mode 100644 ports/raspberrypi/lwip_src/ping.c delete mode 100644 ports/raspberrypi/lwip_src/ping.h diff --git a/ports/raspberrypi/lwip_src/ping.c b/ports/raspberrypi/lwip_src/ping.c deleted file mode 100644 index e59b4d6662..0000000000 --- a/ports/raspberrypi/lwip_src/ping.c +++ /dev/null @@ -1,384 +0,0 @@ -/** - * @file - * Ping sender module - * - */ - -/* - * Redistribution and use in source and binary forms, with or without modification, - * are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. 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. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT - * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, - * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 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. - * - * This file is part of the lwIP TCP/IP stack. - * - */ - -/** - * This is an example of a "ping" sender (with raw API and socket API). - * It can be used as a start point to maintain opened a network connection, or - * like a network "watchdog" for your device. - * - */ - -#include "lwip/opt.h" - -#if LWIP_RAW /* don't build if not configured for use in lwipopts.h */ - -#include "ping.h" - -#include "lwip/mem.h" -#include "lwip/raw.h" -#include "lwip/icmp.h" -#include "lwip/netif.h" -#include "lwip/sys.h" -#include "lwip/timeouts.h" -#include "lwip/inet_chksum.h" -#include "lwip/prot/ip4.h" - -#if PING_USE_SOCKETS -#include "lwip/sockets.h" -#include "lwip/inet.h" -#include -#endif /* PING_USE_SOCKETS */ - - -/** - * PING_DEBUG: Enable debugging for PING. - */ -#ifndef PING_DEBUG -#define PING_DEBUG LWIP_DBG_ON -#endif - -/** ping receive timeout - in milliseconds */ -#ifndef PING_RCV_TIMEO -#define PING_RCV_TIMEO 1000 -#endif - -/** ping delay - in milliseconds */ -#ifndef PING_DELAY -#define PING_DELAY 1000 -#endif - -/** ping identifier - must fit on a u16_t */ -#ifndef PING_ID -#define PING_ID 0xAFAF -#endif - -/** ping additional data size to include in the packet */ -#ifndef PING_DATA_SIZE -#define PING_DATA_SIZE 32 -#endif - -/** ping result action - no default action */ -#ifndef PING_RESULT -#define PING_RESULT(ping_ok) -#endif - -/* ping variables */ -static const ip_addr_t *ping_target; -u16_t ping_seq_num; -#ifdef LWIP_DEBUG -static u32_t ping_time; -#endif /* LWIP_DEBUG */ -#if !PING_USE_SOCKETS -static struct raw_pcb *ping_pcb; -#endif /* PING_USE_SOCKETS */ - -/** Prepare a echo ICMP request */ -void -ping_prepare_echo(struct icmp_echo_hdr *iecho, u16_t len) { - size_t i; - size_t data_len = len - sizeof(struct icmp_echo_hdr); - - ICMPH_TYPE_SET(iecho, ICMP_ECHO); - ICMPH_CODE_SET(iecho, 0); - iecho->chksum = 0; - iecho->id = PING_ID; - iecho->seqno = lwip_htons(++ping_seq_num); - - /* fill the additional data buffer with some data */ - for (i = 0; i < data_len; i++) { - ((char *)iecho)[sizeof(struct icmp_echo_hdr) + i] = (char)i; - } - - iecho->chksum = inet_chksum(iecho, len); -} - -#if PING_USE_SOCKETS - -/* Ping using the socket ip */ -err_t -ping_send(int s, const ip_addr_t *addr) { - int err; - struct icmp_echo_hdr *iecho; - struct sockaddr_storage to; - size_t ping_size = sizeof(struct icmp_echo_hdr) + PING_DATA_SIZE; - LWIP_ASSERT("ping_size is too big", ping_size <= 0xffff); - - #if LWIP_IPV6 - if (IP_IS_V6(addr) && !ip6_addr_isipv4mappedipv6(ip_2_ip6(addr))) { - /* todo: support ICMP6 echo */ - return ERR_VAL; - } - #endif /* LWIP_IPV6 */ - - iecho = (struct icmp_echo_hdr *)mem_malloc((mem_size_t)ping_size); - if (!iecho) { - return ERR_MEM; - } - - ping_prepare_echo(iecho, (u16_t)ping_size); - - #if LWIP_IPV4 - if (IP_IS_V4(addr)) { - struct sockaddr_in *to4 = (struct sockaddr_in *)&to; - to4->sin_len = sizeof(*to4); - to4->sin_family = AF_INET; - inet_addr_from_ip4addr(&to4->sin_addr, ip_2_ip4(addr)); - } - #endif /* LWIP_IPV4 */ - - #if LWIP_IPV6 - if (IP_IS_V6(addr)) { - struct sockaddr_in6 *to6 = (struct sockaddr_in6 *)&to; - to6->sin6_len = sizeof(*to6); - to6->sin6_family = AF_INET6; - inet6_addr_from_ip6addr(&to6->sin6_addr, ip_2_ip6(addr)); - } - #endif /* LWIP_IPV6 */ - - err = lwip_sendto(s, iecho, ping_size, 0, (struct sockaddr *)&to, sizeof(to)); - - mem_free(iecho); - - return err ? ERR_OK : ERR_VAL; -} - -static void -ping_recv(int s) { - char buf[64]; - int len; - struct sockaddr_storage from; - int fromlen = sizeof(from); - - while ((len = lwip_recvfrom(s, buf, sizeof(buf), 0, (struct sockaddr *)&from, (socklen_t *)&fromlen)) > 0) { - if (len >= (int)(sizeof(struct ip_hdr) + sizeof(struct icmp_echo_hdr))) { - ip_addr_t fromaddr; - memset(&fromaddr, 0, sizeof(fromaddr)); - - #if LWIP_IPV4 - if (from.ss_family == AF_INET) { - struct sockaddr_in *from4 = (struct sockaddr_in *)&from; - inet_addr_to_ip4addr(ip_2_ip4(&fromaddr), &from4->sin_addr); - IP_SET_TYPE_VAL(fromaddr, IPADDR_TYPE_V4); - } - #endif /* LWIP_IPV4 */ - - #if LWIP_IPV6 - if (from.ss_family == AF_INET6) { - struct sockaddr_in6 *from6 = (struct sockaddr_in6 *)&from; - inet6_addr_to_ip6addr(ip_2_ip6(&fromaddr), &from6->sin6_addr); - IP_SET_TYPE_VAL(fromaddr, IPADDR_TYPE_V6); - } - #endif /* LWIP_IPV6 */ - - LWIP_DEBUGF(PING_DEBUG, ("ping: recv ")); - ip_addr_debug_print_val(PING_DEBUG, fromaddr); - LWIP_DEBUGF(PING_DEBUG, (" %"U32_F " ms\n", (sys_now() - ping_time))); - - /* todo: support ICMP6 echo */ - #if LWIP_IPV4 - if (IP_IS_V4_VAL(fromaddr)) { - struct ip_hdr *iphdr; - struct icmp_echo_hdr *iecho; - - iphdr = (struct ip_hdr *)buf; - iecho = (struct icmp_echo_hdr *)(buf + (IPH_HL(iphdr) * 4)); - if ((iecho->id == PING_ID) && (iecho->seqno == lwip_htons(ping_seq_num))) { - /* do some ping result processing */ - PING_RESULT((ICMPH_TYPE(iecho) == ICMP_ER)); - return; - } else { - LWIP_DEBUGF(PING_DEBUG, ("ping: drop\n")); - } - } - #endif /* LWIP_IPV4 */ - } - fromlen = sizeof(from); - } - - if (len == 0) { - LWIP_DEBUGF(PING_DEBUG, ("ping: recv - %"U32_F " ms - timeout\n", (sys_now() - ping_time))); - } - - /* do some ping result processing */ - PING_RESULT(0); -} - -static void -ping_thread(void *arg) { - int s; - int ret; - - #if LWIP_SO_SNDRCVTIMEO_NONSTANDARD - int timeout = PING_RCV_TIMEO; - #else - struct timeval timeout; - timeout.tv_sec = PING_RCV_TIMEO / 1000; - timeout.tv_usec = (PING_RCV_TIMEO % 1000) * 1000; - #endif - LWIP_UNUSED_ARG(arg); - - #if LWIP_IPV6 - if (IP_IS_V4(ping_target) || ip6_addr_isipv4mappedipv6(ip_2_ip6(ping_target))) { - s = lwip_socket(AF_INET6, SOCK_RAW, IP_PROTO_ICMP); - } else { - s = lwip_socket(AF_INET6, SOCK_RAW, IP6_NEXTH_ICMP6); - } - #else - s = lwip_socket(AF_INET, SOCK_RAW, IP_PROTO_ICMP); - #endif - if (s < 0) { - return; - } - - ret = lwip_setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout)); - LWIP_ASSERT("setting receive timeout failed", ret == 0); - LWIP_UNUSED_ARG(ret); - - while (1) { - if (ping_send(s, ping_target) == ERR_OK) { - LWIP_DEBUGF(PING_DEBUG, ("ping: send ")); - ip_addr_debug_print(PING_DEBUG, ping_target); - LWIP_DEBUGF(PING_DEBUG, ("\n")); - - #ifdef LWIP_DEBUG - ping_time = sys_now(); - #endif /* LWIP_DEBUG */ - ping_recv(s); - } else { - LWIP_DEBUGF(PING_DEBUG, ("ping: send ")); - ip_addr_debug_print(PING_DEBUG, ping_target); - LWIP_DEBUGF(PING_DEBUG, (" - error\n")); - } - sys_msleep(PING_DELAY); - } -} - -#else /* PING_USE_SOCKETS */ - -/* Ping using the raw ip */ -static u8_t -ping_recv(void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr) { - struct icmp_echo_hdr *iecho; - LWIP_UNUSED_ARG(arg); - LWIP_UNUSED_ARG(pcb); - LWIP_UNUSED_ARG(addr); - LWIP_ASSERT("p != NULL", p != NULL); - - if ((p->tot_len >= (PBUF_IP_HLEN + sizeof(struct icmp_echo_hdr))) && - pbuf_remove_header(p, PBUF_IP_HLEN) == 0) { - iecho = (struct icmp_echo_hdr *)p->payload; - - if ((iecho->id == PING_ID) && (iecho->seqno == lwip_htons(ping_seq_num))) { - LWIP_DEBUGF(PING_DEBUG, ("ping: recv ")); - ip_addr_debug_print(PING_DEBUG, addr); - LWIP_DEBUGF(PING_DEBUG, (" %"U32_F " ms\n", (sys_now() - ping_time))); - - /* do some ping result processing */ - PING_RESULT(1); - pbuf_free(p); - return 1; /* eat the packet */ - } - /* not eaten, restore original packet */ - pbuf_add_header(p, PBUF_IP_HLEN); - } - - return 0; /* don't eat the packet */ -} - -int -ping_send(struct raw_pcb *raw, const ip_addr_t *addr) { - struct pbuf *p; - struct icmp_echo_hdr *iecho; - size_t ping_size = sizeof(struct icmp_echo_hdr) + PING_DATA_SIZE; - - LWIP_DEBUGF(PING_DEBUG, ("ping: send ")); - ip_addr_debug_print(PING_DEBUG, addr); - LWIP_DEBUGF(PING_DEBUG, ("\n")); - LWIP_ASSERT("ping_size <= 0xffff", ping_size <= 0xffff); - - p = pbuf_alloc(PBUF_IP, (u16_t)ping_size, PBUF_RAM); - if (!p) { - return 0; - } - if ((p->len == p->tot_len) && (p->next == NULL)) { - iecho = (struct icmp_echo_hdr *)p->payload; - - ping_prepare_echo(iecho, (u16_t)ping_size); - - raw_sendto(raw, p, addr); - #ifdef LWIP_DEBUG - ping_time = sys_now(); - #endif /* LWIP_DEBUG */ - } - pbuf_free(p); - return 1; -} - -static void -ping_timeout(void *arg) { - struct raw_pcb *pcb = (struct raw_pcb *)arg; - - LWIP_ASSERT("ping_timeout: no pcb given!", pcb != NULL); - - ping_send(pcb, ping_target); - - sys_timeout(PING_DELAY, ping_timeout, pcb); -} - -static void -ping_raw_init(void) { - if (ping_pcb) { - return; - } - ping_pcb = raw_new(IP_PROTO_ICMP); - LWIP_ASSERT("ping_pcb != NULL", ping_pcb != NULL); - - raw_recv(ping_pcb, ping_recv, NULL); - raw_bind(ping_pcb, IP_ADDR_ANY); - sys_timeout(PING_DELAY, ping_timeout, ping_pcb); -} - -#endif /* PING_USE_SOCKETS */ - -void -ping_init(const ip_addr_t *ping_addr) { - ping_target = ping_addr; - - #if PING_USE_SOCKETS - sys_thread_new("ping_thread", ping_thread, NULL, DEFAULT_THREAD_STACKSIZE, DEFAULT_THREAD_PRIO); - #else /* PING_USE_SOCKETS */ - ping_raw_init(); - #endif /* PING_USE_SOCKETS */ -} - -#endif /* LWIP_RAW */ diff --git a/ports/raspberrypi/lwip_src/ping.h b/ports/raspberrypi/lwip_src/ping.h deleted file mode 100644 index abbae9d086..0000000000 --- a/ports/raspberrypi/lwip_src/ping.h +++ /dev/null @@ -1,25 +0,0 @@ -#ifndef LWIP_PING_H -#define LWIP_PING_H - -#include "lwip/raw.h" -#include "lwip/ip_addr.h" -#include "lwip/prot/icmp.h" - -/** - * PING_USE_SOCKETS: Set to 1 to use sockets, otherwise the raw api is used - */ -#ifndef PING_USE_SOCKETS -#define PING_USE_SOCKETS LWIP_SOCKET -#endif - -void ping_init(const ip_addr_t *ping_addr); -void ping_prepare_echo(struct icmp_echo_hdr *iecho, u16_t len); - -extern u16_t ping_seq_num; -#if !PING_USE_SOCKETS -void ping_set_target(const ip_addr_t *ping_addr); -int ping_send(struct raw_pcb *raw, const ip_addr_t *addr); -// u8_t ping_recv(void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr); -#endif /* !PING_USE_SOCKETS */ - -#endif /* LWIP_PING_H */ From fdeaf805d330543ce317eccfed662048d83064ec Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 13 Nov 2022 18:17:47 -0500 Subject: [PATCH 53/75] STM: off-by-one TIMx reference; other code cleanup and minor fixes --- ports/stm/common-hal/pulseio/PulseIn.c | 3 +- ports/stm/common-hal/pwmio/PWMOut.c | 97 ++++++++++++-------------- ports/stm/common-hal/pwmio/PWMOut.h | 6 +- ports/stm/peripherals/timers.c | 58 ++++++++++++--- 4 files changed, 100 insertions(+), 64 deletions(-) diff --git a/ports/stm/common-hal/pulseio/PulseIn.c b/ports/stm/common-hal/pulseio/PulseIn.c index 4ed2600d55..5b7602d9bf 100644 --- a/ports/stm/common-hal/pulseio/PulseIn.c +++ b/ports/stm/common-hal/pulseio/PulseIn.c @@ -106,7 +106,8 @@ void pulsein_reset(void) { memset(callback_obj_ref, 0, sizeof(callback_obj_ref)); HAL_TIM_Base_DeInit(&tim_handle); - tim_clock_disable(stm_peripherals_timer_get_index(tim_handle.Instance)); + // tim_clock_disable() takes a bitmask of timers. + tim_clock_disable(1 << stm_peripherals_timer_get_index(tim_handle.Instance)); memset(&tim_handle, 0, sizeof(tim_handle)); refcount = 0; } diff --git a/ports/stm/common-hal/pwmio/PWMOut.c b/ports/stm/common-hal/pwmio/PWMOut.c index 16d510b605..cc712497d2 100644 --- a/ports/stm/common-hal/pwmio/PWMOut.c +++ b/ports/stm/common-hal/pwmio/PWMOut.c @@ -36,23 +36,24 @@ #include "timers.h" -#define ALL_CLOCKS 0xFFFF - -STATIC uint8_t reserved_tim[TIM_BANK_ARRAY_LEN]; +// Bitmask of channels taken. +STATIC uint8_t tim_channels_taken[TIM_BANK_ARRAY_LEN]; +// Initial frequency timer is set to. STATIC uint32_t tim_frequencies[TIM_BANK_ARRAY_LEN]; STATIC bool never_reset_tim[TIM_BANK_ARRAY_LEN]; STATIC uint32_t timer_get_internal_duty(uint16_t duty, uint32_t period) { // duty cycle is duty/0xFFFF fraction x (number of pulses per period) - return (duty * period) / ((1 << 16) - 1); + return (duty * period) / 0xffff; } STATIC bool timer_get_optimal_divisors(uint32_t *period, uint32_t *prescaler, uint32_t frequency, uint32_t source_freq) { // Find the largest possible period supported by this frequency - for (int i = 0; i < (1 << 16); i++) { + *prescaler = 0; + for (uint32_t i = 1; i <= 0xffff; i++) { *period = source_freq / (i * frequency); - if (*period < (1 << 16) && *period >= 2) { + if (*period <= 0xffff && *period >= 2) { *prescaler = i; break; } @@ -62,13 +63,10 @@ STATIC bool timer_get_optimal_divisors(uint32_t *period, uint32_t *prescaler, } void pwmout_reset(void) { - uint16_t never_reset_mask = 0x00; for (int i = 0; i < TIM_BANK_ARRAY_LEN; i++) { if (!never_reset_tim[i]) { - reserved_tim[i] = 0x00; - tim_frequencies[i] = 0x00; - } else { - never_reset_mask |= 1 << i; + tim_channels_taken[i] = 0x00; + tim_frequencies[i] = 0; } } } @@ -78,73 +76,69 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, uint16_t duty, uint32_t frequency, bool variable_frequency) { - TIM_TypeDef *TIMx; - uint8_t tim_num = MP_ARRAY_SIZE(mcu_tim_pin_list); - bool tim_taken_internal = false; - bool tim_chan_taken = false; - bool tim_taken_f_mismatch = false; - bool var_freq_mismatch = false; + // Default error is no timer at all on pin. + pwmout_result_t last_failure = PWMOUT_INVALID_PIN; bool first_time_setup = true; - for (uint i = 0; i < tim_num; i++) { - const mcu_tim_pin_obj_t *l_tim = &mcu_tim_pin_list[i]; - uint8_t l_tim_index = l_tim->tim_index; - uint8_t l_tim_channel = l_tim->channel_index; + uint8_t tim_index; + uint8_t tim_channel_index; + + self->tim = NULL; + for (uint i = 0; i < MP_ARRAY_SIZE(mcu_tim_pin_list); i++) { + const mcu_tim_pin_obj_t *tim = &mcu_tim_pin_list[i]; + tim_index = tim->tim_index; + tim_channel_index = tim->channel_index; // if pin is same - if (l_tim->pin == pin) { + if (tim->pin == pin) { // check if the timer has a channel active, or is reserved by main timer system - if (l_tim_index < TIM_BANK_ARRAY_LEN && reserved_tim[l_tim_index] != 0) { + if (tim_index < TIM_BANK_ARRAY_LEN && tim_channels_taken[tim_index] != 0) { // Timer has already been reserved by an internal module - if (stm_peripherals_timer_is_reserved(mcu_tim_banks[l_tim_index])) { - tim_taken_internal = true; + if (stm_peripherals_timer_is_reserved(mcu_tim_banks[tim_index])) { + last_failure = PWMOUT_ALL_TIMERS_ON_PIN_IN_USE; continue; // keep looking } // is it the same channel? (or all channels reserved by a var-freq) - if (reserved_tim[l_tim_index] & 1 << (l_tim_channel)) { - tim_chan_taken = true; + if (tim_channels_taken[tim_index] & (1 << tim_channel_index)) { + last_failure = PWMOUT_ALL_TIMERS_ON_PIN_IN_USE; continue; // keep looking, might be another viable option } // If the frequencies are the same it's ok - if (tim_frequencies[l_tim_index] != frequency) { - tim_taken_f_mismatch = true; + if (tim_frequencies[tim_index] != frequency) { + last_failure = PWMOUT_INVALID_FREQUENCY_ON_PIN; continue; // keep looking } // you can't put a variable frequency on a partially reserved timer if (variable_frequency) { - var_freq_mismatch = true; + last_failure = PWMOUT_VARIABLE_FREQUENCY_NOT_AVAILABLE; continue; // keep looking } first_time_setup = false; // skip setting up the timer } // No problems taken, so set it up - self->tim = l_tim; + self->tim = tim; break; } } + TIM_TypeDef *TIMx; + // handle valid/invalid timer instance if (self->tim != NULL) { // create instance - TIMx = mcu_tim_banks[self->tim->tim_index]; + TIMx = mcu_tim_banks[tim_index]; // reserve timer/channel if (variable_frequency) { - reserved_tim[self->tim->tim_index] = 0x0F; + // Take all the channels. + tim_channels_taken[tim_index] = 0x0F; } else { - reserved_tim[self->tim->tim_index] |= 1 << self->tim->channel_index; + tim_channels_taken[tim_index] |= 1 << tim_channel_index; } - tim_frequencies[self->tim->tim_index] = frequency; + tim_frequencies[tim_index] = frequency; stm_peripherals_timer_reserve(TIMx); - } else { // no match found - if (tim_chan_taken || tim_taken_internal) { - return PWMOUT_ALL_TIMERS_ON_PIN_IN_USE; - } else if (tim_taken_f_mismatch) { - return PWMOUT_INVALID_FREQUENCY_ON_PIN; - } else if (var_freq_mismatch) { - return PWMOUT_VARIABLE_FREQUENCY_NOT_AVAILABLE; - } else { - return PWMOUT_INVALID_PIN; - } + } else { + // no match found + return last_failure; } uint32_t prescaler = 0; // prescaler is 15 bit @@ -163,10 +157,10 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, HAL_GPIO_Init(pin_port(pin->port), &GPIO_InitStruct); self->pin = pin; - tim_clock_enable(1 << (self->tim->tim_index)); + tim_clock_enable(1 << tim_index); - // translate channel into handle value - self->channel = 4 * self->tim->channel_index; + // translate channel into handle value: TIM_CHANNEL_1, _2, _3, _4. + self->channel = 4 * tim_channel_index; // Timer init self->handle.Instance = TIMx; @@ -175,6 +169,7 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, self->handle.Init.ClockDivision = TIM_CLOCKDIVISION_DIV1; self->handle.Init.CounterMode = TIM_COUNTERMODE_UP; self->handle.Init.RepetitionCounter = 0; + self->handle.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_DISABLE; // only run init if this is the first instance of this timer if (first_time_setup) { @@ -232,15 +227,15 @@ void common_hal_pwmio_pwmout_deinit(pwmio_pwmout_obj_t *self) { } // var freq shuts down entire timer, others just their channel if (self->variable_frequency) { - reserved_tim[self->tim->tim_index] = 0x00; + tim_channels_taken[self->tim->tim_index] = 0x00; } else { - reserved_tim[self->tim->tim_index] &= ~(1 << self->tim->channel_index); + tim_channels_taken[self->tim->tim_index] &= ~(1 << self->tim->channel_index); HAL_TIM_PWM_Stop(&self->handle, self->channel); } common_hal_reset_pin(self->pin); // if reserved timer has no active channels, we can disable it - if (reserved_tim[self->tim->tim_index] == 0) { + if (tim_channels_taken[self->tim->tim_index] == 0) { tim_frequencies[self->tim->tim_index] = 0x00; stm_peripherals_timer_free(self->handle.Instance); } diff --git a/ports/stm/common-hal/pwmio/PWMOut.h b/ports/stm/common-hal/pwmio/PWMOut.h index de3a304721..9a8b897c6c 100644 --- a/ports/stm/common-hal/pwmio/PWMOut.h +++ b/ports/stm/common-hal/pwmio/PWMOut.h @@ -39,12 +39,12 @@ typedef struct { TIM_HandleTypeDef handle; TIM_OC_InitTypeDef chan_handle; const mcu_tim_pin_obj_t *tim; - uint8_t channel : 7; - bool variable_frequency : 1; - uint16_t duty_cycle; uint32_t frequency; uint32_t period; const mcu_pin_obj_t *pin; + uint16_t duty_cycle; + uint8_t channel; + bool variable_frequency; } pwmio_pwmout_obj_t; void pwmout_reset(void); diff --git a/ports/stm/peripherals/timers.c b/ports/stm/peripherals/timers.c index ed0f2ec38a..20b6bcc759 100644 --- a/ports/stm/peripherals/timers.c +++ b/ports/stm/peripherals/timers.c @@ -150,26 +150,65 @@ static size_t irq_map[] = { }; // Get the frequency (in Hz) of the source clock for the given timer. -// On STM32F405/407/415/417 there are 2 cases for how the clock freq is set. -// If the APB prescaler is 1, then the timer clock is equal to its respective -// APB clock. Otherwise (APB prescaler > 1) the timer clock is twice its -// respective APB clock. See DM00031020 Rev 4, page 115. +// +// From STM ref manual: DM00031020 Rev 19, section 7.2, page 217: +// +// The timer clock frequencies for STM32F405xx/07xx and STM32F415xx/17xx are +// automatically set by hardware. There are two cases: +// 1. If the APB prescaler is 1, the timer clock frequencies are set to the same frequency as +// that of the APB domain to which the timers are connected. +// 2. Otherwise, they are set to twice (×2) the frequency of the APB domain to which the +// timers are connected. + +// From STM ref manual: DM00031020 Rev 19, section 6.2, page 153: +// +// The timer clock frequencies for STM32F42xxx and STM32F43xxx are automatically set by +// hardware. There are two cases depending on the value of TIMPRE bit in RCC_CFGR [sic - should be RCC_DKCFGR] +// register: +// * If TIMPRE bit in RCC_DKCFGR register is reset: +// If the APB prescaler is configured to a division factor of 1, the timer clock frequencies +// (TIMxCLK) are set to PCLKx. Otherwise, the timer clock frequencies are twice the +// frequency of the APB domain to which the timers are connected: TIMxCLK = 2xPCLKx. +// * If TIMPRE bit in RCC_DKCFGR register is set: +// If the APB prescaler is configured to a division factor of 1, 2 or 4, the timer clock +// frequencies (TIMxCLK) are set to HCLK. Otherwise, the timer clock frequencies is four +// times the frequency of the APB domain to which the timers are connected: TIMxCLK = 4xPCLKx. + uint32_t stm_peripherals_timer_get_source_freq(TIM_TypeDef *timer) { - size_t tim_id = stm_peripherals_timer_get_index(timer); + // The timer index starts at 0, but the timer numbers start at TIM1. + size_t tim_id = stm_peripherals_timer_get_index(timer) + 1; uint32_t source, clk_div; if (tim_id == 1 || (8 <= tim_id && tim_id <= 11)) { // TIM{1,8,9,10,11} are on APB2 source = HAL_RCC_GetPCLK2Freq(); - clk_div = RCC->CFGR & RCC_CFGR_PPRE2; + // 0b0xx means not divided; 0b100 is divide by 2; 0b101 by 4; 0b110 by 8; 0b111 by 16. + clk_div = (RCC->CFGR & RCC_CFGR_PPRE2) >> RCC_CFGR_PPRE2_Pos; } else { // TIM{2,3,4,5,6,7,12,13,14} are on APB1 source = HAL_RCC_GetPCLK1Freq(); - clk_div = RCC->CFGR & RCC_CFGR_PPRE1; + // 0b0xx means not divided; 0b100 is divide by 2; 0b101 by 4; 0b110 by 8; 0b111 by 16. + clk_div = (RCC->CFGR & RCC_CFGR_PPRE1) >> RCC_CFGR_PPRE1_Pos; } - if (clk_div != 0) { - // APB prescaler for this timer is > 1 + + // Only some STM32's have TIMPRE. + #if defined(RCC_CFGR_TIMPRE) + uint32_t timpre = RCC->DCKCFGR & RCC_CFGR_TIMPRE; + if (timpre == 0) { + if (clk_div >= 0b100) { + source *= 2; + } + } else { + if (clk_div > 0b101) { + source *= 4; + } else { + source = HAL_RCC_GetHCLKFreq(); + } + } + #else + if (clk_div >= 0b100) { source *= 2; } + #endif return source; } @@ -271,6 +310,7 @@ bool stm_peripherals_timer_is_reserved(TIM_TypeDef *instance) { return stm_timer_reserved[tim_idx]; } +// Note this returns a timer index starting at zero, corresponding to TIM1. size_t stm_peripherals_timer_get_index(TIM_TypeDef *instance) { for (size_t i = 0; i < MP_ARRAY_SIZE(mcu_tim_banks); i++) { if (instance == mcu_tim_banks[i]) { From fde1c05e6d558b220518bbf7aea7de2bb82b39b3 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Mon, 14 Nov 2022 19:54:21 +0200 Subject: [PATCH 54/75] Revert "remove lwip_src" This reverts commit 398e9122a0a4b8ba7ba148f31c09921d01c4ab69. It fails on LINK without them. --- ports/raspberrypi/lwip_src/ping.c | 384 ++++++++++++++++++++++++++++++ ports/raspberrypi/lwip_src/ping.h | 25 ++ 2 files changed, 409 insertions(+) create mode 100644 ports/raspberrypi/lwip_src/ping.c create mode 100644 ports/raspberrypi/lwip_src/ping.h diff --git a/ports/raspberrypi/lwip_src/ping.c b/ports/raspberrypi/lwip_src/ping.c new file mode 100644 index 0000000000..e59b4d6662 --- /dev/null +++ b/ports/raspberrypi/lwip_src/ping.c @@ -0,0 +1,384 @@ +/** + * @file + * Ping sender module + * + */ + +/* + * Redistribution and use in source and binary forms, with or without modification, + * are permitted provided that the following conditions are met: + * + * 1. Redistributions of source code must retain the above copyright notice, + * this list of conditions and the following disclaimer. + * 2. 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. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT + * SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 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. + * + * This file is part of the lwIP TCP/IP stack. + * + */ + +/** + * This is an example of a "ping" sender (with raw API and socket API). + * It can be used as a start point to maintain opened a network connection, or + * like a network "watchdog" for your device. + * + */ + +#include "lwip/opt.h" + +#if LWIP_RAW /* don't build if not configured for use in lwipopts.h */ + +#include "ping.h" + +#include "lwip/mem.h" +#include "lwip/raw.h" +#include "lwip/icmp.h" +#include "lwip/netif.h" +#include "lwip/sys.h" +#include "lwip/timeouts.h" +#include "lwip/inet_chksum.h" +#include "lwip/prot/ip4.h" + +#if PING_USE_SOCKETS +#include "lwip/sockets.h" +#include "lwip/inet.h" +#include +#endif /* PING_USE_SOCKETS */ + + +/** + * PING_DEBUG: Enable debugging for PING. + */ +#ifndef PING_DEBUG +#define PING_DEBUG LWIP_DBG_ON +#endif + +/** ping receive timeout - in milliseconds */ +#ifndef PING_RCV_TIMEO +#define PING_RCV_TIMEO 1000 +#endif + +/** ping delay - in milliseconds */ +#ifndef PING_DELAY +#define PING_DELAY 1000 +#endif + +/** ping identifier - must fit on a u16_t */ +#ifndef PING_ID +#define PING_ID 0xAFAF +#endif + +/** ping additional data size to include in the packet */ +#ifndef PING_DATA_SIZE +#define PING_DATA_SIZE 32 +#endif + +/** ping result action - no default action */ +#ifndef PING_RESULT +#define PING_RESULT(ping_ok) +#endif + +/* ping variables */ +static const ip_addr_t *ping_target; +u16_t ping_seq_num; +#ifdef LWIP_DEBUG +static u32_t ping_time; +#endif /* LWIP_DEBUG */ +#if !PING_USE_SOCKETS +static struct raw_pcb *ping_pcb; +#endif /* PING_USE_SOCKETS */ + +/** Prepare a echo ICMP request */ +void +ping_prepare_echo(struct icmp_echo_hdr *iecho, u16_t len) { + size_t i; + size_t data_len = len - sizeof(struct icmp_echo_hdr); + + ICMPH_TYPE_SET(iecho, ICMP_ECHO); + ICMPH_CODE_SET(iecho, 0); + iecho->chksum = 0; + iecho->id = PING_ID; + iecho->seqno = lwip_htons(++ping_seq_num); + + /* fill the additional data buffer with some data */ + for (i = 0; i < data_len; i++) { + ((char *)iecho)[sizeof(struct icmp_echo_hdr) + i] = (char)i; + } + + iecho->chksum = inet_chksum(iecho, len); +} + +#if PING_USE_SOCKETS + +/* Ping using the socket ip */ +err_t +ping_send(int s, const ip_addr_t *addr) { + int err; + struct icmp_echo_hdr *iecho; + struct sockaddr_storage to; + size_t ping_size = sizeof(struct icmp_echo_hdr) + PING_DATA_SIZE; + LWIP_ASSERT("ping_size is too big", ping_size <= 0xffff); + + #if LWIP_IPV6 + if (IP_IS_V6(addr) && !ip6_addr_isipv4mappedipv6(ip_2_ip6(addr))) { + /* todo: support ICMP6 echo */ + return ERR_VAL; + } + #endif /* LWIP_IPV6 */ + + iecho = (struct icmp_echo_hdr *)mem_malloc((mem_size_t)ping_size); + if (!iecho) { + return ERR_MEM; + } + + ping_prepare_echo(iecho, (u16_t)ping_size); + + #if LWIP_IPV4 + if (IP_IS_V4(addr)) { + struct sockaddr_in *to4 = (struct sockaddr_in *)&to; + to4->sin_len = sizeof(*to4); + to4->sin_family = AF_INET; + inet_addr_from_ip4addr(&to4->sin_addr, ip_2_ip4(addr)); + } + #endif /* LWIP_IPV4 */ + + #if LWIP_IPV6 + if (IP_IS_V6(addr)) { + struct sockaddr_in6 *to6 = (struct sockaddr_in6 *)&to; + to6->sin6_len = sizeof(*to6); + to6->sin6_family = AF_INET6; + inet6_addr_from_ip6addr(&to6->sin6_addr, ip_2_ip6(addr)); + } + #endif /* LWIP_IPV6 */ + + err = lwip_sendto(s, iecho, ping_size, 0, (struct sockaddr *)&to, sizeof(to)); + + mem_free(iecho); + + return err ? ERR_OK : ERR_VAL; +} + +static void +ping_recv(int s) { + char buf[64]; + int len; + struct sockaddr_storage from; + int fromlen = sizeof(from); + + while ((len = lwip_recvfrom(s, buf, sizeof(buf), 0, (struct sockaddr *)&from, (socklen_t *)&fromlen)) > 0) { + if (len >= (int)(sizeof(struct ip_hdr) + sizeof(struct icmp_echo_hdr))) { + ip_addr_t fromaddr; + memset(&fromaddr, 0, sizeof(fromaddr)); + + #if LWIP_IPV4 + if (from.ss_family == AF_INET) { + struct sockaddr_in *from4 = (struct sockaddr_in *)&from; + inet_addr_to_ip4addr(ip_2_ip4(&fromaddr), &from4->sin_addr); + IP_SET_TYPE_VAL(fromaddr, IPADDR_TYPE_V4); + } + #endif /* LWIP_IPV4 */ + + #if LWIP_IPV6 + if (from.ss_family == AF_INET6) { + struct sockaddr_in6 *from6 = (struct sockaddr_in6 *)&from; + inet6_addr_to_ip6addr(ip_2_ip6(&fromaddr), &from6->sin6_addr); + IP_SET_TYPE_VAL(fromaddr, IPADDR_TYPE_V6); + } + #endif /* LWIP_IPV6 */ + + LWIP_DEBUGF(PING_DEBUG, ("ping: recv ")); + ip_addr_debug_print_val(PING_DEBUG, fromaddr); + LWIP_DEBUGF(PING_DEBUG, (" %"U32_F " ms\n", (sys_now() - ping_time))); + + /* todo: support ICMP6 echo */ + #if LWIP_IPV4 + if (IP_IS_V4_VAL(fromaddr)) { + struct ip_hdr *iphdr; + struct icmp_echo_hdr *iecho; + + iphdr = (struct ip_hdr *)buf; + iecho = (struct icmp_echo_hdr *)(buf + (IPH_HL(iphdr) * 4)); + if ((iecho->id == PING_ID) && (iecho->seqno == lwip_htons(ping_seq_num))) { + /* do some ping result processing */ + PING_RESULT((ICMPH_TYPE(iecho) == ICMP_ER)); + return; + } else { + LWIP_DEBUGF(PING_DEBUG, ("ping: drop\n")); + } + } + #endif /* LWIP_IPV4 */ + } + fromlen = sizeof(from); + } + + if (len == 0) { + LWIP_DEBUGF(PING_DEBUG, ("ping: recv - %"U32_F " ms - timeout\n", (sys_now() - ping_time))); + } + + /* do some ping result processing */ + PING_RESULT(0); +} + +static void +ping_thread(void *arg) { + int s; + int ret; + + #if LWIP_SO_SNDRCVTIMEO_NONSTANDARD + int timeout = PING_RCV_TIMEO; + #else + struct timeval timeout; + timeout.tv_sec = PING_RCV_TIMEO / 1000; + timeout.tv_usec = (PING_RCV_TIMEO % 1000) * 1000; + #endif + LWIP_UNUSED_ARG(arg); + + #if LWIP_IPV6 + if (IP_IS_V4(ping_target) || ip6_addr_isipv4mappedipv6(ip_2_ip6(ping_target))) { + s = lwip_socket(AF_INET6, SOCK_RAW, IP_PROTO_ICMP); + } else { + s = lwip_socket(AF_INET6, SOCK_RAW, IP6_NEXTH_ICMP6); + } + #else + s = lwip_socket(AF_INET, SOCK_RAW, IP_PROTO_ICMP); + #endif + if (s < 0) { + return; + } + + ret = lwip_setsockopt(s, SOL_SOCKET, SO_RCVTIMEO, &timeout, sizeof(timeout)); + LWIP_ASSERT("setting receive timeout failed", ret == 0); + LWIP_UNUSED_ARG(ret); + + while (1) { + if (ping_send(s, ping_target) == ERR_OK) { + LWIP_DEBUGF(PING_DEBUG, ("ping: send ")); + ip_addr_debug_print(PING_DEBUG, ping_target); + LWIP_DEBUGF(PING_DEBUG, ("\n")); + + #ifdef LWIP_DEBUG + ping_time = sys_now(); + #endif /* LWIP_DEBUG */ + ping_recv(s); + } else { + LWIP_DEBUGF(PING_DEBUG, ("ping: send ")); + ip_addr_debug_print(PING_DEBUG, ping_target); + LWIP_DEBUGF(PING_DEBUG, (" - error\n")); + } + sys_msleep(PING_DELAY); + } +} + +#else /* PING_USE_SOCKETS */ + +/* Ping using the raw ip */ +static u8_t +ping_recv(void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr) { + struct icmp_echo_hdr *iecho; + LWIP_UNUSED_ARG(arg); + LWIP_UNUSED_ARG(pcb); + LWIP_UNUSED_ARG(addr); + LWIP_ASSERT("p != NULL", p != NULL); + + if ((p->tot_len >= (PBUF_IP_HLEN + sizeof(struct icmp_echo_hdr))) && + pbuf_remove_header(p, PBUF_IP_HLEN) == 0) { + iecho = (struct icmp_echo_hdr *)p->payload; + + if ((iecho->id == PING_ID) && (iecho->seqno == lwip_htons(ping_seq_num))) { + LWIP_DEBUGF(PING_DEBUG, ("ping: recv ")); + ip_addr_debug_print(PING_DEBUG, addr); + LWIP_DEBUGF(PING_DEBUG, (" %"U32_F " ms\n", (sys_now() - ping_time))); + + /* do some ping result processing */ + PING_RESULT(1); + pbuf_free(p); + return 1; /* eat the packet */ + } + /* not eaten, restore original packet */ + pbuf_add_header(p, PBUF_IP_HLEN); + } + + return 0; /* don't eat the packet */ +} + +int +ping_send(struct raw_pcb *raw, const ip_addr_t *addr) { + struct pbuf *p; + struct icmp_echo_hdr *iecho; + size_t ping_size = sizeof(struct icmp_echo_hdr) + PING_DATA_SIZE; + + LWIP_DEBUGF(PING_DEBUG, ("ping: send ")); + ip_addr_debug_print(PING_DEBUG, addr); + LWIP_DEBUGF(PING_DEBUG, ("\n")); + LWIP_ASSERT("ping_size <= 0xffff", ping_size <= 0xffff); + + p = pbuf_alloc(PBUF_IP, (u16_t)ping_size, PBUF_RAM); + if (!p) { + return 0; + } + if ((p->len == p->tot_len) && (p->next == NULL)) { + iecho = (struct icmp_echo_hdr *)p->payload; + + ping_prepare_echo(iecho, (u16_t)ping_size); + + raw_sendto(raw, p, addr); + #ifdef LWIP_DEBUG + ping_time = sys_now(); + #endif /* LWIP_DEBUG */ + } + pbuf_free(p); + return 1; +} + +static void +ping_timeout(void *arg) { + struct raw_pcb *pcb = (struct raw_pcb *)arg; + + LWIP_ASSERT("ping_timeout: no pcb given!", pcb != NULL); + + ping_send(pcb, ping_target); + + sys_timeout(PING_DELAY, ping_timeout, pcb); +} + +static void +ping_raw_init(void) { + if (ping_pcb) { + return; + } + ping_pcb = raw_new(IP_PROTO_ICMP); + LWIP_ASSERT("ping_pcb != NULL", ping_pcb != NULL); + + raw_recv(ping_pcb, ping_recv, NULL); + raw_bind(ping_pcb, IP_ADDR_ANY); + sys_timeout(PING_DELAY, ping_timeout, ping_pcb); +} + +#endif /* PING_USE_SOCKETS */ + +void +ping_init(const ip_addr_t *ping_addr) { + ping_target = ping_addr; + + #if PING_USE_SOCKETS + sys_thread_new("ping_thread", ping_thread, NULL, DEFAULT_THREAD_STACKSIZE, DEFAULT_THREAD_PRIO); + #else /* PING_USE_SOCKETS */ + ping_raw_init(); + #endif /* PING_USE_SOCKETS */ +} + +#endif /* LWIP_RAW */ diff --git a/ports/raspberrypi/lwip_src/ping.h b/ports/raspberrypi/lwip_src/ping.h new file mode 100644 index 0000000000..abbae9d086 --- /dev/null +++ b/ports/raspberrypi/lwip_src/ping.h @@ -0,0 +1,25 @@ +#ifndef LWIP_PING_H +#define LWIP_PING_H + +#include "lwip/raw.h" +#include "lwip/ip_addr.h" +#include "lwip/prot/icmp.h" + +/** + * PING_USE_SOCKETS: Set to 1 to use sockets, otherwise the raw api is used + */ +#ifndef PING_USE_SOCKETS +#define PING_USE_SOCKETS LWIP_SOCKET +#endif + +void ping_init(const ip_addr_t *ping_addr); +void ping_prepare_echo(struct icmp_echo_hdr *iecho, u16_t len); + +extern u16_t ping_seq_num; +#if !PING_USE_SOCKETS +void ping_set_target(const ip_addr_t *ping_addr); +int ping_send(struct raw_pcb *raw, const ip_addr_t *addr); +// u8_t ping_recv(void *arg, struct raw_pcb *pcb, struct pbuf *p, const ip_addr_t *addr); +#endif /* !PING_USE_SOCKETS */ + +#endif /* LWIP_PING_H */ From 6954e569b74ab934e0d247056a7503ec9f0720e2 Mon Sep 17 00:00:00 2001 From: Bill Sideris Date: Tue, 15 Nov 2022 00:05:01 +0200 Subject: [PATCH 55/75] since it ain't leaving.. --- ports/raspberrypi/common-hal/wifi/Radio.c | 11 +---------- ports/raspberrypi/lwip_src/ping.h | 8 ++++++++ 2 files changed, 9 insertions(+), 10 deletions(-) diff --git a/ports/raspberrypi/common-hal/wifi/Radio.c b/ports/raspberrypi/common-hal/wifi/Radio.c index 4f32fad793..2a74c16e0a 100644 --- a/ports/raspberrypi/common-hal/wifi/Radio.c +++ b/ports/raspberrypi/common-hal/wifi/Radio.c @@ -50,14 +50,7 @@ #include "lwip/dns.h" #include "lwip/icmp.h" #include "lwip/raw.h" - -#ifndef PING_ID -#define PING_ID 0xAFAF -#endif - -#ifndef PING_DEBUG -#define PING_DEBUG LWIP_DBG_ON -#endif +#include "lwip_src/ping.h" #define MAC_ADDRESS_LENGTH 6 @@ -299,8 +292,6 @@ void common_hal_wifi_radio_set_ipv4_address(wifi_radio_obj_t *self, mp_obj_t ipv } volatile bool ping_received; -int ping_send(struct raw_pcb *raw, const ip_addr_t *addr); -uint16_t ping_seq_num; uint32_t ping_time; static u8_t diff --git a/ports/raspberrypi/lwip_src/ping.h b/ports/raspberrypi/lwip_src/ping.h index abbae9d086..1a02e2450c 100644 --- a/ports/raspberrypi/lwip_src/ping.h +++ b/ports/raspberrypi/lwip_src/ping.h @@ -12,6 +12,14 @@ #define PING_USE_SOCKETS LWIP_SOCKET #endif +#ifndef PING_ID +#define PING_ID 0xAFAF +#endif + +#ifndef PING_DEBUG +#define PING_DEBUG LWIP_DBG_ON +#endif + void ping_init(const ip_addr_t *ping_addr); void ping_prepare_echo(struct icmp_echo_hdr *iecho, u16_t len); From 63ad2b763e376808a1338c01d17e3b32c0a53830 Mon Sep 17 00:00:00 2001 From: hexthat Date: Mon, 14 Nov 2022 17:35:06 +0000 Subject: [PATCH 56/75] Translated using Weblate (Chinese (Pinyin)) Currently translated at 99.6% (992 of 995 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 51 ++++++++++++++++++++++------------------ 1 file changed, 28 insertions(+), 23 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index bee1c4d4b4..664b38d57c 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2022-11-14 15:47+0000\n" -"Last-Translator: River Wang \n" +"PO-Revision-Date: 2022-11-14 22:15+0000\n" +"Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" "MIME-Version: 1.0\n" @@ -127,7 +127,7 @@ msgstr "%q chūshǐhuà shībài" #: shared-bindings/dualbank/__init__.c msgid "%q is %q" -msgstr "" +msgstr "%q shì %q" #: py/argcheck.c msgid "%q length must be %d" @@ -173,6 +173,7 @@ msgstr "%q bìxū >= %d" #: shared-bindings/audiocore/RawSample.c msgid "%q must be a bytearray or array of type 'h', 'H', 'b', or 'B'" msgstr "" +"%q bì xū shì zì jié shù zǔ huò lèi xíng wéi 'h', 'H', 'b', huò 'B' de shù zǔ" #: py/argcheck.c msgid "%q must be a string" @@ -597,7 +598,7 @@ msgstr "RX hé TX dōu xū yào liúliàng kòngzhì" #: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h #: ports/atmel-samd/boards/meowmeow/mpconfigboard.h msgid "Both buttons were pressed at start up.\n" -msgstr "" +msgstr "qǐ dòng shí àn xià le liǎng gè àn niǔ.\n" #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" @@ -667,7 +668,7 @@ msgstr "Zǒngxiàn yǐnjiǎo %d yǐjīng zài shǐyòng zhōng" #: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h #: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h msgid "Button A was pressed at start up.\n" -msgstr "" +msgstr "qǐ dòng shí àn xià àn niǔ A.\n" #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." @@ -947,15 +948,15 @@ msgstr "cuò wù: bǎng dìng shī bài" #: shared-bindings/coproc/__init__.c shared-bindings/microcontroller/Pin.c #: shared-bindings/neopixel_write/__init__.c msgid "Expected a %q" -msgstr "Yùqí %q" +msgstr "Yù qí %q" #: ports/raspberrypi/bindings/cyw43/__init__.c msgid "Expected a %q or %q" -msgstr "" +msgstr "yù qī wéi %q huò %q" #: shared-bindings/alarm/__init__.c msgid "Expected an %q" -msgstr "" +msgstr "yù qī wéi %q" #: ports/espressif/common-hal/_bleio/Adapter.c #: ports/nrf/common-hal/_bleio/Adapter.c @@ -1037,16 +1038,16 @@ msgstr "guò lǜ qì tài fù zá" #: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware is duplicate" -msgstr "" +msgstr "gù jiàn chóng fù" #: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware is invalid" -msgstr "" +msgstr "gù jiàn wú xiào" #: ports/espressif/common-hal/coproc/Coproc.c #: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware is too big" -msgstr "" +msgstr "gù jiàn tài dà" #: shared-bindings/bitmaptools/__init__.c msgid "For L8 colorspace, input bitmap must have 8 bits per pixel" @@ -1664,7 +1665,7 @@ msgstr "" #: ports/espressif/common-hal/alarm/coproc/CoprocAlarm.c #: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one %q can be set in deep sleep." -msgstr "" +msgstr "zài shēn dù shuì mián zhōng zhǐ néng shè zhì yí gè %q." #: ports/espressif/common-hal/i2ctarget/I2CTarget.c #: ports/raspberrypi/common-hal/i2ctarget/I2CTarget.c @@ -2025,7 +2026,7 @@ msgstr "Wēndù dòu qǔ chāoshí" #: supervisor/shared/safe_mode.c msgid "The BOOT button was pressed at start up.\n" -msgstr "" +msgstr "qǐ dòng shí àn xià le yǐn dǎo àn niǔ.\n" #: supervisor/shared/safe_mode.c msgid "" @@ -2037,11 +2038,11 @@ msgstr "" #: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h msgid "The SW38 button was pressed at start up.\n" -msgstr "" +msgstr "qǐ dòng shí àn xià le SW38 àn niǔ .\n" #: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h msgid "The VOLUME button was pressed at start up.\n" -msgstr "" +msgstr "qǐ dòng shí àn xià yīn liàng àn niǔ.\n" #: supervisor/shared/safe_mode.c msgid "" @@ -2053,11 +2054,11 @@ msgstr "" #: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h msgid "The central button was pressed at start up.\n" -msgstr "" +msgstr "qǐ dòng shí àn xià zhōng yāng àn niǔ.\n" #: ports/nrf/boards/aramcon2_badge/mpconfigboard.h msgid "The left button was pressed at start up.\n" -msgstr "" +msgstr "qǐ dòng shí àn xià zuǒ àn niǔ.\n" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2126,6 +2127,8 @@ msgstr "Chāoshí shíjiān tài zhǎng: Zuìdà chāoshí shíjiān wèi%d miǎ #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without requesting safe mode." msgstr "" +"yào tuì chū, qǐng zài bù qǐng qiú ān quán mó shì de qíng kuàng xià chóng zhì " +"zhǔ bǎn." #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample" @@ -2246,7 +2249,7 @@ msgstr "wú fǎ qǐ dòng mDNS chá xún" #: shared-bindings/coproc/CoprocMemory.c msgid "Unable to write" -msgstr "" +msgstr "wú fǎ xiě rù" #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." @@ -2313,7 +2316,7 @@ msgstr "wèi zhī de xì tǒng gù jiàn cuò wù: %d" #: ports/raspberrypi/common-hal/wifi/__init__.c #, c-format msgid "Unkown error code %d" -msgstr "" +msgstr "wèi zhī cuò wù dài %d" #: shared-bindings/adafruit_pixelbuf/PixelBuf.c #, c-format @@ -2990,6 +2993,8 @@ msgid "" "esp32_camera.Camera requires reserved PSRAM to be configured. See the " "documentation for instructions." msgstr "" +"esp32_camera. shè xiàng jī xū yào pèi zhì yù liú de PSRAM. yǒu guān shuō " +"míng, qǐng cān yuè wén dàng." #: py/runtime.c msgid "exceptions must derive from BaseException" @@ -3770,11 +3775,11 @@ msgstr "Jǐn zhīchí wèi shēndù = 16" #: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only mono is supported" -msgstr "" +msgstr "jǐn zhī chí dān shēng dào" #: ports/stm/common-hal/audiobusio/PDMIn.c msgid "only oversample=64 is supported" -msgstr "" +msgstr "jǐn zhī chí guò cǎi yàng =64" #: ports/nrf/common-hal/audiobusio/PDMIn.c #: ports/stm/common-hal/audiobusio/PDMIn.c @@ -4245,7 +4250,7 @@ msgstr "wèizhī lèixíng '%q'" #: py/objstr.c #, c-format msgid "unmatched '%c' in format" -msgstr "" +msgstr "gé shì bù pǐ pèi de '%c'" #: py/objtype.c py/runtime.c msgid "unreadable attribute" @@ -4326,7 +4331,7 @@ msgstr "wèi qǐ yòng WIFI" #: ports/raspberrypi/common-hal/wifi/Monitor.c msgid "wifi.Monitor not available" -msgstr "" +msgstr "wú xiàn wǎng luò xiǎn shì qì bù kě yòng" #: shared-bindings/_bleio/Adapter.c msgid "window must be <= interval" From ce22a3293dc00befad9304d8208d3b71e7aa7a86 Mon Sep 17 00:00:00 2001 From: River Wang Date: Mon, 14 Nov 2022 15:47:43 +0000 Subject: [PATCH 57/75] Translated using Weblate (Chinese (Pinyin)) Currently translated at 99.6% (992 of 995 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 664b38d57c..bb20f1ef6e 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -8,7 +8,7 @@ msgstr "" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" "PO-Revision-Date: 2022-11-14 22:15+0000\n" -"Last-Translator: hexthat \n" +"Last-Translator: River Wang \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" "MIME-Version: 1.0\n" @@ -747,7 +747,7 @@ msgstr "Nín wúfǎ sǎomiáo kuòzhǎn de, kě liánjiē de guǎnggào." #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." -msgstr "wú fǎ lā dòng jǐn shū rù yǐn jiǎo." +msgstr "wúfǎ lādòng jǐn shūrù yǐnjiǎo." #: shared-bindings/audiobusio/PDMIn.c msgid "Cannot record to a file" From 2d08473ee078625b5f6249c54bbbee266e9edafe Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 14 Nov 2022 21:18:40 -0600 Subject: [PATCH 58/75] this version actually saves more code space on cortex-m0 with -Os (samd21s) --- shared-module/adafruit_pixelbuf/PixelBuf.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/shared-module/adafruit_pixelbuf/PixelBuf.c b/shared-module/adafruit_pixelbuf/PixelBuf.c index e0c63306f9..5cbda5da96 100644 --- a/shared-module/adafruit_pixelbuf/PixelBuf.c +++ b/shared-module/adafruit_pixelbuf/PixelBuf.c @@ -198,10 +198,10 @@ STATIC color_u _pixelbuf_parse_color(pixelbuf_pixelbuf_obj_t *self, mp_obj_t col } STATIC void _pixelbuf_set_pixel_color(pixelbuf_pixelbuf_obj_t *self, size_t index, color_u rgbw) { - int r = rgbw.r; - int g = rgbw.g; - int b = rgbw.b; - int w = rgbw.w; + uint8_t r = rgbw.r; + uint8_t g = rgbw.g; + uint8_t b = rgbw.b; + uint8_t w = rgbw.w; // DotStars don't have white, instead they have 5 bit brightness so pack it into w. Shift right // by three to leave the top five bits. if (self->bytes_per_pixel == 4 && self->byteorder.is_dotstar) { From 14ba5a75a3b03d6d5c1d6c4ea556d14dfc81b0f8 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Mon, 14 Nov 2022 21:25:33 -0600 Subject: [PATCH 59/75] skip converting from long int if long ints aren't enabled .. saves 20 bytes on proxlight trinkey --- shared-module/adafruit_pixelbuf/PixelBuf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shared-module/adafruit_pixelbuf/PixelBuf.c b/shared-module/adafruit_pixelbuf/PixelBuf.c index 5cbda5da96..5017ba2f2c 100644 --- a/shared-module/adafruit_pixelbuf/PixelBuf.c +++ b/shared-module/adafruit_pixelbuf/PixelBuf.c @@ -143,8 +143,10 @@ void common_hal_adafruit_pixelbuf_pixelbuf_set_brightness(mp_obj_t self_in, mp_f STATIC uint8_t _pixelbuf_get_as_uint8(mp_obj_t obj) { if (mp_obj_is_small_int(obj)) { return MP_OBJ_SMALL_INT_VALUE(obj); + #if MICROPY_LONGINT_IMPL != MICROPY_LONGINT_IMPL_NONE } else if (mp_obj_is_int(obj)) { return mp_obj_get_int_truncated(obj); + #endif } else if (mp_obj_is_float(obj)) { return (uint8_t)mp_obj_get_float(obj); } From a4dd1b2341cd777932279e58f702455c3257a481 Mon Sep 17 00:00:00 2001 From: River Wang Date: Tue, 15 Nov 2022 02:16:43 +0000 Subject: [PATCH 60/75] Translated using Weblate (Chinese (Pinyin)) Currently translated at 99.4% (990 of 995 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index bb20f1ef6e..9178bd4caa 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2022-11-14 22:15+0000\n" +"PO-Revision-Date: 2022-11-15 04:35+0000\n" "Last-Translator: River Wang \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" @@ -755,7 +755,7 @@ msgstr "Wúfǎ jìlù dào wénjiàn" #: shared-module/storage/__init__.c msgid "Cannot remount '/' when visible via USB." -msgstr "tōng guò USB kě jiàn shí wú fǎ chóng xīn ān zhuāng '/'." +msgstr "tōngguò USB kějiàn shí wúfǎ chóngxīn ānzhuāng '/'." #: ports/atmel-samd/common-hal/microcontroller/__init__.c #: ports/cxd56/common-hal/microcontroller/__init__.c @@ -774,31 +774,31 @@ msgstr "Dāng fāngxiàng wéi shūrù shí, bùnéng shèzhì zhí." #: ports/espressif/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Cannot specify RTS or CTS in RS485 mode" -msgstr "wú fǎ zài RS485 mó shì xià zhǐ dìng RTS huò CTS" +msgstr "wúfǎ zài RS485 móshì xià zhǐdìng RTS huò CTS" #: py/objslice.c msgid "Cannot subclass slice" -msgstr "bùnéng zi lèi huà qiēpiàn" +msgstr "bùnéng zǐlèihuà qiēpiàn" #: shared-module/bitbangio/SPI.c msgid "Cannot transfer without MOSI and MISO pins" -msgstr "méiyǒu MOSI hé MISO yǐn jiǎo wúfǎ chuánshū" +msgstr "méiyǒu MOSI hé MISO yǐnjiǎo, wúfǎ chuánshū" #: shared-bindings/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" -msgstr "Wúfǎ gēnggǎi yǐ zài shǐyòng de jìshí qì shàng de pínlǜ" +msgstr "Wúfǎ zài shǐyòng zhōng de jìshí qì shàng gēnggǎi pínlǜ" #: ports/nrf/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge, only level" -msgstr "wúfǎ zài yǐn jiǎo biānyuán huànxǐng, zhǐ néng diàn píng" +msgstr "wúfǎ shǐyòng biānyuán huànxǐng, zhǐnéng shǐyòng diànpíng" #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." -msgstr "wú fǎ zài yǐn jiǎo biān yuán huàn xǐng. jǐn jí bié." +msgstr "wúfǎ shǐyòng biānyuán huànxǐng. zhǐnéng shǐyòng diànpíng" #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "CharacteristicBuffer writing not provided" -msgstr "Wèi tígōng zìfú huǎncún xiě rù" +msgstr "Wèi tígōng zìfú huǎncún xiěrù" #: supervisor/shared/safe_mode.c msgid "CircuitPython core code crashed hard. Whoops!\n" @@ -810,11 +810,11 @@ msgstr "CircuitPython wúfǎ fēnpèi duī." #: shared-module/bitbangio/I2C.c msgid "Clock stretch too long" -msgstr "Shízhōng shēnzhǎn tài zhǎng" +msgstr "shízhōng yánzhǎn guòcháng" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Clock unit in use" -msgstr "Shǐyòng shízhōng dānwèi" +msgstr "shízhōng dānyuán zhèngzài shǐyòng zhōng" #: shared-bindings/_bleio/Connection.c msgid "" @@ -832,7 +832,7 @@ msgstr "wúfǎ jiǎnsuǒ shízhōng" #: shared-bindings/_bleio/Adapter.c msgid "Could not set address" -msgstr "wú fǎ shè zhì dì zhǐ" +msgstr "wúfǎ shèzhì dìzhǐ" #: shared-bindings/pwmio/PWMOut.c msgid "Could not start PWM" @@ -844,11 +844,11 @@ msgstr "Wúfǎ qǐdòng zhōngduàn,RX máng" #: shared-module/audiomp3/MP3Decoder.c msgid "Couldn't allocate decoder" -msgstr "Zhǎo bù dào jiěmǎ qì" +msgstr "wúfǎ fēnpèi jiěmǎ qì" #: supervisor/shared/safe_mode.c msgid "Crash into the HardFault_Handler." -msgstr "Zhuìhuǐ. Shūrù HardFault_Handler." +msgstr "gu4zhang4, jin4ru4 HardFault_Handler." #: ports/stm/common-hal/analogio/AnalogOut.c msgid "DAC Channel Init Error" @@ -860,10 +860,11 @@ msgstr "DAC shèbèi chūshǐhuà cuòwù" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "DAC already in use" -msgstr "Fā yuán huì yǐjīng shǐyòng" +msgstr "DAC zhèngzài bèi shǐyòng" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#, fuzzy msgid "Data 0 pin must be byte aligned" msgstr "Shùjù 0 de yǐn jiǎo bìxū shì zì jié duìqí" @@ -873,6 +874,7 @@ msgstr "Shùjù kuài bìxū zūnxún fmt qū kuài" #: ports/espressif/common-hal/_bleio/Adapter.c #: ports/nrf/common-hal/_bleio/Adapter.c +#, fuzzy msgid "Data not supported with directed advertising" msgstr "bù zhī chí dìng xiàng guǎng gào de shù jù" From ca84d79809a4835d1d5d00fa59f6fed880b6f591 Mon Sep 17 00:00:00 2001 From: Dominic Davis-Foster Date: Tue, 15 Nov 2022 23:06:36 +0000 Subject: [PATCH 61/75] Allow duplicate VID and PID in CI check. --- tools/ci_check_duplicate_usb_vid_pid.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/ci_check_duplicate_usb_vid_pid.py b/tools/ci_check_duplicate_usb_vid_pid.py index a75bd2b3f8..4e5c48c90d 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -60,6 +60,7 @@ DEFAULT_CLUSTERLIST = { "espressif_esp32s2_devkitc_1_n4r2", "espressif_esp32s2_devkitc_1_n8r2", ], + "0x239A:0x102E": ["weact_studio_pico", "weact_studio_pico_16mb"], } cli_parser = argparse.ArgumentParser( From 93ee54a2fb52bf20c49e9dfc846e03f400322ec5 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 15 Nov 2022 16:14:31 -0800 Subject: [PATCH 62/75] Fix PWM status LED never_reset It doesn't need never reset because the status LED is only active when user code isn't. This also fixes PWM never reset on espressif so that deinit will undo it. Fixes #6223 --- ports/espressif/common-hal/pwmio/PWMOut.c | 18 +++++++++++++++++- supervisor/shared/status_leds.c | 18 +++--------------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/ports/espressif/common-hal/pwmio/PWMOut.c b/ports/espressif/common-hal/pwmio/PWMOut.c index d83ce6590a..161f547480 100644 --- a/ports/espressif/common-hal/pwmio/PWMOut.c +++ b/ports/espressif/common-hal/pwmio/PWMOut.c @@ -166,7 +166,20 @@ void common_hal_pwmio_pwmout_never_reset(pwmio_pwmout_obj_t *self) { void common_hal_pwmio_pwmout_reset_ok(pwmio_pwmout_obj_t *self) { never_reset_tim[self->tim_handle.timer_num] = false; - never_reset_chan[self->chan_handle.channel] = false; + // Search if any other channel is using the timer and is never reset. + // Otherwise, we clear never_reset for the timer as well. + bool other_never_reset = false; + for (size_t i = 0; i < LEDC_CHANNEL_MAX; i++) { + if (i != self->tim_handle.timer_num && + reserved_channels[i] == self->tim_handle.timer_num && + never_reset_chan[i]) { + other_never_reset = true; + break; + } + } + if (!other_never_reset) { + never_reset_chan[self->chan_handle.channel] = false; + } } bool common_hal_pwmio_pwmout_deinited(pwmio_pwmout_obj_t *self) { @@ -182,11 +195,13 @@ void common_hal_pwmio_pwmout_deinit(pwmio_pwmout_obj_t *self) { ledc_stop(LEDC_LOW_SPEED_MODE, self->chan_handle.channel, 0); } reserved_channels[self->chan_handle.channel] = INDEX_EMPTY; + never_reset_chan[self->chan_handle.channel] = false; // Search if any other channel is using the timer bool taken = false; for (size_t i = 0; i < LEDC_CHANNEL_MAX; i++) { if (reserved_channels[i] == self->tim_handle.timer_num) { taken = true; + break; } } // Variable frequency means there's only one channel on the timer @@ -195,6 +210,7 @@ void common_hal_pwmio_pwmout_deinit(pwmio_pwmout_obj_t *self) { reserved_timer_freq[self->tim_handle.timer_num] = 0; // if timer isn't varfreq this will be off aleady varfreq_timers[self->tim_handle.timer_num] = false; + never_reset_tim[self->tim_handle.timer_num] = false; } common_hal_reset_pin(self->pin); self->deinited = true; diff --git a/supervisor/shared/status_leds.c b/supervisor/shared/status_leds.c index 315e64a9a0..7e6c7983b1 100644 --- a/supervisor/shared/status_leds.c +++ b/supervisor/shared/status_leds.c @@ -179,27 +179,15 @@ void status_led_init() { #elif CIRCUITPY_PWM_RGB_LED if (common_hal_mcu_pin_is_free(CIRCUITPY_RGB_STATUS_R)) { - pwmout_result_t red_result = common_hal_pwmio_pwmout_construct(&rgb_status_r, CIRCUITPY_RGB_STATUS_R, 0, 50000, false); - - if (PWMOUT_OK == red_result) { - common_hal_pwmio_pwmout_never_reset(&rgb_status_r); - } + common_hal_pwmio_pwmout_construct(&rgb_status_r, CIRCUITPY_RGB_STATUS_R, 0, 50000, false); } if (common_hal_mcu_pin_is_free(CIRCUITPY_RGB_STATUS_G)) { - pwmout_result_t green_result = common_hal_pwmio_pwmout_construct(&rgb_status_g, CIRCUITPY_RGB_STATUS_G, 0, 50000, false); - - if (PWMOUT_OK == green_result) { - common_hal_pwmio_pwmout_never_reset(&rgb_status_g); - } + common_hal_pwmio_pwmout_construct(&rgb_status_g, CIRCUITPY_RGB_STATUS_G, 0, 50000, false); } if (common_hal_mcu_pin_is_free(CIRCUITPY_RGB_STATUS_B)) { - pwmout_result_t blue_result = common_hal_pwmio_pwmout_construct(&rgb_status_b, CIRCUITPY_RGB_STATUS_B, 0, 50000, false); - - if (PWMOUT_OK == blue_result) { - common_hal_pwmio_pwmout_never_reset(&rgb_status_b); - } + common_hal_pwmio_pwmout_construct(&rgb_status_b, CIRCUITPY_RGB_STATUS_B, 0, 50000, false); } #elif defined(MICROPY_HW_LED_STATUS) From 5b64a62c1629e793f10a61acfa330857de1cce86 Mon Sep 17 00:00:00 2001 From: foamyguy Date: Tue, 15 Nov 2022 18:37:23 -0600 Subject: [PATCH 63/75] move hidden declare inside struct --- shared-module/vectorio/VectorShape.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-module/vectorio/VectorShape.h b/shared-module/vectorio/VectorShape.h index ce5823e40c..6ce09f9308 100644 --- a/shared-module/vectorio/VectorShape.h +++ b/shared-module/vectorio/VectorShape.h @@ -30,7 +30,6 @@ typedef struct { mp_obj_t pixel_shader; int16_t x; int16_t y; - bool hidden : 1; displayio_buffer_transform_t *absolute_transform; // Tracks current shape footprint and expands outward as the shape dirties and changes. // This is suboptimal if you move your shape far. Could add more state to only redraw @@ -38,6 +37,7 @@ typedef struct { displayio_area_t ephemeral_dirty_area; displayio_area_t current_area; bool current_area_dirty; + bool hidden; } vectorio_vector_shape_t; displayio_area_t *vectorio_vector_shape_get_refresh_areas(vectorio_vector_shape_t *self, displayio_area_t *tail); From 8e4e84c58b337eadfa1cd764011786d7c540e187 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 15 Nov 2022 16:51:47 -0800 Subject: [PATCH 64/75] Match channel number, not timer number --- ports/espressif/common-hal/pwmio/PWMOut.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/espressif/common-hal/pwmio/PWMOut.c b/ports/espressif/common-hal/pwmio/PWMOut.c index 161f547480..68518fbd25 100644 --- a/ports/espressif/common-hal/pwmio/PWMOut.c +++ b/ports/espressif/common-hal/pwmio/PWMOut.c @@ -170,7 +170,7 @@ void common_hal_pwmio_pwmout_reset_ok(pwmio_pwmout_obj_t *self) { // Otherwise, we clear never_reset for the timer as well. bool other_never_reset = false; for (size_t i = 0; i < LEDC_CHANNEL_MAX; i++) { - if (i != self->tim_handle.timer_num && + if (i != self->chan_handle.channel && reserved_channels[i] == self->tim_handle.timer_num && never_reset_chan[i]) { other_never_reset = true; From b74893eb07fdbe9fed2b17749c4f66ee664ff153 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Tue, 15 Nov 2022 21:52:12 -0500 Subject: [PATCH 65/75] samd21: port_disable_tick() should disable event channel --- ports/atmel-samd/supervisor/port.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index 424acece78..2c63e28a17 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -644,6 +644,10 @@ void port_disable_tick(void) { RTC->MODE0.INTENCLR.reg = RTC_MODE0_INTENCLR_PER2; #endif #ifdef SAMD21 + if (_tick_event_channel == EVSYS_SYNCH_NUM) { + return; + } + if (_tick_event_channel >= 8) { uint8_t value = 1 << (_tick_event_channel - 8); EVSYS->INTENCLR.reg = EVSYS_INTENSET_EVDp8(value); @@ -651,6 +655,7 @@ void port_disable_tick(void) { uint8_t value = 1 << _tick_event_channel; EVSYS->INTENCLR.reg = EVSYS_INTENSET_EVD(value); } + disable_event_channel(_tick_event_channel); _tick_event_channel = EVSYS_SYNCH_NUM; #endif } From b0d0fcbabc7162533110162d9f03c38321ed9f6a Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Thu, 17 Nov 2022 10:31:36 -0600 Subject: [PATCH 66/75] supervisor_start_terminal: don't crash if display is tiny Closes: #7222 --- supervisor/shared/display.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/supervisor/shared/display.c b/supervisor/shared/display.c index 8ed2f5c17e..0a066e8016 100644 --- a/supervisor/shared/display.c +++ b/supervisor/shared/display.c @@ -74,11 +74,8 @@ void supervisor_start_terminal(uint16_t width_px, uint16_t height_px) { scale = 1; } - width_in_tiles = width_px / (scroll_area->tile_width * scale); - if (width_in_tiles < 1) { - width_in_tiles = 1; - } - uint16_t height_in_tiles = height_px / (scroll_area->tile_height * scale); + width_in_tiles = MAX(1, width_px / (scroll_area->tile_width * scale)); + uint16_t height_in_tiles = MAX(2, height_px / (scroll_area->tile_height * scale)); uint16_t total_tiles = width_in_tiles * height_in_tiles; @@ -117,7 +114,6 @@ void supervisor_start_terminal(uint16_t width_px, uint16_t height_px) { status_bar->top_left_y = 0; status_bar->width_in_tiles = width_in_tiles; status_bar->height_in_tiles = 1; - assert(width_in_tiles > 0); status_bar->pixel_width = width_in_tiles * status_bar->tile_width; status_bar->pixel_height = status_bar->tile_height; status_bar->tiles = tiles; @@ -127,8 +123,6 @@ void supervisor_start_terminal(uint16_t width_px, uint16_t height_px) { scroll_area->top_left_y = 0; scroll_area->width_in_tiles = width_in_tiles; scroll_area->height_in_tiles = height_in_tiles - 1; - assert(width_in_tiles > 0); - assert(height_in_tiles > 1); scroll_area->pixel_width = width_in_tiles * scroll_area->tile_width; scroll_area->pixel_height = (height_in_tiles - 1) * scroll_area->tile_height; #if CIRCUITPY_REPL_LOGO From f9f1edbb08215d90ec99614596131d5705510837 Mon Sep 17 00:00:00 2001 From: Neradoc Date: Fri, 1 Apr 2022 12:39:20 +0200 Subject: [PATCH 67/75] setup PWM status LED on aithinker ESP32-C3 boards --- .../espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.h | 4 +++- ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.h b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.h index a42f8b0436..a9f0075a41 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.h +++ b/ports/espressif/boards/ai_thinker_esp32-c3s-2m/mpconfigboard.h @@ -30,7 +30,9 @@ #define MICROPY_HW_MCU_NAME "ESP32-C3" // Status LED -#define MICROPY_HW_LED_STATUS (&pin_GPIO19) +#define CIRCUITPY_RGB_STATUS_R (&pin_GPIO3) +#define CIRCUITPY_RGB_STATUS_G (&pin_GPIO4) +#define CIRCUITPY_RGB_STATUS_B (&pin_GPIO5) // Default bus pins #define DEFAULT_UART_BUS_RX (&pin_GPIO20) diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h b/ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h index 20fb1ff022..f3f89d500b 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h +++ b/ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h @@ -30,7 +30,9 @@ #define MICROPY_HW_MCU_NAME "ESP32-C3FN4" // Status LED -#define MICROPY_HW_LED_STATUS (&pin_GPIO19) +#define CIRCUITPY_RGB_STATUS_R (&pin_GPIO3) +#define CIRCUITPY_RGB_STATUS_G (&pin_GPIO4) +#define CIRCUITPY_RGB_STATUS_B (&pin_GPIO5) // Default bus pins #define DEFAULT_UART_BUS_RX (&pin_GPIO20) From 406e46f46bfadb001c38037f3f141f9037d023f6 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 18 Nov 2022 14:34:28 -0600 Subject: [PATCH 68/75] Allow serial "break" to trigger KeyboardInterrupt When the USB serial buffer is full, the Ctrl-C code to send KeyboardInterrupt can't be sent, which creates a problem if you've pasted code or otherwise filled the buffer and need to recover. A similar problem affects advanced UIs that interact with CircuitPython and may send characters when they're unexpected, such as mu when it tries to move the cursor based on the user clicking on the screen. The main way forward seems to be to use some kind of message that can still reach CircuitPython when its internal serial recieve buffer is full. RS232 defines a "break" signal, in which the transmitting device holds its data line in the "space" state for many entire character times. This still exists in the world of USB serial. This does work, sort of, except that your host computer software will need to properly handle blocking serial writes; tio can send a break with the **ctrl-c b** sequence, but this only works if it hasn't yet written too much data, so it doesn't actually help in most situations :-/ --- supervisor/shared/usb/usb.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/supervisor/shared/usb/usb.c b/supervisor/shared/usb/usb.c index a51c6c2659..81a4cbc332 100644 --- a/supervisor/shared/usb/usb.c +++ b/supervisor/shared/usb/usb.c @@ -359,4 +359,10 @@ void tud_cdc_rx_wanted_cb(uint8_t itf, char wanted_char) { } } +void tud_cdc_send_break_cb(uint8_t itf, uint16_t duration_ms) { + if (usb_cdc_console_enabled() && mp_interrupt_char != -1 && itf == 0 && duration_ms > 0) { + mp_sched_keyboard_interrupt(); + } +} + #endif From afca4cef6dd4daa8ff3c82b4c235b9d60300c67d Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Fri, 18 Nov 2022 16:05:46 -0600 Subject: [PATCH 69/75] This code can only be active if USB CDC is enabled. --- supervisor/shared/usb/usb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/supervisor/shared/usb/usb.c b/supervisor/shared/usb/usb.c index 81a4cbc332..fa85cddb83 100644 --- a/supervisor/shared/usb/usb.c +++ b/supervisor/shared/usb/usb.c @@ -341,7 +341,7 @@ bool tud_vendor_control_xfer_cb(uint8_t rhport, uint8_t stage, tusb_control_requ #endif // CIRCUITPY_USB_VENDOR -#if MICROPY_KBD_EXCEPTION +#if MICROPY_KBD_EXCEPTION && CIRCUITPY_USB_CDC /** * Callback invoked when received an "wanted" char. From 1611cf98dab67d90c987a261f1b804e33b94ca68 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 18 Nov 2022 18:27:38 -0500 Subject: [PATCH 70/75] have clock start high in SPI mode 3 --- ports/raspberrypi/common-hal/busio/SPI.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ports/raspberrypi/common-hal/busio/SPI.c b/ports/raspberrypi/common-hal/busio/SPI.c index a7b97823f9..67323790bf 100644 --- a/ports/raspberrypi/common-hal/busio/SPI.c +++ b/ports/raspberrypi/common-hal/busio/SPI.c @@ -151,6 +151,15 @@ bool common_hal_busio_spi_configure(busio_spi_obj_t *self, spi_set_format(self->peripheral, bits, polarity, phase, SPI_MSB_FIRST); + // Workaround to start with clock line high if polarity=1. The hw SPI peripheral does not do this + // automatically. See https://github.com/raspberrypi/pico-sdk/issues/868 and + // https://forums.raspberrypi.com/viewtopic.php?t=336142 + // TODO: scheduled to be be fixed in pico-sdk 1.5.0. + if (polarity) { + hw_clear_bits(&spi_get_hw(self->peripheral)->cr1, SPI_SSPCR1_SSE_BITS); // disable the SPI + hw_set_bits(&spi_get_hw(self->peripheral)->cr1, SPI_SSPCR1_SSE_BITS); // re-enable the SPI + } + self->polarity = polarity; self->phase = phase; self->bits = bits; From e4f5ca11f9439e6aafb3e3063c47b13086e50636 Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Sat, 19 Nov 2022 10:45:10 +0530 Subject: [PATCH 71/75] compare against pr head commit instead of merge ref --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0e540f3aa3..607717f5fe 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -141,6 +141,7 @@ jobs: uses: tj-actions/changed-files@v34 with: json: "true" + sha: ${{ steps.get-last-commit-with-checks.outputs.commit && github.event.after }} base_sha: ${{ steps.get-last-commit-with-checks.outputs.commit }} - name: Set matrix id: set-matrix From 4e0f8e7fcd9cb65bd4583ece41bea6fc7277c3c4 Mon Sep 17 00:00:00 2001 From: Jeff Epler Date: Sat, 19 Nov 2022 10:50:12 -0600 Subject: [PATCH 72/75] Interrupt on UART 'break' Tested and working with the CH9102F USB converter on Adafruit's Feather ESP32 V2 (& tio as the software on the host computer) Closes: #7233 --- ports/espressif/common-hal/busio/UART.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ports/espressif/common-hal/busio/UART.c b/ports/espressif/common-hal/busio/UART.c index cdaf25250f..f025c15b3e 100644 --- a/ports/espressif/common-hal/busio/UART.c +++ b/ports/espressif/common-hal/busio/UART.c @@ -49,8 +49,9 @@ static void uart_event_task(void *param) { while (true) { if (xQueueReceive(self->event_queue, &event, portMAX_DELAY)) { switch (event.type) { + case UART_BREAK: case UART_PATTERN_DET: - // When the console uart receives CTRL+C, wake the main task and schedule a keyboard interrupt + // When the console uart receives CTRL+C or BREAK, wake the main task and schedule a keyboard interrupt if (self->is_console) { port_wake_main_task(); if (mp_interrupt_char == CHAR_CTRL_C) { From 7ea563e661cedaa6714b003f08801097277938fe Mon Sep 17 00:00:00 2001 From: MicroDev <70126934+MicroDev1@users.noreply.github.com> Date: Sat, 19 Nov 2022 23:29:05 +0530 Subject: [PATCH 73/75] fix json parse issue --- .github/workflows/build.yml | 4 ++-- tools/ci_set_matrix.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 607717f5fe..8863664232 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -140,14 +140,14 @@ jobs: if: github.event_name == 'pull_request' uses: tj-actions/changed-files@v34 with: - json: "true" + json: true sha: ${{ steps.get-last-commit-with-checks.outputs.commit && github.event.after }} base_sha: ${{ steps.get-last-commit-with-checks.outputs.commit }} - name: Set matrix id: set-matrix working-directory: tools env: - CHANGED_FILES: ${{ toJSON(steps.get-changes.outputs.all_changed_and_modified_files) }} + CHANGED_FILES: ${{ steps.get-changes.outputs.all_changed_and_modified_files }} LAST_FAILED_JOBS: ${{ steps.get-last-commit-with-checks.outputs.checkruns }} run: python3 -u ci_set_matrix.py diff --git a/tools/ci_set_matrix.py b/tools/ci_set_matrix.py index 081cf8d4fa..aeb24b9931 100755 --- a/tools/ci_set_matrix.py +++ b/tools/ci_set_matrix.py @@ -69,7 +69,7 @@ else: changed_files = [] else: print("Using files list in CHANGED_FILES") - changed_files = json.loads(c) + changed_files = json.loads(c.replace("\\", "")) j = os.environ["LAST_FAILED_JOBS"] if j == "": @@ -203,7 +203,7 @@ def set_boards_to_build(build_all): # Split boards by architecture. print("Building boards:") arch_to_boards = {"aarch": [], "arm": [], "riscv": [], "espressif": []} - for board in boards_to_build: + for board in sorted(boards_to_build): print(" ", board) port = board_to_port.get(board) # A board can appear due to its _deletion_ (rare) @@ -220,6 +220,7 @@ def set_boards_to_build(build_all): failed_boards = last_failed_jobs[f"build-{arch}"] for board in failed_boards: if not board in arch_to_boards[arch]: + print(" ", board) arch_to_boards[arch].append(board) # Set Output set_output(f"boards-{arch}", json.dumps(sorted(arch_to_boards[arch]))) From 4856f42f84316910e49701adf263bb7d09680bd9 Mon Sep 17 00:00:00 2001 From: hexthat Date: Fri, 18 Nov 2022 18:28:23 +0000 Subject: [PATCH 74/75] Translated using Weblate (Chinese (Pinyin)) Currently translated at 100.0% (995 of 995 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/zh_Latn/ --- locale/zh_Latn_pinyin.po | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 9178bd4caa..408b785287 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,8 +7,8 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2022-11-15 04:35+0000\n" -"Last-Translator: River Wang \n" +"PO-Revision-Date: 2022-11-19 18:48+0000\n" +"Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" "MIME-Version: 1.0\n" @@ -72,7 +72,7 @@ msgstr "%%c xūyào zhěngshù huòzhě zìfú" #: main.c #, c-format msgid "%02X" -msgstr "" +msgstr "%02X" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format @@ -741,9 +741,8 @@ msgid "Cannot get temperature" msgstr "Wúfǎ huòqǔ wēndù" #: shared-bindings/_bleio/Adapter.c -#, fuzzy msgid "Cannot have scan responses for extended, connectable advertisements." -msgstr "Nín wúfǎ sǎomiáo kuòzhǎn de, kě liánjiē de guǎnggào." +msgstr "Quē fá duì tuī guǎng, kě lián jiē guǎng gào de dá fù." #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot pull on input-only pin." @@ -794,7 +793,7 @@ msgstr "wúfǎ shǐyòng biānyuán huànxǐng, zhǐnéng shǐyòng diànpíng" #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Cannot wake on pin edge. Only level." -msgstr "wúfǎ shǐyòng biānyuán huànxǐng. zhǐnéng shǐyòng diànpíng" +msgstr "wúfǎ shǐyòng biānyuán huànxǐng. zhǐnéng shǐyòng diànpíng." #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "CharacteristicBuffer writing not provided" @@ -864,9 +863,8 @@ msgstr "DAC zhèngzài bèi shǐyòng" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c #: ports/nrf/common-hal/paralleldisplay/ParallelBus.c -#, fuzzy msgid "Data 0 pin must be byte aligned" -msgstr "Shùjù 0 de yǐn jiǎo bìxū shì zì jié duìqí" +msgstr "shù jù 0 yǐn jiǎo bì xū shì zì jié duì qí de" #: shared-module/audiocore/WaveFile.c msgid "Data chunk must follow fmt chunk" @@ -874,9 +872,8 @@ msgstr "Shùjù kuài bìxū zūnxún fmt qū kuài" #: ports/espressif/common-hal/_bleio/Adapter.c #: ports/nrf/common-hal/_bleio/Adapter.c -#, fuzzy msgid "Data not supported with directed advertising" -msgstr "bù zhī chí dìng xiàng guǎng gào de shù jù" +msgstr "wèi xiàng guǎng gào tí gòng zhī zhù de shù jù" #: ports/espressif/common-hal/_bleio/Adapter.c #: ports/nrf/common-hal/_bleio/Adapter.c @@ -2186,7 +2183,7 @@ msgstr "UART xiě rù" #: main.c msgid "UID:" -msgstr "" +msgstr "UID:" #: shared-module/usb_hid/Device.c msgid "USB busy" From 40d35e9eaa764335cbac1f71134914df313ec1eb Mon Sep 17 00:00:00 2001 From: s-ol Date: Sun, 20 Nov 2022 16:08:00 +0100 Subject: [PATCH 75/75] Don't block in I2CTarget.request(-1) Partially reverts #6985 Closes #7241 --- shared-bindings/i2ctarget/I2CTarget.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shared-bindings/i2ctarget/I2CTarget.c b/shared-bindings/i2ctarget/I2CTarget.c index 4dc5b775f4..17da952118 100644 --- a/shared-bindings/i2ctarget/I2CTarget.c +++ b/shared-bindings/i2ctarget/I2CTarget.c @@ -159,7 +159,7 @@ STATIC mp_obj_t i2ctarget_i2c_target_request(size_t n_args, const mp_obj_t *pos_ bool forever = false; uint64_t timeout_end = 0; - if (timeout_ms <= 0) { + if (timeout_ms == 0) { forever = true; } else if (timeout_ms > 0) { timeout_end = common_hal_time_monotonic_ms() + timeout_ms;