aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yml6
-rw-r--r--.github/workflows/pre-commit.yml2
-rw-r--r--Makefile9
-rw-r--r--README.rst2
-rw-r--r--docs/design_guide.rst4
-rw-r--r--docs/library/errno.rst (renamed from docs/library/uerrno.rst)10
-rw-r--r--docs/library/esp.rst85
-rw-r--r--docs/library/index.rst53
-rw-r--r--docs/library/io.rst (renamed from docs/library/uio.rst)6
-rw-r--r--docs/library/json.rst (renamed from docs/library/ujson.rst)6
-rw-r--r--docs/library/network.rst278
-rw-r--r--docs/library/re.rst (renamed from docs/library/ure.rst)8
-rw-r--r--docs/shared_bindings_matrix.py4
m---------extmod/ulab0
m---------lib/protomatter0
m---------lib/tinyusb0
-rw-r--r--locale/ID.po19
-rw-r--r--locale/circuitpython.pot167
-rw-r--r--locale/cs.po19
-rw-r--r--locale/de_DE.po20
-rw-r--r--locale/el.po14
-rw-r--r--locale/es.po19
-rw-r--r--locale/fil.po14
-rw-r--r--locale/fr.po21
-rw-r--r--locale/hi.po14
-rw-r--r--locale/it_IT.po14
-rw-r--r--locale/ja.po14
-rw-r--r--locale/ko.po14
-rw-r--r--locale/nl.po19
-rw-r--r--locale/pl.po22
-rw-r--r--locale/pt_BR.po20
-rw-r--r--locale/sv.po35
-rw-r--r--locale/zh_Latn_pinyin.po123
-rw-r--r--ports/atmel-samd/boards/8086_commander/mpconfigboard.mk1
-rwxr-xr-xports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk2
-rw-r--r--ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk2
-rw-r--r--ports/atmel-samd/boards/pycubed/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/boards/sam32/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/boards/serpente/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/boards/silicognition-m4-shim/board.c38
-rw-r--r--ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.h33
-rw-r--r--ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.mk14
-rw-r--r--ports/atmel-samd/boards/silicognition-m4-shim/pins.c54
-rwxr-xr-xports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/boards/ugame10/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.mk1
-rw-r--r--ports/atmel-samd/mpconfigport.h7
-rw-r--r--ports/atmel-samd/mpconfigport.mk52
-rw-r--r--ports/cxd56/README.md2
-rw-r--r--ports/cxd56/configs/circuitpython/defconfig1
m---------ports/cxd56/spresense-exported-sdk0
-rw-r--r--ports/cxd56/supervisor/internal_flash.c16
-rw-r--r--ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/board.c52
-rw-r--r--ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h36
-rw-r--r--ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk18
-rw-r--r--ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c55
-rw-r--r--ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig31
-rw-r--r--ports/esp32s2/common-hal/displayio/ParallelBus.c175
-rw-r--r--ports/esp32s2/common-hal/displayio/ParallelBus.h11
-rw-r--r--ports/esp32s2/mpconfigport.h1
-rw-r--r--ports/litex/mpconfigport.h2
-rw-r--r--ports/mimxrt10xx/mpconfigport.h2
-rw-r--r--ports/nrf/boards/pca10100/mpconfigboard.mk1
-rw-r--r--ports/nrf/boards/simmel/mpconfigboard.mk5
-rw-r--r--ports/nrf/mpconfigport.h3
-rw-r--r--ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.mk2
-rw-r--r--ports/raspberrypi/boards/raspberry_pi_pico/pins.c1
-rw-r--r--ports/raspberrypi/common-hal/busio/UART.c1
-rw-r--r--ports/raspberrypi/common-hal/microcontroller/Pin.c21
-rw-r--r--ports/raspberrypi/common-hal/microcontroller/__init__.c11
-rw-r--r--ports/raspberrypi/common-hal/watchdog/WatchDogMode.c1
-rw-r--r--ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c83
-rw-r--r--ports/raspberrypi/common-hal/watchdog/WatchDogTimer.h43
-rw-r--r--ports/raspberrypi/common-hal/watchdog/__init__.c1
-rw-r--r--ports/raspberrypi/mpconfigport.h2
-rw-r--r--ports/raspberrypi/mpconfigport.mk1
-rw-r--r--ports/stm/boards/espruino_pico/mpconfigboard.mk1
-rw-r--r--ports/stm/mpconfigport.h2
-rw-r--r--py/circuitpy_mpconfig.h76
-rw-r--r--py/circuitpy_mpconfig.mk14
-rw-r--r--shared-bindings/_eve/__init__.c150
-rw-r--r--shared-bindings/_eve/__init__.h8
-rw-r--r--shared-bindings/adafruit_bus_device/I2CDevice.c81
-rw-r--r--shared-bindings/adafruit_bus_device/I2CDevice.h4
-rw-r--r--shared-bindings/rgbmatrix/RGBMatrix.c28
-rw-r--r--shared-bindings/rgbmatrix/RGBMatrix.h2
-rw-r--r--shared-bindings/support_matrix.rst4
-rw-r--r--shared-module/_eve/__init__.c20
-rw-r--r--shared-module/adafruit_bus_device/I2CDevice.c50
-rw-r--r--shared-module/adafruit_bus_device/I2CDevice.h2
-rw-r--r--shared-module/rgbmatrix/RGBMatrix.c11
-rw-r--r--shared-module/rgbmatrix/RGBMatrix.h2
-rw-r--r--tools/build_board_info.py1
103 files changed, 1425 insertions, 870 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 0dbccdf4d..34e0b0821 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -304,6 +304,7 @@ jobs:
- "seeeduino_xiao"
- "serpente"
- "shirtty"
+ - "silicognition-m4-shim"
- "simmel"
- "snekboard"
- "sparkfun_lumidrive"
@@ -443,6 +444,7 @@ jobs:
- "espressif_kaluga_1"
- "espressif_saola_1_wroom"
- "espressif_saola_1_wrover"
+ - "lilygo_ttgo_t8_s2_st7789"
- "microdev_micro_s2"
- "muselab_nanoesp32_s2"
- "targett_module_clip_wroom"
@@ -462,12 +464,12 @@ jobs:
- run: git fetch --recurse-submodules=no https://github.com/adafruit/circuitpython refs/tags/*:refs/tags/*
- name: CircuitPython version
run: git describe --dirty --tags
- - uses: actions/cache@v1
+ - uses: actions/cache@v2
name: Fetch IDF tool cache
id: idf-cache
with:
path: ${{ github.workspace }}/.idf_tools
- key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20210122
+ key: ${{ runner.os }}-idf-tools-${{ hashFiles('.git/modules/ports/esp32s2/esp-idf/HEAD') }}-20210128
- name: Clone IDF submodules
run: |
(cd $IDF_PATH && git submodule update --init)
diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml
index af62072c8..76bfd7786 100644
--- a/.github/workflows/pre-commit.yml
+++ b/.github/workflows/pre-commit.yml
@@ -21,7 +21,7 @@ jobs:
run: git submodule update --init extmod/ulab
- name: set PY
run: echo >>$GITHUB_ENV PY="$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')"
- - uses: actions/cache@v1
+ - uses: actions/cache@v2
with:
path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
diff --git a/Makefile b/Makefile
index 845997beb..5857299c5 100644
--- a/Makefile
+++ b/Makefile
@@ -40,17 +40,18 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(BASEOPTS)
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(BASEOPTS)
-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
+TRANSLATE_SOURCES = extmod lib main.c ports/atmel-samd ports/cxd56 ports/esp32s2 ports/mimxrt10xx ports/nrf ports/raspberrypi ports/stm py shared-bindings shared-module supervisor
# Paths to exclude from TRANSLATE_SOURCES
# Each must be preceded by "-path"; if any wildcards, enclose in quotes.
# Separate by "-o" (Find's "or" operand)
TRANSLATE_SOURCES_EXC = -path "ports/*/build-*" \
-o -path "ports/*/build" \
- -o -path ports/esp32s2/esp-idf \
- -o -path ports/cxd56/spresense-exported-sdk \
- -o -path ports/stm/st_driver \
-o -path ports/atmel-samd/asf4 \
+ -o -path ports/cxd56/spresense-exported-sdk \
+ -o -path ports/esp32s2/esp-idf \
-o -path ports/mimxrt10xx/sdk \
+ -o -path ports/raspberrypi/sdk \
+ -o -path ports/stm/st_driver \
-o -path lib/tinyusb \
-o -path lib/lwip \
diff --git a/README.rst b/README.rst
index 19992d284..f14cf41ff 100644
--- a/README.rst
+++ b/README.rst
@@ -125,7 +125,7 @@ Behavior
get back into normal mode.
- RGB status LED indicating CircuitPython state, and errors through a sequence of colored flashes.
- Re-runs ``code.py`` or other main file after file system writes over USB mass storage. (Disable with
- ``samd.disable_autoreload()``)
+ ``supervisor.disable_autoreload()``)
- Entering the REPL after the main code is finished requires a key press which enters the REPL and
disables autoreload.
- Main is one of these: ``code.txt``, ``code.py``, ``main.py``,
diff --git a/docs/design_guide.rst b/docs/design_guide.rst
index 75825893a..7a8c76b50 100644
--- a/docs/design_guide.rst
+++ b/docs/design_guide.rst
@@ -520,7 +520,9 @@ properties.
+-----------------------+-----------------------+-------------------------------------------------------------------------+
| ``temperature`` | float | degrees centigrade |
+-----------------------+-----------------------+-------------------------------------------------------------------------+
-| ``eCO2`` | float | equivalent CO2 in ppm |
+| ``CO2`` | float | measured CO2 in ppm |
++-----------------------+-----------------------+-------------------------------------------------------------------------+
+| ``eCO2`` | float | equivalent/estimated CO2 in ppm (estimated from some other measurement) |
+-----------------------+-----------------------+-------------------------------------------------------------------------+
| ``TVOC`` | float | Total Volatile Organic Compounds in ppb |
+-----------------------+-----------------------+-------------------------------------------------------------------------+
diff --git a/docs/library/uerrno.rst b/docs/library/errno.rst
index 72f71f0aa..96777b205 100644
--- a/docs/library/uerrno.rst
+++ b/docs/library/errno.rst
@@ -1,9 +1,7 @@
-:mod:`uerrno` -- system error codes
+:mod:`errno` -- system error codes
===================================
-.. include:: ../templates/unsupported_in_circuitpython.inc
-
-.. module:: uerrno
+.. module:: errno
:synopsis: system error codes
|see_cpython_module| :mod:`cpython:errno`.
@@ -22,7 +20,7 @@ Constants
try:
os.mkdir("my_dir")
except OSError as exc:
- if exc.args[0] == uerrno.EEXIST:
+ if exc.args[0] == errno.EEXIST:
print("Directory already exists")
.. data:: errorcode
@@ -30,5 +28,5 @@ Constants
Dictionary mapping numeric error codes to strings with symbolic error
code (see above)::
- >>> print(uerrno.errorcode[uerrno.EEXIST])
+ >>> print(errno.errorcode[uerrno.EEXIST])
EEXIST
diff --git a/docs/library/esp.rst b/docs/library/esp.rst
deleted file mode 100644
index 125aaa890..000000000
--- a/docs/library/esp.rst
+++ /dev/null
@@ -1,85 +0,0 @@
-:mod:`esp` --- functions related to the ESP8266
-===============================================
-
-.. include:: ../templates/unsupported_in_circuitpython.inc
-
-.. module:: esp
- :synopsis: functions related to the ESP8266
-
-The ``esp`` module contains specific functions related to the ESP8266 module.
-
-
-Functions
----------
-
-.. function:: sleep_type([sleep_type])
-
- Get or set the sleep type.
-
- If the *sleep_type* parameter is provided, sets the sleep type to its
- value. If the function is called without parameters, returns the current
- sleep type.
-
- The possible sleep types are defined as constants:
-
- * ``SLEEP_NONE`` -- all functions enabled,
- * ``SLEEP_MODEM`` -- modem sleep, shuts down the WiFi Modem circuit.
- * ``SLEEP_LIGHT`` -- light sleep, shuts down the WiFi Modem circuit
- and suspends the processor periodically.
-
- The system enters the set sleep mode automatically when possible.
-
-.. function:: deepsleep(time=0)
-
- Enter deep sleep.
-
- The whole module powers down, except for the RTC clock circuit, which can
- be used to restart the module after the specified time if the pin 16 is
- connected to the reset pin. Otherwise the module will sleep until manually
- reset.
-
-.. function:: flash_id()
-
- Read the device ID of the flash memory.
-
-.. function:: flash_read(byte_offset, length_or_buffer)
-
-.. function:: flash_write(byte_offset, bytes)
-
-.. function:: flash_erase(sector_no)
-
-.. function:: set_native_code_location(start, length)
-
- Set the location that native code will be placed for execution after it is
- compiled. Native code is emitted when the ``@micropython.native``,
- ``@micropython.viper`` and ``@micropython.asm_xtensa`` decorators are applied
- to a function. The ESP8266 must execute code from either iRAM or the lower
- 1MByte of flash (which is memory mapped), and this function controls the
- location.
-
- If *start* and *length* are both ``None`` then the native code location is
- set to the unused portion of memory at the end of the iRAM1 region. The
- size of this unused portion depends on the firmware and is typically quite
- small (around 500 bytes), and is enough to store a few very small
- functions. The advantage of using this iRAM1 region is that it does not
- get worn out by writing to it.
-
- If neither *start* nor *length* are ``None`` then they should be integers.
- *start* should specify the byte offset from the beginning of the flash at
- which native code should be stored. *length* specifies how many bytes of
- flash from *start* can be used to store native code. *start* and *length*
- should be multiples of the sector size (being 4096 bytes). The flash will
- be automatically erased before writing to it so be sure to use a region of
- flash that is not otherwise used, for example by the firmware or the
- filesystem.
-
- When using the flash to store native code *start+length* must be less
- than or equal to 1MByte. Note that the flash can be worn out if repeated
- erasures (and writes) are made so use this feature sparingly.
- In particular, native code needs to be recompiled and rewritten to flash
- on each boot (including wake from deepsleep).
-
- In both cases above, using iRAM1 or flash, if there is no more room left
- in the specified region then the use of a native decorator on a function
- will lead to `MemoryError` exception being raised during compilation of
- that function.
diff --git a/docs/library/index.rst b/docs/library/index.rst
index e91387242..181ff0109 100644
--- a/docs/library/index.rst
+++ b/docs/library/index.rst
@@ -6,35 +6,21 @@ MicroPython libraries
Python standard libraries and micro-libraries
---------------------------------------------
-These libraries are inherited from MicroPython.
-They are similar to the standard Python libraries with the same name
-or with the "u" prefix dropped.
+The libraries below are inherited from MicroPython.
+They are similar to the standard Python libraries with the same name.
They implement a subset of or a variant of the corresponding
standard Python library.
-.. warning::
-
- Though these MicroPython-based libraries are available in CircuitPython,
- their functionality may change in the future, perhaps significantly.
- As CircuitPython continues to develop, new versions of these libraries will
- be created that are more compliant with the standard Python libraries.
- You may need to change your code later if you rely
- on any non-standard functionality they currently provide.
-
CircuitPython's long-term goal is that code written in CircuitPython
using Python standard libraries will be runnable on CPython without changes.
-Some libraries below are not enabled on CircuitPython builds with
+These libraries are not enabled on CircuitPython builds with
limited flash memory, usually on non-Express builds:
-``uerrno``, ``ure``.
-
-Some libraries are not currently enabled in any CircuitPython build, but may be in the future:
-``uio``, ``ujson``, ``uzlib``.
+``binascii``, ``errno``, ``json``, ``re``.
-Some libraries are only enabled only WiFi-capable ports (ESP8266, nRF)
-because they are typically used for network software:
-``binascii``, ``hashlib``, ``uheapq``, ``uselect``, ``ussl``.
-Not all of these are enabled on all WiFi-capable ports.
+These libraries are not currently enabled in any CircuitPython build, but may be in the future,
+with the ``u`` prefix dropped:
+``uctypes``, ``uhashlib``, ``uzlib``.
.. toctree::
:maxdepth: 1
@@ -44,13 +30,14 @@ Not all of these are enabled on all WiFi-capable ports.
array.rst
binascii.rst
collections.rst
+ errno.rst
gc.rst
hashlib.rst
+ io.rst
+ json.rst
+ re.rst
sys.rst
- uerrno.rst
- uio.rst
- ujson.rst
- ure.rst
+ uctypes.rst
uselect.rst
usocket.rst
ussl.rst
@@ -59,8 +46,8 @@ Not all of these are enabled on all WiFi-capable ports.
Omitted functions in the ``string`` library
-------------------------------------------
-A few string operations are not enabled on CircuitPython
-M0 non-Express builds, due to limited flash memory:
+A few string operations are not enabled on small builds
+(usually non-Express), due to limited flash memory:
``string.center()``, ``string.partition()``, ``string.splitlines()``,
``string.reversed()``.
@@ -78,15 +65,3 @@ versions of CircuitPython.
btree.rst
framebuf.rst
micropython.rst
- network.rst
- uctypes.rst
-
-Libraries specific to the ESP8266
----------------------------------
-
-The following libraries are specific to the ESP8266.
-
-.. toctree::
- :maxdepth: 2
-
- esp.rst
diff --git a/docs/library/uio.rst b/docs/library/io.rst
index d1f7c111f..37e3eb7c9 100644
--- a/docs/library/uio.rst
+++ b/docs/library/io.rst
@@ -1,9 +1,7 @@
-:mod:`uio` -- input/output streams
+:mod:`io` -- input/output streams
==================================
-.. include:: ../templates/unsupported_in_circuitpython.inc
-
-.. module:: uio
+.. module:: io
:synopsis: input/output streams
|see_cpython_module| :mod:`cpython:io`.
diff --git a/docs/library/ujson.rst b/docs/library/json.rst
index 4ed91f053..21574e556 100644
--- a/docs/library/ujson.rst
+++ b/docs/library/json.rst
@@ -1,9 +1,7 @@
-:mod:`ujson` -- JSON encoding and decoding
+:mod:`json` -- JSON encoding and decoding
==========================================
-.. include:: ../templates/unsupported_in_circuitpython.inc
-
-.. module:: ujson
+.. module:: json
:synopsis: JSON encoding and decoding
|see_cpython_module| :mod:`cpython:json`.
diff --git a/docs/library/network.rst b/docs/library/network.rst
deleted file mode 100644
index 3bd41150d..000000000
--- a/docs/library/network.rst
+++ /dev/null
@@ -1,278 +0,0 @@
-****************************************
-:mod:`network` --- network configuration
-****************************************
-
-.. include:: ../templates/unsupported_in_circuitpython.inc
-
-.. module:: network
- :noindex:
- :synopsis: network configuration
-
-This module provides network drivers and routing configuration. To use this
-module, a MicroPython variant/build with network capabilities must be installed.
-Network drivers for specific hardware are available within this module and are
-used to configure hardware network interface(s). Network services provided
-by configured interfaces are then available for use via the :mod:`usocket`
-module.
-
-For example::
-
- # connect/ show IP config a specific network interface
- # see below for examples of specific drivers
- import network
- import utime
- nic = network.Driver(...)
- if not nic.isconnected():
- nic.connect()
- print("Waiting for connection...")
- while not nic.isconnected():
- utime.sleep(1)
- print(nic.ifconfig())
-
- # now use usocket as usual
- import usocket as socket
- addr = socket.getaddrinfo('micropython.org', 80)[0][-1]
- s = socket.socket()
- s.connect(addr)
- s.send(b'GET / HTTP/1.1\r\nHost: micropython.org\r\n\r\n')
- data = s.recv(1000)
- s.close()
-
-Common network adapter interface
-================================
-
-This section describes an (implied) abstract base class for all network
-interface classes implemented by ``MicroPython ports <MicroPython port>``
-for different hardware. This means that MicroPython does not actually
-provide ``AbstractNIC`` class, but any actual NIC class, as described
-in the following sections, implements methods as described here.
-
-.. class:: AbstractNIC(id=None, ...)
-
-Instantiate a network interface object. Parameters are network interface
-dependent. If there are more than one interface of the same type, the first
-parameter should be `id`.
-
- .. method:: active([is_active])
-
- Activate ("up") or deactivate ("down") the network interface, if
- a boolean argument is passed. Otherwise, query current state if
- no argument is provided. Most other methods require an active
- interface (behavior of calling them on inactive interface is
- undefined).
-
- .. method:: connect([service_id, key=None, \*, ...])
-
- Connect the interface to a network. This method is optional, and
- available only for interfaces which are not "always connected".
- If no parameters are given, connect to the default (or the only)
- service. If a single parameter is given, it is the primary identifier
- of a service to connect to. It may be accompanied by a key
- (password) required to access said service. There can be further
- arbitrary keyword-only parameters, depending on the networking medium
- type and/or particular device. Parameters can be used to: a)
- specify alternative service identifier types; b) provide additional
- connection parameters. For various medium types, there are different
- sets of predefined/recommended parameters, among them:
-
- * WiFi: *bssid* keyword to connect to a specific BSSID (MAC address)
-
- .. method:: disconnect()
-
- Disconnect from network.
-
- .. method:: isconnected()
-
- Returns ``True`` if connected to network, otherwise returns ``False``.
-
- .. method:: scan(\*, ...)
-
- Scan for the available network services/connections. Returns a
- list of tuples with discovered service parameters. For various
- network media, there are different variants of predefined/
- recommended tuple formats, among them:
-
- * WiFi: (ssid, bssid, channel, RSSI, authmode, hidden). There
- may be further fields, specific to a particular device.
-
- The function may accept additional keyword arguments to filter scan
- results (e.g. scan for a particular service, on a particular channel,
- for services of a particular set, etc.), and to affect scan
- duration and other parameters. Where possible, parameter names
- should match those in connect().
-
- .. method:: status()
-
- Return detailed status of the interface, values are dependent
- on the network medium/technology.
-
- .. method:: ifconfig([(ip, subnet, gateway, dns)])
-
- Get/set IP-level network interface parameters: IP address, subnet mask,
- gateway and DNS server. When called with no arguments, this method returns
- a 4-tuple with the above information. To set the above values, pass a
- 4-tuple with the required information. For example::
-
- nic.ifconfig(('192.168.0.4', '255.255.255.0', '192.168.0.1', '8.8.8.8'))
-
- .. method:: config('param')
- config(param=value, ...)
-
- Get or set general network interface parameters. These methods allow to work
- with additional parameters beyond standard IP configuration (as dealt with by
- `ifconfig()`). These include network-specific and hardware-specific
- parameters and status values. For setting parameters, the keyword argument
- syntax should be used, and multiple parameters can be set at once. For
- querying, a parameter name should be quoted as a string, and only one
- parameter can be queried at a time::
-
- # Set WiFi access point name (formally known as ESSID) and WiFi channel
- ap.config(essid='My AP', channel=11)
- # Query params one by one
- print(ap.config('essid'))
- print(ap.config('channel'))
- # Extended status information also available this way
- print(sta.config('rssi'))
-
-.. _network.WLAN:
-
-Functions
-=========
-
-.. function:: phy_mode([mode])
-
- Get or set the PHY mode.
-
- If the *mode* parameter is provided, sets the mode to its value. If
- the function is called without parameters, returns the current mode.
-
- The possible modes are defined as constants:
- * ``MODE_11B`` -- IEEE 802.11b,
- * ``MODE_11G`` -- IEEE 802.11g,
- * ``MODE_11N`` -- IEEE 802.11n.
-
-class WLAN
-==========
-
-This class provides a driver for WiFi network processor in the ESP8266. Example usage::
-
- import network
- # enable station interface and connect to WiFi access point
- nic = network.WLAN(network.STA_IF)
- nic.active(True)
- nic.connect('your-ssid', 'your-password')
- # now use sockets as usual
-
-Constructors
-------------
-.. class:: WLAN(interface_id)
-
-Create a WLAN network interface object. Supported interfaces are
-``network.STA_IF`` (station aka client, connects to upstream WiFi access
-points) and ``network.AP_IF`` (access point, allows other WiFi clients to
-connect). Availability of the methods below depends on interface type.
-For example, only STA interface may `connect()` to an access point.
-
-Methods
--------
-
-.. method:: wlan.active([is_active])
-
- Activate ("up") or deactivate ("down") network interface, if boolean
- argument is passed. Otherwise, query current state if no argument is
- provided. Most other methods require active interface.
-
-.. method:: wlan.connect(ssid=None, password=None, \*, bssid=None)
-
- Connect to the specified wireless network, using the specified password.
- If *bssid* is given then the connection will be restricted to the
- access-point with that MAC address (the *ssid* must also be specified
- in this case).
-
-.. method:: wlan.disconnect()
-
- Disconnect from the currently connected wireless network.
-
-.. method:: wlan.scan()
-
- Scan for the available wireless networks.
-
- Scanning is only possible on STA interface. Returns list of tuples with
- the information about WiFi access points:
-
- (ssid, bssid, channel, RSSI, authmode, hidden)
-
- *bssid* is hardware address of an access point, in binary form, returned as
- bytes object. You can use `binascii.hexlify()` to convert it to ASCII form.
-
- There are five values for authmode:
-
- * 0 -- open
- * 1 -- WEP
- * 2 -- WPA-PSK
- * 3 -- WPA2-PSK
- * 4 -- WPA/WPA2-PSK
-
- and two for hidden:
-
- * 0 -- visible
- * 1 -- hidden
-
-.. method:: wlan.status()
-
- Return the current status of the wireless connection.
-
- The possible statuses are defined as constants:
-
- * ``STAT_IDLE`` -- no connection and no activity,
- * ``STAT_CONNECTING`` -- connecting in progress,
- * ``STAT_WRONG_PASSWORD`` -- failed due to incorrect password,
- * ``STAT_NO_AP_FOUND`` -- failed because no access point replied,
- * ``STAT_CONNECT_FAIL`` -- failed due to other problems,
- * ``STAT_GOT_IP`` -- connection successful.
-
-.. method:: wlan.isconnected()
-
- In case of STA mode, returns ``True`` if connected to a WiFi access
- point and has a valid IP address. In AP mode returns ``True`` when a
- station is connected. Returns ``False`` otherwise.
-
-.. method:: wlan.ifconfig([(ip, subnet, gateway, dns)])
-
- Get/set IP-level network interface parameters: IP address, subnet mask,
- gateway and DNS server. When called with no arguments, this method returns
- a 4-tuple with the above information. To set the above values, pass a
- 4-tuple with the required information. For example::
-
- nic.ifconfig(('192.168.0.4', '255.255.255.0', '192.168.0.1', '8.8.8.8'))
-
-.. method:: wlan.config('param')
- wlan.config(param=value, ...)
-
- Get or set general network interface parameters. These methods allow to work
- with additional parameters beyond standard IP configuration (as dealt with by
- `wlan.ifconfig()`). These include network-specific and hardware-specific
- parameters. For setting parameters, keyword argument syntax should be used,
- multiple parameters can be set at once. For querying, parameters name should
- be quoted as a string, and only one parameter can be queries at time::
-
- # Set WiFi access point name (formally known as ESSID) and WiFi channel
- ap.config(essid='My AP', channel=11)
- # Query params one by one
- print(ap.config('essid'))
- print(ap.config('channel'))
-
- Following are commonly supported parameters (availability of a specific parameter
- depends on network technology type, driver, and ``MicroPython port``).
-
- ============= ===========
- Parameter Description
- ============= ===========
- mac MAC address (bytes)
- essid WiFi access point name (string)
- channel WiFi channel (integer)
- hidden Whether ESSID is hidden (boolean)
- authmode Authentication mode supported (enumeration, see module constants)
- password Access password (string)
- dhcp_hostname The DHCP hostname to use
- ============= ===========
diff --git a/docs/library/ure.rst b/docs/library/re.rst
index 4af182b01..bdcc9f52c 100644
--- a/docs/library/ure.rst
+++ b/docs/library/re.rst
@@ -1,9 +1,7 @@
-:mod:`ure` -- simple regular expressions
+:mod:`re` -- simple regular expressions
========================================
-.. include:: ../templates/unsupported_in_circuitpython.inc
-
-.. module:: ure
+.. module:: re
:synopsis: regular expressions
|see_cpython_module| :mod:`cpython:re`.
@@ -77,7 +75,7 @@ Regex objects
-------------
Compiled regular expression. Instances of this class are created using
-`ure.compile()`.
+`re.compile()`.
.. method:: regex.match(string)
regex.search(string)
diff --git a/docs/shared_bindings_matrix.py b/docs/shared_bindings_matrix.py
index f38c0b64a..e62b1d218 100644
--- a/docs/shared_bindings_matrix.py
+++ b/docs/shared_bindings_matrix.py
@@ -30,7 +30,7 @@ import sys
from concurrent.futures import ThreadPoolExecutor
-SUPPORTED_PORTS = ['atmel-samd', 'esp32s2', 'litex', 'mimxrt10xx', 'nrf', 'stm']
+SUPPORTED_PORTS = ['atmel-samd', 'cxd56', 'esp32s2', 'litex', 'mimxrt10xx', 'nrf', 'raspberrypi', 'stm']
def get_circuitpython_root_dir():
""" The path to the root './circuitpython' directory
@@ -44,7 +44,7 @@ def get_shared_bindings():
""" Get a list of modules in shared-bindings based on folder names
"""
shared_bindings_dir = get_circuitpython_root_dir() / "shared-bindings"
- return [item.name for item in shared_bindings_dir.iterdir()] + ["ulab"]
+ return [item.name for item in shared_bindings_dir.iterdir()] + ["binascii", "errno", "json", "re", "ulab"]
def read_mpconfig():
diff --git a/extmod/ulab b/extmod/ulab
-Subproject 8b804f3bcd8c5a3ac1b3e09e0ff7faf8270751d
+Subproject 743d86487c83e42024ed508ed50499ad0a527d5
diff --git a/lib/protomatter b/lib/protomatter
-Subproject 902c16f49197a8baf5e71ec924a812a86e733a7
+Subproject 5e925cea7a55273e375a6129761cb29b4e750d4
diff --git a/lib/tinyusb b/lib/tinyusb
-Subproject 388abe9d9cc0a7c360fd902e01461a53bb7b3f4
+Subproject 045674745afa59028fbeed6dac5cb5a9c4a6033
diff --git a/locale/ID.po b/locale/ID.po
index 7ae5b50bd..e11123398 100644
--- a/locale/ID.po
+++ b/locale/ID.po
@@ -63,8 +63,9 @@ msgstr "%%c harus int atau char"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
-msgstr "pin alamat %d dan pin rgb %d menunjukkan tinggi %d, bukan %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
+msgstr ""
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
msgid "%q failure: %d"
@@ -523,7 +524,6 @@ msgstr "Panjang buffer harus kelipatan 512"
msgid "Buffer must be a multiple of 512 bytes"
msgstr ""
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "Penyangga harus memiliki panjang setidaknya 1"
@@ -538,6 +538,7 @@ msgid "Buffer too short by %d bytes"
msgstr "Buffer terlalu pendek untuk %d byte"
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, c-format
msgid "Bus pin %d is already in use"
@@ -818,6 +819,10 @@ msgstr "DAC sudah digunakan"
msgid "Data 0 pin must be byte aligned"
msgstr "Data 0 pin harus byte disejajarkan"
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr "Potongan data harus mengikuti fmt chunk"
@@ -1613,7 +1618,6 @@ msgstr ""
"Frekuensi PWM tidak dapat ditulis ketika variabel_frequency Salah pada "
"konstruksi."
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
@@ -3762,6 +3766,10 @@ msgstr "sintaksis error pada pendeskripsi uctypes"
msgid "threshold must be in the range 0-65536"
msgstr ""
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
@@ -4051,6 +4059,9 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)"
msgstr ""
+#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+#~ msgstr "pin alamat %d dan pin rgb %d menunjukkan tinggi %d, bukan %d"
+
#~ msgid ""
#~ "\n"
#~ "Code done running. Waiting for reload.\n"
diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot
index c88a32a05..ba434a9db 100644
--- a/locale/circuitpython.pot
+++ b/locale/circuitpython.pot
@@ -58,7 +58,8 @@ msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
msgstr ""
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
@@ -338,6 +339,10 @@ msgstr ""
msgid "All event channels in use"
msgstr ""
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+msgid "All state machines in use"
+msgstr ""
+
#: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "All sync event channels in use"
msgstr ""
@@ -386,6 +391,7 @@ msgstr ""
#: ports/cxd56/common-hal/analogio/AnalogOut.c
#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c
#: ports/nrf/common-hal/analogio/AnalogOut.c
+#: ports/raspberrypi/common-hal/analogio/AnalogOut.c
msgid "AnalogOut functionality not supported"
msgstr ""
@@ -516,7 +522,6 @@ msgstr ""
msgid "Buffer must be a multiple of 512 bytes"
msgstr ""
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr ""
@@ -531,6 +536,7 @@ msgid "Buffer too short by %d bytes"
msgstr ""
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, c-format
msgid "Bus pin %d is already in use"
@@ -585,6 +591,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c
#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c
#: ports/nrf/common-hal/digitalio/DigitalInOut.c
+#: ports/raspberrypi/common-hal/digitalio/DigitalInOut.c
msgid "Cannot get pull while in output mode"
msgstr ""
@@ -804,6 +811,10 @@ msgstr ""
msgid "Data 0 pin must be byte aligned"
msgstr ""
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr ""
@@ -862,7 +873,8 @@ msgstr ""
msgid "Error: Failure to bind"
msgstr ""
-#: py/enum.c shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c
+#: ports/raspberrypi/bindings/rp2pio/StateMachine.c py/enum.c
+#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c
#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c
#: shared-bindings/neopixel_write/__init__.c
#: shared-bindings/terminalio/Terminal.c
@@ -1044,6 +1056,10 @@ msgstr ""
msgid "I2C Init Error"
msgstr ""
+#: ports/raspberrypi/common-hal/busio/I2C.c
+msgid "I2C peripheral in use"
+msgstr ""
+
#: shared-bindings/audiobusio/I2SOut.c
msgid "I2SOut not available"
msgstr ""
@@ -1067,6 +1083,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr ""
+#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
+msgid "Init program size invalid"
+msgstr ""
+
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "Initialization failed due to lack of memory"
msgstr ""
@@ -1079,6 +1099,31 @@ msgstr ""
msgid "Input/output error"
msgstr ""
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+#, c-format
+msgid "Instruction %d jumps on pin"
+msgstr ""
+
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+#, c-format
+msgid "Instruction %d shifts in more bits than pin count"
+msgstr ""
+
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+#, c-format
+msgid "Instruction %d shifts out more bits than pin count"
+msgstr ""
+
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+#, c-format
+msgid "Instruction %d uses extra pin"
+msgstr ""
+
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+#, c-format
+msgid "Instruction %d waits on input outside of count"
+msgstr ""
+
#: ports/nrf/common-hal/_bleio/__init__.c
msgid "Insufficient authentication"
msgstr ""
@@ -1130,7 +1175,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/pwmio/PWMOut.c
#: ports/cxd56/common-hal/pwmio/PWMOut.c ports/nrf/common-hal/pwmio/PWMOut.c
-#: shared-bindings/pwmio/PWMOut.c
+#: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c
msgid "Invalid PWM frequency"
msgstr ""
@@ -1224,6 +1269,8 @@ msgstr ""
#: ports/mimxrt10xx/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/SPI.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c
+#: ports/raspberrypi/common-hal/busio/I2C.c
+#: ports/raspberrypi/common-hal/busio/SPI.c
msgid "Invalid pins"
msgstr ""
@@ -1337,6 +1384,36 @@ msgstr ""
msgid "Missing MISO or MOSI Pin"
msgstr ""
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+#, c-format
+msgid "Missing first_in_pin. Instruction %d reads pin(s)"
+msgstr ""
+
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+#, c-format
+msgid "Missing first_in_pin. Instruction %d shifts in from pin(s)"
+msgstr ""
+
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+#, c-format
+msgid "Missing first_in_pin. Instruction %d waits based on pin"
+msgstr ""
+
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+#, c-format
+msgid "Missing first_out_pin. Instruction %d shifts out to pin(s)"
+msgstr ""
+
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+#, c-format
+msgid "Missing first_out_pin. Instruction %d writes pin(s)"
+msgstr ""
+
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+#, c-format
+msgid "Missing first_set_pin. Instruction %d sets pin(s)"
+msgstr ""
+
#: shared-bindings/displayio/Group.c
msgid "Must be a %q subclass."
msgstr ""
@@ -1390,14 +1467,14 @@ msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
-#: ports/stm/common-hal/busio/UART.c
+#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "No RX pin"
msgstr ""
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c
#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
-#: ports/stm/common-hal/busio/UART.c
+#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c
msgid "No TX pin"
msgstr ""
@@ -1454,6 +1531,10 @@ msgstr ""
msgid "No network with that ssid"
msgstr ""
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+msgid "No out in program"
+msgstr ""
+
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
msgstr ""
@@ -1509,6 +1590,10 @@ msgstr ""
msgid "Only 8 or 16 bit mono with "
msgstr ""
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+msgid "Only IN/OUT of up to 8 supported"
+msgstr ""
+
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr ""
@@ -1580,8 +1665,8 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
+#: ports/raspberrypi/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
msgstr ""
@@ -1594,11 +1679,20 @@ msgstr ""
msgid "Permission denied"
msgstr ""
+#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
+msgid "Pin count must be at least 1"
+msgstr ""
+
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+msgid "Pin count too large"
+msgstr ""
+
#: ports/atmel-samd/common-hal/analogio/AnalogIn.c
#: ports/cxd56/common-hal/analogio/AnalogIn.c
#: ports/esp32s2/common-hal/analogio/AnalogIn.c
#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c
#: ports/nrf/common-hal/analogio/AnalogIn.c
+#: ports/raspberrypi/common-hal/analogio/AnalogIn.c
#: ports/stm/common-hal/analogio/AnalogIn.c
msgid "Pin does not have ADC capabilities"
msgstr ""
@@ -1659,10 +1753,34 @@ msgstr ""
msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n"
msgstr ""
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+msgid "Program does IN without loading ISR"
+msgstr ""
+
+#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c
+msgid "Program does OUT without loading OSR"
+msgstr ""
+
+#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
+msgid "Program must contain at least one 16-bit instruction."
+msgstr ""
+
+#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
+msgid "Program size invalid"
+msgstr ""
+
+#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
+msgid "Program too large"
+msgstr ""
+
#: shared-bindings/digitalio/DigitalInOut.c
msgid "Pull not used when direction is output."
msgstr ""
+#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c
+msgid "RAISE mode is not implemented"
+msgstr ""
+
#: ports/stm/common-hal/os/__init__.c
msgid "RNG DeInit Error"
msgstr ""
@@ -1745,6 +1863,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c
#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
+#: ports/raspberrypi/common-hal/busio/I2C.c
msgid "SDA or SCL needs a pull up"
msgstr ""
@@ -1766,6 +1885,10 @@ msgstr ""
msgid "SPI Re-initialization error"
msgstr ""
+#: ports/raspberrypi/common-hal/busio/SPI.c
+msgid "SPI peripheral in use"
+msgstr ""
+
#: shared-bindings/audiomixer/Mixer.c
msgid "Sample rate must be positive"
msgstr ""
@@ -1796,6 +1919,14 @@ msgstr ""
msgid "Server side context cannot have hostname"
msgstr ""
+#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
+msgid "Set pin count must be between 1 and 5"
+msgstr ""
+
+#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
+msgid "Side set pin count must be between 1 and 5"
+msgstr ""
+
#: ports/cxd56/common-hal/camera/Camera.c
msgid "Size not supported"
msgstr ""
@@ -1960,6 +2091,10 @@ msgstr ""
msgid "UART Re-init error"
msgstr ""
+#: ports/raspberrypi/common-hal/busio/UART.c
+msgid "UART not yet supported"
+msgstr ""
+
#: ports/stm/common-hal/busio/UART.c
msgid "UART write error"
msgstr ""
@@ -2064,7 +2199,8 @@ msgid ""
msgstr ""
#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c
-#: ports/esp32s2/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c
+#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c
msgid "Unsupported baudrate"
msgstr ""
@@ -2115,6 +2251,7 @@ msgid "WARNING: Your code filename has two extensions\n"
msgstr ""
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
+#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
@@ -3496,6 +3633,7 @@ msgstr ""
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
#: ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h
#: ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h
+#: ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
#: ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
#: ports/esp32s2/boards/muselab_nanoesp32_s2/mpconfigboard.h
#: ports/esp32s2/boards/targett_module_clip_wroom/mpconfigboard.h
@@ -3513,6 +3651,14 @@ msgstr ""
msgid "pressing both buttons at start up.\n"
msgstr ""
+#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
+msgid "pull_threshold must be between 1 and 32"
+msgstr ""
+
+#: ports/raspberrypi/bindings/rp2pio/StateMachine.c
+msgid "push_threshold must be between 1 and 32"
+msgstr ""
+
#: extmod/modutimeq.c
msgid "queue overflow"
msgstr ""
@@ -3706,12 +3852,17 @@ msgstr ""
msgid "threshold must be in the range 0-65536"
msgstr ""
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
+#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
diff --git a/locale/cs.po b/locale/cs.po
index d7ab891b6..9181d1f70 100644
--- a/locale/cs.po
+++ b/locale/cs.po
@@ -61,8 +61,9 @@ msgstr "%%c vyžaduje int nebo char"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
-msgstr "%d adresní piny a %d rgb piny označují výšku %d, nikoli %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
+msgstr ""
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
msgid "%q failure: %d"
@@ -519,7 +520,6 @@ msgstr ""
msgid "Buffer must be a multiple of 512 bytes"
msgstr ""
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr ""
@@ -534,6 +534,7 @@ msgid "Buffer too short by %d bytes"
msgstr ""
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, c-format
msgid "Bus pin %d is already in use"
@@ -803,6 +804,10 @@ msgstr ""
msgid "Data 0 pin must be byte aligned"
msgstr ""
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr ""
@@ -1587,7 +1592,6 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
@@ -3713,6 +3717,10 @@ msgstr ""
msgid "threshold must be in the range 0-65536"
msgstr ""
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
@@ -4001,6 +4009,9 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)"
msgstr ""
+#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+#~ msgstr "%d adresní piny a %d rgb piny označují výšku %d, nikoli %d"
+
#~ msgid ""
#~ "\n"
#~ "Code done running. Waiting for reload.\n"
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 25321f63e..8d8f2d521 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -62,8 +62,9 @@ msgstr "%%c erwartet int oder char"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
-msgstr "%d Adress-Pins und %d rgb-Pins zeigen eine Höhe von %d, nicht von %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
+msgstr ""
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
msgid "%q failure: %d"
@@ -524,7 +525,6 @@ msgstr "Die Pufferlänge muss ein vielfaches von 512 sein"
msgid "Buffer must be a multiple of 512 bytes"
msgstr "Der Puffer muss ein vielfaches von 512 bytes sein"
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "Der Puffer muss eine Mindestenslänge von 1 haben"
@@ -539,6 +539,7 @@ msgid "Buffer too short by %d bytes"
msgstr "Buffer um %d Bytes zu kurz"
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, c-format
msgid "Bus pin %d is already in use"
@@ -815,6 +816,10 @@ msgstr "DAC wird schon benutzt"
msgid "Data 0 pin must be byte aligned"
msgstr "Data 0 pin muss am Byte ausgerichtet sein"
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr "Dem fmt Block muss ein Datenblock folgen"
@@ -1612,7 +1617,6 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr "Die PWM-Frequenz ist nicht schreibbar wenn variable_Frequenz = False."
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
@@ -3796,6 +3800,10 @@ msgstr "Syntaxfehler in uctypes Deskriptor"
msgid "threshold must be in the range 0-65536"
msgstr "threshold muss im Intervall 0-65536 liegen"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() nimmt eine 9-Sequenz an"
@@ -4088,6 +4096,10 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)"
msgstr ""
+#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+#~ msgstr ""
+#~ "%d Adress-Pins und %d rgb-Pins zeigen eine Höhe von %d, nicht von %d"
+
#~ msgid "input argument must be an integer or a 2-tuple"
#~ msgstr "Das Eingabeargument muss eine Ganzzahl oder ein 2-Tupel sein"
diff --git a/locale/el.po b/locale/el.po
index 104dff4ee..04b63261e 100644
--- a/locale/el.po
+++ b/locale/el.po
@@ -58,7 +58,8 @@ msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
msgstr ""
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
@@ -516,7 +517,6 @@ msgstr ""
msgid "Buffer must be a multiple of 512 bytes"
msgstr ""
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr ""
@@ -531,6 +531,7 @@ msgid "Buffer too short by %d bytes"
msgstr ""
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, c-format
msgid "Bus pin %d is already in use"
@@ -800,6 +801,10 @@ msgstr ""
msgid "Data 0 pin must be byte aligned"
msgstr ""
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr ""
@@ -1584,7 +1589,6 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
@@ -3710,6 +3714,10 @@ msgstr ""
msgid "threshold must be in the range 0-65536"
msgstr ""
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
diff --git a/locale/es.po b/locale/es.po
index 58634a597..29b238768 100644
--- a/locale/es.po
+++ b/locale/es.po
@@ -63,9 +63,9 @@ msgstr "%%c requiere int o char"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
msgstr ""
-"%d pines de dirección y %d pines rgb indican una altura de %d, no de %d"
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
msgid "%q failure: %d"
@@ -528,7 +528,6 @@ msgstr "El tamaño del búfer debe ser múltiplo de 512"
msgid "Buffer must be a multiple of 512 bytes"
msgstr "Búfer deber ser un múltiplo de 512 bytes"
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "Buffer debe ser de longitud 1 como minimo"
@@ -543,6 +542,7 @@ msgid "Buffer too short by %d bytes"
msgstr "Búffer muy corto por %d bytes"
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, c-format
msgid "Bus pin %d is already in use"
@@ -818,6 +818,10 @@ msgstr "DAC ya está siendo utilizado"
msgid "Data 0 pin must be byte aligned"
msgstr "El pin Data 0 debe estar alineado a bytes"
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr "Trozo de datos debe seguir fmt chunk"
@@ -1613,7 +1617,6 @@ msgstr ""
"La frecuencia de PWM no se puede escribir variable_frequency es False en la "
"construcción."
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
@@ -3786,6 +3789,10 @@ msgstr "error de sintaxis en el descriptor uctypes"
msgid "threshold must be in the range 0-65536"
msgstr "limite debe ser en el rango 0-65536"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() toma un sequencio 9"
@@ -4075,6 +4082,10 @@ msgstr "zi debe ser de tipo flotante"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi debe ser una forma (n_section,2)"
+#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+#~ msgstr ""
+#~ "%d pines de dirección y %d pines rgb indican una altura de %d, no de %d"
+
#~ msgid "Unknown failure"
#~ msgstr "Fallo desconocido"
diff --git a/locale/fil.po b/locale/fil.po
index cd59ad213..2fdcd2f04 100644
--- a/locale/fil.po
+++ b/locale/fil.po
@@ -57,7 +57,8 @@ msgstr "%%c nangangailangan ng int o char"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
msgstr ""
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
@@ -521,7 +522,6 @@ msgstr ""
msgid "Buffer must be a multiple of 512 bytes"
msgstr ""
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "Buffer dapat ay hindi baba sa 1 na haba"
@@ -536,6 +536,7 @@ msgid "Buffer too short by %d bytes"
msgstr ""
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, fuzzy, c-format
msgid "Bus pin %d is already in use"
@@ -809,6 +810,10 @@ msgstr "Ginagamit na ang DAC"
msgid "Data 0 pin must be byte aligned"
msgstr "graphic ay dapat 2048 bytes ang haba"
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr "Dapat sunurin ng Data chunk ang fmt chunk"
@@ -1603,7 +1608,6 @@ msgid ""
msgstr ""
"PWM frequency hindi writable kapag variable_frequency ay False sa pag buo."
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
@@ -3762,6 +3766,10 @@ msgstr "may pagkakamali sa sintaks sa uctypes descriptor"
msgid "threshold must be in the range 0-65536"
msgstr "ang threshold ay dapat sa range 0-65536"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() kumukuha ng 9-sequence"
diff --git a/locale/fr.po b/locale/fr.po
index 1c4714825..1842d6d3e 100644
--- a/locale/fr.po
+++ b/locale/fr.po
@@ -67,10 +67,9 @@ msgstr "%%c nécessite un chiffre entier 'int' ou un caractère 'char'"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
msgstr ""
-"Les broches d'adresse %d et les broches RVB %d indiquent une hauteur de %d, "
-"pas %d"
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
msgid "%q failure: %d"
@@ -533,7 +532,6 @@ msgstr "La longueur de la mémoire tampon doit être un multiple de 512"
msgid "Buffer must be a multiple of 512 bytes"
msgstr "La mémoire tampon doit être un multiple de 512"
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "Le tampon doit être de longueur au moins 1"
@@ -548,6 +546,7 @@ msgid "Buffer too short by %d bytes"
msgstr "Tampon trop court de %d octets"
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, c-format
msgid "Bus pin %d is already in use"
@@ -831,6 +830,10 @@ msgstr "DAC déjà utilisé"
msgid "Data 0 pin must be byte aligned"
msgstr "La broche 'Data 0' doit être aligné sur l'octet"
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr "Un bloc de données doit suivre un bloc fmt"
@@ -1631,7 +1634,6 @@ msgstr ""
"La fréquence de PWM n'est pas modifiable quand variable_frequency est False "
"à la construction."
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
@@ -3823,6 +3825,10 @@ msgstr "erreur de syntaxe dans le descripteur d'uctypes"
msgid "threshold must be in the range 0-65536"
msgstr "le seuil doit être dans la portée 0-65536"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() prend une séquence de longueur 9"
@@ -4111,6 +4117,11 @@ msgstr "zi doit être de type float"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi doit être de forme (n_section, 2)"
+#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+#~ msgstr ""
+#~ "Les broches d'adresse %d et les broches RVB %d indiquent une hauteur de "
+#~ "%d, pas %d"
+
#~ msgid "Unknown failure"
#~ msgstr "Echec inconnu"
diff --git a/locale/hi.po b/locale/hi.po
index f9fa68f5c..88c82d4b8 100644
--- a/locale/hi.po
+++ b/locale/hi.po
@@ -58,7 +58,8 @@ msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
msgstr ""
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
@@ -516,7 +517,6 @@ msgstr ""
msgid "Buffer must be a multiple of 512 bytes"
msgstr ""
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr ""
@@ -531,6 +531,7 @@ msgid "Buffer too short by %d bytes"
msgstr ""
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, c-format
msgid "Bus pin %d is already in use"
@@ -800,6 +801,10 @@ msgstr ""
msgid "Data 0 pin must be byte aligned"
msgstr ""
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr ""
@@ -1584,7 +1589,6 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
@@ -3710,6 +3714,10 @@ msgstr ""
msgid "threshold must be in the range 0-65536"
msgstr ""
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
diff --git a/locale/it_IT.po b/locale/it_IT.po
index e6402f929..b380b2fae 100644
--- a/locale/it_IT.po
+++ b/locale/it_IT.po
@@ -57,7 +57,8 @@ msgstr "%%c necessita di int o char"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
msgstr ""
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
@@ -521,7 +522,6 @@ msgstr ""
msgid "Buffer must be a multiple of 512 bytes"
msgstr ""
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "Il buffer deve essere lungo almeno 1"
@@ -536,6 +536,7 @@ msgid "Buffer too short by %d bytes"
msgstr ""
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, fuzzy, c-format
msgid "Bus pin %d is already in use"
@@ -810,6 +811,10 @@ msgstr "DAC già in uso"
msgid "Data 0 pin must be byte aligned"
msgstr "graphic deve essere lunga 2048 byte"
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr ""
@@ -1612,7 +1617,6 @@ msgstr ""
"frequenza PWM frequency non è scrivibile quando variable_frequency è "
"impostato nel costruttore a False."
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
@@ -3770,6 +3774,10 @@ msgstr "errore di sintassi nel descrittore uctypes"
msgid "threshold must be in the range 0-65536"
msgstr "la soglia deve essere nell'intervallo 0-65536"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
diff --git a/locale/ja.po b/locale/ja.po
index 42c882e9a..bae5704a1 100644
--- a/locale/ja.po
+++ b/locale/ja.po
@@ -63,7 +63,8 @@ msgstr "%%c にはintまたはcharが必要"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
msgstr ""
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
@@ -523,7 +524,6 @@ msgstr "バッファ長は512の倍数でなければなりません"
msgid "Buffer must be a multiple of 512 bytes"
msgstr "バッファは512の倍数でなければなりません"
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "バッファ長は少なくとも1以上でなければなりません"
@@ -538,6 +538,7 @@ msgid "Buffer too short by %d bytes"
msgstr "バッファが %d バイト足りません"
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, c-format
msgid "Bus pin %d is already in use"
@@ -811,6 +812,10 @@ msgstr "DACはすでに使用中"
msgid "Data 0 pin must be byte aligned"
msgstr "Data 0 ピンは、バイト整列されていなければなりません"
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr "fmtチャンクの後にdataチャンクが続かなければなりません"
@@ -1600,7 +1605,6 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr "PWM周波数は生成時のvariable_frequencyがFalseのとき書き換え不可"
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
@@ -3741,6 +3745,10 @@ msgstr "uctypedディスクリプタの構文エラー"
msgid "threshold must be in the range 0-65536"
msgstr "threshouldは0から65536まで"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time()は9要素のシーケンスを受け取ります"
diff --git a/locale/ko.po b/locale/ko.po
index 97de46fcd..c284971af 100644
--- a/locale/ko.po
+++ b/locale/ko.po
@@ -59,7 +59,8 @@ msgstr "%%c 전수(int)또는 캐릭터(char)필요합니다"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
msgstr ""
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
@@ -519,7 +520,6 @@ msgstr ""
msgid "Buffer must be a multiple of 512 bytes"
msgstr ""
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "잘못된 크기의 버퍼. >1 여야합니다"
@@ -534,6 +534,7 @@ msgid "Buffer too short by %d bytes"
msgstr ""
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, c-format
msgid "Bus pin %d is already in use"
@@ -803,6 +804,10 @@ msgstr "DAC가 현재 사용 중입니다"
msgid "Data 0 pin must be byte aligned"
msgstr ""
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr ""
@@ -1587,7 +1592,6 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
@@ -3714,6 +3718,10 @@ msgstr ""
msgid "threshold must be in the range 0-65536"
msgstr ""
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
diff --git a/locale/nl.po b/locale/nl.po
index 58cc8e603..2829bd9e8 100644
--- a/locale/nl.po
+++ b/locale/nl.po
@@ -61,8 +61,9 @@ msgstr "%%c vereist een int of char"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
-msgstr "%d adres pins en %d RGB pins geven een hoogte van %d aan, niet %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
+msgstr ""
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
msgid "%q failure: %d"
@@ -521,7 +522,6 @@ msgstr "Buffer lengte moet een veelvoud van 512 zijn"
msgid "Buffer must be a multiple of 512 bytes"
msgstr "Buffer moet een veelvoud van 512 bytes zijn"
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "Buffer moet op zijn minst lengte 1 zijn"
@@ -536,6 +536,7 @@ msgid "Buffer too short by %d bytes"
msgstr "Buffer is %d bytes te klein"
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, c-format
msgid "Bus pin %d is already in use"
@@ -811,6 +812,10 @@ msgstr "DAC al in gebruik"
msgid "Data 0 pin must be byte aligned"
msgstr "Data 0 pin moet byte uitgelijnd zijn"
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr "Data chunk moet gevolgd worden door fmt chunk"
@@ -1607,7 +1612,6 @@ msgstr ""
"PWM frequentie is niet schrijfbaar wanneer de variable_frequency False is "
"tijdens constructie."
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
@@ -3774,6 +3778,10 @@ msgstr "syntaxisfout in uctypes aanduiding"
msgid "threshold must be in the range 0-65536"
msgstr "drempelwaarde moet in het bereik 0-65536 liggen"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() accepteert een 9-rij"
@@ -4062,6 +4070,9 @@ msgstr "zi moet van type float zijn"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi moet vorm (n_section, 2) hebben"
+#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+#~ msgstr "%d adres pins en %d RGB pins geven een hoogte van %d aan, niet %d"
+
#~ msgid "Unknown failure"
#~ msgstr "Onbekende fout"
diff --git a/locale/pl.po b/locale/pl.po
index 14a57b4ea..0c03a0ee0 100644
--- a/locale/pl.po
+++ b/locale/pl.po
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
-"PO-Revision-Date: 2021-01-20 02:40+0000\n"
+"PO-Revision-Date: 2021-01-27 01:31+0000\n"
"Last-Translator: Maciej Stankiewicz <tawezik@gmail.com>\n"
"Language-Team: pl\n"
"Language: pl\n"
@@ -63,7 +63,8 @@ msgstr "%%c wymaga int lub char"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
msgstr ""
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
@@ -523,7 +524,6 @@ msgstr "Długość bufora musi być wielokrotnością 512"
msgid "Buffer must be a multiple of 512 bytes"
msgstr "Bufor musi być wielokrotnością 512 bajtów"
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "Bufor musi mieć długość 1 lub więcej"
@@ -538,6 +538,7 @@ msgid "Buffer too short by %d bytes"
msgstr "Bufor za krótki o %d bajtów"
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, c-format
msgid "Bus pin %d is already in use"
@@ -811,6 +812,10 @@ msgstr "DAC w użyciu"
msgid "Data 0 pin must be byte aligned"
msgstr "Nóżka data 0 musi być wyrównana do bajtu"
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr "Fragment danych musi następować po fragmencie fmt"
@@ -1598,7 +1603,6 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr "Nie można zmienić częstotliwości PWM gdy variable_frequency=False."
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
@@ -3134,7 +3138,7 @@ msgstr ""
#: py/parse.c
msgid "malformed f-string"
-msgstr ""
+msgstr "źle sformatowany f-string"
#: shared-bindings/_stage/Layer.c
msgid "map buffer too small"
@@ -3403,11 +3407,11 @@ msgstr "offset poza zakresem"
#: ports/nrf/common-hal/audiobusio/PDMIn.c
msgid "only bit_depth=16 is supported"
-msgstr ""
+msgstr "obsługiwane jest tylko bit_depth=16"
#: ports/nrf/common-hal/audiobusio/PDMIn.c
msgid "only sample_rate=16000 is supported"
-msgstr ""
+msgstr "obsługiwane jest tylko sample_rate=16000"
#: py/objarray.c py/objstr.c py/objstrunicode.c py/objtuple.c
#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c
@@ -3733,6 +3737,10 @@ msgstr "błąd składni w deskryptorze uctypes"
msgid "threshold must be in the range 0-65536"
msgstr "threshold musi być w zakresie 0-65536"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() wymaga 9-elementowej sekwencji"
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index 92d46a4cf..3e397a0ed 100644
--- a/locale/pt_BR.po
+++ b/locale/pt_BR.po
@@ -65,8 +65,9 @@ msgstr "%%c requer int ou char"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
-msgstr "%d endereços dos pinos e %d pinos rgb indicam uma altura do %d, não %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
+msgstr ""
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
msgid "%q failure: %d"
@@ -533,7 +534,6 @@ msgstr "O comprimento do Buffer deve ser um múltiplo de 512"
msgid "Buffer must be a multiple of 512 bytes"
msgstr "O buffer deve ser um múltiplo de 512 bytes"
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "O comprimento do buffer deve ter pelo menos 1"
@@ -548,6 +548,7 @@ msgid "Buffer too short by %d bytes"
msgstr "O buffer é muito curto em %d bytes"
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, c-format
msgid "Bus pin %d is already in use"
@@ -827,6 +828,10 @@ msgstr "DAC em uso"
msgid "Data 0 pin must be byte aligned"
msgstr "O pino de dados 0 deve ser alinhado por bytes"
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr "Pedaço de dados deve seguir o pedaço de cortes"
@@ -1623,7 +1628,6 @@ msgstr ""
"A frequência do PWM não pode ser gravada quando variable_frequency for False "
"na construção."
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
@@ -3809,6 +3813,10 @@ msgstr "houve um erro de sintaxe no descritor uctypes"
msgid "threshold must be in the range 0-65536"
msgstr "Limite deve estar no alcance de 0-65536"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() leva uma sequência com 9"
@@ -4097,6 +4105,10 @@ msgstr "zi deve ser de um tipo float"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi deve estar na forma (n_section, 2)"
+#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+#~ msgstr ""
+#~ "%d endereços dos pinos e %d pinos rgb indicam uma altura do %d, não %d"
+
#~ msgid "Unknown failure"
#~ msgstr "Falha desconhecida"
diff --git a/locale/sv.po b/locale/sv.po
index 0fe05421b..3aa0dcc1e 100644
--- a/locale/sv.po
+++ b/locale/sv.po
@@ -6,7 +6,7 @@ msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
-"PO-Revision-Date: 2021-01-17 12:55+0000\n"
+"PO-Revision-Date: 2021-01-25 19:32+0000\n"
"Last-Translator: Jonny Bergdahl <jonny@bergdahl.it>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: sv\n"
@@ -52,7 +52,7 @@ msgstr " Fil \"%q\", rad %d"
#: py/builtinhelp.c
msgid " is of type %q\n"
-msgstr ""
+msgstr " är av typen %q\n"
#: main.c
msgid " output:\n"
@@ -65,8 +65,9 @@ msgstr "%%c kräver int eller char"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
-msgstr "%d adresspinnar och %d RGB-pinnar indikerar en höjd av %d, inte %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
+msgstr ""
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
msgid "%q failure: %d"
@@ -525,7 +526,6 @@ msgstr "Buffertlängd måste vara en multipel av 512"
msgid "Buffer must be a multiple of 512 bytes"
msgstr "Bufferten måste vara en multipel av 512 byte"
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "Bufferten måste ha minst längd 1"
@@ -540,6 +540,7 @@ msgid "Buffer too short by %d bytes"
msgstr "Buffert är %d bytes för kort"
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, c-format
msgid "Bus pin %d is already in use"
@@ -816,6 +817,10 @@ msgstr "DAC används redan"
msgid "Data 0 pin must be byte aligned"
msgstr "Datapinne 0 måste vara bytejusterad"
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr "Datasegmentet måste följa fmt-segmentet"
@@ -872,7 +877,7 @@ msgstr "Fel i regex"
#: shared-bindings/socketpool/Socket.c
msgid "Error: Failure to bind"
-msgstr ""
+msgstr "Fel: Bind misslyckades"
#: py/enum.c shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c
#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c
@@ -1268,7 +1273,7 @@ msgstr "Ogiltig storlek"
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Invalid socket for TLS"
-msgstr ""
+msgstr "Ogiltig socket för TLS"
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
msgid "Invalid state"
@@ -1276,7 +1281,7 @@ msgstr "Ogiltigt tillstånd"
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Invalid use of TLS Socket"
-msgstr ""
+msgstr "Ogiltig användning av TLS Socket"
#: shared-bindings/audiomixer/Mixer.c
msgid "Invalid voice"
@@ -1296,7 +1301,7 @@ msgstr "Ogiltig word-/bitlängd"
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Issue setting SO_REUSEADDR"
-msgstr ""
+msgstr "Misslyckades att sätta SO_REUSEADDR"
#: shared-bindings/aesio/aes.c
msgid "Key must be 16, 24, or 32 bytes long"
@@ -1610,7 +1615,6 @@ msgstr ""
"PWM-frekvensen är inte skrivbar när variable_frequency är falsk vid "
"skapandet."
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
@@ -3375,7 +3379,7 @@ msgstr "antal punkter måste vara minst 2"
#: py/builtinhelp.c
msgid "object "
-msgstr ""
+msgstr "objekt "
#: py/obj.c
msgid "object '%q' is not a tuple or list"
@@ -3774,6 +3778,10 @@ msgstr "syntaxfel i uctypes deskriptor"
msgid "threshold must be in the range 0-65536"
msgstr "tröskelvärdet måste ligga i intervallet 0-65536"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() kräver en 9-sekvens"
@@ -3996,7 +4004,7 @@ msgstr "width måste vara större än noll"
#: ports/esp32s2/common-hal/wifi/Radio.c
msgid "wifi is not enabled"
-msgstr ""
+msgstr "wifi är inte aktiverat"
#: shared-bindings/_bleio/Adapter.c
msgid "window must be <= interval"
@@ -4062,6 +4070,9 @@ msgstr "zi måste vara av typ float"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi måste vara i formen (n_section, 2)"
+#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+#~ msgstr "%d adresspinnar och %d RGB-pinnar indikerar en höjd av %d, inte %d"
+
#~ msgid "Unknown failure"
#~ msgstr "Okänt fel"
diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po
index 1d869a0f2..07e461bf8 100644
--- a/locale/zh_Latn_pinyin.po
+++ b/locale/zh_Latn_pinyin.po
@@ -7,7 +7,7 @@ msgstr ""
"Project-Id-Version: circuitpython-cn\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2021-01-04 12:55-0600\n"
-"PO-Revision-Date: 2021-01-21 22:25+0000\n"
+"PO-Revision-Date: 2021-01-25 19:32+0000\n"
"Last-Translator: hexthat <hexthat@gmail.com>\n"
"Language-Team: Chinese Hanyu Pinyin\n"
"Language: zh_Latn_pinyin\n"
@@ -53,7 +53,7 @@ msgstr " Wénjiàn \"%q\", dì %d xíng"
#: py/builtinhelp.c
msgid " is of type %q\n"
-msgstr ""
+msgstr " shì %q lèi xíng\n"
#: main.c
msgid " output:\n"
@@ -66,9 +66,9 @@ msgstr "%%c xūyào zhěngshù huò char"
#: shared-bindings/rgbmatrix/RGBMatrix.c
#, c-format
-msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+msgid ""
+"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"
msgstr ""
-"%d dìzhǐ yǐn jiǎo hé %d rgb yǐn jiǎo jiāng gāodù biǎoshì wèi %d, ér bùshì %d"
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
msgid "%q failure: %d"
@@ -527,7 +527,6 @@ msgstr "Huǎn chōng qū cháng dù bì xū wéi 512 de bèi shù"
msgid "Buffer must be a multiple of 512 bytes"
msgstr "Huǎn chōng qū bì xū shì 512 zì jié de bèi shù"
-#: shared-bindings/adafruit_bus_device/I2CDevice.c
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
msgstr "Huǎnchōng qū bìxū zhìshǎo chángdù 1"
@@ -542,6 +541,7 @@ msgid "Buffer too short by %d bytes"
msgstr "Huǎn chōng qū tài duǎn , àn %d zì jié"
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
#, c-format
msgid "Bus pin %d is already in use"
@@ -815,6 +815,10 @@ msgstr "Fā yuán huì yǐjīng shǐyòng"
msgid "Data 0 pin must be byte aligned"
msgstr "Shùjù 0 de yǐn jiǎo bìxū shì zì jié duìqí"
+#: ports/esp32s2/common-hal/displayio/ParallelBus.c
+msgid "Data 0 pin must be byte aligned."
+msgstr ""
+
#: shared-module/audiocore/WaveFile.c
msgid "Data chunk must follow fmt chunk"
msgstr "Shùjù kuài bìxū zūnxún fmt qū kuài"
@@ -871,7 +875,7 @@ msgstr "Zhèngzé biǎodá shì cuòwù"
#: shared-bindings/socketpool/Socket.c
msgid "Error: Failure to bind"
-msgstr ""
+msgstr "cuò wù: bǎng dìng shī bài"
#: py/enum.c shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c
#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c
@@ -1267,7 +1271,7 @@ msgstr "dà xiǎo wú xiào"
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Invalid socket for TLS"
-msgstr ""
+msgstr "TLS de chā zuò wú xiào"
#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c
msgid "Invalid state"
@@ -1275,7 +1279,7 @@ msgstr "wú xiào zhuàng tài"
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Invalid use of TLS Socket"
-msgstr ""
+msgstr "TLS tào jiē zì de wú xiào shǐ yòng"
#: shared-bindings/audiomixer/Mixer.c
msgid "Invalid voice"
@@ -1295,7 +1299,7 @@ msgstr "Wúxiào de zì/wèi chángdù"
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Issue setting SO_REUSEADDR"
-msgstr ""
+msgstr "wèn tí shè zhì SO_REUSEADDR"
#: shared-bindings/aesio/aes.c
msgid "Key must be 16, 24, or 32 bytes long"
@@ -1607,7 +1611,6 @@ msgid ""
"PWM frequency not writable when variable_frequency is False on construction."
msgstr "Dāng biànliàng_pínlǜ shì False zài jiànzhú shí PWM pínlǜ bùkě xiě."
-#: ports/esp32s2/common-hal/displayio/ParallelBus.c
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
@@ -2356,7 +2359,7 @@ msgstr "huǎnchōng qū bìxū shì zì jié lèi duìxiàng"
#: extmod/ulab/code/ulab_create.c
msgid "buffer size must be a multiple of element size"
-msgstr ""
+msgstr "huǎn chōng qū dà xiǎo bì xū shì yuán sù dà xiǎo de bèi shù"
#: shared-module/struct/__init__.c
msgid "buffer size must match format"
@@ -2526,6 +2529,7 @@ msgstr "wúfǎ cóng shǒudòng zìduàn guīgé qiēhuàn dào zìdòng zìduà
#: extmod/ulab/code/ndarray_operators.c
msgid "cannot cast output with casting rule"
msgstr ""
+"wú fǎ shǐ yòng qiáng zhì zhuǎn huàn guī zé qiáng zhì zhuǎn huàn shū chū"
#: py/objtype.c
msgid "cannot create '%q' instances"
@@ -2565,7 +2569,7 @@ msgstr "quānzi zhǐ néng zài yī wèi jiāzhǎng zhōng zhùcè"
#: shared-bindings/msgpack/ExtType.c
msgid "code outside range 0~127"
-msgstr ""
+msgstr "dài mǎ chāo chū fàn wéi 0~127"
#: shared-bindings/displayio/Palette.c
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
@@ -2632,7 +2636,7 @@ msgstr "wúfǎ quèdìng SD kǎ bǎnběn"
#: extmod/ulab/code/numerical/numerical.c
msgid "cross is defined for 1D arrays of length 3"
-msgstr ""
+msgstr "duì yú cháng dù wéi 3 de 1D shù zǔ dìng yì cross"
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
@@ -2644,7 +2648,7 @@ msgstr "shùjù chángdù bìxū xiāngděng"
#: extmod/ulab/code/ndarray.c
msgid "data type not understood"
-msgstr ""
+msgstr "wèi lǐ jiě de shù jù lèi xíng"
#: py/parsenum.c
msgid "decimal numbers not supported"
@@ -2656,7 +2660,7 @@ msgstr "mòrèn 'except' bìxū shì zuìhòu yīgè"
#: shared-bindings/msgpack/__init__.c
msgid "default is not a function"
-msgstr ""
+msgstr "mò rèn zhí bú shì hán shù"
#: shared-bindings/audiobusio/PDMIn.c
msgid ""
@@ -2683,7 +2687,7 @@ msgstr "bùtóng de cānshù bìxū shì ndarray"
#: extmod/ulab/code/numerical/numerical.c
msgid "differentiation order out of range"
-msgstr ""
+msgstr "chā yì shùn xù fàn wéi"
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
@@ -2716,7 +2720,7 @@ msgstr "jiéwěi_x yīnggāi shì yīgè zhěngshù"
#: shared-bindings/alarm/time/TimeAlarm.c
msgid "epoch_time not supported on this board"
-msgstr ""
+msgstr "epoch_time bǎn bù zhī chí cǐ bǎn běn"
#: ports/nrf/common-hal/busio/UART.c
#, c-format
@@ -2761,7 +2765,7 @@ msgstr "qídài guānjiàn: Zìdiǎn de jiàzhí"
#: shared-bindings/msgpack/__init__.c
msgid "ext_hook is not a function"
-msgstr ""
+msgstr "ext_hook bú shì hán shù"
#: py/argcheck.c
msgid "extra keyword arguments given"
@@ -2810,7 +2814,7 @@ msgstr "dì yīgè cānshù bìxū shì yī gè hánshù"
#: extmod/ulab/code/ulab_create.c
msgid "first argument must be a tuple of ndarrays"
-msgstr ""
+msgstr "dì yī gè cān shù bì xū shì yí gè yuán zǔ ndarrays"
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
@@ -2867,7 +2871,7 @@ msgstr "hánshù zài jiàngé mòwěi jùyǒu xiāngtóng de fúhào"
#: extmod/ulab/code/ndarray.c
msgid "function is defined for ndarrays only"
-msgstr ""
+msgstr "hán shù jǐn wéi ndarrays dìng yì"
#: py/argcheck.c
#, c-format
@@ -2963,11 +2967,11 @@ msgstr "nèi lián jíhé bìxū shì yīgè hánshù"
#: extmod/ulab/code/ndarray.c
msgid "input and output shapes are not compatible"
-msgstr ""
+msgstr "shū rù hé shū chū xíng zhuàng bù jiān róng"
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer, a tuple, or a list"
-msgstr ""
+msgstr "shū rù cān shù bì xū shì zhěng shù, yuán zǔ huò liè biǎo"
#: extmod/ulab/code/fft/fft.c
msgid "input array length must be power of 2"
@@ -2975,7 +2979,7 @@ msgstr "shūrù shùzǔ de chángdù bìxū shì 2 de mì"
#: extmod/ulab/code/ulab_create.c
msgid "input arrays are not compatible"
-msgstr ""
+msgstr "shū rù shù zǔ bù jiān róng"
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
@@ -2991,19 +2995,19 @@ msgstr "shūrù jǔzhèn shì qíyì de"
#: extmod/ulab/code/user/user.c
msgid "input must be a dense ndarray"
-msgstr ""
+msgstr "shū rù bì xū shì mì jí de ndarray"
#: extmod/ulab/code/ulab_create.c
msgid "input must be a tensor of rank 2"
-msgstr ""
+msgstr "shū rù bì xū shì děng jí 2 de zhāng liàng"
#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
msgid "input must be an ndarray"
-msgstr ""
+msgstr "shū rù bì xū shì ndarray"
#: extmod/ulab/code/filter/filter.c
msgid "input must be one-dimensional"
-msgstr ""
+msgstr "shū rù bì xū shì yì wéi de"
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
@@ -3019,7 +3023,7 @@ msgstr "shūrù xiàngliàng de chángdù bìxū xiāngděng"
#: extmod/ulab/code/poly/poly.c
msgid "inputs are not iterable"
-msgstr ""
+msgstr "shū rù bù kě yí dòng"
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
@@ -3093,7 +3097,7 @@ msgstr "wúxiào de hàomǎ yǔfǎ"
#: ports/esp32s2/common-hal/alarm/pin/__init__.c
msgid "io must be rtc io"
-msgstr ""
+msgstr "IO bì xū shì RTC IO"
#: py/objtype.c
msgid "issubclass() arg 1 must be a class"
@@ -3192,11 +3196,11 @@ msgstr "Dāng gùdìng chángdù wèi %s shí, zuìdà chángdù bìxū wèi 0-%
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "max_length must be >= 0"
-msgstr ""
+msgstr "zuì dà cháng dù bì xū >= 0"
#: extmod/ulab/code/ndarray.c
msgid "maximum number of dimensions is 4"
-msgstr ""
+msgstr "zuì dà chǐ cùn shù wéi 4"
#: py/runtime.c
msgid "maximum recursion depth exceeded"
@@ -3212,7 +3216,7 @@ msgstr "maxiter yìng wéi > 0"
#: extmod/ulab/code/numerical/numerical.c
msgid "median argument must be an ndarray"
-msgstr ""
+msgstr "zhōng wèi shù cān shù bì xū shì ndarray"
#: py/runtime.c
#, c-format
@@ -3298,7 +3302,7 @@ msgstr "zhǎo bù dào fēi běndì de bǎng dìng"
#: shared-module/msgpack/__init__.c
msgid "no default packer"
-msgstr ""
+msgstr "wú mò rèn bāo zhuāng jī"
#: py/builtinimport.c
msgid "no module named '%q'"
@@ -3339,15 +3343,15 @@ msgstr "guānjiàn zì cānshù zhīhòu de fēi guānjiàn zì cānshù"
#: ports/nrf/common-hal/_bleio/Adapter.c
msgid "non-zero timeout must be > 0.01"
-msgstr ""
+msgstr "fēi líng chāo shí bì xū > 0.01"
#: shared-bindings/_bleio/Adapter.c
msgid "non-zero timeout must be >= interval"
-msgstr ""
+msgstr "fēi líng chāo shí bì xū wéi >= jiàn gé"
#: extmod/ulab/code/linalg/linalg.c
msgid "norm is defined for 1D and 2D arrays"
-msgstr ""
+msgstr "wéi 1D hé 2D shù zǔ dìng yì guī fàn"
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
@@ -3367,7 +3371,7 @@ msgstr "diǎnshù bìxū zhìshǎo wèi 2"
#: py/builtinhelp.c
msgid "object "
-msgstr ""
+msgstr "duì xiàng "
#: py/obj.c
msgid "object '%q' is not a tuple or list"
@@ -3419,15 +3423,15 @@ msgstr "jīshù zìfú chuàn"
#: extmod/ulab/code/ulab_create.c
msgid "offset is too large"
-msgstr ""
+msgstr "piān yí tài dà"
#: shared-bindings/dualbank/__init__.c
msgid "offset must be >= 0"
-msgstr ""
+msgstr "piān yí liàng bì xū >= 0"
#: extmod/ulab/code/ulab_create.c
msgid "offset must be non-negative and no greater than buffer length"
-msgstr ""
+msgstr "piān yí liàng bì xū wéi fēi fù shù qiě bù dà yú huǎn chōng qū cháng dù"
#: py/objstr.c py/objstrunicode.c
msgid "offset out of bounds"
@@ -3453,7 +3457,7 @@ msgstr "cāozuò shǔ bùnéng yīqǐ guǎngbò"
#: extmod/ulab/code/ndarray.c
msgid "operation is implemented for 1D Boolean arrays only"
-msgstr ""
+msgstr "jǐn duì 1D bù ěr shù zǔ shí xiàn cāo zuò"
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
@@ -3593,7 +3597,7 @@ msgstr "qǐngqiú chángdù %d dàn duìxiàng chángdù %d"
#: extmod/ulab/code/ndarray_operators.c
msgid "results cannot be cast to specified type"
-msgstr ""
+msgstr "wú fǎ jiāng jié guǒ qiáng zhì zhuǎn huàn dào zhǐ dìng lèi xíng"
#: py/compile.c
msgid "return annotation must be an identifier"
@@ -3615,7 +3619,7 @@ msgstr "rgb_pins[%d] yǔ shízhōng bùzài tóng yīgè duānkǒu shàng"
#: extmod/ulab/code/numerical/numerical.c
msgid "roll argument must be an ndarray"
-msgstr ""
+msgstr "gǔn dòng cān shù bì xū shì ndarray"
#: py/objstr.c
msgid "rsplit(None,n)"
@@ -3643,11 +3647,11 @@ msgstr "bù zhīchí jiǎoběn biānyì"
#: extmod/ulab/code/ndarray.c
msgid "shape must be a tuple"
-msgstr ""
+msgstr "xíng zhuàng bì xū shì yí gè yuán zǔ"
#: shared-module/msgpack/__init__.c
msgid "short read"
-msgstr ""
+msgstr "duǎn dú"
#: py/objstr.c
msgid "sign not allowed in string format specifier"
@@ -3765,6 +3769,10 @@ msgstr "uctypes miáoshù fú zhōng de yǔfǎ cuòwù"
msgid "threshold must be in the range 0-65536"
msgstr "yùzhí bìxū zài fànwéi 0-65536"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+msgid "tile must be greater than zero"
+msgstr ""
+
#: shared-bindings/time/__init__.c
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() xūyào 9 xùliè"
@@ -3780,7 +3788,7 @@ msgstr "Chāo shí shíjiān bìxū wèi 0.0 Dào 100.0 Miǎo"
#: ports/nrf/common-hal/_bleio/Adapter.c
msgid "timeout must be < 655.35 secs"
-msgstr ""
+msgstr "chāo shí bì xū < 655.35 miǎo"
#: shared-bindings/_bleio/CharacteristicBuffer.c
msgid "timeout must be >= 0.0"
@@ -3800,7 +3808,7 @@ msgstr "time_t shíjiān chuō chāochū píngtái fànwéi"
#: extmod/ulab/code/ndarray.c
msgid "tobytes can be invoked for dense arrays only"
-msgstr ""
+msgstr "tobytes zhǐ néng duì mì jí shù zǔ diào yòng"
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
@@ -3808,7 +3816,7 @@ msgstr "tígōng jǐ dìng géshì de cānshù tài duō"
#: extmod/ulab/code/ulab_create.c
msgid "too many dimensions"
-msgstr ""
+msgstr "chǐ cùn tài duō"
#: extmod/ulab/code/ndarray.c
msgid "too many indices"
@@ -3821,7 +3829,7 @@ msgstr "dǎkāi tài duō zhí (yùqí %d)"
#: extmod/ulab/code/approx/approx.c
msgid "trapz is defined for 1D arrays"
-msgstr ""
+msgstr "wéi 1D shù zǔ dìng yì xiàn jǐng"
#: extmod/ulab/code/approx/approx.c
msgid "trapz is defined for 1D arrays of equal length"
@@ -3829,7 +3837,7 @@ msgstr "Trapz shì wèi děng zhǎng de 1D shùzǔ dìngyì de"
#: ports/esp32s2/common-hal/alarm/pin/__init__.c
msgid "trigger level must be 0 or 1"
-msgstr ""
+msgstr "chù fā jí bié bì xū wéi 0 huò 1"
#: py/obj.c
msgid "tuple/list has wrong length"
@@ -3971,7 +3979,7 @@ msgstr "xiàngliàng bìxū jùyǒu xiāngtóng de chángdù"
#: ports/esp32s2/common-hal/alarm/pin/__init__.c
msgid "wakeup conflict"
-msgstr ""
+msgstr "huàn xǐng chōng tū"
#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
msgid "watchdog not initialized"
@@ -3987,7 +3995,7 @@ msgstr "kuāndù bìxū dàyú líng"
#: ports/esp32s2/common-hal/wifi/Radio.c
msgid "wifi is not enabled"
-msgstr ""
+msgstr "wèi qǐ yòng WIFI"
#: shared-bindings/_bleio/Adapter.c
msgid "window must be <= interval"
@@ -3995,11 +4003,11 @@ msgstr "Chuāngkǒu bìxū shì <= jiàngé"
#: extmod/ulab/code/numerical/numerical.c
msgid "wrong axis index"
-msgstr ""
+msgstr "cuò wù de zhóu suǒ yǐn"
#: extmod/ulab/code/ulab_create.c
msgid "wrong axis specified"
-msgstr ""
+msgstr "zhǐ dìng de zhóu cuò wù"
#: extmod/ulab/code/vector/vectorise.c
msgid "wrong input type"
@@ -4027,7 +4035,7 @@ msgstr "x zhí chāochū biānjiè"
#: ports/esp32s2/common-hal/audiobusio/__init__.c
msgid "xTaskCreate failed"
-msgstr ""
+msgstr "xTaskCreate shī bài"
#: shared-bindings/displayio/Shape.c
msgid "y should be an int"
@@ -4053,6 +4061,11 @@ msgstr "zi bìxū wèi fú diǎn xíng"
msgid "zi must be of shape (n_section, 2)"
msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)"
+#~ msgid "%d address pins and %d rgb pins indicate a height of %d, not %d"
+#~ msgstr ""
+#~ "%d dìzhǐ yǐn jiǎo hé %d rgb yǐn jiǎo jiāng gāodù biǎoshì wèi %d, ér bùshì "
+#~ "%d"
+
#~ msgid "Unknown failure"
#~ msgstr "Wèizhī gùzhàng"
diff --git a/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk b/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk
index b5a4bc735..f976dfe78 100644
--- a/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk
@@ -22,7 +22,6 @@ CIRCUITPY_GAMEPAD = 1
CIRCUITPY_BUSDEVICE = 1
# Include these Python libraries in firmware.
-FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD
#FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ADXL34x
diff --git a/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk b/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk
index 178258b6c..2ace30fb5 100755
--- a/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk
@@ -16,6 +16,7 @@ CIRCUITPY_COUNTIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_I2CPERIPHERAL = 0
CIRCUITPY_VECTORIO = 0
+CIRCUITPY_BUSDEVICE = 0
MICROPY_PY_ASYNC_AWAIT = 0
SUPEROPT_GC = 0
diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk
index 505f5c145..0b150a5fb 100644
--- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk
@@ -22,7 +22,6 @@ SUPEROPT_GC = 0
CFLAGS_INLINE_LIMIT = 55
# Include these Python libraries in firmware.
-FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH
diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk
index 3e5131a62..ae0b6837c 100644
--- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk
@@ -26,7 +26,6 @@ CFLAGS_INLINE_LIMIT = 40
# Include these Python libraries in firmware.
-FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Crickit
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH
diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h
index 4b0c324fa..1586a3289 100644
--- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h
+++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h
@@ -43,5 +43,3 @@
// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1
-
-#define MICROPY_PY_URE 0
diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk
index 51e9b05af..aace5c0cb 100644
--- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk
@@ -18,6 +18,7 @@ CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_I2CPERIPHERAL = 0
CIRCUITPY_MSGPACK = 0
CIRCUITPY_PIXELBUF = 0
+CIRCUITPY_RE = 0
CIRCUITPY_ROTARYIO = 0
CIRCUITPY_RTC = 0
# So not all of displayio, sorry!
@@ -27,7 +28,6 @@ SUPEROPT_GC = 0
CFLAGS_INLINE_LIMIT = 55
# Include these Python libraries in firmware.
-FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
diff --git a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk
index f06163b84..309563ff4 100644
--- a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk
@@ -21,7 +21,6 @@ CFLAGS_INLINE_LIMIT = 50
CIRCUITPY_MSGPACK = 0
# Include these Python libraries in firmware.
-FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Crickit
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Motor
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
diff --git a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk
index 6e089bb90..6ea21ed82 100644
--- a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk
@@ -28,5 +28,4 @@ CFLAGS_INLINE_LIMIT = 35
SUPEROPT_GC = 0
# Include these Python libraries in firmware.
-FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_RFM69
diff --git a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk
index 383b6a6df..76a6be2e3 100644
--- a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk
@@ -29,5 +29,4 @@ CFLAGS_INLINE_LIMIT = 35
SUPEROPT_GC = 0
# Include these Python libraries in firmware.
-FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_RFM9x
diff --git a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk
index 1931ceb9a..2b211abd4 100644
--- a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk
@@ -27,7 +27,6 @@ CFLAGS_INLINE_LIMIT = 55
SUPEROPT_GC = 0
# Include these Python libraries in firmware.
-FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
diff --git a/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk
index 4895cda77..58d4e4980 100644
--- a/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/metro_m4_airlift_lite/mpconfigboard.mk
@@ -10,3 +10,5 @@ QSPI_FLASH_FILESYSTEM = 1
EXTERNAL_FLASH_DEVICE_COUNT = 3
EXTERNAL_FLASH_DEVICES = "S25FL116K, S25FL216K, GD25Q16C"
LONGINT_IMPL = MPZ
+
+CIRCUITPY__EVE = 1
diff --git a/ports/atmel-samd/boards/pycubed/mpconfigboard.mk b/ports/atmel-samd/boards/pycubed/mpconfigboard.mk
index b7b8073ab..a82362b8d 100644
--- a/ports/atmel-samd/boards/pycubed/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/pycubed/mpconfigboard.mk
@@ -21,7 +21,6 @@ CIRCUITPY_GAMEPAD = 0
CIRCUITPY_RGBMATRIX = 0
CIRCUITPY_PS2IO = 0
-FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD
diff --git a/ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk b/ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk
index f49bb3fef..3bf42d705 100644
--- a/ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk
@@ -21,7 +21,6 @@ CIRCUITPY_GAMEPAD = 0
CIRCUITPY_RGBMATRIX = 0
CIRCUITPY_PS2IO = 0
-FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD
diff --git a/ports/atmel-samd/boards/sam32/mpconfigboard.mk b/ports/atmel-samd/boards/sam32/mpconfigboard.mk
index 1dc686ef8..9ac24a014 100644
--- a/ports/atmel-samd/boards/sam32/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/sam32/mpconfigboard.mk
@@ -13,5 +13,4 @@ LONGINT_IMPL = MPZ
CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_USTACK = 1
-FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel
diff --git a/ports/atmel-samd/boards/serpente/mpconfigboard.mk b/ports/atmel-samd/boards/serpente/mpconfigboard.mk
index 6e953adf7..09036875f 100644
--- a/ports/atmel-samd/boards/serpente/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/serpente/mpconfigboard.mk
@@ -14,6 +14,7 @@ LONGINT_IMPL = NONE
CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_GAMEPAD = 0
+CIRCUITPY_BUSDEVICE = 0
SUPEROPT_GC = 0
diff --git a/ports/atmel-samd/boards/silicognition-m4-shim/board.c b/ports/atmel-samd/boards/silicognition-m4-shim/board.c
new file mode 100644
index 000000000..5fca974e9
--- /dev/null
+++ b/ports/atmel-samd/boards/silicognition-m4-shim/board.c
@@ -0,0 +1,38 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "supervisor/board.h"
+#include "mpconfigboard.h"
+
+void board_init(void) {
+}
+
+bool board_requests_safe_mode(void) {
+ return false;
+}
+
+void reset_board(void) {
+}
diff --git a/ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.h b/ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.h
new file mode 100644
index 000000000..5028679ed
--- /dev/null
+++ b/ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.h
@@ -0,0 +1,33 @@
+#define MICROPY_HW_BOARD_NAME "Silicognition LLC M4-Shim"
+#define MICROPY_HW_MCU_NAME "samd51j19"
+
+#define CIRCUITPY_MCU_FAMILY samd51
+
+// Rev E
+
+#define MICROPY_HW_LED_STATUS (&pin_PA23)
+#define MICROPY_HW_NEOPIXEL (&pin_PB03)
+
+// These are pins not to reset.
+// QSPI Data pins
+#define MICROPY_PORT_A (PORT_PA08 | PORT_PA09 | PORT_PA10 | PORT_PA11)
+// QSPI CS, QSPI SCK and NeoPixel pin
+#define MICROPY_PORT_B (PORT_PB03 | PORT_PB10 | PORT_PB11)
+#define MICROPY_PORT_C (0)
+#define MICROPY_PORT_D (0)
+
+#define BOARD_HAS_CRYSTAL 1
+
+#define DEFAULT_I2C_BUS_SCL (&pin_PA13)
+#define DEFAULT_I2C_BUS_SDA (&pin_PA12)
+
+#define DEFAULT_SPI_BUS_SCK (&pin_PA17)
+#define DEFAULT_SPI_BUS_MOSI (&pin_PB23)
+#define DEFAULT_SPI_BUS_MISO (&pin_PB22)
+
+#define DEFAULT_UART_BUS_RX (&pin_PB17)
+#define DEFAULT_UART_BUS_TX (&pin_PB16)
+
+// USB is always used internally so skip the pin objects for it.
+#define IGNORE_PIN_PA24 1
+#define IGNORE_PIN_PA25 1
diff --git a/ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.mk b/ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.mk
new file mode 100644
index 000000000..bf88cd52d
--- /dev/null
+++ b/ports/atmel-samd/boards/silicognition-m4-shim/mpconfigboard.mk
@@ -0,0 +1,14 @@
+USB_VID = 0x1209
+USB_PID = 0xF500
+USB_PRODUCT = "M4-Shim"
+USB_MANUFACTURER = "Silicognition LLC"
+
+CHIP_VARIANT = SAMD51J19A
+CHIP_FAMILY = samd51
+
+QSPI_FLASH_FILESYSTEM = 1
+EXTERNAL_FLASH_DEVICE_COUNT = 1
+EXTERNAL_FLASH_DEVICES = GD25Q16C
+LONGINT_IMPL = MPZ
+
+CIRCUITPY_VECTORIO = 1
diff --git a/ports/atmel-samd/boards/silicognition-m4-shim/pins.c b/ports/atmel-samd/boards/silicognition-m4-shim/pins.c
new file mode 100644
index 000000000..b7afd044e
--- /dev/null
+++ b/ports/atmel-samd/boards/silicognition-m4-shim/pins.c
@@ -0,0 +1,54 @@
+#include "shared-bindings/board/__init__.h"
+
+STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
+ { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
+ { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) },
+
+ { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) },
+ { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_PA05) },
+
+ { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB08) },
+ { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_PB08) },
+
+ { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PB09) },
+ { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_PB09) },
+
+ { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA04) },
+ { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_PA04) },
+
+ { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA06) },
+ { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_PA06) },
+
+ { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) },
+ { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_PA17) },
+
+ { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB23) },
+ { MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_PB23) },
+
+ { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB22) },
+ { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_PB22) },
+
+ { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB17) },
+ { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB17) },
+
+ { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB16) },
+ { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB16) },
+
+ { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA12) },
+ { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA13) },
+ { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA14) },
+ { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA16) },
+ { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA18) },
+ { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA19) },
+ { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA20) },
+ { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA21) },
+ { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA22) },
+ { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA23) },
+
+ { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PB03) },
+
+ { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
+ { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
+ { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
+};
+MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
diff --git a/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk
index e71bb0739..2e15bc042 100755
--- a/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/sparkfun_lumidrive/mpconfigboard.mk
@@ -14,6 +14,7 @@ LONGINT_IMPL = MPZ
CIRCUITPY_AUDIOIO = 0
CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_VECTORIO = 0
+CIRCUITPY_BUSDEVICE = 0
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar
diff --git a/ports/atmel-samd/boards/ugame10/mpconfigboard.mk b/ports/atmel-samd/boards/ugame10/mpconfigboard.mk
index b1242d206..640d421e8 100644
--- a/ports/atmel-samd/boards/ugame10/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/ugame10/mpconfigboard.mk
@@ -28,6 +28,7 @@ CIRCUITPY_RTC = 0
CIRCUITPY_TOUCHIO = 0
CIRCUITPY_USB_HID = 0
CIRCUITPY_USB_MIDI = 0
+CIRCUITPY_BUSDEVICE = 0
FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/ugame10
diff --git a/ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.mk b/ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.mk
index 3562228c7..d6f333b5b 100644
--- a/ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.mk
@@ -24,4 +24,3 @@ CIRCUITPY_TOUCHIO=0
CIRCUITPY_BUSDEVICE=1
# Include these Python libraries in firmware.
-FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
diff --git a/ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.mk b/ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.mk
index 53908293f..fd2fa044a 100644
--- a/ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.mk
@@ -27,5 +27,4 @@ CIRCUITPY_COUNTIO=0
CIRCUITPY_BUSDEVICE=1
# Include these Python libraries in firmware.
-FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice
FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD
diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h
index bce89e0b9..d2a529485 100644
--- a/ports/atmel-samd/mpconfigport.h
+++ b/ports/atmel-samd/mpconfigport.h
@@ -45,11 +45,7 @@
#define MICROPY_PY_BUILTINS_COMPLEX (0)
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
#define MICROPY_PY_FUNCTION_ATTRS (0)
-// MICROPY_PY_UJSON depends on MICROPY_PY_IO
-#define MICROPY_PY_IO (0)
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (0)
-#define MICROPY_PY_UBINASCII (0)
-#define MICROPY_PY_UJSON (0)
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (0)
#define MICROPY_PY_UERRNO_LIST \
X(EPERM) \
@@ -84,9 +80,6 @@
#define SPI_FLASH_MAX_BAUDRATE 24000000
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (1)
#define MICROPY_PY_FUNCTION_ATTRS (1)
-// MICROPY_PY_UJSON depends on MICROPY_PY_IO
-#define MICROPY_PY_IO (1)
-#define MICROPY_PY_UJSON (1)
// MICROPY_PY_UERRNO_LIST - Use the default
#endif // SAM_D5X_E5X
diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk
index 17e3995bf..fb9cdf2e6 100644
--- a/ports/atmel-samd/mpconfigport.mk
+++ b/ports/atmel-samd/mpconfigport.mk
@@ -20,26 +20,16 @@ endif
# Put samd21-only choices here.
ifeq ($(CHIP_FAMILY),samd21)
-# frequencyio not yet verified as working on SAMD21, though make it possible to override.
-ifndef CIRCUITPY_AUDIOMIXER
-CIRCUITPY_AUDIOMIXER = 0
-endif
-
-ifndef CIRCUITPY_AUDIOMP3
-CIRCUITPY_AUDIOMP3 = 0
-endif
-
-ifndef CIRCUITPY_BUILTINS_POW3
-CIRCUITPY_BUILTINS_POW3 = 0
-endif
-ifndef CIRCUITPY_FREQUENCYIO
-CIRCUITPY_FREQUENCYIO = 0
-endif
+# The ?='s allow overriding in mpconfigboard.mk.
-ifndef CIRCUITPY_TOUCHIO_USE_NATIVE
-CIRCUITPY_TOUCHIO_USE_NATIVE = 1
-endif
+CIRCUITPY_AUDIOMIXER ?= 0
+CIRCUITPY_BINASCII ?= 0
+CIRCUITPY_AUDIOMP3 ?= 0
+CIRCUITPY_BUILTINS_POW3 ?= 0
+CIRCUITPY_FREQUENCYIO ?= 0
+CIRCUITPY_JSON ?= 0
+CIRCUITPY_TOUCHIO_USE_NATIVE ?= 1
# No room for HCI _bleio on SAMD21.
CIRCUITPY_BLEIO_HCI = 0
@@ -71,27 +61,13 @@ ifeq ($(CHIP_FAMILY),samd51)
# No native touchio on SAMD51.
CIRCUITPY_TOUCHIO_USE_NATIVE = 0
-# The ifndef's allow overriding in mpconfigboard.mk.
-
-ifndef CIRCUITPY_NETWORK
-CIRCUITPY_NETWORK = 0
-endif
-
-ifndef CIRCUITPY_PS2IO
-CIRCUITPY_PS2IO = 1
-endif
-
-ifndef CIRCUITPY_SAMD
-CIRCUITPY_SAMD = 1
-endif
-
-ifndef CIRCUITPY_RGBMATRIX
-CIRCUITPY_RGBMATRIX = $(CIRCUITPY_FULL_BUILD)
-endif
+# The ?='s allow overriding in mpconfigboard.mk.
-ifndef CIRCUITPY_FRAMEBUFFERIO
-CIRCUITPY_FRAMEBUFFERIO = $(CIRCUITPY_FULL_BUILD)
-endif
+CIRCUITPY_NETWORK ?= 0
+CIRCUITPY_PS2IO ?= 1
+CIRCUITPY_SAMD ?= 1
+CIRCUITPY_RGBMATRIX ?= $(CIRCUITPY_FULL_BUILD)
+CIRCUITPY_FRAMEBUFFERIO ?= $(CIRCUITPY_FULL_BUILD)
endif # samd51
diff --git a/ports/cxd56/README.md b/ports/cxd56/README.md
index 7fa439aac..c399b8a4d 100644
--- a/ports/cxd56/README.md
+++ b/ports/cxd56/README.md
@@ -75,7 +75,7 @@ Bootloader information:
* You have to accept the End User License Agreement to be able to download and use the Spresense bootloader binary.
-Download the spresense binaries zip archive from: [Spresense firmware v2-0-000](https://developer.sony.com/file/download/download-spresense-firmware-v2-0-000)
+Download the spresense binaries zip archive from: [Spresense firmware v2-0-002](https://developer.sony.com/file/download/download-spresense-firmware-v2-0-002)
Extract spresense binaries in your PC to ports/spresense/spresense-exported-sdk/firmware/
diff --git a/ports/cxd56/configs/circuitpython/defconfig b/ports/cxd56/configs/circuitpython/defconfig
index a97f821df..096b53b80 100644
--- a/ports/cxd56/configs/circuitpython/defconfig
+++ b/ports/cxd56/configs/circuitpython/defconfig
@@ -165,6 +165,7 @@ CONFIG_USBDEV=y
CONFIG_USBDEV_DMA=y
CONFIG_USBDEV_DUALSPEED=y
CONFIG_USEC_PER_TICK=1000
+CONFIG_USERMAIN_STACKSIZE=8192
CONFIG_USER_ENTRYPOINT="spresense_main"
CONFIG_VIDEO_ISX012=y
CONFIG_VIDEO_STREAM=y
diff --git a/ports/cxd56/spresense-exported-sdk b/ports/cxd56/spresense-exported-sdk
-Subproject 752c4cd56dd0a270a559c28272ceb61ddcb7806
+Subproject 2ec2a1538362696118dc3fdf56f33dacaf8f406
diff --git a/ports/cxd56/supervisor/internal_flash.c b/ports/cxd56/supervisor/internal_flash.c
index 2726fa4a2..9c103fb19 100644
--- a/ports/cxd56/supervisor/internal_flash.c
+++ b/ports/cxd56/supervisor/internal_flash.c
@@ -30,10 +30,10 @@
/* Prototypes for Remote API */
-int FM_RawWrite(uint32_t offset, const void *buf, uint32_t size);
-int FM_RawVerifyWrite(uint32_t offset, const void *buf, uint32_t size);
-int FM_RawRead(uint32_t offset, void *buf, uint32_t size);
-int FM_RawEraseSector(uint32_t sector);
+int fw_fm_rawwrite(uint32_t offset, const void *buf, uint32_t size);
+int fw_fm_rawverifywrite(uint32_t offset, const void *buf, uint32_t size);
+int fw_fm_rawread(uint32_t offset, void *buf, uint32_t size);
+int fw_fm_rawerasesector(uint32_t sector);
#define CXD56_SPIFLASHSIZE (16 * 1024 * 1024)
@@ -64,8 +64,8 @@ void port_internal_flash_flush(void) {
return;
}
- FM_RawEraseSector(flash_sector);
- FM_RawWrite(flash_sector << SECTOR_SHIFT, flash_cache, SECTOR_SIZE);
+ fw_fm_rawerasesector(flash_sector);
+ fw_fm_rawwrite(flash_sector << SECTOR_SHIFT, flash_cache, SECTOR_SIZE);
flash_sector = NO_SECTOR;
}
@@ -73,7 +73,7 @@ void port_internal_flash_flush(void) {
mp_uint_t supervisor_flash_read_blocks(uint8_t *dest, uint32_t block, uint32_t num_blocks) {
supervisor_flash_flush();
- if (FM_RawRead(block << PAGE_SHIFT, dest, num_blocks << PAGE_SHIFT) < 0) {
+ if (fw_fm_rawread(block << PAGE_SHIFT, dest, num_blocks << PAGE_SHIFT) < 0) {
return 1;
}
@@ -92,7 +92,7 @@ mp_uint_t supervisor_flash_write_blocks(const uint8_t *src, uint32_t lba, uint32
if (sector != flash_sector) {
supervisor_flash_flush();
- if (FM_RawRead(sector << SECTOR_SHIFT, flash_cache, SECTOR_SIZE) < 0) {
+ if (fw_fm_rawread(sector << SECTOR_SHIFT, flash_cache, SECTOR_SIZE) < 0) {
return 1;
}
diff --git a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/board.c b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/board.c
new file mode 100644
index 000000000..aaef97c7d
--- /dev/null
+++ b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/board.c
@@ -0,0 +1,52 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "supervisor/board.h"
+#include "mpconfigboard.h"
+#include "shared-bindings/microcontroller/Pin.h"
+
+void board_init(void) {
+ // USB
+ common_hal_never_reset_pin(&pin_GPIO19);
+ common_hal_never_reset_pin(&pin_GPIO20);
+
+ // Debug UART
+#ifdef DEBUG
+ common_hal_never_reset_pin(&pin_GPIO43);
+ common_hal_never_reset_pin(&pin_GPIO44);
+#endif /* DEBUG */
+}
+
+bool board_requests_safe_mode(void) {
+ return false;
+}
+
+void reset_board(void) {
+
+}
+
+void board_deinit(void) {
+}
diff --git a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
new file mode 100644
index 000000000..c9020c200
--- /dev/null
+++ b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h
@@ -0,0 +1,36 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+//Micropython setup
+
+#define MICROPY_HW_BOARD_NAME "LILYGO TTGO T8 ESP32-S2 w/Display"
+#define MICROPY_HW_MCU_NAME "ESP32S2"
+
+#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0)
+
+#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n")
+
+#define AUTORESET_DELAY_MS 500
diff --git a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk
new file mode 100644
index 000000000..38a7ed1fb
--- /dev/null
+++ b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.mk
@@ -0,0 +1,18 @@
+USB_VID = 0x303a
+USB_PID = 0x8007
+USB_PRODUCT = "TTGO T8 ESP32-S2"
+USB_MANUFACTURER = "LILYGO"
+USB_DEVICES = "CDC,MSC,HID"
+
+INTERNAL_FLASH_FILESYSTEM = 1
+LONGINT_IMPL = MPZ
+
+# The default queue depth of 16 overflows on release builds,
+# so increase it to 32.
+CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32
+
+CIRCUITPY_ESP_FLASH_MODE = dio
+CIRCUITPY_ESP_FLASH_FREQ = 40m
+CIRCUITPY_ESP_FLASH_SIZE = 4MB
+
+CIRCUITPY_MODULE = wroom
diff --git a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c
new file mode 100644
index 000000000..bda0fd227
--- /dev/null
+++ b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/pins.c
@@ -0,0 +1,55 @@
+#include "shared-bindings/board/__init__.h"
+
+STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
+ { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) },
+ { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) },
+ { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) },
+ { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) },
+ { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) },
+ { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) },
+ { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) },
+ { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) },
+ { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) },
+
+ { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) },
+ { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },
+ { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },
+ { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) },
+ { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) },
+ { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) },
+ { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) },
+ { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) },
+ { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) },
+ { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },
+
+ { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) },
+ { MP_ROM_QSTR(MP_QSTR_IO40), MP_ROM_PTR(&pin_GPIO40) },
+ { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) },
+ { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) },
+ { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) },
+ { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) },
+
+ { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) },
+ { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) },
+ { MP_ROM_QSTR(MP_QSTR_TX1), MP_ROM_PTR(&pin_GPIO17) },
+ { MP_ROM_QSTR(MP_QSTR_RX1), MP_ROM_PTR(&pin_GPIO18) },
+
+ // SD Card
+ { MP_ROM_QSTR(MP_QSTR_SD_MISO), MP_ROM_PTR(&pin_GPIO13) },
+ { MP_ROM_QSTR(MP_QSTR_SD_MOSI), MP_ROM_PTR(&pin_GPIO11) },
+ { MP_ROM_QSTR(MP_QSTR_SD_CLK), MP_ROM_PTR(&pin_GPIO12) },
+ { MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_GPIO10) },
+
+ // 1.14 inch LCD ST7789
+ { MP_ROM_QSTR(MP_QSTR_LCD_MISO), MP_ROM_PTR(&pin_GPIO4) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_MOSI), MP_ROM_PTR(&pin_GPIO35) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_CLK), MP_ROM_PTR(&pin_GPIO36) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_CS), MP_ROM_PTR(&pin_GPIO34) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_RST), MP_ROM_PTR(&pin_GPIO38) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_BCKL), MP_ROM_PTR(&pin_GPIO33) },
+ { MP_ROM_QSTR(MP_QSTR_LCD_D_C), MP_ROM_PTR(&pin_GPIO37) },
+
+ // Peripheral Power control
+ { MP_ROM_QSTR(MP_QSTR_PE_POWER), MP_ROM_PTR(&pin_GPIO14) },
+};
+MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
diff --git a/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig
new file mode 100644
index 000000000..ce6fe832b
--- /dev/null
+++ b/ports/esp32s2/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig
@@ -0,0 +1,31 @@
+CONFIG_ESP32S2_SPIRAM_SUPPORT=y
+
+#
+# SPI RAM config
+#
+CONFIG_SPIRAM_TYPE_ESPPSRAM64=y
+CONFIG_SPIRAM_SIZE=8388608
+
+#
+# PSRAM clock and cs IO for ESP32S2
+#
+CONFIG_DEFAULT_PSRAM_CLK_IO=30
+CONFIG_DEFAULT_PSRAM_CS_IO=26
+# end of PSRAM clock and cs IO for ESP32S2
+
+CONFIG_SPIRAM_SPIWP_SD3_PIN=28
+CONFIG_SPIRAM_SPEED_40M=y
+CONFIG_SPIRAM=y
+CONFIG_SPIRAM_BOOT_INIT=y
+CONFIG_SPIRAM_USE_MALLOC=y
+CONFIG_SPIRAM_MEMTEST=y
+CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384
+CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768
+# end of SPI RAM config
+
+#
+# LWIP
+#
+CONFIG_LWIP_LOCAL_HOSTNAME="TTGO-T8-ESP32-S2"
+CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
+# end of LWIP
diff --git a/ports/esp32s2/common-hal/displayio/ParallelBus.c b/ports/esp32s2/common-hal/displayio/ParallelBus.c
index d0c98f361..f77b37b57 100644
--- a/ports/esp32s2/common-hal/displayio/ParallelBus.c
+++ b/ports/esp32s2/common-hal/displayio/ParallelBus.c
@@ -33,35 +33,196 @@
#include "shared-bindings/digitalio/DigitalInOut.h"
#include "shared-bindings/microcontroller/__init__.h"
+/*
+ * Current pin limitations for ESP32-S2 ParallelBus:
+ * - data0 pin must be byte aligned
+ */
+
void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* self,
const mcu_pin_obj_t* data0, const mcu_pin_obj_t* command, const mcu_pin_obj_t* chip_select,
const mcu_pin_obj_t* write, const mcu_pin_obj_t* read, const mcu_pin_obj_t* reset) {
- mp_raise_NotImplementedError(translate("ParallelBus not yet supported"));
+ uint8_t data_pin = data0->number;
+ if (data_pin % 8 != 0) {
+ mp_raise_ValueError(translate("Data 0 pin must be byte aligned."));
+ }
+
+ for (uint8_t i = 0; i < 8; i++) {
+ if (!pin_number_is_free(data_pin + i)) {
+ mp_raise_ValueError_varg(translate("Bus pin %d is already in use"), i);
+ }
+ }
+
+ gpio_dev_t *g = &GPIO; // this is the GPIO registers, see "extern gpio_dev_t GPIO" from file:gpio_struct.h
+
+ // Setup the pins as "Simple GPIO outputs" see section 19.3.3 of the ESP32-S2 Reference Manual
+ // Enable pins with "enable_w1ts"
+
+ for (uint8_t i = 0; i < 8; i++) {
+ g->enable_w1ts = (0x1 << (data_pin + i));
+ g->func_out_sel_cfg[data_pin + i].val= 256; /* setup output pin for simple GPIO Output, (0x100 = 256) */
+
+ }
+
+ /* From my understanding, there is a limitation of the ESP32-S2 that does not allow single-byte writes
+ * into the GPIO registers. See section 10.3.3 regarding "non-aligned writes" into the registers.
+ */
+
+
+ if (data_pin < 31) {
+ self->bus = (uint32_t*) &g->out; //pointer to GPIO output register (for pins 0-31)
+ } else {
+ self->bus = (uint32_t*) &g->out1.val; //pointer to GPIO output register (for pins >= 32)
+ }
+
+ /* SNIP - common setup of command, chip select, write and read pins, same as from SAMD and NRF ports */
+ self->command.base.type = &digitalio_digitalinout_type;
+ common_hal_digitalio_digitalinout_construct(&self->command, command);
+ common_hal_digitalio_digitalinout_switch_to_output(&self->command, true, DRIVE_MODE_PUSH_PULL);
+
+ self->chip_select.base.type = &digitalio_digitalinout_type;
+ common_hal_digitalio_digitalinout_construct(&self->chip_select, chip_select);
+ common_hal_digitalio_digitalinout_switch_to_output(&self->chip_select, true, DRIVE_MODE_PUSH_PULL);
+
+ self->write.base.type = &digitalio_digitalinout_type;
+ common_hal_digitalio_digitalinout_construct(&self->write, write);
+ common_hal_digitalio_digitalinout_switch_to_output(&self->write, true, DRIVE_MODE_PUSH_PULL);
+
+ self->read.base.type = &digitalio_digitalinout_type;
+ common_hal_digitalio_digitalinout_construct(&self->read, read);
+ common_hal_digitalio_digitalinout_switch_to_output(&self->read, true, DRIVE_MODE_PUSH_PULL);
+
+ self->data0_pin = data_pin;
+
+ if (write->number < 32) {
+ self->write_clear_register = (uint32_t*) &g->out_w1tc;
+ self->write_set_register = (uint32_t*) &g->out_w1ts;
+ } else {
+ self->write_clear_register = (uint32_t*) &g->out1_w1tc.val;
+ self->write_set_register = (uint32_t*) &g->out1_w1ts.val;
+ }
+
+ // Check to see if the data and write pins are on the same register:
+ if ( ( ((self->data0_pin < 32) && (write->number < 32)) ) ||
+ ( ((self->data0_pin > 31) && (write->number > 31)) ) ) {
+ self->data_write_same_register = true; // data pins and write pin are on the same register
+ } else {
+ self->data_write_same_register = false; // data pins and write pins are on different registers
+ }
+
+
+ self->write_mask = 1 << (write->number % 32); /* the write pin triggers the LCD to latch the data */
+
+ /* SNIP - common setup of the reset pin, same as from SAMD and NRF ports */
+ self->reset.base.type = &mp_type_NoneType;
+ if (reset != NULL) {
+ self->reset.base.type = &digitalio_digitalinout_type;
+ common_hal_digitalio_digitalinout_construct(&self->reset, reset);
+ common_hal_digitalio_digitalinout_switch_to_output(&self->reset, true, DRIVE_MODE_PUSH_PULL);
+ never_reset_pin_number(reset->number);
+ common_hal_displayio_parallelbus_reset(self);
+ }
+
+ never_reset_pin_number(command->number);
+ never_reset_pin_number(chip_select->number);
+ never_reset_pin_number(write->number);
+ never_reset_pin_number(read->number);
+ for (uint8_t i = 0; i < 8; i++) {
+ never_reset_pin_number(data_pin + i);
+ }
+
}
void common_hal_displayio_parallelbus_deinit(displayio_parallelbus_obj_t* self) {
+ /* SNIP - same as from SAMD and NRF ports */
+ for (uint8_t i = 0; i < 8; i++) {
+ reset_pin_number(self->data0_pin + i);
+ }
+ reset_pin_number(self->command.pin->number);
+ reset_pin_number(self->chip_select.pin->number);
+ reset_pin_number(self->write.pin->number);
+ reset_pin_number(self->read.pin->number);
+ reset_pin_number(self->reset.pin->number);
}
bool common_hal_displayio_parallelbus_reset(mp_obj_t obj) {
- return false;
+ /* SNIP - same as from SAMD and NRF ports */
+ displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj);
+ if (self->reset.base.type == &mp_type_NoneType) {
+ return false;
+ }
+
+ common_hal_digitalio_digitalinout_set_value(&self->reset, false);
+ common_hal_mcu_delay_us(4);
+ common_hal_digitalio_digitalinout_set_value(&self->reset, true);
+ return true;
+
}
bool common_hal_displayio_parallelbus_bus_free(mp_obj_t obj) {
- return false;
+ /* SNIP - same as from SAMD and NRF ports */
+ return true;
}
bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) {
-
- return false;
+ /* SNIP - same as from SAMD and NRF ports */
+ displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj);
+ common_hal_digitalio_digitalinout_set_value(&self->chip_select, false);
+ return true;
}
void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type,
- display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) {
+ display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) {
+ displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj);
+ common_hal_digitalio_digitalinout_set_value(&self->command, byte_type == DISPLAY_DATA);
+
+ uint32_t* clear_write = self->write_clear_register;
+ uint32_t* set_write = self->write_set_register;
+
+ const uint32_t mask = self->write_mask;
+
+ /* Setup structures for data writing. The ESP32-S2 port differs from the SAMD and NRF ports
+ * because I have not found a way to write a single byte into the ESP32-S2 registers.
+ * For the ESP32-S2, I create a 32-bit data_buffer that is used to transfer the data bytes.
+ */
+
+ *clear_write = mask; // Clear the write pin to prepare the registers before storing the
+ // register value into data_buffer
+
+ const uint32_t data_buffer = *self->bus; // store the initial output register values into the data output buffer
+ uint8_t* data_address = ((uint8_t*) &data_buffer) + (self->data0_pin / 8); /* address inside data_buffer where
+ * each data byte will be written to the data pin registers
+ */
+
+
+ if ( self->data_write_same_register ) { // data and write pins are on the same register
+ for (uint32_t i = 0; i < data_length; i++) {
+
+ /* Note: If the write pin and data pins are controlled by the same GPIO register, we can eliminate
+ * the "clear_write" step below, since the write pin is cleared when the data_buffer is written
+ * to the bus.
+ */
+
+ *(data_address) = data[i]; // stuff the data byte into the data_buffer at the correct offset byte location
+ *self->bus = data_buffer; // write the data to the output register
+ *set_write = mask; // set the write pin
+ }
+ }
+ else { // data and write pins are on different registers
+ for (uint32_t i = 0; i < data_length; i++) {
+ *clear_write = mask; // clear the write pin (See comment above, this may not be necessary).
+ *(data_address) = data[i]; // stuff the data byte into the data_buffer at the correct offset byte location
+ *self->bus = data_buffer; // write the data to the output register
+ *set_write = mask; // set the write pin
+
+ }
+ }
}
void common_hal_displayio_parallelbus_end_transaction(mp_obj_t obj) {
-
+ /* SNIP - same as from SAMD and NRF ports */
+ displayio_parallelbus_obj_t* self = MP_OBJ_TO_PTR(obj);
+ common_hal_digitalio_digitalinout_set_value(&self->chip_select, true);
}
diff --git a/ports/esp32s2/common-hal/displayio/ParallelBus.h b/ports/esp32s2/common-hal/displayio/ParallelBus.h
index cd636921d..84302118b 100644
--- a/ports/esp32s2/common-hal/displayio/ParallelBus.h
+++ b/ports/esp32s2/common-hal/displayio/ParallelBus.h
@@ -31,6 +31,17 @@
typedef struct {
mp_obj_base_t base;
+ uint32_t* bus; // pointer where 8 bits of data are written to the display
+ digitalio_digitalinout_obj_t command;
+ digitalio_digitalinout_obj_t chip_select;
+ digitalio_digitalinout_obj_t reset;
+ digitalio_digitalinout_obj_t write;
+ digitalio_digitalinout_obj_t read;
+ uint8_t data0_pin; // pin number for the lowest number data pin. Must be 8-bit aligned
+ bool data_write_same_register; // if data and write pins are in the sare
+ uint32_t* write_set_register; // pointer to the write group for setting the write bit to latch the data on the LCD
+ uint32_t* write_clear_register; // pointer to the write group for clearing the write bit to latch the data on the LCD
+ uint32_t write_mask; // bit mask for the single bit for the write pin register
} displayio_parallelbus_obj_t;
#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DISPLAYIO_PARALLELBUS_H
diff --git a/ports/esp32s2/mpconfigport.h b/ports/esp32s2/mpconfigport.h
index 9c0fd9da3..0cf695bc9 100644
--- a/ports/esp32s2/mpconfigport.h
+++ b/ports/esp32s2/mpconfigport.h
@@ -30,7 +30,6 @@
#define MICROPY_NLR_THUMB (0)
-#define MICROPY_PY_UJSON (1)
#define MICROPY_USE_INTERNAL_PRINTF (0)
#define MICROPY_PY_SYS_PLATFORM "Espressif ESP32-S2"
diff --git a/ports/litex/mpconfigport.h b/ports/litex/mpconfigport.h
index a7caf8526..5f739e49e 100644
--- a/ports/litex/mpconfigport.h
+++ b/ports/litex/mpconfigport.h
@@ -31,8 +31,6 @@
#define CIRCUITPY_INTERNAL_NVM_SIZE (0)
#define MICROPY_NLR_THUMB (0)
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (1)
-#define MICROPY_PY_UBINASCII (1)
-#define MICROPY_PY_UJSON (1)
#include "py/circuitpy_mpconfig.h"
diff --git a/ports/mimxrt10xx/mpconfigport.h b/ports/mimxrt10xx/mpconfigport.h
index 7496256d0..51e0ef9ff 100644
--- a/ports/mimxrt10xx/mpconfigport.h
+++ b/ports/mimxrt10xx/mpconfigport.h
@@ -41,8 +41,6 @@ extern uint8_t _ld_default_stack_size;
#define CIRCUITPY_DEFAULT_STACK_SIZE ((uint32_t) &_ld_default_stack_size)
#define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (0)
#define MICROPY_PY_FUNCTION_ATTRS (0)
-#define MICROPY_PY_IO (1)
-#define MICROPY_PY_UJSON (1)
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (1)
diff --git a/ports/nrf/boards/pca10100/mpconfigboard.mk b/ports/nrf/boards/pca10100/mpconfigboard.mk
index 76d15e608..c8cba2877 100644
--- a/ports/nrf/boards/pca10100/mpconfigboard.mk
+++ b/ports/nrf/boards/pca10100/mpconfigboard.mk
@@ -25,6 +25,7 @@ CIRCUITPY_RTC = 1
CIRCUITPY_SDCARDIO = 0
CIRCUITPY_TOUCHIO = 0
CIRCUITPY_ULAB = 0
+CIRCUITPY_BUSDEVICE = 0
MICROPY_PY_ASYNC_AWAIT = 0
SUPEROPT_GC = 0
diff --git a/ports/nrf/boards/simmel/mpconfigboard.mk b/ports/nrf/boards/simmel/mpconfigboard.mk
index 4eb6c98c7..032caac40 100644
--- a/ports/nrf/boards/simmel/mpconfigboard.mk
+++ b/ports/nrf/boards/simmel/mpconfigboard.mk
@@ -13,11 +13,13 @@ INTERNAL_FLASH_FILESYSTEM = 1
CIRCUITPY_AESIO = 1
CIRCUITPY_AUDIOMP3 = 0
+CIRCUITPY_BUSDEVICE = 0
CIRCUITPY_BUSIO = 1
CIRCUITPY_DISPLAYIO = 0
+CIRCUITPY_ERRNO = 0
CIRCUITPY_FRAMEBUFFERIO = 0
-CIRCUITPY_MSGPACK = 0
CIRCUITPY_GAMEPAD = 0
+CIRCUITPY_MSGPACK = 0
CIRCUITPY_NEOPIXEL_WRITE = 0
CIRCUITPY_NVM = 0
CIRCUITPY_PIXELBUF = 0
@@ -28,7 +30,6 @@ CIRCUITPY_SDCARDIO = 0
CIRCUITPY_TOUCHIO = 0
CIRCUITPY_ULAB = 0
CIRCUITPY_WATCHDOG = 1
-CIRCUITPY_BUSDEVICE = 0
# Enable micropython.native
#CIRCUITPY_ENABLE_MPY_NATIVE = 1
diff --git a/ports/nrf/mpconfigport.h b/ports/nrf/mpconfigport.h
index 4ed42cd82..3ac41a5e4 100644
--- a/ports/nrf/mpconfigport.h
+++ b/ports/nrf/mpconfigport.h
@@ -35,11 +35,8 @@
#include "peripherals/nrf/nvm.h" // for FLASH_PAGE_SIZE
#define MICROPY_PY_FUNCTION_ATTRS (1)
-#define MICROPY_PY_IO (1)
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (1)
#define MICROPY_PY_SYS_STDIO_BUFFER (1)
-#define MICROPY_PY_UBINASCII (1)
-#define MICROPY_PY_UJSON (1)
// 24kiB stack
#define CIRCUITPY_DEFAULT_STACK_SIZE (24*1024)
diff --git a/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.mk b/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.mk
index 69ff56fef..54c130660 100644
--- a/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.mk
+++ b/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.mk
@@ -7,3 +7,5 @@ CHIP_VARIANT = RP2040
CHIP_FAMILY = rp2
INTERNAL_FLASH_FILESYSTEM = 1
+
+CIRCUITPY__EVE = 1
diff --git a/ports/raspberrypi/boards/raspberry_pi_pico/pins.c b/ports/raspberrypi/boards/raspberry_pi_pico/pins.c
index 38ec75c4a..913676ad2 100644
--- a/ports/raspberrypi/boards/raspberry_pi_pico/pins.c
+++ b/ports/raspberrypi/boards/raspberry_pi_pico/pins.c
@@ -16,6 +16,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_GP12), MP_ROM_PTR(&pin_GPIO12) },
{ MP_ROM_QSTR(MP_QSTR_GP13), MP_ROM_PTR(&pin_GPIO13) },
{ MP_ROM_QSTR(MP_QSTR_GP14), MP_ROM_PTR(&pin_GPIO14) },
+ { MP_ROM_QSTR(MP_QSTR_GP15), MP_ROM_PTR(&pin_GPIO15) },
{ MP_ROM_QSTR(MP_QSTR_GP16), MP_ROM_PTR(&pin_GPIO16) },
{ MP_ROM_QSTR(MP_QSTR_GP17), MP_ROM_PTR(&pin_GPIO17) },
{ MP_ROM_QSTR(MP_QSTR_GP18), MP_ROM_PTR(&pin_GPIO18) },
diff --git a/ports/raspberrypi/common-hal/busio/UART.c b/ports/raspberrypi/common-hal/busio/UART.c
index 71da6cadd..f9a75b499 100644
--- a/ports/raspberrypi/common-hal/busio/UART.c
+++ b/ports/raspberrypi/common-hal/busio/UART.c
@@ -54,6 +54,7 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self,
uint32_t baudrate, uint8_t bits, busio_uart_parity_t parity, uint8_t stop,
mp_float_t timeout, uint16_t receiver_buffer_size, byte* receiver_buffer,
bool sigint_enabled) {
+ mp_raise_NotImplementedError(translate("UART not yet supported"));
// Sercom* sercom = NULL;
// uint8_t sercom_index = 255; // Unset index
diff --git a/ports/raspberrypi/common-hal/microcontroller/Pin.c b/ports/raspberrypi/common-hal/microcontroller/Pin.c
index 90c327406..ca5cf5a04 100644
--- a/ports/raspberrypi/common-hal/microcontroller/Pin.c
+++ b/ports/raspberrypi/common-hal/microcontroller/Pin.c
@@ -26,6 +26,7 @@
#include "py/runtime.h"
+#include "common-hal/microcontroller/__init__.h"
#include "shared-bindings/microcontroller/Pin.h"
#include "supervisor/shared/rgb_led_status.h"
@@ -46,7 +47,7 @@ bool speaker_enable_in_use;
STATIC uint32_t never_reset_pins;
void reset_all_pins(void) {
- for (size_t i = 0; i < 30; i++) {
+ for (size_t i = 0; i < TOTAL_GPIO_COUNT; i++) {
if ((never_reset_pins & (1 << i)) != 0) {
continue;
}
@@ -55,7 +56,7 @@ void reset_all_pins(void) {
}
void never_reset_pin_number(uint8_t pin_number) {
- if (pin_number >= 32) {
+ if (pin_number >= TOTAL_GPIO_COUNT) {
return;
}
@@ -63,12 +64,7 @@ void never_reset_pin_number(uint8_t pin_number) {
}
void reset_pin_number(uint8_t pin_number) {
- if (pin_number >= 32
-#if TUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX
- // Pin 15 is used for Errata so we don't mess with it.
- || pin_number == 15
-#endif
- ) {
+ if (pin_number >= TOTAL_GPIO_COUNT) {
return;
}
@@ -139,15 +135,10 @@ void claim_pin(const mcu_pin_obj_t* pin) {
}
bool pin_number_is_free(uint8_t pin_number) {
- if (pin_number >= 30) {
+ if (pin_number >= TOTAL_GPIO_COUNT) {
return false;
}
-#if TUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX
- // Pin 15 is used for Errata so we don't mess with it.
- if (pin_number == 15) {
- return true;
- }
-#endif
+
uint32_t pad_state = padsbank0_hw->io[pin_number];
return (pad_state & PADS_BANK0_GPIO0_IE_BITS) == 0 &&
(pad_state & PADS_BANK0_GPIO0_OD_BITS) != 0;
diff --git a/ports/raspberrypi/common-hal/microcontroller/__init__.c b/ports/raspberrypi/common-hal/microcontroller/__init__.c
index e454ffa1b..774e313bb 100644
--- a/ports/raspberrypi/common-hal/microcontroller/__init__.c
+++ b/ports/raspberrypi/common-hal/microcontroller/__init__.c
@@ -112,6 +112,17 @@ const nvm_bytearray_obj_t common_hal_mcu_nvm_obj = {
};
#endif
+#if CIRCUITPY_WATCHDOG
+// The singleton watchdog.WatchDogTimer object.
+watchdog_watchdogtimer_obj_t common_hal_mcu_watchdogtimer_obj = {
+ .base = {
+ .type = &watchdog_watchdogtimer_type,
+ },
+ .timeout = 0.0f,
+ .mode = WATCHDOGMODE_NONE,
+};
+#endif
+
// This maps MCU pin names to pin objects.
const mp_rom_map_elem_t mcu_pin_global_dict_table[TOTAL_GPIO_COUNT] = {
{ MP_ROM_QSTR(MP_QSTR_GPIO0), MP_ROM_PTR(&pin_GPIO0) },
diff --git a/ports/raspberrypi/common-hal/watchdog/WatchDogMode.c b/ports/raspberrypi/common-hal/watchdog/WatchDogMode.c
new file mode 100644
index 000000000..fc4e0e008
--- /dev/null
+++ b/ports/raspberrypi/common-hal/watchdog/WatchDogMode.c
@@ -0,0 +1 @@
+// No watchdog module functions.
diff --git a/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c
new file mode 100644
index 000000000..f23ccda77
--- /dev/null
+++ b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c
@@ -0,0 +1,83 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 microDev
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#include "py/runtime.h"
+#include "common-hal/watchdog/WatchDogTimer.h"
+
+#include "shared-bindings/watchdog/__init__.h"
+#include "shared-bindings/microcontroller/__init__.h"
+
+#include "src/rp2_common/hardware_watchdog/include/hardware/watchdog.h"
+
+void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self) {
+ watchdog_update();
+}
+
+void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) {
+ if (self->mode == WATCHDOGMODE_RESET) {
+ mp_raise_RuntimeError(translate("WatchDogTimer cannot be deinitialized once mode is set to RESET"));
+ } else {
+ self->mode = WATCHDOGMODE_NONE;
+ }
+}
+
+/*
+void watchdog_reset(void) {
+ common_hal_watchdog_deinit(&common_hal_mcu_watchdogtimer_obj);
+}
+*/
+
+mp_float_t common_hal_watchdog_get_timeout(watchdog_watchdogtimer_obj_t *self) {
+ return self->timeout;
+}
+
+void common_hal_watchdog_set_timeout(watchdog_watchdogtimer_obj_t *self, mp_float_t new_timeout) {
+ // max timeout is 8.388607 sec
+ // this is rounded down to 8.388 sec
+ uint64_t timeout = new_timeout * 1000;
+ if (timeout > 8388) {
+ mp_raise_ValueError(translate("timeout duration exceeded the maximum supported value"));
+ }
+ if ((uint16_t)self->timeout != timeout) {
+ watchdog_enable(timeout, false);
+ self->timeout = new_timeout;
+ }
+}
+
+watchdog_watchdogmode_t common_hal_watchdog_get_mode(watchdog_watchdogtimer_obj_t *self) {
+ return self->mode;
+}
+
+void common_hal_watchdog_set_mode(watchdog_watchdogtimer_obj_t *self, watchdog_watchdogmode_t new_mode) {
+ if (self->mode != new_mode) {
+ if (new_mode == WATCHDOGMODE_RAISE) {
+ mp_raise_NotImplementedError(translate("RAISE mode is not implemented"));
+ } else if (new_mode == WATCHDOGMODE_NONE) {
+ common_hal_watchdog_deinit(self);
+ }
+ self->mode = new_mode;
+ }
+}
diff --git a/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.h b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.h
new file mode 100644
index 000000000..ec1e2f659
--- /dev/null
+++ b/ports/raspberrypi/common-hal/watchdog/WatchDogTimer.h
@@ -0,0 +1,43 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 microDev
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to deal
+ * in the Software without restriction, including without limitation the rights
+ * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+ * copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+ * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+ * THE SOFTWARE.
+ */
+
+#ifndef MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
+#define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
+
+#include "py/obj.h"
+#include "shared-bindings/watchdog/WatchDogMode.h"
+#include "shared-bindings/watchdog/WatchDogTimer.h"
+
+struct _watchdog_watchdogtimer_obj_t {
+ mp_obj_base_t base;
+ mp_float_t timeout;
+ watchdog_watchdogmode_t mode;
+};
+
+// This needs to be called in order to disable the watchdog
+// void watchdog_reset(void);
+
+#endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
diff --git a/ports/raspberrypi/common-hal/watchdog/__init__.c b/ports/raspberrypi/common-hal/watchdog/__init__.c
new file mode 100644
index 000000000..fc4e0e008
--- /dev/null
+++ b/ports/raspberrypi/common-hal/watchdog/__init__.c
@@ -0,0 +1 @@
+// No watchdog module functions.
diff --git a/ports/raspberrypi/mpconfigport.h b/ports/raspberrypi/mpconfigport.h
index 3fdc8febb..77d1ff080 100644
--- a/ports/raspberrypi/mpconfigport.h
+++ b/ports/raspberrypi/mpconfigport.h
@@ -27,7 +27,7 @@
#ifndef __INCLUDED_MPCONFIGPORT_H
#define __INCLUDED_MPCONFIGPORT_H
-#define MICROPY_PY_UJSON (1)
+#define MICROPY_PY_SYS_PLATFORM "RP2040"
#define CIRCUITPY_INTERNAL_NVM_SIZE 0
diff --git a/ports/raspberrypi/mpconfigport.mk b/ports/raspberrypi/mpconfigport.mk
index 138896d41..5c930d7cc 100644
--- a/ports/raspberrypi/mpconfigport.mk
+++ b/ports/raspberrypi/mpconfigport.mk
@@ -36,6 +36,7 @@ CIRCUITPY_NVM = 0
CIRCUITPY_PULSEIO = 0 # Use PIO interally
CIRCUITPY_ROTARYIO = 0 # Use PIO interally
CIRCUITPY_RTC = 0
+CIRCUITPY_WATCHDOG = 1
# Things that are unsupported by the hardware.
CIRCUITPY_AUDIOIO = 0
diff --git a/ports/stm/boards/espruino_pico/mpconfigboard.mk b/ports/stm/boards/espruino_pico/mpconfigboard.mk
index 14f9323fd..81c3772e7 100644
--- a/ports/stm/boards/espruino_pico/mpconfigboard.mk
+++ b/ports/stm/boards/espruino_pico/mpconfigboard.mk
@@ -20,5 +20,6 @@ LD_FILE = boards/STM32F401xd_fs.ld
# lto for this port, and if other stuff hasn't been added in the
# meantime
CIRCUITPY_ULAB = 0
+CIRCUITPY_BUSDEVICE = 0
SUPEROPT_GC = 0
diff --git a/ports/stm/mpconfigport.h b/ports/stm/mpconfigport.h
index 9489b4765..7cdab04f6 100644
--- a/ports/stm/mpconfigport.h
+++ b/ports/stm/mpconfigport.h
@@ -31,9 +31,7 @@
#include <stdint.h>
#define MICROPY_PY_FUNCTION_ATTRS (1)
-#define MICROPY_PY_IO (1)
#define MICROPY_PY_REVERSE_SPECIAL_METHODS (1)
-#define MICROPY_PY_UJSON (1)
extern uint8_t _ld_default_stack_size;
diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h
index 35f1227a9..ee23c7156 100644
--- a/py/circuitpy_mpconfig.h
+++ b/py/circuitpy_mpconfig.h
@@ -195,21 +195,12 @@ typedef long mp_off_t;
#define MICROPY_PY_BUILTINS_STR_CENTER (CIRCUITPY_FULL_BUILD)
#define MICROPY_PY_BUILTINS_STR_PARTITION (CIRCUITPY_FULL_BUILD)
#define MICROPY_PY_BUILTINS_STR_SPLITLINES (CIRCUITPY_FULL_BUILD)
-#define MICROPY_PY_UERRNO (CIRCUITPY_FULL_BUILD)
#ifndef MICROPY_PY_COLLECTIONS_ORDEREDDICT
#define MICROPY_PY_COLLECTIONS_ORDEREDDICT (CIRCUITPY_FULL_BUILD)
#endif
-#ifndef MICROPY_PY_UBINASCII
-#define MICROPY_PY_UBINASCII (CIRCUITPY_FULL_BUILD)
-#endif
-// Opposite setting is deliberate.
-#define MICROPY_PY_UERRNO_ERRORCODE (!CIRCUITPY_FULL_BUILD)
-#ifndef MICROPY_PY_URE
-#define MICROPY_PY_URE (CIRCUITPY_FULL_BUILD)
-#endif
-#define MICROPY_PY_URE_MATCH_GROUPS (CIRCUITPY_FULL_BUILD)
-#define MICROPY_PY_URE_MATCH_SPAN_START_END (CIRCUITPY_FULL_BUILD)
-#define MICROPY_PY_URE_SUB (CIRCUITPY_FULL_BUILD)
+#define MICROPY_PY_URE_MATCH_GROUPS (CIRCUITPY_RE)
+#define MICROPY_PY_URE_MATCH_SPAN_START_END (CIRCUITPY_RE)
+#define MICROPY_PY_URE_SUB (CIRCUITPY_RE)
// LONGINT_IMPL_xxx are defined in the Makefile.
//
@@ -301,6 +292,13 @@ extern const struct _mp_obj_module_t audiopwmio_module;
#define AUDIOPWMIO_MODULE
#endif
+#if CIRCUITPY_BINASCII
+#define MICROPY_PY_UBINASCII CIRCUITPY_BINASCII
+#define BINASCII_MODULE { MP_ROM_QSTR(MP_QSTR_binascii), MP_ROM_PTR(&mp_module_ubinascii) },
+#else
+#define BINASCII_MODULE
+#endif
+
#if CIRCUITPY_BITBANGIO
#define BITBANGIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_bitbangio), (mp_obj_t)&bitbangio_module },
extern const struct _mp_obj_module_t bitbangio_module;
@@ -399,6 +397,16 @@ extern const struct _mp_obj_module_t terminalio_module;
#define TERMINALIO_MODULE
#endif
+#if CIRCUITPY_ERRNO
+#define MICROPY_PY_UERRNO (1)
+// Uses about 80 bytes.
+#define MICROPY_PY_UERRNO_ERRORCODE (1)
+#define ERRNO_MODULE { MP_ROM_QSTR(MP_QSTR_errno), MP_ROM_PTR(&mp_module_uerrno) },
+#else
+#define ERRNO_MODULE
+#
+#endif
+
#if CIRCUITPY_ESPIDF
extern const struct _mp_obj_module_t espidf_module;
#define ESPIDF_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_espidf),(mp_obj_t)&espidf_module },
@@ -470,6 +478,18 @@ extern const struct _mp_obj_module_t ipaddress_module;
#define IPADDRESS_MODULE
#endif
+#if CIRCUITPY_JSON
+#define MICROPY_PY_UJSON (1)
+#define MICROPY_PY_IO (1)
+#define JSON_MODULE { MP_ROM_QSTR(MP_QSTR_json), MP_ROM_PTR(&mp_module_ujson) },
+#else
+#ifndef MICROPY_PY_IO
+// We don't need MICROPY_PY_IO unless someone else wants it.
+#define MICROPY_PY_IO (0)
+#endif
+#define JSON_MODULE
+#endif
+
#if CIRCUITPY_MATH
extern const struct _mp_obj_module_t math_module;
#define MATH_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_math), (mp_obj_t)&math_module },
@@ -588,6 +608,13 @@ extern const struct _mp_obj_module_t random_module;
#define RANDOM_MODULE
#endif
+#if CIRCUITPY_RE
+#define MICROPY_PY_URE (1)
+#define RE_MODULE { MP_ROM_QSTR(MP_QSTR_re), MP_ROM_PTR(&mp_module_ure) },
+#else
+#define RE_MODULE
+#endif
+
#if CIRCUITPY_RGBMATRIX
extern const struct _mp_obj_module_t rgbmatrix_module;
#define RGBMATRIX_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_rgbmatrix),(mp_obj_t)&rgbmatrix_module },
@@ -730,25 +757,6 @@ extern const struct _mp_obj_module_t ustack_module;
#define USTACK_MODULE
#endif
-// These modules are not yet in shared-bindings, but we prefer the non-uxxx names.
-#if MICROPY_PY_UBINASCII
-#define BINASCII_MODULE { MP_ROM_QSTR(MP_QSTR_binascii), MP_ROM_PTR(&mp_module_ubinascii) },
-#else
-#define BINASCII_MODULE
-#endif
-
-#if MICROPY_PY_UERRNO
-#define ERRNO_MODULE { MP_ROM_QSTR(MP_QSTR_errno), MP_ROM_PTR(&mp_module_uerrno) },
-#else
-#define ERRNO_MODULE
-#endif
-
-#if MICROPY_PY_UJSON
-#define JSON_MODULE { MP_ROM_QSTR(MP_QSTR_json), MP_ROM_PTR(&mp_module_ujson) },
-#else
-#define JSON_MODULE
-#endif
-
#if defined(CIRCUITPY_ULAB) && CIRCUITPY_ULAB
// ulab requires reverse special methods
#if defined(MICROPY_PY_REVERSE_SPECIAL_METHODS) && !MICROPY_PY_REVERSE_SPECIAL_METHODS
@@ -760,12 +768,6 @@ extern const struct _mp_obj_module_t ustack_module;
#define ULAB_MODULE
#endif
-#if MICROPY_PY_URE
-#define RE_MODULE { MP_ROM_QSTR(MP_QSTR_re), MP_ROM_PTR(&mp_module_ure) },
-#else
-#define RE_MODULE
-#endif
-
// This is not a top-level module; it's microcontroller.watchdog.
#if CIRCUITPY_WATCHDOG
extern const struct _mp_obj_module_t watchdog_module;
diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk
index 9c9b17f4b..b8fe73eea 100644
--- a/py/circuitpy_mpconfig.mk
+++ b/py/circuitpy_mpconfig.mk
@@ -86,6 +86,9 @@ endif
endif
CFLAGS += -DCIRCUITPY_AUDIOMP3=$(CIRCUITPY_AUDIOMP3)
+CIRCUITPY_BINASCII ?= $(CIRCUITPY_FULL_BUILD)
+CFLAGS += -DCIRCUITPY_BINASCII=$(CIRCUITPY_BINASCII)
+
CIRCUITPY_BITBANGIO ?= $(CIRCUITPY_FULL_BUILD)
CFLAGS += -DCIRCUITPY_BITBANGIO=$(CIRCUITPY_BITBANGIO)
@@ -100,7 +103,7 @@ CFLAGS += -DCIRCUITPY_BLEIO=$(CIRCUITPY_BLEIO)
CIRCUITPY_BOARD ?= 1
CFLAGS += -DCIRCUITPY_BOARD=$(CIRCUITPY_BOARD)
-CIRCUITPY_BUSDEVICE = 0
+CIRCUITPY_BUSDEVICE ?= $(CIRCUITPY_FULL_BUILD)
CFLAGS += -DCIRCUITPY_BUSDEVICE=$(CIRCUITPY_BUSDEVICE)
CIRCUITPY_BUILTINS_POW3 ?= $(CIRCUITPY_FULL_BUILD)
@@ -124,6 +127,9 @@ CFLAGS += -DCIRCUITPY_COUNTIO=$(CIRCUITPY_COUNTIO)
CIRCUITPY_DISPLAYIO ?= $(CIRCUITPY_FULL_BUILD)
CFLAGS += -DCIRCUITPY_DISPLAYIO=$(CIRCUITPY_DISPLAYIO)
+CIRCUITPY_ERRNO ?= $(CIRCUITPY_FULL_BUILD)
+CFLAGS += -DCIRCUITPY_ERRNO=$(CIRCUITPY_ERRNO)
+
# CIRCUITPY_ESPIDF is handled in the esp32s2 tree.
# Only for ESP32S chips.
# Assume not a ESP build.
@@ -158,6 +164,9 @@ CFLAGS += -DCIRCUITPY_I2CPERIPHERAL=$(CIRCUITPY_I2CPERIPHERAL)
CIRCUITPY_IPADDRESS ?= $(CIRCUITPY_WIFI)
CFLAGS += -DCIRCUITPY_IPADDRESS=$(CIRCUITPY_IPADDRESS)
+CIRCUITPY_JSON ?= $(CIRCUITPY_FULL_BUILD)
+CFLAGS += -DCIRCUITPY_JSON=$(CIRCUITPY_JSON)
+
CIRCUITPY_MATH ?= 1
CFLAGS += -DCIRCUITPY_MATH=$(CIRCUITPY_MATH)
@@ -204,6 +213,9 @@ CFLAGS += -DCIRCUITPY_PWMIO=$(CIRCUITPY_PWMIO)
CIRCUITPY_RANDOM ?= 1
CFLAGS += -DCIRCUITPY_RANDOM=$(CIRCUITPY_RANDOM)
+CIRCUITPY_RE ?= $(CIRCUITPY_FULL_BUILD)
+CFLAGS += -DCIRCUITPY_RE=$(CIRCUITPY_RE)
+
# CIRCUITPY_RP2PIO is handled in the raspberrypi tree.
# Only for rp2 chips.
# Assume not a rp2 build.
diff --git a/shared-bindings/_eve/__init__.c b/shared-bindings/_eve/__init__.c
index 0f628b6fb..c043aa5fa 100644
--- a/shared-bindings/_eve/__init__.c
+++ b/shared-bindings/_eve/__init__.c
@@ -604,22 +604,6 @@ STATIC mp_obj_t _jump(mp_obj_t self, mp_obj_t a0) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(jump_obj, _jump);
-//| def LineWidth(self, width: int) -> None:
-//| """Set the width of rasterized lines
-//|
-//| :param int width: line width in :math:`1/16` pixel. Range 0-4095. The initial value is 16
-//|
-//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`."""
-//| ...
-//|
-
-STATIC mp_obj_t _linewidth(mp_obj_t self, mp_obj_t a0) {
- uint32_t width = mp_obj_get_int_truncated(a0);
- common_hal__eve_LineWidth(EVEHAL(self), width);
- return mp_const_none;
-}
-STATIC MP_DEFINE_CONST_FUN_OBJ_2(linewidth_obj, _linewidth);
-
//| def Macro(self, m: int) -> None:
//| """Execute a single command from a macro register
//|
@@ -662,22 +646,6 @@ STATIC mp_obj_t _palettesource(mp_obj_t self, mp_obj_t a0) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(palettesource_obj, _palettesource);
-//| def PointSize(self, size: int) -> None:
-//| """Set the radius of rasterized points
-//|
-//| :param int size: point radius in :math:`1/16` pixel. Range 0-8191. The initial value is 16
-//|
-//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`."""
-//| ...
-//|
-
-STATIC mp_obj_t _pointsize(mp_obj_t self, mp_obj_t a0) {
- uint32_t size = mp_obj_get_int_truncated(a0);
- common_hal__eve_PointSize(EVEHAL(self), size);
- return mp_const_none;
-}
-STATIC MP_DEFINE_CONST_FUN_OBJ_2(pointsize_obj, _pointsize);
-
//| def RestoreContext(self) -> None:
//| """Restore the current graphics context from the context stack"""
//| ...
@@ -836,48 +804,6 @@ STATIC mp_obj_t _tag(mp_obj_t self, mp_obj_t a0) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_2(tag_obj, _tag);
-//| def VertexTranslateX(self, x: int) -> None:
-//| """Set the vertex transformation's x translation component
-//|
-//| :param int x: signed x-coordinate in :math:`1/16` pixel. Range 0-131071. The initial value is 0
-//|
-//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`."""
-//| ...
-//|
-
-STATIC mp_obj_t _vertextranslatex(mp_obj_t self, mp_obj_t a0) {
- uint32_t x = mp_obj_get_int_truncated(a0);
- common_hal__eve_VertexTranslateX(EVEHAL(self), x);
- return mp_const_none;
-}
-STATIC MP_DEFINE_CONST_FUN_OBJ_2(vertextranslatex_obj, _vertextranslatex);
-
-//| def VertexTranslateY(self, y: int) -> None:
-//| """Set the vertex transformation's y translation component
-//|
-//| :param int y: signed y-coordinate in :math:`1/16` pixel. Range 0-131071. The initial value is 0
-//|
-//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`."""
-//| ...
-//|
-
-
-STATIC mp_obj_t _vertextranslatey(mp_obj_t self, mp_obj_t a0) {
- uint32_t y = mp_obj_get_int_truncated(a0);
- common_hal__eve_VertexTranslateY(EVEHAL(self), y);
- return mp_const_none;
-}
-STATIC MP_DEFINE_CONST_FUN_OBJ_2(vertextranslatey_obj, _vertextranslatey);
-
-//| def VertexFormat(self, frac: int) -> None:
-//| """Set the precision of vertex2f coordinates
-//|
-//| :param int frac: Number of fractional bits in X,Y coordinates, 0-4. Range 0-7. The initial value is 4
-//|
-//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`."""
-//| ...
-//|
-
STATIC mp_obj_t _vertexformat(mp_obj_t self, mp_obj_t a0) {
uint32_t frac = mp_obj_get_int_truncated(a0);
common_hal__eve_VertexFormat(EVEHAL(self), frac);
@@ -975,6 +901,82 @@ STATIC mp_obj_t _vertex2f(mp_obj_t self, mp_obj_t a0, mp_obj_t a1) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_3(vertex2f_obj, _vertex2f);
+//| def LineWidth(self, width: float) -> None:
+//| """Set the width of rasterized lines
+//|
+//| :param float width: line width in pixels. Range 0-511. The initial value is 1
+//|
+//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`."""
+//| ...
+//|
+
+STATIC mp_obj_t _linewidth(mp_obj_t self, mp_obj_t a0) {
+ mp_float_t width = mp_obj_get_float(a0);
+ common_hal__eve_LineWidth(EVEHAL(self), width);
+ return mp_const_none;
+}
+STATIC MP_DEFINE_CONST_FUN_OBJ_2(linewidth_obj, _linewidth);
+
+//| def PointSize(self, size: float) -> None:
+//| """Set the diameter of rasterized points
+//|
+//| :param float size: point diameter in pixels. Range 0-1023. The initial value is 1
+//|
+//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`."""
+//| ...
+//|
+
+STATIC mp_obj_t _pointsize(mp_obj_t self, mp_obj_t a0) {
+ mp_float_t size = mp_obj_get_float(a0);
+ common_hal__eve_PointSize(EVEHAL(self), size);
+ return mp_const_none;
+}
+STATIC MP_DEFINE_CONST_FUN_OBJ_2(pointsize_obj, _pointsize);
+
+//| def VertexTranslateX(self, x: float) -> None:
+//| """Set the vertex transformation's x translation component
+//|
+//| :param float x: signed x-coordinate in pixels. Range ±4095. The initial value is 0
+//|
+//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`."""
+//| ...
+//|
+
+STATIC mp_obj_t _vertextranslatex(mp_obj_t self, mp_obj_t a0) {
+ mp_float_t x = mp_obj_get_float(a0);
+ common_hal__eve_VertexTranslateX(EVEHAL(self), x);
+ return mp_const_none;
+}
+STATIC MP_DEFINE_CONST_FUN_OBJ_2(vertextranslatex_obj, _vertextranslatex);
+
+//| def VertexTranslateY(self, y: float) -> None:
+//| """Set the vertex transformation's y translation component
+//|
+//| :param float y: signed y-coordinate in pixels. Range ±4095. The initial value is 0
+//|
+//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`."""
+//| ...
+//|
+
+
+STATIC mp_obj_t _vertextranslatey(mp_obj_t self, mp_obj_t a0) {
+ mp_float_t y = mp_obj_get_float(a0);
+ common_hal__eve_VertexTranslateY(EVEHAL(self), y);
+ return mp_const_none;
+}
+STATIC MP_DEFINE_CONST_FUN_OBJ_2(vertextranslatey_obj, _vertextranslatey);
+
+//| def VertexFormat(self, frac: int) -> None:
+//| """Set the precision of vertex2f coordinates
+//|
+//| :param int frac: Number of fractional bits in X,Y coordinates, 0-4. Range 0-7. The initial value is 4
+//|
+//| This value is part of the graphics context and is saved and restored by :meth:`SaveContext` and :meth:`RestoreContext`."""
+//| ...
+//|
+
+//}
+
// Append an object x to the FIFO
#define ADD_X(self, x) \
common_hal__eve_add(EVEHAL(self), sizeof(x), &(x));
diff --git a/shared-bindings/_eve/__init__.h b/shared-bindings/_eve/__init__.h
index 759a629bb..883b1a15b 100644
--- a/shared-bindings/_eve/__init__.h
+++ b/shared-bindings/_eve/__init__.h
@@ -61,11 +61,11 @@ void common_hal__eve_ColorRGB(common_hal__eve_t *eve, uint32_t red, uint32_t gre
void common_hal__eve_Display(common_hal__eve_t *eve);
void common_hal__eve_End(common_hal__eve_t *eve);
void common_hal__eve_Jump(common_hal__eve_t *eve, uint32_t dest);
-void common_hal__eve_LineWidth(common_hal__eve_t *eve, uint32_t width);
+void common_hal__eve_LineWidth(common_hal__eve_t *eve, mp_float_t width);
void common_hal__eve_Macro(common_hal__eve_t *eve, uint32_t m);
void common_hal__eve_Nop(common_hal__eve_t *eve);
void common_hal__eve_PaletteSource(common_hal__eve_t *eve, uint32_t addr);
-void common_hal__eve_PointSize(common_hal__eve_t *eve, uint32_t size);
+void common_hal__eve_PointSize(common_hal__eve_t *eve, mp_float_t size);
void common_hal__eve_RestoreContext(common_hal__eve_t *eve);
void common_hal__eve_Return(common_hal__eve_t *eve);
void common_hal__eve_SaveContext(common_hal__eve_t *eve);
@@ -76,8 +76,8 @@ void common_hal__eve_StencilMask(common_hal__eve_t *eve, uint32_t mask);
void common_hal__eve_StencilOp(common_hal__eve_t *eve, uint32_t sfail, uint32_t spass);
void common_hal__eve_TagMask(common_hal__eve_t *eve, uint32_t mask);
void common_hal__eve_Tag(common_hal__eve_t *eve, uint32_t s);
-void common_hal__eve_VertexTranslateX(common_hal__eve_t *eve, uint32_t x);
-void common_hal__eve_VertexTranslateY(common_hal__eve_t *eve, uint32_t y);
+void common_hal__eve_VertexTranslateX(common_hal__eve_t *eve, mp_float_t x);
+void common_hal__eve_VertexTranslateY(common_hal__eve_t *eve, mp_float_t y);
void common_hal__eve_VertexFormat(common_hal__eve_t *eve, uint32_t frac);
void common_hal__eve_Vertex2ii(common_hal__eve_t *eve, uint32_t x, uint32_t y, uint32_t handle, uint32_t cell);
diff --git a/shared-bindings/adafruit_bus_device/I2CDevice.c b/shared-bindings/adafruit_bus_device/I2CDevice.c
index a4c04e198..15e8cc706 100644
--- a/shared-bindings/adafruit_bus_device/I2CDevice.c
+++ b/shared-bindings/adafruit_bus_device/I2CDevice.c
@@ -76,7 +76,7 @@ STATIC mp_obj_t adafruit_bus_device_i2cdevice_make_new(const mp_obj_type_t *type
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
- busio_i2c_obj_t* i2c = args[ARG_i2c].u_obj;
+ mp_obj_t* i2c = args[ARG_i2c].u_obj;
common_hal_adafruit_bus_device_i2cdevice_construct(MP_OBJ_TO_PTR(self), i2c, args[ARG_device_address].u_int);
if (args[ARG_probe].u_bool == true) {
@@ -107,7 +107,7 @@ STATIC mp_obj_t adafruit_bus_device_i2cdevice_obj___exit__(size_t n_args, const
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(adafruit_bus_device_i2cdevice___exit___obj, 4, 4, adafruit_bus_device_i2cdevice_obj___exit__);
-//| def readinto(self, buf: WriteableBuffer, *, start: int = 0, end: int = 0) -> None:
+//| def readinto(self, buf: WriteableBuffer, *, start: int = 0, end: Optional[int] = None) -> None:
//| """Read into ``buf`` from the device. The number of bytes read will be the
//| length of ``buf``.
//| If ``start`` or ``end`` is provided, then the buffer will be sliced
@@ -118,22 +118,6 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(adafruit_bus_device_i2cdevice___exit_
//| :param int end: Index to write up to but not include; if None, use ``len(buf)``"""
//| ...
//|
-STATIC void readinto(adafruit_bus_device_i2cdevice_obj_t *self, mp_obj_t buffer, int32_t start, mp_int_t end) {
- mp_buffer_info_t bufinfo;
- mp_get_buffer_raise(buffer, &bufinfo, MP_BUFFER_WRITE);
-
- size_t length = bufinfo.len;
- normalize_buffer_bounds(&start, end, &length);
- if (length == 0) {
- mp_raise_ValueError(translate("Buffer must be at least length 1"));
- }
-
- uint8_t status = common_hal_adafruit_bus_device_i2cdevice_readinto(MP_OBJ_TO_PTR(self), ((uint8_t*)bufinfo.buf) + start, length);
- if (status != 0) {
- mp_raise_OSError(status);
- }
-}
-
STATIC mp_obj_t adafruit_bus_device_i2cdevice_readinto(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_buffer, ARG_start, ARG_end };
static const mp_arg_t allowed_args[] = {
@@ -147,12 +131,22 @@ STATIC mp_obj_t adafruit_bus_device_i2cdevice_readinto(size_t n_args, const mp_o
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
- readinto(self, args[ARG_buffer].u_obj, args[ARG_start].u_int, args[ARG_end].u_int);
+ mp_obj_t dest[8];
+ mp_load_method(self->i2c, MP_QSTR_readfrom_into, dest);
+ dest[2] = mp_obj_new_int_from_ull(self->device_address);
+ dest[3] = args[ARG_buffer].u_obj;
+ //dest[4] = mp_obj_new_str("start", 5);
+ dest[4] = MP_OBJ_NEW_QSTR(MP_QSTR_start);
+ dest[5] = mp_obj_new_int(args[ARG_start].u_int);
+ dest[6] = MP_OBJ_NEW_QSTR(MP_QSTR_end);
+ dest[7] = mp_obj_new_int(args[ARG_end].u_int);
+ mp_call_method_n_kw(2, 2, dest);
+
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(adafruit_bus_device_i2cdevice_readinto_obj, 2, adafruit_bus_device_i2cdevice_readinto);
-//| def write(self, buf: ReadableBuffer, *, start: int = 0, end: int = 0) -> None:
+//| def write(self, buf: ReadableBuffer, *, start: int = 0, end: Optional[int] = None) -> None:
//| """Write the bytes from ``buffer`` to the device, then transmit a stop bit.
//| If ``start`` or ``end`` is provided, then the buffer will be sliced
//| as if ``buffer[start:end]``. This will not cause an allocation like
@@ -163,22 +157,6 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(adafruit_bus_device_i2cdevice_readinto_obj, 2,
//| """
//| ...
//|
-STATIC void write(adafruit_bus_device_i2cdevice_obj_t *self, mp_obj_t buffer, int32_t start, mp_int_t end, bool transmit_stop_bit) {
- mp_buffer_info_t bufinfo;
- mp_get_buffer_raise(buffer, &bufinfo, MP_BUFFER_READ);
-
- size_t length = bufinfo.len;
- normalize_buffer_bounds(&start, end, &length);
- if (length == 0) {
- mp_raise_ValueError(translate("Buffer must be at least length 1"));
- }
-
- uint8_t status = common_hal_adafruit_bus_device_i2cdevice_write(MP_OBJ_TO_PTR(self), ((uint8_t*)bufinfo.buf) + start, length, transmit_stop_bit);
- if (status != 0) {
- mp_raise_OSError(status);
- }
-}
-
STATIC mp_obj_t adafruit_bus_device_i2cdevice_write(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_buffer, ARG_start, ARG_end };
static const mp_arg_t allowed_args[] = {
@@ -191,13 +169,22 @@ STATIC mp_obj_t adafruit_bus_device_i2cdevice_write(size_t n_args, const mp_obj_
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
- write(self, args[ARG_buffer].u_obj, args[ARG_start].u_int, args[ARG_end].u_int, true);
+ mp_obj_t dest[8];
+ mp_load_method(self->i2c, MP_QSTR_writeto, dest);
+ dest[2] = mp_obj_new_int_from_ull(self->device_address);
+ dest[3] = args[ARG_buffer].u_obj;
+ dest[4] = MP_OBJ_NEW_QSTR(MP_QSTR_start);
+ dest[5] = mp_obj_new_int(args[ARG_start].u_int);
+ dest[6] = MP_OBJ_NEW_QSTR(MP_QSTR_end);
+ dest[7] = mp_obj_new_int(args[ARG_end].u_int);
+ mp_call_method_n_kw(2, 2, dest);
+
return mp_const_none;
}
MP_DEFINE_CONST_FUN_OBJ_KW(adafruit_bus_device_i2cdevice_write_obj, 2, adafruit_bus_device_i2cdevice_write);
-//| def write_then_readinto(self, out_buffer: WriteableBuffer, in_buffer: ReadableBuffer, *, out_start: int = 0, out_end: int = 0, in_start: int = 0, in_end: int = 0) -> None:
+//| def write_then_readinto(self, out_buffer: WriteableBuffer, in_buffer: ReadableBuffer, *, out_start: int = 0, out_end: Optional[int] = None, in_start: int = 0, in_end: Optional[int] = None) -> None:
//| """Write the bytes from ``out_buffer`` to the device, then immediately
//| reads into ``in_buffer`` from the device. The number of bytes read
//| will be the length of ``in_buffer``.
@@ -233,9 +220,21 @@ STATIC mp_obj_t adafruit_bus_device_i2cdevice_write_then_readinto(size_t n_args,
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
- write(self, args[ARG_out_buffer].u_obj, args[ARG_out_start].u_int, args[ARG_out_end].u_int, false);
-
- readinto(self, args[ARG_in_buffer].u_obj, args[ARG_in_start].u_int, args[ARG_in_end].u_int);
+ mp_obj_t dest[13];
+ mp_load_method(self->i2c, MP_QSTR_writeto_then_readfrom, dest);
+ dest[2] = mp_obj_new_int_from_ull(self->device_address);
+ dest[3] = args[ARG_out_buffer].u_obj;
+ dest[4] = args[ARG_in_buffer].u_obj;
+ dest[5] = MP_OBJ_NEW_QSTR(MP_QSTR_out_start);
+ dest[6] = mp_obj_new_int(args[ARG_out_start].u_int);
+ dest[7] = MP_OBJ_NEW_QSTR(MP_QSTR_out_end);
+ dest[8] = mp_obj_new_int(args[ARG_out_end].u_int);
+ dest[9] = MP_OBJ_NEW_QSTR(MP_QSTR_in_start);
+ dest[10] = mp_obj_new_int(args[ARG_in_start].u_int);
+ dest[11] = MP_OBJ_NEW_QSTR(MP_QSTR_in_end);
+ dest[12] = mp_obj_new_int(args[ARG_in_end].u_int);
+
+ mp_call_method_n_kw(3, 4, dest);
return mp_const_none;
}
diff --git a/shared-bindings/adafruit_bus_device/I2CDevice.h b/shared-bindings/adafruit_bus_device/I2CDevice.h
index cf7b1321a..82ef1feb8 100644
--- a/shared-bindings/adafruit_bus_device/I2CDevice.h
+++ b/shared-bindings/adafruit_bus_device/I2CDevice.h
@@ -43,9 +43,7 @@
extern const mp_obj_type_t adafruit_bus_device_i2cdevice_type;
// Initializes the hardware peripheral.
-extern void common_hal_adafruit_bus_device_i2cdevice_construct(adafruit_bus_device_i2cdevice_obj_t *self, busio_i2c_obj_t *i2c, uint8_t device_address);
-extern uint8_t common_hal_adafruit_bus_device_i2cdevice_readinto(adafruit_bus_device_i2cdevice_obj_t *self, mp_obj_t buffer, size_t length);
-extern uint8_t common_hal_adafruit_bus_device_i2cdevice_write(adafruit_bus_device_i2cdevice_obj_t *self, mp_obj_t buffer, size_t length, bool transmit_stop_bit);
+extern void common_hal_adafruit_bus_device_i2cdevice_construct(adafruit_bus_device_i2cdevice_obj_t *self, mp_obj_t *i2c, uint8_t device_address);
extern void common_hal_adafruit_bus_device_i2cdevice_lock(adafruit_bus_device_i2cdevice_obj_t *self);
extern void common_hal_adafruit_bus_device_i2cdevice_unlock(adafruit_bus_device_i2cdevice_obj_t *self);
extern void common_hal_adafruit_bus_device_i2cdevice_probe_for_device(adafruit_bus_device_i2cdevice_obj_t *self);
diff --git a/shared-bindings/rgbmatrix/RGBMatrix.c b/shared-bindings/rgbmatrix/RGBMatrix.c
index 5f5ea4fae..30b72dffd 100644
--- a/shared-bindings/rgbmatrix/RGBMatrix.c
+++ b/shared-bindings/rgbmatrix/RGBMatrix.c
@@ -132,11 +132,11 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_
}
}
-//| def __init__(self, *, width: int, bit_depth: int, rgb_pins: Sequence[digitalio.DigitalInOut], addr_pins: Sequence[digitalio.DigitalInOut], clock_pin: digitalio.DigitalInOut, latch_pin: digitalio.DigitalInOut, output_enable_pin: digitalio.DigitalInOut, doublebuffer: bool = True, framebuffer: Optional[WriteableBuffer] = None, height: int = 0) -> None:
+//| def __init__(self, *, width: int, bit_depth: int, rgb_pins: Sequence[digitalio.DigitalInOut], addr_pins: Sequence[digitalio.DigitalInOut], clock_pin: digitalio.DigitalInOut, latch_pin: digitalio.DigitalInOut, output_enable_pin: digitalio.DigitalInOut, doublebuffer: bool = True, framebuffer: Optional[WriteableBuffer] = None, height: int = 0, tile: int = 1, serpentine: bool = True) -> None:
//| """Create a RGBMatrix object with the given attributes. The height of
-//| the display is determined by the number of rgb and address pins:
-//| len(rgb_pins) // 3 * 2 ** len(address_pins). With 6 RGB pins and 4
-//| address lines, the display will be 32 pixels tall. If the optional height
+//| the display is determined by the number of rgb and address pins and the number of tiles:
+//| ``len(rgb_pins) // 3 * 2 ** len(address_pins) * abs(tile)``. With 6 RGB pins, 4
+//| address lines, and a single matrix, the display will be 32 pixels tall. If the optional height
//| parameter is specified and is not 0, it is checked against the calculated
//| height.
//|
@@ -172,7 +172,7 @@ STATIC void preflight_pins_or_throw(uint8_t clock_pin, uint8_t *rgb_pins, uint8_
STATIC mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_width, ARG_bit_depth, ARG_rgb_list, ARG_addr_list,
- ARG_clock_pin, ARG_latch_pin, ARG_output_enable_pin, ARG_doublebuffer, ARG_framebuffer, ARG_height };
+ ARG_clock_pin, ARG_latch_pin, ARG_output_enable_pin, ARG_doublebuffer, ARG_framebuffer, ARG_height, ARG_tile, ARG_serpentine };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_width, MP_ARG_INT | MP_ARG_REQUIRED | MP_ARG_KW_ONLY },
{ MP_QSTR_bit_depth, MP_ARG_INT | MP_ARG_REQUIRED | MP_ARG_KW_ONLY },
@@ -184,6 +184,8 @@ STATIC mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n
{ MP_QSTR_doublebuffer, MP_ARG_BOOL | MP_ARG_KW_ONLY, { .u_bool = true } },
{ MP_QSTR_framebuffer, MP_ARG_OBJ | MP_ARG_KW_ONLY, { .u_obj = mp_const_none } },
{ MP_QSTR_height, MP_ARG_INT | MP_ARG_KW_ONLY, { .u_int = 0 } },
+ { MP_QSTR_tile, MP_ARG_INT | MP_ARG_KW_ONLY, { .u_int = 1 } },
+ { MP_QSTR_serpentine, MP_ARG_BOOL | MP_ARG_KW_ONLY, { .u_bool = true } },
};
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
@@ -210,12 +212,18 @@ STATIC mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n
mp_raise_ValueError_varg(translate("Must use a multiple of 6 rgb pins, not %d"), rgb_count);
}
- // TODO(@jepler) Use fewer than all rows of pixels if height < computed_height
+ int tile = args[ARG_tile].u_int;
+
+ if (tile <= 0) {
+ mp_raise_ValueError_varg(
+ translate("tile must be greater than zero"));
+ }
+
+ int computed_height = (rgb_count / 3) * (1 << (addr_count)) * tile;
if (args[ARG_height].u_int != 0) {
- int computed_height = (rgb_count / 3) << (addr_count);
if (computed_height != args[ARG_height].u_int) {
mp_raise_ValueError_varg(
- translate("%d address pins and %d rgb pins indicate a height of %d, not %d"), addr_count, rgb_count, computed_height, args[ARG_height].u_int);
+ translate("%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d"), addr_count, rgb_count, tile, computed_height, args[ARG_height].u_int);
}
}
@@ -228,7 +236,7 @@ STATIC mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n
mp_obj_t framebuffer = args[ARG_framebuffer].u_obj;
if (framebuffer == mp_const_none) {
int width = args[ARG_width].u_int;
- int bufsize = 2 * width * rgb_count / 3 * (1 << addr_count);
+ int bufsize = 2 * width * computed_height;
framebuffer = mp_obj_new_bytearray_of_zeros(bufsize);
}
@@ -239,7 +247,7 @@ STATIC mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n
addr_count, addr_pins,
clock_pin, latch_pin, output_enable_pin,
args[ARG_doublebuffer].u_bool,
- framebuffer, NULL);
+ framebuffer, tile, args[ARG_serpentine].u_bool, NULL);
claim_and_never_reset_pins(args[ARG_rgb_list].u_obj);
claim_and_never_reset_pins(args[ARG_addr_list].u_obj);
diff --git a/shared-bindings/rgbmatrix/RGBMatrix.h b/shared-bindings/rgbmatrix/RGBMatrix.h
index bfe37c340..4eb3c04b2 100644
--- a/shared-bindings/rgbmatrix/RGBMatrix.h
+++ b/shared-bindings/rgbmatrix/RGBMatrix.h
@@ -31,7 +31,7 @@
extern const mp_obj_type_t rgbmatrix_RGBMatrix_type;
-void common_hal_rgbmatrix_rgbmatrix_construct(rgbmatrix_rgbmatrix_obj_t* self, int width, int bit_depth, uint8_t rgb_count, uint8_t* rgb_pins, uint8_t addr_count, uint8_t* addr_pins, uint8_t clock_pin, uint8_t latch_pin, uint8_t oe_pin, bool doublebuffer, mp_obj_t framebuffer, void* timer);
+void common_hal_rgbmatrix_rgbmatrix_construct(rgbmatrix_rgbmatrix_obj_t* self, int width, int bit_depth, uint8_t rgb_count, uint8_t* rgb_pins, uint8_t addr_count, uint8_t* addr_pins, uint8_t clock_pin, uint8_t latch_pin, uint8_t oe_pin, bool doublebuffer, mp_obj_t framebuffer, int8_t tile, bool serpentine, void* timer);
void common_hal_rgbmatrix_rgbmatrix_deinit(rgbmatrix_rgbmatrix_obj_t*);
void rgbmatrix_rgbmatrix_collect_ptrs(rgbmatrix_rgbmatrix_obj_t*);
void common_hal_rgbmatrix_rgbmatrix_reconstruct(rgbmatrix_rgbmatrix_obj_t* self, mp_obj_t framebuffer);
diff --git a/shared-bindings/support_matrix.rst b/shared-bindings/support_matrix.rst
index 1b75e0256..a2fb7987d 100644
--- a/shared-bindings/support_matrix.rst
+++ b/shared-bindings/support_matrix.rst
@@ -1,7 +1,7 @@
.. _module-support-matrix:
-Support Matrix
-===============
+Module Support Matrix - Which Modules Are Available on Which Boards
+===================================================================
The following table lists the available built-in modules for each CircuitPython
capable board.
diff --git a/shared-module/_eve/__init__.c b/shared-module/_eve/__init__.c
index d95c777dc..579729d42 100644
--- a/shared-module/_eve/__init__.c
+++ b/shared-module/_eve/__init__.c
@@ -226,8 +226,9 @@ void common_hal__eve_Jump(common_hal__eve_t *eve, uint32_t dest) {
}
-void common_hal__eve_LineWidth(common_hal__eve_t *eve, uint32_t width) {
- C4(eve, ((14 << 24) | ((width & 4095))));
+void common_hal__eve_LineWidth(common_hal__eve_t *eve, mp_float_t width) {
+ int16_t iw = (int)(8 * width);
+ C4(eve, ((14 << 24) | ((iw & 4095))));
}
@@ -246,8 +247,9 @@ void common_hal__eve_PaletteSource(common_hal__eve_t *eve, uint32_t addr) {
}
-void common_hal__eve_PointSize(common_hal__eve_t *eve, uint32_t size) {
- C4(eve, ((13 << 24) | ((size & 8191))));
+void common_hal__eve_PointSize(common_hal__eve_t *eve, mp_float_t size) {
+ int16_t is = (int)(8 * size);
+ C4(eve, ((13 << 24) | ((is & 8191))));
}
@@ -301,13 +303,15 @@ void common_hal__eve_Tag(common_hal__eve_t *eve, uint32_t s) {
}
-void common_hal__eve_VertexTranslateX(common_hal__eve_t *eve, uint32_t x) {
- C4(eve, ((43 << 24) | (((x) & 131071))));
+void common_hal__eve_VertexTranslateX(common_hal__eve_t *eve, mp_float_t x) {
+ int16_t ix = (int)(16 * x);
+ C4(eve, ((43 << 24) | (ix & 131071)));
}
-void common_hal__eve_VertexTranslateY(common_hal__eve_t *eve, uint32_t y) {
- C4(eve, ((44 << 24) | (((y) & 131071))));
+void common_hal__eve_VertexTranslateY(common_hal__eve_t *eve, mp_float_t y) {
+ int16_t iy = (int)(16 * y);
+ C4(eve, ((44 << 24) | (iy & 131071)));
}
diff --git a/shared-module/adafruit_bus_device/I2CDevice.c b/shared-module/adafruit_bus_device/I2CDevice.c
index 83abe80d6..792ab7183 100644
--- a/shared-module/adafruit_bus_device/I2CDevice.c
+++ b/shared-module/adafruit_bus_device/I2CDevice.c
@@ -31,48 +31,60 @@
#include "py/runtime.h"
#include "lib/utils/interrupt_char.h"
-void common_hal_adafruit_bus_device_i2cdevice_construct(adafruit_bus_device_i2cdevice_obj_t *self, busio_i2c_obj_t *i2c, uint8_t device_address) {
+void common_hal_adafruit_bus_device_i2cdevice_construct(adafruit_bus_device_i2cdevice_obj_t *self, mp_obj_t *i2c, uint8_t device_address) {
self->i2c = i2c;
self->device_address = device_address;
}
void common_hal_adafruit_bus_device_i2cdevice_lock(adafruit_bus_device_i2cdevice_obj_t *self) {
- bool success = common_hal_busio_i2c_try_lock(self->i2c);
+ mp_obj_t dest[2];
+ mp_load_method(self->i2c, MP_QSTR_try_lock, dest);
- while (!success) {
+ mp_obj_t success = mp_call_method_n_kw(0, 0, dest);
+
+ while (!mp_obj_is_true(success)) {
RUN_BACKGROUND_TASKS;
if (mp_hal_is_interrupted()) {
break;
}
- success = common_hal_busio_i2c_try_lock(self->i2c);
+ success = mp_call_method_n_kw(0, 0, dest);
}
}
void common_hal_adafruit_bus_device_i2cdevice_unlock(adafruit_bus_device_i2cdevice_obj_t *self) {
- common_hal_busio_i2c_unlock(self->i2c);
-}
-
-uint8_t common_hal_adafruit_bus_device_i2cdevice_readinto(adafruit_bus_device_i2cdevice_obj_t *self, mp_obj_t buffer, size_t length) {
- return common_hal_busio_i2c_read(self->i2c, self->device_address, buffer, length);
-}
-
-uint8_t common_hal_adafruit_bus_device_i2cdevice_write(adafruit_bus_device_i2cdevice_obj_t *self, mp_obj_t buffer, size_t length, bool transmit_stop_bit) {
- return common_hal_busio_i2c_write(self->i2c, self->device_address, buffer, length, transmit_stop_bit);
+ mp_obj_t dest[2];
+ mp_load_method(self->i2c, MP_QSTR_unlock, dest);
+ mp_call_method_n_kw(0, 0, dest);
}
void common_hal_adafruit_bus_device_i2cdevice_probe_for_device(adafruit_bus_device_i2cdevice_obj_t *self) {
common_hal_adafruit_bus_device_i2cdevice_lock(self);
- mp_buffer_info_t bufinfo;
- mp_obj_t buffer = mp_obj_new_bytearray_of_zeros(1);
+ mp_buffer_info_t write_bufinfo;
+ mp_obj_t write_buffer = mp_obj_new_bytearray_of_zeros(0);
+ mp_get_buffer_raise(write_buffer, &write_bufinfo, MP_BUFFER_READ);
- mp_get_buffer_raise(buffer, &bufinfo, MP_BUFFER_WRITE);
+ mp_obj_t dest[4];
- uint8_t status = common_hal_adafruit_bus_device_i2cdevice_readinto(self, (uint8_t*)bufinfo.buf, 1);
- if (status != 0) {
+ /* catch exceptions that may be thrown while probing for the device */
+ nlr_buf_t nlr;
+ if (nlr_push(&nlr) == 0) {
+ mp_load_method(self->i2c, MP_QSTR_writeto, dest);
+ dest[2] = mp_obj_new_int_from_ull(self->device_address);
+ dest[3] = write_buffer;
+ mp_call_method_n_kw(2, 0, dest);
+ nlr_pop();
+ } else {
common_hal_adafruit_bus_device_i2cdevice_unlock(self);
- mp_raise_ValueError_varg(translate("No I2C device at address: %x"), self->device_address);
+
+ if (mp_obj_is_subclass_fast(MP_OBJ_FROM_PTR(((mp_obj_base_t*)nlr.ret_val)->type), MP_OBJ_FROM_PTR(&mp_type_OSError))) {
+ mp_raise_ValueError_varg(translate("No I2C device at address: %x"), self->device_address);
+ }
+ else {
+ /* In case we receive an unrelated exception pass it up */
+ nlr_raise(MP_OBJ_FROM_PTR(nlr.ret_val));
+ }
}
common_hal_adafruit_bus_device_i2cdevice_unlock(self);
diff --git a/shared-module/adafruit_bus_device/I2CDevice.h b/shared-module/adafruit_bus_device/I2CDevice.h
index d06adb9f5..b76bafb2c 100644
--- a/shared-module/adafruit_bus_device/I2CDevice.h
+++ b/shared-module/adafruit_bus_device/I2CDevice.h
@@ -32,7 +32,7 @@
typedef struct {
mp_obj_base_t base;
- busio_i2c_obj_t *i2c;
+ mp_obj_t *i2c;
uint8_t device_address;
} adafruit_bus_device_i2cdevice_obj_t;
diff --git a/shared-module/rgbmatrix/RGBMatrix.c b/shared-module/rgbmatrix/RGBMatrix.c
index a09767b62..b8db0d893 100644
--- a/shared-module/rgbmatrix/RGBMatrix.c
+++ b/shared-module/rgbmatrix/RGBMatrix.c
@@ -42,7 +42,7 @@
extern Protomatter_core *_PM_protoPtr;
-void common_hal_rgbmatrix_rgbmatrix_construct(rgbmatrix_rgbmatrix_obj_t *self, int width, int bit_depth, uint8_t rgb_count, uint8_t *rgb_pins, uint8_t addr_count, uint8_t *addr_pins, uint8_t clock_pin, uint8_t latch_pin, uint8_t oe_pin, bool doublebuffer, mp_obj_t framebuffer, void *timer) {
+void common_hal_rgbmatrix_rgbmatrix_construct(rgbmatrix_rgbmatrix_obj_t *self, int width, int bit_depth, uint8_t rgb_count, uint8_t *rgb_pins, uint8_t addr_count, uint8_t *addr_pins, uint8_t clock_pin, uint8_t latch_pin, uint8_t oe_pin, bool doublebuffer, mp_obj_t framebuffer, int8_t tile, bool serpentine, void *timer) {
self->width = width;
self->bit_depth = bit_depth;
self->rgb_count = rgb_count;
@@ -53,6 +53,8 @@ void common_hal_rgbmatrix_rgbmatrix_construct(rgbmatrix_rgbmatrix_obj_t *self, i
self->oe_pin = oe_pin;
self->latch_pin = latch_pin;
self->doublebuffer = doublebuffer;
+ self->tile = tile;
+ self->serpentine = serpentine;
self->timer = timer ? timer : common_hal_rgbmatrix_timer_allocate();
if (self->timer == NULL) {
@@ -60,7 +62,7 @@ void common_hal_rgbmatrix_rgbmatrix_construct(rgbmatrix_rgbmatrix_obj_t *self, i
}
self->width = width;
- self->bufsize = 2 * width * rgb_count / 3 * (1 << addr_count);
+ self->bufsize = 2 * width * common_hal_rgbmatrix_rgbmatrix_get_height(self);
common_hal_rgbmatrix_rgbmatrix_reconstruct(self, framebuffer);
}
@@ -95,7 +97,8 @@ void common_hal_rgbmatrix_rgbmatrix_reconstruct(rgbmatrix_rgbmatrix_obj_t* self,
self->rgb_count/6, self->rgb_pins,
self->addr_count, self->addr_pins,
self->clock_pin, self->latch_pin, self->oe_pin,
- self->doublebuffer, self->timer);
+ self->doublebuffer, self->serpentine ? -self->tile : self->tile,
+ self->timer);
if (stat == PROTOMATTER_OK) {
_PM_protoPtr = &self->protomatter;
@@ -209,7 +212,7 @@ int common_hal_rgbmatrix_rgbmatrix_get_width(rgbmatrix_rgbmatrix_obj_t* self) {
}
int common_hal_rgbmatrix_rgbmatrix_get_height(rgbmatrix_rgbmatrix_obj_t* self) {
- int computed_height = (self->rgb_count / 3) << (self->addr_count);
+ int computed_height = (self->rgb_count / 3) * (1 << (self->addr_count)) * self->tile;
return computed_height;
}
diff --git a/shared-module/rgbmatrix/RGBMatrix.h b/shared-module/rgbmatrix/RGBMatrix.h
index 6dbc6fd41..4a0e9235e 100644
--- a/shared-module/rgbmatrix/RGBMatrix.h
+++ b/shared-module/rgbmatrix/RGBMatrix.h
@@ -44,4 +44,6 @@ typedef struct {
bool core_is_initialized;
bool paused;
bool doublebuffer;
+ bool serpentine;
+ int8_t tile;
} rgbmatrix_rgbmatrix_obj_t;
diff --git a/tools/build_board_info.py b/tools/build_board_info.py
index 7b556ee5d..70d5e2bc7 100644
--- a/tools/build_board_info.py
+++ b/tools/build_board_info.py
@@ -271,6 +271,7 @@ def generate_download_info():
info = current_info[board]
for version in info["versions"]:
previous_releases.add(version["version"])
+ previous_languages.update(version["languages"])
if version["stable"] == new_stable or (
new_stable and version["version"].startswith(this_version)
):