12 Commits

Author SHA1 Message Date
0ce0b51f1c Add battery charger, PCB rev 1
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m18s
Check code formatting / Check-C-Format (push) Successful in 53m0s
Check code formatting / Check-Python-Flake8 (push) Successful in 10s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
Run pytests / Check-Pytest (push) Successful in 10s
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2025-09-02 22:17:59 +02:00
e33fefc552 Merge pull request 'add-pytest-infrastructure' (#38) from add-pytest-infrastructure into main
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m20s
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
Run pytests / Check-Pytest (push) Successful in 10s
Reviewed-on: #38
Reviewed-by: Stefan Kratochwil <kratochwil-la@gmx.de>
2025-08-28 15:37:09 +00:00
95b3924736 ci: flake8 on all python folders; Run pytest in CI
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m20s
Check code formatting / Check-C-Format (push) Successful in 6s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
Run pytests / Check-Pytest (push) Successful in 10s
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2025-08-27 13:43:12 +02:00
27110b7b62 Add infrastructure for pytest and mypy
Make mypy run with proper type stubs for micropython RP2.
Add basic structure for pytest testing.

Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2025-08-27 13:42:08 +02:00
fb36ac8ed2 Merge pull request 'Switch btree to use mpy stack' (#37) from btree-use-mpy-stack into main
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 4m12s
Check code formatting / Check-C-Format (push) Successful in 6s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
Reviewed-on: #37
Reviewed-by: Stefan Kratochwil <kratochwil-la@gmx.de>
2025-08-27 11:30:05 +00:00
4c7ce78201 Switch btree to use mpy stack
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m23s
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
2025-08-24 17:51:35 +02:00
10de110375 Merge remote-tracking branch 'origin/feature/upgrade_micropython_1_26_0_plus_fixes'
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m21s
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
2025-08-24 17:47:30 +02:00
5c2df891d9 micropython: upgrade to 1.26.0, reverted single commit.
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m21s
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 8s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 7s
Migrated all patches from the previous version.

A change in the Findpicotool.cmake script in the pico-sdk led to a
downgrade of picotool, which incorporated mbedtls into the build, which
itself is not buildable with cmake versions < 3.5.

The commit which made this isolated change was reverted. Future versions
of micropython will use pico-sdk 2.2.0 or newer, where this problem is
fixed, and picotool is pinned to a release version.
2025-08-24 17:43:26 +02:00
e72443ff1f Merge pull request 'misc-minor-fixes' (#35) from misc-minor-fixes into main
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m23s
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 4s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
Reviewed-on: #35
Reviewed-by: Stefan Kratochwil <kratochwil-la@gmx.de>
2025-08-24 15:36:59 +00:00
3f0eeb837a micropython: Increase micropython stack allocation
All checks were successful
Build RPi Pico firmware image / Build-Firmware (push) Successful in 3m18s
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Check code formatting / Check-Bash-Shellcheck (push) Successful in 5s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2025-08-23 12:54:04 +02:00
3bd81f01e2 rp2_sd: Increase write timeout
Some SD cards seem to need a bit more time...
2025-08-20 19:51:07 +02:00
6f155ebb55 audiocore: Fix small race window in get_fifo_read_value_blocking
In theory, the FIFO interrupt could occur after getting the
fifo_read_value and reenabling interrupts, but before __wfi is called,
causing a deadlock. Fix this by calling __wfi with interrupts still
disabled. It will return immediately if an interrupt is pending.

Add two __nop to ensure that the CPU has enough instructions between
enabling interrupts and disabling them again at the top of the loop.

Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2025-08-20 19:50:51 +02:00
29 changed files with 22614 additions and 535 deletions

View File

@@ -25,8 +25,11 @@ jobs:
path: git
- name: Check python
run: |
cd git/software/src &&
find . -iname '*.py' -exec ../../../flake-venv/bin/flake8 {} +
cd git/software && (
find src -iname '*.py' -exec ../../flake-venv/bin/flake8 {} +
find tests -iname '*.py' -exec ../../flake-venv/bin/flake8 {} +
find modules -iname '*.py' -exec ../../flake-venv/bin/flake8 {} +
)
Check-Bash-Shellcheck:
runs-on: ubuntu-22.04-full
steps:

View File

@@ -0,0 +1,24 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2025 Matthias Blankertz <matthias@blankertz.org>
---
name: Run pytests
"on":
push:
jobs:
Check-Pytest:
runs-on: ubuntu-22.04-full
steps:
- name: Check out repository code
uses: actions/checkout@v4
with:
path: git
- name: Get dependencies
run: |
python -m venv test-venv
test-venv/bin/pip install -r git/software/tests/requirements.txt
- name: Run pytest
run: |
. test-venv/bin/activate &&
cd git/software &&
pytest

3
.gitignore vendored
View File

@@ -3,6 +3,9 @@ hardware/tonberry-pico/tonberry-pico-backups/
*.kicad_sch-bak
*.kicad_sch.lck
software/build
software/typings
compile_commands.json
.dir-locals.el
.cache
\#*#
__pycache__

11
DEVELOP.md Normal file
View File

@@ -0,0 +1,11 @@
# Developer notes
## How to setup python environment for mypy and pytest
```bash
cd software
python -m venv test-venv
. test-venv/bin/activate
pip install -r tests/requirements.txt
pip install -U micropython-rp2-pico_w-stubs --target typings
```

View File

@@ -0,0 +1,443 @@
(footprint "AZ_Delivery_RC522"
(version 20241229)
(generator "pcbnew")
(generator_version "9.0")
(layer "F.Cu")
(descr "Through hole straight socket strip, 1x08, 2.54mm pitch, single row (from Kicad 4.0.7), script generated")
(tags "Through hole socket strip THT 1x08 2.54mm single row")
(property "Reference" "REF**"
(at 0 -2.77 0)
(layer "F.SilkS")
(uuid "a34ef152-6377-4c69-9f9a-fb0a9cbaaa0f")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(property "Value" "AZ_Delivery_RC522"
(at -1.9 11.03 0)
(layer "F.Fab")
(uuid "eb0c6019-b136-4812-894a-851e8bd21756")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(property "Datasheet" ""
(at 0 0 0)
(layer "F.Fab")
(hide yes)
(uuid "2d28acfc-38d9-483d-a1f6-5b4a7c5c5208")
(effects
(font
(size 1.27 1.27)
(thickness 0.15)
)
)
)
(property "Description" ""
(at 0 0 0)
(layer "F.Fab")
(hide yes)
(uuid "d9f04e4e-c6ea-48a4-82e1-9fd680507783")
(effects
(font
(size 1.27 1.27)
(thickness 0.15)
)
)
)
(attr through_hole)
(fp_line
(start -1.33 1.27)
(end -1.33 19.11)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "5c816ce7-1e16-4fef-8a94-56ce4f336409")
)
(fp_line
(start -1.33 1.27)
(end 1.33 1.27)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "31cfc545-00ec-41d5-a909-28f51668cbb9")
)
(fp_line
(start -1.33 19.11)
(end 1.33 19.11)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "6fdb9624-459f-42e6-8474-8476e3e73a19")
)
(fp_line
(start 0 -1.33)
(end 1.33 -1.33)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "673bcfad-3a7d-4a5b-ae2e-68bfc3cb0212")
)
(fp_line
(start 1.33 -1.33)
(end 1.33 0)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "596a7cf5-b26a-4237-9ea9-a0b83ce26be7")
)
(fp_line
(start 1.33 1.27)
(end 1.33 19.11)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "dd0a885d-9fe0-46b4-a266-a488d8626717")
)
(fp_rect
(start -1.9 -9.5)
(end 58.1 30.5)
(stroke
(width 0.1524)
(type solid)
)
(fill no)
(layer "F.SilkS")
(uuid "8f986849-0666-4030-885e-2108faf1da15")
)
(fp_line
(start -1.8 -1.8)
(end 1.75 -1.8)
(stroke
(width 0.05)
(type solid)
)
(layer "F.CrtYd")
(uuid "446aed1d-b80f-4b30-b956-5f8297a19941")
)
(fp_line
(start -1.8 19.55)
(end -1.8 -1.8)
(stroke
(width 0.05)
(type solid)
)
(layer "F.CrtYd")
(uuid "22ebe2a7-8b67-47c2-bdf8-cdb4cd9951cf")
)
(fp_line
(start 1.75 -1.8)
(end 1.75 19.55)
(stroke
(width 0.05)
(type solid)
)
(layer "F.CrtYd")
(uuid "fe065b5b-3b98-4eb6-bb1d-7dc77992767f")
)
(fp_line
(start 1.75 19.55)
(end -1.8 19.55)
(stroke
(width 0.05)
(type solid)
)
(layer "F.CrtYd")
(uuid "3e9ed458-acaf-44bb-9c22-6291112f2c8b")
)
(fp_circle
(center 13.75 -7.02)
(end 16.29 -7.02)
(stroke
(width 0.05)
(type solid)
)
(fill no)
(layer "F.CrtYd")
(uuid "b0fc3695-90f5-41e7-8964-ebecbadeaa08")
)
(fp_circle
(center 13.75 27.98)
(end 16.29 27.98)
(stroke
(width 0.05)
(type solid)
)
(fill no)
(layer "F.CrtYd")
(uuid "37ebb819-cba1-4d26-8219-ba4fc5e3d318")
)
(fp_circle
(center 51.25 -2.22)
(end 53.79 -2.22)
(stroke
(width 0.05)
(type solid)
)
(fill no)
(layer "F.CrtYd")
(uuid "c91279d4-19e9-4d6b-82e4-3abaf6c9450a")
)
(fp_circle
(center 51.25 23.63)
(end 53.79 23.63)
(stroke
(width 0.05)
(type solid)
)
(fill no)
(layer "F.CrtYd")
(uuid "49613ec7-c049-4577-95b9-7914f2d0eeb3")
)
(fp_line
(start -1.27 -1.27)
(end 0.635 -1.27)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "2a668cbf-d67d-4e90-af33-7fe4d2a9e9d2")
)
(fp_line
(start -1.27 19.05)
(end -1.27 -1.27)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "063425b4-bc99-4269-a589-b598140b14bf")
)
(fp_line
(start 0.635 -1.27)
(end 1.27 -0.635)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "a5b3e0e3-31ba-4ee4-a261-36ed072fb6d3")
)
(fp_line
(start 1.27 -0.635)
(end 1.27 19.05)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "626e075f-5f87-420e-9637-1a7362632a52")
)
(fp_line
(start 1.27 19.05)
(end -1.27 19.05)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "92009a7e-4398-40ed-8894-3370eb975c50")
)
(fp_text user "keep out"
(at 29 9 0)
(unlocked yes)
(layer "Dwgs.User")
(uuid "1b8c2096-cda5-41b5-8771-3eac90083181")
(effects
(font
(size 1 1)
(thickness 0.15)
)
(justify left bottom)
)
)
(fp_text user "Antenna"
(at 29 7.5 0)
(unlocked yes)
(layer "Dwgs.User")
(uuid "1b984db0-349b-4503-b267-9f2bd33cff0c")
(effects
(font
(size 1 1)
(thickness 0.15)
)
(justify left bottom)
)
)
(fp_text user "${REFERENCE}"
(at 0 8.89 90)
(layer "F.Fab")
(uuid "1781e910-89a3-48c8-8888-4f06a0dd2fdc")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(pad "" np_thru_hole circle
(at 13.75 -7.02)
(size 3.2 3.2)
(drill 3.2)
(layers "F&B.Cu" "*.Mask")
(uuid "7c71dc53-c556-469e-a5bc-b4c067525bc5")
)
(pad "" np_thru_hole circle
(at 13.75 27.98)
(size 3.2 3.2)
(drill 3.2)
(layers "F&B.Cu" "*.Mask")
(uuid "23726452-e50f-490c-a39e-a24c479dbdd3")
)
(pad "" np_thru_hole circle
(at 51.25 -2.22)
(size 3.2 3.2)
(drill 3.2)
(layers "F&B.Cu" "*.Mask")
(uuid "e3c5ee74-770a-46e8-910d-a5bf1769975b")
)
(pad "" np_thru_hole circle
(at 51.25 23.63)
(size 3.2 3.2)
(drill 3.2)
(layers "F&B.Cu" "*.Mask")
(uuid "d92ad159-9fb8-4328-a573-b78abcdc471f")
)
(pad "1" thru_hole rect
(at 0 0)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "cb8ff318-d964-4ff3-93e9-18ed02ecc716")
)
(pad "2" thru_hole circle
(at 0 2.54)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "171fee8a-00a9-4f1b-bee2-5dc44fbef460")
)
(pad "3" thru_hole circle
(at 0 5.08)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "ff79db69-5af0-439a-b402-c1c0dc0f6a5d")
)
(pad "4" thru_hole circle
(at 0 7.62)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "59f1cdf4-9788-48e6-8ac6-11fe687d19a6")
)
(pad "5" thru_hole circle
(at 0 10.16)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "02a680e0-7902-4b9b-97d5-04111a6ad630")
)
(pad "6" thru_hole circle
(at 0 12.7)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "ea4d2b35-79b2-4d5d-8abe-b0d0675a2a70")
)
(pad "7" thru_hole circle
(at 0 15.24)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "c0db5362-fdbd-4784-9c33-469f195ac9af")
)
(pad "8" thru_hole circle
(at 0 17.78)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "adabdc0d-c196-4362-98fc-523b0680144d")
)
(zone
(net 0)
(net_name "")
(layers "F.Cu" "B.Cu")
(uuid "5e845900-288e-4f42-a8ac-c20c1cc0aa41")
(name "Antenna")
(hatch edge 0.5)
(connect_pads
(clearance 0)
)
(min_thickness 0.25)
(filled_areas_thickness no)
(keepout
(tracks not_allowed)
(vias not_allowed)
(pads not_allowed)
(copperpour not_allowed)
(footprints not_allowed)
)
(placement
(enabled no)
(sheetname "")
)
(fill
(thermal_gap 0.5)
(thermal_bridge_width 0.5)
)
(polygon
(pts
(xy 58.1 -9.5) (xy 15.5 -9.5) (xy 15.5 30.5) (xy 58.1 30.5)
)
)
)
(group ""
(uuid "72a71035-0d89-4c39-b4c6-1fefc66807fa")
(members "23726452-e50f-490c-a39e-a24c479dbdd3" "37ebb819-cba1-4d26-8219-ba4fc5e3d318"
"49613ec7-c049-4577-95b9-7914f2d0eeb3" "7c71dc53-c556-469e-a5bc-b4c067525bc5"
"8f986849-0666-4030-885e-2108faf1da15" "b0fc3695-90f5-41e7-8964-ebecbadeaa08"
"c91279d4-19e9-4d6b-82e4-3abaf6c9450a" "d92ad159-9fb8-4328-a573-b78abcdc471f"
"e3c5ee74-770a-46e8-910d-a5bf1769975b" "eb0c6019-b136-4812-894a-851e8bd21756"
)
)
(embedded_fonts no)
(model "${KICAD9_3DMODEL_DIR}/Connector_PinSocket_2.54mm.3dshapes/PinSocket_1x08_P2.54mm_Vertical.step"
(offset
(xyz 0 0 0)
)
(scale
(xyz 1 1 1)
)
(rotate
(xyz 0 0 0)
)
)
)

