Skip to content

Commit 9633c4e

Browse files
committed
Merge remote-tracking branch 'adafruit/main' into v1.20-merge
2 parents 4c4eba8 + 426e54f commit 9633c4e

File tree

931 files changed

+12292
-13604
lines changed

Some content is hidden

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

931 files changed

+12292
-13604
lines changed

.devcontainer/cortex-m/on-create.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ rm -fr /workspaces/dosfstools-4.2 /workspaces/dosfstools-4.2.tar.gz
3434
# prepare source-code tree
3535
cd /workspaces/circuitpython/
3636
echo -e "[on-create.sh] fetching submodules"
37-
make fetch-submodules
37+
make fetch-all-submodules
3838
echo -e "[on-create.sh] fetching tags"
3939
git fetch --tags --recurse-submodules=no --shallow-since="2021-07-01" https://github.com/adafruit/circuitpython HEAD
4040

.github/actions/deps/external/action.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@ runs:
3737
- name: Install IDF tools
3838
if: inputs.port == 'espressif'
3939
run: |
40-
echo "Installing ESP-IDF tools"
41-
$IDF_PATH/tools/idf_tools.py --non-interactive install required
42-
$IDF_PATH/tools/idf_tools.py --non-interactive install cmake
43-
echo "Installing Python environment and packages"
44-
$IDF_PATH/tools/idf_tools.py --non-interactive install-python-env
40+
$IDF_PATH/install.sh
4541
rm -rf $IDF_TOOLS_PATH/dist
4642
shell: bash
4743
- name: Set environment

.github/workflows/run-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,5 @@ jobs:
6363
make -C examples/natmod/uzlib
6464
- name: Test native modules
6565
if: matrix.test == 'all'
66-
run: ./run-natmodtests.py extmod/{btree*,framebuf*,uheapq*,ure*,uzlib*}.py
66+
run: ./run-natmodtests.py extmod/{uheapq*,ure*,uzlib*}.py
6767
working-directory: tests

.gitmodules

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -143,10 +143,14 @@
143143
[submodule "ports/espressif/esp-idf"]
144144
path = ports/espressif/esp-idf
145145
url = https://github.com/adafruit/esp-idf.git
146-
branch = release/v4.4-circuitpython
147-
[submodule "ports/espressif/certificates/nina-fw"]
148-
path = lib/certificates/nina-fw
149-
url = https://github.com/adafruit/nina-fw.git
146+
branch = circuitpython-v5.1
147+
[submodule "ports/espressif/esp-protocols"]
148+
path = ports/espressif/esp-protocols
149+
url = https://github.com/espressif/esp-protocols.git
150+
[submodule "ports/espressif/esp-camera"]
151+
path = ports/espressif/esp-camera
152+
url = https://github.com/adafruit/esp32-camera.git
153+
branch = circuitpython
150154
[submodule "frozen/Adafruit_CircuitPython_ST7789"]
151155
path = frozen/Adafruit_CircuitPython_ST7789
152156
url = https://github.com/adafruit/Adafruit_CircuitPython_ST7789
@@ -300,10 +304,6 @@
300304
[submodule "frozen/circuitpython_picoed"]
301305
path = frozen/circuitpython_picoed
302306
url = https://github.com/elecfreaks/circuitpython_picoed.git
303-
[submodule "ports/espressif/esp32-camera"]
304-
path = ports/espressif/esp32-camera
305-
url = https://github.com/adafruit/esp32-camera/
306-
branch = circuitpython
307307
[submodule "ports/raspberrypi/lib/cyw43-driver"]
308308
path = ports/raspberrypi/lib/cyw43-driver
309309
url = https://github.com/georgerobotics/cyw43-driver.git
@@ -340,11 +340,14 @@
340340
url = https://github.com/bablokb/circuitpython-pcf85063a
341341
[submodule "frozen/Adafruit_CircuitPython_Wave"]
342342
path = frozen/Adafruit_CircuitPython_Wave
343-
url = http://github.com/adafruit/Adafruit_CircuitPython_Wave.git
343+
url = https://github.com/adafruit/Adafruit_CircuitPython_Wave.git
344344
[submodule "ports/raspberrypi/lib/Pico-PIO-USB"]
345345
path = ports/raspberrypi/lib/Pico-PIO-USB
346346
url = https://github.com/sekigon-gonnoc/Pico-PIO-USB.git
347347
branch = main
348348
[submodule "lib/micropython-lib"]
349349
path = lib/micropython-lib
350350
url = https://github.com/micropython/micropython-lib.git
351+
[submodule "lib/certificates"]
352+
path = lib/certificates
353+
url = https://github.com/adafruit/certificates

