Skip to content

Commit f362a4a

Browse files
authored
Merge pull request #30 from adafruit/main
Update from adafruit/main
2 parents 7ad7e1c + 9535edb commit f362a4a

File tree

165 files changed

+7219
-790
lines changed

Some content is hidden

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

165 files changed

+7219
-790
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ jobs:
279279
- "pyportal_titano"
280280
- "pyruler"
281281
- "qtpy_m0"
282+
- "qtpy_m0_haxpress"
282283
- "raytac_mdbt50q-db-40"
283284
- "robohatmm1_m4"
284285
- "sam32"
@@ -413,13 +414,15 @@ jobs:
413414
fail-fast: false
414415
matrix:
415416
board:
417+
- "adafruit_metro_esp32s2"
416418
- "electroniccats_bastwifi"
417419
- "espressif_kaluga_1"
418420
- "espressif_saola_1_wroom"
419421
- "espressif_saola_1_wrover"
420422
- "microdev_micro_s2"
421423
- "muselab_nanoesp32_s2"
422424
- "unexpectedmaker_feathers2"
425+
- "unexpectedmaker_feathers2_prerelease"
423426

424427
steps:
425428
- name: Set up Python 3.8

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ TAGS
8080
*.mo
8181

8282
.vscode
83+
.idea
8384

8485
# Python Virtual Environments
8586
####################

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ repos:
88
hooks:
99
- id: check-yaml
1010
- id: end-of-file-fixer
11-
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*)'
11+
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*|ports/esp32s2/esp-idf-config/.*|ports/esp32s2/boards/.*/sdkconfig)'
1212
- id: trailing-whitespace
1313
exclude: '^(tests/.*\.exp|tests/cmdline/.*|tests/.*/data/.*)'

Makefile

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,19 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(BASEOPTS)
4040
# the i18n builder cannot share the environment and doctrees with the others
4141
I18NSPHINXOPTS = $(BASEOPTS)
4242

43-
TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/cxd56 ports/mimxrt10xx ports/nrf ports/stm py shared-bindings shared-module supervisor
43+
TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/cxd56 ports/esp32s2 ports/mimxrt10xx ports/nrf ports/stm py shared-bindings shared-module supervisor
44+
# Paths to exclude from TRANSLATE_SOURCES
45+
# Each must be preceded by "-path"; if any wildcards, enclose in quotes.
46+
# Separate by "-o" (Find's "or" operand)
47+
TRANSLATE_SOURCES_EXC = -path "ports/*/build-*" \
48+
-o -path "ports/*/build" \
49+
-o -path ports/esp32s2/esp-idf \
50+
-o -path ports/cxd56/spresense-exported-sdk \
51+
-o -path ports/stm/st_driver \
52+
-o -path ports/atmel-samd/asf4 \
53+
-o -path ports/mimxrt10xx/sdk \
54+
-o -path lib/tinyusb \
55+
-o -path lib/lwip \
4456

4557
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext stubs
4658

@@ -210,7 +222,7 @@ pseudoxml:
210222
all-source:
211223

212224
locale/circuitpython.pot: all-source
213-
find $(TRANSLATE_SOURCES) -iname "*.c" -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o circuitpython.pot -p locale
225+
find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o circuitpython.pot -p locale
214226

215227
# Historically, `make translate` updated the .pot file and ran msgmerge.
216228
# However, this was a frequent source of merge conflicts. Weblate can perform
@@ -235,7 +247,7 @@ merge-translate:
235247

236248
.PHONY: check-translate
237249
check-translate:
238-
find $(TRANSLATE_SOURCES) -iname "*.c" -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o circuitpython.pot.tmp -p locale
250+
find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o circuitpython.pot.tmp -p locale
239251
$(PYTHON) tools/check_translations.py locale/circuitpython.pot.tmp locale/circuitpython.pot; status=$$?; rm -f locale/circuitpython.pot.tmp; exit $$status
240252

241253
stubs:

docs/design_guide.rst

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,19 @@ struct.pack
485485

486486
Use `struct.pack_into` instead of `struct.pack`.
487487

488+
Use of MicroPython ``const()``
489+
--------------------------------------------------------------------------------
490+
The MicroPython ``const()`` feature, as discussed in `this forum post
491+
<https://forum.micropython.org/viewtopic.php?t=450>`_, and in `this issue thread
492+
<https://github.com/micropython/micropython/issues/573>`_, provides some
493+
optimizations that can be useful on smaller, memory constrained devices. However,
494+
when using ``const()``, keep in mind these general guide lines:
495+
496+
- Always use via an import, ex: ``from micropython import const``
497+
- Limit use to global (module level) variables only.
498+
- If user will not need access to variable, prefix name with a leading
499+
underscore, ex: ``_SOME_CONST``.
500+
488501
Sensor properties and units
489502
--------------------------------------------------------------------------------
490503

lib/tinyusb

Submodule tinyusb updated 84 files

0 commit comments

Comments
 (0)