View File

@@ -0,0 +1,355 @@
(footprint "Adafruit_bq25185"
(version 20241229)
(generator "pcbnew")
(generator_version "9.0")
(layer "F.Cu")
(descr "Through hole straight socket strip, 1x07, 2.54mm pitch, single row (from Kicad 4.0.7), script generated")
(tags "Through hole socket strip THT 1x07 2.54mm single row")
(property "Reference" "REF**"
(at 0 -8.255 0)
(layer "F.SilkS")
(uuid "6e575542-8fac-4808-b8c9-ded669296d0d")
(effects
(font
(size 1.016 1.016)
(thickness 0.1524)
)
)
)
(property "Value" "Adafruit_bq25185"
(at -3.81 23.495 0)
(layer "F.Fab")
(uuid "86edab5c-7f9d-4119-b32b-b12277ace150")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(property "Datasheet" ""
(at 0 0 0)
(layer "F.Fab")
(hide yes)
(uuid "178de254-c544-4662-881b-f069a6a8f6a5")
(effects
(font
(size 1.27 1.27)
(thickness 0.15)
)
)
)
(property "Description" ""
(at 0 0 0)
(layer "F.Fab")
(hide yes)
(uuid "66b522fa-0a20-4d7b-9c1c-01db271771b4")
(effects
(font
(size 1.27 1.27)
(thickness 0.15)
)
)
)
(attr through_hole)
(fp_line
(start -1.33 15.24)
(end -1.33 -2.54)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "aca72a9b-9330-4c35-bf1b-82d487a9447f")
)
(fp_line
(start -1.33 17.78)
(end -1.33 16.51)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "518da0df-6fd0-4f31-af5f-48e331dc849c")
)
(fp_line
(start 1.33 15.24)
(end -1.33 15.24)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "e4083416-4300-4fb2-b50c-b38793ec4834")
)
(fp_line
(start 1.33 15.24)
(end 1.33 -2.54)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "9b378274-151c-4b84-ae74-fca52b0e1635")
)
(fp_rect
(start -16.51 -6.985)
(end 2.54 22.225)
(stroke
(width 0.1524)
(type solid)
)
(fill no)
(layer "F.SilkS")
(uuid "07d7f04c-4960-4dfe-92c3-4d957a4244ce")
)
(fp_line
(start -1.8 -1.8)
(end -1.799999 -2.652907)
(stroke
(width 0.05)
(type default)
)
(layer "F.CrtYd")
(uuid "4452e51e-0893-4b70-92fd-70f0b54ced32")
)
(fp_line
(start -1.778371 17.931627)
(end -1.8 -1.8)
(stroke
(width 0.05)
(type solid)
)
(layer "F.CrtYd")
(uuid "9f38d32c-752e-406c-81c2-56a23e2124ab")
)
(fp_line
(start 1.75 -1.8)
(end 1.75 -2.604051)
(stroke
(width 0.05)
(type default)
)
(layer "F.CrtYd")
(uuid "355fe774-8482-4f16-ae08-c09c0defb5e5")
)
(fp_line
(start 1.75 -1.8)
(end 1.778373 17.931628)
(stroke
(width 0.05)
(type solid)
)
(layer "F.CrtYd")
(uuid "f10f2b1d-14a2-4182-8823-7cb2b08a980c")
)
(fp_arc
(start -1.8 -2.652908)
(mid 0.034954 -6.984758)
(end 1.75 -2.604051)
(stroke
(width 0.05)
(type default)
)
(layer "F.CrtYd")
(uuid "f25457eb-8a07-4acd-907f-7cd787994a5c")
)
(fp_arc
(start 1.778373 17.931627)
(mid 0 22.224999)
(end -1.778373 17.931627)
(stroke
(width 0.05)
(type default)
)
(layer "F.CrtYd")
(uuid "b284c369-20df-4fe6-a2a0-f28fcc3b58d6")
)
(fp_circle
(center -13.97 -4.42)
(end -16.485 -4.42)
(stroke
(width 0.05)
(type default)
)
(fill no)
(layer "F.CrtYd")
(uuid "bd44fb04-efc3-4813-ad81-2f8b403680df")
)
(fp_circle
(center -13.97 19.71)
(end -16.485 19.71)
(stroke
(width 0.05)
(type default)
)
(fill no)
(layer "F.CrtYd")
(uuid "cf8bdd37-9205-40af-8a51-17c2a30f9014")
)
(fp_line
(start -1.27 -2.501639)
(end 1.27 -2.501639)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "7afbc36b-dc93-48ce-b6e3-213a0cc77565")
)
(fp_line
(start -1.27 17.145)
(end -1.27 -2.501639)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "2c7bc528-2d0c-40c9-9e97-d56236d26fe6")
)
(fp_line
(start -0.635 17.78)
(end -1.27 17.145)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "a12a655f-03d7-4c2a-87ca-b0238aca19c3")
)
(fp_line
(start 1.27 -2.501639)
(end 1.27 17.78)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "7a7136ae-feda-4d2a-9391-81bb7d3312d2")
)
(fp_line
(start 1.27 17.78)
(end -0.635 17.78)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "c13c8715-e3c4-4d03-8849-e2a1e26d40a1")
)
(fp_text user "${REFERENCE}"
(at -2.54 12.7 270)
(layer "F.Fab")
(uuid "a8c74cf2-2d56-4366-b45f-d04e448ebc72")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(pad "" np_thru_hole circle
(at -13.97 -4.445)
(size 2.54 2.54)
(drill 2.54)
(layers "F&B.Cu" "*.Mask")
(uuid "356e8d03-c3ad-4b24-bf9f-f35de4f1636d")
)
(pad "" np_thru_hole circle
(at -13.97 19.685)
(size 2.54 2.54)
(drill 2.54)
(layers "F&B.Cu" "*.Mask")
(uuid "c342310e-eb02-4174-9d9c-eb95934aebf5")
)
(pad "" np_thru_hole circle
(at 0 -4.445)
(size 2.54 2.54)
(drill 2.54)
(layers "F&B.Cu" "*.Mask")
(uuid "6306c281-706a-4b36-9e39-5aa956be2d80")
)
(pad "" np_thru_hole circle
(at 0 19.685)
(size 2.54 2.54)
(drill 2.54)
(layers "F&B.Cu" "*.Mask")
(uuid "d01f277d-a18c-4fb7-8bce-ad82f53d5330")
)
(pad "1" thru_hole rect
(at 0 16.51 180)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "9c199252-bdac-484c-a687-6b4ef26cc3e6")
)
(pad "2" thru_hole circle
(at 0 13.97 180)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "be025cc7-4905-4574-955b-178576ccc1cc")
)
(pad "3" thru_hole circle
(at 0 11.43 180)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "e46efbed-3393-457c-95ba-f30245b6478b")
)
(pad "4" thru_hole circle
(at 0 8.89 180)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "5bb680ed-7bca-4b4a-852d-e6849574c8a6")
)
(pad "5" thru_hole circle
(at 0 6.35 180)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "59961279-9785-4a81-948d-7855e0e08516")
)
(pad "6" thru_hole circle
(at 0 3.81 180)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "eda46f52-d12e-47b7-951c-bc4005bc694e")
)
(pad "7" thru_hole circle
(at 0 1.27 180)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "2cb79b81-6688-44c2-92c7-e75f5df30e91")
)
(pad "8" thru_hole circle
(at 0 -1.27 180)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "b2d6f12f-bf69-4a9b-a3e9-164231e4f483")
)
(embedded_fonts no)
(model "${KICAD9_3DMODEL_DIR}/Connector_PinSocket_2.54mm.3dshapes/PinSocket_1x07_P2.54mm_Vertical.step"
(offset
(xyz 0 0 0)
)
(scale
(xyz 1 1 1)
)
(rotate
(xyz 0 0 0)
)
)
)

