134 Commits

Author SHA1 Message Date
98ecca0d09 rp2_sd: Cleanup and fixes
All checks were successful
Check code formatting / Check-C-Format (push) Successful in 6s
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 8s
- Use SD_SECTOR_SIZE define instead of magic number 512
- Replace uint8_t buf[1] with plain uint8_t
- Check sd_spi_read_dma precondition that sd_dma_context state has to be
  DMA_IDLE explicitly and return false instead of relying on assert
- sd_spi_dma_isr is time critical
2025-03-10 20:15:05 +01:00
f7d44516df test.py: Update to use rp2_sd module
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2025-03-10 20:15:05 +01:00
460a67cf9f Add rp2 PIO and DMA fast SD card driver
The builtin micropython SD card driver using the default micropython SPI
implementation suffered from very low read speeds. Add an optimized SD
card driver using rp2 PIO and DMA. Currently read only, write support to
be added later.

Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2025-03-10 20:15:05 +01:00
b57283a04f microdot: First working example. We observe wifi instabilities/detectability issues.
All checks were successful
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
2025-01-28 21:44:40 +01:00
b5124b9b1c wifi: announce ssid, set ip. SSID visibilty varies between adapters. 2025-01-28 21:30:00 +01:00
fbea092a95 Added microdot submodule. 2025-01-28 21:23:48 +01:00
f213a51e36 Documented maximum observed delay for future reference.
All checks were successful
Check code formatting / Check-C-Format (push) Successful in 6s
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
2025-01-28 19:25:57 +01:00
e79d3886ed Usable mfrc522 code.
Not as async as possible, and definately needs a future revisit. But
works for now, with acceptable delays, if the newly introduced
tocard_retries parameter of class MFRC522 is used and set to a
reasonable low value.
2025-01-28 19:25:57 +01:00
1caa3f54a5 Being more pythonesk. 2025-01-28 19:25:57 +01:00
f00b2b1ab1 Made mfrc522.py part of our micropython environment. 2025-01-28 19:25:57 +01:00
3deba7d604 Fixes for flake8. 2025-01-28 19:25:57 +01:00
7188722cc8 Made tag uid retrieval awaitable. 2025-01-28 19:25:57 +01:00
553bbe95b2 Fixed uid output. Also fixed line endings (sorry). 2025-01-28 19:25:57 +01:00
62b93de024 We are not interested in the card's content. 2025-01-28 19:25:57 +01:00
4e7968fc0c Added deployment script and example main.py. 2025-01-28 19:25:57 +01:00
df33e072c3 Added micropython library for the mfrc522 card reader. 2025-01-28 19:25:57 +01:00
1981cac7de Check all shell scripts in our repo. 2025-01-14 20:11:53 +01:00
8b9d6ce9fc Check for required commands, cleanup, added help.
All checks were successful
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 8s
Run unit tests on host / Run-Unit-Tests (push) Successful in 8s
2024-12-10 21:27:56 +01:00
50118aea49 Flashing via picotool is the new default.
All checks were successful
Check code formatting / Check-C-Format (push) Successful in 11s
Check code formatting / Check-Python-Flake8 (push) Successful in 10s
Run unit tests on host / Run-Unit-Tests (push) Successful in 11s
2024-12-10 00:26:51 +01:00
ee5ea90e0a audiocore: Comment python API, some cleanup
All checks were successful
Check code formatting / Check-C-Format (push) Successful in 7s
Check code formatting / Check-Python-Flake8 (push) Successful in 9s
Run unit tests on host / Run-Unit-Tests (push) Successful in 7s
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2024-06-02 11:58:21 +02:00
23a9c3f507 audiocore: Add unit tests for audiocore
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2024-06-02 11:58:21 +02:00
910774cbe6 Add unit test infrastructure
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2024-06-02 11:58:21 +02:00
b7c980b6eb Add flake8 CI checks
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2024-06-02 11:58:21 +02:00
12149986c4 Add clang-format
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2024-06-02 11:58:21 +02:00
2090cf90de Add manual test script
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2024-06-02 11:58:21 +02:00
a4028b11e8 Add audiocore module and I2S audio driver
This is the skeleton of the code that will run on core1 to perform the
audio decoding and output. In this initial commit, the module
infrastructure, starting code on core1, and the I2S audio driver with
DMA are implemented.

Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2024-06-02 11:58:21 +02:00
6d1f386373 Add manual test for rp2_neopixel
Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2024-05-31 19:12:08 +02:00
c47fa69a61 micropython: Update to v1.23.0
Unfortunately we still need a patch against upstream due to the thread
disabled build not building cleanly. Upstreaming attempt here:
https://github.com/micropython/micropython/pull/15179

Signed-off-by: Matthias Blankertz <matthias@blankertz.org>
2024-05-31 19:05:02 +02:00
89a8dd0a68 rp2_neopixel: Optimize NeoPixel.fill 2024-05-31 19:02:54 +02:00
1f310432b0 Add rp2_neopixel to frozen modules 2024-05-31 17:30:50 +02:00
41a4ecabeb Add NeoPixel driver using RP2 PIO and with asyncio support 2024-05-31 17:30:50 +02:00
c8acb86a6b Run make with the correct number of jobs 2024-05-31 16:52:15 +02:00
fae0517e79 Add copy of PICO_W board with disabled threading 2024-05-31 15:29:23 +02:00
0c60c5753b Add micropython 2024-05-31 15:29:23 +02:00