Skip to content

Commit 1208549

Browse files
committed
Merge remote-tracking branch 'adafruit/main' into HEAD
2 parents 9e13e8e + ab22d5a commit 1208549

File tree

656 files changed

+13985
-4723
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

656 files changed

+13985
-4723
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,12 @@ jobs:
3030
env:
3131
GITHUB_CONTEXT: ${{ toJson(github) }}
3232
run: echo "$GITHUB_CONTEXT"
33-
- uses: actions/checkout@v2.2.0
33+
- uses: actions/checkout@v3
3434
with:
3535
submodules: false
3636
fetch-depth: 1
3737
- name: Set up Python 3
38-
uses: actions/setup-python@v2
38+
uses: actions/setup-python@v4
3939
with:
4040
python-version: "3.x"
4141
- name: Get CP deps
@@ -92,25 +92,25 @@ jobs:
9292
working-directory: tests
9393
- name: Build mpy-cross.static-aarch64
9494
run: make -C mpy-cross -j2 -f Makefile.static-aarch64
95-
- uses: actions/upload-artifact@v2
95+
- uses: actions/upload-artifact@v3
9696
with:
9797
name: mpy-cross.static-aarch64
9898
path: mpy-cross/mpy-cross.static-aarch64
9999
- name: Build mpy-cross.static-raspbian
100100
run: make -C mpy-cross -j2 -f Makefile.static-raspbian
101-
- uses: actions/upload-artifact@v2
101+
- uses: actions/upload-artifact@v3
102102
with:
103103
name: mpy-cross.static-raspbian
104104
path: mpy-cross/mpy-cross.static-raspbian
105105
- name: Build mpy-cross.static
106106
run: make -C mpy-cross -j2 -f Makefile.static
107-
- uses: actions/upload-artifact@v2
107+
- uses: actions/upload-artifact@v3
108108
with:
109109
name: mpy-cross.static-amd64-linux
110110
path: mpy-cross/mpy-cross.static
111111
- name: Build mpy-cross.static-mingw
112112
run: make -C mpy-cross -j2 -f Makefile.static-mingw
113-
- uses: actions/upload-artifact@v2
113+
- uses: actions/upload-artifact@v3
114114
with:
115115
name: mpy-cross.static-x64-windows
116116
path: mpy-cross/mpy-cross.static.exe
@@ -149,12 +149,12 @@ jobs:
149149
env:
150150
GITHUB_CONTEXT: ${{ toJson(github) }}
151151
run: echo "$GITHUB_CONTEXT"
152-
- uses: actions/checkout@v2.2.0
152+
- uses: actions/checkout@v3
153153
with:
154154
submodules: false
155155
fetch-depth: 1
156156
- name: Set up Python 3
157-
uses: actions/setup-python@v2
157+
uses: actions/setup-python@v4
158158
with:
159159
python-version: "3.x"
160160
- name: Get CP deps
@@ -174,19 +174,19 @@ jobs:
174174
msgfmt --version
175175
- name: Build mpy-cross
176176
run: make -C mpy-cross -j2
177-
- uses: actions/upload-artifact@v2
177+
- uses: actions/upload-artifact@v3
178178
with:
179179
name: mpy-cross-macos-11-x64
180180
path: mpy-cross/mpy-cross
181181
- name: Build mpy-cross (arm64)
182182
run: make -C mpy-cross -j2 -f Makefile.m1 V=2
183-
- uses: actions/upload-artifact@v2
183+
- uses: actions/upload-artifact@v3
184184
with:
185185
name: mpy-cross-macos-11-arm64
186186
path: mpy-cross/mpy-cross-arm64
187187
- name: Make universal binary
188188
run: lipo -create -output mpy-cross-macos-universal mpy-cross/mpy-cross mpy-cross/mpy-cross-arm64
189-
- uses: actions/upload-artifact@v2
189+
- uses: actions/upload-artifact@v3
190190
with:
191191
name: mpy-cross-macos-11-universal
192192
path: mpy-cross-macos-universal
@@ -207,7 +207,7 @@ jobs:
207207
needs: test
208208
if: ${{ needs.test.outputs.build-doc == 'True' }}
209209
steps:
210-
- uses: actions/checkout@v2.2.0
210+
- uses: actions/checkout@v3
211211
with:
212212
submodules: false
213213
fetch-depth: 1
@@ -218,7 +218,7 @@ jobs:
218218
tools/describe || git log --parents HEAD~4..
219219
echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
220220
- name: Set up Python 3
221-
uses: actions/setup-python@v2
221+
uses: actions/setup-python@v4
222222
with:
223223
python-version: "3.x"
224224
- name: Install dependencies
@@ -229,20 +229,20 @@ jobs:
229229
pip install -r requirements-ci.txt -r requirements-doc.txt
230230
- name: Build and Validate Stubs
231231
run: make check-stubs -j2
232-
- uses: actions/upload-artifact@v2
232+
- uses: actions/upload-artifact@v3
233233
with:
234234
name: stubs
235235
path: circuitpython-stubs/dist/*
236236
- name: Test Documentation Build (HTML)
237237
run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html
238-
- uses: actions/upload-artifact@v2
238+
- uses: actions/upload-artifact@v3
239239
with:
240240
name: docs
241241
path: _build/html
242242
- name: Test Documentation Build (LaTeX/PDF)
243243
run: |
244244
make latexpdf
245-
- uses: actions/upload-artifact@v2
245+
- uses: actions/upload-artifact@v3
246246
with:
247247
name: docs
248248
path: _build/latex
@@ -276,10 +276,10 @@ jobs:
276276
if: ${{ needs.test.outputs.boards-arm != '[]' }}
277277
steps:
278278
- name: Set up Python 3
279-
uses: actions/setup-python@v2
279+
uses: actions/setup-python@v4
280280
with:
281281
python-version: "3.x"
282-
- uses: actions/checkout@v2.2.0
282+
- uses: actions/checkout@v3
283283
with:
284284
submodules: false
285285
fetch-depth: 1
@@ -306,7 +306,7 @@ jobs:
306306
working-directory: tools
307307
env:
308308
BOARDS: ${{ matrix.board }}
309-
- uses: actions/upload-artifact@v2
309+
- uses: actions/upload-artifact@v3
310310
with:
311311
name: ${{ matrix.board }}
312312
path: bin/${{ matrix.board }}
@@ -329,10 +329,10 @@ jobs:
329329
if: ${{ needs.test.outputs.boards-riscv != '[]' }}
330330
steps:
331331
- name: Set up Python 3
332-
uses: actions/setup-python@v2
332+
uses: actions/setup-python@v4
333333
with:
334334
python-version: "3.x"
335-
- uses: actions/checkout@v2.2.0
335+
- uses: actions/checkout@v3
336336
with:
337337
submodules: false
338338
fetch-depth: 1
@@ -358,7 +358,7 @@ jobs:
358358
working-directory: tools
359359
env:
360360
BOARDS: ${{ matrix.board }}
361-
- uses: actions/upload-artifact@v2
361+
- uses: actions/upload-artifact@v3
362362
with:
363363
name: ${{ matrix.board }}
364364
path: bin/${{ matrix.board }}
@@ -385,7 +385,7 @@ jobs:
385385
uses: actions/setup-python@v4
386386
with:
387387
python-version: "3.x"
388-
- uses: actions/checkout@v2.2.0
388+
- uses: actions/checkout@v3
389389
with:
390390
submodules: false
391391
fetch-depth: 1
@@ -395,7 +395,7 @@ jobs:
395395
run: |
396396
tools/describe || git log --parents HEAD~4..
397397
echo >>$GITHUB_ENV CP_VERSION=$(tools/describe)
398-
- uses: actions/cache@v2
398+
- uses: actions/cache@v3
399399
name: Fetch IDF tool cache
400400
id: idf-cache
401401
with:
@@ -449,7 +449,7 @@ jobs:
449449
IDF_PATH: ${{ github.workspace }}/ports/espressif/esp-idf
450450
IDF_TOOLS_PATH: ${{ github.workspace }}/.idf_tools
451451
BOARDS: ${{ matrix.board }}
452-
- uses: actions/upload-artifact@v2
452+
- uses: actions/upload-artifact@v3
453453
with:
454454
name: ${{ matrix.board }}
455455
path: bin/${{ matrix.board }}
@@ -471,10 +471,10 @@ jobs:
471471
if: ${{ needs.test.outputs.boards-aarch != '[]' }}
472472
steps:
473473
- name: Set up Python 3
474-
uses: actions/setup-python@v2
474+
uses: actions/setup-python@v4
475475
with:
476476
python-version: "3.x"
477-
- uses: actions/checkout@v2.2.0
477+
- uses: actions/checkout@v3
478478
with:
479479
submodules: false
480480
fetch-depth: 1
@@ -514,7 +514,7 @@ jobs:
514514
working-directory: tools
515515
env:
516516
BOARDS: ${{ matrix.board }}
517-
- uses: actions/upload-artifact@v2
517+
- uses: actions/upload-artifact@v3
518518
with:
519519
name: ${{ matrix.board }}
520520
path: bin/${{ matrix.board }}

.github/workflows/create_website_pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ jobs:
1616
env:
1717
GITHUB_CONTEXT: ${{ toJson(github) }}
1818
run: echo "$GITHUB_CONTEXT"
19-
- uses: actions/checkout@v2.2.0
19+
- uses: actions/checkout@v3
2020
with:
2121
submodules: false
2222
fetch-depth: 1
2323
- name: Set up Python 3
24-
uses: actions/setup-python@v2
24+
uses: actions/setup-python@v4
2525
with:
2626
python-version: "3.x"
2727
- name: Get CP deps

.github/workflows/ports_windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ jobs:
7171
which python; python --version; python -c "import cascadetoml"
7272
which python3; python3 --version; python3 -c "import cascadetoml"
7373
74-
- uses: actions/checkout@v2.2.0
74+
- uses: actions/checkout@v3
7575
with:
7676
submodules: false
7777
fetch-depth: 1

.github/workflows/pre-commit.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ jobs:
1616
pre-commit:
1717
runs-on: ubuntu-22.04
1818
steps:
19-
- uses: actions/checkout@v2.2.0
19+
- uses: actions/checkout@v3
2020
- name: Set up Python 3
21-
uses: actions/setup-python@v2
21+
uses: actions/setup-python@v4
2222
with:
2323
python-version: "3.x"
2424
- name: Install deps
@@ -29,17 +29,17 @@ jobs:
2929
run: git submodule update --init extmod/ulab
3030
- name: Set PY
3131
run: echo >>$GITHUB_ENV PY="$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
32-
- uses: actions/cache@v2
32+
- uses: actions/cache@v3
3333
with:
3434
path: ~/.cache/pre-commit
3535
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
36-
- uses: pre-commit/action@v1.1.0
36+
- uses: pre-commit/action@v3.0.0
3737
- name: Make patch
3838
if: failure()
3939
run: git diff > ~/pre-commit.patch
4040
- name: Upload patch
4141
if: failure()
42-
uses: actions/upload-artifact@v2
42+
uses: actions/upload-artifact@v3
4343
with:
4444
name: patch
4545
path: ~/pre-commit.patch

.gitmodules

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
url = https://github.com/adafruit/esp-idf.git
149149
branch = circuitpython8
150150
[submodule "ports/espressif/certificates/nina-fw"]
151-
path = ports/espressif/certificates/nina-fw
151+
path = lib/certificates/nina-fw
152152
url = https://github.com/adafruit/nina-fw.git
153153
[submodule "frozen/Adafruit_CircuitPython_ST7789"]
154154
path = frozen/Adafruit_CircuitPython_ST7789
@@ -310,3 +310,12 @@
310310
[submodule "ports/espressif/esp32-camera"]
311311
path = ports/espressif/esp32-camera
312312
url = https://github.com/adafruit/esp32-camera/
313+
[submodule "ports/raspberrypi/lib/cyw43-driver"]
314+
path = ports/raspberrypi/lib/cyw43-driver
315+
url = https://github.com/georgerobotics/cyw43-driver.git
316+
[submodule "ports/raspberrypi/lib/lwip"]
317+
path = ports/raspberrypi/lib/lwip
318+
url = https://github.com/lwip-tcpip/lwip.git
319+
[submodule "lib/mbedtls"]
320+
path = lib/mbedtls
321+
url = https://github.com/ARMmbed/mbedtls.git

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repos:
1010
- id: end-of-file-fixer
1111
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/espressif/esp-idf-config/.*|ports/espressif/boards/.*/sdkconfig)'
1212
- id: trailing-whitespace
13-
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*)'
13+
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|lib/mbedtls_errors/.*)'
1414
- repo: local
1515
hooks:
1616
- id: translations