View File

@@ -0,0 +1,381 @@
(footprint "Sparkfun_MAX98357A"
(version 20241229)
(generator "pcbnew")
(generator_version "9.0")
(layer "F.Cu")
(descr "Through hole straight socket strip, 1x07, 2.54mm pitch, single row (from Kicad 4.0.7), script generated")
(tags "Through hole socket strip THT 1x07 2.54mm single row")
(property "Reference" "REF**"
(at 0 -3.556 0)
(layer "F.SilkS")
(uuid "2656f117-ae27-4bd8-a9c3-f25e38d25a50")
(effects
(font
(size 1.016 1.016)
(thickness 0.1524)
)
)
)
(property "Value" "Sparkfun_MAX98357A"
(at 0 18.01 0)
(layer "F.Fab")
(uuid "e7891e54-c3b2-4045-b729-ec1b29005170")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(property "Datasheet" ""
(at 0 0 0)
(layer "F.Fab")
(hide yes)
(uuid "aab68a41-9b58-43f5-b6ed-218d51a35c21")
(effects
(font
(size 1.27 1.27)
(thickness 0.15)
)
)
)
(property "Description" ""
(at 0 0 0)
(layer "F.Fab")
(hide yes)
(uuid "d5308824-df7c-46bf-b6ad-dfc407c4cafc")
(effects
(font
(size 1.27 1.27)
(thickness 0.15)
)
)
)
(attr through_hole)
(fp_line
(start -1.33 -2.54)
(end 19.05 -2.54)
(stroke
(width 0.1524)
(type solid)
)
(layer "F.SilkS")
(uuid "a225c96b-f88a-46ab-8898-d5a961a69e4d")
)
(fp_line
(start -1.33 1.27)
(end -1.33 -2.54)
(stroke
(width 0.1524)
(type solid)
)
(layer "F.SilkS")
(uuid "d9e35813-ad57-481a-bd0f-e96849b81f42")
)
(fp_line
(start -1.33 1.27)
(end -1.33 16.57)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "acaab1d6-f4d6-4ae2-98ff-f3ba2e3cd533")
)
(fp_line
(start -1.33 1.27)
(end 1.33 1.27)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "c2228c31-a76f-4f6c-8dac-e47a00dd4a83")
)
(fp_line
(start -1.33 16.57)
(end 1.33 16.57)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "4067195c-1874-47b5-b0f1-8f78aa17f1fb")
)
(fp_line
(start -1.27 17.78)
(end -1.27 16.57)
(stroke
(width 0.1524)
(type solid)
)
(layer "F.SilkS")
(uuid "b5f022f0-b8d1-4bd3-b372-d667aa83852e")
)
(fp_line
(start 0 -1.33)
(end 1.33 -1.33)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "3672f0c4-cfd3-4ed8-a916-26b23e299b5c")
)
(fp_line
(start 1.33 -1.33)
(end 1.33 0)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "e8fb0117-396a-4d0e-92dd-8c1cd555e5c6")
)
(fp_line
(start 1.33 1.27)
(end 1.33 16.57)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "1ac1a480-cb45-4327-a825-2b9d92cf5a54")
)
(fp_line
(start 19.05 -2.54)
(end 19.05 17.78)
(stroke
(width 0.1524)
(type solid)
)
(layer "F.SilkS")
(uuid "51996aa9-4796-4afe-9489-c6b28405d249")
)
(fp_line
(start 19.05 17.78)
(end -1.27 17.78)
(stroke
(width 0.1524)
(type solid)
)
(layer "F.SilkS")
(uuid "18391d8a-34f3-4119-86e5-c63f37e37070")
)
(fp_line
(start -1.8 -1.8)
(end 1.75 -1.8)
(stroke
(width 0.05)
(type solid)
)
(layer "F.CrtYd")
(uuid "858f249c-fdd9-466b-b8a1-4dd799afef6b")
)
(fp_line
(start -1.8 17)
(end -1.8 -1.8)
(stroke
(width 0.05)
(type solid)
)
(layer "F.CrtYd")
(uuid "1d1e798f-8b02-4758-b297-16af69eea697")
)
(fp_line
(start 1.75 -1.8)
(end 1.75 17)
(stroke
(width 0.05)
(type solid)
)
(layer "F.CrtYd")
(uuid "43d35c9f-6401-4fe4-80f8-4316968255a0")
)
(fp_line
(start 1.75 17)
(end -1.8 17)
(stroke
(width 0.05)
(type solid)
)
(layer "F.CrtYd")
(uuid "35349e7d-9f0b-4de6-b84b-46bf4473917f")
)
(fp_circle
(center 15.875 0.635)
(end 18.415 0.635)
(stroke
(width 0.05)
(type default)
)
(fill no)
(layer "F.CrtYd")
(uuid "dfaa1b74-8adb-43a3-83c0-f701d5acdf69")
)
(fp_circle
(center 15.875 14.605)
(end 18.415 14.605)
(stroke
(width 0.05)
(type default)
)
(fill no)
(layer "F.CrtYd")
(uuid "b6741d2d-655e-4405-bdec-635bf83d8ad5")
)
(fp_line
(start -1.27 -1.27)
(end 0.635 -1.27)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "37e9acde-12d2-4319-a282-cdf2fdbe341a")
)
(fp_line
(start -1.27 16.51)
(end -1.27 -1.27)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "56075374-a1e4-485e-b882-8e4cce7262d5")
)
(fp_line
(start 0.635 -1.27)
(end 1.27 -0.635)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "b0ddd3e4-2153-4cae-8cb5-d50cbfc8f47e")
)
(fp_line
(start 1.27 -0.635)
(end 1.27 16.51)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "2c20ee51-27de-4f59-83a5-2a2f58df65fb")
)
(fp_line
(start 1.27 16.51)
(end -1.27 16.51)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "d6de62ad-e175-43b9-85c8-340c8ab61fbc")
)
(fp_rect
(start -1.3716 -2.6416)
(end 19.1516 17.8816)
(stroke
(width 0.05)
(type solid)
)
(fill no)
(layer "F.Fab")
(uuid "6931ddba-5c8b-4684-9522-4250e5a9daf6")
)
(fp_text user "${REFERENCE}"
(at 0 7.62 90)
(layer "F.Fab")
(uuid "d0f4c06e-6fb2-4a19-9b48-8ad674e44ff7")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(pad "" np_thru_hole circle
(at 15.875 0.635)
(size 3.2 3.2)
(drill 3.2)
(layers "F&B.Cu" "*.Mask")
(uuid "71993a8f-c48d-437a-8a3c-3e63eb969208")
)
(pad "" np_thru_hole circle
(at 15.875 14.605)
(size 3.2 3.2)
(drill 3.2)
(layers "F&B.Cu" "*.Mask")
(uuid "ed9c8b97-5d58-4937-959a-98150878726c")
)
(pad "1" thru_hole rect
(at 0 0)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "1c83ddd7-1eb1-4a63-97b8-8cad20ed8adb")
)
(pad "2" thru_hole circle
(at 0 2.54)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "4b5aedc5-52ef-4559-9513-4cfe7a9290f5")
)
(pad "3" thru_hole circle
(at 0 5.08)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "d2e33fa3-db5c-4923-b9dd-22f0a7d95420")
)
(pad "4" thru_hole circle
(at 0 7.62)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "769680bd-a4f8-488a-9497-b63b5c793581")
)
(pad "5" thru_hole circle
(at 0 10.16)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "995ea8f5-e63f-41d7-93fe-dc90eacb16c7")
)
(pad "6" thru_hole circle
(at 0 12.7)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "3060d1e5-b1f1-47ad-9a39-6410cc4f3629")
)
(pad "7" thru_hole circle
(at 0 15.24)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "8651b2dd-3cf3-4c82-aa1a-ccc59e2c1675")
)
(embedded_fonts no)
(model "${KICAD9_3DMODEL_DIR}/Connector_PinSocket_2.54mm.3dshapes/PinSocket_1x07_P2.54mm_Vertical.step"
(offset
(xyz 0 0 0)
)
(scale
(xyz 1 1 1)
)
(rotate
(xyz 0 0 0)
)
)
)