README.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ Behavior
133133
``code.py`` **in the REPL anymore, as the REPL is a fresh vm.** CircuitPython's goal for this
134134
change includes reducing confusion about pins and memory being used.
135135
- After the main code is finished the REPL can be entered by pressing any key.
136+
- If the file ``repl.py`` exists, it is executed before the REPL Prompt is shown
137+
- In safe mode this functionality is disabled, to ensure the REPL Prompt can always be reached
136138
- Autoreload state will be maintained across reload.
137139

138140
- Adds a safe mode that does not run user code after a hard crash or brown out. This makes it
@@ -155,7 +157,7 @@ Behavior
155157
- Re-runs ``code.py`` or other main file after file system writes by a workflow. (Disable with
156158
``supervisor.disable_autoreload()``)
157159
- Autoreload is disabled while the REPL is active.
158-
- ``code.py`` may also be named``code.txt``, ``main.py``, or ``main.txt``.
160+
- ``code.py`` may also be named ``code.txt``, ``main.py``, or ``main.txt``.
159161
- ``boot.py`` may also be named ``boot.txt``.
160162
- ``safemode.py`` may also be named ``safemode.txt``.
161163

conf.py

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -266,19 +266,9 @@ def autoapi_prepare_jinja_env(jinja_env):
266266

267267
# -- Options for HTML output ----------------------------------------------
268268

269-
# on_rtd is whether we are on readthedocs.org
270-
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
271-
272-
if not on_rtd: # only import and set the theme if we're building docs locally
273-
try:
274-
import sphinx_rtd_theme
275-
html_theme = 'sphinx_rtd_theme'
276-
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.']
277-
except:
278-
html_theme = 'default'
279-
html_theme_path = ['.']
280-
else:
281-
html_theme_path = ['.']
269+
import sphinx_rtd_theme
270+
html_theme = 'sphinx_rtd_theme'
271+
html_theme_path = [sphinx_rtd_theme.get_html_theme_path(), '.']
282272

283273
# Theme options are theme-specific and customize the look and feel of a theme
284274
# further. For a list of options available for each theme, see the
@@ -443,6 +433,7 @@ def autoapi_prepare_jinja_env(jinja_env):
443433
# Example configuration for intersphinx: refer to the Python standard library.
444434
intersphinx_mapping = {"python": ('https://docs.python.org/3/', None),
445435
"register": ('https://circuitpython.readthedocs.io/projects/register/en/latest/', None),
436+
"mcp2515": ('https://circuitpython.readthedocs.io/projects/mcp2515/en/latest/', None),
446437
"typing": ('https://circuitpython.readthedocs.io/projects/adafruit-circuitpython-typing/en/latest/', None)}
447438

448439
# Adapted from sphinxcontrib-redirects

docs/redirects.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,8 +84,10 @@ shared-bindings/frequencyio/__init__.rst shared-bindings/frequencyio/
8484
shared-bindings/gnss/__init__.rst shared-bindings/gnss/
8585
shared-bindings/i2cperipheral/__init__.rst shared-bindings/i2cperipheral/
8686
shared-bindings/i2csecondary/__init__.rst shared-bindings/i2csecondary/
87-
shared-bindings/i2cslave/I2CSlave.rst shared-bindings/i2cperipheral/#i2cperipheral.I2CPeripheral
88-
shared-bindings/i2cslave/I2CSlaveRequest.rst shared-bindings/i2cperipheral/#i2cperipheral.I2CPeripheralRequest
87+
shared-bindings/i2cslave/I2CSlave.rst shared-bindings/i2cperipheral/#i2ctarget.Target
88+
shared-bindings/i2cslave/I2CSlaveRequest.rst shared-bindings/i2cperipheral/#i2ctarget.I2CTargetRequest
89+
shared-bindings/i2cperipheral/I2CPeripheral.rst shared-bindings/i2ctarget/#i2ctarget.I2CTarget
90+
shared-bindings/i2cperipheral/I2CPeripheralRequest.rst shared-bindings/i2ctarget/#i2ctarget.I2CTargetRequest
8991
shared-bindings/math/__init__.rst shared-bindings/math/
9092
shared-bindings/microcontroller/Pin.rst shared-bindings/microcontroller/#microcontroller.Pin
9193
shared-bindings/microcontroller/Processor.rst shared-bindings/microcontroller/#microcontroller.Processor

docs/rstjinja.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
11
# Derived from code on Eric Holscher's blog, found at:
22
# https://www.ericholscher.com/blog/2016/jul/25/integrating-jinja-rst-sphinx/
33