README.rst

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -84,17 +84,19 @@ common set of requirements.
8484

8585
If you'd like to use the term "CircuitPython" and Blinka for your product here is what we ask:
8686

87-
* Your product is supported by the primary
87+
- Your product is supported by the primary
8888
`"adafruit/circuitpython" <https://github.com/adafruit/circuitpython>`_ repo. This way we can
8989
update any custom code as we update the CircuitPython internals.
90-
* Your product is listed on `circuitpython.org <https://circuitpython.org>`__ (source
90+
- Your product is listed on `circuitpython.org <https://circuitpython.org>`__ (source
9191
`here <https://github.com/adafruit/circuitpython-org/>`_). This is to ensure that a user of your
9292
product can always download the latest version of CircuitPython from the standard place.
93-
* Your product supports at least one standard "`Workflow <https://docs.circuitpython.org/en/latest/docs/workflows.html>`__" for serial and file access:
94-
* With a user accessible USB plug which appears as a CIRCUITPY drive when plugged in.
95-
* With file and serial access over Bluetooth Low Energy using the BLE Workflow.
96-
* With file access over WiFi using the WiFi Workflow with serial access over USB and/or WebSocket.
97-
* Boards that do not support the USB Workflow should be clearly marked.
93+
- Your product supports at least one standard "`Workflow <https://docs.circuitpython.org/en/latest/docs/workflows.html>`__" for serial and file access:
94+
95+
- With a user accessible USB plug which appears as a CIRCUITPY drive when plugged in.
96+
- With file and serial access over Bluetooth Low Energy using the BLE Workflow.
97+
- With file access over WiFi using the WiFi Workflow with serial access over USB and/or WebSocket.
98+
99+
- Boards that do not support the USB Workflow should be clearly marked.
98100

99101
If you choose not to meet these requirements, then we ask you call your version of CircuitPython
100102
something else (for example, SuperDuperPython) and not use the Blinka logo. You can say it is
@@ -218,7 +220,7 @@ Supported Support status
218220
================ ============================================================
219221
atmel-samd ``SAMD21`` stable | ``SAMD51`` stable
220222
cxd56 stable
221-
espressif ``ESP32-C3`` beta | ``ESP32-S2`` stable | ``ESP32-S3`` beta
223+
espressif ``ESP32`` beta | ``ESP32-C3`` beta | ``ESP32-S2`` stable | ``ESP32-S3`` beta
222224
litex alpha
223225
mimxrt10xx alpha
224226
nrf stable

conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,7 @@ def autoapi_prepare_jinja_env(jinja_env):
213213
"ports/nrf/peripherals",
214214
"ports/nrf/usb",
215215
"ports/raspberrypi/sdk",
216+
"ports/raspberrypi/lib",
216217
"ports/stm/st_driver",
217218
"ports/stm/packages",
218219
"ports/stm/peripherals",

devices/ble_hci/common-hal/_bleio/CharacteristicBuffer.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ bool common_hal_bleio_characteristic_buffer_deinited(bleio_characteristic_buffer
9393
void common_hal_bleio_characteristic_buffer_deinit(bleio_characteristic_buffer_obj_t *self) {
9494
if (!common_hal_bleio_characteristic_buffer_deinited(self)) {
9595
bleio_characteristic_clear_observer(self->characteristic);
96+
ringbuf_deinit(&self->ringbuf);
9697
}
9798
}
9899

devices/ble_hci/common-hal/_bleio/PacketBuffer.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,13 @@
3737
#include "supervisor/shared/tick.h"
3838

3939
STATIC void write_to_ringbuf(bleio_packet_buffer_obj_t *self, uint8_t *data, uint16_t len) {
40-
if (len + sizeof(uint16_t) > ringbuf_capacity(&self->ringbuf)) {
40+
if (len + sizeof(uint16_t) > ringbuf_size(&self->ringbuf)) {
4141
// This shouldn't happen.
4242
return;
4343
}
4444
// Push all the data onto the ring buffer.
4545
// Make room for the new value by dropping the oldest packets first.
46-
while (ringbuf_capacity(&self->ringbuf) - ringbuf_num_filled(&self->ringbuf) < len + sizeof(uint16_t)) {
46+
while (ringbuf_size(&self->ringbuf) - ringbuf_num_filled(&self->ringbuf) < len + sizeof(uint16_t)) {
4747
uint16_t packet_length;
4848
ringbuf_get_n(&self->ringbuf, (uint8_t *)&packet_length, sizeof(uint16_t));
4949
for (uint16_t i = 0; i < packet_length; i++) {
@@ -264,5 +264,6 @@ bool common_hal_bleio_packet_buffer_deinited(bleio_packet_buffer_obj_t *self) {
264264
void common_hal_bleio_packet_buffer_deinit(bleio_packet_buffer_obj_t *self) {
265265
if (!common_hal_bleio_packet_buffer_deinited(self)) {
266266
bleio_characteristic_clear_observer(self->characteristic);
267+
ringbuf_deinit(&self->ringbuf);
267268
}
268269
}

0 commit comments

Comments
 (0)