View File

@@ -0,0 +1,306 @@
(footprint "Sparkfun_MicroSD_Breakout"
(version 20241229)
(generator "pcbnew")
(generator_version "9.0")
(layer "F.Cu")
(descr "Through hole straight socket strip, 1x07, 2.54mm pitch, single row (from Kicad 4.0.7), script generated")
(tags "Through hole socket strip THT 1x07 2.54mm single row")
(property "Reference" "REF**"
(at 0 -3.81 0)
(layer "F.SilkS")
(uuid "2649026f-8664-4aec-9bb7-08c001d0263d")
(effects
(font
(size 1.016 1.016)
(thickness 0.1524)
)
)
)
(property "Value" "Sparkfun_MicroSD_Breakout"
(at -8.255 19.05 0)
(layer "F.Fab")
(uuid "befe8006-9d37-47c5-9cb4-916482040426")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(property "Datasheet" ""
(at 0 0 0)
(layer "F.Fab")
(hide yes)
(uuid "bda792b3-ed8e-4973-9481-8397712eba90")
(effects
(font
(size 1.27 1.27)
(thickness 0.15)
)
)
)
(property "Description" ""
(at 0 0 0)
(layer "F.Fab")
(hide yes)
(uuid "2b01e065-879a-4a28-815b-34368d12b6af")
(effects
(font
(size 1.27 1.27)
(thickness 0.15)
)
)
)
(attr through_hole)
(fp_line
(start -1.33 1.27)
(end -1.33 16.57)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "c581ca6d-5026-479b-93ae-7bad6b62ddd9")
)
(fp_line
(start -1.33 1.27)
(end 1.33 1.27)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "d49fc77d-4bea-4acf-adb5-43551cb508f1")
)
(fp_line
(start -1.33 16.57)
(end 1.33 16.57)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "fa1edbcf-d278-4f63-83db-6cdbef0fe0fb")
)
(fp_line
(start 0 -1.33)
(end 1.33 -1.33)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "466d8a50-67a4-4117-b2ef-fd8fa3c112f8")
)
(fp_line
(start 1.33 -1.33)
(end 1.33 0)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "cc6f4d87-5f66-4c7a-b151-a392aa8f66ed")
)
(fp_line
(start 1.33 1.27)
(end 1.33 16.57)
(stroke
(width 0.12)
(type solid)
)
(layer "F.SilkS")
(uuid "dc1b7dd4-ca53-4049-ae81-eb11216e81d9")
)
(fp_rect
(start -20.574 -2.794)
(end 1.778 18.034)
(stroke
(width 0.1524)
(type solid)
)
(fill no)
(layer "F.SilkS")
(uuid "0af85dea-fde2-4a4a-83d8-7c1dc2a9aafa")
)
(fp_line
(start -1.8 -1.8)
(end 1.75 -1.8)
(stroke
(width 0.05)
(type solid)
)
(layer "F.CrtYd")
(uuid "abe8217b-b617-4a57-8b1b-aaad9a1a9408")
)
(fp_line
(start -1.8 17)
(end -1.8 -1.8)
(stroke
(width 0.05)
(type solid)
)
(layer "F.CrtYd")
(uuid "f6453894-baf7-4501-8b5d-b696bc45df5b")
)
(fp_line
(start 1.75 -1.8)
(end 1.75 17)
(stroke
(width 0.05)
(type solid)
)
(layer "F.CrtYd")
(uuid "9c21be3b-ef13-48a3-a28c-f5586af79a94")
)
(fp_line
(start 1.75 17)
(end -1.8 17)
(stroke
(width 0.05)
(type solid)
)
(layer "F.CrtYd")
(uuid "27ab22be-40bf-42f8-a30e-00bb317bcedd")
)
(fp_line
(start -1.27 -1.27)
(end 0.635 -1.27)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "bbaf3582-2515-4a48-ac3f-6c1eac7a9c7a")
)
(fp_line
(start -1.27 16.51)
(end -1.27 -1.27)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "7ba01148-ed5c-4058-bbbe-f7586e6b0fe3")
)
(fp_line
(start 0.635 -1.27)
(end 1.27 -0.635)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "449b7ca7-e50d-486c-95c9-ec3b9328d1e9")
)
(fp_line
(start 1.27 -0.635)
(end 1.27 16.51)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "a8fe924f-576e-43f4-bdbd-bede8f50e4a9")
)
(fp_line
(start 1.27 16.51)
(end -1.27 16.51)
(stroke
(width 0.1)
(type solid)
)
(layer "F.Fab")
(uuid "bc826cb1-1f13-4927-b007-dbc4e7bf9119")
)
(fp_rect
(start -20.5105 -2.8575)
(end 1.7145 18.0975)
(stroke
(width 0.1)
(type solid)
)
(fill no)
(layer "F.Fab")
(uuid "ff136a20-1e67-47d3-967e-862544e6261a")
)
(fp_text user "${REFERENCE}"
(at 0 7.62 90)
(layer "F.Fab")
(uuid "c75ce234-326d-4a91-a01c-aa463620f982")
(effects
(font
(size 1 1)
(thickness 0.15)
)
)
)
(pad "1" thru_hole rect
(at 0 0)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "94205f6f-c0ef-4190-8ab9-3ca1f6dfb4f7")
)
(pad "2" thru_hole circle
(at 0 2.54)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "b734434c-14a9-4700-99dc-f466e6509db7")
)
(pad "3" thru_hole circle
(at 0 5.08)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "971175f6-b389-4741-aaaf-0fb15d3e7fff")
)
(pad "4" thru_hole circle
(at 0 7.62)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "dca213e6-9378-4e06-9621-11be8656a233")
)
(pad "5" thru_hole circle
(at 0 10.16)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "c723245c-962a-4ab8-b0e1-229741e9138e")
)
(pad "6" thru_hole circle
(at 0 12.7)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "9b547c20-1f88-4220-82b8-d72f851fb6a1")
)
(pad "7" thru_hole circle
(at 0 15.24)
(size 1.7 1.7)
(drill 1)
(layers "*.Cu" "*.Mask")
(remove_unused_layers no)
(uuid "a588ed23-dbc2-406f-bc1c-3c6e69dd99ee")
)
(embedded_fonts no)
(model "${KICAD9_3DMODEL_DIR}/Connector_PinSocket_2.54mm.3dshapes/PinSocket_1x07_P2.54mm_Vertical.step"
(offset
(xyz 0 0 0)
)
(scale
(xyz 1 1 1)
)
(rotate
(xyz 0 0 0)
)
)
)