4+
import re
5+
6+
def render_with_jinja(docname, source):
7+
if re.search('^\s*.. jinja$', source[0], re.M):
8+
return True
9+
return False
10+
411
def rstjinja(app, docname, source):
512
"""
613
Render our pages as a jinja template for fancy templating goodness.
@@ -9,12 +16,12 @@ def rstjinja(app, docname, source):
916
if app.builder.format not in ("html", "latex"):
1017
return
1118

12-
# we only want our one jinja template to run through this func
13-
if "shared-bindings/support_matrix" not in docname:
19+
# we only want specific files to run through this func
20+
if not render_with_jinja(docname, source):
1421
return
1522

1623
src = rendered = source[0]
17-
print(docname)
24+
print(f"rendering {docname} as jinja templates")
1825

1926
if app.builder.format == "html":
2027
rendered = app.builder.templates.render_string(

docs/shared_bindings_matrix.py

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -69,28 +69,23 @@
6969
"array": "CIRCUITPY_ARRAY",
7070
# always available, so depend on something that's always 1.
7171
"builtins": "CIRCUITPY",
72+
"builtins.pow3": "CIRCUITPY_BUILTINS_POW3",
73+
"busio.SPI": "CIRCUITPY_BUSIO_SPI",
74+
"busio.UART": "CIRCUITPY_BUSIO_UART",
7275
"collections": "CIRCUITPY_COLLECTIONS",
7376
"fontio": "CIRCUITPY_DISPLAYIO",
7477
"io": "CIRCUITPY_IO",
78+
"keypad.KeyMatrix": "CIRCUITPY_KEYPAD_KEYMATRIX",
79+
"keypad.Keys": "CIRCUITPY_KEYPAD_KEYS",
80+
"keypad.ShiftRegisterKeys": "CIRCUITPY_KEYPAD_SHIFTREGISTERKEYS",
81+
"os.getenv": "CIRCUITPY_OS_GETENV",
7582
"select": "MICROPY_PY_USELECT_SELECT",
76-
"terminalio": "CIRCUITPY_DISPLAYIO",
7783
"sys": "CIRCUITPY_SYS",
84+
"terminalio": "CIRCUITPY_DISPLAYIO",
7885
"usb": "CIRCUITPY_USB_HOST",
7986
}
8087

81-
MODULES_NOT_IN_BINDINGS = [
82-
"_asyncio",
83-
"array",
84-
"binascii",
85-
"builtins",
86-
"collections",
87-
"errno",
88-
"json",
89-
"re",
90-
"select",
91-
"sys",
92-
"ulab",
93-
]
88+
MODULES_NOT_IN_BINDINGS = [ "binascii", "errno", "json", "re", "ulab" ]
9489

9590
FROZEN_EXCLUDES = ["examples", "docs", "tests", "utils", "conf.py", "setup.py"]
9691
"""Files and dirs at the root of a frozen directory that should be ignored.
@@ -117,7 +112,7 @@ def get_bindings():
117112
bindings_modules = []
118113
for d in get_circuitpython_root_dir().glob("ports/*/bindings"):
119114
bindings_modules.extend(module.name for module in d.iterdir() if d.is_dir())
120-
return shared_bindings_modules + bindings_modules + MODULES_NOT_IN_BINDINGS
115+
return shared_bindings_modules + bindings_modules + MODULES_NOT_IN_BINDINGS + list(ADDITIONAL_MODULES.keys())
121116

122117

123118
def get_board_mapping():
@@ -175,9 +170,11 @@ def get_settings_from_makefile(port_dir, board_name):
175170
This means that the effect of all Makefile directives is taken
176171
into account, without having to re-encode the logic that sets them
177172
in this script, something that has proved error-prone
173+
174+
This list must explicitly include any setting queried by tools/ci_set_matrix.py.
178175
"""
179176
contents = subprocess.run(
180-
["make", "-C", port_dir, "-f", "Makefile", f"BOARD={board_name}", "print-CFLAGS", "print-CIRCUITPY_BUILD_EXTENSIONS", "print-FROZEN_MPY_DIRS", "print-SRC_PATTERNS"],
177+
["make", "-C", port_dir, "-f", "Makefile", f"BOARD={board_name}", "print-CFLAGS", "print-CIRCUITPY_BUILD_EXTENSIONS", "print-FROZEN_MPY_DIRS", "print-SRC_PATTERNS", "print-SRC_SUPERVISOR"],
181178
encoding="utf-8",
182179
errors="replace",
183180
stdout=subprocess.PIPE,

0 commit comments

Comments
 (0)