View File

@@ -0,0 +1,4 @@
(fp_lib_table
(version 7)
(lib (name "Modules")(type "KiCad")(uri "${KIPRJMOD}/Modules.pretty")(options "")(descr ""))
)

View File

@@ -0,0 +1,28 @@
(version 1)
(rule "Pad to Silkscreen"
(constraint silk_clearance (min 0.15mm))
(layer outer)
(condition "A.Type == 'pad' && (B.Type == 'text' || B.Type == 'graphic')"))
(rule "drill hole size (mechanical)"
(constraint hole_size (min 0.3mm) (max 6.3mm)))
(rule "Minimum Via Hole Size"
(constraint hole_size (min 0.3mm))
(condition "A.Type == 'via'"))
(rule "Minimum Via Diameter"
(constraint via_diameter (min 20mil))
(condition "A.Type == 'via'"))
(rule "PTH Hole Size"
(constraint hole_size (min 12mil) (max 6.35mm))
(condition "A.isPlated()"))
(rule "Minimum Non-plated Hole Size"
(constraint hole_size (min 0.5mm))
(condition "A.Type == 'pad' && !A.isPlated()"))
(rule "Pad to Track clearance"
(constraint clearance (min 0.2mm))
(condition "A.isPlated() && A.Type != 'Via' && B.Type == 'track'"))

File diff suppressed because it is too large Load Diff

View File

@@ -1,10 +1,12 @@
{
"board": {
"active_layer": 0,
"active_layer": 5,
"active_layer_preset": "",
"auto_track_width": true,
"hidden_netclasses": [],
"hidden_nets": [],
"hidden_nets": [
"GND"
],
"high_contrast_mode": 0,
"net_color_mode": 1,
"opacity": {
@@ -63,9 +65,42 @@
"version": 5
},
"net_inspector_panel": {
"col_hidden": [],
"col_order": [],
"col_widths": [],
"col_hidden": [
false,
false,
false,
false,
false,
false,
false,
false,
false,
false
],
"col_order": [
0,
1,
2,
3,
4,
5,
6,
7,
8,
9
],
"col_widths": [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"custom_group_rules": [],
"expanded_rows": [],
"filter_by_net_name": true,
@@ -76,7 +111,7 @@
"show_unconnected_nets": false,
"show_zero_pad_nets": false,
"sort_ascending": true,
"sorting_column": -1
"sorting_column": 0
},
"open_jobsets": [],
"project": {

View File

@@ -2,12 +2,275 @@
"board": {
"3dviewports": [],
"design_settings": {
"defaults": {},
"diff_pair_dimensions": [],
"drc_exclusions": [],
"rules": {},
"track_widths": [],
"via_dimensions": []
"defaults": {
"apply_defaults_to_fp_fields": false,
"apply_defaults_to_fp_shapes": false,
"apply_defaults_to_fp_text": false,
"board_outline_line_width": 0.05,
"copper_line_width": 0.2,
"copper_text_italic": false,
"copper_text_size_h": 1.5,
"copper_text_size_v": 1.5,
"copper_text_thickness": 0.3,
"copper_text_upright": false,
"courtyard_line_width": 0.05,
"dimension_precision": 4,
"dimension_units": 3,
"dimensions": {
"arrow_length": 1270000,
"extension_offset": 500000,
"keep_text_aligned": true,
"suppress_zeroes": true,
"text_position": 0,
"units_format": 0
},
"fab_line_width": 0.1,
"fab_text_italic": false,
"fab_text_size_h": 1.0,
"fab_text_size_v": 1.0,
"fab_text_thickness": 0.15,
"fab_text_upright": false,
"other_line_width": 0.1,
"other_text_italic": false,
"other_text_size_h": 1.0,
"other_text_size_v": 1.0,
"other_text_thickness": 0.15,
"other_text_upright": false,
"pads": {
"drill": 3.2,
"height": 3.2,
"width": 3.2
},
"silk_line_width": 0.1,
"silk_text_italic": false,
"silk_text_size_h": 1.0,
"silk_text_size_v": 1.0,
"silk_text_thickness": 0.1,
"silk_text_upright": false,
"zones": {
"min_clearance": 0.0
}
},
"diff_pair_dimensions": [
{
"gap": 0.0,
"via_gap": 0.0,
"width": 0.0
}
],
"drc_exclusions": [
[
"items_not_allowed|117348000|131000000|4c513f4f-0c90-4a64-b2d1-bf0189c761db|00000000-0000-0000-0000-000000000000",
""
],
[
"items_not_allowed|117348000|131000000|fea7aba8-73c4-4553-8cc8-83472c47a83b|00000000-0000-0000-0000-000000000000",
""
],
[
"items_not_allowed|122420000|136975000|8ffc6a0d-806e-4b99-922f-2baead2bd98b|00000000-0000-0000-0000-000000000000",
""
],
[
"items_not_allowed|148270000|136975000|804b9d74-91fa-4f75-bc54-8f55b801562f|00000000-0000-0000-0000-000000000000",
""
],
[
"items_not_allowed|148720706|136551802|f2c1e20e-a272-42d8-a551-3e9074b96921|00000000-0000-0000-0000-000000000000",
""
],
[
"lib_footprint_mismatch|117348000|41148000|9810a3ba-e3fe-4afe-955a-bea6c56712c1|00000000-0000-0000-0000-000000000000",
""
],
[
"lib_footprint_mismatch|210176000|131198000|bf46a807-edd1-4c31-a613-56c8fe7b1e6b|00000000-0000-0000-0000-000000000000",
""
],
[
"nonmirrored_text_on_back_layer|210811000|131073000|e87ca627-5327-4f7e-ac1a-c1eadd662c0a|00000000-0000-0000-0000-000000000000",
""
],
[
"silk_overlap|115550000|131000000|cd433b4c-40ac-48cc-b03e-5acf3357d88b|fea7aba8-73c4-4553-8cc8-83472c47a83b",
""
]
],
"meta": {
"filename": "board_design_settings.json",
"version": 2
},
"rule_severities": {
"annular_width": "error",
"clearance": "error",
"connection_width": "warning",
"copper_edge_clearance": "error",
"copper_sliver": "warning",
"courtyards_overlap": "error",
"creepage": "error",
"diff_pair_gap_out_of_range": "error",
"diff_pair_uncoupled_length_too_long": "error",
"drill_out_of_range": "error",
"duplicate_footprints": "warning",
"extra_footprint": "warning",
"footprint": "error",
"footprint_filters_mismatch": "ignore",
"footprint_symbol_mismatch": "warning",
"footprint_type_mismatch": "ignore",
"hole_clearance": "error",
"hole_to_hole": "warning",
"holes_co_located": "warning",
"invalid_outline": "error",
"isolated_copper": "warning",
"item_on_disabled_layer": "error",
"items_not_allowed": "error",
"length_out_of_range": "error",
"lib_footprint_issues": "warning",
"lib_footprint_mismatch": "warning",
"malformed_courtyard": "error",
"microvia_drill_out_of_range": "error",
"mirrored_text_on_front_layer": "warning",
"missing_courtyard": "ignore",
"missing_footprint": "warning",
"net_conflict": "warning",
"nonmirrored_text_on_back_layer": "warning",
"npth_inside_courtyard": "ignore",
"padstack": "warning",
"pth_inside_courtyard": "ignore",
"shorting_items": "error",
"silk_edge_clearance": "warning",
"silk_over_copper": "warning",
"silk_overlap": "warning",
"skew_out_of_range": "error",
"solder_mask_bridge": "error",
"starved_thermal": "error",
"text_height": "warning",
"text_on_edge_cuts": "error",
"text_thickness": "warning",
"through_hole_pad_without_hole": "error",
"too_many_vias": "error",
"track_angle": "error",
"track_dangling": "warning",
"track_segment_length": "error",
"track_width": "error",
"tracks_crossing": "error",
"unconnected_items": "error",
"unresolved_variable": "error",
"via_dangling": "warning",
"zones_intersect": "error"
},
"rules": {
"max_error": 0.005,
"min_clearance": 0.2032,
"min_connection": 0.0,
"min_copper_edge_clearance": 0.2,
"min_groove_width": 0.0,
"min_hole_clearance": 0.35,
"min_hole_to_hole": 0.45,
"min_microvia_diameter": 0.2,
"min_microvia_drill": 0.1,
"min_resolved_spokes": 2,
"min_silk_clearance": 0.0,
"min_text_height": 1.0,
"min_text_thickness": 0.15,
"min_through_hole_diameter": 0.3,
"min_track_width": 0.2032,
"min_via_annular_width": 0.15,
"min_via_diameter": 0.5,
"solder_mask_to_copper_clearance": 0.0,
"use_height_for_length_calcs": true
},
"teardrop_options": [
{
"td_onpthpad": true,
"td_onroundshapesonly": false,
"td_onsmdpad": true,
"td_ontrackend": false,
"td_onvia": true
}
],
"teardrop_parameters": [
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_round_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_rect_shape",
"td_width_to_size_filter_ratio": 0.9
},
{
"td_allow_use_two_tracks": true,
"td_curve_segcount": 0,
"td_height_ratio": 1.0,
"td_length_ratio": 0.5,
"td_maxheight": 2.0,
"td_maxlen": 1.0,
"td_on_pad_in_zone": false,
"td_target_name": "td_track_end",
"td_width_to_size_filter_ratio": 0.9
}
],
"track_widths": [
0.0,
0.2032,
0.4064,
0.508
],
"tuning_pattern_settings": {
"diff_pair_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 1.0
},
"diff_pair_skew_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
},
"single_track_defaults": {
"corner_radius_percentage": 80,
"corner_style": 1,
"max_amplitude": 1.0,
"min_amplitude": 0.2,
"single_sided": false,
"spacing": 0.6
}
},
"via_dimensions": [
{
"diameter": 0.0,
"drill": 0.0
},
{
"diameter": 0.6,
"drill": 0.3
},
{
"diameter": 0.8,
"drill": 0.4
}
],
"zones_allow_external_fillets": false
},
"ipc2581": {
"dist": "",
@@ -240,6 +503,7 @@
"single_global_label": "ignore",
"unannotated": "error",
"unconnected_wire_endpoint": "warning",
"undefined_netclass": "error",
"unit_value_mismatch": "error",
"unresolved_variable": "error",
"wire_dangling": "error"
@@ -257,7 +521,7 @@
"classes": [
{
"bus_width": 12,
"clearance": 0.2,
"clearance": 0.1778,
"diff_pair_gap": 0.25,
"diff_pair_via_gap": 0.25,
"diff_pair_width": 0.2,
@@ -268,10 +532,20 @@
"pcb_color": "rgba(0, 0, 0, 0.000)",
"priority": 2147483647,
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.2,
"via_diameter": 0.6,
"via_drill": 0.3,
"track_width": 0.2032,
"via_diameter": 0.8,
"via_drill": 0.4,
"wire_width": 6
},
{
"clearance": 0.1778,
"name": "Power",
"pcb_color": "rgba(0, 0, 0, 0.000)",
"priority": 0,
"schematic_color": "rgba(0, 0, 0, 0.000)",
"track_width": 0.4064,
"via_diameter": 0.8,
"via_drill": 0.4
}
],
"meta": {
@@ -279,14 +553,27 @@
},
"net_colors": null,
"netclass_assignments": null,
"netclass_patterns": []
"netclass_patterns": [
{
"netclass": "Power",
"pattern": "+*"
},
{
"netclass": "Power",
"pattern": "GND"
},
{
"netclass": "Power",
"pattern": "/*BAT"
}
]
},
"pcbnew": {
"last_paths": {
"gencad": "",
"idf": "",
"netlist": "",
"plot": "",
"plot": "pcb_test/",
"pos_files": "",
"specctra_dsn": "",
"step": "",
@@ -347,12 +634,36 @@
"label": "DNP",
"name": "${DNP}",
"show": true
},
{
"group_by": false,
"label": "#",
"name": "${ITEM_NUMBER}",
"show": false
},
{
"group_by": false,
"label": "Description",
"name": "Description",
"show": false
},
{
"group_by": false,
"label": "Sim.Pins",
"name": "Sim.Pins",
"show": false
},
{
"group_by": false,
"label": "Sim.Device",
"name": "Sim.Device",
"show": false
}
],
"filter_string": "",
"group_symbols": true,
"include_excluded_from_bom": false,
"name": "Grouped By Value",
"name": "",
"sort_asc": true,
"sort_field": "Reference"
},

File diff suppressed because it is too large Load Diff

View File

@@ -20,5 +20,3 @@ set(GEN_PINS_CSV_ARG --board-csv "${GEN_PINS_BOARD_CSV}")
add_link_options("-Wl,--print-memory-usage")
set(PICO_USE_FASTEST_SUPPORTED_CLOCK 1)
set(MICROPY_C_HEAP_SIZE 8192)

View File

@@ -50,10 +50,14 @@ static uint32_t get_fifo_read_value_blocking(struct audiocore_obj *obj)
const long flags = save_and_disable_interrupts();
const uint32_t value = obj->fifo_read_value;
obj->fifo_read_value = 0;
restore_interrupts(flags);
if (value & AUDIOCORE_FIFO_DATA_FLAG)
if (value & AUDIOCORE_FIFO_DATA_FLAG) {
restore_interrupts(flags);
return value & ~AUDIOCORE_FIFO_DATA_FLAG;
}
__wfi();
restore_interrupts(flags);
__nop(); // Ensure at least two instructions between enable interrupts and subsequent disable
__nop();
}
}
@@ -90,9 +94,9 @@ static mp_obj_t audiocore_put(mp_obj_t self_in, mp_obj_t buffer)
(void)self;
mp_buffer_info_t bufinfo;
if (!mp_get_buffer(buffer, &bufinfo, MP_BUFFER_READ))
mp_raise_ValueError("not a read buffer");
mp_raise_ValueError(MP_ERROR_TEXT("not a read buffer"));
if (bufinfo.typecode != 'b' && bufinfo.typecode != 'B')
mp_raise_ValueError("unsupported buffer type");
mp_raise_ValueError(MP_ERROR_TEXT("unsupported buffer type"));
unsigned to_copy = bufinfo.len;
const uint32_t flags = spin_lock_blocking(shared_context.lock);
@@ -144,7 +148,7 @@ static mp_obj_t audiocore_set_volume(mp_obj_t self_in, mp_obj_t volume_obj)
struct audiocore_obj *self = MP_OBJ_TO_PTR(self_in);
const int volume = mp_obj_get_int(volume_obj);
if (volume < 0 || volume > 255)
mp_raise_ValueError("volume out of range");
mp_raise_ValueError(MP_ERROR_TEXT("volume out of range"));
multicore_fifo_push_blocking(AUDIOCORE_CMD_SET_VOLUME);
multicore_fifo_push_blocking(AUDIOCORE_MAX_VOLUME * volume / 255);
wake_core1();

View File

@@ -66,9 +66,9 @@ static mp_obj_t sdcard_readblocks(mp_obj_t self_obj, mp_obj_t block_obj, mp_obj_
const int start_block = mp_obj_get_int(block_obj);
mp_buffer_info_t bufinfo;
if (!mp_get_buffer(buf_obj, &bufinfo, MP_BUFFER_WRITE))
mp_raise_ValueError("Not a write buffer");
mp_raise_ValueError(MP_ERROR_TEXT("Not a write buffer"));
if (bufinfo.len % SD_SECTOR_SIZE != 0)
mp_raise_ValueError("Buffer length is invalid");
mp_raise_ValueError(MP_ERROR_TEXT("Buffer length is invalid"));
const int nblocks = bufinfo.len / SD_SECTOR_SIZE;
for (int block = 0; block < nblocks; block++) {
// TODO: Implement CMD18 read multiple blocks
@@ -85,9 +85,9 @@ static mp_obj_t sdcard_writeblocks(mp_obj_t self_obj, mp_obj_t block_obj, mp_obj
const int start_block = mp_obj_get_int(block_obj);
mp_buffer_info_t bufinfo;
if (!mp_get_buffer(buf_obj, &bufinfo, MP_BUFFER_READ))
mp_raise_ValueError("Not a read buffer");
mp_raise_ValueError(MP_ERROR_TEXT("Not a read buffer"));
if (bufinfo.len % SD_SECTOR_SIZE != 0)
mp_raise_ValueError("Buffer length is invalid");
mp_raise_ValueError(MP_ERROR_TEXT("Buffer length is invalid"));
const int nblocks = bufinfo.len / SD_SECTOR_SIZE;
for (int block = 0; block < nblocks; block++) {
// TODO: Implement CMD25 write multiple blocks

View File

@@ -253,7 +253,7 @@ bool sd_cmd_write(uint8_t cmd, uint32_t arg, unsigned datalen, uint8_t data[cons
int timeout = 0;
bool got_done = false;
for (timeout = 0; timeout < 8192; ++timeout) {
for (timeout = 0; timeout < 131072; ++timeout) {
sd_spi_read_blocking(0xff, buf, 1);
if (buf[0] != 0x0) {
got_done = true;

9
software/mypy.ini Normal file
View File

@@ -0,0 +1,9 @@
[mypy]
platform = linux
mypy_path = $MYPY_CONFIG_FILE_DIR/src:$MYPY_CONFIG_FILE_DIR/typings
custom_typeshed_dir = $MYPY_CONFIG_FILE_DIR/typings
follow_imports = silent
exclude = "typings[\\/].*"
follow_imports_for_stubs = true
no_site_packages = true
check_untyped_defs = true

3
software/pytest.ini Normal file
View File

@@ -0,0 +1,3 @@
[pytest]
pythonpath = tests/mocks src
testpaths = tests

View File

@@ -1,7 +1,7 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2024-2025 Matthias Blankertz <matthias@blankertz.org>
import aiorepl
import aiorepl # type: ignore
import asyncio
import machine
import micropython

View File

@@ -17,7 +17,7 @@ if TYPE_CHECKING:
class Buttons:
def __init__(self, cb: ButtonCallback, pin_volup=17, pin_voldown=19, pin_next=18):
def __init__(self, cb: "ButtonCallback", pin_volup=17, pin_voldown=19, pin_next=18):
self.VOLUP = micropython.const(1)
self.VOLDOWN = micropython.const(2)
self.NEXT = micropython.const(3)

View File

@@ -0,0 +1,2 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2025 Matthias Blankertz <matthias@blankertz.org>

View File

@@ -0,0 +1,2 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2025 Matthias Blankertz <matthias@blankertz.org>

View File

@@ -0,0 +1,5 @@
# SPDX-License-Identifier: MIT
# Copyright (c) 2025 Matthias Blankertz <matthias@blankertz.org>
class SDCard():
pass

View File

@@ -0,0 +1 @@
pytest

View File

@@ -0,0 +1,3 @@
def test_dummy():
# This is just a dummy test to make pytest not fail because no tests are defined
pass

View File