summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build.yml30
-rw-r--r--.github/workflows/create_website_pr.yml2
-rw-r--r--.github/workflows/pre-commit.yml2
-rw-r--r--.gitmodules2
-rw-r--r--CONTRIBUTING.md2
-rw-r--r--README.rst4
-rw-r--r--extmod/machine_mem.c2
-rw-r--r--extmod/moduheapq.c2
-rw-r--r--extmod/modujson.c36
-rw-r--r--extmod/modure.c6
-rw-r--r--extmod/moduzlib.c2
m---------extmod/ulab0
-rw-r--r--extmod/vfs_posix_file.c2
m---------frozen/Adafruit_CircuitPython_Requests0
m---------lib/protomatter0
m---------lib/tinyusb0
-rw-r--r--locale/ID.po219
-rw-r--r--locale/circuitpython.pot217
-rw-r--r--locale/cs.po231
-rw-r--r--locale/de_DE.po349
-rw-r--r--locale/el.po219
-rw-r--r--locale/es.po394
-rw-r--r--locale/fil.po219
-rw-r--r--locale/fr.po292
-rw-r--r--locale/hi.po219
-rw-r--r--locale/it_IT.po219
-rw-r--r--locale/ja.po310
-rw-r--r--locale/ko.po219
-rw-r--r--locale/nl.po398
-rw-r--r--locale/pl.po264
-rw-r--r--locale/pt_BR.po289
-rw-r--r--locale/sv.po297
-rw-r--r--locale/zh_Latn_pinyin.po287
-rwxr-xr-xmain.c17
-rw-r--r--ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h10
-rw-r--r--ports/atmel-samd/boards/bdmicro_vina_d51/pins.c118
-rw-r--r--ports/atmel-samd/boards/cp_sapling_m0/board.c40
-rw-r--r--ports/atmel-samd/boards/cp_sapling_m0/mpconfigboard.h57
-rw-r--r--ports/atmel-samd/boards/cp_sapling_m0/mpconfigboard.mk24
-rw-r--r--ports/atmel-samd/boards/cp_sapling_m0/pins.c38
-rw-r--r--ports/atmel-samd/boards/cp_sapling_m0_spiflash/board.c40
-rw-r--r--ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.h62
-rw-r--r--ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk33
-rw-r--r--ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c38
-rw-r--r--ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk6
-rw-r--r--ports/atmel-samd/boards/dynossat_edu_eps/pins.c17
-rw-r--r--ports/atmel-samd/boards/dynossat_edu_obc/pins.c4
-rw-r--r--ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk2
-rw-r--r--ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk2
-rw-r--r--ports/atmel-samd/boards/feather_m4_can/pins.c12
-rw-r--r--ports/atmel-samd/boards/matrixportal_m4/pins.c4
-rw-r--r--ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h4
-rw-r--r--ports/atmel-samd/boards/openbook_m4/board.c3
-rw-r--r--ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h3
-rw-r--r--ports/atmel-samd/boards/pybadge_airlift/pins.c7
-rw-r--r--ports/atmel-samd/boards/pyportal/mpconfigboard.h3
-rw-r--r--ports/atmel-samd/boards/pyportal/pins.c7
-rw-r--r--ports/atmel-samd/boards/pyportal_titano/mpconfigboard.h3
-rw-r--r--ports/atmel-samd/boards/pyportal_titano/pins.c7
-rw-r--r--ports/atmel-samd/boards/uchip/mpconfigboard.h2
-rw-r--r--ports/atmel-samd/boards/uchip/pins.c26
-rw-r--r--ports/atmel-samd/common-hal/audiobusio/PDMIn.c10
-rw-r--r--ports/atmel-samd/common-hal/displayio/ParallelBus.c3
-rw-r--r--ports/atmel-samd/mpconfigport.h2
-rw-r--r--ports/atmel-samd/mpconfigport.mk4
-rw-r--r--ports/atmel-samd/supervisor/port.c4
-rw-r--r--ports/cxd56/supervisor/port.c4
-rw-r--r--ports/esp32s2/Makefile5
-rw-r--r--ports/esp32s2/README.md6
-rw-r--r--ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/board.c169
-rw-r--r--ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h45
-rw-r--r--ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk17
-rw-r--r--ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c54
-rw-r--r--ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/sdkconfig33
-rw-r--r--ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c60
-rw-r--r--ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.mk2
-rw-r--r--ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h13
-rw-r--r--ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h10
-rw-r--r--ports/esp32s2/common-hal/busio/SPI.c11
-rw-r--r--ports/esp32s2/common-hal/canio/CAN.c295
-rw-r--r--ports/esp32s2/common-hal/canio/CAN.h49
-rw-r--r--ports/esp32s2/common-hal/canio/Listener.c182
-rw-r--r--ports/esp32s2/common-hal/canio/Listener.h40
-rw-r--r--ports/esp32s2/common-hal/canio/__init__.c25
-rw-r--r--ports/esp32s2/common-hal/canio/__init__.h27
-rw-r--r--ports/esp32s2/common-hal/countio/Counter.c84
-rw-r--r--ports/esp32s2/common-hal/countio/Counter.h40
-rw-r--r--ports/esp32s2/common-hal/countio/__init__.c1
-rw-r--r--ports/esp32s2/common-hal/displayio/ParallelBus.c3
-rw-r--r--ports/esp32s2/common-hal/frequencyio/FrequencyIn.c193
-rw-r--r--ports/esp32s2/common-hal/frequencyio/FrequencyIn.h45
-rw-r--r--ports/esp32s2/common-hal/frequencyio/__init__.c1
-rw-r--r--ports/esp32s2/common-hal/microcontroller/Pin.c4
-rw-r--r--ports/esp32s2/common-hal/microcontroller/__init__.c25
-rw-r--r--ports/esp32s2/common-hal/neopixel_write/__init__.c2
-rw-r--r--ports/esp32s2/common-hal/nvm/ByteArray.c97
-rw-r--r--ports/esp32s2/common-hal/nvm/ByteArray.h38
-rw-r--r--ports/esp32s2/common-hal/nvm/__init__.c1
-rw-r--r--ports/esp32s2/common-hal/ps2io/Ps2.c392
-rw-r--r--ports/esp32s2/common-hal/ps2io/Ps2.h60
-rw-r--r--ports/esp32s2/common-hal/ps2io/__init__.c1
-rw-r--r--ports/esp32s2/common-hal/pulseio/PulseIn.c8
-rw-r--r--ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c86
-rw-r--r--ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.h40
-rw-r--r--ports/esp32s2/common-hal/rotaryio/__init__.c1
-rw-r--r--ports/esp32s2/common-hal/socketpool/Socket.c93
-rw-r--r--ports/esp32s2/common-hal/socketpool/SocketPool.c7
-rw-r--r--ports/esp32s2/common-hal/touchio/TouchIn.c106
-rw-r--r--ports/esp32s2/common-hal/touchio/TouchIn.h42
-rw-r--r--ports/esp32s2/common-hal/touchio/__init__.c1
-rw-r--r--ports/esp32s2/common-hal/watchdog/WatchDogMode.c1
-rw-r--r--ports/esp32s2/common-hal/watchdog/WatchDogTimer.c93
-rw-r--r--ports/esp32s2/common-hal/watchdog/WatchDogTimer.h43
-rw-r--r--ports/esp32s2/common-hal/watchdog/__init__.c1
-rw-r--r--ports/esp32s2/common-hal/wifi/Radio.c13
-rw-r--r--ports/esp32s2/common-hal/wifi/__init__.c11
m---------ports/esp32s2/esp-idf0
-rw-r--r--ports/esp32s2/esp-idf-config/sdkconfig.defaults40
-rw-r--r--ports/esp32s2/mpconfigport.h7
-rw-r--r--ports/esp32s2/mpconfigport.mk18
-rw-r--r--ports/esp32s2/peripherals/pcnt.c68
-rw-r--r--ports/esp32s2/peripherals/pcnt.h36
-rwxr-xr-xports/esp32s2/peripherals/pins.c91
-rw-r--r--ports/esp32s2/peripherals/pins.h2
-rw-r--r--ports/esp32s2/peripherals/timer.c76
-rw-r--r--ports/esp32s2/peripherals/timer.h41
-rw-r--r--ports/esp32s2/supervisor/esp_port.h35
-rw-r--r--ports/esp32s2/supervisor/port.c88
-rw-r--r--ports/esp32s2/supervisor/usb.c22
-rw-r--r--ports/litex/supervisor/port.c4
-rw-r--r--ports/mimxrt10xx/common-hal/displayio/ParallelBus.c3
-rw-r--r--ports/mimxrt10xx/supervisor/port.c7
-rw-r--r--ports/nrf/boards/ADM_B_NRF52840_1/board.c (renamed from ports/stm/boards/thunderpack/board.c)0
-rw-r--r--ports/nrf/boards/ADM_B_NRF52840_1/mpconfigboard.h33
-rw-r--r--ports/nrf/boards/ADM_B_NRF52840_1/mpconfigboard.mk8
-rw-r--r--ports/nrf/boards/ADM_B_NRF52840_1/pins.c57
-rw-r--r--ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h4
-rw-r--r--ports/nrf/boards/hiibot_bluefi/pins.c8
-rw-r--r--ports/nrf/common-hal/displayio/ParallelBus.c3
-rw-r--r--ports/nrf/common-hal/watchdog/WatchDogTimer.c3
-rw-r--r--ports/nrf/supervisor/port.c4
-rw-r--r--ports/stm/boards/STM32F411_nvm_nofs.ld27
-rw-r--r--ports/stm/boards/meowbit_v121/mpconfigboard.mk2
-rw-r--r--ports/stm/boards/thunderpack_v11/board.c38
-rw-r--r--ports/stm/boards/thunderpack_v11/mpconfigboard.h (renamed from ports/stm/boards/thunderpack/mpconfigboard.h)2
-rw-r--r--ports/stm/boards/thunderpack_v11/mpconfigboard.mk (renamed from ports/stm/boards/thunderpack/mpconfigboard.mk)2
-rw-r--r--ports/stm/boards/thunderpack_v11/pins.c (renamed from ports/stm/boards/thunderpack/pins.c)0
-rw-r--r--ports/stm/boards/thunderpack_v12/board.c38
-rw-r--r--ports/stm/boards/thunderpack_v12/mpconfigboard.h57
-rw-r--r--ports/stm/boards/thunderpack_v12/mpconfigboard.mk21
-rw-r--r--ports/stm/boards/thunderpack_v12/pins.c39
-rw-r--r--ports/stm/common-hal/displayio/ParallelBus.c3
-rw-r--r--ports/stm/common-hal/microcontroller/Pin.c40
-rw-r--r--ports/stm/common-hal/nvm/ByteArray.c2
-rw-r--r--ports/stm/supervisor/internal_flash.h8
-rw-r--r--ports/stm/supervisor/port.c4
-rw-r--r--ports/unix/modjni.c4
-rw-r--r--py/argcheck.c18
-rw-r--r--py/bc.c4
-rw-r--r--py/builtinimport.c12
-rw-r--r--py/circuitpy_mpconfig.h21
-rw-r--r--py/circuitpy_mpconfig.mk3
-rw-r--r--py/compile.c12
-rw-r--r--py/modbuiltins.c6
-rw-r--r--py/modsys.c6
-rw-r--r--py/obj.c67
-rw-r--r--py/objdict.c6
-rw-r--r--py/objmodule.c7
-rw-r--r--py/objnamedtuple.c20
-rw-r--r--py/objset.c2
-rw-r--r--py/objstr.c113
-rw-r--r--py/objtype.c24
-rw-r--r--py/parsenum.c10
-rw-r--r--py/py.mk4
-rw-r--r--py/pystack.c4
-rw-r--r--py/runtime.c84
-rw-r--r--py/runtime.h1
-rw-r--r--shared-bindings/board/__init__.c10
-rw-r--r--shared-bindings/canio/CAN.c27
-rw-r--r--shared-bindings/canio/Listener.c2
-rw-r--r--shared-bindings/canio/Match.c2
-rw-r--r--shared-bindings/canio/Message.c2
-rw-r--r--shared-bindings/canio/RemoteTransmissionRequest.c2
-rw-r--r--shared-bindings/displayio/Bitmap.c4
-rw-r--r--shared-bindings/displayio/ColorConverter.c4
-rw-r--r--shared-bindings/displayio/Display.c24
-rw-r--r--shared-bindings/displayio/EPaperDisplay.c88
-rw-r--r--shared-bindings/displayio/EPaperDisplay.h7
-rw-r--r--shared-bindings/displayio/FourWire.h3
-rw-r--r--shared-bindings/displayio/I2CDisplay.h3
-rw-r--r--shared-bindings/displayio/ParallelBus.h3
-rw-r--r--shared-bindings/displayio/__init__.h3
-rw-r--r--shared-bindings/ipaddress/IPv4Address.c2
-rw-r--r--shared-bindings/ps2io/Ps2.c5
-rw-r--r--shared-bindings/rgbmatrix/RGBMatrix.c7
-rw-r--r--shared-bindings/socket/__init__.c15
-rw-r--r--shared-bindings/socketpool/Socket.c124
-rw-r--r--shared-bindings/socketpool/Socket.h4
-rw-r--r--shared-bindings/socketpool/SocketPool.c13
-rw-r--r--shared-bindings/ssl/SSLContext.c2
-rw-r--r--shared-bindings/watchdog/WatchDogTimer.c7
-rw-r--r--shared-bindings/wifi/Radio.c24
-rw-r--r--shared-module/_eve/__init__.c4
-rw-r--r--shared-module/board/__init__.c26
-rw-r--r--shared-module/displayio/ColorConverter.c11
-rw-r--r--shared-module/displayio/EPaperDisplay.c57
-rw-r--r--shared-module/displayio/EPaperDisplay.h5
-rw-r--r--shared-module/displayio/FourWire.c3
-rw-r--r--shared-module/displayio/I2CDisplay.c3
-rw-r--r--shared-module/displayio/Palette.c3
-rw-r--r--shared-module/displayio/Palette.h1
-rw-r--r--shared-module/displayio/TileGrid.c6
-rw-r--r--shared-module/displayio/display_core.c1
-rw-r--r--shared-module/rgbmatrix/RGBMatrix.c25
-rw-r--r--shared-module/sharpdisplay/SharpMemoryFramebuffer.c57
-rw-r--r--shared-module/sharpdisplay/SharpMemoryFramebuffer.h1
-rw-r--r--shared-module/usb_midi/__init__.c8
-rwxr-xr-xsupervisor/memory.h33
-rw-r--r--supervisor/port.h5
-rw-r--r--supervisor/serial.h1
-rw-r--r--supervisor/shared/display.c57
-rw-r--r--supervisor/shared/external_flash/external_flash.c2
-rwxr-xr-xsupervisor/shared/memory.c319
-rw-r--r--supervisor/shared/serial.c6
-rwxr-xr-xsupervisor/shared/stack.c38
-rwxr-xr-xsupervisor/shared/stack.h6
-rw-r--r--supervisor/shared/usb/usb.c3
-rw-r--r--supervisor/shared/usb/usb_msc_flash.c2
-rw-r--r--tools/build_board_info.py137
-rw-r--r--tools/extract_pyi.py9
230 files changed, 8489 insertions, 2022 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index fa576bbf0..2378a0965 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -14,7 +14,7 @@ on:
jobs:
test:
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-20.04
steps:
- name: Dump GitHub context
env:
@@ -37,7 +37,7 @@ jobs:
run: |
sudo apt-get install -y eatmydata
sudo eatmydata apt-get install -y gettext librsvg2-bin mingw-w64 latexmk texlive-fonts-recommended texlive-latex-recommended texlive-latex-extra
- pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli
+ pip install requests sh click setuptools cpp-coveralls "Sphinx<4" sphinx-rtd-theme recommonmark sphinx-autoapi sphinxcontrib-svg2pdfconverter polib pyyaml astroid isort black awscli mypy
- name: Versions
run: |
gcc --version
@@ -67,8 +67,8 @@ jobs:
- name: mpy Tests
run: MICROPY_CPYTHON3=python3.8 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float
working-directory: tests
- - name: Stubs
- run: make stubs -j2
+ - name: Build and Validate Stubs
+ run: make check-stubs -j2
- uses: actions/upload-artifact@v2
with:
name: stubs
@@ -111,12 +111,15 @@ jobs:
with:
name: mpy-cross.static-x64-windows
path: mpy-cross/mpy-cross.static.exe
- - name: Upload mpy-cross builds to S3
+ - name: Upload stubs and mpy-cross builds to S3
run: |
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static-raspbian s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-raspbian-${{ env.CP_VERSION }} --no-progress --region us-east-1
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-amd64-linux-${{ env.CP_VERSION }} --no-progress --region us-east-1
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross.static.exe s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross.static-x64-windows-${{ env.CP_VERSION }}.exe --no-progress --region us-east-1
+ zip -9r circuitpython-stubs.zip circuitpython-stubs
+ [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs.zip s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1
env:
+ AWS_PAGER: ''
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
@@ -157,19 +160,21 @@ jobs:
run: |
[ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp mpy-cross/mpy-cross s3://adafruit-circuit-python/bin/mpy-cross/mpy-cross-macos-catalina-${{ env.CP_VERSION }} --no-progress --region us-east-1
env:
+ AWS_PAGER: ''
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
build-arm:
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-20.04
needs: test
strategy:
fail-fast: false
matrix:
board:
- "8086_commander"
+ - "ADM_B_NRF52840_1"
- "TG-Watch02A"
- "aloriumtech_evo_m51"
- "aramcon_badge_2019"
@@ -193,6 +198,8 @@ jobs:
- "circuitplayground_express_displayio"
- "clue_nrf52840_express"
- "cp32-m4"
+ - "cp_sapling_m0"
+ - "cp_sapling_m0_spiflash"
- "datalore_ip_m4"
- "datum_distance"
- "datum_imu"
@@ -312,7 +319,8 @@ jobs:
- "teensy40"
- "teensy41"
- "teknikio_bluebird"
- - "thunderpack"
+ - "thunderpack_v11"
+ - "thunderpack_v12"
- "tinkeringtech_scoutmakes_azul"
- "trellis_m4_express"
- "trinket_m0"
@@ -360,12 +368,13 @@ jobs:
- name: Upload to S3
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
env:
+ AWS_PAGER: ''
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
build-riscv:
- runs-on: ubuntu-18.04
+ runs-on: ubuntu-20.04
needs: test
strategy:
fail-fast: false
@@ -408,16 +417,18 @@ jobs:
- name: Upload to S3
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
env:
+ AWS_PAGER: ''
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
build-xtensa:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
needs: test
strategy:
fail-fast: false
matrix:
board:
+ - "adafruit_magtag_2.9_grayscale"
- "adafruit_metro_esp32s2"
- "electroniccats_bastwifi"
- "espressif_kaluga_1"
@@ -501,6 +512,7 @@ jobs:
- name: Upload to S3
run: "[ -z \"$AWS_ACCESS_KEY_ID\" ] || aws s3 cp bin/ s3://adafruit-circuit-python/bin/ --recursive --no-progress --region us-east-1"
env:
+ AWS_PAGER: ''
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
if: github.event_name == 'push' || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested'))
diff --git a/.github/workflows/create_website_pr.yml b/.github/workflows/create_website_pr.yml
index 71959ffdc..c8aca30e4 100644
--- a/.github/workflows/create_website_pr.yml
+++ b/.github/workflows/create_website_pr.yml
@@ -10,7 +10,7 @@ on:
jobs:
website:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
steps:
- name: Dump GitHub context
env:
diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml
index eac9bfe09..8caf56d26 100644
--- a/.github/workflows/pre-commit.yml
+++ b/.github/workflows/pre-commit.yml
@@ -11,7 +11,7 @@ on:
jobs:
pre-commit:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- uses: actions/setup-python@v1
diff --git a/.gitmodules b/.gitmodules
index f66ce8aaf..aaa66caf7 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -152,4 +152,4 @@
url = https://github.com/adafruit/Adafruit_CircuitPython_RFM69.git
[submodule "ports/esp32s2/esp-idf"]
path = ports/esp32s2/esp-idf
- url = https://github.com/espressif/esp-idf.git
+ url = https://github.com/jepler/esp-idf.git
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 29db39793..15b4cfc89 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -6,7 +6,7 @@ SPDX-License-Identifier: MIT
# Contributing
Please note that this project is released with a
-[Contributor Code of Conduct](https://github.com/adafruit/circuitpython/blob/main/CODE_OF_CONDUCT.md).
+[Contributor Code of Conduct](CODE_OF_CONDUCT.md).
By participating in this project you agree to abide by its terms. Participation
covers any forum used to converse about CircuitPython including unofficial and official spaces. Failure to do
so will result in corrective actions such as time out or ban from the project.
diff --git a/README.rst b/README.rst
index d21e8d8d3..19992d284 100644
--- a/README.rst
+++ b/README.rst
@@ -114,14 +114,14 @@ Behavior
finishes or is interrupted. After it is done running, the vm and
hardware is reinitialized. **This means you cannot read state from**
``code.py`` **in the REPL anymore.** CircuitPython's goal for this
- change includes reduce confusion about pins and memory being used.
+ change includes reducing confusion about pins and memory being used.
- After ``code.py`` the REPL can be entered by pressing any key. It no
longer shares state with ``code.py`` so it is a fresh vm.
- Autoreload state will be maintained across reload.
- Adds a safe mode that does not run user code after a hard crash or
brown out. The hope is that this will make it easier to fix code that
causes nasty crashes by making it available through mass storage
- after the crash. A reset (the button) is needed after its fixed to
+ after the crash. A reset (the button) is needed after it's fixed to
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
diff --git a/extmod/machine_mem.c b/extmod/machine_mem.c
index 6c6e11063..8944c3a66 100644
--- a/extmod/machine_mem.c
+++ b/extmod/machine_mem.c
@@ -21,7 +21,7 @@
STATIC uintptr_t machine_mem_get_addr(mp_obj_t addr_o, uint align) {
uintptr_t addr = mp_obj_int_get_truncated(addr_o);
if ((addr & (align - 1)) != 0) {
- nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ValueError, translate("address %08x is not aligned to %d bytes"), addr, align));
+ mp_raise_ValueError_varg(translate("address %08x is not aligned to %d bytes"), addr, align);
}
return addr;
}
diff --git a/extmod/moduheapq.c b/extmod/moduheapq.c
index bc4b97ff5..50fe6c051 100644
--- a/extmod/moduheapq.c
+++ b/extmod/moduheapq.c
@@ -62,7 +62,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(mod_uheapq_heappush_obj, mod_uheapq_heappush);
STATIC mp_obj_t mod_uheapq_heappop(mp_obj_t heap_in) {
mp_obj_list_t *heap = get_heap(heap_in);
if (heap->len == 0) {
- nlr_raise(mp_obj_new_exception_msg(&mp_type_IndexError, translate("empty heap")));
+ mp_raise_IndexError(translate("empty heap"));
}
mp_obj_t item = heap->items[0];
heap->len -= 1;
diff --git a/extmod/modujson.c b/extmod/modujson.c
index 431b5e0cf..3bb4b3301 100644
--- a/extmod/modujson.c
+++ b/extmod/modujson.c
@@ -57,6 +57,8 @@ typedef struct _ujson_stream_t {
int errcode;
mp_obj_t python_readinto[2 + 1];
mp_obj_array_t bytearray_obj;
+ size_t start;
+ size_t end;
byte cur;
} ujson_stream_t;
@@ -77,28 +79,44 @@ STATIC byte ujson_stream_next(ujson_stream_t *s) {
return s->cur;
}
+// We read from an object's `readinto` method in chunks larger than the json
+// parser needs to reduce the number of function calls done.
+
+#define CIRCUITPY_JSON_READ_CHUNK_SIZE 64
+
STATIC mp_uint_t ujson_python_readinto(mp_obj_t obj, void *buf, mp_uint_t size, int *errcode) {
+ (void) size; // Ignore size because we know it's always 1.
ujson_stream_t* s = obj;
- s->bytearray_obj.items = buf;
- s->bytearray_obj.len = size;
- *errcode = 0;
- mp_obj_t ret = mp_call_method_n_kw(1, 0, s->python_readinto);
- if (ret == mp_const_none) {
- *errcode = MP_EAGAIN;
- return MP_STREAM_ERROR;
+
+ if (s->start == s->end) {
+ *errcode = 0;
+ mp_obj_t ret = mp_call_method_n_kw(1, 0, s->python_readinto);
+ if (ret == mp_const_none) {
+ *errcode = MP_EAGAIN;
+ return MP_STREAM_ERROR;
+ }
+ s->start = 0;
+ s->end = mp_obj_get_int(ret);
}
- return mp_obj_get_int(ret);
+
+ *((uint8_t *)buf) = ((uint8_t*) s->bytearray_obj.items)[s->start];
+ s->start++;
+ return 1;
}
STATIC mp_obj_t _mod_ujson_load(mp_obj_t stream_obj, bool return_first_json) {
const mp_stream_p_t *stream_p = mp_proto_get(MP_QSTR_protocol_stream, stream_obj);
ujson_stream_t s;
+ uint8_t character_buffer[CIRCUITPY_JSON_READ_CHUNK_SIZE];
if (stream_p == NULL) {
+ s.start = 0;
+ s.end = 0;
mp_load_method(stream_obj, MP_QSTR_readinto, s.python_readinto);
s.bytearray_obj.base.type = &mp_type_bytearray;
s.bytearray_obj.typecode = BYTEARRAY_TYPECODE;
+ s.bytearray_obj.len = CIRCUITPY_JSON_READ_CHUNK_SIZE;
s.bytearray_obj.free = 0;
- // len and items are set at read time
+ s.bytearray_obj.items = character_buffer;
s.python_readinto[2] = MP_OBJ_FROM_PTR(&s.bytearray_obj);
s.stream_obj = &s;
s.read = ujson_python_readinto;
diff --git a/extmod/modure.c b/extmod/modure.c
index a20f3ee42..bb54bc732 100644
--- a/extmod/modure.c
+++ b/extmod/modure.c
@@ -43,7 +43,7 @@ STATIC mp_obj_t match_group(mp_obj_t self_in, mp_obj_t no_in) {
mp_obj_match_t *self = MP_OBJ_TO_PTR(self_in);
mp_int_t no = mp_obj_get_int(no_in);
if (no < 0 || no >= self->num_matches) {
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_IndexError, no_in));
+ mp_raise_arg1(&mp_type_IndexError, no_in);
}
const char *start = self->caps[no * 2];
@@ -82,7 +82,7 @@ STATIC void match_span_helper(size_t n_args, const mp_obj_t *args, mp_obj_t span
if (n_args == 2) {
no = mp_obj_get_int(args[1]);
if (no < 0 || no >= self->num_matches) {
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_IndexError, args[1]));
+ mp_raise_arg1(&mp_type_IndexError, args[1]);
}
}
@@ -326,7 +326,7 @@ STATIC mp_obj_t re_sub_helper(mp_obj_t self_in, size_t n_args, const mp_obj_t *a
}
if (match_no >= (unsigned int)match->num_matches) {
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_IndexError, MP_OBJ_NEW_SMALL_INT(match_no)));
+ mp_raise_arg1(&mp_type_IndexError, MP_OBJ_NEW_SMALL_INT(match_no));
}
const char *start_match = match->caps[match_no * 2];
diff --git a/extmod/moduzlib.c b/extmod/moduzlib.c
index 8422e7598..b344f9642 100644
--- a/extmod/moduzlib.c
+++ b/extmod/moduzlib.c
@@ -179,7 +179,7 @@ STATIC mp_obj_t mod_uzlib_decompress(size_t n_args, const mp_obj_t *args) {
return res;
error:
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_ValueError, MP_OBJ_NEW_SMALL_INT(st)));
+ mp_raise_arg1(&mp_type_ValueError, MP_OBJ_NEW_SMALL_INT(st));
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mod_uzlib_decompress_obj, 1, 3, mod_uzlib_decompress);
diff --git a/extmod/ulab b/extmod/ulab
-Subproject 11a7ecff6d76a02644ff23a734b792afaa615e4
+Subproject aa7e741530df471d206a4a321823a37a913a0eb
diff --git a/extmod/vfs_posix_file.c b/extmod/vfs_posix_file.c
index 3f887785e..593b8d6a2 100644
--- a/extmod/vfs_posix_file.c
+++ b/extmod/vfs_posix_file.c
@@ -24,7 +24,7 @@ typedef struct _mp_obj_vfs_posix_file_t {
#ifdef MICROPY_CPYTHON_COMPAT
STATIC void check_fd_is_open(const mp_obj_vfs_posix_file_t *o) {
if (o->fd < 0) {
- nlr_raise(mp_obj_new_exception_msg(&mp_type_ValueError, translate("I/O operation on closed file")));
+ mp_raise_ValueError(translate("I/O operation on closed file"));
}
}
#else
diff --git a/frozen/Adafruit_CircuitPython_Requests b/frozen/Adafruit_CircuitPython_Requests
-Subproject 43017e30a1e772b67ac68293a944e863c031e38
+Subproject 531e8451522e3bba3e571610e4ac70efcb0cae5
diff --git a/lib/protomatter b/lib/protomatter
-Subproject de6b7704c530d886ad8dfa0fa1864764d86117e
+Subproject 902c16f49197a8baf5e71ec924a812a86e733a7
diff --git a/lib/tinyusb b/lib/tinyusb
-Subproject 8b2c82255750488232eae72f3d5dcbacfd6227f
+Subproject 218b80e63ab6ff87c1851e403f08b3d716d68f5
diff --git a/locale/ID.po b/locale/ID.po
index 958ff1e6b..6073b6a46 100644
--- a/locale/ID.po
+++ b/locale/ID.po
@@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-16 19:50-0500\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
"PO-Revision-Date: 2020-10-10 23:51+0000\n"
"Last-Translator: oon arfiandwi <oon.arfiandwi@gmail.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -292,11 +292,22 @@ msgstr "Alamat harus sepanjang %d byte"
msgid "Address type out of range"
msgstr "Jenis alamat di luar batas"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr ""
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "Semua perangkat I2C sedang digunakan"
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr ""
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr ""
@@ -327,6 +338,7 @@ msgstr "Semua timer untuk pin ini sedang digunakan"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -413,6 +425,10 @@ msgstr ""
"Auto-reload aktif. Silahkan simpan data-data (files) melalui USB untuk "
"menjalankannya atau masuk ke REPL untukmenonaktifkan.\n"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr ""
+
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate"
@@ -422,6 +438,11 @@ msgstr "Di bawah frame rate minimum"
msgid "Bit clock and word select must share a clock unit"
msgstr "Bit clock dan word harus memiliki kesamaan pada clock unit"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr ""
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "Kedalaman bit harus kelipatan 8."
@@ -793,7 +814,7 @@ msgstr "Mode kendara tidak digunakan saat arah input."
msgid "ECB only operates on 16 bytes at a time"
msgstr "ECB hanya beroperasi pada 16 byte di satu waktu"
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
msgstr ""
@@ -854,6 +875,10 @@ msgstr "Penyebaran yang diperluas dengan respon pindai tidak didukung."
msgid "FFT is defined for ndarrays only"
msgstr "FFT didefinisikan hanya untuk ndarrays"
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr ""
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
msgstr ""
@@ -919,6 +944,7 @@ msgid "File exists"
msgstr "File sudah ada"
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
msgstr ""
@@ -999,6 +1025,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "Ukuran penyangga salah"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@@ -1079,6 +1109,7 @@ msgid "Invalid byteorder string"
msgstr "String byteorder tidak valid"
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr "Periode penangkapan tidak valid. Kisaran yang valid: 1 - 500"
@@ -1120,7 +1151,8 @@ msgid "Invalid phase"
msgstr "Fase tidak valid"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Pin tidak valid"
@@ -1140,7 +1172,7 @@ msgstr "Pin untuk channel kanan tidak valid"
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1254,6 +1286,10 @@ msgstr "Harus menyediakan pin MISO atau MOSI"
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "Harus menggunakan kelipatan 6 pin rgb, bukan %d"
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr ""
+
#: py/parse.c
msgid "Name too long"
msgstr "Nama terlalu panjang"
@@ -1406,14 +1442,14 @@ msgstr "Parity ganjil tidak didukung"
msgid "Only 8 or 16 bit mono with "
msgstr "Hanya 8 atau 16 bit mono dengan "
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr ""
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr ""
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
#, c-format
msgid ""
@@ -1966,7 +2002,7 @@ msgstr ""
msgid "WARNING: Your code filename has two extensions\n"
msgstr "PERINGATAN: Nama file kode anda mempunyai dua ekstensi\n"
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
@@ -2051,10 +2087,6 @@ msgstr ""
msgid "addresses is empty"
msgstr ""
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr ""
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr ""
@@ -2063,6 +2095,10 @@ msgstr ""
msgid "argsort argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr ""
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr ""
@@ -2080,15 +2116,23 @@ msgstr "argumen num/types tidak cocok"
msgid "argument should be a '%q' not a '%q'"
msgstr ""
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr ""
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr ""
@@ -2097,15 +2141,15 @@ msgid "attributes not supported yet"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
+msgid "axis is out of bounds"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
+msgid "axis must be None, or an integer"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
+msgid "axis too long"
msgstr ""
#: py/builtinevex.c
@@ -2310,6 +2354,10 @@ msgid ""
"can't switch from manual field specification to automatic field numbering"
msgstr ""
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr ""
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr ""
@@ -2326,10 +2374,6 @@ msgstr ""
msgid "cannot perform relative import"
msgstr "tidak dapat melakukan relative import"
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr ""
-
#: py/emitnative.c
msgid "casting"
msgstr ""
@@ -2402,10 +2446,6 @@ msgstr ""
msgid "convolve arguments must not be empty"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr ""
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr ""
@@ -2414,6 +2454,10 @@ msgstr ""
msgid "couldn't determine SD card version"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "cross is defined for 1D arrays of length 3"
+msgstr ""
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr ""
@@ -2422,10 +2466,6 @@ msgstr ""
msgid "data must be of equal length"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr ""
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr ""
@@ -2455,6 +2495,10 @@ msgstr ""
msgid "diff argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr ""
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2570,6 +2614,10 @@ msgstr ""
msgid "first argument must be a function"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "first argument must be a tuple of ndarrays"
+msgstr ""
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr ""
@@ -2623,8 +2671,8 @@ msgstr "fungsi mendapatkan nilai ganda untuk argumen '%q'"
msgid "function has the same sign at the ends of interval"
msgstr ""
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
msgstr ""
#: py/argcheck.c
@@ -2694,6 +2742,7 @@ msgstr "lapisan (padding) tidak benar"
msgid "index is out of bounds"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "index keluar dari jangkauan"
@@ -2718,6 +2767,10 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr "inline assembler harus sebuah fungsi"
+#: extmod/ulab/code/ndarray.c
+msgid "input and output shapes are not compatible"
+msgstr ""
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@@ -2726,6 +2779,10 @@ msgstr ""
msgid "input array length must be power of 2"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "input arrays are not compatible"
+msgstr ""
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr ""
@@ -2738,6 +2795,22 @@ msgstr ""
msgid "input matrix is singular"
msgstr ""
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr ""
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr ""
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr ""
@@ -2750,6 +2823,10 @@ msgstr ""
msgid "input vectors must be of equal length"
msgstr ""
+#: extmod/ulab/code/poly/poly.c
+msgid "inputs are not iterable"
+msgstr ""
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr ""
@@ -2884,6 +2961,10 @@ msgstr ""
msgid "long int not supported in this build"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr ""
+
#: py/parse.c
msgid "malformed f-string"
msgstr ""
@@ -2914,10 +2995,22 @@ msgstr ""
msgid "max_length must be > 0"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr ""
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr ""
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr ""
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr ""
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -2955,10 +3048,6 @@ msgstr ""
msgid "must use keyword argument for key function"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr ""
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr ""
@@ -3041,6 +3130,10 @@ msgstr "non-keyword arg setelah */**"
msgid "non-keyword arg after keyword arg"
msgstr "non-keyword arg setelah keyword arg"
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr ""
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr ""
@@ -3053,10 +3146,6 @@ msgstr ""
msgid "not enough arguments for format string"
msgstr ""
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr ""
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr ""
@@ -3109,6 +3198,10 @@ msgstr ""
msgid "odd-length string"
msgstr "panjang data string memiliki keganjilan (odd-length)"
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr ""
+
#: py/objstr.c py/objstrunicode.c
#, fuzzy
msgid "offset out of bounds"
@@ -3132,6 +3225,14 @@ msgstr ""
msgid "operands could not be broadcast together"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "operation is implemented for 1D Boolean arrays only"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr ""
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr ""
@@ -3222,6 +3323,7 @@ msgstr ""
msgid "pow() with 3 arguments requires integers"
msgstr ""
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3229,6 +3331,8 @@ msgstr ""
#: ports/esp32s2/boards/espressif_saola_1_wrover/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
+#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
msgid "pressing boot button at start up.\n"
@@ -3263,6 +3367,10 @@ msgstr "relative import"
msgid "requested length %d but object has length %d"
msgstr ""
+#: extmod/ulab/code/ndarray_operators.c
+msgid "results cannot be cast to specified type"
+msgstr ""
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr "anotasi return harus sebuah identifier"
@@ -3281,8 +3389,8 @@ msgstr ""
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
msgstr ""
#: py/objstr.c
@@ -3308,7 +3416,7 @@ msgid "script compilation not supported"
msgstr "kompilasi script tidak didukung"
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
+msgid "shape must be a tuple"
msgstr ""
#: py/objstr.c
@@ -3431,6 +3539,7 @@ msgstr ""
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@@ -3456,6 +3565,10 @@ msgstr ""
msgid "timestamp out of range for platform time_t"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "tobytes can be invoked for dense arrays only"
+msgstr ""
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr ""
@@ -3481,6 +3594,16 @@ msgstr ""
msgid "tuple/list has wrong length"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr ""
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr ""
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3605,6 +3728,10 @@ msgstr ""
msgid "vectors must have same lengths"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr ""
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""
@@ -3617,12 +3744,12 @@ msgstr ""
msgid "window must be <= interval"
msgstr ""
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
msgstr ""
#: extmod/ulab/code/vector/vectorise.c
diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot
index f96b67d2a..740326d7d 100644
--- a/locale/circuitpython.pot
+++ b/locale/circuitpython.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-26 16:48-0500\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -288,11 +288,22 @@ msgstr ""
msgid "Address type out of range"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr ""
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr ""
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr ""
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr ""
@@ -323,6 +334,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -407,6 +419,10 @@ msgid ""
"disable.\n"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr ""
+
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate"
@@ -416,6 +432,11 @@ msgstr ""
msgid "Bit clock and word select must share a clock unit"
msgstr ""
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr ""
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr ""
@@ -776,7 +797,7 @@ msgstr ""
msgid "ECB only operates on 16 bytes at a time"
msgstr ""
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
msgstr ""
@@ -837,6 +858,10 @@ msgstr ""
msgid "FFT is defined for ndarrays only"
msgstr ""
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr ""
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
msgstr ""
@@ -902,6 +927,7 @@ msgid "File exists"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
msgstr ""
@@ -979,6 +1005,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@@ -1059,6 +1089,7 @@ msgid "Invalid byteorder string"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr ""
@@ -1100,7 +1131,8 @@ msgid "Invalid phase"
msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr ""
@@ -1120,7 +1152,7 @@ msgstr ""
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1234,6 +1266,10 @@ msgstr ""
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr ""
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr ""
+
#: py/parse.c
msgid "Name too long"
msgstr ""
@@ -1389,14 +1425,14 @@ msgstr ""
msgid "Only 8 or 16 bit mono with "
msgstr ""
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr ""
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr ""
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
#, c-format
msgid ""
@@ -1932,7 +1968,7 @@ msgstr ""
msgid "WARNING: Your code filename has two extensions\n"
msgstr ""
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
@@ -2011,10 +2047,6 @@ msgstr ""
msgid "addresses is empty"
msgstr ""
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr ""
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr ""
@@ -2023,6 +2055,10 @@ msgstr ""
msgid "argsort argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr ""
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr ""
@@ -2040,15 +2076,23 @@ msgstr ""
msgid "argument should be a '%q' not a '%q'"
msgstr ""
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr ""
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr ""
@@ -2057,15 +2101,15 @@ msgid "attributes not supported yet"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
+msgid "axis is out of bounds"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
+msgid "axis must be None, or an integer"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
+msgid "axis too long"
msgstr ""
#: py/builtinevex.c
@@ -2269,6 +2313,10 @@ msgid ""
"can't switch from manual field specification to automatic field numbering"
msgstr ""
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr ""
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr ""
@@ -2285,10 +2333,6 @@ msgstr ""
msgid "cannot perform relative import"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr ""
-
#: py/emitnative.c
msgid "casting"
msgstr ""
@@ -2361,10 +2405,6 @@ msgstr ""
msgid "convolve arguments must not be empty"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr ""
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr ""
@@ -2373,6 +2413,10 @@ msgstr ""
msgid "couldn't determine SD card version"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "cross is defined for 1D arrays of length 3"
+msgstr ""
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr ""
@@ -2381,10 +2425,6 @@ msgstr ""
msgid "data must be of equal length"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr ""
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr ""
@@ -2414,6 +2454,10 @@ msgstr ""
msgid "diff argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr ""
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2529,6 +2573,10 @@ msgstr ""
msgid "first argument must be a function"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "first argument must be a tuple of ndarrays"
+msgstr ""
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr ""
@@ -2582,8 +2630,8 @@ msgstr ""
msgid "function has the same sign at the ends of interval"
msgstr ""
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
msgstr ""
#: py/argcheck.c
@@ -2653,6 +2701,7 @@ msgstr ""
msgid "index is out of bounds"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr ""
@@ -2677,6 +2726,10 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "input and output shapes are not compatible"
+msgstr ""
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@@ -2685,6 +2738,10 @@ msgstr ""
msgid "input array length must be power of 2"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "input arrays are not compatible"
+msgstr ""
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr ""
@@ -2697,6 +2754,22 @@ msgstr ""
msgid "input matrix is singular"
msgstr ""
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr ""
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr ""
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr ""
@@ -2709,6 +2782,10 @@ msgstr ""
msgid "input vectors must be of equal length"
msgstr ""
+#: extmod/ulab/code/poly/poly.c
+msgid "inputs are not iterable"
+msgstr ""
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr ""
@@ -2843,6 +2920,10 @@ msgstr ""
msgid "long int not supported in this build"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr ""
+
#: py/parse.c
msgid "malformed f-string"
msgstr ""
@@ -2873,10 +2954,22 @@ msgstr ""
msgid "max_length must be > 0"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr ""
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr ""
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr ""
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr ""
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -2914,10 +3007,6 @@ msgstr ""
msgid "must use keyword argument for key function"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr ""
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr ""
@@ -3000,6 +3089,10 @@ msgstr ""
msgid "non-keyword arg after keyword arg"
msgstr ""
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr ""
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr ""
@@ -3012,10 +3105,6 @@ msgstr ""
msgid "not enough arguments for format string"
msgstr ""
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr ""
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr ""
@@ -3068,6 +3157,10 @@ msgstr ""
msgid "odd-length string"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr ""
+
#: py/objstr.c py/objstrunicode.c
msgid "offset out of bounds"
msgstr ""
@@ -3090,6 +3183,14 @@ msgstr ""
msgid "operands could not be broadcast together"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "operation is implemented for 1D Boolean arrays only"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr ""
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr ""
@@ -3180,6 +3281,7 @@ msgstr ""
msgid "pow() with 3 arguments requires integers"
msgstr ""
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3223,6 +3325,10 @@ msgstr ""
msgid "requested length %d but object has length %d"
msgstr ""
+#: extmod/ulab/code/ndarray_operators.c
+msgid "results cannot be cast to specified type"
+msgstr ""
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr ""
@@ -3241,8 +3347,8 @@ msgstr ""
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
msgstr ""
#: py/objstr.c
@@ -3268,7 +3374,7 @@ msgid "script compilation not supported"
msgstr ""
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
+msgid "shape must be a tuple"
msgstr ""
#: py/objstr.c
@@ -3391,6 +3497,7 @@ msgstr ""
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@@ -3415,6 +3522,10 @@ msgstr ""
msgid "timestamp out of range for platform time_t"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "tobytes can be invoked for dense arrays only"
+msgstr ""
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr ""
@@ -3440,6 +3551,16 @@ msgstr ""
msgid "tuple/list has wrong length"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr ""
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr ""
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3564,6 +3685,10 @@ msgstr ""
msgid "vectors must have same lengths"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr ""
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""
@@ -3576,12 +3701,12 @@ msgstr ""
msgid "window must be <= interval"
msgstr ""
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
msgstr ""
#: extmod/ulab/code/vector/vectorise.c
diff --git a/locale/cs.po b/locale/cs.po
index 6a3d00d99..05b5942fc 100644
--- a/locale/cs.po
+++ b/locale/cs.po
@@ -5,16 +5,16 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-16 19:50-0500\n"
-"PO-Revision-Date: 2020-05-24 03:22+0000\n"
-"Last-Translator: dronecz <mzuzelka@gmail.com>\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
+"PO-Revision-Date: 2020-11-30 18:06+0000\n"
+"Last-Translator: vkuthan <vit.kuthan@seznam.cz>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: cs\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n"
-"X-Generator: Weblate 4.1-dev\n"
+"X-Generator: Weblate 4.4-dev\n"
#: main.c
msgid ""
@@ -74,7 +74,7 @@ msgstr "%q index je mimo rozsah"
#: py/obj.c
msgid "%q indices must be integers, not %q"
-msgstr ""
+msgstr "%q indexy musí být celá čísla, ne %q"
#: shared-bindings/vectorio/Polygon.c
msgid "%q list must be a list"
@@ -82,7 +82,7 @@ msgstr "Seznam %q musí být seznam"
#: shared-bindings/memorymonitor/AllocationAlarm.c
msgid "%q must be >= 0"
-msgstr ""
+msgstr "%q musí být >= 0"
#: shared-bindings/_bleio/CharacteristicBuffer.c
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
@@ -98,7 +98,7 @@ msgstr " %q musí být n-tice délky 2"
#: shared-bindings/canio/Match.c
msgid "%q out of range"
-msgstr ""
+msgstr "%q je mimo rozsah"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
msgid "%q pin invalid"
@@ -292,11 +292,22 @@ msgstr ""
msgid "Address type out of range"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr ""
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr ""
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr ""
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr ""
@@ -327,6 +338,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -411,6 +423,10 @@ msgid ""
"disable.\n"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr ""
+
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate"
@@ -420,6 +436,11 @@ msgstr ""
msgid "Bit clock and word select must share a clock unit"
msgstr ""
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr ""
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr ""
@@ -779,7 +800,7 @@ msgstr ""
msgid "ECB only operates on 16 bytes at a time"
msgstr ""
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
msgstr ""
@@ -840,6 +861,10 @@ msgstr ""
msgid "FFT is defined for ndarrays only"
msgstr ""
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr ""
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
msgstr ""
@@ -905,6 +930,7 @@ msgid "File exists"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
msgstr ""
@@ -982,6 +1008,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@@ -1062,6 +1092,7 @@ msgid "Invalid byteorder string"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr ""
@@ -1103,7 +1134,8 @@ msgid "Invalid phase"
msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr ""
@@ -1123,7 +1155,7 @@ msgstr ""
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1237,6 +1269,10 @@ msgstr ""
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr ""
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr ""
+
#: py/parse.c
msgid "Name too long"
msgstr ""
@@ -1387,14 +1423,14 @@ msgstr ""
msgid "Only 8 or 16 bit mono with "
msgstr ""
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr ""
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr ""
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
#, c-format
msgid ""
@@ -1930,7 +1966,7 @@ msgstr ""
msgid "WARNING: Your code filename has two extensions\n"
msgstr ""
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
@@ -2009,10 +2045,6 @@ msgstr ""
msgid "addresses is empty"
msgstr ""
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr ""
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr ""
@@ -2021,6 +2053,10 @@ msgstr ""
msgid "argsort argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr ""
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr ""
@@ -2038,15 +2074,23 @@ msgstr ""
msgid "argument should be a '%q' not a '%q'"
msgstr ""
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr ""
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr ""
@@ -2055,15 +2099,15 @@ msgid "attributes not supported yet"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
+msgid "axis is out of bounds"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
+msgid "axis must be None, or an integer"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
+msgid "axis too long"
msgstr ""
#: py/builtinevex.c
@@ -2267,6 +2311,10 @@ msgid ""
"can't switch from manual field specification to automatic field numbering"
msgstr ""
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr ""
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr ""
@@ -2283,10 +2331,6 @@ msgstr ""
msgid "cannot perform relative import"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr ""
-
#: py/emitnative.c
msgid "casting"
msgstr ""
@@ -2359,10 +2403,6 @@ msgstr ""
msgid "convolve arguments must not be empty"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr ""
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr ""
@@ -2371,6 +2411,10 @@ msgstr ""
msgid "couldn't determine SD card version"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "cross is defined for 1D arrays of length 3"
+msgstr ""
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr ""
@@ -2379,10 +2423,6 @@ msgstr ""
msgid "data must be of equal length"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr ""
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr ""
@@ -2412,6 +2452,10 @@ msgstr ""
msgid "diff argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr ""
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2527,6 +2571,10 @@ msgstr ""
msgid "first argument must be a function"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "first argument must be a tuple of ndarrays"
+msgstr ""
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr ""
@@ -2580,8 +2628,8 @@ msgstr ""
msgid "function has the same sign at the ends of interval"
msgstr ""
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
msgstr ""
#: py/argcheck.c
@@ -2651,6 +2699,7 @@ msgstr ""
msgid "index is out of bounds"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr ""
@@ -2675,6 +2724,10 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "input and output shapes are not compatible"
+msgstr ""
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@@ -2683,6 +2736,10 @@ msgstr ""
msgid "input array length must be power of 2"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "input arrays are not compatible"
+msgstr ""
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr ""
@@ -2695,6 +2752,22 @@ msgstr ""
msgid "input matrix is singular"
msgstr ""
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr ""
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr ""
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr ""
@@ -2707,6 +2780,10 @@ msgstr ""
msgid "input vectors must be of equal length"
msgstr ""
+#: extmod/ulab/code/poly/poly.c
+msgid "inputs are not iterable"
+msgstr ""
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr ""
@@ -2841,6 +2918,10 @@ msgstr ""
msgid "long int not supported in this build"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr ""
+
#: py/parse.c
msgid "malformed f-string"
msgstr ""
@@ -2871,10 +2952,22 @@ msgstr ""
msgid "max_length must be > 0"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr ""
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr ""
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr ""
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr ""
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -2912,10 +3005,6 @@ msgstr ""
msgid "must use keyword argument for key function"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr ""
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr ""
@@ -2998,6 +3087,10 @@ msgstr ""
msgid "non-keyword arg after keyword arg"
msgstr ""
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr ""
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr ""
@@ -3010,10 +3103,6 @@ msgstr ""
msgid "not enough arguments for format string"
msgstr ""
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr ""
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr ""
@@ -3066,6 +3155,10 @@ msgstr ""
msgid "odd-length string"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr ""
+
#: py/objstr.c py/objstrunicode.c
msgid "offset out of bounds"
msgstr ""
@@ -3088,6 +3181,14 @@ msgstr ""
msgid "operands could not be broadcast together"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "operation is implemented for 1D Boolean arrays only"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr ""
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr ""
@@ -3178,6 +3279,7 @@ msgstr ""
msgid "pow() with 3 arguments requires integers"
msgstr ""
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3185,6 +3287,8 @@ msgstr ""
#: ports/esp32s2/boards/espressif_saola_1_wrover/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
+#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
msgid "pressing boot button at start up.\n"
@@ -3219,6 +3323,10 @@ msgstr ""
msgid "requested length %d but object has length %d"
msgstr ""
+#: extmod/ulab/code/ndarray_operators.c
+msgid "results cannot be cast to specified type"
+msgstr ""
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr ""
@@ -3237,8 +3345,8 @@ msgstr ""
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
msgstr ""
#: py/objstr.c
@@ -3264,7 +3372,7 @@ msgid "script compilation not supported"
msgstr ""
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
+msgid "shape must be a tuple"
msgstr ""
#: py/objstr.c
@@ -3387,6 +3495,7 @@ msgstr ""
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@@ -3411,6 +3520,10 @@ msgstr ""
msgid "timestamp out of range for platform time_t"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "tobytes can be invoked for dense arrays only"
+msgstr ""
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr ""
@@ -3436,6 +3549,16 @@ msgstr ""
msgid "tuple/list has wrong length"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr ""
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr ""
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3560,6 +3683,10 @@ msgstr ""
msgid "vectors must have same lengths"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr ""
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""
@@ -3572,12 +3699,12 @@ msgstr ""
msgid "window must be <= interval"
msgstr ""
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
msgstr ""
#: extmod/ulab/code/vector/vectorise.c
diff --git a/locale/de_DE.po b/locale/de_DE.po
index e54b670a9..7dd79d915 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -5,15 +5,15 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-16 19:50-0500\n"
-"PO-Revision-Date: 2020-06-16 18:24+0000\n"
-"Last-Translator: Andreas Buchen <andreas.buchen@gmail.com>\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
+"PO-Revision-Date: 2020-11-26 03:11+0000\n"
+"Last-Translator: Daniel Bravo Darriba <bravodarriba@gmail.com>\n"
"Language: de_DE\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.1.1-dev\n"
+"X-Generator: Weblate 4.4-dev\n"
#: main.c
msgid ""
@@ -57,7 +57,7 @@ msgstr "%d Adress-Pins und %d rgb-Pins zeigen eine Höhe von %d, nicht von %d"
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
msgid "%q failure: %d"
-msgstr ""
+msgstr "%q Fehler: %d"
#: shared-bindings/microcontroller/Pin.c
msgid "%q in use"
@@ -73,7 +73,7 @@ msgstr "Der Index %q befindet sich außerhalb des Bereiches"
#: py/obj.c
msgid "%q indices must be integers, not %q"
-msgstr ""
+msgstr "%q Indizes müssen Integer sein, nicht %q"
#: shared-bindings/vectorio/Polygon.c
msgid "%q list must be a list"
@@ -81,7 +81,7 @@ msgstr "%q Liste muss eine Liste sein"
#: shared-bindings/memorymonitor/AllocationAlarm.c
msgid "%q must be >= 0"
-msgstr ""
+msgstr "%q muss >= 0 sein"
#: shared-bindings/_bleio/CharacteristicBuffer.c
#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c
@@ -97,11 +97,11 @@ msgstr "%q muss ein Tupel der Länge 2 sein"
#: shared-bindings/canio/Match.c
msgid "%q out of range"
-msgstr ""
+msgstr "%q außerhalb des Bereichs"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
msgid "%q pin invalid"
-msgstr ""
+msgstr "%q Pin ungültig"
#: shared-bindings/fontio/BuiltinFont.c
msgid "%q should be an int"
@@ -117,11 +117,11 @@ msgstr "'%q' Argument erforderlich"
#: py/runtime.c
msgid "'%q' object cannot assign attribute '%q'"
-msgstr ""
+msgstr "'%q' Objekt kann das Attribut '%q' nicht zuweisen"
#: py/proto.c
msgid "'%q' object does not support '%q'"
-msgstr ""
+msgstr "'%q' Objekt unterstützt '%q' nicht"
#: py/obj.c
msgid "'%q' object does not support item assignment"
@@ -129,11 +129,11 @@ msgstr ""
#: py/obj.c
msgid "'%q' object does not support item deletion"
-msgstr ""
+msgstr "'%q' objekt unterstützt das "
#: py/runtime.c
msgid "'%q' object has no attribute '%q'"
-msgstr ""
+msgstr "'%q' Objekt hat kein Attribut '%q'"
#: py/runtime.c
msgid "'%q' object is not an iterator"
@@ -141,7 +141,7 @@ msgstr ""
#: py/objtype.c py/runtime.c
msgid "'%q' object is not callable"
-msgstr ""
+msgstr "'%q' Objekt ist kein callable"
#: py/runtime.c
msgid "'%q' object is not iterable"
@@ -280,7 +280,7 @@ msgstr "Ein Hardware Interrupt Kanal wird schon benutzt"
#: ports/esp32s2/common-hal/analogio/AnalogIn.c
msgid "ADC2 is being used by WiFi"
-msgstr ""
+msgstr "ADC2 wird vom WiFi benutzt"
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
#, c-format
@@ -291,11 +291,22 @@ msgstr "Die Adresse muss %d Bytes lang sein"
msgid "Address type out of range"
msgstr "Adresstyp außerhalb des zulässigen Bereichs"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr ""
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "Alle I2C-Peripheriegeräte sind in Benutzung"
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr ""
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr ""
@@ -326,6 +337,7 @@ msgstr "Alle timer für diesen Pin werden bereits benutzt"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -346,11 +358,11 @@ msgstr ""
#: shared-module/memorymonitor/AllocationAlarm.c
#: shared-module/memorymonitor/AllocationSize.c
msgid "Already running"
-msgstr ""
+msgstr "Läuft bereits"
#: ports/esp32s2/common-hal/wifi/Radio.c
msgid "Already scanning for wifi networks"
-msgstr ""
+msgstr "Sucht bereits nach wifi Netzwerken"
#: ports/cxd56/common-hal/analogio/AnalogIn.c
msgid "AnalogIn not supported on given pin"
@@ -390,7 +402,7 @@ msgstr "Es darf höchstens %d %q spezifiziert werden (nicht %d)"
#: shared-module/memorymonitor/AllocationAlarm.c
#, c-format
msgid "Attempt to allocate %d blocks"
-msgstr ""
+msgstr "Versuche %d Blöcke zu allokieren"
#: supervisor/shared/safe_mode.c
msgid "Attempted heap allocation when MicroPython VM not running."
@@ -400,7 +412,7 @@ msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "Authentication failure"
-msgstr ""
+msgstr "Authentifizierungsfehler"
#: main.c
msgid "Auto-reload is off.\n"
@@ -414,6 +426,10 @@ msgstr ""
"Automatisches Neuladen ist aktiv. Speichere Dateien über USB um sie "
"auszuführen oder verbinde dich mit der REPL zum Deaktivieren.\n"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr ""
+
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate"
@@ -423,6 +439,11 @@ msgstr "Unterhalb der minimalen Frame Rate"
msgid "Bit clock and word select must share a clock unit"
msgstr "Bit clock und word select müssen eine clock unit teilen"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr ""
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "Bit depth muss ein Vielfaches von 8 sein."
@@ -478,11 +499,11 @@ msgstr "Die Pufferlänge %d ist zu groß. Sie muss kleiner als %d sein"
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
#: ports/cxd56/common-hal/sdioio/SDCard.c shared-module/sdcardio/SDCard.c
msgid "Buffer length must be a multiple of 512"
-msgstr ""
+msgstr "Die Pufferlänge muss ein vielfaches von 512 sein"
#: ports/stm/common-hal/sdioio/SDCard.c
msgid "Buffer must be a multiple of 512 bytes"
-msgstr ""
+msgstr "Der Puffer muss ein vielfaches von 512 bytes sein"
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
@@ -660,7 +681,7 @@ msgstr "Beschädigter raw code"
#: ports/cxd56/common-hal/camera/Camera.c
msgid "Could not initialize Camera"
-msgstr ""
+msgstr "Konnte Kamera nicht initialisieren"
#: ports/cxd56/common-hal/gnss/GNSS.c
msgid "Could not initialize GNSS"
@@ -668,7 +689,7 @@ msgstr ""
#: ports/cxd56/common-hal/sdioio/SDCard.c
msgid "Could not initialize SDCard"
-msgstr ""
+msgstr "Konnte SDKarte nicht initialisieren"
#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c
@@ -701,7 +722,7 @@ msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Could not set address"
-msgstr ""
+msgstr "Konnte Adresse nicht setzen"
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not start PWM"
@@ -789,7 +810,7 @@ msgstr "Drive mode wird nicht verwendet, wenn die Richtung input ist."
msgid "ECB only operates on 16 bytes at a time"
msgstr "Die EZB arbeitet jeweils nur mit 16 Bytes"
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
msgstr ""
@@ -818,7 +839,7 @@ msgstr "Characteristic wird erwartet"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a DigitalInOut"
-msgstr ""
+msgstr "DigitanInOut wird erwartet"
#: shared-bindings/_bleio/Characteristic.c
msgid "Expected a Service"
@@ -826,7 +847,7 @@ msgstr "Ein Service wird erwartet"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a UART"
-msgstr ""
+msgstr "UART wird erwartet"
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
#: shared-bindings/_bleio/Service.c
@@ -851,9 +872,13 @@ msgstr ""
msgid "FFT is defined for ndarrays only"
msgstr "FFT ist nur für ndarrays definiert"
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr ""
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
-msgstr ""
+msgstr "SSL Handshake fehlgeschlagen"
#: shared-bindings/ps2io/Ps2.c
msgid "Failed sending command."
@@ -916,18 +941,19 @@ msgid "File exists"
msgstr "Datei existiert"
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
-msgstr ""
+msgstr "Filter zu komplex"
#: ports/cxd56/common-hal/camera/Camera.c
msgid "Format not supported"
-msgstr ""
+msgstr "Format nicht unterstützt"
#: shared-module/framebufferio/FramebufferDisplay.c
#, c-format
msgid "Framebuffer requires %d bytes"
-msgstr ""
+msgstr "Framepuffer benötigt %d bytes"
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
msgid "Frequency captured is above capability. Capture Paused."
@@ -968,7 +994,7 @@ msgstr "Hardware in benutzung, probiere alternative Pins"
#: shared-bindings/wifi/Radio.c
msgid "Hostname must be between 1 and 253 characters"
-msgstr ""
+msgstr "Der Hostname muss zwischen 1 und 253 Zeichen haben"
#: extmod/vfs_posix_file.c py/objstringio.c
msgid "I/O operation on closed file"
@@ -980,7 +1006,7 @@ msgstr "I2C-Init-Fehler"
#: shared-bindings/audiobusio/I2SOut.c
msgid "I2SOut not available"
-msgstr ""
+msgstr "I2SOut nicht verfügbar"
#: shared-bindings/aesio/aes.c
#, c-format
@@ -999,6 +1025,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "Inkorrekte Puffergröße"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@@ -1026,12 +1056,12 @@ msgstr "Interner Fehler #%d"
#: shared-bindings/sdioio/SDCard.c
msgid "Invalid %q"
-msgstr ""
+msgstr "Ungültiger %q"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Invalid %q pin"
-msgstr "Ungültiger %q pin"
+msgstr "Ungültiger %q Pin"
#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c
#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/canio/CAN.c
@@ -1049,7 +1079,7 @@ msgstr "Ungültige BMP-Datei"
#: shared-bindings/wifi/Radio.c
msgid "Invalid BSSID"
-msgstr ""
+msgstr "Ungültige BSSID"
#: ports/esp32s2/common-hal/analogio/AnalogOut.c
#: ports/stm/common-hal/analogio/AnalogOut.c
@@ -1079,6 +1109,7 @@ msgid "Invalid byteorder string"
msgstr "Ungültige Byteorder String"
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr "Ungültiger Aufnahmezeitraum. Gültiger Bereich: 1 - 500"
@@ -1100,7 +1131,7 @@ msgstr "Ungültige format chunk size"
#: ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency"
-msgstr ""
+msgstr "Ungültige Frequenz"
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency supplied"
@@ -1120,7 +1151,8 @@ msgid "Invalid phase"
msgstr "Ungültige Phase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Ungültiger Pin"
@@ -1140,7 +1172,7 @@ msgstr "Ungültiger Pin für rechten Kanal"
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1256,6 +1288,10 @@ msgstr "Muss MISO- oder MOSI-Pin bereitstellen"
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "Muss ein Vielfaches von 6 RGB-Pins verwenden, nicht %d"
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr ""
+
#: py/parse.c
msgid "Name too long"
msgstr "Name zu lang"
@@ -1408,14 +1444,14 @@ msgstr "Eine ungerade Parität wird nicht unterstützt"
msgid "Only 8 or 16 bit mono with "
msgstr "Nur 8 oder 16 bit mono mit "
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr ""
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr ""
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
#, c-format
msgid ""
@@ -1979,7 +2015,7 @@ msgid "WARNING: Your code filename has two extensions\n"
msgstr ""
"WARNUNG: Der Dateiname deines Programms hat zwei Dateityperweiterungen\n"
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
@@ -2068,10 +2104,6 @@ msgstr "Adresse außerhalb der Grenzen"
msgid "addresses is empty"
msgstr "adresses ist leer"
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr "arctan2 ist nur für Skalare und ndarrays implementiert"
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr "arg ist eine leere Sequenz"
@@ -2080,6 +2112,10 @@ msgstr "arg ist eine leere Sequenz"
msgid "argsort argument must be an ndarray"
msgstr "Das Argument argsort muss ein ndarray sein"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr ""
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr "Argument hat falschen Typ"
@@ -2097,15 +2133,23 @@ msgstr "Anzahl/Typen der Argumente passen nicht"
msgid "argument should be a '%q' not a '%q'"
msgstr "Argument sollte '%q' sein, nicht '%q'"
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr "Argumente müssen ndarrays sein"
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr ""
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr "Array/Bytes auf der rechten Seite erforderlich"
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr "Sie haben versucht argmin/argmax von einer leeren Sequenz zu bekommen"
@@ -2114,16 +2158,16 @@ msgid "attributes not supported yet"
msgstr "Attribute werden noch nicht unterstützt"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
-msgstr "Die Achse muss -1, 0, Keine oder 1 sein"
+msgid "axis is out of bounds"
+msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
-msgstr "Die Achse muss -1, 0 oder 1 sein"
+msgid "axis must be None, or an integer"
+msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
-msgstr "Die Achse muss None, 0 oder 1 sein"
+msgid "axis too long"
+msgstr ""
#: py/builtinevex.c
msgid "bad compile mode"
@@ -2334,6 +2378,10 @@ msgstr ""
"kann nicht von der manuellen Feldspezifikation zur automatischen "
"Feldnummerierung wechseln"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr ""
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr "Kann '%q' Instanzen nicht erstellen"
@@ -2350,11 +2398,6 @@ msgstr "Name %q kann nicht importiert werden"
msgid "cannot perform relative import"
msgstr "kann keinen relativen Import durchführen"
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr ""
-"Array kann nicht umgeformt werden (inkompatible Eingabe- / Ausgabeform)"
-
#: py/emitnative.c
msgid "casting"
msgstr "Umwandlung (cast)"
@@ -2429,10 +2472,6 @@ msgstr "Convolve-Argumente müssen ndarrays sein"
msgid "convolve arguments must not be empty"
msgstr "Convolve Argumente dürfen nicht leer sein"
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr "Eingabearray konnte nicht aus der Form übertragen werden"
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr "Vandermonde-Matrix konnte nicht invertiert werden"
@@ -2441,6 +2480,10 @@ msgstr "Vandermonde-Matrix konnte nicht invertiert werden"
msgid "couldn't determine SD card version"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "cross is defined for 1D arrays of length 3"
+msgstr ""
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr ""
@@ -2449,10 +2492,6 @@ msgstr ""
msgid "data must be of equal length"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr "ddof muss kleiner als die Länge des Datensatzes sein"
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr "Dezimalzahlen nicht unterstützt"
@@ -2484,6 +2523,10 @@ msgstr "Die Wörterbuch-Aktualisierungssequenz hat eine falsche Länge"
msgid "diff argument must be an ndarray"
msgstr "diff Argument muss ein ndarray sein"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr ""
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2599,6 +2642,10 @@ msgstr ""
msgid "first argument must be a function"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "first argument must be a tuple of ndarrays"
+msgstr ""
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr "Das erste Argument muss iterierbar sein"
@@ -2652,9 +2699,9 @@ msgstr "Funktion hat mehrere Werte für Argument '%q'"
msgid "function has the same sign at the ends of interval"
msgstr ""
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
-msgstr "Die Funktion ist nur für Skalare und Ndarrays implementiert"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
+msgstr ""
#: py/argcheck.c
#, c-format
@@ -2724,6 +2771,7 @@ msgstr "padding ist inkorrekt"
msgid "index is out of bounds"
msgstr "Index ist außerhalb der Grenzen"
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "index außerhalb der Reichweite"
@@ -2748,6 +2796,10 @@ msgstr "Länge von initial_value ist falsch"
msgid "inline assembler must be a function"
msgstr "inline assembler muss eine function sein"
+#: extmod/ulab/code/ndarray.c
+msgid "input and output shapes are not compatible"
+msgstr ""
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr "Das Eingabeargument muss eine Ganzzahl oder ein 2-Tupel sein"
@@ -2756,6 +2808,10 @@ msgstr "Das Eingabeargument muss eine Ganzzahl oder ein 2-Tupel sein"
msgid "input array length must be power of 2"
msgstr "Die Länge des Eingabearrays muss eine Potenz von 2 sein"
+#: extmod/ulab/code/ulab_create.c
+msgid "input arrays are not compatible"
+msgstr ""
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr "Eingabedaten müssen iterierbar sein"
@@ -2768,6 +2824,22 @@ msgstr "Eingabematrix ist asymmetrisch"
msgid "input matrix is singular"
msgstr "Eingabematrix ist singulär"
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr ""
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr ""
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr "Die Eingabe muss eine quadratische Matrix sein"
@@ -2780,6 +2852,10 @@ msgstr "Die Eingabe muss Tupel, Liste, Bereich oder Ndarray sein"
msgid "input vectors must be of equal length"
msgstr "Eingabevektoren müssen gleich lang sein"
+#: extmod/ulab/code/poly/poly.c
+msgid "inputs are not iterable"
+msgstr ""
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr "int() arg 2 muss >= 2 und <= 36 sein"
@@ -2920,6 +2996,10 @@ msgstr ""
msgid "long int not supported in this build"
msgstr "long int wird in diesem Build nicht unterstützt"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr ""
+
#: py/parse.c
msgid "malformed f-string"
msgstr "fehlformatierter f-string"
@@ -2950,10 +3030,22 @@ msgstr "max_length muss 0-%d sein, wenn fixed_length %s ist"
msgid "max_length must be > 0"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr ""
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "maximale Rekursionstiefe überschritten"
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr ""
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr ""
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -2991,10 +3083,6 @@ msgstr "muss ein Objekt verursachen (raise)"
msgid "must use keyword argument for key function"
msgstr "muss Schlüsselwortargument für key function verwenden"
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr "n muss zwischen 0 und 9 liegen"
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr "Name '%q' ist nirgends definiert worden (Schreibweise kontrollieren)"
@@ -3077,6 +3165,10 @@ msgstr "Nicht-Schlüsselwort arg nach * / **"
msgid "non-keyword arg after keyword arg"
msgstr "Nicht-Schlüsselwort Argument nach Schlüsselwort Argument"
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr ""
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr "keine 128-bit UUID"
@@ -3090,10 +3182,6 @@ msgstr ""
msgid "not enough arguments for format string"
msgstr "Nicht genügend Argumente für den Formatierungs-String"
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr "Die Anzahl der Argumente muss 2 oder 3 sein"
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr "Die Anzahl der Punkte muss mindestens 2 betragen"
@@ -3146,6 +3234,10 @@ msgstr "Objekt mit Pufferprotokoll (buffer protocol) erforderlich"
msgid "odd-length string"
msgstr "String mit ungerader Länge"
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr ""
+
#: py/objstr.c py/objstrunicode.c
msgid "offset out of bounds"
msgstr "offset außerhalb der Grenzen"
@@ -3169,6 +3261,14 @@ msgstr ""
msgid "operands could not be broadcast together"
msgstr "Operanden konnten nicht zusammen gesendet werden"
+#: extmod/ulab/code/ndarray.c
+msgid "operation is implemented for 1D Boolean arrays only"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr ""
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr "Die Operation ist für ndarrays nicht implementiert"
@@ -3261,6 +3361,7 @@ msgstr "pow() drittes Argument darf nicht 0 sein"
msgid "pow() with 3 arguments requires integers"
msgstr "pow () mit 3 Argumenten erfordert Integer"
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3268,6 +3369,8 @@ msgstr "pow () mit 3 Argumenten erfordert Integer"
#: ports/esp32s2/boards/espressif_saola_1_wrover/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
+#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
msgid "pressing boot button at start up.\n"
@@ -3302,6 +3405,10 @@ msgstr "relativer Import"
msgid "requested length %d but object has length %d"
msgstr "die ersuchte Länge ist %d, aber das Objekt hat eine Länge von %d"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "results cannot be cast to specified type"
+msgstr ""
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr "Rückgabewert-Beschreibung muss ein Identifier sein"
@@ -3320,9 +3427,9 @@ msgstr "rgb_pins[%d] dupliziert eine andere Pinbelegung"
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "rgb_pins [%d] befindet sich nicht am selben Port wie clock"
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
-msgstr "Die rechte Seite muss ein Ndarray oder ein Skalar sein"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
+msgstr ""
#: py/objstr.c
msgid "rsplit(None,n)"
@@ -3349,8 +3456,8 @@ msgid "script compilation not supported"
msgstr "kompilieren von Skripten nicht unterstützt"
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
-msgstr "Form muss ein 2-Tupel sein"
+msgid "shape must be a tuple"
+msgstr ""
#: py/objstr.c
msgid "sign not allowed in string format specifier"
@@ -3473,6 +3580,7 @@ msgstr "threshold muss im Intervall 0-65536 liegen"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() nimmt eine 9-Sequenz an"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr "Das Zeitlimit hat den maximal zulässigen Wert überschritten"
@@ -3497,6 +3605,10 @@ msgstr "Zeitlimit beim warten auf v2 Karte"
msgid "timestamp out of range for platform time_t"
msgstr "Zeitstempel außerhalb des Bereichs für Plattform time_t"
+#: extmod/ulab/code/ndarray.c
+msgid "tobytes can be invoked for dense arrays only"
+msgstr ""
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr "zu viele Argumente mit dem angegebenen Format"
@@ -3522,6 +3634,16 @@ msgstr "Tupelindex außerhalb des Bereichs"
msgid "tuple/list has wrong length"
msgstr "tupel/list hat falsche Länge"
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr ""
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr ""
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3650,6 +3772,10 @@ msgstr "value_count muss größer als 0 sein"
msgid "vectors must have same lengths"
msgstr "Vektoren müssen die selbe Länge haben"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr ""
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""
@@ -3662,13 +3788,13 @@ msgstr ""
msgid "window must be <= interval"
msgstr "Fenster muss <= Intervall sein"
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
-msgstr "falscher Argumenttyp"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
+msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
-msgstr "falscher Indextyp"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
+msgstr ""
#: extmod/ulab/code/vector/vectorise.c
msgid "wrong input type"
@@ -3718,6 +3844,49 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)"
msgstr ""
+#~ msgid "arctan2 is implemented for scalars and ndarrays only"
+#~ msgstr "arctan2 ist nur für Skalare und ndarrays implementiert"
+
+#~ msgid "axis must be -1, 0, None, or 1"
+#~ msgstr "Die Achse muss -1, 0, Keine oder 1 sein"
+
+#~ msgid "axis must be -1, 0, or 1"
+#~ msgstr "Die Achse muss -1, 0 oder 1 sein"
+
+#~ msgid "axis must be None, 0, or 1"
+#~ msgstr "Die Achse muss None, 0 oder 1 sein"
+
+#~ msgid "cannot reshape array (incompatible input/output shape)"
+#~ msgstr ""
+#~ "Array kann nicht umgeformt werden (inkompatible Eingabe- / Ausgabeform)"
+
+#~ msgid "could not broadast input array from shape"
+#~ msgstr "Eingabearray konnte nicht aus der Form übertragen werden"
+
+#~ msgid "ddof must be smaller than length of data set"
+#~ msgstr "ddof muss kleiner als die Länge des Datensatzes sein"
+
+#~ msgid "function is implemented for scalars and ndarrays only"
+#~ msgstr "Die Funktion ist nur für Skalare und Ndarrays implementiert"
+
+#~ msgid "n must be between 0, and 9"
+#~ msgstr "n muss zwischen 0 und 9 liegen"
+
+#~ msgid "number of arguments must be 2, or 3"
+#~ msgstr "Die Anzahl der Argumente muss 2 oder 3 sein"
+
+#~ msgid "right hand side must be an ndarray, or a scalar"
+#~ msgstr "Die rechte Seite muss ein Ndarray oder ein Skalar sein"
+
+#~ msgid "shape must be a 2-tuple"
+#~ msgstr "Form muss ein 2-Tupel sein"
+
+#~ msgid "wrong argument type"
+#~ msgstr "falscher Argumenttyp"
+
+#~ msgid "wrong index type"
+#~ msgstr "falscher Indextyp"
+
#~ msgid ""
#~ "\n"
#~ "To exit, please reset the board without "
diff --git a/locale/el.po b/locale/el.po
index 5e55065b3..8d6dad828 100644
--- a/locale/el.po
+++ b/locale/el.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-16 19:50-0500\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@@ -287,11 +287,22 @@ msgstr ""
msgid "Address type out of range"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr ""
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr ""
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr ""
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr ""
@@ -322,6 +333,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -406,6 +418,10 @@ msgid ""
"disable.\n"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr ""
+
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate"
@@ -415,6 +431,11 @@ msgstr ""
msgid "Bit clock and word select must share a clock unit"
msgstr ""
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr ""
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr ""
@@ -774,7 +795,7 @@ msgstr ""
msgid "ECB only operates on 16 bytes at a time"
msgstr ""
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
msgstr ""
@@ -835,6 +856,10 @@ msgstr ""
msgid "FFT is defined for ndarrays only"
msgstr ""
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr ""
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
msgstr ""
@@ -900,6 +925,7 @@ msgid "File exists"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
msgstr ""
@@ -977,6 +1003,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@@ -1057,6 +1087,7 @@ msgid "Invalid byteorder string"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr ""
@@ -1098,7 +1129,8 @@ msgid "Invalid phase"
msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr ""
@@ -1118,7 +1150,7 @@ msgstr ""
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1232,6 +1264,10 @@ msgstr ""
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr ""
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr ""
+
#: py/parse.c
msgid "Name too long"
msgstr ""
@@ -1382,14 +1418,14 @@ msgstr ""
msgid "Only 8 or 16 bit mono with "
msgstr ""
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr ""
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr ""
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
#, c-format
msgid ""
@@ -1925,7 +1961,7 @@ msgstr ""
msgid "WARNING: Your code filename has two extensions\n"
msgstr ""
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
@@ -2004,10 +2040,6 @@ msgstr ""
msgid "addresses is empty"
msgstr ""
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr ""
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr ""
@@ -2016,6 +2048,10 @@ msgstr ""
msgid "argsort argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr ""
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr ""
@@ -2033,15 +2069,23 @@ msgstr ""
msgid "argument should be a '%q' not a '%q'"
msgstr ""
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr ""
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr ""
@@ -2050,15 +2094,15 @@ msgid "attributes not supported yet"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
+msgid "axis is out of bounds"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
+msgid "axis must be None, or an integer"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
+msgid "axis too long"
msgstr ""
#: py/builtinevex.c
@@ -2262,6 +2306,10 @@ msgid ""
"can't switch from manual field specification to automatic field numbering"
msgstr ""
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr ""
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr ""
@@ -2278,10 +2326,6 @@ msgstr ""
msgid "cannot perform relative import"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr ""
-
#: py/emitnative.c
msgid "casting"
msgstr ""
@@ -2354,10 +2398,6 @@ msgstr ""
msgid "convolve arguments must not be empty"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr ""
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr ""
@@ -2366,6 +2406,10 @@ msgstr ""
msgid "couldn't determine SD card version"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "cross is defined for 1D arrays of length 3"
+msgstr ""
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr ""
@@ -2374,10 +2418,6 @@ msgstr ""
msgid "data must be of equal length"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr ""
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr ""
@@ -2407,6 +2447,10 @@ msgstr ""
msgid "diff argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr ""
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2522,6 +2566,10 @@ msgstr ""
msgid "first argument must be a function"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "first argument must be a tuple of ndarrays"
+msgstr ""
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr ""
@@ -2575,8 +2623,8 @@ msgstr ""
msgid "function has the same sign at the ends of interval"
msgstr ""
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
msgstr ""
#: py/argcheck.c
@@ -2646,6 +2694,7 @@ msgstr ""
msgid "index is out of bounds"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr ""
@@ -2670,6 +2719,10 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "input and output shapes are not compatible"
+msgstr ""
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@@ -2678,6 +2731,10 @@ msgstr ""
msgid "input array length must be power of 2"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "input arrays are not compatible"
+msgstr ""
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr ""
@@ -2690,6 +2747,22 @@ msgstr ""
msgid "input matrix is singular"
msgstr ""
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr ""
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr ""
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr ""
@@ -2702,6 +2775,10 @@ msgstr ""
msgid "input vectors must be of equal length"
msgstr ""
+#: extmod/ulab/code/poly/poly.c
+msgid "inputs are not iterable"
+msgstr ""
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr ""
@@ -2836,6 +2913,10 @@ msgstr ""
msgid "long int not supported in this build"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr ""
+
#: py/parse.c
msgid "malformed f-string"
msgstr ""
@@ -2866,10 +2947,22 @@ msgstr ""
msgid "max_length must be > 0"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr ""
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr ""
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr ""
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr ""
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -2907,10 +3000,6 @@ msgstr ""
msgid "must use keyword argument for key function"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr ""
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr ""
@@ -2993,6 +3082,10 @@ msgstr ""
msgid "non-keyword arg after keyword arg"
msgstr ""
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr ""
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr ""
@@ -3005,10 +3098,6 @@ msgstr ""
msgid "not enough arguments for format string"
msgstr ""
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr ""
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr ""
@@ -3061,6 +3150,10 @@ msgstr ""
msgid "odd-length string"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr ""
+
#: py/objstr.c py/objstrunicode.c
msgid "offset out of bounds"
msgstr ""
@@ -3083,6 +3176,14 @@ msgstr ""
msgid "operands could not be broadcast together"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "operation is implemented for 1D Boolean arrays only"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr ""
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr ""
@@ -3173,6 +3274,7 @@ msgstr ""
msgid "pow() with 3 arguments requires integers"
msgstr ""
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3180,6 +3282,8 @@ msgstr ""
#: ports/esp32s2/boards/espressif_saola_1_wrover/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
+#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
msgid "pressing boot button at start up.\n"
@@ -3214,6 +3318,10 @@ msgstr ""
msgid "requested length %d but object has length %d"
msgstr ""
+#: extmod/ulab/code/ndarray_operators.c
+msgid "results cannot be cast to specified type"
+msgstr ""
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr ""
@@ -3232,8 +3340,8 @@ msgstr ""
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
msgstr ""
#: py/objstr.c
@@ -3259,7 +3367,7 @@ msgid "script compilation not supported"
msgstr ""
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
+msgid "shape must be a tuple"
msgstr ""
#: py/objstr.c
@@ -3382,6 +3490,7 @@ msgstr ""
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@@ -3406,6 +3515,10 @@ msgstr ""
msgid "timestamp out of range for platform time_t"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "tobytes can be invoked for dense arrays only"
+msgstr ""
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr ""
@@ -3431,6 +3544,16 @@ msgstr ""
msgid "tuple/list has wrong length"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr ""
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr ""
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3555,6 +3678,10 @@ msgstr ""
msgid "vectors must have same lengths"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr ""
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""
@@ -3567,12 +3694,12 @@ msgstr ""
msgid "window must be <= interval"
msgstr ""
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
msgstr ""
#: extmod/ulab/code/vector/vectorise.c
diff --git a/locale/es.po b/locale/es.po
index ae7c104da..6b0fde563 100644
--- a/locale/es.po
+++ b/locale/es.po
@@ -7,16 +7,16 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-16 19:50-0500\n"
-"PO-Revision-Date: 2020-10-22 22:15+0000\n"
-"Last-Translator: Alvaro Figueroa <alvaro@greencore.co.cr>\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
+"PO-Revision-Date: 2020-11-27 18:34+0000\n"
+"Last-Translator: Iván Montiel Cardona <ivan_montiel2013@hotmail.com>\n"
"Language-Team: \n"
"Language: es\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.3.1\n"
+"X-Generator: Weblate 4.4-dev\n"
#: main.c
msgid ""
@@ -33,7 +33,7 @@ msgid ""
"https://github.com/adafruit/circuitpython/issues\n"
msgstr ""
"\n"
-"Reporte un problema con el contenido de su unidad CIRCUITPY en\n"
+"Presente un problema con el contenido de su unidad CIRCUITPY en\n"
"https://github.com/adafruit/circuitpython/issues\n"
#: py/obj.c
@@ -168,7 +168,7 @@ msgstr "'%s' espera un registro"
#: py/emitinlinethumb.c
#, c-format
msgid "'%s' expects a special register"
-msgstr "'%s' espera un carácter"
+msgstr "'%s' espera un registro especial"
#: py/emitinlinethumb.c
#, c-format
@@ -239,7 +239,7 @@ msgstr "el objeto 'coroutine' no es un iterador"
#: py/compile.c
msgid "'data' requires at least 2 arguments"
-msgstr "'data' requiere como minomo 2 argumentos"
+msgstr "'data' requiere como mínimo 2 argumentos"
#: py/compile.c
msgid "'data' requires integer arguments"
@@ -255,7 +255,7 @@ msgstr "'return' fuera de una función"
#: py/compile.c
msgid "'yield from' inside async function"
-msgstr "'yield from' dentro función asincrónica"
+msgstr "'yield from' dentro de una función asincrónica"
#: py/compile.c
msgid "'yield' outside function"
@@ -289,17 +289,28 @@ msgstr "ADC2 está siendo usado por WiFi"
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
#, c-format
msgid "Address must be %d bytes long"
-msgstr "La dirección debe ser %d bytes de largo"
+msgstr "La dirección debe tener %d bytes de largo"
#: shared-bindings/_bleio/Address.c
msgid "Address type out of range"
msgstr "Tipo de dirección fuera de rango"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr "Todos los periféricos CAN están en uso"
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "Todos los periféricos I2C están siendo usados"
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr "Todas las unidades PCNT en uso"
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr "Todos los FIFOs de RX en uso"
@@ -332,6 +343,7 @@ msgstr "Todos los timers para este pin están siendo utilizados"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -347,7 +359,7 @@ msgstr "Ya se encuentra publicando."
#: ports/atmel-samd/common-hal/canio/Listener.c
msgid "Already have all-matches listener"
-msgstr "Ya se tiene un escucha todas-las-coincidencias"
+msgstr "Ya se tiene un escucha de todas las coincidencias"
#: shared-module/memorymonitor/AllocationAlarm.c
#: shared-module/memorymonitor/AllocationSize.c
@@ -370,7 +382,7 @@ msgstr "Funcionalidad AnalogOut no soportada"
#: shared-bindings/analogio/AnalogOut.c
msgid "AnalogOut is only 16 bits. Value must be less than 65536."
-msgstr "AnalogOut es solo de 16 bits. Value debe ser menos a 65536."
+msgstr "AnalogOut es solo de 16 bits. El valor debe ser menor que 65536."
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c
msgid "AnalogOut not supported on given pin"
@@ -383,7 +395,7 @@ msgstr "Otro envío ya está activo"
#: shared-bindings/pulseio/PulseOut.c
msgid "Array must contain halfwords (type 'H')"
-msgstr "Array debe contener media palabra (type 'H')"
+msgstr "El array debe contener medias palabras (escriba 'H')"
#: shared-bindings/nvm/ByteArray.c
msgid "Array values should be single bytes."
@@ -420,15 +432,24 @@ msgstr ""
"Auto-reload habilitado. Simplemente guarda los archivos via USB para "
"ejecutarlos o entra al REPL para desabilitarlos.\n"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr "El periférico no maneja el Baudrate"
+
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate"
-msgstr "Por debajo de taza mínima de refrescamiento"
+msgstr "Por debajo de la tasa mínima de refrescamiento"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit"
msgstr "Bit clock y word select deben compartir una unidad de reloj"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr "Bit depth tiene que ser de 1 a 6 inclusivo, no %d"
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "Bits depth debe ser múltiplo de 8."
@@ -479,7 +500,7 @@ msgstr "El buffer es muy pequeño"
#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c
#, c-format
msgid "Buffer length %d too big. It must be less than %d"
-msgstr "La longitud del buffer %d es muy grande. Debe ser menor a %d"
+msgstr "Longitud del buffer %d es demasiado grande. Tiene que ser menor a %d"
#: ports/atmel-samd/common-hal/sdioio/SDCard.c
#: ports/cxd56/common-hal/sdioio/SDCard.c shared-module/sdcardio/SDCard.c
@@ -501,7 +522,7 @@ msgstr "Buffer demasiado grande e incapaz de asignar"
#: shared-bindings/_bleio/PacketBuffer.c
#, c-format
msgid "Buffer too short by %d bytes"
-msgstr "Búfer muy corto por %d bytes"
+msgstr "Búffer muy corto por %d bytes"
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
@@ -710,7 +731,7 @@ msgstr "No se puede definir la dirección"
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Could not start PWM"
-msgstr "No se pudo iniciar el PWM"
+msgstr "No se pudo iniciar PWM"
#: ports/stm/common-hal/busio/UART.c
msgid "Could not start interrupt, RX busy"
@@ -727,7 +748,7 @@ msgstr "No se pudo asignar el primer buffer"
#: shared-module/audiomp3/MP3Decoder.c
msgid "Couldn't allocate input buffer"
-msgstr "No se pudo encontrar el búfer de entrada"
+msgstr "No se pudo encontrar el buffer de entrada"
#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c
#: shared-module/audiomp3/MP3Decoder.c
@@ -794,7 +815,7 @@ msgstr "Modo Drive no se usa cuando la dirección es input."
msgid "ECB only operates on 16 bytes at a time"
msgstr "ECB solo opera sobre 16 bytes a la vez"
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
msgstr "Fallo ESP-IDF al tomar la memoria"
@@ -855,6 +876,10 @@ msgstr "No se admiten anuncios extendidos con respuesta de escaneo."
msgid "FFT is defined for ndarrays only"
msgstr "FFT se define solo para ndarrays"
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr "FFT solo esta implementado para arrays lineales"
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
msgstr "Fallo en saludo SSL"
@@ -913,13 +938,14 @@ msgstr "No se puede liberar el mutex, err 0x%04x"
#: supervisor/shared/safe_mode.c
msgid "Failed to write internal flash."
-msgstr "Error al escribir al flash interno."
+msgstr "Error al escribir el flash interno."
#: py/moduerrno.c
msgid "File exists"
msgstr "El archivo ya existe"
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
msgstr "Filtros muy complejos"
@@ -951,7 +977,7 @@ msgstr "La función requiere lock"
#: shared-bindings/displayio/EPaperDisplay.c
#: shared-bindings/framebufferio/FramebufferDisplay.c
msgid "Group already used"
-msgstr "El grupo ya está siendo utilizado"
+msgstr "Grupo ya está siendo utilizado"
#: shared-module/displayio/Group.c
msgid "Group full"
@@ -977,7 +1003,7 @@ msgstr "Operación I/O en archivo cerrado"
#: ports/stm/common-hal/busio/I2C.c
msgid "I2C Init Error"
-msgstr "Error de inicio de I2C"
+msgstr "I2C Error de inicio"
#: shared-bindings/audiobusio/I2SOut.c
msgid "I2SOut not available"
@@ -1000,6 +1026,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "Tamaño incorrecto del buffer"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr "Inicializacion fallida por falta de memoria"
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr "La entrada está durando mucho tiempo"
@@ -1080,6 +1110,7 @@ msgid "Invalid byteorder string"
msgstr "Cadena de byteorder inválida"
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr "Inválido periodo de captura. Rango válido: 1 - 500"
@@ -1121,7 +1152,8 @@ msgid "Invalid phase"
msgstr "Fase inválida"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Pin inválido"
@@ -1141,7 +1173,7 @@ msgstr "Pin inválido para canal derecho"
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1255,6 +1287,10 @@ msgstr "Debe proporcionar un pin MISO o MOSI"
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "Debe usar un múltiplo de 6 pines rgb, no %d"
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr "Error NVS"
+
#: py/parse.c
msgid "Name too long"
msgstr "Nombre muy largo"
@@ -1368,7 +1404,7 @@ msgstr "No hay temporizador disponible"
#: supervisor/shared/safe_mode.c
msgid "Nordic Soft Device failure assertion."
-msgstr "fallo de aserción de dispositivo Nordic Soft."
+msgstr "Fallo de aserción de dispositivo Nordic Soft."
#: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c
msgid "Not a valid IP string"
@@ -1407,14 +1443,14 @@ msgstr "Paridad impar no soportada"
msgid "Only 8 or 16 bit mono with "
msgstr "Solo mono de 8 ó 16 bit con "
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr "Solo hay capacidad para enchufes IPv4 SOCK_STREAM"
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr "Solo hay capacidad para direcciones IPv4"
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
+msgstr "Solo se admiten sockets IPv4"
+
#: shared-module/displayio/OnDiskBitmap.c
#, c-format
msgid ""
@@ -1464,7 +1500,7 @@ msgstr ""
#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
#: ports/stm/common-hal/displayio/ParallelBus.c
msgid "ParallelBus not yet supported"
-msgstr "ParallelBus no soportado aún"
+msgstr "ParallelBus todavía no soportado"
#: py/moduerrno.c
msgid "Permission denied"
@@ -1498,8 +1534,9 @@ msgid ""
"bytes. If this cannot be avoided, pass allow_inefficient=True to the "
"constructor"
msgstr ""
-"El pinout utiliza %d bytes por elemento, lo que consume más del ideal de %d "
-"bytes. Si esto no se puede evitar, pase allow_inefficient=True al constructor"
+"El pinout utiliza %d bytes por elemento, lo que consume más de los %d bytes "
+"ideales. Si esto no se puede evitar, pase allow_inefficient=True al "
+"constructor"
#: py/builtinhelp.c
msgid "Plus any modules on the filesystem\n"
@@ -1530,7 +1567,7 @@ msgstr ""
#: shared-bindings/_bleio/Adapter.c
msgid "Prefix buffer must be on the heap"
-msgstr "El búfer de prefijo debe estar en el montículo"
+msgstr "El prefijo del buffer debe estar en el heap"
#: main.c
msgid "Press any key to enter the REPL. Use CTRL-D to reload."
@@ -1543,7 +1580,7 @@ msgstr "Pull no se usa cuando la dirección es output."
#: ports/stm/common-hal/os/__init__.c
msgid "RNG DeInit Error"
-msgstr "Error de desinicializado del RNG"
+msgstr "Error de desinicialización de RNG"
#: ports/stm/common-hal/os/__init__.c
msgid "RNG Init Error"
@@ -1552,7 +1589,7 @@ msgstr "Error de inicialización de RNG"
#: ports/esp32s2/common-hal/busio/UART.c
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "RS485 inversion specified when not in RS485 mode"
-msgstr "Se especifica inversión de RS485 sin estar en modo RS485"
+msgstr "Se especifica inversión de RS485 si no está en modo RS485"
#: ports/cxd56/common-hal/rtc/RTC.c ports/esp32s2/common-hal/rtc/RTC.c
#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c
@@ -1587,7 +1624,7 @@ msgstr "Objeto de solo-lectura"
#: shared-bindings/displayio/EPaperDisplay.c
msgid "Refresh too soon"
-msgstr "Actualizando demasiado pronto"
+msgstr "Refresco demasiado pronto"
#: shared-bindings/canio/RemoteTransmissionRequest.c
msgid "RemoteTransmissionRequests limited to 8 bytes"
@@ -1647,7 +1684,7 @@ msgstr "Frecuencia de muestreo demasiado alta. Debe ser menor a %d"
#: ports/nrf/common-hal/_bleio/Adapter.c
msgid "Scan already in progess. Stop with stop_scan."
-msgstr "Escaneo en progreso. Use stop_scan para detener."
+msgstr "Escaneo en progreso. Usa stop_scan para detener."
#: ports/mimxrt10xx/common-hal/busio/UART.c
msgid "Selected CTS pin not valid"
@@ -1687,7 +1724,7 @@ msgstr "SocketPool solo se puede usar con wifi.radio"
#: shared-bindings/aesio/aes.c
msgid "Source and destination buffers must be the same length"
-msgstr "Los búferes de fuente y destino deben ser del mismo tamaño"
+msgstr "Los buffers de fuente y destino deben ser del mismo tamaño"
#: extmod/modure.c
msgid "Splitting with sub-captures"
@@ -1718,7 +1755,7 @@ msgid ""
"The CircuitPython heap was corrupted because the stack was too small.\n"
"Please increase the stack size if you know how, or if not:"
msgstr ""
-"El montículo de CircuitPython se dañó porque la pila era demasiado pequeña.\n"
+"El heap de CircuitPython se dañó porque la pila era demasiado pequeña.\n"
"Aumente el tamaño de la pila si sabe cómo, o si no:"
#: supervisor/shared/safe_mode.c
@@ -1726,8 +1763,8 @@ msgid ""
"The `microcontroller` module was used to boot into safe mode. Press reset to "
"exit safe mode.\n"
msgstr ""
-"El módulo de `microcontroller` fue utilizado para bootear en modo seguro. "
-"Presione reset para salir del modo seguro.\n"
+"El módulo de `microcontroller` fue utilizado para arrancar en modo seguro. "
+"Presiona reset para salir del modo seguro.\n"
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30"
@@ -1739,9 +1776,9 @@ msgid ""
"enough power for the whole circuit and press reset (after ejecting "
"CIRCUITPY).\n"
msgstr ""
-"La alimentación de la microntroladora bajó. Asegúrate que tu fuente de "
-"poder\n"
-"pueda suplir suficiente energía para todo el circuito y presione reset "
+"La alimentación del microntrolador cayó. Asegúrate que tu fuente de "
+"alimentación\n"
+"pueda aportar suficiente energía para todo el circuito y presiona reset "
"(luego de\n"
"expulsar CIRCUITPY)\n"
@@ -1921,7 +1958,7 @@ msgstr "Error de seguridad desconocido: 0x%04x"
#: ports/nrf/common-hal/_bleio/__init__.c
#, c-format
msgid "Unknown soft device error: %04x"
-msgstr "Error suave desconocido en dispositivo: %04x"
+msgstr "Error leve desconocido en dispositivo: %04x"
#: shared-bindings/_pixelbuf/PixelBuf.c
#, c-format
@@ -1934,7 +1971,7 @@ msgid ""
"declined or ignored."
msgstr ""
"Problema no especificado. Puede ser que la señal de emparejamiento del otro "
-"dispositivo fue declinada o ignorada."
+"dispositivo fue denegada o ignorada."
#: 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
@@ -1979,7 +2016,7 @@ msgstr "Tiempo de espera agotado para lectura de voltaje"
msgid "WARNING: Your code filename has two extensions\n"
msgstr "ADVERTENCIA: El nombre de archivo de tu código tiene dos extensiones\n"
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
"WatchDogTimer no se puede desinicializar luego de definirse en modo RESET"
@@ -2024,7 +2061,7 @@ msgstr "La clave de WiFi debe ser entre 8 y 63 caracteres"
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
msgid "Writes not supported on Characteristic"
-msgstr "Escrituras no admitidas en la característica"
+msgstr "Escrituras no admitidas en Characteristic"
#: supervisor/shared/safe_mode.c
msgid "You are in safe mode: something unanticipated happened.\n"
@@ -2067,10 +2104,6 @@ msgstr "address fuera de límites"
msgid "addresses is empty"
msgstr "addresses esta vacío"
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr "arctan2 se encuentra implementado solo para escalares y ndarrays"
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr "argumento es una secuencia vacía"
@@ -2079,6 +2112,10 @@ msgstr "argumento es una secuencia vacía"
msgid "argsort argument must be an ndarray"
msgstr "El argumento para argsort debe ser un ndarray"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr "El argot no está implementado para arrays aplanados"
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr "el argumento tiene un tipo erroneo"
@@ -2096,33 +2133,41 @@ msgstr "argumento número/tipos no coinciden"
msgid "argument should be a '%q' not a '%q'"
msgstr "argumento deberia ser un '%q' no un '%q'"
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr "argumentos deben ser ndarrays"
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr "Longitud del array e índice tienen que ser iguales"
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr "array/bytes requeridos en el lado derecho"
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr "Intendo de obteber (arg)min/(arg)max de secuencia vacía"
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
-msgstr "se trató de traer argmin/argmax de una secuencia vacía"
+msgstr "intento de obtener argmin/argmax de una secuencia vacía"
#: py/objstr.c
msgid "attributes not supported yet"
msgstr "atributos aún no soportados"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
-msgstr "eje debe ser -1, 0, None o 1"
+msgid "axis is out of bounds"
+msgstr "Eje está fuera de sus límites"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
-msgstr "eje debe ser -1, 0, o 1"
+msgid "axis must be None, or an integer"
+msgstr "Eje tiene que ser None, o un entero"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
-msgstr "eje debe ser None, 0, o 1"
+msgid "axis too long"
+msgstr "Eje demasiado largo"
#: py/builtinevex.c
msgid "bad compile mode"
@@ -2330,6 +2375,10 @@ msgstr ""
"no se puede cambiar de especificación de campo manual a numeración "
"automática de campos"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr "No se puede realizar cast de la salida sin una regla de cast"
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr "no se pueden crear '%q' instancias"
@@ -2346,10 +2395,6 @@ msgstr "no se puede importar name '%q'"
msgid "cannot perform relative import"
msgstr "no se puedo realizar importación relativa"
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr "no se puede reformar el arreglo (forma de entrada/salida incompatible)"
-
#: py/emitnative.c
msgid "casting"
msgstr "convirtiendo tipo"
@@ -2368,7 +2413,7 @@ msgstr "El argumento de chr() no esta en el rango(256)"
#: shared-module/vectorio/Circle.c
msgid "circle can only be registered in one parent"
-msgstr "circle solo puede ser registrado con un pariente"
+msgstr "circulo solo puede ser registrado con un pariente"
#: shared-bindings/displayio/Palette.c
msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
@@ -2422,10 +2467,6 @@ msgstr "los argumentos para convolve deben ser ndarrays"
msgid "convolve arguments must not be empty"
msgstr "los argumentos para convolve no deben estar vacíos"
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr "no se pudo anunciar la matriz de entrada desde la forma"
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr "no se pudo invertir la matriz de Vandermonde"
@@ -2434,6 +2475,10 @@ msgstr "no se pudo invertir la matriz de Vandermonde"
msgid "couldn't determine SD card version"
msgstr "no se pudo determinar la versión de la tarjeta SD"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "cross is defined for 1D arrays of length 3"
+msgstr "Cruce está definido para un array 1D de longitud 3"
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr "los datos deben permitir iteración"
@@ -2442,10 +2487,6 @@ msgstr "los datos deben permitir iteración"
msgid "data must be of equal length"
msgstr "los datos deben ser de igual tamaño"
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr "ddof debe ser menor que la longitud del conjunto de datos"
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr "números decimales no soportados"
@@ -2477,6 +2518,10 @@ msgstr "la secuencia de actualizacion del dict tiene una longitud incorrecta"
msgid "diff argument must be an ndarray"
msgstr "El argumento diff debe ser un ndarray"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr "Orden de diferenciación fuera de rango"
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2592,9 +2637,13 @@ msgstr "se debe poder llamar al primer argumento"
msgid "first argument must be a function"
msgstr "el primer argumento debe ser una función"
+#: extmod/ulab/code/ulab_create.c
+msgid "first argument must be a tuple of ndarrays"
+msgstr "Primer argumento tiene que ser una tupla de ndarrays"
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
-msgstr "el primer argumento debe permitir iteración"
+msgstr "el primer argumento debe ser un iterable"
#: extmod/ulab/code/vector/vectorise.c
msgid "first argument must be an ndarray"
@@ -2614,7 +2663,7 @@ msgstr "el argumento invertido debe ser un ndarray"
#: py/objint.c
msgid "float too big"
-msgstr "punto flotante muy grande"
+msgstr "punto flotante demasiado grande"
#: shared-bindings/_stage/Text.c
msgid "font must be 2048 bytes long"
@@ -2645,9 +2694,9 @@ msgstr "la función tiene múltiples valores para el argumento '%q'"
msgid "function has the same sign at the ends of interval"
msgstr "la función tiene el mismo signo a extremos del intervalo"
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
-msgstr "la función está implementada solo para escalares y ndarrays"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
+msgstr "Función solo definida para ndarrays"
#: py/argcheck.c
#, c-format
@@ -2716,6 +2765,7 @@ msgstr "relleno (padding) incorrecto"
msgid "index is out of bounds"
msgstr "el índice está fuera de límites"
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "index fuera de rango"
@@ -2740,6 +2790,10 @@ msgstr "el tamaño de initial_value es incorrecto"
msgid "inline assembler must be a function"
msgstr "ensamblador en línea debe ser una función"
+#: extmod/ulab/code/ndarray.c
+msgid "input and output shapes are not compatible"
+msgstr "Formas de entrada y salida no son compactibles"
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr "el argumento de entrada debe ser un entero o una tupla de par"
@@ -2748,9 +2802,13 @@ msgstr "el argumento de entrada debe ser un entero o una tupla de par"
msgid "input array length must be power of 2"
msgstr "el tamaño del arreglo de entrada debe ser potencia de 2"
+#: extmod/ulab/code/ulab_create.c
+msgid "input arrays are not compatible"
+msgstr "Arrays de entrada no son compactibles"
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
-msgstr "los datos de entrada deben permitir iteración"
+msgstr "los datos de entrada deben ser iterables"
#: extmod/ulab/code/linalg/linalg.c
msgid "input matrix is asymmetric"
@@ -2760,6 +2818,22 @@ msgstr "la matriz de entrada es asimétrica"
msgid "input matrix is singular"
msgstr "la matriz de entrada es singular"
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr "Entrada tiene que ser un ndarray denso"
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr "Entrada tiene que ser un tensor de rango 2"
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr "Entrada tiene que ser un ndarray"
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr "Entrada tiene que ser unidimensional"
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr "la entrada debe ser una matriz cuadrada"
@@ -2772,6 +2846,10 @@ msgstr "la entrada debe ser una tupla, lista, rango o ndarray"
msgid "input vectors must be of equal length"
msgstr "los vectores de entrada deben ser de igual tamaño"
+#: extmod/ulab/code/poly/poly.c
+msgid "inputs are not iterable"
+msgstr "Entradas no son iterables"
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr "int() arg 2 debe ser >= 2 y <= 36"
@@ -2909,6 +2987,10 @@ msgstr "variable local referenciada antes de la asignación"
msgid "long int not supported in this build"
msgstr "long int no soportado en esta compilación"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr "Loopback + modo silencioso no están soportados por periférico"
+
#: py/parse.c
msgid "malformed f-string"
msgstr "cadena-f mal formada"
@@ -2939,10 +3021,22 @@ msgstr "max_length debe ser 0-%d cuando fixed_length es %s"
msgid "max_length must be > 0"
msgstr "max_lenght debe ser > 0"
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr "Máximo número de dimensiones es 4"
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "profundidad máxima de recursión excedida"
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr "maxiter tiene que ser > 0"
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr "maxiter debe ser > 0"
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -2980,10 +3074,6 @@ msgstr "debe hacer un raise de un objeto"
msgid "must use keyword argument for key function"
msgstr "debe utilizar argumento de palabra clave para la función clave"
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr "n debe estar entre 0 y 9"
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr "name '%q' no esta definido"
@@ -3068,6 +3158,10 @@ msgstr ""
"no deberia estar/tener agumento por palabra clave despues de argumento por "
"palabra clave"
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr "norma está definida para arrays 1D y 2D"
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr "no es 128-bit UUID"
@@ -3081,10 +3175,6 @@ msgstr ""
msgid "not enough arguments for format string"
msgstr "no suficientes argumentos para format string"
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr "el número de argumentos debe ser 2 o 3"
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr "el número de puntos debe ser al menos 2"
@@ -3137,6 +3227,10 @@ msgstr "objeto con protocolo de buffer requerido"
msgid "odd-length string"
msgstr "string de longitud impar"
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr "offset es demasiado grande"
+
#: py/objstr.c py/objstrunicode.c
msgid "offset out of bounds"
msgstr "offset fuera de límites"
@@ -3159,6 +3253,14 @@ msgstr "solo se admiten segmentos con step=1 (alias None)"
msgid "operands could not be broadcast together"
msgstr "los operandos no se pueden transmitir juntos"
+#: extmod/ulab/code/ndarray.c
+msgid "operation is implemented for 1D Boolean arrays only"
+msgstr "operación solo está implementada para arrays booleanos de 1D"
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr "operación no está implementada para arrays aplanados"
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr "la operación no está implementada para ndarrays"
@@ -3249,6 +3351,7 @@ msgstr "el 3er argumento de pow() no puede ser 0"
msgid "pow() with 3 arguments requires integers"
msgstr "pow() con 3 argumentos requiere enteros"
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3256,6 +3359,8 @@ msgstr "pow() con 3 argumentos requiere enteros"
#: ports/esp32s2/boards/espressif_saola_1_wrover/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
+#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
msgid "pressing boot button at start up.\n"
@@ -3290,6 +3395,10 @@ msgstr "import relativo"
msgid "requested length %d but object has length %d"
msgstr "longitud solicitada %d pero el objeto tiene longitud %d"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "results cannot be cast to specified type"
+msgstr "resultados no pueden aplicar cast a un tipo específico"
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr "la anotación de retorno debe ser un identificador"
@@ -3308,9 +3417,9 @@ msgstr "rgb_pins[%d] duplica otra asignación de pin"
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "rgb_pins[%d] no está en el mismo puerto que el reloj"
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
-msgstr "el lado derecho debe ser un ndarray o escalar"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
+msgstr "Argumento enrolado tiene que ser un ndarray"
#: py/objstr.c
msgid "rsplit(None,n)"
@@ -3337,8 +3446,8 @@ msgid "script compilation not supported"
msgstr "script de compilación no soportado"
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
-msgstr "la forma debe ser una tupla de 2"
+msgid "shape must be a tuple"
+msgstr "forma tiene que ser una tupla"
#: py/objstr.c
msgid "sign not allowed in string format specifier"
@@ -3460,6 +3569,7 @@ msgstr "limite debe ser en el rango 0-65536"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() toma un sequencio 9"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@@ -3485,6 +3595,10 @@ msgstr "tiempo de espera agotado esperando a tarjeta v2"
msgid "timestamp out of range for platform time_t"
msgstr "timestamp fuera de rango para plataform time_t"
+#: extmod/ulab/code/ndarray.c
+msgid "tobytes can be invoked for dense arrays only"
+msgstr "tobytes solo pueden ser invocados por arrays densos"
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr "demasiados argumentos provistos con el formato dado"
@@ -3510,6 +3624,16 @@ msgstr "tuple index fuera de rango"
msgid "tuple/list has wrong length"
msgstr "tupla/lista tiene una longitud incorrecta"
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr "twai_driver_install devolvió esp-idf error #%d"
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr "twai_start devolvió esp-idf error #%d"
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3634,6 +3758,10 @@ msgstr "value_count debe ser > 0"
msgid "vectors must have same lengths"
msgstr "los vectores deben tener el mismo tamaño"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr "watchdog no inicializado"
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr "el tiempo de espera del perro guardián debe ser mayor a 0"
@@ -3646,13 +3774,13 @@ msgstr "el ancho debe ser mayor que cero"
msgid "window must be <= interval"
msgstr "la ventana debe ser <= intervalo"
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
-msgstr "tipo de argumento incorrecto"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
+msgstr "indice de eje erróneo"
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
-msgstr "tipo de índice incorrecto"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
+msgstr "eje especificado erróneo"
#: extmod/ulab/code/vector/vectorise.c
msgid "wrong input type"
@@ -3702,6 +3830,52 @@ 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 "Only IPv4 SOCK_STREAM sockets supported"
+#~ msgstr "Solo hay capacidad para enchufes IPv4 SOCK_STREAM"
+
+#~ msgid "arctan2 is implemented for scalars and ndarrays only"
+#~ msgstr "arctan2 se encuentra implementado solo para escalares y ndarrays"
+
+#~ msgid "axis must be -1, 0, None, or 1"
+#~ msgstr "eje debe ser -1, 0, None o 1"
+
+#~ msgid "axis must be -1, 0, or 1"
+#~ msgstr "eje debe ser -1, 0, o 1"
+
+#~ msgid "axis must be None, 0, or 1"
+#~ msgstr "eje debe ser None, 0, o 1"
+
+#~ msgid "cannot reshape array (incompatible input/output shape)"
+#~ msgstr ""
+#~ "no se puede reformar el arreglo (forma de entrada/salida incompatible)"
+
+#~ msgid "could not broadast input array from shape"
+#~ msgstr "no se pudo anunciar la matriz de entrada desde la forma"
+
+#~ msgid "ddof must be smaller than length of data set"
+#~ msgstr "ddof debe ser menor que la longitud del conjunto de datos"
+
+#~ msgid "function is implemented for scalars and ndarrays only"
+#~ msgstr "la función está implementada solo para escalares y ndarrays"
+
+#~ msgid "n must be between 0, and 9"
+#~ msgstr "n debe estar entre 0 y 9"
+
+#~ msgid "number of arguments must be 2, or 3"
+#~ msgstr "el número de argumentos debe ser 2 o 3"
+
+#~ msgid "right hand side must be an ndarray, or a scalar"
+#~ msgstr "el lado derecho debe ser un ndarray o escalar"
+
+#~ msgid "shape must be a 2-tuple"
+#~ msgstr "la forma debe ser una tupla de 2"
+
+#~ msgid "wrong argument type"
+#~ msgstr "tipo de argumento incorrecto"
+
+#~ msgid "wrong index type"
+#~ msgstr "tipo de índice incorrecto"
+
#~ msgid "specify size or data, but not both"
#~ msgstr "especifique o tamaño o datos, pero no ambos"
@@ -4013,7 +4187,7 @@ msgstr "zi debe ser una forma (n_section,2)"
#~ msgstr "Falló el iniciar borrado de flash, err 0x%04x"
#~ msgid "Flash write failed"
-#~ msgstr "Falló la escritura"
+#~ msgstr "Falló la escritura flash"
#~ msgid "Flash write failed to start, err 0x%04x"
#~ msgstr "Falló el iniciar la escritura de flash, err 0x%04x"
@@ -4070,7 +4244,7 @@ msgstr "zi debe ser una forma (n_section,2)"
#~ msgstr "Sin soporte PulseIn para %q"
#~ msgid "No hardware support for analog out."
-#~ msgstr "Sin soporte de hardware para analog out"
+#~ msgstr "Sin soporte de hardware para salida analógica"
#~ msgid "Not connected."
#~ msgstr "No conectado."
@@ -4079,24 +4253,24 @@ msgstr "zi debe ser una forma (n_section,2)"
#~ msgstr "Solo formato Windows, BMP sin comprimir soportado %d"
#~ msgid "Only bit maps of 8 bit color or less are supported"
-#~ msgstr "Solo se admiten bit maps de color de 8 bits o menos"
+#~ msgstr "Solo se admiten mapas de bits de color de 8 bits o menos"
#~ msgid ""
#~ "Only monochrome, indexed 8bpp, and 16bpp or greater BMPs supported: %d "
#~ "bpp given"
#~ msgstr ""
#~ "Solo se admiten BMP monocromos, indexados de 8bpp y 16bpp o superiores:%d "
-#~ "bppdado"
+#~ "bpp dado"
#, fuzzy
#~ msgid "Only slices with step=1 (aka None) are supported"
-#~ msgstr "solo se admiten segmentos con step=1 (alias None)"
+#~ msgstr "Solo se admiten segmentos con step=1 (alias None)"
#~ msgid "Only true color (24 bpp or higher) BMP supported %x"
#~ msgstr "Solo color verdadero (24 bpp o superior) BMP admitido %x"
#~ msgid "Only tx supported on UART1 (GPIO2)."
-#~ msgstr "Solo tx soportada en UART1 (GPIO2)"
+#~ msgstr "Solo tx soportada en UART1 (GPIO2)."
#~ msgid "PWM not supported on pin %d"
#~ msgstr "El pin %d no soporta PWM"
@@ -4111,11 +4285,11 @@ msgstr "zi debe ser una forma (n_section,2)"
#~ msgstr "Pines no válidos para SPI"
#~ msgid "Pixel beyond bounds of buffer"
-#~ msgstr "Pixel beyond bounds of buffer"
+#~ msgstr "Píxel fuera de los límites del búfer"
#, fuzzy
#~ msgid "Range out of bounds"
-#~ msgstr "address fuera de límites"
+#~ msgstr "Rango fuera de límites"
#~ msgid "STA must be active"
#~ msgstr "STA debe estar activo"
@@ -4135,10 +4309,10 @@ msgstr "zi debe ser una forma (n_section,2)"
#~ msgstr ""
#~ "El heap de CircuitPython estaba corrupto porque el stack era demasiado "
#~ "pequeño.\n"
-#~ "Aumente los límites del tamaño del stacj y presione reset (después de "
+#~ "Aumente los límites del tamaño del stack y presione reset (después de "
#~ "expulsarCIRCUITPY).\n"
-#~ "Si no cambió el stack, entonces reporte un issue aquí con el contenido "
-#~ "desu unidad CIRCUITPY:\n"
+#~ "Si no cambió el stack, entonces reporte un issue aquí con el contenido de "
+#~ "su unidad CIRCUITPY:\n"
#~ msgid ""
#~ "The microcontroller's power dipped. Please make sure your power supply "
@@ -4191,7 +4365,7 @@ msgstr "zi debe ser una forma (n_section,2)"
#~ "malo ha sucedido.\n"
#~ msgid "bad GATT role"
-#~ msgstr "mal GATT role"
+#~ msgstr "rol de GATT malo"
#~ msgid "bits must be 8"
#~ msgstr "bits debe ser 8"
@@ -4224,7 +4398,7 @@ msgstr "zi debe ser una forma (n_section,2)"
#~ msgstr "no se puede establecer STA config"
#~ msgid "characteristics includes an object that is not a Characteristic"
-#~ msgstr "characteristics incluye un objeto que no es una Characteristica"
+#~ msgstr "characteristics incluye un objeto que no es una Characteristic"
#~ msgid "color buffer must be a buffer or int"
#~ msgstr "color buffer deber ser un buffer o un int"
diff --git a/locale/fil.po b/locale/fil.po
index 7a91f5c85..9178623a2 100644
--- a/locale/fil.po
+++ b/locale/fil.po
@@ -5,7 +5,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-16 19:50-0500\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
"Language-Team: fil\n"
@@ -289,11 +289,22 @@ msgstr "ang palette ay dapat 32 bytes ang haba"
msgid "Address type out of range"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr ""
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "Lahat ng I2C peripherals ginagamit"
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr ""
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr ""
@@ -325,6 +336,7 @@ msgstr "Lahat ng timers para sa pin na ito ay ginagamit"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -411,6 +423,10 @@ msgstr ""
"Ang awtomatikong pag re-reload ay ON. i-save lamang ang mga files sa USB "
"para patakbuhin sila o pasukin ang REPL para i-disable ito.\n"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr ""
+
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate"
@@ -420,6 +436,11 @@ msgstr ""
msgid "Bit clock and word select must share a clock unit"
msgstr "Ang bit clock at word select dapat makibahagi sa isang clock unit"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr ""
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "Bit depth ay dapat multiple ng 8."
@@ -785,7 +806,7 @@ msgstr "Drive mode ay hindi ginagamit kapag ang direksyon ay input."
msgid "ECB only operates on 16 bytes at a time"
msgstr ""
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
msgstr ""
@@ -848,6 +869,10 @@ msgstr ""
msgid "FFT is defined for ndarrays only"
msgstr ""
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr ""
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
msgstr ""
@@ -913,6 +938,7 @@ msgid "File exists"
msgstr "Mayroong file"
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
msgstr ""
@@ -992,6 +1018,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@@ -1072,6 +1102,7 @@ msgid "Invalid byteorder string"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr ""
@@ -1113,7 +1144,8 @@ msgid "Invalid phase"
msgstr "Mali ang phase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Mali ang pin"
@@ -1133,7 +1165,7 @@ msgstr "Mali ang pin para sa kanang channel"
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1247,6 +1279,10 @@ msgstr ""
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr ""
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr ""
+
#: py/parse.c
msgid "Name too long"
msgstr ""
@@ -1400,14 +1436,14 @@ msgstr "Odd na parity ay hindi supportado"
msgid "Only 8 or 16 bit mono with "
msgstr "Tanging 8 o 16 na bit mono na may "
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr ""
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr ""
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
#, c-format
msgid ""
@@ -1951,7 +1987,7 @@ msgstr ""
msgid "WARNING: Your code filename has two extensions\n"
msgstr "BABALA: Ang pangalan ng file ay may dalawang extension\n"
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
@@ -2036,10 +2072,6 @@ msgstr "wala sa sakop ang address"
msgid "addresses is empty"
msgstr "walang laman ang address"
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr ""
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr "arg ay walang laman na sequence"
@@ -2048,6 +2080,10 @@ msgstr "arg ay walang laman na sequence"
msgid "argsort argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr ""
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr "may maling type ang argument"
@@ -2065,15 +2101,23 @@ msgstr "hindi tugma ang argument num/types"
msgid "argument should be a '%q' not a '%q'"
msgstr "argument ay dapat na '%q' hindi '%q'"
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr ""
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr "array/bytes kinakailangan sa kanang bahagi"
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr ""
@@ -2082,15 +2126,15 @@ msgid "attributes not supported yet"
msgstr "attributes hindi sinusuportahan"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
+msgid "axis is out of bounds"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
+msgid "axis must be None, or an integer"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
+msgid "axis too long"
msgstr ""
#: py/builtinevex.c
@@ -2301,6 +2345,10 @@ msgstr ""
"hindi mapalitan ang manual field specification sa awtomatikong field "
"numbering"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr ""
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr "hindi magawa '%q' instances"
@@ -2317,10 +2365,6 @@ msgstr "hindi ma-import ang name %q"
msgid "cannot perform relative import"
msgstr "hindi maaring isagawa ang relative import"
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr ""
-
#: py/emitnative.c
msgid "casting"
msgstr "casting"
@@ -2393,10 +2437,6 @@ msgstr ""
msgid "convolve arguments must not be empty"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr ""
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr ""
@@ -2405,6 +2445,10 @@ msgstr ""
msgid "couldn't determine SD card version"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "cross is defined for 1D arrays of length 3"
+msgstr ""
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr ""
@@ -2413,10 +2457,6 @@ msgstr ""
msgid "data must be of equal length"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr ""
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr "decimal numbers hindi sinusuportahan"
@@ -2450,6 +2490,10 @@ msgstr "may mali sa haba ng dict update sequence"
msgid "diff argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr ""
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2566,6 +2610,10 @@ msgstr ""
msgid "first argument must be a function"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "first argument must be a tuple of ndarrays"
+msgstr ""
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr ""
@@ -2619,8 +2667,8 @@ msgstr "ang function ay nakakuha ng maraming values para sa argument '%q'"
msgid "function has the same sign at the ends of interval"
msgstr ""
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
msgstr ""
#: py/argcheck.c
@@ -2691,6 +2739,7 @@ msgstr "mali ang padding"
msgid "index is out of bounds"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "index wala sa sakop"
@@ -2715,6 +2764,10 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr "inline assembler ay dapat na function"
+#: extmod/ulab/code/ndarray.c
+msgid "input and output shapes are not compatible"
+msgstr ""
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@@ -2723,6 +2776,10 @@ msgstr ""
msgid "input array length must be power of 2"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "input arrays are not compatible"
+msgstr ""
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr ""
@@ -2735,6 +2792,22 @@ msgstr ""
msgid "input matrix is singular"
msgstr ""
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr ""
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr ""
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr ""
@@ -2747,6 +2820,10 @@ msgstr ""
msgid "input vectors must be of equal length"
msgstr ""
+#: extmod/ulab/code/poly/poly.c
+msgid "inputs are not iterable"
+msgstr ""
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr "int() arg 2 ay dapat >=2 at <= 36"
@@ -2885,6 +2962,10 @@ msgstr "local variable na reference bago na i-assign"
msgid "long int not supported in this build"
msgstr "long int hindi sinusuportahan sa build na ito"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr ""
+
#: py/parse.c
msgid "malformed f-string"
msgstr ""
@@ -2915,10 +2996,22 @@ msgstr ""
msgid "max_length must be > 0"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr ""
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "lumagpas ang maximum recursion depth"
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr ""
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr ""
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -2956,10 +3049,6 @@ msgstr "dapat itaas ang isang object"
msgid "must use keyword argument for key function"
msgstr "dapat gumamit ng keyword argument para sa key function"
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr ""
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr "name '%q' ay hindi defined"
@@ -3042,6 +3131,10 @@ msgstr "non-keyword arg sa huli ng */**"
msgid "non-keyword arg after keyword arg"
msgstr "non-keyword arg sa huli ng keyword arg"
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr ""
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr ""
@@ -3054,10 +3147,6 @@ msgstr "hindi lahat ng arguments na i-convert habang string formatting"
msgid "not enough arguments for format string"
msgstr "kulang sa arguments para sa format string"
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr ""
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr ""
@@ -3110,6 +3199,10 @@ msgstr "object na may buffer protocol kinakailangan"
msgid "odd-length string"
msgstr "odd-length string"
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr ""
+
#: py/objstr.c py/objstrunicode.c
#, fuzzy
msgid "offset out of bounds"
@@ -3133,6 +3226,14 @@ msgstr "ang mga slices lamang na may hakbang = 1 (aka None) ang sinusuportahan"
msgid "operands could not be broadcast together"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "operation is implemented for 1D Boolean arrays only"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr ""
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr ""
@@ -3224,6 +3325,7 @@ msgstr "pow() 3rd argument ay hindi maaring 0"
msgid "pow() with 3 arguments requires integers"
msgstr "pow() na may 3 argumento kailangan ng integers"
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3231,6 +3333,8 @@ msgstr "pow() na may 3 argumento kailangan ng integers"
#: ports/esp32s2/boards/espressif_saola_1_wrover/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
+#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
msgid "pressing boot button at start up.\n"
@@ -3265,6 +3369,10 @@ msgstr "relative import"
msgid "requested length %d but object has length %d"
msgstr "hiniling ang haba %d ngunit may haba ang object na %d"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "results cannot be cast to specified type"
+msgstr ""
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr "return annotation ay dapat na identifier"
@@ -3283,8 +3391,8 @@ msgstr ""
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
msgstr ""
#: py/objstr.c
@@ -3312,7 +3420,7 @@ msgid "script compilation not supported"
msgstr "script kompilasyon hindi supportado"
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
+msgid "shape must be a tuple"
msgstr ""
#: py/objstr.c
@@ -3436,6 +3544,7 @@ msgstr "ang threshold ay dapat sa range 0-65536"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() kumukuha ng 9-sequence"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@@ -3461,6 +3570,10 @@ msgstr ""
msgid "timestamp out of range for platform time_t"
msgstr "wala sa sakop ng timestamp ang platform time_t"
+#: extmod/ulab/code/ndarray.c
+msgid "tobytes can be invoked for dense arrays only"
+msgstr ""
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr "masyadong maraming mga argumento na ibinigay sa ibinigay na format"
@@ -3486,6 +3599,16 @@ msgstr "indeks ng tuple wala sa sakop"
msgid "tuple/list has wrong length"
msgstr "mali ang haba ng tuple/list"
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr ""
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr ""
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3610,6 +3733,10 @@ msgstr ""
msgid "vectors must have same lengths"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr ""
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""
@@ -3622,12 +3749,12 @@ msgstr ""
msgid "window must be <= interval"
msgstr ""
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
msgstr ""
#: extmod/ulab/code/vector/vectorise.c
diff --git a/locale/fr.po b/locale/fr.po
index cf0ea4fc3..bb9b6ea98 100644
--- a/locale/fr.po
+++ b/locale/fr.po
@@ -7,15 +7,15 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-16 19:50-0500\n"
-"PO-Revision-Date: 2020-10-22 20:48+0000\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
+"PO-Revision-Date: 2020-11-24 22:45+0000\n"
"Last-Translator: Antonin ENFRUN <antonin.e@me.com>\n"
"Language: fr\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 4.3.1\n"
+"X-Generator: Weblate 4.4-dev\n"
#: main.c
msgid ""
@@ -296,11 +296,22 @@ msgstr "L'adresse doit être longue de %d octets"
msgid "Address type out of range"
msgstr "Type d'adresse hors plage"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr "Tous les périphériques CAN sont utilisés"
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "Tous les périphériques I2C sont utilisés"
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr "Toutes les unités PCNT sont utilisées"
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr "Tout les RX FIFOs sont utilisé"
@@ -331,6 +342,7 @@ msgstr "Tous les timers pour cette broche sont utilisés"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -420,6 +432,10 @@ msgstr ""
"Auto-chargement activé. Copiez simplement les fichiers en USB pour les "
"lancer ou entrez sur REPL pour le désactiver.\n"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr "Baudrate non prise en charge par le périphérique"
+
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate"
@@ -429,6 +445,11 @@ msgstr "Inférieur à la fréquence d'images minimale"
msgid "Bit clock and word select must share a clock unit"
msgstr "'bit clock' et 'word select' doivent partager une horloge"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr "Bit depth doit être compris entre 1 et 6 inclus, et non %d"
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "La profondeur de bit doit être un multiple de 8."
@@ -798,7 +819,7 @@ msgstr "Le mode Drive n'est pas utilisé quand la direction est 'input'."
msgid "ECB only operates on 16 bytes at a time"
msgstr "La BCE ne fonctionne que sur 16 octets à la fois"
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
msgstr "ESP-IDF échec d'allocation de la mémoire"
@@ -860,6 +881,10 @@ msgstr ""
msgid "FFT is defined for ndarrays only"
msgstr "La FFT est définie pour les ndarrays uniquement"
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr "FFT n'est implémenté que pour les tableaux linéaires"
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
msgstr "Échec du handshake SSL"
@@ -925,6 +950,7 @@ msgid "File exists"
msgstr "Le fichier existe"
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
msgstr "Filtre trop complexe"
@@ -1005,6 +1031,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "Taille de tampon incorrecte"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr "L'initialisation a échoué par manque de mémoire"
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr "L'entrée prend trop de temps"
@@ -1085,6 +1115,7 @@ msgid "Invalid byteorder string"
msgstr "Chaîne d'octets non valide"
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr "Période de capture invalide. Gamme valide : 1 à 500"
@@ -1126,7 +1157,8 @@ msgid "Invalid phase"
msgstr "Phase invalide"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Broche invalide"
@@ -1146,7 +1178,7 @@ msgstr "Broche invalide pour le canal droit"
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1260,6 +1292,10 @@ msgstr "Doit fournir une broche MISO ou MOSI"
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "Doit utiliser un multiple de 6 broches RVB, pas %d"
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr ""
+
#: py/parse.c
msgid "Name too long"
msgstr "Nom trop long"
@@ -1412,14 +1448,14 @@ msgstr "Parité impaire non supportée"
msgid "Only 8 or 16 bit mono with "
msgstr "Uniquement 8 ou 16 bit mono avec "
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr "Seules les sockets IPv4 SOCK_STREAM sont prises en charge"
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr "Seules les adresses IPv4 sont prises en charge"
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
#, c-format
msgid ""
@@ -1989,7 +2025,7 @@ msgstr "La lecture de la tension a expiré"
msgid "WARNING: Your code filename has two extensions\n"
msgstr "ATTENTION : le nom de fichier de votre code a deux extensions\n"
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
"WatchDogTimer ne peut pas être désinitialisé une fois que le mode est réglé "
@@ -2077,10 +2113,6 @@ msgstr "adresse hors limites"
msgid "addresses is empty"
msgstr "adresses vides"
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr "arctan2 est implémenté uniquement pour les scalaires et les ndarrays"
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr "l'argument est une séquence vide"
@@ -2089,6 +2121,10 @@ msgstr "l'argument est une séquence vide"
msgid "argsort argument must be an ndarray"
msgstr "L'argument argsort doit être un ndarray"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr "argsort n'est pas mis en œuvre pour les tableaux aplatis"
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr "l'argument est d'un mauvais type"
@@ -2106,15 +2142,23 @@ msgstr "argument num/types ne correspond pas"
msgid "argument should be a '%q' not a '%q'"
msgstr "l'argument devrait être un(e) '%q', pas '%q'"
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr "les arguments doivent être des ndarrays"
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr "la longueur du tableau et de l'index doit être égale"
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr "tableau/octets requis à droite"
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr "tentative d’obtenir (arg)min/(arg)max d'une séquence vide"
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr "tenter d'obtenir argmin / argmax d'une séquence vide"
@@ -2123,16 +2167,16 @@ msgid "attributes not supported yet"
msgstr "attribut pas encore supporté"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
-msgstr "l'axe doit être -1, 0, None ou 1"
+msgid "axis is out of bounds"
+msgstr "axis est hors limites"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
-msgstr "l'axe doit être -1, 0 ou 1"
+msgid "axis must be None, or an integer"
+msgstr "axis doit être None ou un entier"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
-msgstr "l'axe doit être None, 0 ou 1"
+msgid "axis too long"
+msgstr "axis trop long"
#: py/builtinevex.c
msgid "bad compile mode"
@@ -2344,6 +2388,10 @@ msgstr ""
"impossible de passer d'une spécification manuelle des champs à une "
"énumération auto"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr ""
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr "ne peut pas créer une instance de '%q'"
@@ -2360,11 +2408,6 @@ msgstr "ne peut pas importer le nom %q"
msgid "cannot perform relative import"
msgstr "ne peut pas réaliser un import relatif"
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr ""
-"ne peut pas remodeler le tableau (forme d'entrée / sortie incompatible)"
-
#: py/emitnative.c
msgid "casting"
msgstr "typage"
@@ -2439,10 +2482,6 @@ msgstr "les arguments convolve doivent être des ndarrays"
msgid "convolve arguments must not be empty"
msgstr "les arguments convolve ne doivent pas être vides"
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr "n'a pas pu diffuser le tableau d'entrée à partir de la forme"
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr "n'a pas pu inverser la matrice Vandermonde"
@@ -2451,6 +2490,10 @@ msgstr "n'a pas pu inverser la matrice Vandermonde"
msgid "couldn't determine SD card version"
msgstr "impossible de déterminer la version de la carte SD"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "cross is defined for 1D arrays of length 3"
+msgstr "cross est défini pour les tableaux 1D de longueur 3"
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr "les données doivent être les objets iterables"
@@ -2459,10 +2502,6 @@ msgstr "les données doivent être les objets iterables"
msgid "data must be of equal length"
msgstr "les données doivent être de longueur égale"
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr "ddof doit être inférieur à la longueur de l'ensemble de données"
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr "nombres décimaux non supportés"
@@ -2494,6 +2533,10 @@ msgstr "la séquence de mise à jour de dict a une mauvaise longueur"
msgid "diff argument must be an ndarray"
msgstr "l'argument diff doit être un ndarray"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr "differentiation order hors plage"
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2611,6 +2654,10 @@ msgstr "le premier argument doit être un appelable"
msgid "first argument must be a function"
msgstr "le premier argument doit être une fonction"
+#: extmod/ulab/code/ulab_create.c
+msgid "first argument must be a tuple of ndarrays"
+msgstr "le premier argument doit être un tuple de ndarrays"
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr "le premier argument doit être un itérable"
@@ -2664,10 +2711,9 @@ msgstr "la fonction a reçu plusieurs valeurs pour l'argument '%q'"
msgid "function has the same sign at the ends of interval"
msgstr "la fonction a le même signe aux extrémités de l’intervalle"
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
-msgstr ""
-"la fonction est implémentée pour les scalaires et les ndarrays uniquement"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
+msgstr "La fonction n'est définie que pour les ndarrays"
#: py/argcheck.c
#, c-format
@@ -2736,6 +2782,7 @@ msgstr "espacement incorrect"
msgid "index is out of bounds"
msgstr "l'index est hors limites"
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "index hors gamme"
@@ -2761,6 +2808,10 @@ msgstr "la longueur de initial_value est incorrecte"
msgid "inline assembler must be a function"
msgstr "l'assembleur doit être une fonction"
+#: extmod/ulab/code/ndarray.c
+msgid "input and output shapes are not compatible"
+msgstr "les formes d'entrée et de sortie ne sont pas compatibles"
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr "l'argument d'entrée doit être un entier ou un tuple 2"
@@ -2769,6 +2820,10 @@ msgstr "l'argument d'entrée doit être un entier ou un tuple 2"
msgid "input array length must be power of 2"
msgstr "la longueur du tableau d'entrée doit être une puissance de 2"
+#: extmod/ulab/code/ulab_create.c
+msgid "input arrays are not compatible"
+msgstr "les tableaux d'entrée ne sont pas compatibles"
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr "les données d'entrée doivent être un itérable"
@@ -2781,6 +2836,22 @@ msgstr "la matrice d'entrée est asymétrique"
msgid "input matrix is singular"
msgstr "la matrice d'entrée est singulière"
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr "l'entrée doit être un tableau dense"
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr "l'entrée doit être un tenseur de rang 2"
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr ""
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr ""
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr "l'entrée doit être une matrice carrée"
@@ -2793,6 +2864,10 @@ msgstr "l'entrée doit être tuple, list, range ou ndarray"
msgid "input vectors must be of equal length"
msgstr "les vecteurs d'entrée doivent être de longueur égale"
+#: extmod/ulab/code/poly/poly.c
+msgid "inputs are not iterable"
+msgstr ""
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr "l'argument 2 de int() doit être >=2 et <=36"
@@ -2931,6 +3006,10 @@ msgstr "variable locale référencée avant d'être assignée"
msgid "long int not supported in this build"
msgstr "entiers longs non supportés dans cette build"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr "loopback + silent mode non pris en charge par le périphérique"
+
#: py/parse.c
msgid "malformed f-string"
msgstr "f-string mal formé"
@@ -2961,10 +3040,22 @@ msgstr "max_length doit être 0-%d lorsque fixed_length est %s"
msgid "max_length must be > 0"
msgstr "max_length doit être > 0"
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr ""
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "profondeur maximale de récursivité dépassée"
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr "maxiter doit être > 0"
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr "maxiter devrait être > 0"
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -3002,10 +3093,6 @@ msgstr "doit lever un objet"
msgid "must use keyword argument for key function"
msgstr "doit utiliser un argument nommé pour une fonction key"
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr "n doit être compris entre 0 et 9"
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr "nom '%q' non défini"
@@ -3089,6 +3176,10 @@ msgstr "argument non-nommé après */**"
msgid "non-keyword arg after keyword arg"
msgstr "argument non-nommé après argument nommé"
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr ""
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr "n'est pas un UUID 128 bits"
@@ -3102,10 +3193,6 @@ msgstr ""
msgid "not enough arguments for format string"
msgstr "pas assez d'arguments pour la chaîne de format"
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr "le nombre d'arguments doit être 2 ou 3"
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr "le nombre de points doit être d'au moins 2"
@@ -3158,6 +3245,10 @@ msgstr "un objet avec un protocole de tampon est nécessaire"
msgid "odd-length string"
msgstr "chaîne de longueur impaire"
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr ""
+
#: py/objstr.c py/objstrunicode.c
msgid "offset out of bounds"
msgstr "décalage hors limites"
@@ -3180,6 +3271,14 @@ msgstr "seules les tranches avec 'step=1' (cad None) sont supportées"
msgid "operands could not be broadcast together"
msgstr "les opérandes ne pouvaient pas être diffusés ensemble"
+#: extmod/ulab/code/ndarray.c
+msgid "operation is implemented for 1D Boolean arrays only"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr ""
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr "l'opération n'est pas implémentée sur les ndarrays"
@@ -3273,6 +3372,7 @@ msgstr "le 3e argument de pow() ne peut être 0"
msgid "pow() with 3 arguments requires integers"
msgstr "pow() avec 3 arguments nécessite des entiers"
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3280,6 +3380,8 @@ msgstr "pow() avec 3 arguments nécessite des entiers"
#: ports/esp32s2/boards/espressif_saola_1_wrover/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
+#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
msgid "pressing boot button at start up.\n"
@@ -3314,6 +3416,10 @@ msgstr "import relatif"
msgid "requested length %d but object has length %d"
msgstr "la longueur requise est %d mais l'objet est long de %d"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "results cannot be cast to specified type"
+msgstr ""
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr "l'annotation de return doit être un identifiant"
@@ -3332,9 +3438,9 @@ msgstr "rgb_pins[%d] duplique une autre affectation de broches"
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "rgb_pins[%d] n'est pas sur le même port que l'horloge"
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
-msgstr "le côté droit doit être un ndarray ou un scalaire"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
+msgstr ""
#: py/objstr.c
msgid "rsplit(None,n)"
@@ -3361,8 +3467,8 @@ msgid "script compilation not supported"
msgstr "compilation de script non supportée"
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
-msgstr "la forme doit être un tuple 2"
+msgid "shape must be a tuple"
+msgstr ""
#: py/objstr.c
msgid "sign not allowed in string format specifier"
@@ -3485,6 +3591,7 @@ msgstr "le seuil doit être dans la gamme 0-65536"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() prend une séquence de longueur 9"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr "le délai d'expiration a dépassé la valeur maximale prise en charge"
@@ -3509,6 +3616,10 @@ msgstr "Délai d’expiration dépassé en attendant une carte v2"
msgid "timestamp out of range for platform time_t"
msgstr "'timestamp' hors bornes pour 'time_t' de la plateforme"
+#: extmod/ulab/code/ndarray.c
+msgid "tobytes can be invoked for dense arrays only"
+msgstr ""
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr "trop d'arguments fournis avec ce format"
@@ -3534,6 +3645,16 @@ msgstr "index du tuple hors gamme"
msgid "tuple/list has wrong length"
msgstr "tuple/liste a une mauvaise longueur"
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr "twai_driver_install a renvoyé l'erreur esp-idf #%d"
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr "twai_start a renvoyé l'erreur esp-idf #%d"
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3658,6 +3779,10 @@ msgstr "'value_count' doit être > 0"
msgid "vectors must have same lengths"
msgstr "les vecteurs doivent avoir la même longueur"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr "chien de garde non initialisé"
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr "watchdog timeout doit être supérieur à 0"
@@ -3670,13 +3795,13 @@ msgstr "width doit être plus grand que zero"
msgid "window must be <= interval"
msgstr "la fenêtre doit être <= intervalle"
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
-msgstr "type d'argument incorrect"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
+msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
-msgstr "type d'index incorrect"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
+msgstr ""
#: extmod/ulab/code/vector/vectorise.c
msgid "wrong input type"
@@ -3726,6 +3851,57 @@ 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 "Only IPv4 SOCK_STREAM sockets supported"
+#~ msgstr "Seules les sockets IPv4 SOCK_STREAM sont prises en charge"
+
+#~ msgid "arctan2 is implemented for scalars and ndarrays only"
+#~ msgstr ""
+#~ "arctan2 est implémenté uniquement pour les scalaires et les ndarrays"
+
+#~ msgid "axis must be -1, 0, None, or 1"
+#~ msgstr "l'axe doit être -1, 0, None ou 1"
+
+#~ msgid "axis must be -1, 0, or 1"
+#~ msgstr "l'axe doit être -1, 0 ou 1"
+
+#~ msgid "axis must be None, 0, or 1"
+#~ msgstr "l'axe doit être None, 0 ou 1"
+
+#~ msgid "cannot reshape array (incompatible input/output shape)"
+#~ msgstr ""
+#~ "ne peut pas remodeler le tableau (forme d'entrée / sortie incompatible)"
+
+#~ msgid "could not broadast input array from shape"
+#~ msgstr "n'a pas pu diffuser le tableau d'entrée à partir de la forme"
+
+#~ msgid "ddof must be smaller than length of data set"
+#~ msgstr "ddof doit être inférieur à la longueur de l'ensemble de données"
+
+#~ msgid "function is implemented for scalars and ndarrays only"
+#~ msgstr ""
+#~ "la fonction est implémentée pour les scalaires et les ndarrays uniquement"
+
+#~ msgid "n must be between 0, and 9"
+#~ msgstr "n doit être compris entre 0 et 9"
+
+#~ msgid "number of arguments must be 2, or 3"
+#~ msgstr "le nombre d'arguments doit être 2 ou 3"
+
+#~ msgid "right hand side must be an ndarray, or a scalar"
+#~ msgstr "le côté droit doit être un ndarray ou un scalaire"
+
+#~ msgid "shape must be a 2-tuple"
+#~ msgstr "la forme doit être un tuple 2"
+
+#~ msgid "sorted axis can't be longer than 65535"
+#~ msgstr "sorted axis ne peut pas dépasser 65535"
+
+#~ msgid "wrong argument type"
+#~ msgstr "type d'argument incorrect"
+
+#~ msgid "wrong index type"
+#~ msgstr "type d'index incorrect"
+
#~ msgid "Must provide SCK pin"
#~ msgstr "Vous devez fournir un code PIN SCK"
diff --git a/locale/hi.po b/locale/hi.po
index bd6d5395b..025664069 100644
--- a/locale/hi.po
+++ b/locale/hi.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-16 19:50-0500\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Automatically generated\n"
"Language-Team: none\n"
@@ -287,11 +287,22 @@ msgstr ""
msgid "Address type out of range"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr ""
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr ""
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr ""
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr ""
@@ -322,6 +333,7 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -406,6 +418,10 @@ msgid ""
"disable.\n"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr ""
+
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate"
@@ -415,6 +431,11 @@ msgstr ""
msgid "Bit clock and word select must share a clock unit"
msgstr ""
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr ""
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr ""
@@ -774,7 +795,7 @@ msgstr ""
msgid "ECB only operates on 16 bytes at a time"
msgstr ""
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
msgstr ""
@@ -835,6 +856,10 @@ msgstr ""
msgid "FFT is defined for ndarrays only"
msgstr ""
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr ""
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
msgstr ""
@@ -900,6 +925,7 @@ msgid "File exists"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
msgstr ""
@@ -977,6 +1003,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@@ -1057,6 +1087,7 @@ msgid "Invalid byteorder string"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr ""
@@ -1098,7 +1129,8 @@ msgid "Invalid phase"
msgstr ""
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr ""
@@ -1118,7 +1150,7 @@ msgstr ""
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1232,6 +1264,10 @@ msgstr ""
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr ""
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr ""
+
#: py/parse.c
msgid "Name too long"
msgstr ""
@@ -1382,14 +1418,14 @@ msgstr ""
msgid "Only 8 or 16 bit mono with "
msgstr ""
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr ""
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr ""
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
#, c-format
msgid ""
@@ -1925,7 +1961,7 @@ msgstr ""
msgid "WARNING: Your code filename has two extensions\n"
msgstr ""
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
@@ -2004,10 +2040,6 @@ msgstr ""
msgid "addresses is empty"
msgstr ""
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr ""
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr ""
@@ -2016,6 +2048,10 @@ msgstr ""
msgid "argsort argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr ""
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr ""
@@ -2033,15 +2069,23 @@ msgstr ""
msgid "argument should be a '%q' not a '%q'"
msgstr ""
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr ""
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr ""
@@ -2050,15 +2094,15 @@ msgid "attributes not supported yet"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
+msgid "axis is out of bounds"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
+msgid "axis must be None, or an integer"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
+msgid "axis too long"
msgstr ""
#: py/builtinevex.c
@@ -2262,6 +2306,10 @@ msgid ""
"can't switch from manual field specification to automatic field numbering"
msgstr ""
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr ""
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr ""
@@ -2278,10 +2326,6 @@ msgstr ""
msgid "cannot perform relative import"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr ""
-
#: py/emitnative.c
msgid "casting"
msgstr ""
@@ -2354,10 +2398,6 @@ msgstr ""
msgid "convolve arguments must not be empty"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr ""
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr ""
@@ -2366,6 +2406,10 @@ msgstr ""
msgid "couldn't determine SD card version"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "cross is defined for 1D arrays of length 3"
+msgstr ""
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr ""
@@ -2374,10 +2418,6 @@ msgstr ""
msgid "data must be of equal length"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr ""
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr ""
@@ -2407,6 +2447,10 @@ msgstr ""
msgid "diff argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr ""
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2522,6 +2566,10 @@ msgstr ""
msgid "first argument must be a function"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "first argument must be a tuple of ndarrays"
+msgstr ""
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr ""
@@ -2575,8 +2623,8 @@ msgstr ""
msgid "function has the same sign at the ends of interval"
msgstr ""
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
msgstr ""
#: py/argcheck.c
@@ -2646,6 +2694,7 @@ msgstr ""
msgid "index is out of bounds"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr ""
@@ -2670,6 +2719,10 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "input and output shapes are not compatible"
+msgstr ""
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@@ -2678,6 +2731,10 @@ msgstr ""
msgid "input array length must be power of 2"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "input arrays are not compatible"
+msgstr ""
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr ""
@@ -2690,6 +2747,22 @@ msgstr ""
msgid "input matrix is singular"
msgstr ""
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr ""
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr ""
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr ""
@@ -2702,6 +2775,10 @@ msgstr ""
msgid "input vectors must be of equal length"
msgstr ""
+#: extmod/ulab/code/poly/poly.c
+msgid "inputs are not iterable"
+msgstr ""
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr ""
@@ -2836,6 +2913,10 @@ msgstr ""
msgid "long int not supported in this build"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr ""
+
#: py/parse.c
msgid "malformed f-string"
msgstr ""
@@ -2866,10 +2947,22 @@ msgstr ""
msgid "max_length must be > 0"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr ""
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr ""
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr ""
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr ""
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -2907,10 +3000,6 @@ msgstr ""
msgid "must use keyword argument for key function"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr ""
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr ""
@@ -2993,6 +3082,10 @@ msgstr ""
msgid "non-keyword arg after keyword arg"
msgstr ""
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr ""
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr ""
@@ -3005,10 +3098,6 @@ msgstr ""
msgid "not enough arguments for format string"
msgstr ""
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr ""
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr ""
@@ -3061,6 +3150,10 @@ msgstr ""
msgid "odd-length string"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr ""
+
#: py/objstr.c py/objstrunicode.c
msgid "offset out of bounds"
msgstr ""
@@ -3083,6 +3176,14 @@ msgstr ""
msgid "operands could not be broadcast together"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "operation is implemented for 1D Boolean arrays only"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr ""
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr ""
@@ -3173,6 +3274,7 @@ msgstr ""
msgid "pow() with 3 arguments requires integers"
msgstr ""
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3180,6 +3282,8 @@ msgstr ""
#: ports/esp32s2/boards/espressif_saola_1_wrover/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
+#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
msgid "pressing boot button at start up.\n"
@@ -3214,6 +3318,10 @@ msgstr ""
msgid "requested length %d but object has length %d"
msgstr ""
+#: extmod/ulab/code/ndarray_operators.c
+msgid "results cannot be cast to specified type"
+msgstr ""
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr ""
@@ -3232,8 +3340,8 @@ msgstr ""
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
msgstr ""
#: py/objstr.c
@@ -3259,7 +3367,7 @@ msgid "script compilation not supported"
msgstr ""
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
+msgid "shape must be a tuple"
msgstr ""
#: py/objstr.c
@@ -3382,6 +3490,7 @@ msgstr ""
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@@ -3406,6 +3515,10 @@ msgstr ""
msgid "timestamp out of range for platform time_t"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "tobytes can be invoked for dense arrays only"
+msgstr ""
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr ""
@@ -3431,6 +3544,16 @@ msgstr ""
msgid "tuple/list has wrong length"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr ""
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr ""
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3555,6 +3678,10 @@ msgstr ""
msgid "vectors must have same lengths"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr ""
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""
@@ -3567,12 +3694,12 @@ msgstr ""
msgid "window must be <= interval"
msgstr ""
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
msgstr ""
#: extmod/ulab/code/vector/vectorise.c
diff --git a/locale/it_IT.po b/locale/it_IT.po
index 9ed3bb1e1..bb77d71cc 100644
--- a/locale/it_IT.po
+++ b/locale/it_IT.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-16 19:50-0500\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n"
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
"Language-Team: \n"
@@ -288,11 +288,22 @@ msgstr "la palette deve essere lunga 32 byte"
msgid "Address type out of range"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr ""
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "Tutte le periferiche I2C sono in uso"
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr ""
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr ""
@@ -324,6 +335,7 @@ msgstr "Tutti i timer per questo pin sono in uso"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -410,6 +422,10 @@ msgstr ""
"L'auto-reload è attivo. Salva i file su USB per eseguirli o entra nel REPL "
"per disabilitarlo.\n"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr ""
+
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate"
@@ -420,6 +436,11 @@ msgid "Bit clock and word select must share a clock unit"
msgstr ""
"Clock di bit e selezione parola devono condividere la stessa unità di clock"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr ""
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "La profondità di bit deve essere multipla di 8."
@@ -785,7 +806,7 @@ msgstr ""
msgid "ECB only operates on 16 bytes at a time"
msgstr ""
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
msgstr ""
@@ -848,6 +869,10 @@ msgstr ""
msgid "FFT is defined for ndarrays only"
msgstr ""
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr ""
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
msgstr ""
@@ -913,6 +938,7 @@ msgid "File exists"
msgstr "File esistente"
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
msgstr ""
@@ -992,6 +1018,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@@ -1073,6 +1103,7 @@ msgid "Invalid byteorder string"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr "periodo di cattura invalido. Zona valida: 1 - 500"
@@ -1115,7 +1146,8 @@ msgid "Invalid phase"
msgstr "Fase non valida"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Pin non valido"
@@ -1135,7 +1167,7 @@ msgstr "Pin non valido per il canale destro"
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1251,6 +1283,10 @@ msgstr ""
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr ""
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr ""
+
#: py/parse.c
msgid "Name too long"
msgstr ""
@@ -1405,14 +1441,14 @@ msgstr "operazione I2C non supportata"
msgid "Only 8 or 16 bit mono with "
msgstr ""
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr ""
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr ""
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
#, c-format
msgid ""
@@ -1960,7 +1996,7 @@ msgstr ""
msgid "WARNING: Your code filename has two extensions\n"
msgstr "ATTENZIONE: Il nome del sorgente ha due estensioni\n"
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
@@ -2039,10 +2075,6 @@ msgstr "indirizzo fuori limite"
msgid "addresses is empty"
msgstr "gli indirizzi sono vuoti"
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr ""
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr "l'argomento è una sequenza vuota"
@@ -2051,6 +2083,10 @@ msgstr "l'argomento è una sequenza vuota"
msgid "argsort argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr ""
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr "il tipo dell'argomento è errato"
@@ -2068,15 +2104,23 @@ msgstr "discrepanza di numero/tipo di argomenti"
msgid "argument should be a '%q' not a '%q'"
msgstr "l'argomento dovrebbe essere un '%q' e non un '%q'"
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr ""
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr ""
@@ -2085,15 +2129,15 @@ msgid "attributes not supported yet"
msgstr "attributi non ancora supportati"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
+msgid "axis is out of bounds"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
+msgid "axis must be None, or an integer"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
+msgid "axis too long"
msgstr ""
#: py/builtinevex.c
@@ -2301,6 +2345,10 @@ msgid ""
"can't switch from manual field specification to automatic field numbering"
msgstr ""
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr ""
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr "creare '%q' istanze"
@@ -2317,10 +2365,6 @@ msgstr "impossibile imporate il nome %q"
msgid "cannot perform relative import"
msgstr "impossibile effettuare l'importazione relativa"
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr ""
-
#: py/emitnative.c
msgid "casting"
msgstr "casting"
@@ -2395,10 +2439,6 @@ msgstr ""
msgid "convolve arguments must not be empty"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr ""
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr ""
@@ -2407,6 +2447,10 @@ msgstr ""
msgid "couldn't determine SD card version"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "cross is defined for 1D arrays of length 3"
+msgstr ""
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr ""
@@ -2415,10 +2459,6 @@ msgstr ""
msgid "data must be of equal length"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr ""
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr "numeri decimali non supportati"
@@ -2451,6 +2491,10 @@ msgstr "sequanza di aggiornamento del dizionario ha la lunghezza errata"
msgid "diff argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr ""
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2567,6 +2611,10 @@ msgstr ""
msgid "first argument must be a function"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "first argument must be a tuple of ndarrays"
+msgstr ""
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr ""
@@ -2620,8 +2668,8 @@ msgstr "la funzione ha ricevuto valori multipli per l'argomento '%q'"
msgid "function has the same sign at the ends of interval"
msgstr ""
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
msgstr ""
#: py/argcheck.c
@@ -2692,6 +2740,7 @@ msgstr "padding incorretto"
msgid "index is out of bounds"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "indice fuori intervallo"
@@ -2716,6 +2765,10 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr "inline assembler deve essere una funzione"
+#: extmod/ulab/code/ndarray.c
+msgid "input and output shapes are not compatible"
+msgstr ""
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@@ -2724,6 +2777,10 @@ msgstr ""
msgid "input array length must be power of 2"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "input arrays are not compatible"
+msgstr ""
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr ""
@@ -2736,6 +2793,22 @@ msgstr ""
msgid "input matrix is singular"
msgstr ""
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr ""
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr ""
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr ""
@@ -2748,6 +2821,10 @@ msgstr ""
msgid "input vectors must be of equal length"
msgstr ""
+#: extmod/ulab/code/poly/poly.c
+msgid "inputs are not iterable"
+msgstr ""
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr "il secondo argomanto di int() deve essere >= 2 e <= 36"
@@ -2887,6 +2964,10 @@ msgstr "variabile locale richiamata prima di un assegnamento"
msgid "long int not supported in this build"
msgstr "long int non supportata in questa build"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr ""
+
#: py/parse.c
msgid "malformed f-string"
msgstr ""
@@ -2917,10 +2998,22 @@ msgstr ""
msgid "max_length must be > 0"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr ""
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "profondità massima di ricorsione superata"
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr ""
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr ""
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -2958,10 +3051,6 @@ msgstr "deve lanciare un oggetto"
msgid "must use keyword argument for key function"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr ""
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr "nome '%q'non definito"
@@ -3045,6 +3134,10 @@ msgstr "argomento non nominato dopo */**"
msgid "non-keyword arg after keyword arg"
msgstr "argomento non nominato seguito da argomento nominato"
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr ""
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr ""
@@ -3059,10 +3152,6 @@ msgstr ""
msgid "not enough arguments for format string"
msgstr "argomenti non sufficienti per la stringa di formattazione"
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr ""
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr ""
@@ -3115,6 +3204,10 @@ msgstr ""
msgid "odd-length string"
msgstr "stringa di lunghezza dispari"
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr ""
+
#: py/objstr.c py/objstrunicode.c
#, fuzzy
msgid "offset out of bounds"
@@ -3138,6 +3231,14 @@ msgstr "solo slice con step=1 (aka None) sono supportate"
msgid "operands could not be broadcast together"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "operation is implemented for 1D Boolean arrays only"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr ""
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr ""
@@ -3231,6 +3332,7 @@ msgstr "il terzo argomento di pow() non può essere 0"
msgid "pow() with 3 arguments requires integers"
msgstr "pow() con 3 argomenti richiede interi"
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3238,6 +3340,8 @@ msgstr "pow() con 3 argomenti richiede interi"
#: ports/esp32s2/boards/espressif_saola_1_wrover/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
+#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
msgid "pressing boot button at start up.\n"
@@ -3272,6 +3376,10 @@ msgstr "importazione relativa"
msgid "requested length %d but object has length %d"
msgstr "lunghezza %d richiesta ma l'oggetto ha lunghezza %d"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "results cannot be cast to specified type"
+msgstr ""
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr ""
@@ -3290,8 +3398,8 @@ msgstr ""
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
msgstr ""
#: py/objstr.c
@@ -3319,7 +3427,7 @@ msgid "script compilation not supported"
msgstr "compilazione dello scrip non suportata"
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
+msgid "shape must be a tuple"
msgstr ""
#: py/objstr.c
@@ -3443,6 +3551,7 @@ msgstr "la soglia deve essere nell'intervallo 0-65536"
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@@ -3468,6 +3577,10 @@ msgstr ""
msgid "timestamp out of range for platform time_t"
msgstr "timestamp è fuori intervallo per il time_t della piattaforma"
+#: extmod/ulab/code/ndarray.c
+msgid "tobytes can be invoked for dense arrays only"
+msgstr ""
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr "troppi argomenti forniti con il formato specificato"
@@ -3493,6 +3606,16 @@ msgstr "indice della tupla fuori intervallo"
msgid "tuple/list has wrong length"
msgstr "tupla/lista ha la lunghezza sbagliata"
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr ""
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr ""
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3617,6 +3740,10 @@ msgstr ""
msgid "vectors must have same lengths"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr ""
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""
@@ -3629,12 +3756,12 @@ msgstr ""
msgid "window must be <= interval"
msgstr ""
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
msgstr ""
#: extmod/ulab/code/vector/vectorise.c
diff --git a/locale/ja.po b/locale/ja.po
index 8c3751c8e..bacf0df81 100644
--- a/locale/ja.po
+++ b/locale/ja.po
@@ -7,16 +7,16 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-16 19:50-0500\n"
-"PO-Revision-Date: 2020-09-25 18:20+0000\n"
-"Last-Translator: Taku Fukada <naninunenor@gmail.com>\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
+"PO-Revision-Date: 2020-11-27 18:34+0000\n"
+"Last-Translator: sporeball <sporeballdev@gmail.com>\n"
"Language-Team: none\n"
"Language: ja\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.3-dev\n"
+"X-Generator: Weblate 4.4-dev\n"
#: main.c
msgid ""
@@ -162,12 +162,12 @@ msgstr "'%s' にはラベルが必要"
#: py/emitinlinethumb.c py/emitinlinextensa.c
#, c-format
msgid "'%s' expects a register"
-msgstr ""
+msgstr "'%s'にはレジスタが必要"
#: py/emitinlinethumb.c
#, c-format
msgid "'%s' expects a special register"
-msgstr ""
+msgstr "'%s'には特別レジスタが必要"
#: py/emitinlinethumb.c
#, c-format
@@ -182,7 +182,7 @@ msgstr ""
#: py/emitinlinethumb.c py/emitinlinextensa.c
#, c-format
msgid "'%s' expects an integer"
-msgstr ""
+msgstr "'%s' には整数が必要"
#: py/emitinlinethumb.c
#, c-format
@@ -192,7 +192,7 @@ msgstr ""
#: py/emitinlinethumb.c
#, c-format
msgid "'%s' expects {r0, r1, ...}"
-msgstr ""
+msgstr "'%s'には{r0, r1, ...}が必要"
#: py/emitinlinextensa.c
#, c-format
@@ -246,7 +246,7 @@ msgstr "'data'には整数の引数が必要"
#: py/compile.c
msgid "'label' requires 1 argument"
-msgstr ""
+msgstr "'label'には1つの引数が必要"
#: py/compile.c
msgid "'return' outside function"
@@ -294,11 +294,22 @@ msgstr "アドレスは、%dバイト長でなければなりません"
msgid "Address type out of range"
msgstr "address_typeが範囲外"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr "全てのCAN周辺機器が使用中"
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "全てのI2C周辺機器が使用中"
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr ""
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr "全てのRX FIFOが使用中"
@@ -329,6 +340,7 @@ msgstr "このピン用の全てのタイマが使用中"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -415,6 +427,10 @@ msgstr ""
"オートリロードがオンです。ファイルをUSB経由で保存するだけで実行できます。REPL"
"に入ると無効化します。\n"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr ""
+
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate"
@@ -424,6 +440,11 @@ msgstr "最低のフレームレート未満"
msgid "Bit clock and word select must share a clock unit"
msgstr "bit clockとword selectはクロックユニットを共有しなければなりません"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr ""
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "ビット深度は8の倍数でなければなりません"
@@ -787,7 +808,7 @@ msgstr "方向がinputのときドライブモードは使われません"
msgid "ECB only operates on 16 bytes at a time"
msgstr "ECBは一度に16バイトの演算のみを行います"
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
msgstr ""
@@ -812,19 +833,19 @@ msgstr "%qが必要"
#: shared-bindings/_bleio/CharacteristicBuffer.c
#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c
msgid "Expected a Characteristic"
-msgstr ""
+msgstr "Characteristicが必要"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a DigitalInOut"
-msgstr ""
+msgstr "DigitalInOutが必要"
#: shared-bindings/_bleio/Characteristic.c
msgid "Expected a Service"
-msgstr ""
+msgstr "Serviceが必要"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected a UART"
-msgstr ""
+msgstr "UARTが必要"
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
#: shared-bindings/_bleio/Service.c
@@ -833,7 +854,7 @@ msgstr "UUIDが必要"
#: shared-bindings/_bleio/Adapter.c
msgid "Expected an Address"
-msgstr ""
+msgstr "Addressが必要"
#: shared-module/_pixelbuf/PixelBuf.c
#, c-format
@@ -848,6 +869,10 @@ msgstr ""
msgid "FFT is defined for ndarrays only"
msgstr "FFTはndarrayでのみ使えます"
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr ""
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
msgstr ""
@@ -877,7 +902,7 @@ msgstr "%dバイトのRXバッファの確保に失敗"
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Failed to allocate Wifi memory"
-msgstr ""
+msgstr "Wi-Fiのメモリの確保に失敗"
#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c
msgid "Failed to allocate wifi scan memory"
@@ -913,6 +938,7 @@ msgid "File exists"
msgstr "ファイルが存在します"
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
msgstr ""
@@ -992,6 +1018,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "バッファサイズが正しくありません"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@@ -1042,7 +1072,7 @@ msgstr "不正なBMPファイル"
#: shared-bindings/wifi/Radio.c
msgid "Invalid BSSID"
-msgstr ""
+msgstr "不正なBSSID"
#: ports/esp32s2/common-hal/analogio/AnalogOut.c
#: ports/stm/common-hal/analogio/AnalogOut.c
@@ -1072,6 +1102,7 @@ msgid "Invalid byteorder string"
msgstr "不正なバイトオーダー文字列"
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr "不正なキャプチャ周期。有効な周期は1-500"
@@ -1093,7 +1124,7 @@ msgstr "フォーマットチャンクのサイズが不正"
#: ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency"
-msgstr ""
+msgstr "不正な周波数"
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency supplied"
@@ -1113,7 +1144,8 @@ msgid "Invalid phase"
msgstr "不正なphase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "不正なピン"
@@ -1133,7 +1165,7 @@ msgstr "右チャネルのピンが不正"
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1247,6 +1279,10 @@ msgstr "MISOピンまたはMOSIピンが必要"
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "%d個でなく6の倍数個のrgbピンを使ってください"
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr ""
+
#: py/parse.c
msgid "Name too long"
msgstr "名前が長すぎます"
@@ -1328,11 +1364,11 @@ msgstr "long integerに対応していません"
#: ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "No more channels available"
-msgstr ""
+msgstr "使えるチャネルがもうありません"
#: ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "No more timers available"
-msgstr ""
+msgstr "使えるタイマーがもうありません"
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "No more timers available on this pin."
@@ -1399,14 +1435,14 @@ msgstr "奇数パリティには対応していません"
msgid "Only 8 or 16 bit mono with "
msgstr "8または16ビットの "
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr ""
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr ""
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
#, c-format
msgid ""
@@ -1648,7 +1684,7 @@ msgstr ""
#: ports/cxd56/common-hal/camera/Camera.c
msgid "Size not supported"
-msgstr ""
+msgstr "サイズは対応していません"
#: shared-bindings/nvm/ByteArray.c
msgid "Slice and value different lengths."
@@ -1950,7 +1986,7 @@ msgstr "電圧読み取りがタイムアウト"
msgid "WARNING: Your code filename has two extensions\n"
msgstr ""
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
@@ -2029,10 +2065,6 @@ msgstr "アドレスが範囲外"
msgid "addresses is empty"
msgstr ""
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr ""
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr ""
@@ -2041,6 +2073,10 @@ msgstr ""
msgid "argsort argument must be an ndarray"
msgstr "argsortの引数はndarrayでなければなりません"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr ""
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr ""
@@ -2058,15 +2094,23 @@ msgstr ""
msgid "argument should be a '%q' not a '%q'"
msgstr "引数には '%q' が必要('%q' ではなく)"
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr "引数はndarrayでなければなりません"
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr ""
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr "右辺にはarray/bytesが必要"
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr ""
@@ -2075,16 +2119,16 @@ msgid "attributes not supported yet"
msgstr "属性は未対応です"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
-msgstr "axisは -1, 0, 1, None のいずれかでなければなりません"
+msgid "axis is out of bounds"
+msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
-msgstr "axisは -1, 0, 1 のいずれかでなければなりません"
+msgid "axis must be None, or an integer"
+msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
-msgstr "axisは None, 0, 1 のいずれか"
+msgid "axis too long"
+msgstr ""
#: py/builtinevex.c
msgid "bad compile mode"
@@ -2287,6 +2331,10 @@ msgid ""
"can't switch from manual field specification to automatic field numbering"
msgstr "手動と自動のフィールド指定は混在できません"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr ""
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr ""
@@ -2303,10 +2351,6 @@ msgstr ""
msgid "cannot perform relative import"
msgstr "相対インポートはできません"
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr "入力/出力シェイプが互換でなくreshapeできません"
-
#: py/emitnative.c
msgid "casting"
msgstr ""
@@ -2381,10 +2425,6 @@ msgstr "convolve引数はndarrayでなければなりません"
msgid "convolve arguments must not be empty"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr ""
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr "ヴァンデルモンド行列の逆行列を求められません"
@@ -2393,6 +2433,10 @@ msgstr "ヴァンデルモンド行列の逆行列を求められません"
msgid "couldn't determine SD card version"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "cross is defined for 1D arrays of length 3"
+msgstr ""
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr "dataはイテレート可能でなければなりません"
@@ -2401,10 +2445,6 @@ msgstr "dataはイテレート可能でなければなりません"
msgid "data must be of equal length"
msgstr "dataは同じ長さでなければなりません"
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr ""
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr ""
@@ -2436,6 +2476,10 @@ msgstr ""
msgid "diff argument must be an ndarray"
msgstr "引数はndarrayでなければなりません"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr ""
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2551,6 +2595,10 @@ msgstr "1つ目の引数は呼び出し可能でなければなりません"
msgid "first argument must be a function"
msgstr "1つ目の引数は関数でなければなりません"
+#: extmod/ulab/code/ulab_create.c
+msgid "first argument must be a tuple of ndarrays"
+msgstr ""
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr "1つ目の引数はイテレート可能でなければなりません"
@@ -2604,9 +2652,9 @@ msgstr ""
msgid "function has the same sign at the ends of interval"
msgstr ""
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
-msgstr "スカラ値およびndarrayのみを受け取ります"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
+msgstr ""
#: py/argcheck.c
#, c-format
@@ -2675,6 +2723,7 @@ msgstr ""
msgid "index is out of bounds"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "インデクスが範囲外"
@@ -2700,6 +2749,10 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr "インラインアセンブラは関数でなければなりません"
+#: extmod/ulab/code/ndarray.c
+msgid "input and output shapes are not compatible"
+msgstr ""
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@@ -2708,6 +2761,10 @@ msgstr ""
msgid "input array length must be power of 2"
msgstr "入力array長は2の累乗でなければなりません"
+#: extmod/ulab/code/ulab_create.c
+msgid "input arrays are not compatible"
+msgstr ""
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr ""
@@ -2720,6 +2777,22 @@ msgstr "入力行列が非対称"
msgid "input matrix is singular"
msgstr "入力が非正則行列"
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr ""
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr ""
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr "入力は正方行列でなければなりません"
@@ -2732,6 +2805,10 @@ msgstr "入力はtuple, list, range, ndarrayでなければなりません"
msgid "input vectors must be of equal length"
msgstr ""
+#: extmod/ulab/code/poly/poly.c
+msgid "inputs are not iterable"
+msgstr ""
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr "int()の第2引数は2以上36以下でなければなりません"
@@ -2771,7 +2848,7 @@ msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "invalid hostname"
-msgstr ""
+msgstr "不正なホスト名"
#: extmod/modussl_axtls.c
msgid "invalid key"
@@ -2866,6 +2943,10 @@ msgstr ""
msgid "long int not supported in this build"
msgstr "このビルドはlong intに非対応"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr ""
+
#: py/parse.c
msgid "malformed f-string"
msgstr "不正な形式のf-string"
@@ -2896,10 +2977,22 @@ msgstr ""
msgid "max_length must be > 0"
msgstr "max_lengthは0より大きくなければなりません"
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr ""
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "最大の再帰深度を超えました"
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr ""
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr ""
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -2937,10 +3030,6 @@ msgstr ""
msgid "must use keyword argument for key function"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr "nは0から9まで"
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr "名前 '%q' は定義されていません"
@@ -3023,6 +3112,10 @@ msgstr "*/** の後に非キーワード引数は置けません"
msgid "non-keyword arg after keyword arg"
msgstr "キーワード引数の後に非キーワード引数は置けません"
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr ""
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr "128ビットのUUIDではありません"
@@ -3035,10 +3128,6 @@ msgstr "文字列書式化で全ての引数が使われていません"
msgid "not enough arguments for format string"
msgstr "書式化文字列への引数が足りません"
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr "引数は2個または3個でなければなりません"
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr ""
@@ -3091,6 +3180,10 @@ msgstr ""
msgid "odd-length string"
msgstr "奇数長の文字列"
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr ""
+
#: py/objstr.c py/objstrunicode.c
msgid "offset out of bounds"
msgstr ""
@@ -3113,6 +3206,14 @@ msgstr ""
msgid "operands could not be broadcast together"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "operation is implemented for 1D Boolean arrays only"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr ""
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr "この演算はndarray上で実装されていません"
@@ -3205,6 +3306,7 @@ msgstr "pow()の3つ目の引数は0にできません"
msgid "pow() with 3 arguments requires integers"
msgstr "pow()の第3引数には整数が必要"
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3212,6 +3314,8 @@ msgstr "pow()の第3引数には整数が必要"
#: ports/esp32s2/boards/espressif_saola_1_wrover/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
+#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
msgid "pressing boot button at start up.\n"
@@ -3246,6 +3350,10 @@ msgstr "相対インポート"
msgid "requested length %d but object has length %d"
msgstr "必要な長さは%dですがオブジェクトの長さは%d"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "results cannot be cast to specified type"
+msgstr ""
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr "戻り値のアノテーションは識別子でなければなりません"
@@ -3264,9 +3372,9 @@ msgstr ""
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "rgb_pins[%d]はクロックと同じポートではありません"
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
-msgstr "右辺は ndarray またはスカラ値でなければなりません"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
+msgstr ""
#: py/objstr.c
msgid "rsplit(None,n)"
@@ -3292,8 +3400,8 @@ msgid "script compilation not supported"
msgstr "スクリプトのコンパイルは非対応"
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
-msgstr "shapeは2値のタプルでなければなりません"
+msgid "shape must be a tuple"
+msgstr ""
#: py/objstr.c
msgid "sign not allowed in string format specifier"
@@ -3415,6 +3523,7 @@ msgstr "threshouldは0から65536まで"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time()は9要素のシーケンスを受け取ります"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr "タイムアウト長は対応する最大値を超えています"
@@ -3439,6 +3548,10 @@ msgstr "v2カードの待機がタイムアウトしました"
msgid "timestamp out of range for platform time_t"
msgstr "timestampがプラットフォームのtime_tの範囲外"
+#: extmod/ulab/code/ndarray.c
+msgid "tobytes can be invoked for dense arrays only"
+msgstr ""
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr "指定された書式に対して引数が多すぎます"
@@ -3464,6 +3577,16 @@ msgstr ""
msgid "tuple/list has wrong length"
msgstr "タプル/リストの長さが正しくありません"
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr ""
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr ""
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3588,6 +3711,10 @@ msgstr "value_countは0より大きくなければなりません"
msgid "vectors must have same lengths"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr ""
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr "watchdogのtimeoutは0以上でなければなりません"
@@ -3600,13 +3727,13 @@ msgstr ""
msgid "window must be <= interval"
msgstr "windowはinterval以下でなければなりません"
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
-msgstr "引数の型が不正"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
+msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
-msgstr "インデクスの型が不正"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
+msgstr ""
#: extmod/ulab/code/vector/vectorise.c
msgid "wrong input type"
@@ -3630,7 +3757,7 @@ msgstr ""
#: shared-module/displayio/Shape.c
msgid "x value out of bounds"
-msgstr ""
+msgstr "xが範囲外"
#: shared-bindings/displayio/Shape.c
msgid "y should be an int"
@@ -3656,6 +3783,39 @@ msgstr "ziはfloat値でなければなりません"
msgid "zi must be of shape (n_section, 2)"
msgstr ""
+#~ msgid "axis must be -1, 0, None, or 1"
+#~ msgstr "axisは -1, 0, 1, None のいずれかでなければなりません"
+
+#~ msgid "axis must be -1, 0, or 1"
+#~ msgstr "axisは -1, 0, 1 のいずれかでなければなりません"
+
+#~ msgid "axis must be None, 0, or 1"
+#~ msgstr "axisは None, 0, 1 のいずれか"
+
+#~ msgid "cannot reshape array (incompatible input/output shape)"
+#~ msgstr "入力/出力シェイプが互換でなくreshapeできません"
+
+#~ msgid "function is implemented for scalars and ndarrays only"
+#~ msgstr "スカラ値およびndarrayのみを受け取ります"
+
+#~ msgid "n must be between 0, and 9"
+#~ msgstr "nは0から9まで"
+
+#~ msgid "number of arguments must be 2, or 3"
+#~ msgstr "引数は2個または3個でなければなりません"
+
+#~ msgid "right hand side must be an ndarray, or a scalar"
+#~ msgstr "右辺は ndarray またはスカラ値でなければなりません"
+
+#~ msgid "shape must be a 2-tuple"
+#~ msgstr "shapeは2値のタプルでなければなりません"
+
+#~ msgid "wrong argument type"
+#~ msgstr "引数の型が不正"
+
+#~ msgid "wrong index type"
+#~ msgstr "インデクスの型が不正"
+
#~ msgid "Must provide SCK pin"
#~ msgstr "SCKピンが必要"
diff --git a/locale/ko.po b/locale/ko.po
index 9c5750b9f..9e6cbb0c2 100644
--- a/locale/ko.po
+++ b/locale/ko.po
@@ -6,7 +6,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-16 19:50-0500\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
"PO-Revision-Date: 2020-10-05 12:12+0000\n"
"Last-Translator: Michal Čihař <michal@cihar.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -290,11 +290,22 @@ msgstr ""
msgid "Address type out of range"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr ""
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "사용중인 모든 I2C주변 기기"
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr ""
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr ""
@@ -325,6 +336,7 @@ msgstr "핀의 모든 타이머가 사용 중입니다"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -411,6 +423,10 @@ msgstr ""
"자동 새로 고침이 켜져 있습니다. USB를 통해 파일을 저장하여 실행하십시오. 비활"
"성화하려면 REPL을 입력하십시오.\n"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr ""
+
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate"
@@ -420,6 +436,11 @@ msgstr ""
msgid "Bit clock and word select must share a clock unit"
msgstr ""
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr ""
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr ""
@@ -779,7 +800,7 @@ msgstr ""
msgid "ECB only operates on 16 bytes at a time"
msgstr ""
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
msgstr ""
@@ -840,6 +861,10 @@ msgstr ""
msgid "FFT is defined for ndarrays only"
msgstr ""
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr ""
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
msgstr ""
@@ -905,6 +930,7 @@ msgid "File exists"
msgstr ""
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
msgstr ""
@@ -982,6 +1008,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@@ -1062,6 +1092,7 @@ msgid "Invalid byteorder string"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr ""
@@ -1103,7 +1134,8 @@ msgid "Invalid phase"
msgstr "단계가 잘못되었습니다"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "핀이 잘못되었습니다"
@@ -1123,7 +1155,7 @@ msgstr "오른쪽 채널 핀이 잘못되었습니다"
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1237,6 +1269,10 @@ msgstr ""
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr ""
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr ""
+
#: py/parse.c
msgid "Name too long"
msgstr ""
@@ -1387,14 +1423,14 @@ msgstr ""
msgid "Only 8 or 16 bit mono with "
msgstr ""
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr ""
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr ""
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
#, c-format
msgid ""
@@ -1931,7 +1967,7 @@ msgstr ""
msgid "WARNING: Your code filename has two extensions\n"
msgstr ""
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
@@ -2010,10 +2046,6 @@ msgstr ""
msgid "addresses is empty"
msgstr ""
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr ""
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr ""
@@ -2022,6 +2054,10 @@ msgstr ""
msgid "argsort argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr ""
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr ""
@@ -2039,15 +2075,23 @@ msgstr ""
msgid "argument should be a '%q' not a '%q'"
msgstr ""
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr ""
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr ""
@@ -2056,15 +2100,15 @@ msgid "attributes not supported yet"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
+msgid "axis is out of bounds"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
+msgid "axis must be None, or an integer"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
+msgid "axis too long"
msgstr ""
#: py/builtinevex.c
@@ -2268,6 +2312,10 @@ msgid ""
"can't switch from manual field specification to automatic field numbering"
msgstr ""
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr ""
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr ""
@@ -2284,10 +2332,6 @@ msgstr ""
msgid "cannot perform relative import"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr ""
-
#: py/emitnative.c
msgid "casting"
msgstr ""
@@ -2360,10 +2404,6 @@ msgstr ""
msgid "convolve arguments must not be empty"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr ""
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr ""
@@ -2372,6 +2412,10 @@ msgstr ""
msgid "couldn't determine SD card version"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "cross is defined for 1D arrays of length 3"
+msgstr ""
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr ""
@@ -2380,10 +2424,6 @@ msgstr ""
msgid "data must be of equal length"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr ""
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr ""
@@ -2413,6 +2453,10 @@ msgstr ""
msgid "diff argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr ""
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2528,6 +2572,10 @@ msgstr ""
msgid "first argument must be a function"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "first argument must be a tuple of ndarrays"
+msgstr ""
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr ""
@@ -2581,8 +2629,8 @@ msgstr ""
msgid "function has the same sign at the ends of interval"
msgstr ""
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
msgstr ""
#: py/argcheck.c
@@ -2652,6 +2700,7 @@ msgstr ""
msgid "index is out of bounds"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr ""
@@ -2676,6 +2725,10 @@ msgstr ""
msgid "inline assembler must be a function"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "input and output shapes are not compatible"
+msgstr ""
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@@ -2684,6 +2737,10 @@ msgstr ""
msgid "input array length must be power of 2"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "input arrays are not compatible"
+msgstr ""
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr ""
@@ -2696,6 +2753,22 @@ msgstr ""
msgid "input matrix is singular"
msgstr ""
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr ""
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr ""
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr ""
@@ -2708,6 +2781,10 @@ msgstr ""
msgid "input vectors must be of equal length"
msgstr ""
+#: extmod/ulab/code/poly/poly.c
+msgid "inputs are not iterable"
+msgstr ""
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr ""
@@ -2842,6 +2919,10 @@ msgstr ""
msgid "long int not supported in this build"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr ""
+
#: py/parse.c
msgid "malformed f-string"
msgstr ""
@@ -2872,10 +2953,22 @@ msgstr ""
msgid "max_length must be > 0"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr ""
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr ""
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr ""
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr ""
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -2913,10 +3006,6 @@ msgstr ""
msgid "must use keyword argument for key function"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr ""
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr ""
@@ -2999,6 +3088,10 @@ msgstr ""
msgid "non-keyword arg after keyword arg"
msgstr ""
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr ""
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr ""
@@ -3011,10 +3104,6 @@ msgstr ""
msgid "not enough arguments for format string"
msgstr ""
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr ""
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr ""
@@ -3067,6 +3156,10 @@ msgstr ""
msgid "odd-length string"
msgstr ""
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr ""
+
#: py/objstr.c py/objstrunicode.c
msgid "offset out of bounds"
msgstr ""
@@ -3089,6 +3182,14 @@ msgstr ""
msgid "operands could not be broadcast together"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "operation is implemented for 1D Boolean arrays only"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr ""
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr ""
@@ -3179,6 +3280,7 @@ msgstr ""
msgid "pow() with 3 arguments requires integers"
msgstr ""
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3186,6 +3288,8 @@ msgstr ""
#: ports/esp32s2/boards/espressif_saola_1_wrover/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
+#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
msgid "pressing boot button at start up.\n"
@@ -3220,6 +3324,10 @@ msgstr ""
msgid "requested length %d but object has length %d"
msgstr ""
+#: extmod/ulab/code/ndarray_operators.c
+msgid "results cannot be cast to specified type"
+msgstr ""
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr ""
@@ -3238,8 +3346,8 @@ msgstr ""
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
msgstr ""
#: py/objstr.c
@@ -3265,7 +3373,7 @@ msgid "script compilation not supported"
msgstr ""
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
+msgid "shape must be a tuple"
msgstr ""
#: py/objstr.c
@@ -3388,6 +3496,7 @@ msgstr ""
msgid "time.struct_time() takes a 9-sequence"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@@ -3412,6 +3521,10 @@ msgstr ""
msgid "timestamp out of range for platform time_t"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "tobytes can be invoked for dense arrays only"
+msgstr ""
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr ""
@@ -3437,6 +3550,16 @@ msgstr ""
msgid "tuple/list has wrong length"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr ""
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr ""
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3561,6 +3684,10 @@ msgstr ""
msgid "vectors must have same lengths"
msgstr ""
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr ""
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""
@@ -3573,12 +3700,12 @@ msgstr ""
msgid "window must be <= interval"
msgstr ""
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
msgstr ""
#: extmod/ulab/code/vector/vectorise.c
diff --git a/locale/nl.po b/locale/nl.po
index ca7530c0f..41a3ace76 100644
--- a/locale/nl.po
+++ b/locale/nl.po
@@ -5,8 +5,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-16 19:50-0500\n"
-"PO-Revision-Date: 2020-09-09 16:05+0000\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
+"PO-Revision-Date: 2020-10-27 16:47+0000\n"
"Last-Translator: Jelle Jager <jell@jjc.id.au>\n"
"Language-Team: none\n"
"Language: nl\n"
@@ -14,7 +14,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.3-dev\n"
+"X-Generator: Weblate 4.3.2-dev\n"
#: main.c
msgid ""
@@ -98,7 +98,7 @@ msgstr "%q moet een tuple van lengte 2 zijn"
#: shared-bindings/canio/Match.c
msgid "%q out of range"
-msgstr ""
+msgstr "%q buiten bereik"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
msgid "%q pin invalid"
@@ -252,7 +252,7 @@ msgstr "'return' buiten de functie"
#: py/compile.c
msgid "'yield from' inside async function"
-msgstr ""
+msgstr "'yield from' binnen asynchrone functie"
#: py/compile.c
msgid "'yield' outside function"
@@ -281,7 +281,7 @@ msgstr "Een hardware interrupt kanaal is al in gebruik"
#: ports/esp32s2/common-hal/analogio/AnalogIn.c
msgid "ADC2 is being used by WiFi"
-msgstr ""
+msgstr "ADC2 wordt gebruikt door WiFi"
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
#, c-format
@@ -292,14 +292,25 @@ msgstr "Adres moet %d bytes lang zijn"
msgid "Address type out of range"
msgstr "Adres type buiten bereik"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr ""
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "Alle I2C peripherals zijn in gebruik"
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr ""
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
-msgstr ""
+msgstr "Alle RX FIFO's zijn in gebruik"
#: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c
msgid "All SPI peripherals are in use"
@@ -327,6 +338,7 @@ msgstr "Alle timers voor deze pin zijn in gebruik"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -342,7 +354,7 @@ msgstr "Advertising is al bezig."
#: ports/atmel-samd/common-hal/canio/Listener.c
msgid "Already have all-matches listener"
-msgstr ""
+msgstr "Heeft al een luisteraar voor 'all-matches'"
#: shared-module/memorymonitor/AllocationAlarm.c
#: shared-module/memorymonitor/AllocationSize.c
@@ -351,7 +363,7 @@ msgstr "Wordt al uitgevoerd"
#: ports/esp32s2/common-hal/wifi/Radio.c
msgid "Already scanning for wifi networks"
-msgstr ""
+msgstr "Zoekt al naar WiFi netwerken"
#: ports/cxd56/common-hal/analogio/AnalogIn.c
msgid "AnalogIn not supported on given pin"
@@ -399,7 +411,7 @@ msgstr "heap allocatie geprobeerd terwijl MicroPython VM niet draait."
#: shared-bindings/wifi/Radio.c
msgid "Authentication failure"
-msgstr ""
+msgstr "Authenticatiefout"
#: main.c
msgid "Auto-reload is off.\n"
@@ -413,6 +425,10 @@ msgstr ""
"Auto-herlaad staat aan. Sla bestanden simpelweg op over USB om uit te voeren "
"of start REPL om uit te schakelen.\n"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr ""
+
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate"
@@ -422,6 +438,11 @@ msgstr "Onder de minimum frame rate"
msgid "Bit clock and word select must share a clock unit"
msgstr "Bit clock en word select moeten een clock eenheid delen"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr ""
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "Bit diepte moet een meervoud van 8 zijn."
@@ -481,7 +502,7 @@ msgstr "Buffer lengte moet een veelvoud van 512 zijn"
#: ports/stm/common-hal/sdioio/SDCard.c
msgid "Buffer must be a multiple of 512 bytes"
-msgstr "Buffer moet een veelvoud van 512 zijn"
+msgstr "Buffer moet een veelvoud van 512 bytes zijn"
#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c
msgid "Buffer must be at least length 1"
@@ -617,7 +638,7 @@ msgstr ""
#: supervisor/shared/safe_mode.c
msgid "CircuitPython was unable to allocate the heap.\n"
-msgstr ""
+msgstr "CircuitPython kon het heap geheugen niet toewijzen.\n"
#: shared-module/bitbangio/SPI.c
msgid "Clock pin init failed."
@@ -658,7 +679,7 @@ msgstr "Corrupt raw code"
#: ports/cxd56/common-hal/camera/Camera.c
msgid "Could not initialize Camera"
-msgstr ""
+msgstr "Kon camera niet initialiseren"
#: ports/cxd56/common-hal/gnss/GNSS.c
msgid "Could not initialize GNSS"
@@ -695,7 +716,7 @@ msgstr "Kan PWM niet herstarten"
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
msgid "Could not retrieve clock"
-msgstr ""
+msgstr "Kon klok niet ophalen"
#: shared-bindings/_bleio/Adapter.c
msgid "Could not set address"
@@ -787,9 +808,9 @@ msgstr "Drive modus niet gebruikt als de richting input is."
msgid "ECB only operates on 16 bytes at a time"
msgstr "ECB werkt alleen met 16 bytes tegelijkertijd"
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
-msgstr ""
+msgstr "ESP-IDF geheugen toewijzing mislukt"
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
#: ports/atmel-samd/common-hal/ps2io/Ps2.c
@@ -848,9 +869,13 @@ msgstr "Extended advertisements met scan antwoord niet ondersteund."
msgid "FFT is defined for ndarrays only"
msgstr "FFT alleen voor ndarrays gedefineerd"
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr ""
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
-msgstr ""
+msgstr "SSL handdruk mislukt"
#: shared-bindings/ps2io/Ps2.c
msgid "Failed sending command."
@@ -877,11 +902,11 @@ msgstr "Mislukt een RX buffer van %d bytes te alloceren"
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Failed to allocate Wifi memory"
-msgstr ""
+msgstr "Kon WiFi geheugen niet toewijzen"
#: ports/esp32s2/common-hal/wifi/ScannedNetworks.c
msgid "Failed to allocate wifi scan memory"
-msgstr ""
+msgstr "Kon WiFi scan geheugen niet toewijzen"
#: ports/nrf/common-hal/_bleio/Adapter.c
msgid "Failed to connect: internal error"
@@ -893,7 +918,7 @@ msgstr "Verbinding mislukt: timeout"
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Failed to init wifi"
-msgstr ""
+msgstr "Kon WiFi niet initialiseren"
#: shared-module/audiomp3/MP3Decoder.c
msgid "Failed to parse MP3 file"
@@ -913,13 +938,14 @@ msgid "File exists"
msgstr "Bestand bestaat"
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
-msgstr ""
+msgstr "Filters zijn te complex"
#: ports/cxd56/common-hal/camera/Camera.c
msgid "Format not supported"
-msgstr ""
+msgstr "Formaat wordt niet ondersteund"
#: shared-module/framebufferio/FramebufferDisplay.c
#, c-format
@@ -963,7 +989,7 @@ msgstr "Hardware in gebruik, probeer alternatieve pinnen"
#: shared-bindings/wifi/Radio.c
msgid "Hostname must be between 1 and 253 characters"
-msgstr ""
+msgstr "Hostnaam moet tussen 1 en 253 karakters zijn"
#: extmod/vfs_posix_file.c py/objstringio.c
msgid "I/O operation on closed file"
@@ -994,9 +1020,13 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "Incorrecte buffer grootte"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
-msgstr ""
+msgstr "Invoer duurt te lang"
#: ports/esp32s2/common-hal/neopixel_write/__init__.c py/moduerrno.c
msgid "Input/output error"
@@ -1044,7 +1074,7 @@ msgstr "Ongeldig BMP bestand"
#: shared-bindings/wifi/Radio.c
msgid "Invalid BSSID"
-msgstr ""
+msgstr "Ongeldig BSSID"
#: ports/esp32s2/common-hal/analogio/AnalogOut.c
#: ports/stm/common-hal/analogio/AnalogOut.c
@@ -1074,6 +1104,7 @@ msgid "Invalid byteorder string"
msgstr "Ongeldige byteorder string"
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr "Ongeldige vastlegging periode. Geldig bereik: 1 - 500"
@@ -1095,7 +1126,7 @@ msgstr "Ongeldig formaat stuk grootte"
#: ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency"
-msgstr ""
+msgstr "Onjuiste frequentie"
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency supplied"
@@ -1115,7 +1146,8 @@ msgid "Invalid phase"
msgstr "Ongeldige fase"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Ongeldige pin"
@@ -1135,7 +1167,7 @@ msgstr "Ongeldige pin voor rechter kanaal"
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1218,7 +1250,7 @@ msgstr "Maximale x waarde indien gespiegeld is %d"
#: shared-bindings/canio/Message.c
msgid "Messages limited to 8 bytes"
-msgstr ""
+msgstr "Berichten zijn beperkt tot 8 bytes"
#: supervisor/shared/safe_mode.c
msgid "MicroPython NLR jump failed. Likely memory corruption."
@@ -1249,6 +1281,10 @@ msgstr "MISO of MOSI moeten worden gegeven"
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "Een meervoud van 6 rgb pinnen moet worden gebruikt, niet %d"
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr ""
+
#: py/parse.c
msgid "Name too long"
msgstr "Naam te lang"
@@ -1330,11 +1366,11 @@ msgstr "Geen lange integer ondersteuning"
#: ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "No more channels available"
-msgstr ""
+msgstr "Geen kanalen meer beschikbaar"
#: ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "No more timers available"
-msgstr ""
+msgstr "Geen timers meer beschikbaar"
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "No more timers available on this pin."
@@ -1342,7 +1378,7 @@ msgstr "Geen timers meer beschikbaar op deze pin."
#: shared-bindings/wifi/Radio.c
msgid "No network with that ssid"
-msgstr ""
+msgstr "Geen netwerk met dat SSID gevonden"
#: shared-module/touchio/TouchIn.c
msgid "No pulldown on pin; 1Mohm recommended"
@@ -1366,7 +1402,7 @@ msgstr "Nordic Soft Device assertion mislukt."
#: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c
msgid "Not a valid IP string"
-msgstr ""
+msgstr "Geen geldige IP string"
#: ports/nrf/common-hal/_bleio/__init__.c
#: shared-bindings/_bleio/CharacteristicBuffer.c
@@ -1384,7 +1420,7 @@ msgstr "Opgeslagen code wordt niet uitgevoerd.\n"
#: shared-bindings/_bleio/__init__.c
msgid "Not settable"
-msgstr ""
+msgstr "Niet instelbaar"
#: shared-bindings/util.c
msgid ""
@@ -1401,12 +1437,12 @@ msgstr "Oneven pariteit is niet ondersteund"
msgid "Only 8 or 16 bit mono with "
msgstr "Alleen 8 of 16 bit mono met "
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr ""
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
+msgstr "Alleen IPv4 adressen worden ondersteund"
+
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
msgstr ""
#: shared-module/displayio/OnDiskBitmap.c
@@ -1428,15 +1464,15 @@ msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
-msgstr ""
+msgstr "Er kan maar één kleur per keer transparant zijn"
#: shared-bindings/ipaddress/__init__.c
msgid "Only raw int supported for ip"
-msgstr ""
+msgstr "Alleen raw int ondersteund voor IP"
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
msgid "Out of sockets"
-msgstr ""
+msgstr "Geen sockets meer beschikbaar"
#: shared-bindings/audiobusio/PDMIn.c
msgid "Oversample must be multiple of 8."
@@ -1510,6 +1546,8 @@ msgid ""
"Port does not accept PWM carrier. Pass a pin, frequency and duty cycle "
"instead"
msgstr ""
+"Poort ondersteund geen PWM drager. Geef een pin, frequentie en inschakeltijd "
+"op"
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
@@ -1519,6 +1557,8 @@ msgid ""
"Port does not accept pins or frequency. Construct and pass a PWMOut Carrier "
"instead"
msgstr ""
+"Poort accepteert geen pin of frequentie. Stel een PWMOut Carrier samen en "
+"geef die op"
#: shared-bindings/_bleio/Adapter.c
msgid "Prefix buffer must be on the heap"
@@ -1584,7 +1624,7 @@ msgstr "Verversing te snel"
#: shared-bindings/canio/RemoteTransmissionRequest.c
msgid "RemoteTransmissionRequests limited to 8 bytes"
-msgstr ""
+msgstr "RemoteTransmissionRequests is beperkt tot 8 bytes"
#: shared-bindings/aesio/aes.c
msgid "Requested AES mode is unsupported"
@@ -1657,11 +1697,11 @@ msgstr "Serializer in gebruik"
#: shared-bindings/ssl/SSLContext.c
msgid "Server side context cannot have hostname"
-msgstr ""
+msgstr "Context aan de serverkant kan geen hostnaam hebben"
#: ports/cxd56/common-hal/camera/Camera.c
msgid "Size not supported"
-msgstr ""
+msgstr "Afmeting niet ondersteund"
#: shared-bindings/nvm/ByteArray.c
msgid "Slice and value different lengths."
@@ -1676,7 +1716,7 @@ msgstr "Slices niet ondersteund"
#: ports/esp32s2/common-hal/socketpool/SocketPool.c
msgid "SocketPool can only be used with wifi.radio"
-msgstr ""
+msgstr "SocketPool kan alleen met wifi.radio gebruikt worden"
#: shared-bindings/aesio/aes.c
msgid "Source and destination buffers must be the same length"
@@ -1724,7 +1764,7 @@ msgstr ""
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30"
-msgstr ""
+msgstr "De lengte van rgb_pins moet 6, 12, 18, 24 of 30 zijn"
#: supervisor/shared/safe_mode.c
msgid ""
@@ -1783,7 +1823,7 @@ msgstr ""
#: supervisor/shared/safe_mode.c
msgid "To exit, please reset the board without "
-msgstr ""
+msgstr "Om te beëindigen, reset het bord zonder "
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Too many channels in sample."
@@ -1856,7 +1896,7 @@ msgstr "Niet in staat buffers voor gesigneerde conversie te alloceren"
#: ports/esp32s2/common-hal/busio/I2C.c
msgid "Unable to create lock"
-msgstr ""
+msgstr "Kan vergrendeling niet maken"
#: shared-module/displayio/I2CDisplay.c
#, c-format
@@ -1887,11 +1927,11 @@ msgstr "Onverwacht mrfx uuid type"
#: ports/esp32s2/common-hal/socketpool/Socket.c
#, c-format
msgid "Unhandled ESP TLS error %d %d %x %d"
-msgstr ""
+msgstr "Niet behandelde ESP TLS fout %d %d %x %d"
#: shared-bindings/wifi/Radio.c
msgid "Unknown failure"
-msgstr ""
+msgstr "Onbekende fout"
#: ports/nrf/common-hal/_bleio/__init__.c
#, c-format
@@ -1968,7 +2008,7 @@ msgstr "Voltage lees time-out"
msgid "WARNING: Your code filename has two extensions\n"
msgstr "WAARSCHUWING: De bestandsnaam van de code heeft twee extensies\n"
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
"WatchDogTimer kan niet worden gedeïnitialiseerd zodra de modus in ingesteld "
@@ -2009,7 +2049,7 @@ msgstr ""
#: shared-bindings/wifi/Radio.c
msgid "WiFi password must be between 8 and 63 characters"
-msgstr ""
+msgstr "WiFi wachtwoord moet tussen 8 en 63 karakters bevatten"
#: ports/nrf/common-hal/_bleio/PacketBuffer.c
msgid "Writes not supported on Characteristic"
@@ -2056,10 +2096,6 @@ msgstr "adres buiten bereik"
msgid "addresses is empty"
msgstr "adressen zijn leeg"
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr "arctan2 is alleen geïmplementeerd voor scalars en ndarrays"
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr "arg is een lege sequentie"
@@ -2068,6 +2104,10 @@ msgstr "arg is een lege sequentie"
msgid "argsort argument must be an ndarray"
msgstr "argsort argument moet een ndarray zijn"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr ""
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr "argument heeft onjuist type"
@@ -2085,15 +2125,23 @@ msgstr "argument num/typen komen niet overeen"
msgid "argument should be a '%q' not a '%q'"
msgstr "argument moet een '%q' zijn en niet een '%q'"
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr "argumenten moeten ndarrays zijn"
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr ""
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr "array/bytes vereist aan de rechterkant"
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr "poging om argmin/argmax van een lege sequentie te krijgen"
@@ -2102,16 +2150,16 @@ msgid "attributes not supported yet"
msgstr "attributen nog niet ondersteund"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
-msgstr "as moet -1, 0, None, of 1 zijn"
+msgid "axis is out of bounds"
+msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
-msgstr "as moet -1, 0, of 1 zijn"
+msgid "axis must be None, or an integer"
+msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
-msgstr "as moet None, 0, of 1 zijn"
+msgid "axis too long"
+msgstr ""
#: py/builtinevex.c
msgid "bad compile mode"
@@ -2164,7 +2212,7 @@ msgstr "buffer te klein"
#: shared-bindings/socketpool/Socket.c
msgid "buffer too small for requested bytes"
-msgstr ""
+msgstr "buffer te klein voor gevraagde bytes"
#: shared-bindings/_pew/PewPew.c
msgid "buttons must be digitalio.DigitalInOut"
@@ -2185,7 +2233,7 @@ msgstr "butes > 8 niet ondersteund"
#: py/objarray.c
msgid "bytes length not a multiple of item size"
-msgstr ""
+msgstr "bytes lengte is geen veelvoud van itemgrootte"
#: py/objstr.c
msgid "bytes value out of range"
@@ -2315,6 +2363,10 @@ msgid ""
"can't switch from manual field specification to automatic field numbering"
msgstr "kan niet schakelen tussen handmatige en automatische veld specificatie"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr ""
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr "kan geen instanties van '%q' creëren"
@@ -2331,10 +2383,6 @@ msgstr "kan naam %q niet importeren"
msgid "cannot perform relative import"
msgstr "kan geen relatieve import uitvoeren"
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr "kan de array niet hervormen (niet verenigbare input/output vorm)"
-
#: py/emitnative.c
msgid "casting"
msgstr "casting"
@@ -2408,10 +2456,6 @@ msgstr "convolutie argumenten moeten ndarrays zijn"
msgid "convolve arguments must not be empty"
msgstr "convolutie argumenten mogen niet leeg zijn"
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr "kon de invoerarray niet vanuit vorm uitzenden"
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr "kon de Vandermonde matrix niet omkeren"
@@ -2420,6 +2464,10 @@ msgstr "kon de Vandermonde matrix niet omkeren"
msgid "couldn't determine SD card version"
msgstr "kon SD kaart versie niet bepalen"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "cross is defined for 1D arrays of length 3"
+msgstr ""
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr "data moet itereerbaar zijn"
@@ -2428,10 +2476,6 @@ msgstr "data moet itereerbaar zijn"
msgid "data must be of equal length"
msgstr "data moet van gelijke lengte zijn"
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr "ddof kleiner dan de lengte van de data set"
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr "decimale getallen zijn niet ondersteund"
@@ -2463,6 +2507,10 @@ msgstr "dict update sequence heeft de verkeerde lengte"
msgid "diff argument must be an ndarray"
msgstr "diff argument moet een ndarray zijn"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr ""
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2503,11 +2551,11 @@ msgstr "uitzonderingen moeten afleiden van BaseException"
#: shared-bindings/canio/CAN.c
msgid "expected '%q' but got '%q'"
-msgstr ""
+msgstr "verwachtte '%q' maar ontving '%q'"
#: shared-bindings/canio/CAN.c
msgid "expected '%q' or '%q' but got '%q'"
-msgstr ""
+msgstr "verwachtte '%q' of '%q' maar ontving '%q'"
#: py/objstr.c
msgid "expected ':' after format specifier"
@@ -2578,6 +2626,10 @@ msgstr "eerste argument moet een aanroepbare (callable) zijn"
msgid "first argument must be a function"
msgstr "eerste argument moet een functie zijn"
+#: extmod/ulab/code/ulab_create.c
+msgid "first argument must be a tuple of ndarrays"
+msgstr ""
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr "eerst argument moet een iterabel zijn"
@@ -2631,9 +2683,9 @@ msgstr "functie kreeg meedere waarden voor argument '%q'"
msgid "function has the same sign at the ends of interval"
msgstr "functie heeft hetzelfde teken aan beide uiteinden van het interval"
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
-msgstr "funtie is alleen geïmplementeerd voor scalars en ndarrays"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
+msgstr ""
#: py/argcheck.c
#, c-format
@@ -2703,6 +2755,7 @@ msgstr "vulling (padding) is onjuist"
msgid "index is out of bounds"
msgstr "index is buiten bereik"
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "index is buiten bereik"
@@ -2721,12 +2774,16 @@ msgstr "oorspronkelijke waarden moeten itereerbaar zijn"
#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c
msgid "initial_value length is wrong"
-msgstr ""
+msgstr "lengte van initial_value is onjuist"
#: py/compile.c
msgid "inline assembler must be a function"
msgstr "inline assembler moet een functie zijn"
+#: extmod/ulab/code/ndarray.c
+msgid "input and output shapes are not compatible"
+msgstr ""
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr "invoerargument moet een integer of 2-tuple zijn"
@@ -2735,6 +2792,10 @@ msgstr "invoerargument moet een integer of 2-tuple zijn"
msgid "input array length must be power of 2"
msgstr "invoer array lengte moet een macht van 2 zijn"
+#: extmod/ulab/code/ulab_create.c
+msgid "input arrays are not compatible"
+msgstr ""
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr "invoerdata moet itereerbaar zijn"
@@ -2747,6 +2808,22 @@ msgstr "invoermatrix is asymmetrisch"
msgid "input matrix is singular"
msgstr "invoermatrix is singulier"
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr ""
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr ""
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr "invoer moet een vierkante matrix zijn"
@@ -2759,6 +2836,10 @@ msgstr "invoer moet een tuple, lijst, bereik of ndarray zijn"
msgid "input vectors must be of equal length"
msgstr "invoervectors moeten van gelijke lengte zijn"
+#: extmod/ulab/code/poly/poly.c
+msgid "inputs are not iterable"
+msgstr ""
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr "int() argument 2 moet >=2 en <= 36 zijn"
@@ -2798,7 +2879,7 @@ msgstr "ongeldige formaatspecificatie"
#: shared-bindings/wifi/Radio.c
msgid "invalid hostname"
-msgstr ""
+msgstr "onjuiste hostnaam"
#: extmod/modussl_axtls.c
msgid "invalid key"
@@ -2896,6 +2977,10 @@ msgstr "verwijzing naar een (nog) niet toegewezen lokale variabele"
msgid "long int not supported in this build"
msgstr "long int wordt niet ondersteund in deze build"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr ""
+
#: py/parse.c
msgid "malformed f-string"
msgstr "onjuist gevormde f-string"
@@ -2926,10 +3011,22 @@ msgstr "max_length moet 0-%d zijn als fixed_length %s is"
msgid "max_length must be > 0"
msgstr "max_length moet >0 zijn"
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr ""
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "maximale recursiediepte overschreden"
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr ""
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr ""
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -2967,10 +3064,6 @@ msgstr "moet een object oproepen (raise)"
msgid "must use keyword argument for key function"
msgstr "voor sleutelfunctie moet een trefwoordargument gebruikt worden"
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr "n moet tussen 0 en 9 liggen"
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr "naam '%q' is niet gedefinieerd"
@@ -3053,6 +3146,10 @@ msgstr "niet-trefwoord argument na */**"
msgid "non-keyword arg after keyword arg"
msgstr "niet-trefwoord argument na trefwoord argument"
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr ""
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr "geen 128-bit UUID"
@@ -3065,10 +3162,6 @@ msgstr "niet alle argumenten omgezet bij formattering van string"
msgid "not enough arguments for format string"
msgstr "niet genoeg argumenten om string te formatteren"
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr "aantal argumenten moet 2 of 3 zijn"
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr "aantal punten moet minimaal 2 zijn"
@@ -3121,6 +3214,10 @@ msgstr "object met buffer protocol vereist"
msgid "odd-length string"
msgstr "string met oneven lengte"
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr ""
+
#: py/objstr.c py/objstrunicode.c
msgid "offset out of bounds"
msgstr "offset buiten bereik"
@@ -3143,6 +3240,14 @@ msgstr "alleen segmenten met step=1 (ook wel None) worden ondersteund"
msgid "operands could not be broadcast together"
msgstr "operands konden niet samen verzonden worden"
+#: extmod/ulab/code/ndarray.c
+msgid "operation is implemented for 1D Boolean arrays only"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr ""
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr "bewerking is voor ndarrays niet geïmplementeerd"
@@ -3162,11 +3267,11 @@ msgstr "ord() verwacht een teken (char) maar vond een string van lengte %d"
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of source"
-msgstr ""
+msgstr "buiten bereik van bron"
#: shared-bindings/displayio/Bitmap.c
msgid "out of range of target"
-msgstr ""
+msgstr "buiten bereik van doel"
#: py/objint_mpz.c
msgid "overflow converting long int to machine word"
@@ -3175,7 +3280,7 @@ msgstr "overloop bij converteren van long int naar machine word"
#: py/modstruct.c
#, c-format
msgid "pack expected %d items for packing (got %d)"
-msgstr ""
+msgstr "pack verwachtte %d elementen (ontving %d)"
#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c
msgid "palette must be 32 bytes long"
@@ -3234,6 +3339,7 @@ msgstr "derde argument van pow() mag geen 0 zijn"
msgid "pow() with 3 arguments requires integers"
msgstr "pow() met 3 argumenten vereist integers"
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3241,10 +3347,12 @@ msgstr "pow() met 3 argumenten vereist integers"
#: ports/esp32s2/boards/espressif_saola_1_wrover/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
+#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
msgid "pressing boot button at start up.\n"
-msgstr ""
+msgstr "druk bootknop in bij opstarten.\n"
#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h
#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h
@@ -3252,7 +3360,7 @@ msgstr ""
#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h
#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h
msgid "pressing both buttons at start up.\n"
-msgstr ""
+msgstr "druk beide knoppen in bij opstarten.\n"
#: extmod/modutimeq.c
msgid "queue overflow"
@@ -3275,6 +3383,10 @@ msgstr "relatieve import"
msgid "requested length %d but object has length %d"
msgstr "gevraagde lengte is %d maar object heeft lengte %d"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "results cannot be cast to specified type"
+msgstr ""
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr "return annotatie moet een identifier zijn"
@@ -3293,9 +3405,9 @@ msgstr "rgb_pins[%d] is hetzelfde als een andere pintoewijzing"
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "rgb_pins[%d] bevindt zich niet op dezelfde poort als klok"
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
-msgstr "de rechterkant moet een ndarray of scalar zijn"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
+msgstr ""
#: py/objstr.c
msgid "rsplit(None,n)"
@@ -3322,8 +3434,8 @@ msgid "script compilation not supported"
msgstr "scriptcompilatie wordt niet ondersteund"
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
-msgstr "vorm moet een 2-tuple zijn"
+msgid "shape must be a tuple"
+msgstr ""
#: py/objstr.c
msgid "sign not allowed in string format specifier"
@@ -3379,7 +3491,7 @@ msgstr "sosfilt vereist itereerbare argumenten"
#: shared-bindings/displayio/Bitmap.c
msgid "source palette too large"
-msgstr ""
+msgstr "bronpalet te groot"
#: py/objstr.c
msgid "start/end indices"
@@ -3445,6 +3557,7 @@ msgstr "drempelwaarde moet in het bereik 0-65536 liggen"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() accepteert een 9-rij"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr "time-outduur is groter dan de ondersteunde maximale waarde"
@@ -3469,6 +3582,10 @@ msgstr "timeout bij wachten op v2 kaart"
msgid "timestamp out of range for platform time_t"
msgstr "timestamp buiten bereik voor platform time_t"
+#: extmod/ulab/code/ndarray.c
+msgid "tobytes can be invoked for dense arrays only"
+msgstr ""
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr "te veel argumenten opgegeven bij dit formaat"
@@ -3494,6 +3611,16 @@ msgstr "tuple index buiten bereik"
msgid "tuple/list has wrong length"
msgstr "tuple of lijst heeft onjuiste lengte"
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr ""
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr ""
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3514,7 +3641,7 @@ msgstr "objecttype '%q' heeft geen attribuut '%q'"
#: py/objgenerator.c
msgid "type object 'generator' has no attribute '__await__'"
-msgstr ""
+msgstr "het type object 'generator' heeft geen attribuut '__await__'"
#: py/objtype.c
msgid "type takes 1 or 3 arguments"
@@ -3618,25 +3745,29 @@ msgstr "value_count moet groter dan 0 zijn"
msgid "vectors must have same lengths"
msgstr "vectoren moeten van gelijke lengte zijn"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr ""
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr "watchdog time-out moet groter zijn dan 0"
#: shared-bindings/rgbmatrix/RGBMatrix.c
msgid "width must be greater than zero"
-msgstr ""
+msgstr "breedte moet groter dan nul zijn"
#: shared-bindings/_bleio/Adapter.c
msgid "window must be <= interval"
msgstr "window moet <= interval zijn"
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
-msgstr "onjuist argumenttype"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
+msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
-msgstr "onjuist indextype"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
+msgstr ""
#: extmod/ulab/code/vector/vectorise.c
msgid "wrong input type"
@@ -3686,6 +3817,51 @@ 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 "Only IPv4 SOCK_STREAM sockets supported"
+#~ msgstr "Alleen IPv4 SOCK_STREAM sockets worden ondersteund"
+
+#~ msgid "arctan2 is implemented for scalars and ndarrays only"
+#~ msgstr "arctan2 is alleen geïmplementeerd voor scalars en ndarrays"
+
+#~ msgid "axis must be -1, 0, None, or 1"
+#~ msgstr "as moet -1, 0, None, of 1 zijn"
+
+#~ msgid "axis must be -1, 0, or 1"
+#~ msgstr "as moet -1, 0, of 1 zijn"
+
+#~ msgid "axis must be None, 0, or 1"
+#~ msgstr "as moet None, 0, of 1 zijn"
+
+#~ msgid "cannot reshape array (incompatible input/output shape)"
+#~ msgstr "kan de array niet hervormen (niet verenigbare input/output vorm)"
+
+#~ msgid "could not broadast input array from shape"
+#~ msgstr "kon de invoerarray niet vanuit vorm uitzenden"
+
+#~ msgid "ddof must be smaller than length of data set"
+#~ msgstr "ddof kleiner dan de lengte van de data set"
+
+#~ msgid "function is implemented for scalars and ndarrays only"
+#~ msgstr "funtie is alleen geïmplementeerd voor scalars en ndarrays"
+
+#~ msgid "n must be between 0, and 9"
+#~ msgstr "n moet tussen 0 en 9 liggen"
+
+#~ msgid "number of arguments must be 2, or 3"
+#~ msgstr "aantal argumenten moet 2 of 3 zijn"
+
+#~ msgid "right hand side must be an ndarray, or a scalar"
+#~ msgstr "de rechterkant moet een ndarray of scalar zijn"
+
+#~ msgid "shape must be a 2-tuple"
+#~ msgstr "vorm moet een 2-tuple zijn"
+
+#~ msgid "wrong argument type"
+#~ msgstr "onjuist argumenttype"
+
+#~ msgid "wrong index type"
+#~ msgstr "onjuist indextype"
+
#~ msgid "Must provide SCK pin"
#~ msgstr "SCK pin moet opgegeven worden"
diff --git a/locale/pl.po b/locale/pl.po
index f6292a0a3..5fbe727ef 100644
--- a/locale/pl.po
+++ b/locale/pl.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-16 19:50-0500\n"
-"PO-Revision-Date: 2020-09-29 01:39+0000\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
+"PO-Revision-Date: 2020-11-11 19:13+0000\n"
"Last-Translator: Maciej Stankiewicz <tawezik@gmail.com>\n"
"Language-Team: pl\n"
"Language: pl\n"
@@ -16,7 +16,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
"|| n%100>=20) ? 1 : 2;\n"
-"X-Generator: Weblate 4.3-dev\n"
+"X-Generator: Weblate 4.4-dev\n"
#: main.c
msgid ""
@@ -76,7 +76,7 @@ msgstr "%q poza zakresem"
#: py/obj.c
msgid "%q indices must be integers, not %q"
-msgstr ""
+msgstr "%q indeksy muszą być liczbami typu int, a nie %q"
#: shared-bindings/vectorio/Polygon.c
msgid "%q list must be a list"
@@ -104,7 +104,7 @@ msgstr "%q poza zakresem"
#: ports/atmel-samd/common-hal/microcontroller/Pin.c
msgid "%q pin invalid"
-msgstr ""
+msgstr "nieprawidłowy pin %q"
#: shared-bindings/fontio/BuiltinFont.c
msgid "%q should be an int"
@@ -254,7 +254,7 @@ msgstr "'return' poza funkcją"
#: py/compile.c
msgid "'yield from' inside async function"
-msgstr ""
+msgstr "'yield from' wewnątrz funkcji asynchronicznej"
#: py/compile.c
msgid "'yield' outside function"
@@ -283,7 +283,7 @@ msgstr "Kanał przerwań sprzętowych w użyciu"
#: ports/esp32s2/common-hal/analogio/AnalogIn.c
msgid "ADC2 is being used by WiFi"
-msgstr ""
+msgstr "ADC2 jest używany przez WiFi"
#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c
#, c-format
@@ -294,11 +294,22 @@ msgstr "Adres musi mieć %d bajtów"
msgid "Address type out of range"
msgstr ""
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr ""
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "Wszystkie peryferia I2C w użyciu"
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr ""
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr ""
@@ -329,6 +340,7 @@ msgstr "Wszystkie timery tej nóżki w użyciu"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -415,6 +427,10 @@ msgstr ""
"Samo-przeładowywanie włączone. Po prostu zapisz pliki przez USB aby je "
"uruchomić, albo wejdź w konsolę aby wyłączyć.\n"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr ""
+
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate"
@@ -424,6 +440,11 @@ msgstr ""
msgid "Bit clock and word select must share a clock unit"
msgstr "Zegar bitowy i wybór słowa muszą współdzielić jednostkę zegara"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr ""
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "Głębia musi być wielokrotnością 8."
@@ -787,7 +808,7 @@ msgstr "Tryb sterowania nieużywany w trybie wejścia."
msgid "ECB only operates on 16 bytes at a time"
msgstr "ECB działa tylko na 16 bajtach naraz"
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
msgstr ""
@@ -848,6 +869,10 @@ msgstr ""
msgid "FFT is defined for ndarrays only"
msgstr ""
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr ""
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
msgstr ""
@@ -913,6 +938,7 @@ msgid "File exists"
msgstr "Plik istnieje"
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
msgstr ""
@@ -992,6 +1018,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "Niewłaściwa wielkość bufora"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr ""
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr ""
@@ -1019,7 +1049,7 @@ msgstr "Błąd wewnętrzny #%d"
#: shared-bindings/sdioio/SDCard.c
msgid "Invalid %q"
-msgstr ""
+msgstr "Nieprawidłowe %q"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
@@ -1072,6 +1102,7 @@ msgid "Invalid byteorder string"
msgstr ""
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr "Zły okres. Poprawny zakres to: 1 - 500"
@@ -1093,7 +1124,7 @@ msgstr "Zła wielkość fragmentu formatu"
#: ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency"
-msgstr ""
+msgstr "Nieprawidłowa częstotliwość"
#: ports/stm/common-hal/pwmio/PWMOut.c
msgid "Invalid frequency supplied"
@@ -1113,7 +1144,8 @@ msgid "Invalid phase"
msgstr "Zła faza"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Zła nóżka"
@@ -1133,7 +1165,7 @@ msgstr "Zła nóżka dla prawego kanału"
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1191,7 +1223,7 @@ msgstr ""
#: shared-module/displayio/Group.c
msgid "Layer must be a Group or TileGrid subclass."
-msgstr "Layer musi dziedziczyć z Group albo TileGrid"
+msgstr "Layer musi dziedziczyć z Group albo TileGrid."
#: py/objslice.c
msgid "Length must be an int"
@@ -1248,6 +1280,10 @@ msgstr "Należy podać pin MISO lub MOSI"
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr ""
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr ""
+
#: py/parse.c
msgid "Name too long"
msgstr "Za długa nazwa"
@@ -1329,7 +1365,7 @@ msgstr ""
#: ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "No more channels available"
-msgstr ""
+msgstr "Brak dostępnych kanałów"
#: ports/esp32s2/common-hal/pwmio/PWMOut.c
msgid "No more timers available"
@@ -1398,14 +1434,14 @@ msgstr "Nieparzysta parzystość nie jest wspierana"
msgid "Only 8 or 16 bit mono with "
msgstr "Tylko 8 lub 16 bitów mono z "
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr ""
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr ""
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
#, c-format
msgid ""
@@ -1421,7 +1457,7 @@ msgstr ""
#: shared-module/displayio/ColorConverter.c
msgid "Only one color can be transparent at a time"
-msgstr ""
+msgstr "W danym momencie przezroczysty może być tylko jeden kolor"
#: shared-bindings/ipaddress/__init__.c
msgid "Only raw int supported for ip"
@@ -1490,7 +1526,7 @@ msgstr "Oraz moduły w systemie plików\n"
#: shared-module/vectorio/Polygon.c
msgid "Polygon needs at least 3 points"
-msgstr ""
+msgstr "Wielokąt musi mieć co najmniej 3 punkty"
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
msgid ""
@@ -1802,7 +1838,7 @@ msgstr ""
#: ports/stm/common-hal/busio/UART.c
msgid "UART write error"
-msgstr ""
+msgstr "Błąd zapisu UART"
#: shared-module/usb_hid/Device.c
msgid "USB Busy"
@@ -1941,7 +1977,7 @@ msgstr ""
msgid "WARNING: Your code filename has two extensions\n"
msgstr "UWAGA: Nazwa pliku ma dwa rozszerzenia\n"
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
@@ -1999,7 +2035,7 @@ msgstr "__init__() powinien zwracać None"
#: py/objtype.c
msgid "__init__() should return None, not '%q'"
-msgstr ""
+msgstr "__init__() powinno zwrócić None, a nie '%q'"
#: py/objobject.c
msgid "__new__ arg must be a user-type"
@@ -2026,10 +2062,6 @@ msgstr "adres poza zakresem"
msgid "addresses is empty"
msgstr "adres jest pusty"
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr ""
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr "arg jest puste"
@@ -2038,6 +2070,10 @@ msgstr "arg jest puste"
msgid "argsort argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr ""
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr "argument ma zły typ"
@@ -2055,15 +2091,23 @@ msgstr "zła liczba lub typ argumentów"
msgid "argument should be a '%q' not a '%q'"
msgstr "argument powinien być '%q' a nie '%q'"
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr ""
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr "tablica/bytes wymagane po prawej stronie"
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr ""
@@ -2072,15 +2116,15 @@ msgid "attributes not supported yet"
msgstr "atrybuty nie są jeszcze obsługiwane"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
+msgid "axis is out of bounds"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
+msgid "axis must be None, or an integer"
msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
+msgid "axis too long"
msgstr ""
#: py/builtinevex.c
@@ -2284,6 +2328,10 @@ msgid ""
"can't switch from manual field specification to automatic field numbering"
msgstr "nie można zmienić z ręcznego numerowaniu pól do automatycznego"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr ""
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr "nie można tworzyć instancji '%q'"
@@ -2300,10 +2348,6 @@ msgstr "nie można zaimportować nazwy %q"
msgid "cannot perform relative import"
msgstr "nie można wykonać relatywnego importu"
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr ""
-
#: py/emitnative.c
msgid "casting"
msgstr "rzutowanie"
@@ -2376,10 +2420,6 @@ msgstr ""
msgid "convolve arguments must not be empty"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr ""
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr ""
@@ -2388,6 +2428,10 @@ msgstr ""
msgid "couldn't determine SD card version"
msgstr "nie można określić wersji karty SD"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "cross is defined for 1D arrays of length 3"
+msgstr ""
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr ""
@@ -2396,10 +2440,6 @@ msgstr ""
msgid "data must be of equal length"
msgstr ""
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr ""
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr "liczby dziesiętne nieobsługiwane"
@@ -2430,6 +2470,10 @@ msgstr "sekwencja ma złą długość"
msgid "diff argument must be an ndarray"
msgstr ""
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr ""
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2545,6 +2589,10 @@ msgstr ""
msgid "first argument must be a function"
msgstr "pierwszy argument musi być funkcją"
+#: extmod/ulab/code/ulab_create.c
+msgid "first argument must be a tuple of ndarrays"
+msgstr ""
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr "pierwszy argument musi być iterowalny"
@@ -2598,8 +2646,8 @@ msgstr "funkcja dostała wiele wartości dla argumentu '%q'"
msgid "function has the same sign at the ends of interval"
msgstr ""
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
msgstr ""
#: py/argcheck.c
@@ -2669,6 +2717,7 @@ msgstr "złe wypełnienie"
msgid "index is out of bounds"
msgstr "indeks jest poza zakresem"
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "indeks poza zakresem"
@@ -2693,6 +2742,10 @@ msgstr "długość initial_value jest nieprawidłowa"
msgid "inline assembler must be a function"
msgstr "wtrącony asembler musi być funkcją"
+#: extmod/ulab/code/ndarray.c
+msgid "input and output shapes are not compatible"
+msgstr ""
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr ""
@@ -2701,6 +2754,10 @@ msgstr ""
msgid "input array length must be power of 2"
msgstr "długość tablicy wejściowej musi być potęgą 2"
+#: extmod/ulab/code/ulab_create.c
+msgid "input arrays are not compatible"
+msgstr ""
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr ""
@@ -2713,6 +2770,22 @@ msgstr ""
msgid "input matrix is singular"
msgstr ""
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr ""
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr ""
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr "wejście musi być macierzą kwadratową"
@@ -2725,6 +2798,10 @@ msgstr ""
msgid "input vectors must be of equal length"
msgstr "wektory wejściowe muszą być równej długości"
+#: extmod/ulab/code/poly/poly.c
+msgid "inputs are not iterable"
+msgstr ""
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr "argument 2 do int() busi być pomiędzy 2 a 36"
@@ -2859,6 +2936,10 @@ msgstr "zmienna lokalna użyta przed przypisaniem"
msgid "long int not supported in this build"
msgstr "long int jest nieobsługiwany"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr ""
+
#: py/parse.c
msgid "malformed f-string"
msgstr ""
@@ -2889,10 +2970,22 @@ msgstr ""
msgid "max_length must be > 0"
msgstr "max_length musi być > 0"
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr ""
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "przekroczono dozwoloną głębokość rekurencji"
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr ""
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr ""
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -2930,10 +3023,6 @@ msgstr "wyjątek musi być obiektem"
msgid "must use keyword argument for key function"
msgstr "funkcja key musi być podana jako argument nazwany"
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr ""
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr "nazwa '%q' niezdefiniowana"
@@ -3016,6 +3105,10 @@ msgstr "argument nienazwany po */**"
msgid "non-keyword arg after keyword arg"
msgstr "argument nienazwany po nazwanym"
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr ""
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr "to nie jest 128-bitowy UUID"
@@ -3028,13 +3121,9 @@ msgstr "nie wszystkie argumenty wykorzystane w formatowaniu"
msgid "not enough arguments for format string"
msgstr "nie dość argumentów przy formatowaniu"
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr ""
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
-msgstr ""
+msgstr "liczba punktów musi wynosić co najmniej 2"
#: py/obj.c
msgid "object '%q' is not a tuple or list"
@@ -3084,6 +3173,10 @@ msgstr "wymagany obiekt z protokołem buforu"
msgid "odd-length string"
msgstr "łańcuch o nieparzystej długości"
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr ""
+
#: py/objstr.c py/objstrunicode.c
msgid "offset out of bounds"
msgstr "offset poza zakresem"
@@ -3106,6 +3199,14 @@ msgstr "tylko fragmenty ze step=1 (lub None) są wspierane"
msgid "operands could not be broadcast together"
msgstr ""
+#: extmod/ulab/code/ndarray.c
+msgid "operation is implemented for 1D Boolean arrays only"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr ""
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr ""
@@ -3197,6 +3298,7 @@ msgstr "trzeci argument pow() nie może być 0"
msgid "pow() with 3 arguments requires integers"
msgstr "trzyargumentowe pow() wymaga liczb całkowitych"
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3204,6 +3306,8 @@ msgstr "trzyargumentowe pow() wymaga liczb całkowitych"
#: ports/esp32s2/boards/espressif_saola_1_wrover/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
+#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
msgid "pressing boot button at start up.\n"
@@ -3238,6 +3342,10 @@ msgstr "relatywny import"
msgid "requested length %d but object has length %d"
msgstr "zażądano długości %d ale obiekt ma długość %d"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "results cannot be cast to specified type"
+msgstr ""
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr "anotacja wartości musi być identyfikatorem"
@@ -3256,8 +3364,8 @@ msgstr ""
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
msgstr ""
#: py/objstr.c
@@ -3284,7 +3392,7 @@ msgid "script compilation not supported"
msgstr "kompilowanie skryptów nieobsługiwane"
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
+msgid "shape must be a tuple"
msgstr ""
#: py/objstr.c
@@ -3341,7 +3449,7 @@ msgstr ""
#: shared-bindings/displayio/Bitmap.c
msgid "source palette too large"
-msgstr ""
+msgstr "źródłowa paleta jest zbyt duża"
#: py/objstr.c
msgid "start/end indices"
@@ -3407,6 +3515,7 @@ msgstr "threshold musi być w zakresie 0-65536"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() wymaga 9-elementowej sekwencji"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr ""
@@ -3431,6 +3540,10 @@ msgstr ""
msgid "timestamp out of range for platform time_t"
msgstr "timestamp poza zakresem dla time_t na tej platformie"
+#: extmod/ulab/code/ndarray.c
+msgid "tobytes can be invoked for dense arrays only"
+msgstr ""
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr "zbyt wiele argumentów podanych dla tego formatu"
@@ -3456,6 +3569,16 @@ msgstr "indeks krotki poza zakresem"
msgid "tuple/list has wrong length"
msgstr "krotka/lista ma złą długość"
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr ""
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr ""
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3580,6 +3703,10 @@ msgstr "value_count musi być > 0"
msgid "vectors must have same lengths"
msgstr "wektory muszą mieć identyczną długość"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr ""
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr ""
@@ -3592,13 +3719,13 @@ msgstr ""
msgid "window must be <= interval"
msgstr ""
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
-msgstr "zły typ argumentu"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
+msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
-msgstr "zły typ indeksu"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
+msgstr ""
#: extmod/ulab/code/vector/vectorise.c
msgid "wrong input type"
@@ -3648,6 +3775,15 @@ msgstr ""
msgid "zi must be of shape (n_section, 2)"
msgstr ""
+#~ msgid "number of arguments must be 2, or 3"
+#~ msgstr "liczba argumentów musi wynosić 2 lub 3"
+
+#~ msgid "wrong argument type"
+#~ msgstr "zły typ argumentu"
+
+#~ msgid "wrong index type"
+#~ msgstr "zły typ indeksu"
+
#~ msgid "Must provide SCK pin"
#~ msgstr "Należy podać pin SCK"
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index b80afeb1a..36b1317d7 100644
--- a/locale/pt_BR.po
+++ b/locale/pt_BR.po
@@ -5,8 +5,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-16 19:50-0500\n"
-"PO-Revision-Date: 2020-10-21 19:58+0000\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
+"PO-Revision-Date: 2020-11-30 18:06+0000\n"
"Last-Translator: Wellington Terumi Uemura <wellingtonuemura@gmail.com>\n"
"Language-Team: \n"
"Language: pt_BR\n"
@@ -14,7 +14,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n > 1;\n"
-"X-Generator: Weblate 4.3.1\n"
+"X-Generator: Weblate 4.4-dev\n"
#: main.c
msgid ""
@@ -296,11 +296,22 @@ msgstr "O endereço deve ter %d bytes de comprimento"
msgid "Address type out of range"
msgstr "O tipo do endereço está fora do alcance"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr "Todos os periféricos CAN estão em uso"
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "Todos os periféricos I2C estão em uso"
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr "Todas as unidades PCNT estão em uso"
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr "Todos os FIFOs RX estão em uso"
@@ -331,6 +342,7 @@ msgstr "Todos os temporizadores para este pino estão em uso"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -419,6 +431,10 @@ msgstr ""
"O recarregamento automático está ativo. Simplesmente salve os arquivos via "
"USB para executá-los ou digite REPL para desativar.\n"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr "O Baudrate não é suportado pelo periférico"
+
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate"
@@ -430,6 +446,11 @@ msgstr ""
"O clock de bits e a seleção de palavras devem compartilhar uma unidade de "
"clock"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr "A profundidade dos bits deve ser de 1 até 6 inclusive, porém não %d"
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "A profundidade de bits deve ser o múltiplo de 8."
@@ -796,7 +817,7 @@ msgstr "O modo do controlador não é usado quando a direção for inserida."
msgid "ECB only operates on 16 bytes at a time"
msgstr "O BCE opera apenas com 16 bytes por vez"
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
msgstr "Houve uma falha na alocação da memória ESP-IDF"
@@ -857,6 +878,10 @@ msgstr "Anúncios estendidos não compatíveis com a resposta da varredura."
msgid "FFT is defined for ndarrays only"
msgstr "O FFT é definido apenas para ndarrays"
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr "O FFT é implementado apenas para matrizes lineares"
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
msgstr "Houve uma falha no handshake do SSL"
@@ -922,6 +947,7 @@ msgid "File exists"
msgstr "Arquivo já existe"
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
msgstr "Os filtros são muito complexos"
@@ -1003,6 +1029,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "O tamanho do buffer está incorreto"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr "A inicialização falhou devido à falta de memória"
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr "A entrada está demorando demais"
@@ -1083,6 +1113,7 @@ msgid "Invalid byteorder string"
msgstr "A cadeia de bytes é inválida"
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr "O período de captura é inválido. O intervalo válido é: 1 - 500"
@@ -1124,7 +1155,8 @@ msgid "Invalid phase"
msgstr "Fase Inválida"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Pino inválido"
@@ -1144,7 +1176,7 @@ msgstr "Pino inválido para canal direito"
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1258,6 +1290,10 @@ msgstr "Deve informar os pinos MISO ou MOSI"
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "Deve utilizar um múltiplo de 6 pinos rgb, não %d"
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr "Erro NVS"
+
#: py/parse.c
msgid "Name too long"
msgstr "Nome muito longo"
@@ -1409,14 +1445,14 @@ msgstr "A paridade ímpar não é compatível"
msgid "Only 8 or 16 bit mono with "
msgstr "Apenas mono com 8 ou 16 bits com "
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr "São suportados apenas soquetes IPv4 SOCK_STREAM"
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr "Somente os endereços IPv4 são suportados"
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
+msgstr "Apenas soquetes IPv4 são suportados"
+
#: shared-module/displayio/OnDiskBitmap.c
#, c-format
msgid ""
@@ -1986,7 +2022,7 @@ msgstr "O tempo limite de leitura da tensão expirou"
msgid "WARNING: Your code filename has two extensions\n"
msgstr "AVISO: Seu arquivo de código tem duas extensões\n"
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr ""
"O WatchDogTimer não pode ser não-inicializado uma vez que o modo é definido "
@@ -2075,10 +2111,6 @@ msgstr "endereço fora dos limites"
msgid "addresses is empty"
msgstr "os endereços estão vazios"
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr "O arctan2 está implementado apenas para escalares e ndarrays"
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr "o arg é uma sequência vazia"
@@ -2087,6 +2119,10 @@ msgstr "o arg é uma sequência vazia"
msgid "argsort argument must be an ndarray"
msgstr "O argumento argsort deve ser um ndarray"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr "argsort não é implementado para matrizes achatadas"
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr "argumento tem tipo errado"
@@ -2104,15 +2140,23 @@ msgstr "o argumento num/tipos não combinam"
msgid "argument should be a '%q' not a '%q'"
msgstr "o argumento deve ser um '%q' e não um '%q'"
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr "os argumentos devem ser ndarrays"
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr "a matriz e comprimento do índice devem ser iguais"
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr "matriz/bytes são necessários no lado direito"
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr "tentativa de obter (arg)min/(arg)max da sequência vazia"
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr "tente obter argmin/argmax de uma sequência vazia"
@@ -2121,16 +2165,16 @@ msgid "attributes not supported yet"
msgstr "atributos ainda não suportados"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
-msgstr "o eixo deve ser -1, 0, Nenhum ou 1"
+msgid "axis is out of bounds"
+msgstr "o eixo está fora dos limites"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
-msgstr "o eixo deve ser -1, 0 ou 1"
+msgid "axis must be None, or an integer"
+msgstr "eixo deve ser Nenhum ou um número inteiro"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
-msgstr "o eixo deve ser Nenhum, 0 ou 1"
+msgid "axis too long"
+msgstr "o eixo é muito longo"
#: py/builtinevex.c
msgid "bad compile mode"
@@ -2337,6 +2381,10 @@ msgid ""
msgstr ""
"não é possível alternar da especificação de campo manual para a automática"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr "não pode lançar a saída com a regra de fundição"
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr "não é possível criar instâncias '%q'"
@@ -2353,11 +2401,6 @@ msgstr "não pode importar nome %q"
msgid "cannot perform relative import"
msgstr "não pode executar a importação relativa"
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr ""
-"não é possível remodelar a matriz (formato de entrada/saída incompatível)"
-
#: py/emitnative.c
msgid "casting"
msgstr "fundição"
@@ -2432,10 +2475,6 @@ msgstr "os argumentos convolutivos devem ser ndarrays"
msgid "convolve arguments must not be empty"
msgstr "os argumentos convolutivos não devem estar vazios"
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr "não foi possível transmitir a matriz da entrada a partir da forma"
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr "não foi possível inverter a matriz Vandermonde"
@@ -2444,6 +2483,10 @@ msgstr "não foi possível inverter a matriz Vandermonde"
msgid "couldn't determine SD card version"
msgstr "não foi possível determinar a versão do cartão SD"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "cross is defined for 1D arrays of length 3"
+msgstr "a cruz é definida para matrizes 1D de comprimento 3"
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr "os dados devem ser iteráveis"
@@ -2452,10 +2495,6 @@ msgstr "os dados devem ser iteráveis"
msgid "data must be of equal length"
msgstr "os dados devem ser de igual comprimento"
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr "O ddof deve ser menor que o comprimento do conjunto dos dados"
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr "os números decimais não são compatíveis"
@@ -2488,6 +2527,10 @@ msgstr "sequência da atualização dict tem o comprimento errado"
msgid "diff argument must be an ndarray"
msgstr "O argumento diff deve ser um ndarray"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr "ordem de diferenciação fora do alcance"
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2603,6 +2646,10 @@ msgstr "o primeiro argumento deve ser chamável"
msgid "first argument must be a function"
msgstr "o primeiro argumento deve ser uma função"
+#: extmod/ulab/code/ulab_create.c
+msgid "first argument must be a tuple of ndarrays"
+msgstr "o primeiro argumento deve ser um tuple de ndarrays"
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr "o primeiro argumento deve ser um iterável"
@@ -2656,9 +2703,9 @@ msgstr "A função obteve vários valores para o argumento '%q'"
msgid "function has the same sign at the ends of interval"
msgstr "a função tem o mesmo sinal nas extremidades do intervalo"
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
-msgstr "A função foi implementada apenas para escalares e ndarrays"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
+msgstr "A função é definida apenas para ndarrays"
#: py/argcheck.c
#, c-format
@@ -2727,6 +2774,7 @@ msgstr "preenchimento incorreto"
msgid "index is out of bounds"
msgstr "o índice está fora dos limites"
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "Índice fora do intervalo"
@@ -2751,6 +2799,10 @@ msgstr "O comprimento do initial_value está errado"
msgid "inline assembler must be a function"
msgstr "o assembler em linha deve ser uma função"
+#: extmod/ulab/code/ndarray.c
+msgid "input and output shapes are not compatible"
+msgstr "as formas de entrada e saída não são compatíveis"
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr "o argumento da entrada deve ser um número inteiro ou uma tupla de 2"
@@ -2759,6 +2811,10 @@ msgstr "o argumento da entrada deve ser um número inteiro ou uma tupla de 2"
msgid "input array length must be power of 2"
msgstr "comprimento da matriz da entrada deve ter potência de 2"
+#: extmod/ulab/code/ulab_create.c
+msgid "input arrays are not compatible"
+msgstr "as matrizes da entrada não são compatíveis"
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr "os dados da entrada devem ser iteráveis"
@@ -2771,6 +2827,22 @@ msgstr "a matriz da entrada é assimétrica"
msgid "input matrix is singular"
msgstr "a matriz da entrada é singular"
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr "a entrada deve ser um ndarray denso"
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr "a entrada dos dados deve ser um tensor de nível 2"
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr "a entrada deve ser um ndarray"
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr "a entrada deve ser unidimensional"
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr "a entrada deve ser uma matriz quadrada"
@@ -2783,6 +2855,10 @@ msgstr "A entrada deve ser tupla, lista, intervalo ou matriz"
msgid "input vectors must be of equal length"
msgstr "os vetores da entrada devem ter o mesmo comprimento"
+#: extmod/ulab/code/poly/poly.c
+msgid "inputs are not iterable"
+msgstr "as entradas não são iteráveis"
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr "int() arg 2 deve ser >= 2 e <= 36"
@@ -2920,6 +2996,10 @@ msgstr "a variável local referenciada antes da atribuição"
msgid "long int not supported in this build"
msgstr "o long int não é suportado nesta compilação"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr "o loopback + o modo silencioso não é suportado pelo periférico"
+
#: py/parse.c
msgid "malformed f-string"
msgstr "f-string malformado"
@@ -2950,10 +3030,22 @@ msgstr "o max_length deve ser 0-%d quando Fixed_length for %s"
msgid "max_length must be > 0"
msgstr "max_length deve ser > 0"
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr "O número máximo de dimensões são 4"
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "a recursão máxima da profundidade foi excedida"
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr "maxiter deve ser > 0"
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr "maxiter pode ser > 0"
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -2993,10 +3085,6 @@ msgstr "deve levantar um objeto"
msgid "must use keyword argument for key function"
msgstr "deve usar o argumento da palavra-chave para a função da chave"
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr "n deve estar entre 0 e 9"
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr "o nome '%q' não está definido"
@@ -3079,6 +3167,10 @@ msgstr "um arg sem palavra-chave após */ **"
msgid "non-keyword arg after keyword arg"
msgstr "um arg não-palavra-chave após a palavra-chave arg"
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr "a norma é definida para matrizes 1D e 2D"
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr "não é um UUID com 128 bits"
@@ -3091,10 +3183,6 @@ msgstr "nem todos os argumentos são convertidos durante a formatação da strin
msgid "not enough arguments for format string"
msgstr "argumentos insuficientes para o formato da string"
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr "a quantidade dos argumentos deve ser 2 ou 3"
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr "a quantidade dos pontos deve ser pelo menos 2"
@@ -3147,6 +3235,10 @@ msgstr "é necessário objeto com protocolo do buffer"
msgid "odd-length string"
msgstr "sequência com comprimento ímpar"
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr "o offset é muito grande"
+
#: py/objstr.c py/objstrunicode.c
msgid "offset out of bounds"
msgstr "desvio fora dos limites"
@@ -3170,6 +3262,14 @@ msgstr ""
msgid "operands could not be broadcast together"
msgstr "os operandos não puderam ser transmitidos juntos"
+#: extmod/ulab/code/ndarray.c
+msgid "operation is implemented for 1D Boolean arrays only"
+msgstr "A operação é implementada apenas para matrizes booleanas 1D"
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr "a operação não é implementada para a matriz achatada"
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr "a operação não foi implementada nos ndarrays"
@@ -3264,6 +3364,7 @@ msgstr "O terceiro argumento pow() não pode ser 0"
msgid "pow() with 3 arguments requires integers"
msgstr "o pow() com 3 argumentos requer números inteiros"
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3271,6 +3372,8 @@ msgstr "o pow() com 3 argumentos requer números inteiros"
#: ports/esp32s2/boards/espressif_saola_1_wrover/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
+#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
msgid "pressing boot button at start up.\n"
@@ -3305,6 +3408,10 @@ msgstr "importação relativa"
msgid "requested length %d but object has length %d"
msgstr "o comprimento solicitado %d, porém o objeto tem comprimento %d"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "results cannot be cast to specified type"
+msgstr "os resultados não podem ser lançados para um determinado tipo"
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr "a anotação do retorno deve ser um identificador"
@@ -3323,9 +3430,9 @@ msgstr "rgb_pins[%d] duplica outra atribuição dos pinos"
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "rgb_pins[%d] não está na mesma porta que o clock"
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
-msgstr "o lado direito deve ser um ndarray ou um escalar"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
+msgstr "argumento de enrolar deve ser um ndarray"
#: py/objstr.c
msgid "rsplit(None,n)"
@@ -3352,8 +3459,8 @@ msgid "script compilation not supported"
msgstr "compilação de script não suportada"
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
-msgstr "a forma deve ser uma tupla de 2"
+msgid "shape must be a tuple"
+msgstr "a forma deve ser uma tupla"
#: py/objstr.c
msgid "sign not allowed in string format specifier"
@@ -3475,6 +3582,7 @@ msgstr "Limite deve estar no alcance de 0-65536"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() leva uma sequência com 9"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr "a duração do tempo limite excedeu o valor máximo suportado"
@@ -3499,6 +3607,10 @@ msgstr "o tempo limite na espera pelo cartão v2"
msgid "timestamp out of range for platform time_t"
msgstr "timestamp fora do intervalo para a plataforma time_t"
+#: extmod/ulab/code/ndarray.c
+msgid "tobytes can be invoked for dense arrays only"
+msgstr "os tobytes podem ser invocados apenas nas matrizes densas"
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr "Muitos argumentos fornecidos com o formato dado"
@@ -3524,6 +3636,16 @@ msgstr "o índice da tupla está fora do intervalo"
msgid "tuple/list has wrong length"
msgstr "a tupla/lista está com tamanho incorreto"
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr "o twai_driver_install retornou um erro esp-idf #%d"
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr "o twai_start retornou um erro esp-idf #%d"
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3648,6 +3770,10 @@ msgstr "o value_count deve ser > 0"
msgid "vectors must have same lengths"
msgstr "os vetores devem ter os mesmos comprimentos"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr "o watchdog não foi inicializado"
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr "o tempo limite do watchdog deve ser maior que 0"
@@ -3660,13 +3786,13 @@ msgstr "a largura deve ser maior que zero"
msgid "window must be <= interval"
msgstr "a janela deve ser <= intervalo"
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
-msgstr "tipo do argumento errado"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
+msgstr "índice do eixo errado"
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
-msgstr "tipo do índice errado"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
+msgstr "um eixo errado foi definido"
#: extmod/ulab/code/vector/vectorise.c
msgid "wrong input type"
@@ -3716,6 +3842,55 @@ 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 "Only IPv4 SOCK_STREAM sockets supported"
+#~ msgstr "São suportados apenas soquetes IPv4 SOCK_STREAM"
+
+#~ msgid "arctan2 is implemented for scalars and ndarrays only"
+#~ msgstr "O arctan2 está implementado apenas para escalares e ndarrays"
+
+#~ msgid "axis must be -1, 0, None, or 1"
+#~ msgstr "o eixo deve ser -1, 0, Nenhum ou 1"
+
+#~ msgid "axis must be -1, 0, or 1"
+#~ msgstr "o eixo deve ser -1, 0 ou 1"
+
+#~ msgid "axis must be None, 0, or 1"
+#~ msgstr "o eixo deve ser Nenhum, 0 ou 1"
+
+#~ msgid "cannot reshape array (incompatible input/output shape)"
+#~ msgstr ""
+#~ "não é possível remodelar a matriz (formato de entrada/saída incompatível)"
+
+#~ msgid "could not broadast input array from shape"
+#~ msgstr "não foi possível transmitir a matriz da entrada a partir da forma"
+
+#~ msgid "ddof must be smaller than length of data set"
+#~ msgstr "O ddof deve ser menor que o comprimento do conjunto dos dados"
+
+#~ msgid "function is implemented for scalars and ndarrays only"
+#~ msgstr "A função foi implementada apenas para escalares e ndarrays"
+
+#~ msgid "n must be between 0, and 9"
+#~ msgstr "n deve estar entre 0 e 9"
+
+#~ msgid "number of arguments must be 2, or 3"
+#~ msgstr "a quantidade dos argumentos deve ser 2 ou 3"
+
+#~ msgid "right hand side must be an ndarray, or a scalar"
+#~ msgstr "o lado direito deve ser um ndarray ou um escalar"
+
+#~ msgid "shape must be a 2-tuple"
+#~ msgstr "a forma deve ser uma tupla de 2"
+
+#~ msgid "sorted axis can't be longer than 65535"
+#~ msgstr "o eixo ordenado não pode ser maior do que 65535"
+
+#~ msgid "wrong argument type"
+#~ msgstr "tipo do argumento errado"
+
+#~ msgid "wrong index type"
+#~ msgstr "tipo do índice errado"
+
#~ msgid "specify size or data, but not both"
#~ msgstr "defina o tamanho ou os dados, porém não ambos"
diff --git a/locale/sv.po b/locale/sv.po
index 22007e11f..47739e4aa 100644
--- a/locale/sv.po
+++ b/locale/sv.po
@@ -5,8 +5,8 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-16 19:50-0500\n"
-"PO-Revision-Date: 2020-10-22 01:12+0000\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
+"PO-Revision-Date: 2020-11-30 18:06+0000\n"
"Last-Translator: Jonny Bergdahl <jonny@bergdahl.it>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: sv\n"
@@ -14,7 +14,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=n != 1;\n"
-"X-Generator: Weblate 4.3.1\n"
+"X-Generator: Weblate 4.4-dev\n"
#: main.c
msgid ""
@@ -292,11 +292,22 @@ msgstr "Adressen måste vara %d byte lång"
msgid "Address type out of range"
msgstr "Adresstyp utanför intervallet"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr "All I2C-kringutrustning används"
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "All I2C-kringutrustning används"
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr "Alla PCNT-enheter används"
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr "Alla RX FIFO i bruk"
@@ -327,6 +338,7 @@ msgstr "Alla timers för denna pinne är i bruk"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -410,8 +422,12 @@ msgid ""
"Auto-reload is on. Simply save files over USB to run them or enter REPL to "
"disable.\n"
msgstr ""
-"Autoladdning är på. Spara bara filer via USB för att köra dem eller ange "
-"REPL för att inaktivera.\n"
+"Autoladdning är på. Spara filer via USB för att köra dem eller ange REPL för "
+"att inaktivera.\n"
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr "Baudrate stöds inte av kringutrustning"
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
@@ -422,6 +438,11 @@ msgstr "Under minsta bildfrekvens"
msgid "Bit clock and word select must share a clock unit"
msgstr "Bitklocka och ordval måste dela en klockenhet"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr "Bitdjup måste vara inom 1 till 6, inte %d"
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "Bitdjup måste vara multipel av 8."
@@ -494,7 +515,7 @@ msgstr "Bufferten är för stor och kan inte allokeras"
#: shared-bindings/_bleio/PacketBuffer.c
#, c-format
msgid "Buffer too short by %d bytes"
-msgstr "Buffert år %d bytes för kort"
+msgstr "Buffert är %d bytes för kort"
#: ports/atmel-samd/common-hal/displayio/ParallelBus.c
#: ports/nrf/common-hal/displayio/ParallelBus.c
@@ -787,7 +808,7 @@ msgstr "Drivläge används inte när riktning är input."
msgid "ECB only operates on 16 bytes at a time"
msgstr "ECB arbetar endast på 16 byte åt gången"
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
msgstr "ESP-IDF-minnetilldelning misslyckades"
@@ -848,6 +869,10 @@ msgstr "Utökad annonsering i kombination med skanningssvar stöds inte."
msgid "FFT is defined for ndarrays only"
msgstr "FFT är enbart definierade för ndarrays"
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr "FTT är enbart implementerad för linjära matriser"
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
msgstr "Misslyckad SSL-handskakning"
@@ -913,6 +938,7 @@ msgid "File exists"
msgstr "Filen finns redan"
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
msgstr "Filter för komplexa"
@@ -992,6 +1018,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "Fel buffertstorlek"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr "Initieringen misslyckades på grund av minnesbrist"
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr "Indata tar för lång tid"
@@ -1072,6 +1102,7 @@ msgid "Invalid byteorder string"
msgstr "Ogiltig byteorder-sträng"
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr "Ogiltig inspelningsperiod. Giltigt intervall: 1 - 500"
@@ -1113,7 +1144,8 @@ msgid "Invalid phase"
msgstr "Ogiltig fas"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Ogiltig pinne"
@@ -1133,7 +1165,7 @@ msgstr "Ogiltig pinne för höger kanal"
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1248,6 +1280,10 @@ msgstr "Måste ange MISO- eller MOSI-pinne"
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "Måste använda ett multipel av 6 rgb-pinnar, inte %d"
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr "NVS-fel"
+
#: py/parse.c
msgid "Name too long"
msgstr "Name är för långt"
@@ -1400,14 +1436,14 @@ msgstr "Udda paritet stöds inte"
msgid "Only 8 or 16 bit mono with "
msgstr "Endast 8 eller 16 bitars mono med "
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr "Endast IPv4 SOCK_STREAM sockets stöds"
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr "Endast IPv4-adresser stöds"
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
+msgstr "Endast IPv4-socket stöds"
+
#: shared-module/displayio/OnDiskBitmap.c
#, c-format
msgid ""
@@ -1968,7 +2004,7 @@ msgstr "Avläsning av spänning tog för lång tid"
msgid "WARNING: Your code filename has two extensions\n"
msgstr "VARNING: Ditt filnamn för kod har två tillägg\n"
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr "WatchDogTimer kan inte avinitialiseras när läget är inställt på RESET"
@@ -2053,10 +2089,6 @@ msgstr "adress utanför gränsen"
msgid "addresses is empty"
msgstr "adresserna är tomma"
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr "arctan2 är enbart implementerad för scalar och ndarray"
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr "arg är en tom sekvens"
@@ -2065,6 +2097,10 @@ msgstr "arg är en tom sekvens"
msgid "argsort argument must be an ndarray"
msgstr "argumentet argsort måste vara en ndarray"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr "argsort är inte implementerad för tillplattade matriser"
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr "argumentet har fel typ"
@@ -2082,15 +2118,23 @@ msgstr "argument antal/typ matchar inte"
msgid "argument should be a '%q' not a '%q'"
msgstr "argumentet skall vara en '%q', inte en '%q'"
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr "argumenten måste vara ndarray"
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr "array och indexlängd måste vara lika"
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr "array/bytes krävs på höger sida"
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr "försök att läsa (arg)min/(arg)max av tom sekvens"
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr "försök att få argmin/argmax för en tom sekvens"
@@ -2099,16 +2143,16 @@ msgid "attributes not supported yet"
msgstr "attribut stöds inte än"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
-msgstr "axis ska vara -1, 0, None eller 1"
+msgid "axis is out of bounds"
+msgstr "axis är utanför gränsen"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
-msgstr "axis ska vara -1, 0 eller 1"
+msgid "axis must be None, or an integer"
+msgstr "axis måste vara None eller ett heltal"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
-msgstr "axis ska vara None, 0, eller 1"
+msgid "axis too long"
+msgstr "axis för lång"
#: py/builtinevex.c
msgid "bad compile mode"
@@ -2161,7 +2205,7 @@ msgstr "buffert för liten"
#: shared-bindings/socketpool/Socket.c
msgid "buffer too small for requested bytes"
-msgstr "buffertför liten för begärd längd"
+msgstr "buffert för liten för begärd längd"
#: shared-bindings/_pew/PewPew.c
msgid "buttons must be digitalio.DigitalInOut"
@@ -2210,7 +2254,7 @@ msgstr "kan bara ha upp till 4 parametrar att Xtensa assembly"
#: py/persistentcode.c
msgid "can only save bytecode"
-msgstr "kan bara spara bytekod"
+msgstr "kan bara spara bytecode"
#: py/objtype.c
msgid "can't add special method to already-subclassed class"
@@ -2313,6 +2357,10 @@ msgid ""
msgstr ""
"kan inte byta från manuell fältspecifikation till automatisk fältnumrering"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr "kan inte casta utdata med regel"
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr "kan inte skapa instanser av '%q'"
@@ -2329,10 +2377,6 @@ msgstr "kan inte importera namn %q"
msgid "cannot perform relative import"
msgstr "kan inte utföra relativ import"
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr "kan inte omforma matris (inkompatibel indata-/utdataform)"
-
#: py/emitnative.c
msgid "casting"
msgstr "casting inte implementerad"
@@ -2405,10 +2449,6 @@ msgstr "Argumenten convolve måste vara ndarray:er"
msgid "convolve arguments must not be empty"
msgstr "Argumenten convolve kan inte vara tomma"
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr "Kan inte sända indatamatris från form"
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr "kan inte invertera Vandermonde-matris"
@@ -2417,6 +2457,10 @@ msgstr "kan inte invertera Vandermonde-matris"
msgid "couldn't determine SD card version"
msgstr "kan inte avgöra SD-kortversion"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "cross is defined for 1D arrays of length 3"
+msgstr "cross är definierad för 1D-matriser med längd 3"
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr "data måste vara itererbar"
@@ -2425,10 +2469,6 @@ msgstr "data måste vara itererbar"
msgid "data must be of equal length"
msgstr "data måste vara av samma längd"
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr "ddof måste vara mindre än längden på datauppsättningen"
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr "decimaltal stöds inte"
@@ -2461,6 +2501,10 @@ msgstr "uppdateringssekvensen för dict har fel längd"
msgid "diff argument must be an ndarray"
msgstr "argumentet diff måste vara en ndarray"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr "differentieringsordning utanför intervallet"
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2576,6 +2620,10 @@ msgstr "första argumentet måste vara en callable"
msgid "first argument must be a function"
msgstr "första argumentet måste vara en funktion"
+#: extmod/ulab/code/ulab_create.c
+msgid "first argument must be a tuple of ndarrays"
+msgstr "första argumentet måste vara en tupel av ndarray"
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr "första argumentet måste vara en iterable"
@@ -2629,9 +2677,9 @@ msgstr "funktionen fick flera värden för argumentet '%q'"
msgid "function has the same sign at the ends of interval"
msgstr "funktionen har samma teckenvärden vid slutet av intervall"
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
-msgstr "funktionen är endast implementerad för scalar och ndarray"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
+msgstr "funktionen är enbart definierad för ndarray"
#: py/argcheck.c
#, c-format
@@ -2700,6 +2748,7 @@ msgstr "felaktig utfyllnad"
msgid "index is out of bounds"
msgstr "index är utanför gränserna"
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "index utanför intervallet"
@@ -2724,6 +2773,10 @@ msgstr "initial_value-längd är fel"
msgid "inline assembler must be a function"
msgstr "inline assembler måste vara en funktion"
+#: extmod/ulab/code/ndarray.c
+msgid "input and output shapes are not compatible"
+msgstr "indata- och utdataformer är inte kompatibla"
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr "indataargumentet måste vara ett heltal eller en 2-tupel"
@@ -2732,6 +2785,10 @@ msgstr "indataargumentet måste vara ett heltal eller en 2-tupel"
msgid "input array length must be power of 2"
msgstr "indataarraylängden måste vara en multipel av 2"
+#: extmod/ulab/code/ulab_create.c
+msgid "input arrays are not compatible"
+msgstr "indatamatriser är inte kompatibla"
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr "indata måste vara en iterable"
@@ -2744,6 +2801,22 @@ msgstr "indatamatrisen är asymmetrisk"
msgid "input matrix is singular"
msgstr "indatamatrisen är singulär"
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr "indata måste vara en dense ndarray"
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr "indata måste vara en tensor av rank 2"
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr "indata måste vara en ndarray"
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr "indata måste vara endimensionell"
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr "indata måste vara kvadratmatris"
@@ -2756,6 +2829,10 @@ msgstr "indata måste vara tupel, lista, range, eller ndarray"
msgid "input vectors must be of equal length"
msgstr "indatavektorer måste ha samma längd"
+#: extmod/ulab/code/poly/poly.c
+msgid "inputs are not iterable"
+msgstr "indata är inte iterbara"
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr "int() arg 2 måste vara >= 2 och <= 36"
@@ -2893,6 +2970,10 @@ msgstr "lokal variabel refererad före tilldelning"
msgid "long int not supported in this build"
msgstr "long int stöds inte i denna build"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr "loopback + tyst läge stöds inte av kringutrustning"
+
#: py/parse.c
msgid "malformed f-string"
msgstr "f-sträng har felaktigt format"
@@ -2923,10 +3004,22 @@ msgstr "max_length måste vara 0-%d när fixed_length är %s"
msgid "max_length must be > 0"
msgstr "max_length måste vara > 0"
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr "maximalt antal dimensioner är 4"
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "maximal rekursionsdjup överskriden"
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr "maxiter måste vara > 0"
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr "maxiter bör vara > 0"
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -2964,10 +3057,6 @@ msgstr "måste ge ett objekt"
msgid "must use keyword argument for key function"
msgstr "måste använda nyckelordsargument för nyckelfunktion"
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr "n måste vara mellan 0 och 9"
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr "namnet '%q' är inte definierat"
@@ -3050,6 +3139,10 @@ msgstr "icke nyckelord arg efter * / **"
msgid "non-keyword arg after keyword arg"
msgstr "icke nyckelord arg efter nyckelord arg"
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr "norm är definierad för 1D- och 2D-matriser"
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr "inte en 128-bitars UUID"
@@ -3062,10 +3155,6 @@ msgstr "inte alla argument omvandlade under strängformatering"
msgid "not enough arguments for format string"
msgstr "inte tillräckligt med argument för formatsträng"
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr "antal argument måste vara 2 eller 3"
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr "antal punkter måste vara minst 2"
@@ -3118,6 +3207,10 @@ msgstr "objekt med buffertprotokoll krävs"
msgid "odd-length string"
msgstr "sträng har udda längd"
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr "offset är för stor"
+
#: py/objstr.c py/objstrunicode.c
msgid "offset out of bounds"
msgstr "offset utanför gränserna"
@@ -3140,6 +3233,14 @@ msgstr "endast segment med steg=1 (aka Ingen) stöds"
msgid "operands could not be broadcast together"
msgstr "operander kan inte sändas tillsammans"
+#: extmod/ulab/code/ndarray.c
+msgid "operation is implemented for 1D Boolean arrays only"
+msgstr "operationen är enbart implementerad för 1D Boolean-matriser"
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr "operationen inte implementeras för tillplattad matris"
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr "åtgärden är inte implementerad för ndarray:er"
@@ -3231,6 +3332,7 @@ msgstr "pow() 3: e argument kan inte vara 0"
msgid "pow() with 3 arguments requires integers"
msgstr "pow() med 3 argument kräver heltal"
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3238,6 +3340,8 @@ msgstr "pow() med 3 argument kräver heltal"
#: ports/esp32s2/boards/espressif_saola_1_wrover/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
+#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
msgid "pressing boot button at start up.\n"
@@ -3272,6 +3376,10 @@ msgstr "relativ import"
msgid "requested length %d but object has length %d"
msgstr "begärd längd %d men objektet har längden %d"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "results cannot be cast to specified type"
+msgstr "resultaten kan inte castas till angiven typ"
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr "retur-annotation måste vara en identifierare"
@@ -3290,9 +3398,9 @@ msgstr "rgb_pins[%d] duplicerar en annan pinntilldelning"
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "rgb_pins[%d] är inte på samma port som en klocka"
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
-msgstr "höger sida måste vara en ndarray, eller en scalar"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
+msgstr "argumentet roll måste vara en ndarray"
#: py/objstr.c
msgid "rsplit(None,n)"
@@ -3319,8 +3427,8 @@ msgid "script compilation not supported"
msgstr "skriptkompilering stöds inte"
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
-msgstr "shape måste vara en 2-tupel"
+msgid "shape must be a tuple"
+msgstr "shape måste vara en tuple"
#: py/objstr.c
msgid "sign not allowed in string format specifier"
@@ -3442,6 +3550,7 @@ msgstr "tröskelvärdet måste ligga i intervallet 0-65536"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() kräver en 9-sekvens"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr "timeout-längd överskred det maximala värde som stöds"
@@ -3466,6 +3575,10 @@ msgstr "timeout för v2-kort"
msgid "timestamp out of range for platform time_t"
msgstr "timestamp utom räckvidd för plattformens \"time_t\""
+#: extmod/ulab/code/ndarray.c
+msgid "tobytes can be invoked for dense arrays only"
+msgstr "tobyte kan enbart anropas för täta matriser"
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr "för många argument för det givna formatet"
@@ -3491,6 +3604,16 @@ msgstr "tupelindex utanför intervallet"
msgid "tuple/list has wrong length"
msgstr "tupel/lista har fel längd"
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr "twai_driver_install returnerade esp-idf-fel #%d"
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr "twai_start returnerade esp-idf-fel #%d"
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3615,6 +3738,10 @@ msgstr "value_count måste vara > 0"
msgid "vectors must have same lengths"
msgstr "vektorer måste ha samma längd"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr "watchdog är inte initierad"
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr "watchdog timeout måste vara större än 0"
@@ -3627,13 +3754,13 @@ msgstr "width måste vara större än noll"
msgid "window must be <= interval"
msgstr "window måste vara <= interval"
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
-msgstr "fel typ av argument"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
+msgstr "fel axelindex"
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
-msgstr "fel indextyp"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
+msgstr "fel axel angiven"
#: extmod/ulab/code/vector/vectorise.c
msgid "wrong input type"
@@ -3683,6 +3810,54 @@ 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 "Only IPv4 SOCK_STREAM sockets supported"
+#~ msgstr "Endast IPv4 SOCK_STREAM sockets stöds"
+
+#~ msgid "arctan2 is implemented for scalars and ndarrays only"
+#~ msgstr "arctan2 är enbart implementerad för scalar och ndarray"
+
+#~ msgid "axis must be -1, 0, None, or 1"
+#~ msgstr "axis ska vara -1, 0, None eller 1"
+
+#~ msgid "axis must be -1, 0, or 1"
+#~ msgstr "axis ska vara -1, 0 eller 1"
+
+#~ msgid "axis must be None, 0, or 1"
+#~ msgstr "axis ska vara None, 0, eller 1"
+
+#~ msgid "cannot reshape array (incompatible input/output shape)"
+#~ msgstr "kan inte omforma matris (inkompatibel indata-/utdataform)"
+
+#~ msgid "could not broadast input array from shape"
+#~ msgstr "Kan inte sända indatamatris från form"
+
+#~ msgid "ddof must be smaller than length of data set"
+#~ msgstr "ddof måste vara mindre än längden på datauppsättningen"
+
+#~ msgid "function is implemented for scalars and ndarrays only"
+#~ msgstr "funktionen är endast implementerad för scalar och ndarray"
+
+#~ msgid "n must be between 0, and 9"
+#~ msgstr "n måste vara mellan 0 och 9"
+
+#~ msgid "number of arguments must be 2, or 3"
+#~ msgstr "antal argument måste vara 2 eller 3"
+
+#~ msgid "right hand side must be an ndarray, or a scalar"
+#~ msgstr "höger sida måste vara en ndarray, eller en scalar"
+
+#~ msgid "shape must be a 2-tuple"
+#~ msgstr "shape måste vara en 2-tupel"
+
+#~ msgid "sorted axis can't be longer than 65535"
+#~ msgstr "sorterad axel kan inte vara längre än 65535"
+
+#~ msgid "wrong argument type"
+#~ msgstr "fel typ av argument"
+
+#~ msgid "wrong index type"
+#~ msgstr "fel indextyp"
+
#~ msgid "specify size or data, but not both"
#~ msgstr "ange storlek eller data, men inte båda"
diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po
index 13d0dfa79..7a08bc6e8 100644
--- a/locale/zh_Latn_pinyin.po
+++ b/locale/zh_Latn_pinyin.po
@@ -6,8 +6,8 @@ msgid ""
msgstr ""
"Project-Id-Version: circuitpython-cn\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2020-10-16 19:50-0500\n"
-"PO-Revision-Date: 2020-10-22 20:48+0000\n"
+"POT-Creation-Date: 2020-11-24 15:40-0500\n"
+"PO-Revision-Date: 2020-11-19 01:28+0000\n"
"Last-Translator: hexthat <hexthat@gmail.com>\n"
"Language-Team: Chinese Hanyu Pinyin\n"
"Language: zh_Latn_pinyin\n"
@@ -15,7 +15,7 @@ msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=1; plural=0;\n"
-"X-Generator: Weblate 4.3.1\n"
+"X-Generator: Weblate 4.4-dev\n"
#: main.c
msgid ""
@@ -294,11 +294,22 @@ msgstr "Dìzhǐ bìxū shì %d zì jié zhǎng"
msgid "Address type out of range"
msgstr "Dìzhǐ lèixíng chāochū fànwéi"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "All CAN peripherals are in use"
+msgstr "suǒ yǒu CAN wài shè dōu zài shǐ yòng zhōng"
+
#: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use"
msgstr "Suǒyǒu I2C wàiwéi qì zhèngzài shǐyòng"
+#: ports/esp32s2/common-hal/countio/Counter.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
+msgid "All PCNT units in use"
+msgstr "suǒ yǒu zhèng zài shǐ yòng zhōng de PCNT dān yuán"
+
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "All RX FIFOs in use"
msgstr "Suǒyǒu shǐyòng zhōng de RX FIFO"
@@ -329,6 +340,7 @@ msgstr "Cǐ yǐn jiǎo de suǒyǒu jìshí qì zhèngzài shǐyòng"
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c
#: ports/cxd56/common-hal/pulseio/PulseOut.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
#: ports/esp32s2/common-hal/neopixel_write/__init__.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c
#: ports/esp32s2/common-hal/pulseio/PulseOut.c
@@ -415,6 +427,10 @@ msgstr ""
"Zìdòng chóngxīn jiāzài. Zhǐ xū tōngguò USB bǎocún wénjiàn lái yùnxíng tāmen "
"huò shūrù REPL jìnyòng.\n"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "Baudrate not supported by peripheral"
+msgstr "wài shè bù zhī chí de bō tè lā tè"
+
#: shared-module/displayio/Display.c
#: shared-module/framebufferio/FramebufferDisplay.c
msgid "Below minimum frame rate"
@@ -424,6 +440,11 @@ msgstr "Dī yú zuìdī zhèng sùlǜ"
msgid "Bit clock and word select must share a clock unit"
msgstr "Bǐtè shízhōng hé dānzì xuǎnzé bìxū gòngxiǎng shízhōng dānwèi"
+#: shared-bindings/rgbmatrix/RGBMatrix.c
+#, c-format
+msgid "Bit depth must be from 1 to 6 inclusive, not %d"
+msgstr "wèi shēn dù bì xū bāo hán 1 dào 6, ér bù shì %d"
+
#: shared-bindings/audiobusio/PDMIn.c
msgid "Bit depth must be multiple of 8."
msgstr "Bǐtè shēndù bìxū shì 8 bèi yǐshàng."
@@ -785,7 +806,7 @@ msgstr "Fāngxiàng shūrù shí qūdòng móshì méiyǒu shǐyòng."
msgid "ECB only operates on 16 bytes at a time"
msgstr "ECB yí cì zhǐ shǐ yòng 16 gè zì jié"
-#: ports/esp32s2/common-hal/busio/SPI.c
+#: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c
msgid "ESP-IDF memory allocation failed"
msgstr "ESP-IDF nèicún fēnpèi shībài"
@@ -846,6 +867,10 @@ msgstr "Bù zhīchí dài yǒu sǎomiáo xiǎngyìng de kuòzhǎn guǎngbò."
msgid "FFT is defined for ndarrays only"
msgstr "FFT jǐn wéi ndarrays dìng yì"
+#: extmod/ulab/code/fft/fft.c
+msgid "FFT is implemented for linear arrays only"
+msgstr ""
+
#: ports/esp32s2/common-hal/socketpool/Socket.c
msgid "Failed SSL handshake"
msgstr "SSL wòshǒu shībài"
@@ -911,6 +936,7 @@ msgid "File exists"
msgstr "Wénjiàn cúnzài"
#: ports/atmel-samd/common-hal/canio/Listener.c
+#: ports/esp32s2/common-hal/canio/Listener.c
#: ports/stm/common-hal/canio/Listener.c
msgid "Filters too complex"
msgstr "guò lǜ qì tài fù zá"
@@ -990,6 +1016,10 @@ msgstr ""
msgid "Incorrect buffer size"
msgstr "Huǎnchōng qū dàxiǎo bù zhèngquè"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "Initialization failed due to lack of memory"
+msgstr "yóu yú nèi cún bù zú, chū shǐ huà shī bài"
+
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c
msgid "Input taking too long"
msgstr "Shūrù shíjiānguò zhǎng"
@@ -1070,6 +1100,7 @@ msgid "Invalid byteorder string"
msgstr "Wúxiào de zì jié shùnxù zìfú chuàn"
#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c
+#: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
msgid "Invalid capture period. Valid range: 1 - 500"
msgstr "Wúxiào de bǔhuò zhōuqí. Yǒuxiào fànwéi: 1-500"
@@ -1111,7 +1142,8 @@ msgid "Invalid phase"
msgstr "Jiēduàn wúxiào"
#: ports/atmel-samd/common-hal/audioio/AudioOut.c
-#: ports/atmel-samd/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c
+#: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c
#: shared-module/rgbmatrix/RGBMatrix.c
msgid "Invalid pin"
msgstr "Wúxiào de yǐn jiǎo"
@@ -1131,7 +1163,7 @@ msgstr "Yòuxián tōngdào yǐn jiǎo wúxiào"
#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c
#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c
#: ports/esp32s2/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/SPI.c
-#: ports/esp32s2/common-hal/busio/UART.c
+#: ports/esp32s2/common-hal/busio/UART.c ports/esp32s2/common-hal/canio/CAN.c
#: 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
@@ -1245,6 +1277,10 @@ msgstr "Bìxū tígōng MISO huò MOSI yǐn jiǎo"
msgid "Must use a multiple of 6 rgb pins, not %d"
msgstr "bì xū shǐ yòng 6 RGB yǐn jiǎo de bèi shù, ér bù shì %d"
+#: ports/esp32s2/common-hal/nvm/ByteArray.c
+msgid "NVS Error"
+msgstr ""
+
#: py/parse.c
msgid "Name too long"
msgstr "Míngchēng tài zhǎng"
@@ -1396,14 +1432,14 @@ msgstr "Bù zhīchí jīshù"
msgid "Only 8 or 16 bit mono with "
msgstr "Zhǐyǒu 8 huò 16 wèi dānwèi "
-#: ports/esp32s2/common-hal/socketpool/SocketPool.c
-msgid "Only IPv4 SOCK_STREAM sockets supported"
-msgstr "Jǐn zhīchí IPv4 SOCK_STREAM tào jiē zì"
-
#: ports/esp32s2/common-hal/wifi/__init__.c
msgid "Only IPv4 addresses supported"
msgstr "Jǐn zhīchí IPv4 dìzhǐ"
+#: ports/esp32s2/common-hal/socketpool/SocketPool.c
+msgid "Only IPv4 sockets supported"
+msgstr ""
+
#: shared-module/displayio/OnDiskBitmap.c
#, c-format
msgid ""
@@ -1959,7 +1995,7 @@ msgstr "Diànyā dòu qǔ chāoshí"
msgid "WARNING: Your code filename has two extensions\n"
msgstr "Jǐnggào: Nǐ de dàimǎ wénjiàn míng yǒu liǎng gè kuòzhǎn míng\n"
-#: shared-bindings/watchdog/WatchDogTimer.c
+#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET"
msgstr "Yīdàn jiāng móshì shèzhì wèi RESET, jiù wúfǎ chūshǐhuà WatchDog Timer"
@@ -2045,10 +2081,6 @@ msgstr "dìzhǐ chāochū biānjiè"
msgid "addresses is empty"
msgstr "dìzhǐ wèi kōng"
-#: extmod/ulab/code/vector/vectorise.c
-msgid "arctan2 is implemented for scalars and ndarrays only"
-msgstr "arctan2 jǐn zhēnduì biāoliàng hé ndarray shíxiàn"
-
#: py/modbuiltins.c
msgid "arg is an empty sequence"
msgstr "cānshù shì yīgè kōng de xùliè"
@@ -2057,6 +2089,10 @@ msgstr "cānshù shì yīgè kōng de xùliè"
msgid "argsort argument must be an ndarray"
msgstr "argsort cānshù bìxū shì ndarray"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "argsort is not implemented for flattened arrays"
+msgstr ""
+
#: py/runtime.c
msgid "argument has wrong type"
msgstr "cānshù lèixíng cuòwù"
@@ -2074,15 +2110,23 @@ msgstr "cānshù biānhào/lèixíng bù pǐpèi"
msgid "argument should be a '%q' not a '%q'"
msgstr "cānshù yīnggāi shì '%q', 'bùshì '%q'"
-#: extmod/ulab/code/linalg/linalg.c
+#: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c
msgid "arguments must be ndarrays"
msgstr "cānshù bìxū shì ndarrays"
+#: extmod/ulab/code/ndarray.c
+msgid "array and index length must be equal"
+msgstr ""
+
#: py/objarray.c shared-bindings/nvm/ByteArray.c
msgid "array/bytes required on right side"
msgstr "yòu cè xūyào shùzǔ/zì jié"
#: extmod/ulab/code/numerical/numerical.c
+msgid "attempt to get (arg)min/(arg)max of empty sequence"
+msgstr ""
+
+#: extmod/ulab/code/numerical/numerical.c
msgid "attempt to get argmin/argmax of an empty sequence"
msgstr "chángshì huòqǔ kōng xùliè de argmin/ argmax"
@@ -2091,16 +2135,16 @@ msgid "attributes not supported yet"
msgstr "shǔxìng shàngwèi zhīchí"
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, None, or 1"
-msgstr "zhóu bìxū wèi-1,0, wú huò 1"
+msgid "axis is out of bounds"
+msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be -1, 0, or 1"
-msgstr "zhóu bìxū wèi-1,0 huò 1"
+msgid "axis must be None, or an integer"
+msgstr ""
#: extmod/ulab/code/numerical/numerical.c
-msgid "axis must be None, 0, or 1"
-msgstr "zhóu bìxū wèi None,0 huò 1"
+msgid "axis too long"
+msgstr ""
#: py/builtinevex.c
msgid "bad compile mode"
@@ -2303,6 +2347,10 @@ msgid ""
"can't switch from manual field specification to automatic field numbering"
msgstr "wúfǎ cóng shǒudòng zìduàn guīgé qiēhuàn dào zìdòng zìduàn biānhào"
+#: extmod/ulab/code/ndarray_operators.c
+msgid "cannot cast output with casting rule"
+msgstr ""
+
#: py/objtype.c
msgid "cannot create '%q' instances"
msgstr "wúfǎ chuàngjiàn '%q' ' shílì"
@@ -2319,10 +2367,6 @@ msgstr "wúfǎ dǎorù míngchēng %q"
msgid "cannot perform relative import"
msgstr "wúfǎ zhíxíng xiāngguān dǎorù"
-#: extmod/ulab/code/ndarray.c
-msgid "cannot reshape array (incompatible input/output shape)"
-msgstr "wúfǎ zhěngxíng shùzǔ (bù jiānróng de shūrù/shūchū xíngzhuàng)"
-
#: py/emitnative.c
msgid "casting"
msgstr "tóuyǐng"
@@ -2398,10 +2442,6 @@ msgstr "juàn jī cānshù bìxū shì ndarrays"
msgid "convolve arguments must not be empty"
msgstr "juàn jī cān shǔ bùnéng wéi kōng"
-#: extmod/ulab/code/ndarray.c
-msgid "could not broadast input array from shape"
-msgstr "wúfǎ guǎngbò xíngzhuàng de shūrù shùzǔ"
-
#: extmod/ulab/code/poly/poly.c
msgid "could not invert Vandermonde matrix"
msgstr "wúfǎ fǎn zhuǎn fàndéméng dé jǔzhèn"
@@ -2410,6 +2450,10 @@ msgstr "wúfǎ fǎn zhuǎn fàndéméng dé jǔzhèn"
msgid "couldn't determine SD card version"
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 ""
+
#: extmod/ulab/code/approx/approx.c
msgid "data must be iterable"
msgstr "shùjù bìxū shì kě diédài de"
@@ -2418,10 +2462,6 @@ msgstr "shùjù bìxū shì kě diédài de"
msgid "data must be of equal length"
msgstr "shùjù chángdù bìxū xiāngděng"
-#: extmod/ulab/code/numerical/numerical.c
-msgid "ddof must be smaller than length of data set"
-msgstr "ddof bìxū xiǎoyú shùjù jí de chángdù"
-
#: py/parsenum.c
msgid "decimal numbers not supported"
msgstr "bù zhīchí xiǎoshù shù"
@@ -2453,6 +2493,10 @@ msgstr "yǔfǎ gēngxīn xùliè de chángdù cuòwù"
msgid "diff argument must be an ndarray"
msgstr "bùtóng de cānshù bìxū shì ndarray"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "differentiation order out of range"
+msgstr ""
+
#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c
#: shared-bindings/math/__init__.c
msgid "division by zero"
@@ -2568,6 +2612,10 @@ msgstr "dì yī gè cānshù bìxū shì kě tiáo yòng de"
msgid "first argument must be a function"
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 ""
+
#: extmod/ulab/code/ndarray.c
msgid "first argument must be an iterable"
msgstr "dì yī gè cānshù bìxū shì kě diédài de"
@@ -2621,9 +2669,9 @@ msgstr "hánshù huòdé cānshù '%q' de duōchóng zhí"
msgid "function has the same sign at the ends of interval"
msgstr "hánshù zài jiàngé mòwěi jùyǒu xiāngtóng de fúhào"
-#: extmod/ulab/code/compare/compare.c
-msgid "function is implemented for scalars and ndarrays only"
-msgstr "gāi hánshù jǐn zhēnduì biāoliàng hé ndarray shíxiàn"
+#: extmod/ulab/code/ndarray.c
+msgid "function is defined for ndarrays only"
+msgstr ""
#: py/argcheck.c
#, c-format
@@ -2692,6 +2740,7 @@ msgstr "bù zhèngquè de tiánchōng"
msgid "index is out of bounds"
msgstr "suǒyǐn chāochū fànwéi"
+#: extmod/ulab/code/numerical/numerical.c
#: ports/esp32s2/common-hal/pulseio/PulseIn.c py/obj.c
msgid "index out of range"
msgstr "suǒyǐn chāochū fànwéi"
@@ -2716,6 +2765,10 @@ msgstr "Initial_value chángdù cuòwù"
msgid "inline assembler must be a function"
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 ""
+
#: extmod/ulab/code/ulab_create.c
msgid "input argument must be an integer or a 2-tuple"
msgstr "shūrù cānshù bìxū shì zhěngshù huò 2 yuán zǔ"
@@ -2724,6 +2777,10 @@ msgstr "shūrù cānshù bìxū shì zhěngshù huò 2 yuán zǔ"
msgid "input array length must be power of 2"
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 ""
+
#: extmod/ulab/code/poly/poly.c
msgid "input data must be an iterable"
msgstr "shūrù shùjù bìxū shì kě diédài de"
@@ -2736,6 +2793,22 @@ msgstr "shūrù jǔzhèn bù duìchèn"
msgid "input matrix is singular"
msgstr "shūrù jǔzhèn shì qíyì de"
+#: extmod/ulab/code/user/user.c
+msgid "input must be a dense ndarray"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c
+msgid "input must be a tensor of rank 2"
+msgstr ""
+
+#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c
+msgid "input must be an ndarray"
+msgstr ""
+
+#: extmod/ulab/code/filter/filter.c
+msgid "input must be one-dimensional"
+msgstr ""
+
#: extmod/ulab/code/linalg/linalg.c
msgid "input must be square matrix"
msgstr "shūrù bìxū wèi fāng jǔzhèn"
@@ -2748,6 +2821,10 @@ msgstr "shūrù bìxū shì yuán zǔ, lièbiǎo, fànwéi huò ndarray"
msgid "input vectors must be of equal length"
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 ""
+
#: py/parsenum.c
msgid "int() arg 2 must be >= 2 and <= 36"
msgstr "zhěngshù() cānshù 2 bìxū > = 2 qiě <= 36"
@@ -2883,6 +2960,10 @@ msgstr "fùzhí qián yǐnyòng de júbù biànliàng"
msgid "long int not supported in this build"
msgstr "cǐ bǎnběn bù zhīchí zhǎng zhěngshù"
+#: ports/esp32s2/common-hal/canio/CAN.c
+msgid "loopback + silent mode not supported by peripheral"
+msgstr "Wài shè bù zhī chí huán huí + jìng yīn mó shì"
+
#: py/parse.c
msgid "malformed f-string"
msgstr "jīxíng de f-string"
@@ -2913,10 +2994,22 @@ msgstr "Dāng gùdìng chángdù wèi %s shí, zuìdà chángdù bìxū wèi 0-%
msgid "max_length must be > 0"
msgstr "Max_length bìxū > 0"
+#: extmod/ulab/code/ndarray.c
+msgid "maximum number of dimensions is 4"
+msgstr ""
+
#: py/runtime.c
msgid "maximum recursion depth exceeded"
msgstr "chāochū zuìdà dìguī shēndù"
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter must be > 0"
+msgstr "maxiter bì xū > 0"
+
+#: extmod/ulab/code/approx/approx.c
+msgid "maxiter should be > 0"
+msgstr "maxiter yìng wéi > 0"
+
#: py/runtime.c
#, c-format
msgid "memory allocation failed, allocating %u bytes"
@@ -2954,10 +3047,6 @@ msgstr "bìxū tíchū duìxiàng"
msgid "must use keyword argument for key function"
msgstr "bìxū shǐyòng guānjiàn cí cānshù"
-#: extmod/ulab/code/numerical/numerical.c
-msgid "n must be between 0, and 9"
-msgstr "n bìxū jiè yú 0 dào 9 zhī jiān"
-
#: py/runtime.c
msgid "name '%q' is not defined"
msgstr "míngchēng '%q' wèi dìngyì"
@@ -3040,6 +3129,10 @@ msgstr "zài */** zhīhòu fēi guānjiàn cí cānshù"
msgid "non-keyword arg after keyword arg"
msgstr "guānjiàn zì cānshù zhīhòu de fēi guānjiàn zì cānshù"
+#: extmod/ulab/code/linalg/linalg.c
+msgid "norm is defined for 1D and 2D arrays"
+msgstr ""
+
#: shared-bindings/_bleio/UUID.c
msgid "not a 128-bit UUID"
msgstr "bùshì 128 wèi UUID"
@@ -3052,10 +3145,6 @@ msgstr "bùshì zì chuàn géshì huà guòchéng zhōng zhuǎnhuàn de suǒyǒ
msgid "not enough arguments for format string"
msgstr "géshì zìfú chuàn cān shǔ bùzú"
-#: extmod/ulab/code/poly/poly.c
-msgid "number of arguments must be 2, or 3"
-msgstr "cānshù shùliàng bìxū wèi 2 huò 3"
-
#: extmod/ulab/code/ulab_create.c
msgid "number of points must be at least 2"
msgstr "diǎnshù bìxū zhìshǎo wèi 2"
@@ -3108,6 +3197,10 @@ msgstr "xūyào huǎnchōng qū xiéyì de duìxiàng"
msgid "odd-length string"
msgstr "jīshù zìfú chuàn"
+#: extmod/ulab/code/ulab_create.c
+msgid "offset is too large"
+msgstr ""
+
#: py/objstr.c py/objstrunicode.c
msgid "offset out of bounds"
msgstr "piānlí biānjiè"
@@ -3130,6 +3223,14 @@ msgstr "jǐn zhīchí bù zhǎng = 1(jí wú) de qiēpiàn"
msgid "operands could not be broadcast together"
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 ""
+
+#: extmod/ulab/code/numerical/numerical.c
+msgid "operation is not implemented for flattened array"
+msgstr ""
+
#: extmod/ulab/code/numerical/numerical.c
msgid "operation is not implemented on ndarrays"
msgstr "cāozuò wèi zài ndarrays shàng shíxiàn"
@@ -3220,6 +3321,7 @@ msgstr "pow() 3 cān shǔ bùnéng wéi 0"
msgid "pow() with 3 arguments requires integers"
msgstr "pow() yǒu 3 cānshù xūyào zhěngshù"
+#: ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
#: ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h
#: ports/esp32s2/boards/electroniccats_bastwifi/mpconfigboard.h
#: ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.h
@@ -3227,6 +3329,8 @@ msgstr "pow() yǒu 3 cānshù xūyào zhěngshù"
#: ports/esp32s2/boards/espressif_saola_1_wrover/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
+#: ports/esp32s2/boards/targett_module_clip_wrover/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
#: ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h
msgid "pressing boot button at start up.\n"
@@ -3261,6 +3365,10 @@ msgstr "xiāngduì dǎorù"
msgid "requested length %d but object has length %d"
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 ""
+
#: py/compile.c
msgid "return annotation must be an identifier"
msgstr "fǎnhuí zhùshì bìxū shì biāozhì fú"
@@ -3279,9 +3387,9 @@ msgstr "rgb_pins[%d] fùzhì lìng yīgè yǐn jiǎo fēnpèi"
msgid "rgb_pins[%d] is not on the same port as clock"
msgstr "rgb_pins[%d] yǔ shízhōng bùzài tóng yīgè duānkǒu shàng"
-#: extmod/ulab/code/ndarray.c
-msgid "right hand side must be an ndarray, or a scalar"
-msgstr "yòubiān bìxū shì ndarray huò biāoliàng"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "roll argument must be an ndarray"
+msgstr ""
#: py/objstr.c
msgid "rsplit(None,n)"
@@ -3308,8 +3416,8 @@ msgid "script compilation not supported"
msgstr "bù zhīchí jiǎoběn biānyì"
#: extmod/ulab/code/ndarray.c
-msgid "shape must be a 2-tuple"
-msgstr "xíngzhuàng bìxū shì 2 yuán zǔ"
+msgid "shape must be a tuple"
+msgstr ""
#: py/objstr.c
msgid "sign not allowed in string format specifier"
@@ -3431,6 +3539,7 @@ msgstr "yùzhí bìxū zài fànwéi 0-65536"
msgid "time.struct_time() takes a 9-sequence"
msgstr "time.struct_time() xūyào 9 xùliè"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
#: ports/nrf/common-hal/watchdog/WatchDogTimer.c
msgid "timeout duration exceeded the maximum supported value"
msgstr "chāoshí shíjiān chāoguò zuìdà zhīchí zhí"
@@ -3455,6 +3564,10 @@ msgstr "děngdài v2 kǎ chāoshí"
msgid "timestamp out of range for platform time_t"
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 ""
+
#: shared-module/struct/__init__.c
msgid "too many arguments provided with the given format"
msgstr "tígōng jǐ dìng géshì de cānshù tài duō"
@@ -3480,6 +3593,16 @@ msgstr "yuán zǔ suǒyǐn chāochū fànwéi"
msgid "tuple/list has wrong length"
msgstr "yuán zǔ/lièbiǎo chángdù cuòwù"
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_driver_install returned esp-idf error #%d"
+msgstr "twai_driver_install fǎn huí esp-idf cuò wù #%d"
+
+#: ports/esp32s2/common-hal/canio/CAN.c
+#, c-format
+msgid "twai_start returned esp-idf error #%d"
+msgstr "twai_start fǎn huí esp -idf cuò wù #%d"
+
#: ports/atmel-samd/common-hal/busio/UART.c
#: ports/esp32s2/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c
#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c
@@ -3604,6 +3727,10 @@ msgstr "zhí jìshù bìxū wèi > 0"
msgid "vectors must have same lengths"
msgstr "xiàngliàng bìxū jùyǒu xiāngtóng de chángdù"
+#: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
+msgid "watchdog not initialized"
+msgstr "wèi chū shǐ huà jiān shì qì"
+
#: shared-bindings/watchdog/WatchDogTimer.c
msgid "watchdog timeout must be greater than 0"
msgstr "kān mén gǒu chāoshí bìxū dàyú 0"
@@ -3616,13 +3743,13 @@ msgstr "kuāndù bìxū dàyú líng"
msgid "window must be <= interval"
msgstr "Chuāngkǒu bìxū shì <= jiàngé"
-#: extmod/ulab/code/linalg/linalg.c
-msgid "wrong argument type"
-msgstr "cuòwù de cānshù lèixíng"
+#: extmod/ulab/code/numerical/numerical.c
+msgid "wrong axis index"
+msgstr ""
-#: extmod/ulab/code/ndarray.c
-msgid "wrong index type"
-msgstr "cuòwù de suǒyǐn lèixíng"
+#: extmod/ulab/code/ulab_create.c
+msgid "wrong axis specified"
+msgstr ""
#: extmod/ulab/code/vector/vectorise.c
msgid "wrong input type"
@@ -3672,6 +3799,54 @@ 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 "Only IPv4 SOCK_STREAM sockets supported"
+#~ msgstr "Jǐn zhīchí IPv4 SOCK_STREAM tào jiē zì"
+
+#~ msgid "arctan2 is implemented for scalars and ndarrays only"
+#~ msgstr "arctan2 jǐn zhēnduì biāoliàng hé ndarray shíxiàn"
+
+#~ msgid "axis must be -1, 0, None, or 1"
+#~ msgstr "zhóu bìxū wèi-1,0, wú huò 1"
+
+#~ msgid "axis must be -1, 0, or 1"
+#~ msgstr "zhóu bìxū wèi-1,0 huò 1"
+
+#~ msgid "axis must be None, 0, or 1"
+#~ msgstr "zhóu bìxū wèi None,0 huò 1"
+
+#~ msgid "cannot reshape array (incompatible input/output shape)"
+#~ msgstr "wúfǎ zhěngxíng shùzǔ (bù jiānróng de shūrù/shūchū xíngzhuàng)"
+
+#~ msgid "could not broadast input array from shape"
+#~ msgstr "wúfǎ guǎngbò xíngzhuàng de shūrù shùzǔ"
+
+#~ msgid "ddof must be smaller than length of data set"
+#~ msgstr "ddof bìxū xiǎoyú shùjù jí de chángdù"
+
+#~ msgid "function is implemented for scalars and ndarrays only"
+#~ msgstr "gāi hánshù jǐn zhēnduì biāoliàng hé ndarray shíxiàn"
+
+#~ msgid "n must be between 0, and 9"
+#~ msgstr "n bìxū jiè yú 0 dào 9 zhī jiān"
+
+#~ msgid "number of arguments must be 2, or 3"
+#~ msgstr "cānshù shùliàng bìxū wèi 2 huò 3"
+
+#~ msgid "right hand side must be an ndarray, or a scalar"
+#~ msgstr "yòubiān bìxū shì ndarray huò biāoliàng"
+
+#~ msgid "shape must be a 2-tuple"
+#~ msgstr "xíngzhuàng bìxū shì 2 yuán zǔ"
+
+#~ msgid "sorted axis can't be longer than 65535"
+#~ msgstr "pái xù zhóu bù néng chāo guò 65535"
+
+#~ msgid "wrong argument type"
+#~ msgstr "cuòwù de cānshù lèixíng"
+
+#~ msgid "wrong index type"
+#~ msgstr "cuòwù de suǒyǐn lèixíng"
+
#~ msgid "Must provide SCK pin"
#~ msgstr "bì xū tí gòng SCK yǐn jiǎo"
diff --git a/main.c b/main.c
index b43b3b8c8..1389f524b 100755
--- a/main.c
+++ b/main.c
@@ -123,15 +123,15 @@ void start_mp(supervisor_allocation* heap) {
// to recover from limit hit. (Limit is measured in bytes.)
mp_stack_ctrl_init();
- if (stack_alloc != NULL) {
- mp_stack_set_limit(stack_alloc->length - 1024);
+ if (stack_get_bottom() != NULL) {
+ mp_stack_set_limit(stack_get_length() - 1024);
}
#if MICROPY_MAX_STACK_USAGE
// _ezero (same as _ebss) is an int, so start 4 bytes above it.
- if (stack_alloc != NULL) {
- mp_stack_set_bottom(stack_alloc->ptr);
+ if (stack_get_bottom() != NULL) {
+ mp_stack_set_bottom(stack_get_bottom());
mp_stack_fill_with_sentinel();
}
#endif
@@ -148,7 +148,7 @@ void start_mp(supervisor_allocation* heap) {
#endif
#if MICROPY_ENABLE_GC
- gc_init(heap->ptr, heap->ptr + heap->length / 4);
+ gc_init(heap->ptr, heap->ptr + get_allocation_length(heap) / 4);
#endif
mp_init();
mp_obj_list_init(mp_sys_path, 0);
@@ -234,10 +234,12 @@ void cleanup_after_vm(supervisor_allocation* heap) {
common_hal_canio_reset();
#endif
- reset_port();
+ // reset_board_busses() first because it may release pins from the never_reset state, so that
+ // reset_port() can reset them.
#if CIRCUITPY_BOARD
reset_board_busses();
#endif
+ reset_port();
reset_board();
reset_status_led();
}
@@ -449,9 +451,6 @@ int __attribute__((used)) main(void) {
// initialise the cpu and peripherals
safe_mode_t safe_mode = port_init();
- // Init memory after the port in case the port needs to set aside memory.
- memory_init();
-
// Turn on LEDs
init_status_leds();
rgb_led_status_init();
diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h
index 6bc9bb706..8b015df05 100644
--- a/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h
+++ b/ports/atmel-samd/boards/bdmicro_vina_d51/mpconfigboard.h
@@ -12,14 +12,14 @@
#define BOARD_HAS_CRYSTAL 1
-#define DEFAULT_I2C_BUS_SDA (&pin_PB02)
-#define DEFAULT_I2C_BUS_SCL (&pin_PB03)
+#define DEFAULT_I2C_BUS_SCL (&pin_PA16)
+#define DEFAULT_I2C_BUS_SDA (&pin_PA17)
+#define DEFAULT_UART_BUS_RX (&pin_PB20)
+#define DEFAULT_UART_BUS_TX (&pin_PB21)
#define DEFAULT_SPI_BUS_MISO (&pin_PB23)
-#define DEFAULT_UART_BUS_TX (&pin_PB24)
-#define DEFAULT_UART_BUS_RX (&pin_PB25)
#define DEFAULT_SPI_BUS_MOSI (&pin_PC27)
#define DEFAULT_SPI_BUS_SCK (&pin_PC28)
-#define MICROPY_HW_LED_STATUS (&pin_PA15)
+#define MICROPY_HW_LED_STATUS (&pin_PA23)
#define MICROPY_HW_LED_RX (&pin_PC05)
#define MICROPY_HW_LED_TX (&pin_PC06)
diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c
index 931e0328f..8eeab8a9a 100644
--- a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c
+++ b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c
@@ -1,64 +1,70 @@
#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_PB08) },
- { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB09) },
- { MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PC00) },
- { MP_ROM_QSTR(MP_QSTR_A11), MP_ROM_PTR(&pin_PC01) },
- { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA04) },
- { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA06) },
- { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA07) },
- { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PB00) },
- { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PB01) },
- { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB05) },
- { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PB06) },
- { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB07) },
- { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PC10) },
- { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PC11) },
- { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA14) },
- { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA13) },
- { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PB14) },
- { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PB15) },
- { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PC20) },
- { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PC21) },
- { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA12) },
- { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB31) },
- { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA16) },
- { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA17) },
+ { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) },
+ { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) },
+ { MP_ROM_QSTR(MP_QSTR_A10), MP_ROM_PTR(&pin_PB07) },
+ { MP_ROM_QSTR(MP_QSTR_A11), MP_ROM_PTR(&pin_PC00) },
+ { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA07) },
+ { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PB08) },
+ { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PB09) },
+ { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PC02) },
+ { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PC03) },
+ { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PB04) },
+ { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PB05) },
+ { MP_ROM_QSTR(MP_QSTR_A9), MP_ROM_PTR(&pin_PB06) },
+ { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB31) },
+ { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PC16) },
+ { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PC13) },
+ { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA14) },
+ { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA15) },
+ { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PB12) },
+ { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PB13) },
+ { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PC17) },
+ { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PC18) },
+ { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PC19) },
+ { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PC20) },
+ { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PC21) },
+ { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB18) },
+ { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PB19) },
+ { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PC12) },
{ MP_ROM_QSTR(MP_QSTR_DAC0), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_PA05) },
- { MP_ROM_QSTR(MP_QSTR_ESP01_EN), MP_ROM_PTR(&pin_PC03) },
+ { MP_ROM_QSTR(MP_QSTR_ESP01_EN), MP_ROM_PTR(&pin_PC15) },
+ { MP_ROM_QSTR(MP_QSTR_E5), MP_ROM_PTR(&pin_PC15) },
{ MP_ROM_QSTR(MP_QSTR_ESP01_GPIO0), MP_ROM_PTR(&pin_PA18) },
- { MP_ROM_QSTR(MP_QSTR_UART3_RTS), MP_ROM_PTR(&pin_PA18) },
+ { MP_ROM_QSTR(MP_QSTR_E3), MP_ROM_PTR(&pin_PA18) },
{ MP_ROM_QSTR(MP_QSTR_ESP01_GPIO2), MP_ROM_PTR(&pin_PA19) },
- { MP_ROM_QSTR(MP_QSTR_UART3_CTS), MP_ROM_PTR(&pin_PA19) },
- { MP_ROM_QSTR(MP_QSTR_ESP01_RESET), MP_ROM_PTR(&pin_PC02) },
- { MP_ROM_QSTR(MP_QSTR_ESP01_RX), MP_ROM_PTR(&pin_PB21) },
- { MP_ROM_QSTR(MP_QSTR_UART3_RX), MP_ROM_PTR(&pin_PB21) },
- { MP_ROM_QSTR(MP_QSTR_ESP01_TX), MP_ROM_PTR(&pin_PB20) },
- { MP_ROM_QSTR(MP_QSTR_UART3_TX), MP_ROM_PTR(&pin_PB20) },
- { MP_ROM_QSTR(MP_QSTR_I2C_SCL), MP_ROM_PTR(&pin_PB03) },
- { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PB03) },
- { MP_ROM_QSTR(MP_QSTR_I2C_SDA), MP_ROM_PTR(&pin_PB02) },
- { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PB02) },
+ { MP_ROM_QSTR(MP_QSTR_E4), MP_ROM_PTR(&pin_PA19) },
+ { MP_ROM_QSTR(MP_QSTR_ESP01_RESET), MP_ROM_PTR(&pin_PC14) },
+ { MP_ROM_QSTR(MP_QSTR_E6), MP_ROM_PTR(&pin_PC14) },
+ { MP_ROM_QSTR(MP_QSTR_ESP01_RX), MP_ROM_PTR(&pin_PA12) },
+ { MP_ROM_QSTR(MP_QSTR_UART3_RX), MP_ROM_PTR(&pin_PA12) },
+ { MP_ROM_QSTR(MP_QSTR_I2C3_SCL), MP_ROM_PTR(&pin_PA12) },
+ { MP_ROM_QSTR(MP_QSTR_E2), MP_ROM_PTR(&pin_PA12) },
+ { MP_ROM_QSTR(MP_QSTR_ESP01_TX), MP_ROM_PTR(&pin_PA13) },
+ { MP_ROM_QSTR(MP_QSTR_UART3_TX), MP_ROM_PTR(&pin_PA13) },
+ { MP_ROM_QSTR(MP_QSTR_I2C3_SDA), MP_ROM_PTR(&pin_PA13) },
+ { MP_ROM_QSTR(MP_QSTR_E1), MP_ROM_PTR(&pin_PA13) },
+ { MP_ROM_QSTR(MP_QSTR_I2C1_SCL), MP_ROM_PTR(&pin_PA16) },
+ { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA16) },
+ { MP_ROM_QSTR(MP_QSTR_I2C1_SDA), MP_ROM_PTR(&pin_PA17) },
+ { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_I2S_FS_0), MP_ROM_PTR(&pin_PA20) },
- { MP_ROM_QSTR(MP_QSTR_I2S_FS_1), MP_ROM_PTR(&pin_PA23) },
{ MP_ROM_QSTR(MP_QSTR_I2S_MCK_0), MP_ROM_PTR(&pin_PB17) },
- { MP_ROM_QSTR(MP_QSTR_I2S_MCK_1), MP_ROM_PTR(&pin_PB13) },
{ MP_ROM_QSTR(MP_QSTR_I2S_SCK_0), MP_ROM_PTR(&pin_PB16) },
- { MP_ROM_QSTR(MP_QSTR_I2S_SCK_1), MP_ROM_PTR(&pin_PB12) },
{ MP_ROM_QSTR(MP_QSTR_I2S_SDI), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_I2S_SDO), MP_ROM_PTR(&pin_PA21) },
- { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_PA15) },
- { MP_ROM_QSTR(MP_QSTR_LED_STATUS), MP_ROM_PTR(&pin_PA15) },
- { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_PB18) },
- { MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_PB19) },
+ { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_PA23) },
+ { MP_ROM_QSTR(MP_QSTR_LED_STATUS), MP_ROM_PTR(&pin_PA23) },
+ { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_PB15) },
+ { MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_PB14) },
{ MP_ROM_QSTR(MP_QSTR_LED_RX), MP_ROM_PTR(&pin_PC05) },
{ MP_ROM_QSTR(MP_QSTR_LED_TX), MP_ROM_PTR(&pin_PC06) },
- { MP_ROM_QSTR(MP_QSTR_RS485_RE), MP_ROM_PTR(&pin_PC15) },
- { MP_ROM_QSTR(MP_QSTR_RS485_RX), MP_ROM_PTR(&pin_PC13) },
- { MP_ROM_QSTR(MP_QSTR_RS485_TE), MP_ROM_PTR(&pin_PC14) },
- { MP_ROM_QSTR(MP_QSTR_RS485_TX), MP_ROM_PTR(&pin_PC12) },
+ { MP_ROM_QSTR(MP_QSTR_RS485_RE), MP_ROM_PTR(&pin_PB01) },
+ { MP_ROM_QSTR(MP_QSTR_RS485_RX), MP_ROM_PTR(&pin_PB03) },
+ { MP_ROM_QSTR(MP_QSTR_RS485_TE), MP_ROM_PTR(&pin_PB00) },
+ { MP_ROM_QSTR(MP_QSTR_RS485_TX), MP_ROM_PTR(&pin_PB02) },
{ MP_ROM_QSTR(MP_QSTR_SPI_MISO), MP_ROM_PTR(&pin_PB23) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB23) },
{ MP_ROM_QSTR(MP_QSTR_SPI_MOSI), MP_ROM_PTR(&pin_PC27) },
@@ -67,14 +73,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PC28) },
{ MP_ROM_QSTR(MP_QSTR_SPI_SS), MP_ROM_PTR(&pin_PB22) },
{ MP_ROM_QSTR(MP_QSTR_SS), MP_ROM_PTR(&pin_PB22) },
- { MP_ROM_QSTR(MP_QSTR_UART1_CTS), MP_ROM_PTR(&pin_PC19) },
- { MP_ROM_QSTR(MP_QSTR_UART1_RTS), MP_ROM_PTR(&pin_PC18) },
- { MP_ROM_QSTR(MP_QSTR_UART1_RX), MP_ROM_PTR(&pin_PC17) },
- { MP_ROM_QSTR(MP_QSTR_UART1_TX), MP_ROM_PTR(&pin_PC16) },
- { MP_ROM_QSTR(MP_QSTR_UART2_RX), MP_ROM_PTR(&pin_PB25) },
- { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB25) },
- { MP_ROM_QSTR(MP_QSTR_UART2_TX), MP_ROM_PTR(&pin_PB24) },
- { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB24) },
+ { MP_ROM_QSTR(MP_QSTR_UART1_CTS), MP_ROM_PTR(&pin_PC25) },
+ { MP_ROM_QSTR(MP_QSTR_UART1_RTS), MP_ROM_PTR(&pin_PC24) },
+ { MP_ROM_QSTR(MP_QSTR_UART1_RX), MP_ROM_PTR(&pin_PB24) },
+ { MP_ROM_QSTR(MP_QSTR_UART1_TX), MP_ROM_PTR(&pin_PB25) },
+ { MP_ROM_QSTR(MP_QSTR_UART2_RX), MP_ROM_PTR(&pin_PB20) },
+ { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB20) },
+ { MP_ROM_QSTR(MP_QSTR_I2C2_SCL), MP_ROM_PTR(&pin_PB20) },
+ { MP_ROM_QSTR(MP_QSTR_UART2_TX), MP_ROM_PTR(&pin_PB21) },
+ { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB21) },
+ { MP_ROM_QSTR(MP_QSTR_I2C2_SDA), MP_ROM_PTR(&pin_PB21) },
{ 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) },
diff --git a/ports/atmel-samd/boards/cp_sapling_m0/board.c b/ports/atmel-samd/boards/cp_sapling_m0/board.c
new file mode 100644
index 000000000..ce5636676
--- /dev/null
+++ b/ports/atmel-samd/boards/cp_sapling_m0/board.c
@@ -0,0 +1,40 @@
+/*
+ * 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 "boards/board.h"
+#include "common-hal/microcontroller/Pin.h"
+#include "supervisor/shared/board.h"
+#include "hal/include/hal_gpio.h"
+
+void board_init(void) {
+}
+
+bool board_requests_safe_mode(void) {
+ return false;
+}
+
+void reset_board(void) {
+}
diff --git a/ports/atmel-samd/boards/cp_sapling_m0/mpconfigboard.h b/ports/atmel-samd/boards/cp_sapling_m0/mpconfigboard.h
new file mode 100644
index 000000000..c67f022eb
--- /dev/null
+++ b/ports/atmel-samd/boards/cp_sapling_m0/mpconfigboard.h
@@ -0,0 +1,57 @@
+#define MICROPY_HW_BOARD_NAME "CP Sapling M0"
+#define MICROPY_HW_MCU_NAME "samd21e18"
+
+#define MICROPY_HW_NEOPIXEL (&pin_PA15)
+
+#define MICROPY_PORT_A (0)
+#define MICROPY_PORT_B (0)
+#define MICROPY_PORT_C (0)
+
+#define IGNORE_PIN_PA02 1
+#define IGNORE_PIN_PA03 1
+#define IGNORE_PIN_PA04 1
+#define IGNORE_PIN_PA05 1
+#define IGNORE_PIN_PA06 1
+#define IGNORE_PIN_PA07 1
+#define IGNORE_PIN_PA12 1
+#define IGNORE_PIN_PA13 1
+#define IGNORE_PIN_PA14 1
+#define IGNORE_PIN_PA20 1
+#define IGNORE_PIN_PA21 1
+// USB is always used internally so skip the pin objects for it.
+#define IGNORE_PIN_PA24 1
+#define IGNORE_PIN_PA25 1
+#define IGNORE_PIN_PA27 1
+#define IGNORE_PIN_PA28 1
+#define IGNORE_PIN_PA30 1
+#define IGNORE_PIN_PA31 1
+#define IGNORE_PIN_PB01 1
+#define IGNORE_PIN_PB02 1
+#define IGNORE_PIN_PB03 1
+#define IGNORE_PIN_PB04 1
+#define IGNORE_PIN_PB05 1
+#define IGNORE_PIN_PB06 1
+#define IGNORE_PIN_PB07 1
+#define IGNORE_PIN_PB08 1
+#define IGNORE_PIN_PB09 1
+#define IGNORE_PIN_PB10 1
+#define IGNORE_PIN_PB11 1
+#define IGNORE_PIN_PB12 1
+#define IGNORE_PIN_PB13 1
+#define IGNORE_PIN_PB14 1
+#define IGNORE_PIN_PB15 1
+#define IGNORE_PIN_PB16 1
+#define IGNORE_PIN_PB17 1
+#define IGNORE_PIN_PB22 1
+#define IGNORE_PIN_PB23 1
+#define IGNORE_PIN_PB30 1
+#define IGNORE_PIN_PB31 1
+#define IGNORE_PIN_PB00 1
+
+#define DEFAULT_I2C_BUS_SCL (&pin_PA09)
+#define DEFAULT_I2C_BUS_SDA (&pin_PA08)
+
+#define DEFAULT_SPI_BUS_SS (&pin_PA22)
+#define DEFAULT_SPI_BUS_SCK (&pin_PA19)
+#define DEFAULT_SPI_BUS_MOSI (&pin_PA18)
+#define DEFAULT_SPI_BUS_MISO (&pin_PA17)
diff --git a/ports/atmel-samd/boards/cp_sapling_m0/mpconfigboard.mk b/ports/atmel-samd/boards/cp_sapling_m0/mpconfigboard.mk
new file mode 100644
index 000000000..861a0a5f7
--- /dev/null
+++ b/ports/atmel-samd/boards/cp_sapling_m0/mpconfigboard.mk
@@ -0,0 +1,24 @@
+USB_VID = 0x1209
+USB_PID = 0x4DDD
+USB_PRODUCT = "CP Sapling"
+USB_MANUFACTURER = "Oak Development Technologies"
+
+CHIP_VARIANT = SAMD21E18A
+CHIP_FAMILY = samd21
+
+INTERNAL_FLASH_FILESYSTEM = 1
+LONGINT_IMPL = NONE
+CIRCUITPY_FULL_BUILD = 0
+
+SUPEROPT_GC = 0
+
+CFLAGS_BOARD = --param max-inline-insns-auto=15
+ifeq ($(TRANSLATION), zh_Latn_pinyin)
+RELEASE_NEEDS_CLEAN_BUILD = 1
+CFLAGS_INLINE_LIMIT = 35
+endif
+ifeq ($(TRANSLATION), de_DE)
+RELEASE_NEEDS_CLEAN_BUILD = 1
+CFLAGS_INLINE_LIMIT = 35
+SUPEROPT_VM = 0
+endif
diff --git a/ports/atmel-samd/boards/cp_sapling_m0/pins.c b/ports/atmel-samd/boards/cp_sapling_m0/pins.c
new file mode 100644
index 000000000..d527aaddc
--- /dev/null
+++ b/ports/atmel-samd/boards/cp_sapling_m0/pins.c
@@ -0,0 +1,38 @@
+#include "shared-bindings/board/__init__.h"
+
+STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
+
+ { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA08) },
+ { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) },
+
+ { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA00) },
+ { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA00) },
+
+ { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA01) },
+ { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA01) },
+
+ { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA09) },
+ { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA09) },
+
+ { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA22) },
+ { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA22) },
+ { MP_ROM_QSTR(MP_QSTR_SS), MP_ROM_PTR(&pin_PA22) },
+
+ { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA19) },
+ { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA19) },
+ { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA19) },
+
+ { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA17) },
+ { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA17) },
+ { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA17) },
+
+ { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA18) },
+ { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA18) },
+ { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA18) },
+
+ { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA15) },
+
+ { 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_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
diff --git a/ports/atmel-samd/boards/cp_sapling_m0_spiflash/board.c b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/board.c
new file mode 100644
index 000000000..ce5636676
--- /dev/null
+++ b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/board.c
@@ -0,0 +1,40 @@
+/*
+ * 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 "boards/board.h"
+#include "common-hal/microcontroller/Pin.h"
+#include "supervisor/shared/board.h"
+#include "hal/include/hal_gpio.h"
+
+void board_init(void) {
+}
+
+bool board_requests_safe_mode(void) {
+ return false;
+}
+
+void reset_board(void) {
+}
diff --git a/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.h b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.h
new file mode 100644
index 000000000..9c69c4802
--- /dev/null
+++ b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.h
@@ -0,0 +1,62 @@
+#define MICROPY_HW_BOARD_NAME "CP Sapling M0 w/ SPI Flash"
+#define MICROPY_HW_MCU_NAME "samd21e18"
+
+#define MICROPY_HW_NEOPIXEL (&pin_PA15)
+
+#define MICROPY_PORT_A (0)
+#define MICROPY_PORT_B (0)
+#define MICROPY_PORT_C (0)
+
+#define SPI_FLASH_MOSI_PIN &pin_PA18
+#define SPI_FLASH_MISO_PIN &pin_PA17
+#define SPI_FLASH_SCK_PIN &pin_PA19
+#define SPI_FLASH_CS_PIN &pin_PA22
+
+#define IGNORE_PIN_PA02 1
+#define IGNORE_PIN_PA03 1
+#define IGNORE_PIN_PA04 1
+#define IGNORE_PIN_PA05 1
+#define IGNORE_PIN_PA06 1
+#define IGNORE_PIN_PA07 1
+#define IGNORE_PIN_PA12 1
+#define IGNORE_PIN_PA13 1
+#define IGNORE_PIN_PA14 1
+#define IGNORE_PIN_PA20 1
+#define IGNORE_PIN_PA21 1
+// USB is always used internally so skip the pin objects for it.
+#define IGNORE_PIN_PA24 1
+#define IGNORE_PIN_PA25 1
+#define IGNORE_PIN_PA27 1
+#define IGNORE_PIN_PA28 1
+#define IGNORE_PIN_PA30 1
+#define IGNORE_PIN_PA31 1
+#define IGNORE_PIN_PB01 1
+#define IGNORE_PIN_PB02 1
+#define IGNORE_PIN_PB03 1
+#define IGNORE_PIN_PB04 1
+#define IGNORE_PIN_PB05 1
+#define IGNORE_PIN_PB06 1
+#define IGNORE_PIN_PB07 1
+#define IGNORE_PIN_PB08 1
+#define IGNORE_PIN_PB09 1
+#define IGNORE_PIN_PB10 1
+#define IGNORE_PIN_PB11 1
+#define IGNORE_PIN_PB12 1
+#define IGNORE_PIN_PB13 1
+#define IGNORE_PIN_PB14 1
+#define IGNORE_PIN_PB15 1
+#define IGNORE_PIN_PB16 1
+#define IGNORE_PIN_PB17 1
+#define IGNORE_PIN_PB22 1
+#define IGNORE_PIN_PB23 1
+#define IGNORE_PIN_PB30 1
+#define IGNORE_PIN_PB31 1
+#define IGNORE_PIN_PB00 1
+
+#define DEFAULT_I2C_BUS_SCL (&pin_PA09)
+#define DEFAULT_I2C_BUS_SDA (&pin_PA08)
+
+#define DEFAULT_SPI_BUS_SS (&pin_PA22)
+#define DEFAULT_SPI_BUS_SCK (&pin_PA19)
+#define DEFAULT_SPI_BUS_MOSI (&pin_PA18)
+#define DEFAULT_SPI_BUS_MISO (&pin_PA17)
diff --git a/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk
new file mode 100644
index 000000000..99e13f791
--- /dev/null
+++ b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/mpconfigboard.mk
@@ -0,0 +1,33 @@
+USB_VID = 0x1209
+USB_PID = 0x4DDE
+USB_PRODUCT = "CP Sapling M0 w/ SPI Flash"
+USB_MANUFACTURER = "Oak Development Technologies"
+
+CHIP_VARIANT = SAMD21E18A
+CHIP_FAMILY = samd21
+
+INTERNAL_FLASH_FILESYSTEM = 0
+LONGINT_IMPL = MPZ
+SPI_FLASH_FILESYSTEM = 1
+EXTERNAL_FLASH_DEVICE_COUNT = 1
+EXTERNAL_FLASH_DEVICES = AT25DF081A
+
+CIRCUITPY_AUDIOIO = 0
+CIRCUITPY_AUDIOBUSIO = 0
+CIRCUITPY_BITBANGIO = 0
+CIRCUITPY_COUNTIO = 0
+CIRCUITPY_FREQUENCYIO = 0
+CIRCUITPY_I2CPERIPHERAL = 0
+
+SUPEROPT_GC = 0
+
+CFLAGS_BOARD = --param max-inline-insns-auto=15
+ifeq ($(TRANSLATION), zh_Latn_pinyin)
+RELEASE_NEEDS_CLEAN_BUILD = 1
+CFLAGS_INLINE_LIMIT = 35
+endif
+ifeq ($(TRANSLATION), de_DE)
+RELEASE_NEEDS_CLEAN_BUILD = 1
+CFLAGS_INLINE_LIMIT = 35
+SUPEROPT_VM = 0
+endif
diff --git a/ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c
new file mode 100644
index 000000000..d527aaddc
--- /dev/null
+++ b/ports/atmel-samd/boards/cp_sapling_m0_spiflash/pins.c
@@ -0,0 +1,38 @@
+#include "shared-bindings/board/__init__.h"
+
+STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
+
+ { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PA08) },
+ { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) },
+
+ { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA00) },
+ { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA00) },
+
+ { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA01) },
+ { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA01) },
+
+ { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA09) },
+ { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA09) },
+
+ { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA22) },
+ { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA22) },
+ { MP_ROM_QSTR(MP_QSTR_SS), MP_ROM_PTR(&pin_PA22) },
+
+ { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA19) },
+ { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA19) },
+ { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA19) },
+
+ { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA17) },
+ { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA17) },
+ { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA17) },
+
+ { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA18) },
+ { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA18) },
+ { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA18) },
+
+ { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA15) },
+
+ { 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_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
diff --git a/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk b/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk
index 733784bf4..303df650e 100644
--- a/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/dynossat_edu_eps/mpconfigboard.mk
@@ -12,12 +12,16 @@ EXTERNAL_FLASH_DEVICE_COUNT = 1
EXTERNAL_FLASH_DEVICES = "GD25Q32C"
LONGINT_IMPL = MPZ
+CIRCUITPY_FULLBUILD = 0
CIRCUITPY_BITBANGIO = 0
CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_COUNTIO = 0
-CIRCUITPY_I2CPERIPHERAL = 0
+CIRCUITPY_I2CPERIPHERAL = 1
CIRCUITPY_VECTORIO = 0
CIRCUITPY_BUSDEVICE = 0
+CIRCUITPY_DISPLAYIO = 0
+CIRCUITPY_TOUCHIO = 0
+CIRCUITPY_ROTARYIO = 0
CFLAGS_INLINE_LIMIT = 60
diff --git a/ports/atmel-samd/boards/dynossat_edu_eps/pins.c b/ports/atmel-samd/boards/dynossat_edu_eps/pins.c
index a910311d4..f960e6bb0 100644
--- a/ports/atmel-samd/boards/dynossat_edu_eps/pins.c
+++ b/ports/atmel-samd/boards/dynossat_edu_eps/pins.c
@@ -4,17 +4,17 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB10) },
- { MP_ROM_QSTR(MP_QSTR_D30), MP_ROM_PTR(&pin_PA30) },
- { MP_ROM_QSTR(MP_QSTR_D31), MP_ROM_PTR(&pin_PA31) },
+ { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_PA30) },
+ { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_PA31) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_OVTEMP), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA09) },
- { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA11) },
+ { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_SAT_RESET), MP_ROM_PTR(&pin_PA11) },
- { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA10) },
+ { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_SAT_PWR_ENABLE), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_INT_IMU_OBC), MP_ROM_PTR(&pin_PA19) },
@@ -22,10 +22,17 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_PWRMON_SDA), MP_ROM_PTR(&pin_PA04) },
{ MP_ROM_QSTR(MP_QSTR_PWRMON_SCL), MP_ROM_PTR(&pin_PA05) },
{ MP_ROM_QSTR(MP_QSTR_PWRMON_ALERT), MP_ROM_PTR(&pin_PB03) },
+ { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PB09) },
+ { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB02) },
+ { MP_ROM_QSTR(MP_QSTR_V_3V3_MEAS), MP_ROM_PTR(&pin_PB09) },
+ { MP_ROM_QSTR(MP_QSTR_V_5V_MEAS), MP_ROM_PTR(&pin_PB02) },
+ { MP_ROM_QSTR(MP_QSTR_FLASH_SCK), MP_ROM_PTR(&pin_PA23) },
+ { MP_ROM_QSTR(MP_QSTR_FLASH_MOSI), MP_ROM_PTR(&pin_PA22) },
+ { MP_ROM_QSTR(MP_QSTR_FLASH_MISO), MP_ROM_PTR(&pin_PA21) },
+ { MP_ROM_QSTR(MP_QSTR_FLASH_CS), MP_ROM_PTR(&pin_PA20) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
- { MP_ROM_QSTR(MP_QSTR_I2C_MONITOR), 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) },
};
diff --git a/ports/atmel-samd/boards/dynossat_edu_obc/pins.c b/ports/atmel-samd/boards/dynossat_edu_obc/pins.c
index a560360f7..8cc58d92c 100644
--- a/ports/atmel-samd/boards/dynossat_edu_obc/pins.c
+++ b/ports/atmel-samd/boards/dynossat_edu_obc/pins.c
@@ -26,12 +26,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PB07) },
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PB06) },
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PB30) },
+ { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA12) },
+ { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA15) },
+ { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PB00) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_PA30) },
{ MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_PA31) },
{ MP_ROM_QSTR(MP_QSTR_SD_CS), MP_ROM_PTR(&pin_PB22) },
{ MP_ROM_QSTR(MP_QSTR_INT_IMU), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_SAT_POWER), MP_ROM_PTR(&pin_PA15) },
+ { MP_ROM_QSTR(MP_QSTR_OVTEMP), MP_ROM_PTR(&pin_PB00) },
{ MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
diff --git a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk
index 614ddfa9c..3ae94b231 100644
--- a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk
@@ -12,7 +12,7 @@ CIRCUITPY_FULL_BUILD = 0
# A number of modules are removed for RFM69 to make room for frozen libraries.
# Many I/O functions are not available.
-CIRCUITPY_ANALOGIO = 0
+CIRCUITPY_ANALOGIO = 1
CIRCUITPY_PULSEIO = 0
CIRCUITPY_NEOPIXEL_WRITE = 1
CIRCUITPY_ROTARYIO = 0
diff --git a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk
index 5c1fd1ce9..3ee239672 100644
--- a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk
+++ b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk
@@ -13,7 +13,7 @@ CIRCUITPY_FULL_BUILD = 0
# A number of modules are removed for RFM9x to make room for frozen libraries.
# Many I/O functions are not available.
-CIRCUITPY_ANALOGIO = 0
+CIRCUITPY_ANALOGIO = 1
CIRCUITPY_PULSEIO = 0
CIRCUITPY_NEOPIXEL_WRITE = 1
CIRCUITPY_ROTARYIO = 0
diff --git a/ports/atmel-samd/boards/feather_m4_can/pins.c b/ports/atmel-samd/boards/feather_m4_can/pins.c
index 2b67709f8..015047330 100644
--- a/ports/atmel-samd/boards/feather_m4_can/pins.c
+++ b/ports/atmel-samd/boards/feather_m4_can/pins.c
@@ -36,6 +36,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ 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) },
@@ -45,14 +46,17 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ 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_NEOPIXEL), MP_ROM_PTR(&pin_PB02) },
+ { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_PB03) },
+
+ { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_PB00) },
+ { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_PB00) },
- { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_PB01) },
- { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_PB01) },
+ { MP_ROM_QSTR(MP_QSTR_BOOST_ENABLE), MP_ROM_PTR(&pin_PB13) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_PB15) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_PB14) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_CAN_STANDBY), MP_ROM_PTR(&pin_PB13) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_CAN_STANDBY), MP_ROM_PTR(&pin_PB12) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
diff --git a/ports/atmel-samd/boards/matrixportal_m4/pins.c b/ports/atmel-samd/boards/matrixportal_m4/pins.c
index 34865597b..1f9956d9e 100644
--- a/ports/atmel-samd/boards/matrixportal_m4/pins.c
+++ b/ports/atmel-samd/boards/matrixportal_m4/pins.c
@@ -16,8 +16,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_BUSY), MP_ROM_PTR(&pin_PA22) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RESET), MP_ROM_PTR(&pin_PA21) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RTS), MP_ROM_PTR(&pin_PA18) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_TX), MP_ROM_PTR(&pin_PA12) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RX), MP_ROM_PTR(&pin_PA13) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_TX), MP_ROM_PTR(&pin_PA13) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RX), MP_ROM_PTR(&pin_PA12) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCL),MP_ROM_PTR(&pin_PB30) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_PB31) },
diff --git a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h
index 04565feb4..d48c596ac 100644
--- a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h
+++ b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.h
@@ -33,6 +33,10 @@
#define DEFAULT_UART_BUS_RX (&pin_PA11)
#define DEFAULT_UART_BUS_TX (&pin_PA10)
+// These pins are connected to the external crystal.
+#define IGNORE_PIN_PA00 1
+#define IGNORE_PIN_PA01 1
+
// 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/openbook_m4/board.c b/ports/atmel-samd/boards/openbook_m4/board.c
index f0010f6d7..07dd1741a 100644
--- a/ports/atmel-samd/boards/openbook_m4/board.c
+++ b/ports/atmel-samd/boards/openbook_m4/board.c
@@ -97,7 +97,8 @@ void board_init(void) {
&pin_PA01, // busy_pin
false, // busy_state
5, // seconds_per_frame
- false); // chip_select (don't always toggle chip select)
+ false, // chip_select (don't always toggle chip select)
+ false); // grayscale
}
bool board_requests_safe_mode(void) {
diff --git a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h
index c6ab4ed8e..a37d7ceec 100644
--- a/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h
+++ b/ports/atmel-samd/boards/pybadge_airlift/mpconfigboard.h
@@ -23,9 +23,6 @@
#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/pybadge_airlift/pins.c b/ports/atmel-samd/boards/pybadge_airlift/pins.c
index d39650246..9ee579be1 100644
--- a/ports/atmel-samd/boards/pybadge_airlift/pins.c
+++ b/ports/atmel-samd/boards/pybadge_airlift/pins.c
@@ -30,10 +30,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA22)},
{MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA23)},
- // UART
- {MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB17)},
- {MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB16)},
-
// I2C
{MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA12)},
{MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA13)},
@@ -58,6 +54,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{MP_OBJ_NEW_QSTR(MP_QSTR_ESP_GPIO0), MP_ROM_PTR(&pin_PA31)},
{MP_OBJ_NEW_QSTR(MP_QSTR_ESP_BUSY), MP_ROM_PTR(&pin_PA00)},
{MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RESET), MP_ROM_PTR(&pin_PB12)},
+ {MP_OBJ_NEW_QSTR(MP_QSTR_ESP_TX), MP_ROM_PTR(&pin_PB16)},
+ {MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RX), MP_ROM_PTR(&pin_PB17)},
// TFT control pins
{MP_OBJ_NEW_QSTR(MP_QSTR_TFT_LITE), MP_ROM_PTR(&pin_PA01)},
@@ -69,7 +67,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{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_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}};
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
diff --git a/ports/atmel-samd/boards/pyportal/mpconfigboard.h b/ports/atmel-samd/boards/pyportal/mpconfigboard.h
index 2c4cf4f58..00c376ad9 100644
--- a/ports/atmel-samd/boards/pyportal/mpconfigboard.h
+++ b/ports/atmel-samd/boards/pyportal/mpconfigboard.h
@@ -24,9 +24,6 @@
#define DEFAULT_SPI_BUS_MOSI (&pin_PA12)
#define DEFAULT_SPI_BUS_MISO (&pin_PA14)
-#define DEFAULT_UART_BUS_RX (&pin_PB13)
-#define DEFAULT_UART_BUS_TX (&pin_PB12)
-
// 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/pyportal/pins.c b/ports/atmel-samd/boards/pyportal/pins.c
index 14699a209..461ee98da 100644
--- a/ports/atmel-samd/boards/pyportal/pins.c
+++ b/ports/atmel-samd/boards/pyportal/pins.c
@@ -58,10 +58,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_BUSY), MP_ROM_PTR(&pin_PB16) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RESET), MP_ROM_PTR(&pin_PB17) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RTS), MP_ROM_PTR(&pin_PA15) },
-
- // UART
- { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB12) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB13) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_TX), MP_ROM_PTR(&pin_PB12) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RX), MP_ROM_PTR(&pin_PB13) },
// SPI
{ MP_OBJ_NEW_QSTR(MP_QSTR_MOSI),MP_ROM_PTR(&pin_PA12) },
@@ -78,7 +76,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ 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_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display) },
};
diff --git a/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.h b/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.h
index 4d58b8183..a76f1db5c 100644
--- a/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.h
+++ b/ports/atmel-samd/boards/pyportal_titano/mpconfigboard.h
@@ -22,9 +22,6 @@
#define DEFAULT_SPI_BUS_MOSI (&pin_PA12)
#define DEFAULT_SPI_BUS_MISO (&pin_PA14)
-#define DEFAULT_UART_BUS_RX (&pin_PB13)
-#define DEFAULT_UART_BUS_TX (&pin_PB12)
-
// 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/pyportal_titano/pins.c b/ports/atmel-samd/boards/pyportal_titano/pins.c
index 14699a209..461ee98da 100644
--- a/ports/atmel-samd/boards/pyportal_titano/pins.c
+++ b/ports/atmel-samd/boards/pyportal_titano/pins.c
@@ -58,10 +58,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_BUSY), MP_ROM_PTR(&pin_PB16) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RESET), MP_ROM_PTR(&pin_PB17) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RTS), MP_ROM_PTR(&pin_PA15) },
-
- // UART
- { MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB12) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB13) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_TX), MP_ROM_PTR(&pin_PB12) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_ESP_RX), MP_ROM_PTR(&pin_PB13) },
// SPI
{ MP_OBJ_NEW_QSTR(MP_QSTR_MOSI),MP_ROM_PTR(&pin_PA12) },
@@ -78,7 +76,6 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ 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_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display) },
};
diff --git a/ports/atmel-samd/boards/uchip/mpconfigboard.h b/ports/atmel-samd/boards/uchip/mpconfigboard.h
index 1877a41ef..5d6af4b78 100644
--- a/ports/atmel-samd/boards/uchip/mpconfigboard.h
+++ b/ports/atmel-samd/boards/uchip/mpconfigboard.h
@@ -16,8 +16,6 @@
#define IGNORE_PIN_PA27 1
#define IGNORE_PIN_PA28 1
-#define IGNORE_PIN_PA30 1
-#define IGNORE_PIN_PA31 1
#define IGNORE_PIN_PB01 1
#define IGNORE_PIN_PB02 1
diff --git a/ports/atmel-samd/boards/uchip/pins.c b/ports/atmel-samd/boards/uchip/pins.c
index 856a22074..de5508110 100644
--- a/ports/atmel-samd/boards/uchip/pins.c
+++ b/ports/atmel-samd/boards/uchip/pins.c
@@ -1,14 +1,18 @@
#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_PA08) },
- { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA10) },
- { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA09) },
- { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA11) },
- { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA02) },
- { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA04) },
- { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PA03) },
- { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PA05) },
+ { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PA07) },
+ { MP_ROM_QSTR(MP_QSTR_BOOST_EN), MP_ROM_PTR(&pin_PA14) },
+ { MP_ROM_QSTR(MP_QSTR_VEXT_SELECT), MP_ROM_PTR(&pin_PA15) },
+ { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA06) },
+ { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA06) },
+ { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA08) },
+ { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA10) },
+ { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA09) },
+ { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PA11) },
+ { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_PA02) },
+ { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_PA03) },
+ { MP_ROM_QSTR(MP_QSTR_A8), MP_ROM_PTR(&pin_PA04) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA10) },
@@ -19,8 +23,10 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA23) },
- { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA03) },
- { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_PA05) },
+ { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA31) },
+ { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA30) },
+ { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) },
+ { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_PA03) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) },
diff --git a/ports/atmel-samd/common-hal/audiobusio/PDMIn.c b/ports/atmel-samd/common-hal/audiobusio/PDMIn.c
index 21474ab3b..8911aef2f 100644
--- a/ports/atmel-samd/common-hal/audiobusio/PDMIn.c
+++ b/ports/atmel-samd/common-hal/audiobusio/PDMIn.c
@@ -326,7 +326,7 @@ static void setup_dma(audiobusio_pdmin_obj_t* self, uint32_t length,
// higher sample rate than specified. Then after the audio is
// recorded, a more expensive filter non-real-time filter could be
// used to down-sample and low-pass.
-uint16_t sinc_filter [OVERSAMPLING] = {
+const uint16_t sinc_filter [OVERSAMPLING] = {
0, 2, 9, 21, 39, 63, 94, 132,
179, 236, 302, 379, 467, 565, 674, 792,
920, 1055, 1196, 1341, 1487, 1633, 1776, 1913,
@@ -337,7 +337,11 @@ uint16_t sinc_filter [OVERSAMPLING] = {
94, 63, 39, 21, 9, 2, 0, 0
};
-#define REPEAT_16_TIMES(X) X X X X X X X X X X X X X X X X
+#ifdef SAMD21
+#define REPEAT_16_TIMES(X) do { for(uint8_t j=0; j<4; j++) { X X X X } } while (0)
+#else
+#define REPEAT_16_TIMES(X) do { X X X X X X X X X X X X X X X X } while(0)
+#endif
static uint16_t filter_sample(uint32_t pdm_samples[4]) {
uint16_t running_sum = 0;
@@ -354,7 +358,7 @@ static uint16_t filter_sample(uint32_t pdm_samples[4]) {
filter_ptr++;
pdm_sample <<= 1;
}
- )
+ );
}
return running_sum;
}
diff --git a/ports/atmel-samd/common-hal/displayio/ParallelBus.c b/ports/atmel-samd/common-hal/displayio/ParallelBus.c
index 405c08c64..f10dd2993 100644
--- a/ports/atmel-samd/common-hal/displayio/ParallelBus.c
+++ b/ports/atmel-samd/common-hal/displayio/ParallelBus.c
@@ -129,7 +129,8 @@ bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) {
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, uint8_t *data, uint32_t data_length) {
+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) {
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 = (uint32_t*) &self->write_group->OUTCLR.reg;
diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h
index f7ccff4da..bce89e0b9 100644
--- a/ports/atmel-samd/mpconfigport.h
+++ b/ports/atmel-samd/mpconfigport.h
@@ -42,11 +42,13 @@
#define CIRCUITPY_MCU_FAMILY samd21
#define MICROPY_PY_SYS_PLATFORM "Atmel SAMD21"
#define SPI_FLASH_MAX_BAUDRATE 8000000
+#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 \
diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk
index 1929e146d..17e3995bf 100644
--- a/ports/atmel-samd/mpconfigport.mk
+++ b/ports/atmel-samd/mpconfigport.mk
@@ -29,6 +29,10 @@ ifndef CIRCUITPY_AUDIOMP3
CIRCUITPY_AUDIOMP3 = 0
endif
+ifndef CIRCUITPY_BUILTINS_POW3
+CIRCUITPY_BUILTINS_POW3 = 0
+endif
+
ifndef CIRCUITPY_FREQUENCYIO
CIRCUITPY_FREQUENCYIO = 0
endif
diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c
index d65d09825..fc1d1198e 100644
--- a/ports/atmel-samd/supervisor/port.c
+++ b/ports/atmel-samd/supervisor/port.c
@@ -390,8 +390,8 @@ void reset_cpu(void) {
reset();
}
-supervisor_allocation* port_fixed_stack(void) {
- return NULL;
+bool port_has_fixed_stack(void) {
+ return false;
}
uint32_t *port_stack_get_limit(void) {
diff --git a/ports/cxd56/supervisor/port.c b/ports/cxd56/supervisor/port.c
index 92d335cd5..d69f35779 100644
--- a/ports/cxd56/supervisor/port.c
+++ b/ports/cxd56/supervisor/port.c
@@ -98,8 +98,8 @@ void reset_to_bootloader(void) {
}
}
-supervisor_allocation* port_fixed_stack(void) {
- return NULL;
+bool port_has_fixed_stack(void) {
+ return true;
}
uint32_t *port_stack_get_limit(void) {
diff --git a/ports/esp32s2/Makefile b/ports/esp32s2/Makefile
index 8d891edd0..04786c2c7 100644
--- a/ports/esp32s2/Makefile
+++ b/ports/esp32s2/Makefile
@@ -104,6 +104,8 @@ INC += -isystem esp-idf/components/soc/soc/include
INC += -isystem esp-idf/components/soc/soc/esp32s2/include
INC += -isystem esp-idf/components/heap/include
INC += -isystem esp-idf/components/esp_system/include
+INC += -isystem esp-idf/components/spi_flash/include
+INC += -isystem esp-idf/components/nvs_flash/include
INC += -I$(BUILD)/esp-idf/config
CFLAGS += -DHAVE_CONFIG_H \
@@ -188,6 +190,9 @@ SRC_C += \
lib/utils/pyexec.c \
lib/utils/stdout_helpers.c \
lib/utils/sys_stdio_mphal.c \
+ lib/netutils/netutils.c \
+ peripherals/timer.c \
+ peripherals/pcnt.c \
peripherals/pins.c \
peripherals/rmt.c \
supervisor/shared/memory.c
diff --git a/ports/esp32s2/README.md b/ports/esp32s2/README.md
index 8a6dfbd2d..0738d520e 100644
--- a/ports/esp32s2/README.md
+++ b/ports/esp32s2/README.md
@@ -30,18 +30,20 @@ Connect these pins using a [USB adapter](https://www.adafruit.com/product/4090)
## Building and flashing ##
-Before building or flashing the ESP32-S2, you must [install the esp-idf](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/get-started/index.html). This must be re-done ever time the esp-idf is updated, but not every time you build. Run `cd ports/esp32s2` from `circuitpython/` to move to the esp32s2 port root, and run:
+Before building or flashing the ESP32-S2, you must [install the esp-idf](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/get-started/index.html). This must be re-done every time the esp-idf is updated, but not every time you build. Run `cd ports/esp32s2` from `circuitpython/` to move to the esp32s2 port root, and run:
```
./esp-idf/install.sh
```
-Additionally, any time you open a new bash environment for building or flashing, you must add the esp-idf tools to your path:
+After this initial installation, you must add the esp-idf tools to your path. You must also do this **any time you open a new bash environment for building or flashing**:
```
. esp-idf/export.sh
```
+When Circuitpython updates the ESP-IDF to a new release, you may need to run this installation process again. The exact commands used may also vary based on your bash environment.
+
Building boards such as the Saola is typically done through `make flash`. The default port is `tty.SLAB_USBtoUART`, which will only work on certain Mac setups. On most machines, both Mac and Linux, you will need to set the port yourself by running `ls /dev/tty.usb*` and selecting the one that only appears when your development board is plugged in. An example make command with the port setting is as follows:
```
diff --git a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/board.c b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/board.c
new file mode 100644
index 000000000..ecd44e423
--- /dev/null
+++ b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/board.c
@@ -0,0 +1,169 @@
+/*
+ * 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 "boards/board.h"
+#include "mpconfigboard.h"
+#include "shared-bindings/busio/SPI.h"
+#include "shared-bindings/displayio/FourWire.h"
+#include "shared-bindings/microcontroller/Pin.h"
+#include "shared-module/displayio/__init__.h"
+#include "supervisor/shared/board.h"
+
+#define DELAY 0x80
+
+// This is an ILO373 control chip. The display is a 2.9" grayscale EInk.
+
+const uint8_t display_start_sequence[] = {
+ 0x01, 5, 0x03, 0x00, 0x2b, 0x2b, 0x13, // power setting
+ 0x06, 3, 0x17, 0x17, 0x17, // booster soft start
+ 0x04, DELAY, 200, // power on and wait 200 ms
+ 0x00, 1, 0x7f, // panel setting
+ 0x50, 1, 0x97, // CDI setting
+ 0x30, 1, 0x3c, // PLL set to 50 Hx (M = 7, N = 4)
+ 0x61, 3, 0x80, 0x01, 0x28, // Resolution
+ 0x82, DELAY | 1, 0x12, 50, // VCM DC and delay 50ms
+
+ // Look up tables for voltage sequence for pixel transition
+ // Common voltage
+ 0x20, 0x2a,
+ 0x00, 0x0a, 0x00, 0x00, 0x00, 0x01,
+ 0x60, 0x14, 0x14, 0x00, 0x00, 0x01,
+ 0x00, 0x14, 0x00, 0x00, 0x00, 0x01,
+ 0x00, 0x13, 0x0a, 0x01, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+ // White to white
+ 0x21, 0x2a,
+ 0x40, 0x0a, 0x00, 0x00, 0x00, 0x01,
+ 0x90, 0x14, 0x14, 0x00, 0x00, 0x01,
+ 0x10, 0x14, 0x0a, 0x00, 0x00, 0x01,
+ 0xa0, 0x13, 0x01, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+ // Black to white
+ 0x22, 0x2a,
+ 0x40, 0x0a, 0x00, 0x00, 0x00, 0x01,
+ 0x90, 0x14, 0x14, 0x00, 0x00, 0x01,
+ 0x00, 0x14, 0x0a, 0x00, 0x00, 0x01,
+ 0x99, 0x0c, 0x01, 0x03, 0x04, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+ // White to black
+ 0x23, 0x2a,
+ 0x40, 0x0a, 0x00, 0x00, 0x00, 0x01,
+ 0x90, 0x14, 0x14, 0x00, 0x00, 0x01,
+ 0x00, 0x14, 0x0a, 0x00, 0x00, 0x01,
+ 0x99, 0x0b, 0x04, 0x04, 0x01, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+
+ // Black to black
+ 0x24, 0x2a,
+ 0x80, 0x0a, 0x00, 0x00, 0x00, 0x01,
+ 0x90, 0x14, 0x14, 0x00, 0x00, 0x01,
+ 0x20, 0x14, 0x0a, 0x00, 0x00, 0x01,
+ 0x50, 0x13, 0x01, 0x00, 0x00, 0x01,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
+};
+
+const uint8_t display_stop_sequence[] = {
+ 0x50, 0x01, 0x17, // CDI Setting
+ 0x82, 0x01, 0x00, // VCM DC to -0.1V
+ 0x02, 0x00 // Power off
+};
+
+void board_init(void) {
+ // USB
+ common_hal_never_reset_pin(&pin_GPIO19);
+ common_hal_never_reset_pin(&pin_GPIO20);
+
+ // Debug UART
+ common_hal_never_reset_pin(&pin_GPIO43);
+ common_hal_never_reset_pin(&pin_GPIO44);
+
+ busio_spi_obj_t* spi = &displays[0].fourwire_bus.inline_bus;
+ common_hal_busio_spi_construct(spi, &pin_GPIO36, &pin_GPIO35, NULL);
+ common_hal_busio_spi_never_reset(spi);
+
+ displayio_fourwire_obj_t* bus = &displays[0].fourwire_bus;
+ bus->base.type = &displayio_fourwire_type;
+ common_hal_displayio_fourwire_construct(bus,
+ spi,
+ &pin_GPIO7, // EPD_DC Command or data
+ &pin_GPIO8, // EPD_CS Chip select
+ &pin_GPIO6, // EPD_RST Reset
+ 4000000, // Baudrate
+ 0, // Polarity
+ 0); // Phase
+
+ displayio_epaperdisplay_obj_t* display = &displays[0].epaper_display;
+ display->base.type = &displayio_epaperdisplay_type;
+ common_hal_displayio_epaperdisplay_construct(
+ display,
+ bus,
+ display_start_sequence, sizeof(display_start_sequence),
+ display_stop_sequence, sizeof(display_stop_sequence),
+ 296, // width
+ 128, // height
+ 160, // ram_width
+ 296, // ram_height
+ 0, // colstart
+ 0, // rowstart
+ 270, // rotation
+ NO_COMMAND, // set_column_window_command
+ NO_COMMAND, // set_row_window_command
+ NO_COMMAND, // set_current_column_command
+ NO_COMMAND, // set_current_row_command
+ 0x10, // write_black_ram_command
+ false, // black_bits_inverted
+ 0x13, // write_color_ram_command
+ false, // color_bits_inverted
+ 0x000000, // highlight_color
+ 0x12, // refresh_display_command
+ 1.0, // refresh_time
+ &pin_GPIO5, // busy_pin
+ false, // busy_state
+ 5.0, // seconds_per_frame
+ false, // always_toggle_chip_select
+ true); // grayscale
+}
+
+bool board_requests_safe_mode(void) {
+ return false;
+}
+
+void reset_board(void) {
+
+}
diff --git a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
new file mode 100644
index 000000000..be376e5a9
--- /dev/null
+++ b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h
@@ -0,0 +1,45 @@
+/*
+ * 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 "MagTag"
+#define MICROPY_HW_MCU_NAME "ESP32S2"
+
+#define MICROPY_HW_NEOPIXEL (&pin_GPIO1)
+
+#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
+
+#define DEFAULT_I2C_BUS_SCL (&pin_GPIO34)
+#define DEFAULT_I2C_BUS_SDA (&pin_GPIO33)
+
+#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36)
+#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35)
+#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37)
diff --git a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk
new file mode 100644
index 000000000..0a141cbe3
--- /dev/null
+++ b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.mk
@@ -0,0 +1,17 @@
+USB_VID = 0x239A
+USB_PID = 0x80E6
+USB_PRODUCT = "MagTag"
+USB_MANUFACTURER = "Adafruit"
+
+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=wrover
diff --git a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c
new file mode 100644
index 000000000..0cefb6dfb
--- /dev/null
+++ b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c
@@ -0,0 +1,54 @@
+#include "shared-bindings/board/__init__.h"
+
+#include "shared-module/displayio/__init__.h"
+
+STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
+ { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) },
+ { MP_ROM_QSTR(MP_QSTR_AD1), MP_ROM_PTR(&pin_GPIO18) },
+ { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) },
+
+ { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO17) },
+ { MP_ROM_QSTR(MP_QSTR_SPEAKER_ENABLE), MP_ROM_PTR(&pin_GPIO16) },
+
+ { MP_ROM_QSTR(MP_QSTR_EPD_BUSY), MP_ROM_PTR(&pin_GPIO5) },
+ { MP_ROM_QSTR(MP_QSTR_EPD_RESET), MP_ROM_PTR(&pin_GPIO6) },
+ { MP_ROM_QSTR(MP_QSTR_EPD_DC), MP_ROM_PTR(&pin_GPIO7) },
+ { MP_ROM_QSTR(MP_QSTR_EPD_CS), MP_ROM_PTR(&pin_GPIO8) },
+
+ { MP_ROM_QSTR(MP_QSTR_BUTTON_A), MP_ROM_PTR(&pin_GPIO15) },
+ { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) },
+
+ { MP_ROM_QSTR(MP_QSTR_BUTTON_B), MP_ROM_PTR(&pin_GPIO14) },
+ { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO14) },
+
+ { MP_ROM_QSTR(MP_QSTR_BUTTON_C), MP_ROM_PTR(&pin_GPIO12) },
+ { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) },
+
+ { MP_ROM_QSTR(MP_QSTR_BUTTON_D), MP_ROM_PTR(&pin_GPIO11) },
+ { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) },
+
+ { MP_ROM_QSTR(MP_QSTR_LIGHT), MP_ROM_PTR(&pin_GPIO3) },
+ { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO3) },
+
+ { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO4) },
+ { MP_ROM_QSTR(MP_QSTR_BATTERY), MP_ROM_PTR(&pin_GPIO4) },
+
+ { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO33) },
+ { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO34) },
+
+ { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_GPIO8) },
+ { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) },
+ { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) },
+ { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) },
+
+ { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO21) },
+
+ { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO1) },
+ { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) },
+
+ { 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_DISPLAY), MP_ROM_PTR(&displays[0].epaper_display)}
+};
+MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);
diff --git a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/sdkconfig b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/sdkconfig
new file mode 100644
index 000000000..9d8bbde96
--- /dev/null
+++ b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/sdkconfig
@@ -0,0 +1,33 @@
+CONFIG_ESP32S2_SPIRAM_SUPPORT=y
+
+#
+# SPI RAM config
+#
+# CONFIG_SPIRAM_TYPE_AUTO is not set
+CONFIG_SPIRAM_TYPE_ESPPSRAM16=y
+# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set
+# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set
+CONFIG_SPIRAM_SIZE=2097152
+
+#
+# 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_FETCH_INSTRUCTIONS is not set
+# CONFIG_SPIRAM_RODATA is not set
+# CONFIG_SPIRAM_SPEED_80M is not set
+CONFIG_SPIRAM_SPEED_40M=y
+# CONFIG_SPIRAM_SPEED_26M is not set
+# CONFIG_SPIRAM_SPEED_20M is not set
+CONFIG_SPIRAM=y
+CONFIG_SPIRAM_BOOT_INIT=y
+# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set
+CONFIG_SPIRAM_USE_MEMMAP=y
+# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set
+# CONFIG_SPIRAM_USE_MALLOC is not set
+CONFIG_SPIRAM_MEMTEST=y
+# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set
+# end of SPI RAM config
diff --git a/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c b/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c
index 08d2b2a1a..dbd6cfef8 100644
--- a/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c
+++ b/ports/esp32s2/boards/adafruit_metro_esp32s2/pins.c
@@ -2,41 +2,65 @@
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_OBJ_NEW_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) },
+
{ MP_OBJ_NEW_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) },
+
{ MP_OBJ_NEW_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO1) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) },
+
{ MP_OBJ_NEW_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO2) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) },
+
{ MP_OBJ_NEW_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO3) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) },
+
{ MP_OBJ_NEW_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO4) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO5) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO5) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO6) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) },
+
{ MP_OBJ_NEW_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO6) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO7) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO8) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO9) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO10) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO11) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO12) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO13) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO14) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO15) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO16) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO21) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO42) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) },
+
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_GPIO33) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO33),MP_ROM_PTR(&pin_GPIO33) },
+
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCL),MP_ROM_PTR(&pin_GPIO34) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO34),MP_ROM_PTR(&pin_GPIO34) },
+
+ { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) },
+
+ { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI),MP_ROM_PTR(&pin_GPIO35) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO35),MP_ROM_PTR(&pin_GPIO35) },
+
+ { MP_OBJ_NEW_QSTR(MP_QSTR_MISO),MP_ROM_PTR(&pin_GPIO37) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO37),MP_ROM_PTR(&pin_GPIO37) },
+
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO42) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO45) },
+ { MP_OBJ_NEW_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_RX), MP_ROM_PTR(&pin_GPIO38) },
{ MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_TX), MP_ROM_PTR(&pin_GPIO37) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_MOSI),MP_ROM_PTR(&pin_GPIO35) },
- { MP_OBJ_NEW_QSTR(MP_QSTR_MISO),MP_ROM_PTR(&pin_GPIO37) },
-
{ 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) },
diff --git a/ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.mk b/ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.mk
index ba85e46ef..2dce03881 100644
--- a/ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.mk
+++ b/ports/esp32s2/boards/espressif_kaluga_1/mpconfigboard.mk
@@ -11,7 +11,7 @@ LONGINT_IMPL = MPZ
CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32
CIRCUITPY_ESP_FLASH_MODE=dio
-CIRCUITPY_ESP_FLASH_FREQ=40m
+CIRCUITPY_ESP_FLASH_FREQ=80m
CIRCUITPY_ESP_FLASH_SIZE=4MB
CIRCUITPY_MODULE=wrover
diff --git a/ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h b/ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
index b87b5dfa0..272ab20fa 100644
--- a/ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
+++ b/ports/esp32s2/boards/microdev_micro_s2/mpconfigboard.h
@@ -25,7 +25,6 @@
*/
//Micropython setup
-
#define MICROPY_HW_BOARD_NAME "microS2"
#define MICROPY_HW_MCU_NAME "ESP32S2"
@@ -33,8 +32,20 @@
#define MICROPY_HW_BUTTON (&pin_GPIO0)
#define MICROPY_HW_NEOPIXEL (&pin_GPIO33)
+// Default bus pins
+#define DEFAULT_I2C_BUS_SCL (&pin_GPIO1)
+#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2)
+
+#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36)
+#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35)
+#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37)
+
+#define DEFAULT_UART_BUS_TX (&pin_GPIO43)
+#define DEFAULT_UART_BUS_RX (&pin_GPIO44)
+
#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0)
+// Explanation of how a user got into safe mode.
#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/unexpectedmaker_feathers2/mpconfigboard.h b/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
index 5a885f29c..b68a31b9e 100644
--- a/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
+++ b/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h
@@ -37,3 +37,13 @@
// #define MICROPY_HW_APA102_MOSI (&pin_GPIO40)
// #define MICROPY_HW_APA102_SCK (&pin_GPIO45)
+
+#define DEFAULT_I2C_BUS_SCL (&pin_GPIO9)
+#define DEFAULT_I2C_BUS_SDA (&pin_GPIO8)
+
+#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36)
+#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35)
+#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37)
+
+#define DEFAULT_UART_BUS_RX (&pin_GPIO44)
+#define DEFAULT_UART_BUS_TX (&pin_GPIO43)
diff --git a/ports/esp32s2/common-hal/busio/SPI.c b/ports/esp32s2/common-hal/busio/SPI.c
index 1906ca6f0..da738bbfd 100644
--- a/ports/esp32s2/common-hal/busio/SPI.c
+++ b/ports/esp32s2/common-hal/busio/SPI.c
@@ -204,6 +204,14 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self,
// hal->dummy_bits = 0;
// hal->addr = 0;
+ claim_pin(self->clock_pin);
+ if (self->MOSI_pin != NULL) {
+ claim_pin(self->MOSI_pin);
+ }
+ if (self->MISO_pin != NULL) {
+ claim_pin(self->MISO_pin);
+ }
+
hal->io_mode = SPI_LL_IO_MODE_NORMAL;
common_hal_busio_spi_configure(self, 250000, 0, 0, 8);
@@ -357,6 +365,9 @@ bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_ou
} else {
hal->dma_enabled = 0;
burst_length = sizeof(hal->hw->data_buf);
+ // When switching to non-DMA, we need to make sure DMA is off. Otherwise,
+ // the S2 will transmit zeroes instead of our data.
+ spi_ll_txdma_disable(hal->hw);
}
// This rounds up.
diff --git a/ports/esp32s2/common-hal/canio/CAN.c b/ports/esp32s2/common-hal/canio/CAN.c
new file mode 100644
index 000000000..768fde243
--- /dev/null
+++ b/ports/esp32s2/common-hal/canio/CAN.c
@@ -0,0 +1,295 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 Jeff Epler 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 <string.h>
+
+#include "py/runtime.h"
+#include "py/mperrno.h"
+
+#include "common-hal/canio/CAN.h"
+#include "shared-bindings/microcontroller/Pin.h"
+#include "shared-bindings/util.h"
+#include "supervisor/port.h"
+
+#include "hal/twai_types.h"
+
+STATIC bool reserved_can;
+
+twai_timing_config_t get_t_config(int baudrate) {
+ switch(baudrate) {
+ case 1000000:
+ {
+ // TWAI_TIMING_CONFIG_abc expands to a C designated initializer list
+ // { .brp = 4, ...}. This is only acceptable to the compiler as an
+ // initializer and 'return TWAI_TIMING_CONFIG_1MBITS()` is not valid.
+ // Instead, introduce a temporary, named variable and return it.
+ twai_timing_config_t t_config = TWAI_TIMING_CONFIG_1MBITS();
+ return t_config;
+ }
+ case 800000:
+ {
+ twai_timing_config_t t_config = TWAI_TIMING_CONFIG_800KBITS();
+ return t_config;
+ }
+ case 500000:
+ {
+ twai_timing_config_t t_config = TWAI_TIMING_CONFIG_500KBITS();
+ return t_config;
+ }
+ case 250000:
+ {
+ twai_timing_config_t t_config = TWAI_TIMING_CONFIG_250KBITS();
+ return t_config;
+ }
+ case 125000:
+ {
+ twai_timing_config_t t_config = TWAI_TIMING_CONFIG_125KBITS();
+ return t_config;
+ }
+ case 100000:
+ {
+ twai_timing_config_t t_config = TWAI_TIMING_CONFIG_100KBITS();
+ return t_config;
+ }
+ case 50000:
+ {
+ twai_timing_config_t t_config = TWAI_TIMING_CONFIG_50KBITS();
+ return t_config;
+ }
+ case 25000:
+ {
+ twai_timing_config_t t_config = TWAI_TIMING_CONFIG_25KBITS();
+ return t_config;
+ }
+ case 20000:
+ {
+ twai_timing_config_t t_config = TWAI_TIMING_CONFIG_20KBITS();
+ return t_config;
+ }
+ case 16000:
+ {
+ twai_timing_config_t t_config = TWAI_TIMING_CONFIG_16KBITS();
+ return t_config;
+ }
+ case 12500:
+ {
+ twai_timing_config_t t_config = TWAI_TIMING_CONFIG_12_5KBITS();
+ return t_config;
+ }
+ case 10000:
+ {
+ twai_timing_config_t t_config = TWAI_TIMING_CONFIG_10KBITS();
+ return t_config;
+ }
+ case 5000:
+ {
+ twai_timing_config_t t_config = TWAI_TIMING_CONFIG_5KBITS();
+ return t_config;
+ }
+ case 1000:
+ {
+ twai_timing_config_t t_config = TWAI_TIMING_CONFIG_1KBITS();
+ return t_config;
+ }
+ default:
+ mp_raise_ValueError(translate("Baudrate not supported by peripheral"));
+ }
+}
+
+void common_hal_canio_can_construct(canio_can_obj_t *self, mcu_pin_obj_t *tx, mcu_pin_obj_t *rx, int baudrate, bool loopback, bool silent)
+{
+#define DIV_ROUND(a, b) (((a) + (b)/2) / (b))
+#define DIV_ROUND_UP(a, b) (((a) + (b) - 1) / (b))
+ if (reserved_can) {
+ mp_raise_ValueError(translate("All CAN peripherals are in use"));
+ }
+
+ if (loopback && silent) {
+ mp_raise_ValueError(translate("loopback + silent mode not supported by peripheral"));
+ }
+
+ twai_timing_config_t t_config = get_t_config(baudrate);
+ twai_general_config_t g_config = TWAI_GENERAL_CONFIG_DEFAULT(-1, -1, TWAI_MODE_NORMAL);
+ g_config.tx_io = tx->number;
+ g_config.rx_io = rx->number;
+ if (loopback) {
+ g_config.mode = TWAI_MODE_NO_ACK;
+ }
+ if (silent) {
+ g_config.mode = TWAI_MODE_LISTEN_ONLY;
+ }
+
+ twai_filter_config_t f_config = TWAI_FILTER_CONFIG_ACCEPT_ALL();
+
+ esp_err_t result = twai_driver_install(&g_config, &t_config, &f_config);
+ if (result == ESP_ERR_NO_MEM) {
+ mp_raise_msg(&mp_type_MemoryError, translate("ESP-IDF memory allocation failed"));
+ } else if (result == ESP_ERR_INVALID_ARG) {
+ mp_raise_ValueError(translate("Invalid pins"));
+ } else if (result != ESP_OK) {
+ mp_raise_OSError_msg_varg(translate("twai_driver_install returned esp-idf error #%d"), (int)result);
+ }
+
+ result = twai_start();
+ if (result != ESP_OK) {
+ mp_raise_OSError_msg_varg(translate("twai_start returned esp-idf error #%d"), (int)result);
+ }
+
+ self->silent = silent;
+ self->loopback = loopback;
+ self->baudrate = baudrate;
+ self->tx_pin = tx;
+ self->rx_pin = rx;
+
+ claim_pin(tx);
+ claim_pin(rx);
+
+ reserved_can = true;
+}
+
+bool common_hal_canio_can_loopback_get(canio_can_obj_t *self)
+{
+ return self->loopback;
+}
+
+int common_hal_canio_can_baudrate_get(canio_can_obj_t *self)
+{
+ return self->baudrate;
+}
+
+int common_hal_canio_can_transmit_error_count_get(canio_can_obj_t *self)
+{
+ twai_status_info_t info;
+ twai_get_status_info(&info);
+ return info.tx_error_counter;
+}
+
+int common_hal_canio_can_receive_error_count_get(canio_can_obj_t *self)
+{
+ twai_status_info_t info;
+ twai_get_status_info(&info);
+ return info.rx_error_counter;
+}
+
+canio_bus_state_t common_hal_canio_can_state_get(canio_can_obj_t *self) {
+ twai_status_info_t info;
+ twai_get_status_info(&info);
+ if (info.state == TWAI_STATE_BUS_OFF || info.state == TWAI_STATE_RECOVERING) {
+ return BUS_STATE_OFF;
+ }
+ if (info.tx_error_counter > 127 || info.rx_error_counter > 127) {
+ return BUS_STATE_ERROR_PASSIVE;
+ }
+ if (info.tx_error_counter > 96 || info.rx_error_counter > 96) {
+ return BUS_STATE_ERROR_WARNING;
+ }
+ return BUS_STATE_ERROR_ACTIVE;
+}
+
+static void can_restart(void) {
+ twai_status_info_t info;
+ twai_get_status_info(&info);
+ if (info.state != TWAI_STATE_BUS_OFF) {
+ return;
+ }
+ twai_initiate_recovery();
+ // wait 100ms (hard coded for now) for bus to recover
+ uint64_t deadline = port_get_raw_ticks(NULL) + 100;
+ do {
+ twai_get_status_info(&info);
+ } while (port_get_raw_ticks(NULL) < deadline && (info.state == TWAI_STATE_BUS_OFF || info.state == TWAI_STATE_RECOVERING));
+}
+
+void canio_maybe_auto_restart(canio_can_obj_t *self) {
+ if (self->auto_restart) can_restart();
+}
+
+void common_hal_canio_can_restart(canio_can_obj_t *self) {
+ if (!common_hal_canio_can_auto_restart_get(self)) {
+ can_restart();
+ }
+}
+
+bool common_hal_canio_can_auto_restart_get(canio_can_obj_t *self) {
+ return self->auto_restart;
+}
+
+void common_hal_canio_can_auto_restart_set(canio_can_obj_t *self, bool value) {
+ self->auto_restart = value;
+ canio_maybe_auto_restart(self);
+}
+
+void common_hal_canio_can_send(canio_can_obj_t *self, mp_obj_t message_in)
+{
+ canio_maybe_auto_restart(self);
+ canio_message_obj_t *message = message_in;
+ bool rtr = message->base.type == &canio_remote_transmission_request_type;
+ twai_message_t message_out = {
+ .extd = message->extended,
+ .rtr = rtr,
+ .self = self->loopback,
+ .identifier = message->id,
+ .data_length_code = message->size,
+ };
+ if (!rtr) {
+ memcpy(message_out.data, message->data, message->size);
+ }
+ // Allow transmission to occur in background
+ twai_transmit(&message_out, 0);
+}
+
+bool common_hal_canio_can_silent_get(canio_can_obj_t *self) {
+ return self->silent;
+}
+
+bool common_hal_canio_can_deinited(canio_can_obj_t *self) {
+ return !self->tx_pin;
+}
+
+void common_hal_canio_can_check_for_deinit(canio_can_obj_t *self) {
+ if (common_hal_canio_can_deinited(self)) {
+ raise_deinited_error();
+ }
+}
+
+void common_hal_canio_can_deinit(canio_can_obj_t *self)
+{
+ if (self->tx_pin) {
+ (void)twai_stop();
+ (void)twai_driver_uninstall();
+ reset_pin_number(self->tx_pin->number);
+ reset_pin_number(self->rx_pin->number);
+ reserved_can = false;
+ }
+ self->tx_pin = NULL;
+ self->rx_pin = NULL;
+}
+
+void common_hal_canio_reset(void) {
+ (void)twai_stop();
+ (void)twai_driver_uninstall();
+ reserved_can = false;
+}
diff --git a/ports/esp32s2/common-hal/canio/CAN.h b/ports/esp32s2/common-hal/canio/CAN.h
new file mode 100644
index 000000000..85fb6972b
--- /dev/null
+++ b/ports/esp32s2/common-hal/canio/CAN.h
@@ -0,0 +1,49 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 Jeff Epler 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.
+ */
+
+#pragma once
+
+#include "py/obj.h"
+#include "shared-bindings/canio/__init__.h"
+#include "shared-bindings/canio/CAN.h"
+#include "common-hal/microcontroller/Pin.h"
+#include "common-hal/canio/__init__.h"
+#include "shared-module/canio/Message.h"
+
+#include "driver/twai.h"
+
+#define FILTER_BANK_COUNT (28)
+
+typedef struct canio_can_obj {
+ mp_obj_base_t base;
+ int baudrate;
+ const mcu_pin_obj_t *rx_pin;
+ const mcu_pin_obj_t *tx_pin;
+ bool loopback:1;
+ bool silent:1;
+ bool auto_restart:1;
+ bool fifo_in_use:1;
+} canio_can_obj_t;
diff --git a/ports/esp32s2/common-hal/canio/Listener.c b/ports/esp32s2/common-hal/canio/Listener.c
new file mode 100644
index 000000000..fddbfeb58
--- /dev/null
+++ b/ports/esp32s2/common-hal/canio/Listener.c
@@ -0,0 +1,182 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 Jeff Epler 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 <math.h>
+#include <string.h>
+
+#include "py/obj.h"
+#include "py/runtime.h"
+
+#include "common-hal/canio/__init__.h"
+#include "common-hal/canio/Listener.h"
+#include "shared-bindings/canio/Listener.h"
+#include "shared-bindings/util.h"
+#include "supervisor/shared/tick.h"
+#include "supervisor/shared/safe_mode.h"
+
+#include "hal/twai_ll.h"
+
+// IDE = "extended ID" flag of packet header. We always add this bit to the
+// mask because a match is always for just one kind of address length
+#define FILTER16_IDE (1<<3)
+#define FILTER32_IDE (1<<2)
+
+// Work around a problem reported at
+// https://github.com/espressif/esp-idf/issues/6020 where
+// twai_ll_set_acc_filter does not work under -Os optimization
+__attribute__((optimize("O0")))
+__attribute__((noinline))
+static void canio_set_acc_filter(twai_dev_t* hw, uint32_t code, uint32_t mask, bool single_filter)
+{
+ uint32_t code_swapped = __builtin_bswap32(code);
+ uint32_t mask_swapped = __builtin_bswap32(mask);
+ for (int i = 0; i < 4; i++) {
+ hw->acceptance_filter.acr[i].val = ((code_swapped >> (i * 8)) & 0xFF);
+ hw->acceptance_filter.amr[i].val = ((mask_swapped >> (i * 8)) & 0xFF);
+ }
+ hw->mode_reg.afm = single_filter;
+}
+
+STATIC void install_standard_filter(canio_listener_obj_t *self, canio_match_obj_t *match) {
+ canio_set_acc_filter(&TWAI, match->id << 21, ~(match->mask << 21), true);
+ self->extended = false;
+ self->standard = true;
+}
+
+STATIC void install_extended_filter(canio_listener_obj_t *self, canio_match_obj_t *match) {
+ canio_set_acc_filter(&TWAI, match->id << 3, ~(match->mask << 3), true);
+ self->extended = true;
+ self->standard = false;
+}
+
+STATIC void install_all_match_filter(canio_listener_obj_t *self) {
+ canio_set_acc_filter(&TWAI, 0u, ~0u, true);
+ self->extended = true;
+ self->standard = true;
+}
+
+__attribute__((noinline,optimize("O0")))
+void set_filters(canio_listener_obj_t *self, size_t nmatch, canio_match_obj_t **matches) {
+ twai_ll_enter_reset_mode(&TWAI);
+
+ if (!nmatch) {
+ install_all_match_filter(self);
+ } else {
+ canio_match_obj_t *match = matches[0];
+ if (match->extended) {
+ install_extended_filter(self, match);
+ } else {
+ install_standard_filter(self, match);
+ }
+ }
+
+ twai_ll_exit_reset_mode(&TWAI);
+}
+
+
+void common_hal_canio_listener_construct(canio_listener_obj_t *self, canio_can_obj_t *can, size_t nmatch, canio_match_obj_t **matches, float timeout) {
+ if (can->fifo_in_use) {
+ mp_raise_ValueError(translate("All RX FIFOs in use"));
+ }
+ if (nmatch > 1) {
+ mp_raise_ValueError(translate("Filters too complex"));
+ }
+
+ // Nothing can fail now so it's safe to assign self->can
+ can->fifo_in_use = 1;
+ self->can = can;
+ self->pending = false;
+
+ set_filters(self, nmatch, matches);
+ self->extended = self->standard = true;
+
+ common_hal_canio_listener_set_timeout(self, timeout);
+}
+
+void common_hal_canio_listener_set_timeout(canio_listener_obj_t *self, float timeout) {
+ self->timeout_ms = (int)MICROPY_FLOAT_C_FUN(ceil)(timeout * 1000);
+}
+
+float common_hal_canio_listener_get_timeout(canio_listener_obj_t *self) {
+ return self->timeout_ms / 1000.0f;
+}
+
+void common_hal_canio_listener_check_for_deinit(canio_listener_obj_t *self) {
+ if (!self->can) {
+ raise_deinited_error();
+ }
+ common_hal_canio_can_check_for_deinit(self->can);
+}
+
+// The API has no peek method so we must receive a packet into a holding area
+// and then we can say that we have 1 message pending
+int common_hal_canio_listener_in_waiting(canio_listener_obj_t *self) {
+ while (!self->pending && twai_receive(&self->message_in, 0) == ESP_OK) {
+ if (self->message_in.extd && self->extended) {
+ self->pending = true;
+ }
+ if (!self->message_in.extd && self->standard) {
+ self->pending = true;
+ }
+ }
+ return self->pending;
+}
+
+mp_obj_t common_hal_canio_listener_receive(canio_listener_obj_t *self) {
+ if (!common_hal_canio_listener_in_waiting(self)) {
+ uint64_t deadline = supervisor_ticks_ms64() + self->timeout_ms;
+ do {
+ if (supervisor_ticks_ms64() > deadline) {
+ return NULL;
+ }
+ } while (!common_hal_canio_listener_in_waiting(self));
+ }
+
+ bool rtr = self->message_in.rtr;
+
+ int dlc = self->message_in.data_length_code;
+ canio_message_obj_t *message = m_new_obj(canio_message_obj_t);
+ message->base.type = rtr ? &canio_remote_transmission_request_type : &canio_message_type;
+ message->extended = self->message_in.extd;
+ message->id = self->message_in.identifier;
+ message->size = dlc;
+
+ if (!rtr) {
+ MP_STATIC_ASSERT(sizeof(self->message_in.data) == sizeof(message->data));
+ memcpy(message->data, self->message_in.data, sizeof(message->data));
+ }
+
+ self->pending = false;
+
+ return message;
+}
+
+void common_hal_canio_listener_deinit(canio_listener_obj_t *self) {
+ if (self->can) {
+ self->can->fifo_in_use = false;
+ }
+ self->can = NULL;
+}
diff --git a/ports/esp32s2/common-hal/canio/Listener.h b/ports/esp32s2/common-hal/canio/Listener.h
new file mode 100644
index 000000000..d24900e43
--- /dev/null
+++ b/ports/esp32s2/common-hal/canio/Listener.h
@@ -0,0 +1,40 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 Jeff Epler 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.
+ */
+
+#pragma once
+
+#include "common-hal/canio/CAN.h"
+#include "shared-module/canio/Match.h"
+
+typedef struct canio_listener_obj {
+ mp_obj_base_t base;
+ canio_can_obj_t *can;
+ bool extended:1;
+ bool standard:1;
+ bool pending:1;
+ twai_message_t message_in;
+ uint32_t timeout_ms;
+} canio_listener_obj_t;
diff --git a/ports/esp32s2/common-hal/canio/__init__.c b/ports/esp32s2/common-hal/canio/__init__.c
new file mode 100644
index 000000000..7932bfc2d
--- /dev/null
+++ b/ports/esp32s2/common-hal/canio/__init__.c
@@ -0,0 +1,25 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 Jeff Epler 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.
+ */
diff --git a/ports/esp32s2/common-hal/canio/__init__.h b/ports/esp32s2/common-hal/canio/__init__.h
new file mode 100644
index 000000000..20b6638cd
--- /dev/null
+++ b/ports/esp32s2/common-hal/canio/__init__.h
@@ -0,0 +1,27 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2020 Jeff Epler 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.
+ */
+
+#pragma once
diff --git a/ports/esp32s2/common-hal/countio/Counter.c b/ports/esp32s2/common-hal/countio/Counter.c
new file mode 100644
index 000000000..fe52d93ad
--- /dev/null
+++ b/ports/esp32s2/common-hal/countio/Counter.c
@@ -0,0 +1,84 @@
+/*
+ * 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 "common-hal/countio/Counter.h"
+#include "common-hal/microcontroller/Pin.h"
+
+#include "py/runtime.h"
+#include "supervisor/shared/translate.h"
+
+void common_hal_countio_counter_construct(countio_counter_obj_t* self,
+ const mcu_pin_obj_t* pin) {
+ claim_pin(pin);
+
+ // Prepare configuration for the PCNT unit
+ const pcnt_config_t pcnt_config = {
+ // Set PCNT input signal and control GPIOs
+ .pulse_gpio_num = pin->number,
+ .ctrl_gpio_num = PCNT_PIN_NOT_USED,
+ .channel = PCNT_CHANNEL_0,
+ // What to do on the positive / negative edge of pulse input?
+ .pos_mode = PCNT_COUNT_INC, // Count up on the positive edge
+ .neg_mode = PCNT_COUNT_DIS, // Keep the counter value on the negative edge
+ };
+
+ // Initialize PCNT unit
+ const int8_t unit = peripherals_pcnt_init(pcnt_config);
+ if (unit == -1) {
+ mp_raise_RuntimeError(translate("All PCNT units in use"));
+ }
+
+ self->pin = pin->number;
+ self->unit = (pcnt_unit_t)unit;
+}
+
+bool common_hal_countio_counter_deinited(countio_counter_obj_t* self) {
+ return self->unit == PCNT_UNIT_MAX;
+}
+
+void common_hal_countio_counter_deinit(countio_counter_obj_t* self) {
+ if (common_hal_countio_counter_deinited(self)) {
+ return;
+ }
+ reset_pin_number(self->pin);
+ peripherals_pcnt_deinit(&self->unit);
+}
+
+mp_int_t common_hal_countio_counter_get_count(countio_counter_obj_t* self) {
+ int16_t count;
+ pcnt_get_counter_value(self->unit, &count);
+ return count+self->count;
+}
+
+void common_hal_countio_counter_set_count(countio_counter_obj_t* self,
+ mp_int_t new_count) {
+ self->count = new_count;
+ pcnt_counter_clear(self->unit);
+}
+
+void common_hal_countio_counter_reset(countio_counter_obj_t* self) {
+ common_hal_countio_counter_set_count(self, 0);
+}
diff --git a/ports/esp32s2/common-hal/countio/Counter.h b/ports/esp32s2/common-hal/countio/Counter.h
new file mode 100644
index 000000000..20fe5b83e
--- /dev/null
+++ b/ports/esp32s2/common-hal/countio/Counter.h
@@ -0,0 +1,40 @@
+/*
+ * 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_ESP32S2_COMMON_HAL_COUNTIO_COUNTER_H
+#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_COUNTIO_COUNTER_H
+
+#include "py/obj.h"
+#include "peripherals/pcnt.h"
+
+typedef struct {
+ mp_obj_base_t base;
+ uint8_t pin;
+ mp_int_t count;
+ pcnt_unit_t unit;
+} countio_counter_obj_t;
+
+#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_COUNTIO_COUNT_H
diff --git a/ports/esp32s2/common-hal/countio/__init__.c b/ports/esp32s2/common-hal/countio/__init__.c
new file mode 100644
index 000000000..b95b20d15
--- /dev/null
+++ b/ports/esp32s2/common-hal/countio/__init__.c
@@ -0,0 +1 @@
+//No countio module functions
diff --git a/ports/esp32s2/common-hal/displayio/ParallelBus.c b/ports/esp32s2/common-hal/displayio/ParallelBus.c
index 314b72ff7..d0c98f361 100644
--- a/ports/esp32s2/common-hal/displayio/ParallelBus.c
+++ b/ports/esp32s2/common-hal/displayio/ParallelBus.c
@@ -57,7 +57,8 @@ bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) {
return false;
}
-void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length) {
+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) {
}
diff --git a/ports/esp32s2/common-hal/frequencyio/FrequencyIn.c b/ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
new file mode 100644
index 000000000..12d612abb
--- /dev/null
+++ b/ports/esp32s2/common-hal/frequencyio/FrequencyIn.c
@@ -0,0 +1,193 @@
+/*
+ * 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 "shared-bindings/frequencyio/FrequencyIn.h"
+
+#include "py/runtime.h"
+
+static void IRAM_ATTR pcnt_overflow_handler(void *self_in) {
+ frequencyio_frequencyin_obj_t * self = self_in;
+ // reset counter
+ pcnt_counter_clear(self->unit);
+
+ // increase multiplier
+ self->multiplier++;
+
+ // reset interrupt
+ PCNT.int_clr.val = BIT(self->unit);
+}
+
+static void IRAM_ATTR timer_interrupt_handler(void *self_in) {
+ frequencyio_frequencyin_obj_t * self = self_in;
+ // get counter value
+ int16_t count;
+ pcnt_get_counter_value(self->unit, &count);
+ self->frequency = ((count / 2.0) + (self->multiplier * INT16_MAX / 4.0)) / (self->capture_period);
+
+ // reset multiplier
+ self->multiplier = 0;
+
+ // reset counter
+ pcnt_counter_clear(self->unit);
+
+ // reset interrupt
+ timg_dev_t *device = self->timer.group ? &(TIMERG1) : &(TIMERG0);
+ if (self->timer.idx) {
+ device->int_clr.t1 = 1;
+ } else {
+ device->int_clr.t0 = 1;
+ }
+ device->hw_timer[self->timer.idx].config.alarm_en = 1;
+}
+
+static void init_pcnt(frequencyio_frequencyin_obj_t* self) {
+ // Prepare configuration for the PCNT unit
+ const pcnt_config_t pcnt_config = {
+ // Set PCNT input signal and control GPIOs
+ .pulse_gpio_num = self->pin,
+ .ctrl_gpio_num = PCNT_PIN_NOT_USED,
+ .channel = PCNT_CHANNEL_0,
+ // What to do on the positive / negative edge of pulse input?
+ .pos_mode = PCNT_COUNT_INC, // count both rising and falling edges
+ .neg_mode = PCNT_COUNT_INC,
+ // Set counter limit
+ .counter_h_lim = INT16_MAX,
+ .counter_l_lim = 0,
+ };
+
+ // initialize PCNT
+ const int8_t unit = peripherals_pcnt_init(pcnt_config);
+ if (unit == -1) {
+ mp_raise_RuntimeError(translate("All PCNT units in use"));
+ }
+
+ // set the GPIO back to high-impedance, as pcnt_unit_config sets it as pull-up
+ gpio_set_pull_mode(self->pin, GPIO_FLOATING);
+
+ self->unit = (pcnt_unit_t)unit;
+
+ // enable pcnt interrupt
+ pcnt_event_enable(self->unit, PCNT_EVT_H_LIM);
+ pcnt_isr_register(pcnt_overflow_handler, (void *)self, ESP_INTR_FLAG_IRAM, &self->handle);
+ pcnt_intr_enable(self->unit);
+}
+
+static void init_timer(frequencyio_frequencyin_obj_t* self) {
+ // Prepare configuration for the timer module
+ const timer_config_t config = {
+ .alarm_en = true,
+ .counter_en = false,
+ .intr_type = TIMER_INTR_LEVEL,
+ .counter_dir = TIMER_COUNT_UP,
+ .auto_reload = true,
+ .divider = 80 // 1 us per tick
+ };
+
+ // initialize Timer
+ peripherals_timer_init(&config, &self->timer);
+ if (self->timer.idx == TIMER_MAX || self->timer.group == TIMER_GROUP_MAX) {
+ mp_raise_RuntimeError(translate("All timers in use"));
+ }
+
+ timer_idx_t idx = self->timer.idx;
+ timer_group_t group = self->timer.group;
+
+ // enable timer interrupt
+ timer_set_alarm_value(group, idx, self->capture_period * 1000000);
+ timer_isr_register(group, idx, timer_interrupt_handler, (void *)self, ESP_INTR_FLAG_IRAM, &self->handle);
+ timer_enable_intr(group, idx);
+
+ // start timer
+ timer_start(self->timer.group, self->timer.idx);
+}
+
+void common_hal_frequencyio_frequencyin_construct(frequencyio_frequencyin_obj_t* self,
+ const mcu_pin_obj_t* pin, const uint16_t capture_period) {
+ if ((capture_period == 0) || (capture_period > 500)) {
+ mp_raise_ValueError(translate("Invalid capture period. Valid range: 1 - 500"));
+ }
+
+ self->pin = pin->number;
+ self->handle = NULL;
+ self->multiplier = 0;
+ self->capture_period = capture_period;
+
+ // initialize pcnt and timer
+ init_pcnt(self);
+ init_timer(self);
+
+ claim_pin(pin);
+}
+
+bool common_hal_frequencyio_frequencyin_deinited(frequencyio_frequencyin_obj_t* self) {
+ return self->unit == PCNT_UNIT_MAX;
+}
+
+void common_hal_frequencyio_frequencyin_deinit(frequencyio_frequencyin_obj_t* self) {
+ if (common_hal_frequencyio_frequencyin_deinited(self)) {
+ return;
+ }
+ reset_pin_number(self->pin);
+ peripherals_pcnt_deinit(&self->unit);
+ peripherals_timer_deinit(&self->timer);
+ if (self->handle) {
+ esp_intr_free(self->handle);
+ self->handle = NULL;
+ }
+}
+
+uint32_t common_hal_frequencyio_frequencyin_get_item(frequencyio_frequencyin_obj_t* self) {
+ return self->frequency;
+}
+
+void common_hal_frequencyio_frequencyin_pause(frequencyio_frequencyin_obj_t* self) {
+ pcnt_counter_pause(self->unit);
+ timer_pause(self->timer.group, self->timer.idx);
+}
+
+void common_hal_frequencyio_frequencyin_resume(frequencyio_frequencyin_obj_t* self) {
+ pcnt_counter_resume(self->unit);
+ timer_start(self->timer.group, self->timer.idx);
+}
+
+void common_hal_frequencyio_frequencyin_clear(frequencyio_frequencyin_obj_t* self) {
+ self->frequency = 0;
+ pcnt_counter_clear(self->unit);
+ timer_set_counter_value(self->timer.group, self->timer.idx, 0);
+}
+
+uint16_t common_hal_frequencyio_frequencyin_get_capture_period(frequencyio_frequencyin_obj_t *self) {
+ return self->capture_period;
+}
+
+void common_hal_frequencyio_frequencyin_set_capture_period(frequencyio_frequencyin_obj_t *self, uint16_t capture_period) {
+ if ((capture_period == 0) || (capture_period > 500)) {
+ mp_raise_ValueError(translate("Invalid capture period. Valid range: 1 - 500"));
+ }
+ self->capture_period = capture_period;
+ common_hal_frequencyio_frequencyin_clear(self);
+ timer_set_alarm_value(self->timer.group, self->timer.idx, capture_period * 1000000);
+}
diff --git a/ports/esp32s2/common-hal/frequencyio/FrequencyIn.h b/ports/esp32s2/common-hal/frequencyio/FrequencyIn.h
new file mode 100644
index 000000000..cf9d2ae53
--- /dev/null
+++ b/ports/esp32s2/common-hal/frequencyio/FrequencyIn.h
@@ -0,0 +1,45 @@
+/*
+ * 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_ESP32S2_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
+#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
+
+#include "py/obj.h"
+#include "peripherals/pcnt.h"
+#include "peripherals/timer.h"
+
+typedef struct {
+ mp_obj_base_t base;
+ pcnt_unit_t unit;
+ timer_index_t timer;
+ intr_handle_t handle;
+ uint8_t pin;
+ uint8_t multiplier;
+ uint32_t frequency;
+ uint16_t capture_period;
+} frequencyio_frequencyin_obj_t;
+
+#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_FREQUENCYIO_FREQUENCYIN_H
diff --git a/ports/esp32s2/common-hal/frequencyio/__init__.c b/ports/esp32s2/common-hal/frequencyio/__init__.c
new file mode 100644
index 000000000..487814bd0
--- /dev/null
+++ b/ports/esp32s2/common-hal/frequencyio/__init__.c
@@ -0,0 +1 @@
+// No ferquencyio module functions.
diff --git a/ports/esp32s2/common-hal/microcontroller/Pin.c b/ports/esp32s2/common-hal/microcontroller/Pin.c
index 3c2611efe..394a19e69 100644
--- a/ports/esp32s2/common-hal/microcontroller/Pin.c
+++ b/ports/esp32s2/common-hal/microcontroller/Pin.c
@@ -96,7 +96,7 @@ void reset_all_pins(void) {
}
void claim_pin(const mcu_pin_obj_t* pin) {
- in_use[pin->number / 32] |= (1 << pin->number % 32);
+ in_use[pin->number / 32] |= (1 << (pin->number % 32));
#ifdef MICROPY_HW_NEOPIXEL
if (pin == MICROPY_HW_NEOPIXEL) {
neopixel_in_use = true;
@@ -116,7 +116,7 @@ bool pin_number_is_free(gpio_num_t pin_number) {
#endif
uint8_t offset = pin_number / 32;
- uint8_t mask = 1 << pin_number % 32;
+ uint32_t mask = 1 << (pin_number % 32);
return (never_reset_pins[offset] & mask) == 0 && (in_use[offset] & mask) == 0;
}
diff --git a/ports/esp32s2/common-hal/microcontroller/__init__.c b/ports/esp32s2/common-hal/microcontroller/__init__.c
index 6b2e18673..05f26c3fe 100644
--- a/ports/esp32s2/common-hal/microcontroller/__init__.c
+++ b/ports/esp32s2/common-hal/microcontroller/__init__.c
@@ -35,6 +35,7 @@
#include "shared-bindings/microcontroller/__init__.h"
#include "shared-bindings/microcontroller/Pin.h"
#include "shared-bindings/microcontroller/Processor.h"
+#include "shared-bindings/nvm/ByteArray.h"
#include "supervisor/filesystem.h"
#include "supervisor/shared/safe_mode.h"
@@ -42,7 +43,7 @@
#include "freertos/FreeRTOS.h"
void common_hal_mcu_delay_us(uint32_t delay) {
-
+ mp_hal_delay_us(delay);
}
volatile uint32_t nesting_count = 0;
@@ -85,6 +86,28 @@ const mcu_processor_obj_t common_hal_mcu_processor_obj = {
},
};
+#if CIRCUITPY_INTERNAL_NVM_SIZE > 0
+// The singleton nvm.ByteArray object.
+const nvm_bytearray_obj_t common_hal_mcu_nvm_obj = {
+ .base = {
+ .type = &nvm_bytearray_type,
+ },
+ .start_address = (uint8_t*) CIRCUITPY_INTERNAL_NVM_START_ADDR,
+ .len = CIRCUITPY_INTERNAL_NVM_SIZE,
+};
+#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.
STATIC const mp_rom_map_elem_t mcu_pin_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_GPIO0), MP_ROM_PTR(&pin_GPIO0) },
diff --git a/ports/esp32s2/common-hal/neopixel_write/__init__.c b/ports/esp32s2/common-hal/neopixel_write/__init__.c
index 553cb79f8..63d50bf14 100644
--- a/ports/esp32s2/common-hal/neopixel_write/__init__.c
+++ b/ports/esp32s2/common-hal/neopixel_write/__init__.c
@@ -125,4 +125,6 @@ void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout
// Free channel again
esp32s2_peripherals_free_rmt(config.channel);
+ // Swap pin back to GPIO mode
+ gpio_set_direction(digitalinout->pin->number, GPIO_MODE_OUTPUT);
}
diff --git a/ports/esp32s2/common-hal/nvm/ByteArray.c b/ports/esp32s2/common-hal/nvm/ByteArray.c
new file mode 100644
index 000000000..71321e7e6
--- /dev/null
+++ b/ports/esp32s2/common-hal/nvm/ByteArray.c
@@ -0,0 +1,97 @@
+/*
+ * 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 "common-hal/nvm/ByteArray.h"
+
+#include "py/runtime.h"
+#include "nvs_flash.h"
+
+uint32_t common_hal_nvm_bytearray_get_length(nvm_bytearray_obj_t *self) {
+ return self->len;
+}
+
+static void get_nvs_handle(nvs_handle_t * nvs_handle) {
+ // Initialize NVS
+ esp_err_t err = nvs_flash_init();
+ if (err == ESP_ERR_NVS_NO_FREE_PAGES || err == ESP_ERR_NVS_NEW_VERSION_FOUND) {
+ // NVS partition was truncated and needs to be erased
+ // Retry nvs_flash_init
+ ESP_ERROR_CHECK(nvs_flash_erase());
+ err = nvs_flash_init();
+ }
+ ESP_ERROR_CHECK(err);
+
+ // Open NVS handle
+ if (nvs_open("CPY", NVS_READWRITE, nvs_handle) != ESP_OK) {
+ mp_raise_RuntimeError(translate("NVS Error"));
+ }
+}
+
+bool common_hal_nvm_bytearray_set_bytes(nvm_bytearray_obj_t *self,
+ uint32_t start_index, uint8_t* values, uint32_t len) {
+ char index[9];
+
+ // start nvs
+ nvs_handle_t handle;
+ get_nvs_handle(&handle);
+
+ // stage flash changes
+ for (uint32_t i = 0; i < len; i++) {
+ sprintf(index, "%i", start_index + i);
+ if (nvs_set_u8(handle, (const char *)index, values[i]) != ESP_OK) {
+ return false;
+ }
+ }
+
+ // commit flash changes
+ if (nvs_commit(handle) != ESP_OK) {
+ return false;
+ }
+
+ // close nvs
+ nvs_close(handle);
+ return true;
+}
+
+void common_hal_nvm_bytearray_get_bytes(nvm_bytearray_obj_t *self,
+ uint32_t start_index, uint32_t len, uint8_t* values) {
+ char index[9];
+
+ // start nvs
+ nvs_handle_t handle;
+ get_nvs_handle(&handle);
+
+ // get from flash
+ for (uint32_t i = 0; i < len; i++) {
+ sprintf(index, "%i", start_index + i);
+ if (nvs_get_u8(handle, (const char *)index, &values[i]) != ESP_OK) {
+ mp_raise_RuntimeError(translate("NVS Error"));
+ }
+ }
+
+ // close nvs
+ nvs_close(handle);
+}
diff --git a/ports/esp32s2/common-hal/nvm/ByteArray.h b/ports/esp32s2/common-hal/nvm/ByteArray.h
new file mode 100644
index 000000000..44b63d724
--- /dev/null
+++ b/ports/esp32s2/common-hal/nvm/ByteArray.h
@@ -0,0 +1,38 @@
+/*
+ * 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_ESP32S2_COMMON_HAL_NVM_BYTEARRAY_H
+#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_NVM_BYTEARRAY_H
+
+#include "py/obj.h"
+
+typedef struct {
+ mp_obj_base_t base;
+ uint8_t* start_address;
+ uint32_t len;
+} nvm_bytearray_obj_t;
+
+#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_NVM_BYTEARRAY_H
diff --git a/ports/esp32s2/common-hal/nvm/__init__.c b/ports/esp32s2/common-hal/nvm/__init__.c
new file mode 100644
index 000000000..1b702a158
--- /dev/null
+++ b/ports/esp32s2/common-hal/nvm/__init__.c
@@ -0,0 +1 @@
+// No nvm module functions.
diff --git a/ports/esp32s2/common-hal/ps2io/Ps2.c b/ports/esp32s2/common-hal/ps2io/Ps2.c
new file mode 100644
index 000000000..003f0d827
--- /dev/null
+++ b/ports/esp32s2/common-hal/ps2io/Ps2.c
@@ -0,0 +1,392 @@
+/*
+ * 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 "common-hal/ps2io/Ps2.h"
+
+#include "supervisor/port.h"
+#include "shared-bindings/microcontroller/__init__.h"
+
+#define STATE_IDLE 0
+#define STATE_RECV 1
+#define STATE_RECV_PARITY 2
+#define STATE_RECV_STOP 3
+#define STATE_RECV_ERR 10
+
+#define ERROR_STARTBIT 0x01
+#define ERROR_TIMEOUT 0x02
+#define ERROR_PARITY 0x04
+#define ERROR_STOPBIT 0x08
+#define ERROR_BUFFER 0x10
+
+#define ERROR_TX_CLKLO 0x100
+#define ERROR_TX_CLKHI 0x200
+#define ERROR_TX_ACKDATA 0x400
+#define ERROR_TX_ACKCLK 0x800
+#define ERROR_TX_RTS 0x1000
+#define ERROR_TX_NORESP 0x2000
+
+void ps2_reset(void) {
+ gpio_uninstall_isr_service();
+}
+
+static void delay_us(uint32_t t) {
+ common_hal_mcu_delay_us(t);
+}
+
+/* interrupt handling */
+
+static void IRAM_ATTR ps2_interrupt_handler(void *self_in) {
+ // Grab the current time first.
+ uint64_t current_tick = port_get_raw_ticks(NULL);
+
+ ps2io_ps2_obj_t * self = self_in;
+ int data_bit = gpio_get_level(self->data_pin) ? 1 : 0;
+
+ // test for timeout
+ if (self->state != STATE_IDLE) {
+ int64_t diff_ms = current_tick - self->last_raw_ticks;
+ if (diff_ms > 1) { // a.k.a. > 1.001ms
+ self->last_errors |= ERROR_TIMEOUT;
+ self->state = STATE_IDLE;
+ }
+ }
+
+ self->last_raw_ticks = current_tick;
+
+ if (self->state == STATE_IDLE) {
+ self->bits = 0;
+ self->parity = false;
+ self->bitcount = 0;
+ self->state = STATE_RECV;
+ if (data_bit) {
+ // start bit should be 0
+ self->last_errors |= ERROR_STARTBIT;
+ self->state = STATE_RECV_ERR;
+ } else {
+ self->state = STATE_RECV;
+ }
+
+ } else if (self->state == STATE_RECV) {
+ if (data_bit) {
+ self->bits |= data_bit << self->bitcount;
+ self->parity = !self->parity;
+ }
+ ++self->bitcount;
+ if (self->bitcount >= 8) {
+ self->state = STATE_RECV_PARITY;
+ }
+
+ } else if (self->state == STATE_RECV_PARITY) {
+ ++self->bitcount;
+ if (data_bit) {
+ self->parity = !self->parity;
+ }
+ if (!self->parity) {
+ self->last_errors |= ERROR_PARITY;
+ self->state = STATE_RECV_ERR;
+ } else {
+ self->state = STATE_RECV_STOP;
+ }
+
+ } else if (self->state == STATE_RECV_STOP) {
+ ++self->bitcount;
+ if (! data_bit) {
+ self->last_errors |= ERROR_STOPBIT;
+ } else if (self->waiting_cmd_response) {
+ self->cmd_response = self->bits;
+ self->waiting_cmd_response = false;
+ } else if (self->bufcount >= sizeof(self->buffer)) {
+ self->last_errors |= ERROR_BUFFER;
+ } else {
+ self->buffer[self->bufposw] = self->bits;
+ self->bufposw = (self->bufposw + 1) % sizeof(self->buffer);
+ self->bufcount++;
+ }
+ self->state = STATE_IDLE;
+
+ } else if (self->state == STATE_RECV_ERR) {
+ // just count the bits until idle
+ if (++self->bitcount >= 10) {
+ self->state = STATE_IDLE;
+ }
+ }
+}
+
+static void enable_interrupt(ps2io_ps2_obj_t* self) {
+ // turn on falling edge interrupt
+ gpio_install_isr_service(ESP_INTR_FLAG_IRAM);
+ gpio_set_intr_type(self->clk_pin, GPIO_INTR_NEGEDGE);
+ gpio_isr_handler_add(self->clk_pin, ps2_interrupt_handler, (void*)self);
+}
+
+static void disable_interrupt(ps2io_ps2_obj_t* self) {
+ // turn off fallling edge interrupt
+ gpio_isr_handler_remove(self->clk_pin);
+}
+
+static void resume_interrupt(ps2io_ps2_obj_t* self) {
+ self->state = STATE_IDLE;
+ gpio_isr_handler_add(self->clk_pin, ps2_interrupt_handler, (void*)self);
+}
+
+/* gpio handling */
+
+static void clk_hi(ps2io_ps2_obj_t* self) {
+ // external pull-up
+ gpio_set_direction(self->clk_pin, GPIO_MODE_INPUT);
+}
+
+static bool wait_clk_lo(ps2io_ps2_obj_t* self, uint32_t us) {
+ clk_hi(self);
+ delay_us(1);
+ while (gpio_get_level(self->clk_pin) && us) {
+ --us;
+ delay_us(1);
+ }
+ return us;
+}
+
+static bool wait_clk_hi(ps2io_ps2_obj_t* self, uint32_t us) {
+ clk_hi(self);
+ delay_us(1);
+ while (!gpio_get_level(self->clk_pin) && us) {
+ --us;
+ delay_us(1);
+ }
+ return us;
+}
+
+static void clk_lo(ps2io_ps2_obj_t* self) {
+ gpio_set_direction(self->clk_pin, GPIO_MODE_OUTPUT);
+ gpio_set_level(self->clk_pin, 0);
+}
+
+static void data_hi(ps2io_ps2_obj_t* self) {
+ // external pull-up
+ gpio_set_direction(self->data_pin, GPIO_MODE_INPUT);
+}
+
+static bool wait_data_lo(ps2io_ps2_obj_t* self, uint32_t us) {
+ data_hi(self);
+ delay_us(1);
+ while (gpio_get_level(self->data_pin) && us) {
+ --us;
+ delay_us(1);
+ }
+ return us;
+}
+
+static bool wait_data_hi(ps2io_ps2_obj_t* self, uint32_t us) {
+ data_hi(self);
+ delay_us(1);
+ while (!gpio_get_level(self->data_pin) && us) {
+ --us;
+ delay_us(1);
+ }
+ return us;
+}
+
+static void data_lo(ps2io_ps2_obj_t* self) {
+ gpio_set_direction(self->data_pin, GPIO_MODE_OUTPUT);
+ gpio_set_level(self->data_pin, 0);
+}
+
+static void idle(ps2io_ps2_obj_t* self) {
+ clk_hi(self);
+ data_hi(self);
+}
+
+static void inhibit(ps2io_ps2_obj_t* self) {
+ clk_lo(self);
+ data_hi(self);
+}
+
+/* ps2io module functions */
+
+void common_hal_ps2io_ps2_construct(ps2io_ps2_obj_t* self,
+ const mcu_pin_obj_t* data_pin, const mcu_pin_obj_t* clk_pin) {
+ self->clk_pin = (gpio_num_t)clk_pin->number;
+ self->data_pin = (gpio_num_t)data_pin->number;
+ self->state = STATE_IDLE;
+ self->bufcount = 0;
+ self->bufposr = 0;
+ self->bufposw = 0;
+ self->waiting_cmd_response = false;
+
+ idle(self);
+ enable_interrupt(self);
+
+ claim_pin(clk_pin);
+ claim_pin(data_pin);
+}
+
+bool common_hal_ps2io_ps2_deinited(ps2io_ps2_obj_t* self) {
+ return self->clk_pin == GPIO_NUM_MAX;
+}
+
+void common_hal_ps2io_ps2_deinit(ps2io_ps2_obj_t* self) {
+ if (common_hal_ps2io_ps2_deinited(self)) {
+ return;
+ }
+ gpio_uninstall_isr_service();
+ reset_pin_number(self->clk_pin);
+ reset_pin_number(self->data_pin);
+ self->clk_pin = GPIO_NUM_MAX;
+ self->data_pin = GPIO_NUM_MAX;
+}
+
+uint16_t common_hal_ps2io_ps2_get_len(ps2io_ps2_obj_t* self) {
+ return self->bufcount;
+}
+
+int16_t common_hal_ps2io_ps2_popleft(ps2io_ps2_obj_t* self) {
+ common_hal_mcu_disable_interrupts();
+ if (self->bufcount <= 0) {
+ common_hal_mcu_enable_interrupts();
+ return -1;
+ }
+ uint8_t b = self->buffer[self->bufposr];
+ self->bufposr = (self->bufposr + 1) % sizeof(self->buffer);
+ self->bufcount -= 1;
+ common_hal_mcu_enable_interrupts();
+ return b;
+}
+
+uint16_t common_hal_ps2io_ps2_clear_errors(ps2io_ps2_obj_t* self) {
+ common_hal_mcu_disable_interrupts();
+ uint16_t errors = self->last_errors;
+ self->last_errors = 0;
+ common_hal_mcu_enable_interrupts();
+ return errors;
+}
+
+// Based upon TMK implementation of PS/2 protocol
+// https://github.com/tmk/tmk_keyboard/blob/master/tmk_core/protocol/ps2_interrupt.c
+
+int16_t common_hal_ps2io_ps2_sendcmd(ps2io_ps2_obj_t* self, uint8_t b) {
+ disable_interrupt(self);
+
+ /* terminate a transmission if we have */
+ inhibit(self);
+ delay_us(100);
+
+ /* RTS and start bit */
+ data_lo(self);
+ clk_hi(self);
+ if (!wait_clk_lo(self, 10000)) {
+ self->last_errors |= ERROR_TX_RTS;
+ goto ERROR;
+ }
+
+ bool parity = true;
+ for (uint8_t i = 0; i < 8; i++) {
+ delay_us(15);
+ if (b & (1 << i)) {
+ parity = !parity;
+ data_hi(self);
+ } else {
+ data_lo(self);
+ }
+ if (!wait_clk_hi(self, 50)) {
+ self->last_errors |= ERROR_TX_CLKHI;
+ goto ERROR;
+ }
+ if (!wait_clk_lo(self, 50)) {
+ self->last_errors |= ERROR_TX_CLKLO;
+ goto ERROR;
+ }
+ }
+
+ /* Parity bit */
+ delay_us(15);
+ if (parity) {
+ data_hi(self);
+ } else {
+ data_lo(self);
+ }
+ if (!wait_clk_hi(self, 50)) {
+ self->last_errors |= ERROR_TX_CLKHI;
+ goto ERROR;
+ }
+ if (!wait_clk_lo(self, 50)) {
+ self->last_errors |= ERROR_TX_CLKLO;
+ goto ERROR;
+ }
+
+ /* Stop bit */
+ delay_us(15);
+ data_hi(self);
+
+ /* Ack */
+ if (!wait_data_lo(self, 50)) {
+ self->last_errors |= ERROR_TX_ACKDATA;
+ goto ERROR;
+ }
+ if (!wait_clk_lo(self, 50)) {
+ self->last_errors |= ERROR_TX_ACKCLK;
+ goto ERROR;
+ }
+
+ /* wait for idle state */
+ if (!wait_clk_hi(self, 50)) {
+ self->last_errors |= ERROR_TX_ACKCLK;
+ goto ERROR;
+ }
+ if (!wait_data_hi(self, 50)) {
+ self->last_errors |= ERROR_TX_ACKDATA;
+ goto ERROR;
+ }
+
+ /* Wait for response byte */
+ self->waiting_cmd_response = true;
+ idle(self);
+ resume_interrupt(self);
+
+ for (int i = 0; i < 25; ++i) {
+ delay_us(1000);
+ common_hal_mcu_disable_interrupts();
+ bool has_response = !self->waiting_cmd_response;
+ uint8_t response = self->cmd_response;
+ common_hal_mcu_enable_interrupts();
+
+ if (has_response) {
+ return response;
+ }
+ }
+
+ /* No response */
+ common_hal_mcu_disable_interrupts();
+ self->waiting_cmd_response = false;
+ self->last_errors |= ERROR_TX_NORESP;
+ common_hal_mcu_enable_interrupts();
+ return -1;
+
+ /* Other errors */
+ERROR:
+ idle(self);
+ resume_interrupt(self);
+ return -1;
+}
diff --git a/ports/esp32s2/common-hal/ps2io/Ps2.h b/ports/esp32s2/common-hal/ps2io/Ps2.h
new file mode 100644
index 000000000..497952b25
--- /dev/null
+++ b/ports/esp32s2/common-hal/ps2io/Ps2.h
@@ -0,0 +1,60 @@
+/*
+ * 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_ESP32S2_COMMON_HAL_PS2IO_PS2_H
+#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PS2IO_PS2_H
+
+#include "common-hal/microcontroller/Pin.h"
+
+#include "py/obj.h"
+#include "driver/gpio.h"
+
+typedef struct {
+ mp_obj_base_t base;
+ gpio_num_t clk_pin;
+ gpio_num_t data_pin;
+
+ uint8_t state;
+ uint64_t last_raw_ticks;
+
+ uint16_t bits;
+ bool parity;
+ uint8_t bitcount;
+
+ uint8_t buffer[16];
+ uint8_t bufcount;
+ uint8_t bufposr;
+ uint8_t bufposw;
+
+ uint16_t last_errors;
+
+ bool waiting_cmd_response;
+ uint8_t cmd_response;
+} ps2io_ps2_obj_t;
+
+void ps2_reset(void);
+
+#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_PS2IO_PS2_H
diff --git a/ports/esp32s2/common-hal/ps2io/__init__.c b/ports/esp32s2/common-hal/ps2io/__init__.c
new file mode 100644
index 000000000..ba4b4249f
--- /dev/null
+++ b/ports/esp32s2/common-hal/ps2io/__init__.c
@@ -0,0 +1 @@
+// No ps2io module functions.
diff --git a/ports/esp32s2/common-hal/pulseio/PulseIn.c b/ports/esp32s2/common-hal/pulseio/PulseIn.c
index f7429ec12..9feeea147 100644
--- a/ports/esp32s2/common-hal/pulseio/PulseIn.c
+++ b/ports/esp32s2/common-hal/pulseio/PulseIn.c
@@ -77,7 +77,9 @@ void pulsein_reset(void) {
for (size_t i = 0; i < RMT_CHANNEL_MAX; i++) {
handles[i] = NULL;
}
- supervisor_disable_tick();
+ if (refcount != 0) {
+ supervisor_disable_tick();
+ }
refcount = 0;
}
@@ -122,8 +124,10 @@ void common_hal_pulseio_pulsein_construct(pulseio_pulsein_obj_t* self, const mcu
// start RMT RX, and enable ticks so the core doesn't turn off.
rmt_rx_start(channel, true);
- supervisor_enable_tick();
refcount++;
+ if (refcount == 1) {
+ supervisor_enable_tick();
+ }
}
bool common_hal_pulseio_pulsein_deinited(pulseio_pulsein_obj_t* self) {
diff --git a/ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c b/ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
new file mode 100644
index 000000000..25529ac72
--- /dev/null
+++ b/ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c
@@ -0,0 +1,86 @@
+/*
+ * 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 "common-hal/rotaryio/IncrementalEncoder.h"
+#include "common-hal/microcontroller/Pin.h"
+
+#include "py/runtime.h"
+#include "supervisor/shared/translate.h"
+
+void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencoder_obj_t* self,
+ const mcu_pin_obj_t* pin_a, const mcu_pin_obj_t* pin_b) {
+ claim_pin(pin_a);
+ claim_pin(pin_b);
+
+ // Prepare configuration for the PCNT unit
+ const pcnt_config_t pcnt_config = {
+ // Set PCNT input signal and control GPIOs
+ .pulse_gpio_num = pin_a->number,
+ .ctrl_gpio_num = pin_b->number,
+ .channel = PCNT_CHANNEL_0,
+ // What to do on the positive / negative edge of pulse input?
+ .pos_mode = PCNT_COUNT_DEC, // Count up on the positive edge
+ .neg_mode = PCNT_COUNT_INC, // Keep the counter value on the negative edge
+ // What to do when control input is low or high?
+ .lctrl_mode = PCNT_MODE_REVERSE, // Reverse counting direction if low
+ .hctrl_mode = PCNT_MODE_KEEP, // Keep the primary counter mode if high
+ };
+
+ // Initialize PCNT unit
+ const int8_t unit = peripherals_pcnt_init(pcnt_config);
+ if (unit == -1) {
+ mp_raise_RuntimeError(translate("All PCNT units in use"));
+ }
+
+ self->pin_a = pin_a->number;
+ self->pin_b = pin_b->number;
+ self->unit = (pcnt_unit_t)unit;
+}
+
+bool common_hal_rotaryio_incrementalencoder_deinited(rotaryio_incrementalencoder_obj_t* self) {
+ return self->unit == PCNT_UNIT_MAX;
+}
+
+void common_hal_rotaryio_incrementalencoder_deinit(rotaryio_incrementalencoder_obj_t* self) {
+ if (common_hal_rotaryio_incrementalencoder_deinited(self)) {
+ return;
+ }
+ reset_pin_number(self->pin_a);
+ reset_pin_number(self->pin_b);
+ peripherals_pcnt_deinit(&self->unit);
+}
+
+mp_int_t common_hal_rotaryio_incrementalencoder_get_position(rotaryio_incrementalencoder_obj_t* self) {
+ int16_t count;
+ pcnt_get_counter_value(self->unit, &count);
+ return (count/2)+self->position;
+}
+
+void common_hal_rotaryio_incrementalencoder_set_position(rotaryio_incrementalencoder_obj_t* self,
+ mp_int_t new_position) {
+ self->position = new_position;
+ pcnt_counter_clear(self->unit);
+}
diff --git a/ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.h b/ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.h
new file mode 100644
index 000000000..8a717b7b5
--- /dev/null
+++ b/ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.h
@@ -0,0 +1,40 @@
+/*
+ * 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_ESP32S2_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H
+#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H
+
+#include "py/obj.h"
+#include "peripherals/pcnt.h"
+
+typedef struct {
+ mp_obj_base_t base;
+ uint8_t pin_a, pin_b;
+ mp_int_t position;
+ pcnt_unit_t unit;
+} rotaryio_incrementalencoder_obj_t;
+
+#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_ROTARYIO_INCREMENTALENCODER_H
diff --git a/ports/esp32s2/common-hal/rotaryio/__init__.c b/ports/esp32s2/common-hal/rotaryio/__init__.c
new file mode 100644
index 000000000..0aae79c26
--- /dev/null
+++ b/ports/esp32s2/common-hal/rotaryio/__init__.c
@@ -0,0 +1 @@
+// No rotaryio module functions.
diff --git a/ports/esp32s2/common-hal/socketpool/Socket.c b/ports/esp32s2/common-hal/socketpool/Socket.c
index 0a994c604..92247420f 100644
--- a/ports/esp32s2/common-hal/socketpool/Socket.c
+++ b/ports/esp32s2/common-hal/socketpool/Socket.c
@@ -32,6 +32,11 @@
#include "py/runtime.h"
#include "supervisor/shared/tick.h"
+#include "components/lwip/lwip/src/include/lwip/err.h"
+#include "components/lwip/lwip/src/include/lwip/sockets.h"
+#include "components/lwip/lwip/src/include/lwip/sys.h"
+#include "components/lwip/lwip/src/include/lwip/netdb.h"
+
void common_hal_socketpool_socket_settimeout(socketpool_socket_obj_t* self, mp_uint_t timeout_ms) {
self->timeout_ms = timeout_ms;
}
@@ -79,15 +84,15 @@ mp_uint_t common_hal_socketpool_socket_send(socketpool_socket_obj_t* self, const
mp_uint_t common_hal_socketpool_socket_recv_into(socketpool_socket_obj_t* self, const uint8_t* buf, mp_uint_t len) {
size_t received = 0;
- ssize_t last_read = 1;
+ int status = 0;
uint64_t start_ticks = supervisor_ticks_ms64();
int sockfd;
esp_err_t err = esp_tls_get_conn_sockfd(self->tcp, &sockfd);
if (err != ESP_OK) {
mp_raise_OSError(MP_EBADF);
}
- while (received < len &&
- last_read > 0 &&
+ while (received == 0 &&
+ status >= 0 &&
(self->timeout_ms == 0 || supervisor_ticks_ms64() - start_ticks <= self->timeout_ms) &&
!mp_hal_is_interrupted()) {
RUN_BACKGROUND_TASKS;
@@ -95,42 +100,104 @@ mp_uint_t common_hal_socketpool_socket_recv_into(socketpool_socket_obj_t* self,
if (available == 0) {
// This reads the raw socket buffer and is used for non-TLS connections
// and between encrypted TLS blocks.
- int status = lwip_ioctl(sockfd, FIONREAD, &available);
- if (status < 0) {
- last_read = status;
- break;
- }
+ status = lwip_ioctl(sockfd, FIONREAD, &available);
}
size_t remaining = len - received;
if (available > remaining) {
available = remaining;
}
if (available > 0) {
- last_read = esp_tls_conn_read(self->tcp, (void*) buf + received, available);
- received += last_read;
+ status = esp_tls_conn_read(self->tcp, (void*) buf + received, available);
+ if (status == 0) {
+ // Reading zero when something is available indicates a closed
+ // connection. (The available bytes could have been TLS internal.)
+ break;
+ }
+ if (status > 0) {
+ received += status;
+ }
}
}
- if (last_read == 0) {
+ if (received == 0) {
// socket closed
common_hal_socketpool_socket_close(self);
}
- if (last_read < 0) {
+ if (status < 0) {
mp_raise_BrokenPipeError();
}
return received;
}
+mp_uint_t common_hal_socketpool_socket_sendto(socketpool_socket_obj_t* self,
+ const char* host, size_t hostlen, uint8_t port, const uint8_t* buf, mp_uint_t len) {
+
+ // Get the IP address string
+ const struct addrinfo hints = {
+ .ai_family = AF_INET,
+ .ai_socktype = SOCK_STREAM,
+ };
+ struct addrinfo *result;
+ int error = lwip_getaddrinfo(host, NULL, &hints, &result);
+ if (error != 0 || result == NULL) {
+ return 0;
+ }
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wcast-align"
+ struct in_addr *addr = &((struct sockaddr_in *)result->ai_addr)->sin_addr;
+ #pragma GCC diagnostic pop
+ char ip_str[IP4ADDR_STRLEN_MAX];
+ inet_ntoa_r(*addr, ip_str, IP4ADDR_STRLEN_MAX);
+ freeaddrinfo(result);
+
+ // Set parameters
+ struct sockaddr_in dest_addr;
+ dest_addr.sin_addr.s_addr = inet_addr((const char *)ip_str);
+ dest_addr.sin_family = AF_INET;
+ dest_addr.sin_port = htons(port);
+
+ int bytes_sent = lwip_sendto(self->num, buf, len, 0, (struct sockaddr *)&dest_addr, sizeof(dest_addr));
+ if (bytes_sent < 0) {
+ mp_raise_BrokenPipeError();
+ return 0;
+ }
+ return bytes_sent;
+}
+
+mp_uint_t common_hal_socketpool_socket_recvfrom_into(socketpool_socket_obj_t* self,
+ uint8_t* buf, mp_uint_t len, uint8_t* ip, uint *port) {
+
+ struct sockaddr_in source_addr;
+ socklen_t socklen = sizeof(source_addr);
+ int bytes_received = lwip_recvfrom(self->num, buf, len - 1, 0, (struct sockaddr *)&source_addr, &socklen);
+
+ memcpy((void *)ip, (void*)&source_addr.sin_addr.s_addr, sizeof source_addr.sin_addr.s_addr);
+ *port = source_addr.sin_port;
+
+ if (bytes_received < 0) {
+ mp_raise_BrokenPipeError();
+ return 0;
+ } else {
+ buf[bytes_received] = 0; // Null-terminate whatever we received
+ return bytes_received;
+ }
+}
+
void common_hal_socketpool_socket_close(socketpool_socket_obj_t* self) {
self->connected = false;
if (self->tcp != NULL) {
esp_tls_conn_destroy(self->tcp);
self->tcp = NULL;
}
+ if (self->num >= 0) {
+ lwip_shutdown(self->num, 0);
+ lwip_close(self->num);
+ self->num = -1;
+ }
}
bool common_hal_socketpool_socket_get_closed(socketpool_socket_obj_t* self) {
- return self->tcp == NULL;
+ return self->tcp == NULL && self->num < 0;
}
diff --git a/ports/esp32s2/common-hal/socketpool/SocketPool.c b/ports/esp32s2/common-hal/socketpool/SocketPool.c
index 1d4d04b03..3bec5f337 100644
--- a/ports/esp32s2/common-hal/socketpool/SocketPool.c
+++ b/ports/esp32s2/common-hal/socketpool/SocketPool.c
@@ -61,15 +61,14 @@ socketpool_socket_obj_t* common_hal_socketpool_socket(socketpool_socketpool_obj_
socket_type = SOCK_RAW;
}
- if (socket_type == SOCK_DGRAM || socket_type == SOCK_RAW ||
- addr_family == AF_INET6 || ipproto == IPPROTO_IPV6) {
- mp_raise_NotImplementedError(translate("Only IPv4 SOCK_STREAM sockets supported"));
+ if (addr_family == AF_INET6 || ipproto == IPPROTO_IPV6) {
+ mp_raise_NotImplementedError(translate("Only IPv4 sockets supported"));
}
int socknum = -1;
esp_tls_t* tcp_handle = NULL;
if (socket_type == SOCK_DGRAM || socket_type == SOCK_RAW) {
- // socknum = lwip_socket(addr_family, socket_type, ipproto);
+ socknum = lwip_socket(addr_family, socket_type, ipproto);
} else {
tcp_handle = esp_tls_init();
diff --git a/ports/esp32s2/common-hal/touchio/TouchIn.c b/ports/esp32s2/common-hal/touchio/TouchIn.c
new file mode 100644
index 000000000..b27cbcf86
--- /dev/null
+++ b/ports/esp32s2/common-hal/touchio/TouchIn.c
@@ -0,0 +1,106 @@
+/*
+ * 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 "shared-bindings/touchio/TouchIn.h"
+
+#include "py/runtime.h"
+#include "driver/touch_pad.h"
+
+bool touch_inited = false;
+
+void touchin_reset(void) {
+ if (touch_inited) {
+ touch_pad_deinit();
+ touch_inited = false;
+ }
+}
+
+static uint16_t get_raw_reading(touchio_touchin_obj_t *self) {
+ uint32_t touch_value;
+ touch_pad_read_raw_data((touch_pad_t)self->pin->touch_channel, &touch_value);
+ if (touch_value > UINT16_MAX) {
+ return UINT16_MAX;
+ }
+ return touch_value;
+}
+
+void common_hal_touchio_touchin_construct(touchio_touchin_obj_t* self,
+ const mcu_pin_obj_t *pin) {
+ if (pin->touch_channel == TOUCH_PAD_MAX) {
+ mp_raise_ValueError(translate("Invalid pin"));
+ }
+ claim_pin(pin);
+
+ if (!touch_inited) {
+ touch_pad_init();
+ touch_pad_set_fsm_mode(TOUCH_FSM_MODE_TIMER);
+ touch_pad_fsm_start();
+ touch_inited = true;
+ }
+
+ touch_pad_config((touch_pad_t)pin->touch_channel);
+
+ // wait for "raw data" to reset
+ mp_hal_delay_ms(10);
+
+ // Initial values for pins will vary, depending on what peripherals the pins
+ // share on-chip.
+
+ // Set a "touched" threshold not too far above the initial value.
+ // For simple finger touch, the values may vary as much as a factor of two,
+ // but for touches using fruit or other objects, the difference is much less.
+
+ self->pin = pin;
+ self->threshold = get_raw_reading(self) + 100;
+}
+
+bool common_hal_touchio_touchin_deinited(touchio_touchin_obj_t* self) {
+ return self->pin == NULL;
+}
+
+void common_hal_touchio_touchin_deinit(touchio_touchin_obj_t* self) {
+ if (common_hal_touchio_touchin_deinited(self)) {
+ return;
+ }
+ reset_pin_number(self->pin->touch_channel);
+ self->pin = NULL;
+}
+
+bool common_hal_touchio_touchin_get_value(touchio_touchin_obj_t *self) {
+ return get_raw_reading(self) > self->threshold;
+}
+
+uint16_t common_hal_touchio_touchin_get_raw_value(touchio_touchin_obj_t *self) {
+ return get_raw_reading(self);
+}
+
+uint16_t common_hal_touchio_touchin_get_threshold(touchio_touchin_obj_t *self) {
+ return self->threshold;
+}
+
+void common_hal_touchio_touchin_set_threshold(touchio_touchin_obj_t *self, uint16_t new_threshold) {
+ self->threshold = new_threshold;
+}
diff --git a/ports/esp32s2/common-hal/touchio/TouchIn.h b/ports/esp32s2/common-hal/touchio/TouchIn.h
new file mode 100644
index 000000000..91de20931
--- /dev/null
+++ b/ports/esp32s2/common-hal/touchio/TouchIn.h
@@ -0,0 +1,42 @@
+/*
+ * 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_ESP32S2_COMMON_HAL_TOUCHIO_TOUCHIN_H
+#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_TOUCHIO_TOUCHIN_H
+
+#include "common-hal/microcontroller/Pin.h"
+
+#include "py/obj.h"
+
+typedef struct {
+ mp_obj_base_t base;
+ const mcu_pin_obj_t * pin;
+ uint16_t threshold;
+} touchio_touchin_obj_t;
+
+void touchin_reset(void);
+
+#endif // MICROPY_INCLUDED_ESP32S2_COMMON_HAL_TOUCHIO_TOUCHIN_H
diff --git a/ports/esp32s2/common-hal/touchio/__init__.c b/ports/esp32s2/common-hal/touchio/__init__.c
new file mode 100644
index 000000000..d2290447c
--- /dev/null
+++ b/ports/esp32s2/common-hal/touchio/__init__.c
@@ -0,0 +1 @@
+// No touchio module functions.
diff --git a/ports/esp32s2/common-hal/watchdog/WatchDogMode.c b/ports/esp32s2/common-hal/watchdog/WatchDogMode.c
new file mode 100644
index 000000000..fc4e0e008
--- /dev/null
+++ b/ports/esp32s2/common-hal/watchdog/WatchDogMode.c
@@ -0,0 +1 @@
+// No watchdog module functions.
diff --git a/ports/esp32s2/common-hal/watchdog/WatchDogTimer.c b/ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
new file mode 100644
index 000000000..b51a391b7
--- /dev/null
+++ b/ports/esp32s2/common-hal/watchdog/WatchDogTimer.c
@@ -0,0 +1,93 @@
+/*
+ * 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 "esp_task_wdt.h"
+
+void esp_task_wdt_isr_user_handler(void) {
+ mp_obj_exception_clear_traceback(MP_OBJ_FROM_PTR(&mp_watchdog_timeout_exception));
+ MP_STATE_VM(mp_pending_exception) = &mp_watchdog_timeout_exception;
+#if MICROPY_ENABLE_SCHEDULER
+ if (MP_STATE_VM(sched_state) == MP_SCHED_IDLE) {
+ MP_STATE_VM(sched_state) = MP_SCHED_PENDING;
+ }
+#endif
+}
+
+void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self) {
+ if (esp_task_wdt_reset() != ESP_OK) {
+ mp_raise_RuntimeError(translate("watchdog not initialized"));
+ }
+}
+
+void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) {
+ if (esp_task_wdt_deinit() == ESP_OK) {
+ self->mode = WATCHDOGMODE_NONE;
+ }
+}
+
+void watchdog_reset(void) {
+ common_hal_watchdog_deinit(&common_hal_mcu_watchdogtimer_obj);
+}
+
+static void wdt_config(watchdog_watchdogtimer_obj_t *self) {
+ // enable panic hanler in WATCHDOGMODE_RESET mode
+ // initialize Task Watchdog Timer (TWDT)
+ if (esp_task_wdt_init((uint32_t)self->timeout, (self->mode == WATCHDOGMODE_RESET)) != ESP_OK) {
+ mp_raise_RuntimeError(translate("Initialization failed due to lack of memory"));
+ }
+ esp_task_wdt_add(NULL);
+}
+
+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) {
+ if ((uint64_t)new_timeout > UINT32_MAX) {
+ mp_raise_ValueError(translate("timeout duration exceeded the maximum supported value"));
+ }
+ if ((uint32_t)self->timeout != (uint32_t)new_timeout) {
+ self->timeout = new_timeout;
+ wdt_config(self);
+ }
+}
+
+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) {
+ self->mode = new_mode;
+ wdt_config(self);
+ }
+}
diff --git a/ports/esp32s2/common-hal/watchdog/WatchDogTimer.h b/ports/esp32s2/common-hal/watchdog/WatchDogTimer.h
new file mode 100644
index 000000000..04d9aeee6
--- /dev/null
+++ b/ports/esp32s2/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_ESP32S2_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
+#define MICROPY_INCLUDED_ESP32S2_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_ESP32S2_COMMON_HAL_WATCHDOG_WATCHDOGTIMER_H
diff --git a/ports/esp32s2/common-hal/watchdog/__init__.c b/ports/esp32s2/common-hal/watchdog/__init__.c
new file mode 100644
index 000000000..fc4e0e008
--- /dev/null
+++ b/ports/esp32s2/common-hal/watchdog/__init__.c
@@ -0,0 +1 @@
+// No watchdog module functions.
diff --git a/ports/esp32s2/common-hal/wifi/Radio.c b/ports/esp32s2/common-hal/wifi/Radio.c
index 275bae31a..bc987bc1c 100644
--- a/ports/esp32s2/common-hal/wifi/Radio.c
+++ b/ports/esp32s2/common-hal/wifi/Radio.c
@@ -72,6 +72,8 @@ void common_hal_wifi_radio_set_enabled(wifi_radio_obj_t *self, bool enabled) {
return;
}
if (!self->started && enabled) {
+ // esp_wifi_start() would default to soft-AP, thus setting it to station
+ ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
ESP_ERROR_CHECK(esp_wifi_start());
self->started = true;
return;
@@ -136,9 +138,16 @@ wifi_radio_error_t common_hal_wifi_radio_connect(wifi_radio_obj_t *self, uint8_t
if (bssid_len > 0){
memcpy(&config->sta.bssid, bssid, bssid_len);
config->sta.bssid[bssid_len] = 0;
- config->sta.bssid_set = 1;
+ config->sta.bssid_set = true;
} else {
- config->sta.bssid_set = 0;
+ config->sta.bssid_set = false;
+ }
+ // If channel is 0 (default/unset) and BSSID is not given, do a full scan instead of fast scan
+ // This will ensure that the best AP in range is chosen automatically
+ if ((config->sta.bssid_set == 0) && (config->sta.channel == 0)) {
+ config->sta.scan_method = WIFI_ALL_CHANNEL_SCAN;
+ } else {
+ config->sta.scan_method = WIFI_FAST_SCAN;
}
esp_wifi_set_config(ESP_IF_WIFI_STA, config);
self->starting_retries = 5;
diff --git a/ports/esp32s2/common-hal/wifi/__init__.c b/ports/esp32s2/common-hal/wifi/__init__.c
index 833ef0623..e06038c22 100644
--- a/ports/esp32s2/common-hal/wifi/__init__.c
+++ b/ports/esp32s2/common-hal/wifi/__init__.c
@@ -59,6 +59,7 @@ static void event_handler(void* arg, esp_event_base_t event_base,
ESP_EARLY_LOGW(TAG, "reason %d 0x%02x", reason, reason);
if (radio->retries_left > 0 &&
(reason == WIFI_REASON_AUTH_EXPIRE ||
+ reason == WIFI_REASON_NOT_AUTHED ||
reason == WIFI_REASON_ASSOC_EXPIRE ||
reason == WIFI_REASON_CONNECTION_FAIL ||
reason == WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT)) {
@@ -88,14 +89,17 @@ static void event_handler(void* arg, esp_event_base_t event_base,
}
}
-static bool wifi_inited;
+static bool wifi_inited, wifi_ever_inited;
void common_hal_wifi_init(void) {
wifi_inited = true;
common_hal_wifi_radio_obj.base.type = &wifi_radio_type;
- ESP_ERROR_CHECK(esp_netif_init());
- ESP_ERROR_CHECK(esp_event_loop_create_default());
+ if (!wifi_ever_inited) {
+ ESP_ERROR_CHECK(esp_netif_init());
+ ESP_ERROR_CHECK(esp_event_loop_create_default());
+ }
+ wifi_ever_inited = true;
wifi_radio_obj_t* self = &common_hal_wifi_radio_obj;
self->netif = esp_netif_create_default_wifi_sta();
@@ -144,7 +148,6 @@ void wifi_reset(void) {
ESP_ERROR_CHECK(esp_wifi_deinit());
esp_netif_destroy(radio->netif);
radio->netif = NULL;
- ESP_ERROR_CHECK(esp_netif_deinit());
}
void ipaddress_ipaddress_to_esp_idf(mp_obj_t ip_address, ip_addr_t* esp_ip_address) {
diff --git a/ports/esp32s2/esp-idf b/ports/esp32s2/esp-idf
-Subproject 8bc19ba893e5544d571a753d82b44a84799b94b
+Subproject d06744f5efc382c61cbad8758107cec308feef0
diff --git a/ports/esp32s2/esp-idf-config/sdkconfig.defaults b/ports/esp32s2/esp-idf-config/sdkconfig.defaults
index 4094367e0..025b05caa 100644
--- a/ports/esp32s2/esp-idf-config/sdkconfig.defaults
+++ b/ports/esp32s2/esp-idf-config/sdkconfig.defaults
@@ -135,6 +135,7 @@ CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y
# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set
# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set
# CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set
+# CONFIG_COMPILER_DUMP_RTL_FILES is not set
# end of Compiler options
#
@@ -264,6 +265,11 @@ CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y
# end of Power Management
#
+# ADC-Calibration
+#
+# end of ADC-Calibration
+
+#
# Common ESP-related
#
CONFIG_ESP_ERR_TO_NAME_LOOKUP=y
@@ -332,12 +338,13 @@ CONFIG_ESP_TIMER_IMPL_SYSTIMER=y
#
# Wi-Fi
#
-CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=10
-CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=32
+CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4
+CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8
# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set
CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y
CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1
-CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=32
+CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16
+CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16
# CONFIG_ESP32_WIFI_CSI_ENABLED is not set
CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y
CONFIG_ESP32_WIFI_TX_BA_WIN=6
@@ -401,6 +408,7 @@ CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0
# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set
CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y
# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set
+# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set
CONFIG_FREERTOS_DEBUG_OCDAWARE=y
# end of FreeRTOS
@@ -439,7 +447,7 @@ CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y
# CONFIG_LWIP_L2_TO_L3_COPY is not set
# CONFIG_LWIP_IRAM_OPTIMIZATION is not set
CONFIG_LWIP_TIMERS_ONDEMAND=y
-CONFIG_LWIP_MAX_SOCKETS=10
+CONFIG_LWIP_MAX_SOCKETS=4
# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set
# CONFIG_LWIP_SO_LINGER is not set
CONFIG_LWIP_SO_REUSE=y
@@ -460,6 +468,9 @@ CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y
# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set
#
+# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set
+
+#
# DHCP server
#
CONFIG_LWIP_DHCPS_LEASE_UNIT=60
@@ -474,15 +485,15 @@ CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8
#
# TCP
#
-CONFIG_LWIP_MAX_ACTIVE_TCP=16
-CONFIG_LWIP_MAX_LISTENING_TCP=16
+CONFIG_LWIP_MAX_ACTIVE_TCP=4
+CONFIG_LWIP_MAX_LISTENING_TCP=4
CONFIG_LWIP_TCP_MAXRTX=12
CONFIG_LWIP_TCP_SYNMAXRTX=6
CONFIG_LWIP_TCP_MSS=1440
CONFIG_LWIP_TCP_TMR_INTERVAL=250
CONFIG_LWIP_TCP_MSL=60000
-CONFIG_LWIP_TCP_SND_BUF_DEFAULT=5744
-CONFIG_LWIP_TCP_WND_DEFAULT=5744
+CONFIG_LWIP_TCP_SND_BUF_DEFAULT=2880
+CONFIG_LWIP_TCP_WND_DEFAULT=2880
CONFIG_LWIP_TCP_RECVMBOX_SIZE=6
CONFIG_LWIP_TCP_QUEUE_OOSEQ=y
# CONFIG_LWIP_TCP_SACK_OUT is not set
@@ -505,6 +516,8 @@ CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y
# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set
CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF
# CONFIG_LWIP_PPP_SUPPORT is not set
+CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3
+CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5
# CONFIG_LWIP_SLIP_SUPPORT is not set
#
@@ -552,8 +565,10 @@ CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y
# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set
CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y
CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384
-CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=4096
-# CONFIG_MBEDTLS_DYNAMIC_BUFFER is not set
+CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=2048
+CONFIG_MBEDTLS_DYNAMIC_BUFFER=y
+CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y
+CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y
# CONFIG_MBEDTLS_DEBUG is not set
#
@@ -706,6 +721,7 @@ CONFIG_SPI_FLASH_YIELD_DURING_ERASE=y
CONFIG_SPI_FLASH_ERASE_YIELD_DURATION_MS=20
CONFIG_SPI_FLASH_ERASE_YIELD_TICKS=1
CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=8192
+# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set
#
# Auto-detect flash chips
@@ -824,8 +840,8 @@ CONFIG_TCP_MAXRTX=12
CONFIG_TCP_SYNMAXRTX=6
CONFIG_TCP_MSS=1440
CONFIG_TCP_MSL=60000
-CONFIG_TCP_SND_BUF_DEFAULT=5744
-CONFIG_TCP_WND_DEFAULT=5744
+CONFIG_TCP_SND_BUF_DEFAULT=2880
+CONFIG_TCP_WND_DEFAULT=2880
CONFIG_TCP_RECVMBOX_SIZE=6
CONFIG_TCP_QUEUE_OOSEQ=y
# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set
diff --git a/ports/esp32s2/mpconfigport.h b/ports/esp32s2/mpconfigport.h
index cec8dd35d..db7393d8e 100644
--- a/ports/esp32s2/mpconfigport.h
+++ b/ports/esp32s2/mpconfigport.h
@@ -28,7 +28,6 @@
#ifndef ESP32S2_MPCONFIGPORT_H__
#define ESP32S2_MPCONFIGPORT_H__
-#define CIRCUITPY_INTERNAL_NVM_SIZE (0)
#define MICROPY_NLR_THUMB (0)
#define MICROPY_PY_UJSON (1)
@@ -36,11 +35,15 @@
#include "py/circuitpy_mpconfig.h"
-
#define MICROPY_PORT_ROOT_POINTERS \
CIRCUITPY_COMMON_ROOT_POINTERS
#define MICROPY_NLR_SETJMP (1)
#define CIRCUITPY_DEFAULT_STACK_SIZE 0x6000
+#define CIRCUITPY_INTERNAL_NVM_START_ADDR (0x9000)
+
+#ifndef CIRCUITPY_INTERNAL_NVM_SIZE
+#define CIRCUITPY_INTERNAL_NVM_SIZE (20 * 1024)
+#endif
#endif // __INCLUDED_ESP32S2_MPCONFIGPORT_H
diff --git a/ports/esp32s2/mpconfigport.mk b/ports/esp32s2/mpconfigport.mk
index 4e8a7bdef..8ba5b0f99 100644
--- a/ports/esp32s2/mpconfigport.mk
+++ b/ports/esp32s2/mpconfigport.mk
@@ -16,14 +16,24 @@ LONGINT_IMPL = MPZ
CIRCUITPY_FULL_BUILD = 1
CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_AUDIOIO = 0
-CIRCUITPY_COUNTIO = 0
-CIRCUITPY_FREQUENCYIO = 0
+CIRCUITPY_CANIO = 1
+CIRCUITPY_COUNTIO = 1
+CIRCUITPY_FREQUENCYIO = 1
CIRCUITPY_I2CPERIPHERAL = 0
-CIRCUITPY_ROTARYIO = 0
-CIRCUITPY_NVM = 0
+CIRCUITPY_ROTARYIO = 1
+CIRCUITPY_NVM = 1
# We don't have enough endpoints to include MIDI.
CIRCUITPY_USB_MIDI = 0
CIRCUITPY_WIFI = 1
+CIRCUITPY_WATCHDOG ?= 1
CIRCUITPY_ESPIDF = 1
+ifndef CIRCUITPY_PS2IO
+CIRCUITPY_PS2IO = 1
+endif
+
+ifndef CIRCUITPY_TOUCHIO_USE_NATIVE
+CIRCUITPY_TOUCHIO_USE_NATIVE = 1
+endif
+
CIRCUITPY_MODULE ?= none
diff --git a/ports/esp32s2/peripherals/pcnt.c b/ports/esp32s2/peripherals/pcnt.c
new file mode 100644
index 000000000..dd24569be
--- /dev/null
+++ b/ports/esp32s2/peripherals/pcnt.c
@@ -0,0 +1,68 @@
+/*
+ * 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 "peripherals/pcnt.h"
+
+#define PCNT_UNIT_ACTIVE 1
+#define PCNT_UNIT_INACTIVE 0
+
+static uint8_t pcnt_unit_state[4];
+
+void peripherals_pcnt_reset(void) {
+ for (uint8_t i = 0; i<=3; i++) {
+ pcnt_unit_state[i] = PCNT_UNIT_INACTIVE;
+ }
+}
+
+int peripherals_pcnt_init(pcnt_config_t pcnt_config) {
+ // Look for available pcnt unit
+ for (uint8_t i = 0; i<=3; i++) {
+ if (pcnt_unit_state[i] == PCNT_UNIT_INACTIVE) {
+ pcnt_config.unit = (pcnt_unit_t)i;
+ pcnt_unit_state[i] = PCNT_UNIT_ACTIVE;
+ break;
+ } else if (i == 3) {
+ return -1;
+ }
+ }
+
+ // Initialize PCNT unit
+ pcnt_unit_config(&pcnt_config);
+
+ // Initialize PCNT's counter
+ pcnt_counter_pause(pcnt_config.unit);
+ pcnt_counter_clear(pcnt_config.unit);
+
+ // Everything is set up, now go to counting
+ pcnt_counter_resume(pcnt_config.unit);
+
+ return pcnt_config.unit;
+}
+
+void peripherals_pcnt_deinit(pcnt_unit_t* unit) {
+ pcnt_unit_state[*unit] = PCNT_UNIT_INACTIVE;
+ *unit = PCNT_UNIT_MAX;
+}
diff --git a/ports/esp32s2/peripherals/pcnt.h b/ports/esp32s2/peripherals/pcnt.h
new file mode 100644
index 000000000..4fce13f4d
--- /dev/null
+++ b/ports/esp32s2/peripherals/pcnt.h
@@ -0,0 +1,36 @@
+/*
+ * 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_ESP32S2_PERIPHERALS_PCNT_HANDLER_H
+#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PCNT_HANDLER_H
+
+#include "driver/pcnt.h"
+
+extern int peripherals_pcnt_init(pcnt_config_t pcnt_config);
+extern void peripherals_pcnt_deinit(pcnt_unit_t* unit);
+extern void peripherals_pcnt_reset(void);
+
+#endif // MICROPY_INCLUDED_ESP32S2_PERIPHERALS_PCNT_HANDLER_H
diff --git a/ports/esp32s2/peripherals/pins.c b/ports/esp32s2/peripherals/pins.c
index 2c8b61c62..0d3d89ad5 100755
--- a/ports/esp32s2/peripherals/pins.c
+++ b/ports/esp32s2/peripherals/pins.c
@@ -29,55 +29,58 @@
#define NO_ADC 0
#define NO_ADC_CHANNEL ADC_CHANNEL_MAX
+#define NO_TOUCH_CHANNEL TOUCH_PAD_MAX
+
// This macro is used to simplify pin definition in boards/<board>/pins.c
-#define PIN(p_name, p_number, p_adc_index, p_adc_channel) \
+#define PIN(p_name, p_number, p_adc_index, p_adc_channel, p_touch_channel) \
const mcu_pin_obj_t pin_## p_name = { \
PIN_PREFIX_VALUES \
.number = p_number, \
.adc_index = p_adc_index, \
.adc_channel = p_adc_channel, \
+ .touch_channel = p_touch_channel, \
}
-PIN(GPIO0, 0, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO1, 1, ADC_UNIT_1, ADC_CHANNEL_0);
-PIN(GPIO2, 2, ADC_UNIT_1, ADC_CHANNEL_1);
-PIN(GPIO3, 3, ADC_UNIT_1, ADC_CHANNEL_2);
-PIN(GPIO4, 4, ADC_UNIT_1, ADC_CHANNEL_3);
-PIN(GPIO5, 5, ADC_UNIT_1, ADC_CHANNEL_4);
-PIN(GPIO6, 6, ADC_UNIT_1, ADC_CHANNEL_5);
-PIN(GPIO7, 7, ADC_UNIT_1, ADC_CHANNEL_6);
-PIN(GPIO8, 8, ADC_UNIT_1, ADC_CHANNEL_7);
-PIN(GPIO9, 9, ADC_UNIT_1, ADC_CHANNEL_8);
-PIN(GPIO10, 10, ADC_UNIT_1, ADC_CHANNEL_9);
-PIN(GPIO11, 11, ADC_UNIT_2, ADC_CHANNEL_0);
-PIN(GPIO12, 12, ADC_UNIT_2, ADC_CHANNEL_1);
-PIN(GPIO13, 13, ADC_UNIT_2, ADC_CHANNEL_2);
-PIN(GPIO14, 14, ADC_UNIT_2, ADC_CHANNEL_3);
-PIN(GPIO15, 15, ADC_UNIT_2, ADC_CHANNEL_4);
-PIN(GPIO16, 16, ADC_UNIT_2, ADC_CHANNEL_5);
-PIN(GPIO17, 17, ADC_UNIT_2, ADC_CHANNEL_6);
-PIN(GPIO18, 18, ADC_UNIT_2, ADC_CHANNEL_7);
-PIN(GPIO19, 19, ADC_UNIT_2, ADC_CHANNEL_8);
-PIN(GPIO20, 20, ADC_UNIT_2, ADC_CHANNEL_9);
-PIN(GPIO21, 21, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO26, 26, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO27, 27, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO28, 28, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO29, 29, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO30, 30, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO31, 31, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO32, 32, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO33, 33, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO34, 34, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO35, 35, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO36, 36, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO37, 37, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO38, 38, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO39, 39, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO40, 40, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO41, 41, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO42, 42, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO43, 43, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO44, 44, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO45, 45, NO_ADC, NO_ADC_CHANNEL);
-PIN(GPIO46, 46, NO_ADC, NO_ADC_CHANNEL);
+PIN(GPIO0, 0, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO1, 1, ADC_UNIT_1, ADC_CHANNEL_0, TOUCH_PAD_NUM1);
+PIN(GPIO2, 2, ADC_UNIT_1, ADC_CHANNEL_1, TOUCH_PAD_NUM2);
+PIN(GPIO3, 3, ADC_UNIT_1, ADC_CHANNEL_2, TOUCH_PAD_NUM3);
+PIN(GPIO4, 4, ADC_UNIT_1, ADC_CHANNEL_3, TOUCH_PAD_NUM4);
+PIN(GPIO5, 5, ADC_UNIT_1, ADC_CHANNEL_4, TOUCH_PAD_NUM5);
+PIN(GPIO6, 6, ADC_UNIT_1, ADC_CHANNEL_5, TOUCH_PAD_NUM6);
+PIN(GPIO7, 7, ADC_UNIT_1, ADC_CHANNEL_6, TOUCH_PAD_NUM7);
+PIN(GPIO8, 8, ADC_UNIT_1, ADC_CHANNEL_7, TOUCH_PAD_NUM8);
+PIN(GPIO9, 9, ADC_UNIT_1, ADC_CHANNEL_8, TOUCH_PAD_NUM9);
+PIN(GPIO10, 10, ADC_UNIT_1, ADC_CHANNEL_9, TOUCH_PAD_NUM10);
+PIN(GPIO11, 11, ADC_UNIT_2, ADC_CHANNEL_0, TOUCH_PAD_NUM11);
+PIN(GPIO12, 12, ADC_UNIT_2, ADC_CHANNEL_1, TOUCH_PAD_NUM12);
+PIN(GPIO13, 13, ADC_UNIT_2, ADC_CHANNEL_2, TOUCH_PAD_NUM13);
+PIN(GPIO14, 14, ADC_UNIT_2, ADC_CHANNEL_3, TOUCH_PAD_NUM14);
+PIN(GPIO15, 15, ADC_UNIT_2, ADC_CHANNEL_4, NO_TOUCH_CHANNEL);
+PIN(GPIO16, 16, ADC_UNIT_2, ADC_CHANNEL_5, NO_TOUCH_CHANNEL);
+PIN(GPIO17, 17, ADC_UNIT_2, ADC_CHANNEL_6, NO_TOUCH_CHANNEL);
+PIN(GPIO18, 18, ADC_UNIT_2, ADC_CHANNEL_7, NO_TOUCH_CHANNEL);
+PIN(GPIO19, 19, ADC_UNIT_2, ADC_CHANNEL_8, NO_TOUCH_CHANNEL);
+PIN(GPIO20, 20, ADC_UNIT_2, ADC_CHANNEL_9, NO_TOUCH_CHANNEL);
+PIN(GPIO21, 21, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO26, 26, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO27, 27, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO28, 28, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO29, 29, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO30, 30, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO31, 31, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO32, 32, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO33, 33, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO34, 34, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO35, 35, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO36, 36, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO37, 37, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO38, 38, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO39, 39, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO40, 40, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO41, 41, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO42, 42, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO43, 43, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO44, 44, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO45, 45, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
+PIN(GPIO46, 46, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL);
diff --git a/ports/esp32s2/peripherals/pins.h b/ports/esp32s2/peripherals/pins.h
index 84123a80e..c78eb8385 100644
--- a/ports/esp32s2/peripherals/pins.h
+++ b/ports/esp32s2/peripherals/pins.h
@@ -37,12 +37,14 @@
#include "components/hal/include/hal/gpio_types.h"
#include "components/hal/include/hal/adc_types.h"
+#include "components/hal/include/hal/touch_sensor_types.h"
typedef struct {
PIN_PREFIX_FIELDS
gpio_num_t number;
uint8_t adc_index:2;
uint8_t adc_channel:6;
+ uint8_t touch_channel;
} mcu_pin_obj_t;
extern const mcu_pin_obj_t pin_GPIO0;
diff --git a/ports/esp32s2/peripherals/timer.c b/ports/esp32s2/peripherals/timer.c
new file mode 100644
index 000000000..0ae140387
--- /dev/null
+++ b/ports/esp32s2/peripherals/timer.c
@@ -0,0 +1,76 @@
+/*
+ * 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 "peripherals/timer.h"
+
+#define TIMER_FREE 1
+#define TIMER_BUSY 0
+
+static uint8_t timer_state[2][2];
+
+void peripherals_timer_reset(void) {
+ timer_index_t timer;
+ for (uint8_t i = 0; i < 2; i++) {
+ for (uint8_t j = 0; j < 2; j++) {
+ if (timer_state[i][j] == TIMER_BUSY) {
+ timer.idx = (timer_idx_t)j;
+ timer.group = (timer_group_t)i;
+ timer_state[i][j] = TIMER_FREE;
+ peripherals_timer_deinit(&timer);
+ }
+ }
+ }
+}
+
+void peripherals_timer_init(const timer_config_t * config, timer_index_t * timer) {
+ bool break_loop = false;
+
+ // get free timer
+ for (uint8_t i = 0; i < 2; i++) {
+ for (uint8_t j = 0; j < 2; j++) {
+ if (timer_state[i][j] == TIMER_FREE) {
+ timer->idx = (timer_idx_t)j;
+ timer->group = (timer_group_t)i;
+ timer_state[i][j] = TIMER_BUSY;
+ break_loop = true;
+ break;
+ } else if (i == 1 && j == 1) {
+ timer->idx = TIMER_MAX;
+ timer->group = TIMER_GROUP_MAX;
+ return;
+ }
+ }
+ if (break_loop) {break;}
+ }
+
+ // initialize timer module
+ timer_init(timer->group, timer->idx, config);
+ timer_set_counter_value(timer->group, timer->idx, 0);
+}
+
+void peripherals_timer_deinit(timer_index_t * timer) {
+ timer_deinit(timer->group, timer->idx);
+}
diff --git a/ports/esp32s2/peripherals/timer.h b/ports/esp32s2/peripherals/timer.h
new file mode 100644
index 000000000..8c9ebd91c
--- /dev/null
+++ b/ports/esp32s2/peripherals/timer.h
@@ -0,0 +1,41 @@
+/*
+ * 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_ESP32S2_PERIPHERALS_TIMER_HANDLER_H
+#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TIMER_HANDLER_H
+
+#include "driver/timer.h"
+
+typedef struct {
+ timer_idx_t idx;
+ timer_group_t group;
+} timer_index_t;
+
+extern void peripherals_timer_init(const timer_config_t * config, timer_index_t * timer);
+extern void peripherals_timer_deinit(timer_index_t * timer);
+extern void peripherals_timer_reset(void);
+
+#endif // MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TIMER_HANDLER_H
diff --git a/ports/esp32s2/supervisor/esp_port.h b/ports/esp32s2/supervisor/esp_port.h
new file mode 100644
index 000000000..1164666cd
--- /dev/null
+++ b/ports/esp32s2/supervisor/esp_port.h
@@ -0,0 +1,35 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Lucian Copeland 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.
+ */
+
+#ifndef MICROPY_INCLUDED_ESP32S2_SUPERVISOR_PORT_H
+#define MICROPY_INCLUDED_ESP32S2_SUPERVISOR_PORT_H
+
+#include "freertos/FreeRTOS.h"
+#include "freertos/task.h"
+
+extern TaskHandle_t sleeping_circuitpython_task;
+
+#endif // MICROPY_INCLUDED_ESP32S2_SUPERVISOR_PORT_H
diff --git a/ports/esp32s2/supervisor/port.c b/ports/esp32s2/supervisor/port.c
index 0b9c03f74..0841081de 100644
--- a/ports/esp32s2/supervisor/port.c
+++ b/ports/esp32s2/supervisor/port.c
@@ -30,6 +30,8 @@
#include "supervisor/port.h"
#include "boards/board.h"
#include "modules/module.h"
+#include "py/runtime.h"
+#include "supervisor/esp_port.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
@@ -39,14 +41,19 @@
#include "common-hal/busio/I2C.h"
#include "common-hal/busio/SPI.h"
#include "common-hal/busio/UART.h"
+#include "common-hal/ps2io/Ps2.h"
#include "common-hal/pulseio/PulseIn.h"
#include "common-hal/pwmio/PWMOut.h"
+#include "common-hal/touchio/TouchIn.h"
+#include "common-hal/watchdog/WatchDogTimer.h"
#include "common-hal/wifi/__init__.h"
#include "supervisor/memory.h"
#include "supervisor/shared/tick.h"
#include "shared-bindings/rtc/__init__.h"
#include "peripherals/rmt.h"
+#include "peripherals/pcnt.h"
+#include "peripherals/timer.h"
#include "components/heap/include/esp_heap_caps.h"
#include "components/soc/soc/esp32s2/include/soc/cache_memory.h"
@@ -100,6 +107,10 @@ void reset_port(void) {
analogout_reset();
#endif
+#if CIRCUITPY_PS2IO
+ ps2_reset();
+#endif
+
#if CIRCUITPY_PULSEIO
esp32s2_peripherals_rmt_reset();
pulsein_reset();
@@ -115,10 +126,35 @@ void reset_port(void) {
uart_reset();
#endif
+#if defined(CIRCUITPY_COUNTIO) || defined(CIRCUITPY_ROTARYIO)
+ peripherals_pcnt_reset();
+#endif
+
+#if CIRCUITPY_FREQUENCYIO
+ peripherals_timer_reset();
+#endif
+
+#if CIRCUITPY_PULSEIO
+ esp32s2_peripherals_rmt_reset();
+ pulsein_reset();
+#endif
+
+#if CIRCUITPY_PWMIO
+ pwmout_reset();
+#endif
+
#if CIRCUITPY_RTC
rtc_reset();
#endif
+#if CIRCUITPY_TOUCHIO_USE_NATIVE
+ touchin_reset();
+#endif
+
+#if CIRCUITPY_WATCHDOG
+ watchdog_reset();
+#endif
+
#if CIRCUITPY_WIFI
wifi_reset();
#endif
@@ -148,15 +184,22 @@ uint32_t *port_stack_get_limit(void) {
}
uint32_t *port_stack_get_top(void) {
- return port_stack_get_limit() + CONFIG_ESP_MAIN_TASK_STACK_SIZE / (sizeof(uint32_t) / sizeof(StackType_t));
+ // The sizeof-arithmetic is so that the pointer arithmetic is done on units
+ // of uint32_t instead of units of StackType_t. StackType_t is an alias
+ // for a byte sized type.
+ //
+ // The main stack is bigger than CONFIG_ESP_MAIN_TASK_STACK_SIZE -- an
+ // "extra" size is added to it (TASK_EXTRA_STACK_SIZE). This total size is
+ // available as ESP_TASK_MAIN_STACK. Presumably TASK_EXTRA_STACK_SIZE is
+ // additional stack that can be used by the esp-idf runtime. But what's
+ // important for us is that some very outermost stack frames, such as
+ // pyexec_friendly_repl, could lie inside the "extra" area and be invisible
+ // to the garbage collector.
+ return port_stack_get_limit() + ESP_TASK_MAIN_STACK / (sizeof(uint32_t) / sizeof(StackType_t));
}
-supervisor_allocation _fixed_stack;
-
-supervisor_allocation* port_fixed_stack(void) {
- _fixed_stack.ptr = port_stack_get_limit();
- _fixed_stack.length = (port_stack_get_top() - port_stack_get_limit()) * sizeof(uint32_t);
- return &_fixed_stack;
+bool port_has_fixed_stack(void) {
+ return true;
}
// Place the word to save just after our BSS section that gets blanked.
@@ -168,14 +211,14 @@ uint32_t port_get_saved_word(void) {
}
uint64_t port_get_raw_ticks(uint8_t* subticks) {
- struct timeval tv_now;
- gettimeofday(&tv_now, NULL);
- // convert usec back to ticks
- uint64_t all_subticks = (uint64_t)(tv_now.tv_usec * 2) / 71;
+ // Convert microseconds to subticks of 1/32768 seconds
+ // 32768/1000000 = 64/15625 in lowest terms
+ // this arithmetic overflows after 570 years
+ int64_t all_subticks = esp_timer_get_time() * 512 / 15625;
if (subticks != NULL) {
*subticks = all_subticks % 32;
}
- return (uint64_t)tv_now.tv_sec * 1024L + all_subticks / 32;
+ return all_subticks / 32;
}
// Enable 1/1024 second tick.
@@ -188,25 +231,28 @@ void port_disable_tick(void) {
esp_timer_stop(_tick_timer);
}
-TickType_t sleep_time_set;
TickType_t sleep_time_duration;
+
void port_interrupt_after_ticks(uint32_t ticks) {
- sleep_time_set = xTaskGetTickCount();
- sleep_time_duration = ticks / portTICK_PERIOD_MS;
- // esp_sleep_enable_timer_wakeup(uint64_t time_in_us)
+ sleep_time_duration = (ticks * 100)/1024;
+ sleeping_circuitpython_task = xTaskGetCurrentTaskHandle();
}
void port_sleep_until_interrupt(void) {
- // FreeRTOS delay here maybe.
- // Light sleep shuts down BLE and wifi.
- // esp_light_sleep_start()
+
+ uint32_t NotifyValue = 0;
+
if (sleep_time_duration == 0) {
return;
}
- vTaskDelayUntil(&sleep_time_set, sleep_time_duration);
+ xTaskNotifyWait(0x01,0x01,&NotifyValue,
+ sleep_time_duration );
+ if (NotifyValue == 1) {
+ sleeping_circuitpython_task = NULL;
+ mp_handle_pending();
+ }
}
-
// Wrap main in app_main that the IDF expects.
extern void main(void);
void app_main(void) {
diff --git a/ports/esp32s2/supervisor/usb.c b/ports/esp32s2/supervisor/usb.c
index 1ad6af047..2bfcdfb12 100644
--- a/ports/esp32s2/supervisor/usb.c
+++ b/ports/esp32s2/supervisor/usb.c
@@ -52,6 +52,8 @@
StackType_t usb_device_stack[USBD_STACK_SIZE];
StaticTask_t usb_device_taskdef;
+TaskHandle_t sleeping_circuitpython_task = NULL;
+
// USB Device Driver task
// This top level thread process all usb events and invoke callbacks
void usb_device_task(void* param)
@@ -114,3 +116,23 @@ void init_usb_hardware(void) {
usb_device_stack,
&usb_device_taskdef);
}
+/**
+ * Callback invoked when received an "wanted" char.
+ * @param itf Interface index (for multiple cdc interfaces)
+ * @param wanted_char The wanted char (set previously)
+ */
+void tud_cdc_rx_wanted_cb(uint8_t itf, char wanted_char)
+{
+ (void) itf; // not used
+ // Workaround for using lib/utils/interrupt_char.c
+ // Compare mp_interrupt_char with wanted_char and ignore if not matched
+ if (mp_interrupt_char == wanted_char) {
+ tud_cdc_read_flush(); // flush read fifo
+ mp_keyboard_interrupt();
+ // CircuitPython's VM is run in a separate FreeRTOS task from TinyUSB.
+ // So, we must notify the other task when a CTRL-C is received.
+ if (sleeping_circuitpython_task != NULL) {
+ xTaskNotifyGive(sleeping_circuitpython_task);
+ }
+ }
+}
diff --git a/ports/litex/supervisor/port.c b/ports/litex/supervisor/port.c
index 02617b9af..f5c362ea6 100644
--- a/ports/litex/supervisor/port.c
+++ b/ports/litex/supervisor/port.c
@@ -98,8 +98,8 @@ void reset_cpu(void) {
for(;;) {}
}
-supervisor_allocation* port_fixed_stack(void) {
- return NULL;
+bool port_has_fixed_stack(void) {
+ return false;
}
uint32_t *port_heap_get_bottom(void) {
diff --git a/ports/mimxrt10xx/common-hal/displayio/ParallelBus.c b/ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
index 87a72d0f3..0fdf4413b 100644
--- a/ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
+++ b/ports/mimxrt10xx/common-hal/displayio/ParallelBus.c
@@ -57,7 +57,8 @@ bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) {
return false;
}
-void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length) {
+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) {
}
diff --git a/ports/mimxrt10xx/supervisor/port.c b/ports/mimxrt10xx/supervisor/port.c
index e3fef373f..1be2b1039 100644
--- a/ports/mimxrt10xx/supervisor/port.c
+++ b/ports/mimxrt10xx/supervisor/port.c
@@ -334,11 +334,8 @@ uint32_t *port_stack_get_top(void) {
return &_ld_stack_top;
}
-supervisor_allocation _fixed_stack;
-supervisor_allocation* port_fixed_stack(void) {
- _fixed_stack.ptr = port_stack_get_limit();
- _fixed_stack.length = (port_stack_get_top() - port_stack_get_limit()) * sizeof(uint32_t);
- return &_fixed_stack;
+bool port_has_fixed_stack(void) {
+ return true;
}
uint32_t *port_heap_get_bottom(void) {
diff --git a/ports/stm/boards/thunderpack/board.c b/ports/nrf/boards/ADM_B_NRF52840_1/board.c
index 4421970ee..4421970ee 100644
--- a/ports/stm/boards/thunderpack/board.c
+++ b/ports/nrf/boards/ADM_B_NRF52840_1/board.c
diff --git a/ports/nrf/boards/ADM_B_NRF52840_1/mpconfigboard.h b/ports/nrf/boards/ADM_B_NRF52840_1/mpconfigboard.h
new file mode 100644
index 000000000..575d09feb
--- /dev/null
+++ b/ports/nrf/boards/ADM_B_NRF52840_1/mpconfigboard.h
@@ -0,0 +1,33 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2016 Glenn Ruben Bakke
+ *
+ *
+ * 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 "nrfx/hal/nrf_gpio.h"
+
+#define MICROPY_HW_BOARD_NAME "AtelierDuMaker nRF52840 Breakout"
+#define MICROPY_HW_MCU_NAME "nRF52840"
+
+#define MICROPY_HW_LED_STATUS (&pin_P0_19)
diff --git a/ports/nrf/boards/ADM_B_NRF52840_1/mpconfigboard.mk b/ports/nrf/boards/ADM_B_NRF52840_1/mpconfigboard.mk
new file mode 100644
index 000000000..f3a2e830d
--- /dev/null
+++ b/ports/nrf/boards/ADM_B_NRF52840_1/mpconfigboard.mk
@@ -0,0 +1,8 @@
+USB_VID = 0x239A
+USB_PID = 0x80A0
+USB_PRODUCT = "ADM_B_NRF52840_1"
+USB_MANUFACTURER = "AtelierDuMaker"
+
+MCU_CHIP = nrf52840
+
+INTERNAL_FLASH_FILESYSTEM = 1
diff --git a/ports/nrf/boards/ADM_B_NRF52840_1/pins.c b/ports/nrf/boards/ADM_B_NRF52840_1/pins.c
new file mode 100644
index 000000000..83be4f0ac
--- /dev/null
+++ b/ports/nrf/boards/ADM_B_NRF52840_1/pins.c
@@ -0,0 +1,57 @@
+#include "shared-bindings/board/__init__.h"
+
+STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
+
+ { MP_ROM_QSTR(MP_QSTR_P1_10), MP_ROM_PTR(&pin_P0_02) },
+ { MP_ROM_QSTR(MP_QSTR_P1_11), MP_ROM_PTR(&pin_P1_11) },
+ { MP_ROM_QSTR(MP_QSTR_P1_13), MP_ROM_PTR(&pin_P1_13) },
+ { MP_ROM_QSTR(MP_QSTR_P1_15), MP_ROM_PTR(&pin_P1_15) },
+ { MP_ROM_QSTR(MP_QSTR_P0_03), MP_ROM_PTR(&pin_P0_03) },
+ { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) },
+ { MP_ROM_QSTR(MP_QSTR_P0_28), MP_ROM_PTR(&pin_P0_28) },
+ { MP_ROM_QSTR(MP_QSTR_P0_29), MP_ROM_PTR(&pin_P0_29) },
+ { MP_ROM_QSTR(MP_QSTR_P0_30), MP_ROM_PTR(&pin_P0_30) },
+ { MP_ROM_QSTR(MP_QSTR_P0_31), MP_ROM_PTR(&pin_P0_31) },
+ { MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) },
+ { MP_ROM_QSTR(MP_QSTR_P0_05), MP_ROM_PTR(&pin_P0_05) },
+ { MP_ROM_QSTR(MP_QSTR_P1_14), MP_ROM_PTR(&pin_P1_14) },
+ { MP_ROM_QSTR(MP_QSTR_P1_12), MP_ROM_PTR(&pin_P1_12) },
+ { MP_ROM_QSTR(MP_QSTR_P0_25), MP_ROM_PTR(&pin_P0_25) },
+ { MP_ROM_QSTR(MP_QSTR_P0_11), MP_ROM_PTR(&pin_P0_11) },
+ { MP_ROM_QSTR(MP_QSTR_P1_08), MP_ROM_PTR(&pin_P1_08) },
+ { MP_ROM_QSTR(MP_QSTR_P0_27), MP_ROM_PTR(&pin_P0_28) },
+ { MP_ROM_QSTR(MP_QSTR_P0_08), MP_ROM_PTR(&pin_P0_08) },
+ { MP_ROM_QSTR(MP_QSTR_P0_06), MP_ROM_PTR(&pin_P0_06) },
+ { MP_ROM_QSTR(MP_QSTR_P0_26), MP_ROM_PTR(&pin_P0_26) },
+
+ { MP_ROM_QSTR(MP_QSTR_P0_10), MP_ROM_PTR(&pin_P0_10) },
+ { MP_ROM_QSTR(MP_QSTR_P0_09), MP_ROM_PTR(&pin_P0_09) },
+ { MP_ROM_QSTR(MP_QSTR_P1_06), MP_ROM_PTR(&pin_P1_06) },
+ { MP_ROM_QSTR(MP_QSTR_P1_04), MP_ROM_PTR(&pin_P1_04) },
+ { MP_ROM_QSTR(MP_QSTR_P1_02), MP_ROM_PTR(&pin_P1_02) },
+ { MP_ROM_QSTR(MP_QSTR_P1_01), MP_ROM_PTR(&pin_P1_01) },
+ { MP_ROM_QSTR(MP_QSTR_P1_03), MP_ROM_PTR(&pin_P1_03) },
+ { MP_ROM_QSTR(MP_QSTR_P1_00), MP_ROM_PTR(&pin_P1_00) },
+ { MP_ROM_QSTR(MP_QSTR_P0_22), MP_ROM_PTR(&pin_P0_22) },
+ { MP_ROM_QSTR(MP_QSTR_P1_07), MP_ROM_PTR(&pin_P1_07) },
+ { MP_ROM_QSTR(MP_QSTR_P1_05), MP_ROM_PTR(&pin_P1_05) },
+ { MP_ROM_QSTR(MP_QSTR_P0_24), MP_ROM_PTR(&pin_P0_24) },
+ { MP_ROM_QSTR(MP_QSTR_P0_20), MP_ROM_PTR(&pin_P0_20) },
+ { MP_ROM_QSTR(MP_QSTR_P0_17), MP_ROM_PTR(&pin_P0_17) },
+ { MP_ROM_QSTR(MP_QSTR_P0_15), MP_ROM_PTR(&pin_P0_15) },
+ { MP_ROM_QSTR(MP_QSTR_P0_14), MP_ROM_PTR(&pin_P0_14) },
+ { MP_ROM_QSTR(MP_QSTR_P0_13), MP_ROM_PTR(&pin_P0_13) },
+ { MP_ROM_QSTR(MP_QSTR_P0_16), MP_ROM_PTR(&pin_P0_16) },
+
+ { MP_ROM_QSTR(MP_QSTR_P0_07), MP_ROM_PTR(&pin_P0_07) },
+ { MP_ROM_QSTR(MP_QSTR_P1_09), MP_ROM_PTR(&pin_P1_09) },
+ { MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) },
+ { MP_ROM_QSTR(MP_QSTR_P0_23), MP_ROM_PTR(&pin_P0_23) },
+ { MP_ROM_QSTR(MP_QSTR_P0_21), MP_ROM_PTR(&pin_P0_21) },
+ { MP_ROM_QSTR(MP_QSTR_P0_19), MP_ROM_PTR(&pin_P0_19) },
+
+ // RESET { MP_ROM_QSTR(MP_QSTR_P0_18), MP_ROM_PTR(&pin_P0_18) }
+
+};
+
+MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
diff --git a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h
index 17b044b14..ef34465dc 100644
--- a/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h
+++ b/ports/nrf/boards/circuitplayground_bluefruit/mpconfigboard.h
@@ -59,8 +59,8 @@
#define DEFAULT_I2C_BUS_SCL (&pin_P0_04)
#define DEFAULT_I2C_BUS_SDA (&pin_P0_05)
-#define DEFAULT_SPI_BUS_SCK (&pin_P0_05)
-#define DEFAULT_SPI_BUS_MOSI (&pin_P1_03)
+#define DEFAULT_SPI_BUS_SCK (&pin_P0_02)
+#define DEFAULT_SPI_BUS_MOSI (&pin_P0_03)
#define DEFAULT_SPI_BUS_MISO (&pin_P0_29)
#define DEFAULT_UART_BUS_RX (&pin_P0_30)
diff --git a/ports/nrf/boards/hiibot_bluefi/pins.c b/ports/nrf/boards/hiibot_bluefi/pins.c
index 340ea948c..bce4ee52d 100644
--- a/ports/nrf/boards/hiibot_bluefi/pins.c
+++ b/ports/nrf/boards/hiibot_bluefi/pins.c
@@ -109,10 +109,10 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_P0_27) },
{ MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_P0_27) },
- { MP_ROM_QSTR(MP_QSTR_P27), MP_ROM_PTR(&pin_P1_14) },
- { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_P1_14) },
- { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_P1_14) },
- { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_P1_14) },
+ { MP_ROM_QSTR(MP_QSTR_P27), MP_ROM_PTR(&pin_P1_13) },
+ { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_P1_13) },
+ //{ MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_P1_13) },
+ { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_P1_13) },
// P28~P33/D28~D33 connecte into QSPI FlashROM (W25Q16JV_IQ)
diff --git a/ports/nrf/common-hal/displayio/ParallelBus.c b/ports/nrf/common-hal/displayio/ParallelBus.c
index f13e03163..31ee1f48e 100644
--- a/ports/nrf/common-hal/displayio/ParallelBus.c
+++ b/ports/nrf/common-hal/displayio/ParallelBus.c
@@ -141,7 +141,8 @@ bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) {
}
// This ignores chip_select behaviour because data is clocked in by the write line toggling.
-void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length) {
+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) {
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 = (uint32_t*) &self->write_group->OUTCLR;
diff --git a/ports/nrf/common-hal/watchdog/WatchDogTimer.c b/ports/nrf/common-hal/watchdog/WatchDogTimer.c
index bec0ac473..539b43e76 100644
--- a/ports/nrf/common-hal/watchdog/WatchDogTimer.c
+++ b/ports/nrf/common-hal/watchdog/WatchDogTimer.c
@@ -93,6 +93,9 @@ void common_hal_watchdog_feed(watchdog_watchdogtimer_obj_t *self) {
}
void common_hal_watchdog_deinit(watchdog_watchdogtimer_obj_t *self) {
+ if (self->mode == WATCHDOGMODE_RESET) {
+ mp_raise_NotImplementedError(translate("WatchDogTimer cannot be deinitialized once mode is set to RESET"));
+ }
if (timer) {
timer_free();
}
diff --git a/ports/nrf/supervisor/port.c b/ports/nrf/supervisor/port.c
index 493de43e0..5f1c9f1ba 100644
--- a/ports/nrf/supervisor/port.c
+++ b/ports/nrf/supervisor/port.c
@@ -251,8 +251,8 @@ uint32_t *port_heap_get_top(void) {
return port_stack_get_top();
}
-supervisor_allocation* port_fixed_stack(void) {
- return NULL;
+bool port_has_fixed_stack(void) {
+ return false;
}
uint32_t *port_stack_get_limit(void) {
diff --git a/ports/stm/boards/STM32F411_nvm_nofs.ld b/ports/stm/boards/STM32F411_nvm_nofs.ld
new file mode 100644
index 000000000..e4630518c
--- /dev/null
+++ b/ports/stm/boards/STM32F411_nvm_nofs.ld
@@ -0,0 +1,27 @@
+/*
+ GNU linker script for STM32F411 with nvm and an external flash chip.
+ No space is reserved for a filesystem.
+*/
+
+/* Specify the memory areas */
+MEMORY
+{
+ FLASH (rx) : ORIGIN = 0x08000000, LENGTH = 512K /* entire flash */
+ FLASH_ISR (rx) : ORIGIN = 0x08000000, LENGTH = 16K /* sector 0 */
+ FLASH_NVM (rwx) : ORIGIN = 0x08004000, LENGTH = 16K /* sector 1 is 16K */
+ FLASH_FIRMWARE (rx) : ORIGIN = 0x08008000, LENGTH = 480K /* sector 2,3 is 16k, sector 4 is 64K, sectors 5,6,7 are 128K */
+ RAM (xrw) : ORIGIN = 0x20000000, LENGTH = 128K
+}
+
+/* produce a link error if there is not this amount of RAM for these sections */
+_minimum_stack_size = 24K;
+_minimum_heap_size = 16K;
+
+/* Define the top end of the stack. The stack is full descending so begins just
+ above last byte of RAM. Note that EABI requires the stack to be 8-byte
+ aligned for a call. */
+_estack = ORIGIN(RAM) + LENGTH(RAM);
+
+/* RAM extents for the garbage collector */
+_ram_start = ORIGIN(RAM);
+_ram_end = ORIGIN(RAM) + LENGTH(RAM);
diff --git a/ports/stm/boards/meowbit_v121/mpconfigboard.mk b/ports/stm/boards/meowbit_v121/mpconfigboard.mk
index c416700e3..86b0cb5ab 100644
--- a/ports/stm/boards/meowbit_v121/mpconfigboard.mk
+++ b/ports/stm/boards/meowbit_v121/mpconfigboard.mk
@@ -20,3 +20,5 @@ LD_COMMON = boards/common_default.ld
LD_FILE = boards/STM32F401xe_boot.ld
# For debugging - also comment BOOTLOADER_OFFSET and BOARD_VTOR_DEFER
# LD_FILE = boards/STM32F401xe_fs.ld
+
+CIRCUITPY_ULAB = 0
diff --git a/ports/stm/boards/thunderpack_v11/board.c b/ports/stm/boards/thunderpack_v11/board.c
new file mode 100644
index 000000000..4421970ee
--- /dev/null
+++ b/ports/stm/boards/thunderpack_v11/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 "boards/board.h"
+
+void board_init(void) {
+}
+
+bool board_requests_safe_mode(void) {
+ return false;
+}
+
+void reset_board(void) {
+
+}
diff --git a/ports/stm/boards/thunderpack/mpconfigboard.h b/ports/stm/boards/thunderpack_v11/mpconfigboard.h
index c2649e255..7d4a8dff3 100644
--- a/ports/stm/boards/thunderpack/mpconfigboard.h
+++ b/ports/stm/boards/thunderpack_v11/mpconfigboard.h
@@ -23,7 +23,7 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
-#define MICROPY_HW_BOARD_NAME "THUNDERPACK"
+#define MICROPY_HW_BOARD_NAME "THUNDERPACK_v11"
#define MICROPY_HW_MCU_NAME "STM32F411CE"
// Non-volatile memory config
diff --git a/ports/stm/boards/thunderpack/mpconfigboard.mk b/ports/stm/boards/thunderpack_v11/mpconfigboard.mk
index d303582e0..8f645068d 100644
--- a/ports/stm/boards/thunderpack/mpconfigboard.mk
+++ b/ports/stm/boards/thunderpack_v11/mpconfigboard.mk
@@ -15,3 +15,5 @@ MCU_PACKAGE = UFQFPN48
LD_COMMON = boards/common_nvm.ld
LD_FILE = boards/STM32F411_nvm.ld
+
+CIRCUITPY_ULAB = 0
diff --git a/ports/stm/boards/thunderpack/pins.c b/ports/stm/boards/thunderpack_v11/pins.c
index eed54eb3c..eed54eb3c 100644
--- a/ports/stm/boards/thunderpack/pins.c
+++ b/ports/stm/boards/thunderpack_v11/pins.c
diff --git a/ports/stm/boards/thunderpack_v12/board.c b/ports/stm/boards/thunderpack_v12/board.c
new file mode 100644
index 000000000..4421970ee
--- /dev/null
+++ b/ports/stm/boards/thunderpack_v12/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 "boards/board.h"
+
+void board_init(void) {
+}
+
+bool board_requests_safe_mode(void) {
+ return false;
+}
+
+void reset_board(void) {
+
+}
diff --git a/ports/stm/boards/thunderpack_v12/mpconfigboard.h b/ports/stm/boards/thunderpack_v12/mpconfigboard.h
new file mode 100644
index 000000000..fb5f389a3
--- /dev/null
+++ b/ports/stm/boards/thunderpack_v12/mpconfigboard.h
@@ -0,0 +1,57 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2019 Lucian Copeland 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.
+ */
+#define MICROPY_HW_BOARD_NAME "THUNDERPACK_v12"
+#define MICROPY_HW_MCU_NAME "STM32F411CE"
+
+// Non-volatile memory config
+#define CIRCUITPY_INTERNAL_NVM_SIZE (0x4000)
+#define CIRCUITPY_INTERNAL_NVM_START_ADDR (0x08004000)
+#define CIRCUITPY_INTERNAL_NVM_SECTOR FLASH_SECTOR_1
+#define NVM_BYTEARRAY_BUFFER_SIZE 512
+
+// Flash config
+#define FLASH_SIZE (0x80000)
+#define FLASH_PAGE_SIZE (0x4000)
+#define BOARD_FLASH_SIZE (FLASH_SIZE - CIRCUITPY_INTERNAL_NVM_SIZE- 0x2000 - 0xC000)
+#define INTERNAL_FLASH_FILESYSTEM_SIZE 0x8000
+
+// On-board flash
+#define SPI_FLASH_MOSI_PIN (&pin_PB15)
+#define SPI_FLASH_MISO_PIN (&pin_PB14)
+#define SPI_FLASH_SCK_PIN (&pin_PB13)
+#define SPI_FLASH_CS_PIN (&pin_PB12)
+
+#define HSE_VALUE ((uint32_t)24000000U)
+#define BOARD_OVERWRITE_SWD (1)
+#define BOARD_NO_VBUS_SENSE (1)
+#define BOARD_HAS_LOW_SPEED_CRYSTAL (0)
+
+// Status LEDs
+#define MICROPY_HW_APA102_MOSI (&pin_PB08)
+#define MICROPY_HW_APA102_SCK (&pin_PB00)
+// I2C
+#define DEFAULT_I2C_BUS_SCL (&pin_PB06)
+#define DEFAULT_I2C_BUS_SDA (&pin_PB07)
diff --git a/ports/stm/boards/thunderpack_v12/mpconfigboard.mk b/ports/stm/boards/thunderpack_v12/mpconfigboard.mk
new file mode 100644
index 000000000..a2e1da101
--- /dev/null
+++ b/ports/stm/boards/thunderpack_v12/mpconfigboard.mk
@@ -0,0 +1,21 @@
+USB_VID = 0x239A
+USB_PID = 0x8071
+USB_PRODUCT = "Thunderpack STM32F411"
+USB_MANUFACTURER = "Jeremy Gillick"
+USB_DEVICES = "CDC,MSC"
+
+LONGINT_IMPL = NONE
+
+SPI_FLASH_FILESYSTEM = 1
+EXTERNAL_FLASH_DEVICE_COUNT = 1
+EXTERNAL_FLASH_DEVICES = GD25Q16C
+
+CIRCUITPY_NVM = 1
+CIRCUITPY_BLEIO_HCI = 0
+
+MCU_SERIES = F4
+MCU_VARIANT = STM32F411xE
+MCU_PACKAGE = UFQFPN48
+
+LD_COMMON = boards/common_nvm.ld
+LD_FILE = boards/STM32F411_nvm_nofs.ld
diff --git a/ports/stm/boards/thunderpack_v12/pins.c b/ports/stm/boards/thunderpack_v12/pins.c
new file mode 100644
index 000000000..1e07621ea
--- /dev/null
+++ b/ports/stm/boards/thunderpack_v12/pins.c
@@ -0,0 +1,39 @@
+#include "shared-bindings/board/__init__.h"
+
+STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
+ { MP_ROM_QSTR(MP_QSTR_PA0), MP_ROM_PTR(&pin_PA00) },
+ { MP_ROM_QSTR(MP_QSTR_PA1), MP_ROM_PTR(&pin_PA01) },
+ { MP_ROM_QSTR(MP_QSTR_PA2), MP_ROM_PTR(&pin_PA02) },
+ { MP_ROM_QSTR(MP_QSTR_PA3), MP_ROM_PTR(&pin_PA03) },
+ { MP_ROM_QSTR(MP_QSTR_PA4), MP_ROM_PTR(&pin_PA04) },
+ { MP_ROM_QSTR(MP_QSTR_PA5), MP_ROM_PTR(&pin_PA05) },
+ { MP_ROM_QSTR(MP_QSTR_PA6), MP_ROM_PTR(&pin_PA06) },
+ { MP_ROM_QSTR(MP_QSTR_PA7), MP_ROM_PTR(&pin_PA07) },
+ { MP_ROM_QSTR(MP_QSTR_PA8), MP_ROM_PTR(&pin_PA08) },
+ { MP_ROM_QSTR(MP_QSTR_PA9), MP_ROM_PTR(&pin_PA09) },
+ { MP_ROM_QSTR(MP_QSTR_PA10), MP_ROM_PTR(&pin_PA10) },
+ { MP_ROM_QSTR(MP_QSTR_PA13), MP_ROM_PTR(&pin_PA13) },
+ { MP_ROM_QSTR(MP_QSTR_PA14), MP_ROM_PTR(&pin_PA14) },
+
+ { MP_ROM_QSTR(MP_QSTR_PB0), MP_ROM_PTR(&pin_PB00) },
+ { MP_ROM_QSTR(MP_QSTR_PB5), MP_ROM_PTR(&pin_PB05) },
+ { MP_ROM_QSTR(MP_QSTR_PB6), MP_ROM_PTR(&pin_PB06) },
+ { MP_ROM_QSTR(MP_QSTR_PB7), MP_ROM_PTR(&pin_PB07) },
+ { MP_ROM_QSTR(MP_QSTR_PB8), MP_ROM_PTR(&pin_PB08) },
+
+ { MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_PA00) },
+ { MP_ROM_QSTR(MP_QSTR_LED2), MP_ROM_PTR(&pin_PA01) },
+ { MP_ROM_QSTR(MP_QSTR_LED3), MP_ROM_PTR(&pin_PA02) },
+ { MP_ROM_QSTR(MP_QSTR_LED4), MP_ROM_PTR(&pin_PA03) },
+
+ { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_PB04) },
+
+ { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PB06) },
+ { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PB07) },
+
+ { MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_PB08) },
+ { MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_PB00) },
+
+ { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
+};
+MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
diff --git a/ports/stm/common-hal/displayio/ParallelBus.c b/ports/stm/common-hal/displayio/ParallelBus.c
index 314b72ff7..fd07d38af 100644
--- a/ports/stm/common-hal/displayio/ParallelBus.c
+++ b/ports/stm/common-hal/displayio/ParallelBus.c
@@ -57,7 +57,8 @@ bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t obj) {
return false;
}
-void common_hal_displayio_parallelbus_send(mp_obj_t obj, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length) {
+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) {
}
diff --git a/ports/stm/common-hal/microcontroller/Pin.c b/ports/stm/common-hal/microcontroller/Pin.c
index 996513270..0e333c71c 100644
--- a/ports/stm/common-hal/microcontroller/Pin.c
+++ b/ports/stm/common-hal/microcontroller/Pin.c
@@ -35,6 +35,10 @@
#ifdef MICROPY_HW_NEOPIXEL
bool neopixel_in_use;
#endif
+#if defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)
+bool apa102_sck_in_use;
+bool apa102_mosi_in_use;
+#endif
#if defined(TFBGA216)
GPIO_TypeDef * ports[] = {GPIOA, GPIOB, GPIOC, GPIOD, GPIOE, GPIOF, GPIOG, GPIOH, GPIOI, GPIOJ, GPIOK};
@@ -66,6 +70,10 @@ void reset_all_pins(void) {
#ifdef MICROPY_HW_NEOPIXEL
neopixel_in_use = false;
#endif
+ #if defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)
+ apa102_sck_in_use = false;
+ apa102_mosi_in_use = false;
+ #endif
}
// Mark pin as free and return it to a quiescent state.
@@ -89,6 +97,18 @@ void reset_pin_number(uint8_t pin_port, uint8_t pin_number) {
return;
}
#endif
+ #if defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)
+ if (
+ (pin_port == MICROPY_HW_APA102_MOSI->port && pin_number == MICROPY_HW_APA102_MOSI->number)
+ || (pin_port == MICROPY_HW_APA102_SCK->port && pin_number == MICROPY_HW_APA102_MOSI->number)
+ )
+ {
+ apa102_mosi_in_use = false;
+ apa102_sck_in_use = false;
+ rgb_led_status_init();
+ return;
+ }
+ #endif
}
void never_reset_pin_number(uint8_t pin_port, uint8_t pin_number) {
@@ -123,6 +143,16 @@ bool common_hal_mcu_pin_is_free(const mcu_pin_obj_t *pin) {
return !neopixel_in_use;
}
#endif
+ #if defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)
+ if (pin == MICROPY_HW_APA102_MOSI)
+ {
+ return !apa102_mosi_in_use;
+ }
+ if (pin == MICROPY_HW_APA102_SCK)
+ {
+ return !apa102_sck_in_use;
+ }
+ #endif
return pin_number_is_free(pin->port, pin->number);
}
@@ -146,6 +176,16 @@ void common_hal_mcu_pin_claim(const mcu_pin_obj_t* pin) {
neopixel_in_use = true;
}
#endif
+ #if defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK)
+ if (pin == MICROPY_HW_APA102_MOSI)
+ {
+ apa102_mosi_in_use = true;
+ }
+ if (pin == MICROPY_HW_APA102_SCK)
+ {
+ apa102_sck_in_use = true;
+ }
+ #endif
}
void common_hal_mcu_pin_reset_number(uint8_t pin_no) {
diff --git a/ports/stm/common-hal/nvm/ByteArray.c b/ports/stm/common-hal/nvm/ByteArray.c
index 462d3aa9d..b7a1ff035 100644
--- a/ports/stm/common-hal/nvm/ByteArray.c
+++ b/ports/stm/common-hal/nvm/ByteArray.c
@@ -48,7 +48,7 @@ bool common_hal_nvm_bytearray_set_bytes(nvm_bytearray_obj_t *self,
// Erase flash sector
HAL_FLASH_Unlock();
- __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGSERR );
+ __HAL_FLASH_CLEAR_FLAG(FLASH_FLAG_EOP | FLASH_FLAG_OPERR | FLASH_FLAG_WRPERR | FLASH_FLAG_PGAERR | FLASH_FLAG_PGPERR | FLASH_FLAG_PGSERR );
FLASH_Erase_Sector(CIRCUITPY_INTERNAL_NVM_SECTOR, VOLTAGE_RANGE_3);
// Write bytes to flash
diff --git a/ports/stm/supervisor/internal_flash.h b/ports/stm/supervisor/internal_flash.h
index ad5cba62d..19ae03e0b 100644
--- a/ports/stm/supervisor/internal_flash.h
+++ b/ports/stm/supervisor/internal_flash.h
@@ -41,8 +41,12 @@
#ifdef STM32F411xE
#define STM32_FLASH_SIZE 0x80000 //512KiB
-#define INTERNAL_FLASH_FILESYSTEM_SIZE 0xC000 //48KiB
-#define INTERNAL_FLASH_FILESYSTEM_START_ADDR 0x08004000
+#ifndef INTERNAL_FLASH_FILESYSTEM_SIZE
+ #define INTERNAL_FLASH_FILESYSTEM_SIZE 0xC000 //48KiB
+#endif
+#ifndef INTERNAL_FLASH_FILESYSTEM_START_ADDR
+ #define INTERNAL_FLASH_FILESYSTEM_START_ADDR 0x08004000
+#endif
#endif
#ifdef STM32F412Zx
diff --git a/ports/stm/supervisor/port.c b/ports/stm/supervisor/port.c
index a8aab00ff..dba1cf21e 100644
--- a/ports/stm/supervisor/port.c
+++ b/ports/stm/supervisor/port.c
@@ -267,8 +267,8 @@ uint32_t *port_heap_get_top(void) {
return &_ld_heap_end;
}
-supervisor_allocation* port_fixed_stack(void) {
- return NULL;
+bool port_has_fixed_stack(void) {
+ return false;
}
uint32_t *port_stack_get_limit(void) {
diff --git a/ports/unix/modjni.c b/ports/unix/modjni.c
index 8ec5ae54d..82d1ccd55 100644
--- a/ports/unix/modjni.c
+++ b/ports/unix/modjni.c
@@ -102,9 +102,9 @@ STATIC void check_exception(void) {
mp_obj_t py_e = new_jobject(exc);
JJ1(ExceptionClear);
if (JJ(IsInstanceOf, exc, IndexException_class)) {
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_IndexError, py_e));
+ mp_raise_arg1(&mp_type_IndexError, py_e);
}
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_Exception, py_e));
+ mp_raise_arg1(&mp_type_Exception, py_e);
}
}
diff --git a/py/argcheck.c b/py/argcheck.c
index 9341c02a6..af5c81bf3 100644
--- a/py/argcheck.c
+++ b/py/argcheck.c
@@ -99,12 +99,12 @@ void mp_arg_parse_all(size_t n_pos, const mp_obj_t *pos, mp_map_t *kws, size_t n
mp_map_elem_t *kw = mp_map_lookup(kws, MP_OBJ_NEW_QSTR(allowed[i].qst), MP_MAP_LOOKUP);
if (kw == NULL) {
if (allowed[i].flags & MP_ARG_REQUIRED) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_arg_error_terse_mismatch();
- } else {
+ #else
mp_raise_TypeError_varg(
translate("'%q' argument required"), allowed[i].qst);
- }
+ #endif
}
out_vals[i] = allowed[i].defval;
continue;
@@ -124,20 +124,20 @@ void mp_arg_parse_all(size_t n_pos, const mp_obj_t *pos, mp_map_t *kws, size_t n
}
if (pos_found < n_pos) {
extra_positional:
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_arg_error_terse_mismatch();
- } else {
+ #else
// TODO better error message
mp_raise_TypeError(translate("extra positional arguments given"));
- }
+ #endif
}
if (kws_found < kws->used) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_arg_error_terse_mismatch();
- } else {
+ #else
// TODO better error message
mp_raise_TypeError(translate("extra keyword arguments given"));
- }
+ #endif
}
}
diff --git a/py/bc.c b/py/bc.c
index 640671338..01131cb4c 100644
--- a/py/bc.c
+++ b/py/bc.c
@@ -214,8 +214,8 @@ void mp_setup_code_state(mp_code_state_t *code_state, size_t n_args, size_t n_kw
#if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("unexpected keyword argument"));
#else
- nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_TypeError,
- translate("unexpected keyword argument '%q'"), MP_OBJ_QSTR_VALUE(wanted_arg_name)));
+ mp_raise_TypeError_varg(
+ translate("unexpected keyword argument '%q'"), MP_OBJ_QSTR_VALUE(wanted_arg_name));
#endif
}
mp_obj_dict_store(dict, kwargs[2 * i], kwargs[2 * i + 1]);
diff --git a/py/builtinimport.c b/py/builtinimport.c
index 47ffab519..c4768cc77 100644
--- a/py/builtinimport.c
+++ b/py/builtinimport.c
@@ -426,12 +426,12 @@ mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args) {
mp_module_call_init(mod_name, module_obj);
} else {
// couldn't find the file, so fail
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_ImportError(translate("module not found"));
- } else {
+ #else
mp_raise_msg_varg(&mp_type_ImportError,
translate("no module named '%q'"), mod_name);
- }
+ #endif
}
} else {
// found the file, so get the module
@@ -538,12 +538,12 @@ mp_obj_t mp_builtin___import__(size_t n_args, const mp_obj_t *args) {
#endif
// Couldn't find the module, so fail
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_msg(&mp_type_ImportError, translate("module not found"));
- } else {
+ #else
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_ImportError,
translate("no module named '%q'"), module_name_qstr));
- }
+ #endif
}
#endif // MICROPY_ENABLE_EXTERNAL_IMPORT
diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h
index 78de7905a..d7325335f 100644
--- a/py/circuitpy_mpconfig.h
+++ b/py/circuitpy_mpconfig.h
@@ -184,11 +184,13 @@ typedef long mp_off_t;
// Turning off FULL_BUILD removes some functionality to reduce flash size on tiny SAMD21s
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (CIRCUITPY_FULL_BUILD)
#define MICROPY_CPYTHON_COMPAT (CIRCUITPY_FULL_BUILD)
-#define MICROPY_PY_BUILTINS_POW3 (CIRCUITPY_FULL_BUILD)
+#define MICROPY_PY_BUILTINS_POW3 (CIRCUITPY_BUILTINS_POW3)
#define MICROPY_COMP_FSTRING_LITERAL (MICROPY_CPYTHON_COMPAT)
-#define MICROPY_MODULE_WEAK_LINKS (CIRCUITPY_FULL_BUILD)
+#define MICROPY_MODULE_WEAK_LINKS (0)
#define MICROPY_PY_ALL_SPECIAL_METHODS (CIRCUITPY_FULL_BUILD)
+#ifndef MICROPY_PY_BUILTINS_COMPLEX
#define MICROPY_PY_BUILTINS_COMPLEX (CIRCUITPY_FULL_BUILD)
+#endif
#define MICROPY_PY_BUILTINS_FROZENSET (CIRCUITPY_FULL_BUILD)
#define MICROPY_PY_BUILTINS_STR_CENTER (CIRCUITPY_FULL_BUILD)
#define MICROPY_PY_BUILTINS_STR_PARTITION (CIRCUITPY_FULL_BUILD)
@@ -197,6 +199,9 @@ typedef long mp_off_t;
#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
@@ -706,6 +711,12 @@ extern const struct _mp_obj_module_t 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
@@ -777,6 +788,7 @@ extern const struct _mp_obj_module_t wifi_module;
AUDIOMIXER_MODULE \
AUDIOMP3_MODULE \
AUDIOPWMIO_MODULE \
+ BINASCII_MODULE \
BITBANGIO_MODULE \
BLEIO_MODULE \
BOARD_MODULE \
@@ -856,17 +868,20 @@ extern const struct _mp_obj_module_t wifi_module;
#include "supervisor/flash_root_pointers.h"
+// From supervisor/memory.c
+struct _supervisor_allocation_node;
+
#define CIRCUITPY_COMMON_ROOT_POINTERS \
const char *readline_hist[8]; \
vstr_t *repl_line; \
mp_obj_t rtc_time_source; \
GAMEPAD_ROOT_POINTERS \
mp_obj_t pew_singleton; \
- mp_obj_t terminal_tilegrid_tiles; \
BOARD_UART_ROOT_POINTER \
FLASH_ROOT_POINTERS \
MEMORYMONITOR_ROOT_POINTERS \
NETWORK_ROOT_POINTERS \
+ struct _supervisor_allocation_node* first_embedded_allocation; \
void supervisor_run_background_tasks_if_tick(void);
#define RUN_BACKGROUND_TASKS (supervisor_run_background_tasks_if_tick())
diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk
index e814edd16..00c2d5d49 100644
--- a/py/circuitpy_mpconfig.mk
+++ b/py/circuitpy_mpconfig.mk
@@ -93,6 +93,9 @@ CFLAGS += -DCIRCUITPY_BOARD=$(CIRCUITPY_BOARD)
CIRCUITPY_BUSDEVICE ?= $(CIRCUITPY_FULL_BUILD)
CFLAGS += -DCIRCUITPY_BUSDEVICE=$(CIRCUITPY_BUSDEVICE)
+CIRCUITPY_BUILTINS_POW3 ?= $(CIRCUITPY_FULL_BUILD)
+CFLAGS += -DCIRCUITPY_BUILTINS_POW3=$(CIRCUITPY_BUILTINS_POW3)
+
CIRCUITPY_BUSIO ?= 1
CFLAGS += -DCIRCUITPY_BUSIO=$(CIRCUITPY_BUSIO)
diff --git a/py/compile.c b/py/compile.c
index 04bcf5bc1..b4d81ed44 100644
--- a/py/compile.c
+++ b/py/compile.c
@@ -2486,21 +2486,21 @@ STATIC void compile_atom_brace(compiler_t *comp, mp_parse_node_struct_t *pns) {
compile_node(comp, pn_i);
if (is_dict) {
if (!is_key_value) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
compile_syntax_error(comp, (mp_parse_node_t)pns, translate("invalid syntax"));
- } else {
+ #else
compile_syntax_error(comp, (mp_parse_node_t)pns, translate("expecting key:value for dict"));
- }
+ #endif
return;
}
EMIT(store_map);
} else {
if (is_key_value) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
compile_syntax_error(comp, (mp_parse_node_t)pns, translate("invalid syntax"));
- } else {
+ #else
compile_syntax_error(comp, (mp_parse_node_t)pns, translate("expecting just a value for set"));
- }
+ #endif
return;
}
}
diff --git a/py/modbuiltins.c b/py/modbuiltins.c
index 41e1d4e48..fe3c366ee 100644
--- a/py/modbuiltins.c
+++ b/py/modbuiltins.c
@@ -346,12 +346,12 @@ STATIC mp_obj_t mp_builtin_ord(mp_obj_t o_in) {
}
}
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("ord expects a character"));
- } else {
+ #else
mp_raise_TypeError_varg(
translate("ord() expected a character, but string of length %d found"), (int)len);
- }
+ #endif
}
MP_DEFINE_CONST_FUN_OBJ_1(mp_builtin_ord_obj, mp_builtin_ord);
diff --git a/py/modsys.c b/py/modsys.c
index a1d2cf831..81628683d 100644
--- a/py/modsys.c
+++ b/py/modsys.c
@@ -92,13 +92,11 @@ STATIC const MP_DEFINE_STR_OBJ(platform_obj, MICROPY_PY_SYS_PLATFORM);
// exit([retval]): raise SystemExit, with optional argument given to the exception
STATIC mp_obj_t mp_sys_exit(size_t n_args, const mp_obj_t *args) {
- mp_obj_t exc;
if (n_args == 0) {
- exc = mp_obj_new_exception(&mp_type_SystemExit);
+ nlr_raise(mp_obj_new_exception(&mp_type_SystemExit));
} else {
- exc = mp_obj_new_exception_arg1(&mp_type_SystemExit, args[0]);
+ mp_raise_arg1(&mp_type_SystemExit, args[0]);
}
- nlr_raise(exc);
}
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_sys_exit_obj, 0, 1, mp_sys_exit);
diff --git a/py/obj.c b/py/obj.c
index 9dc0cf474..d8e34746c 100644
--- a/py/obj.c
+++ b/py/obj.c
@@ -125,6 +125,7 @@ void mp_obj_print_exception(const mp_print_t *print, mp_obj_t exc) {
mp_printf(print, decompressed_block, block);
}
}
+ mp_obj_exception_clear_traceback(exc);
}
}
mp_obj_print_helper(print, exc, PRINT_EXC);
@@ -261,12 +262,12 @@ mp_int_t mp_obj_get_int(mp_const_obj_t arg) {
} else if (MP_OBJ_IS_TYPE(arg, &mp_type_int)) {
return mp_obj_int_get_checked(arg);
} else {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError_varg(translate("can't convert to %q"), MP_QSTR_int);
- } else {
+ #else
mp_raise_TypeError_varg(
translate("can't convert %q to %q"), mp_obj_get_type_qstr(arg), MP_QSTR_int);
- }
+ #endif
}
}
@@ -324,12 +325,12 @@ mp_float_t mp_obj_get_float(mp_obj_t arg) {
mp_float_t val;
if (!mp_obj_get_float_maybe(arg, &val)) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError_varg(translate("can't convert to %q"), MP_QSTR_float);
- } else {
+ #else
mp_raise_TypeError_varg(
translate("can't convert %q to %q"), mp_obj_get_type_qstr(arg), MP_QSTR_float);
- }
+ #endif
}
return val;
@@ -357,12 +358,12 @@ void mp_obj_get_complex(mp_obj_t arg, mp_float_t *real, mp_float_t *imag) {
} else if (MP_OBJ_IS_TYPE(arg, &mp_type_complex)) {
mp_obj_complex_get(arg, real, imag);
} else {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError_varg(translate("can't convert to %q"), MP_QSTR_complex);
- } else {
+ #else
mp_raise_TypeError_varg(
translate("can't convert %q to %q"), mp_obj_get_type_qstr(arg), MP_QSTR_complex);
- }
+ #endif
}
}
#endif
@@ -375,12 +376,12 @@ void mp_obj_get_array(mp_obj_t o, size_t *len, mp_obj_t **items) {
} else if (MP_OBJ_IS_TYPE(o, &mp_type_list)) {
mp_obj_list_get(o, len, items);
} else {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("expected tuple/list"));
- } else {
+ #else
mp_raise_TypeError_varg(
translate("object '%q' is not a tuple or list"), mp_obj_get_type_qstr(o));
- }
+ #endif
}
}
@@ -389,12 +390,12 @@ void mp_obj_get_array_fixed_n(mp_obj_t o, size_t len, mp_obj_t **items) {
size_t seq_len;
mp_obj_get_array(o, &seq_len, items);
if (seq_len != len) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_ValueError(translate("tuple/list has wrong length"));
- } else {
+ #else
mp_raise_ValueError_varg(translate("requested length %d but object has length %d"),
(int)len, (int)seq_len);
- }
+ #endif
}
}
@@ -404,13 +405,13 @@ size_t mp_get_index(const mp_obj_type_t *type, size_t len, mp_obj_t index, bool
if (MP_OBJ_IS_SMALL_INT(index)) {
i = MP_OBJ_SMALL_INT_VALUE(index);
} else if (!mp_obj_get_int_maybe(index, &i)) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("indices must be integers"));
- } else {
+ #else
mp_raise_TypeError_varg(
translate("%q indices must be integers, not %q"),
type->name, mp_obj_get_type_qstr(index));
- }
+ #endif
}
if (i < 0) {
@@ -424,12 +425,12 @@ size_t mp_get_index(const mp_obj_type_t *type, size_t len, mp_obj_t index, bool
}
} else {
if (i < 0 || (mp_uint_t)i >= len) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_IndexError(translate("index out of range"));
- } else {
+ #else
mp_raise_msg_varg(&mp_type_IndexError,
translate("%q index out of range"), type->name);
- }
+ #endif
}
}
@@ -459,12 +460,12 @@ mp_obj_t mp_obj_id(mp_obj_t o_in) {
mp_obj_t mp_obj_len(mp_obj_t o_in) {
mp_obj_t len = mp_obj_len_maybe(o_in);
if (len == MP_OBJ_NULL) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("object has no len"));
- } else {
+ #else
mp_raise_TypeError_varg(
translate("object of type '%q' has no len()"), mp_obj_get_type_qstr(o_in));
- }
+ #endif
} else {
return len;
}
@@ -502,26 +503,26 @@ mp_obj_t mp_obj_subscr(mp_obj_t base, mp_obj_t index, mp_obj_t value) {
}
}
if (value == MP_OBJ_NULL) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("object does not support item deletion"));
- } else {
+ #else
mp_raise_TypeError_varg(
translate("'%q' object does not support item deletion"), mp_obj_get_type_qstr(base));
- }
+ #endif
} else if (value == MP_OBJ_SENTINEL) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("object is not subscriptable"));
- } else {
+ #else
mp_raise_TypeError_varg(
translate("'%q' object is not subscriptable"), mp_obj_get_type_qstr(base));
- }
+ #endif
} else {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("object does not support item assignment"));
- } else {
+ #else
mp_raise_TypeError_varg(
translate("'%q' object does not support item assignment"), mp_obj_get_type_qstr(base));
- }
+ #endif
}
}
diff --git a/py/objdict.c b/py/objdict.c
index 63fd86f35..098aec5d2 100644
--- a/py/objdict.c
+++ b/py/objdict.c
@@ -169,7 +169,7 @@ mp_obj_t mp_obj_dict_get(mp_obj_t self_in, mp_obj_t index) {
mp_obj_dict_t *self = MP_OBJ_TO_PTR(self_in);
mp_map_elem_t *elem = mp_map_lookup(&self->map, index, MP_MAP_LOOKUP);
if (elem == NULL) {
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_KeyError, index));
+ mp_raise_arg1(&mp_type_KeyError, index);
} else {
return elem->value;
}
@@ -185,7 +185,7 @@ STATIC mp_obj_t dict_subscr(mp_obj_t self_in, mp_obj_t index, mp_obj_t value) {
mp_obj_dict_t *self = MP_OBJ_TO_PTR(self_in);
mp_map_elem_t *elem = mp_map_lookup(&self->map, index, MP_MAP_LOOKUP);
if (elem == NULL) {
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_KeyError, index));
+ mp_raise_arg1(&mp_type_KeyError, index);
} else {
return elem->value;
}
@@ -272,7 +272,7 @@ STATIC mp_obj_t dict_get_helper(size_t n_args, const mp_obj_t *args, mp_map_look
if (elem == NULL || elem->value == MP_OBJ_NULL) {
if (n_args == 2) {
if (lookup_kind == MP_MAP_LOOKUP_REMOVE_IF_FOUND) {
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_KeyError, args[1]));
+ mp_raise_arg1(&mp_type_KeyError, args[1]);
} else {
value = mp_const_none;
}
diff --git a/py/objmodule.c b/py/objmodule.c
index 757aece04..90796c535 100644
--- a/py/objmodule.c
+++ b/py/objmodule.c
@@ -239,7 +239,12 @@ STATIC const mp_rom_map_elem_t mp_builtin_module_table[] = {
{ MP_ROM_QSTR(MP_QSTR_hashlib), MP_ROM_PTR(&mp_module_uhashlib) },
#endif
#if MICROPY_PY_UBINASCII
- { MP_ROM_QSTR(MP_QSTR_binascii), MP_ROM_PTR(&mp_module_ubinascii) },
+#if CIRCUITPY
+// CircuitPython: Defined in MICROPY_PORT_BUILTIN_MODULES, so not defined here.
+// TODO: move to shared-bindings/
+#else
+ { MP_ROM_QSTR(MP_QSTR_ubinascii), MP_ROM_PTR(&mp_module_ubinascii) },
+#endif
#endif
#if MICROPY_PY_URANDOM
{ MP_ROM_QSTR(MP_QSTR_urandom), MP_ROM_PTR(&mp_module_urandom) },
diff --git a/py/objnamedtuple.c b/py/objnamedtuple.c
index ab2f2f3c0..8b595da57 100644
--- a/py/objnamedtuple.c
+++ b/py/objnamedtuple.c
@@ -102,17 +102,17 @@ mp_obj_t namedtuple_make_new(const mp_obj_type_t *type_in, size_t n_args, const
n_kw = kw_args->used;
}
if (n_args + n_kw != num_fields) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_arg_error_terse_mismatch();
- } else if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_NORMAL) {
+ #elif MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_NORMAL
mp_raise_TypeError_varg(
translate("function takes %d positional arguments but %d were given"),
num_fields, n_args + n_kw);
- } else if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_DETAILED) {
+ #else
mp_raise_TypeError_varg(
translate("%q() takes %d positional arguments but %d were given"),
type->base.name, num_fields, n_args + n_kw);
- }
+ #endif
}
// Create a tuple and set the type to this namedtuple
@@ -128,20 +128,20 @@ mp_obj_t namedtuple_make_new(const mp_obj_type_t *type_in, size_t n_args, const
qstr kw = mp_obj_str_get_qstr(kw_args->table[i].key);
size_t id = mp_obj_namedtuple_find_field(type, kw);
if (id == (size_t)-1) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_arg_error_terse_mismatch();
- } else {
+ #else
mp_raise_TypeError_varg(
translate("unexpected keyword argument '%q'"), kw);
- }
+ #endif
}
if (tuple->items[id] != MP_OBJ_NULL) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_arg_error_terse_mismatch();
- } else {
+ #else
mp_raise_TypeError_varg(
translate("function got multiple values for argument '%q'"), kw);
- }
+ #endif
}
tuple->items[id] = kw_args->table[i].value;
}
diff --git a/py/objset.c b/py/objset.c
index 45b5c1260..c5d54aede 100644
--- a/py/objset.c
+++ b/py/objset.c
@@ -378,7 +378,7 @@ STATIC mp_obj_t set_remove(mp_obj_t self_in, mp_obj_t item) {
check_set(self_in);
mp_obj_set_t *self = MP_OBJ_TO_PTR(self_in);
if (mp_set_lookup(&self->set, item, MP_MAP_LOOKUP_REMOVE_IF_FOUND) == MP_OBJ_NULL) {
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_KeyError, item));
+ mp_raise_arg1(&mp_type_KeyError, item);
}
return mp_const_none;
}
diff --git a/py/objstr.c b/py/objstr.c
index edb562df2..1a59aeaec 100644
--- a/py/objstr.c
+++ b/py/objstr.c
@@ -971,11 +971,11 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar
vstr_add_byte(&vstr, '}');
continue;
}
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
terse_str_format_value_error();
- } else {
+ #else
mp_raise_ValueError(translate("single '}' encountered in format string"));
- }
+ #endif
}
if (*str != '{') {
vstr_add_byte(&vstr, *str);
@@ -1010,18 +1010,18 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar
if (str < top && (*str == 'r' || *str == 's')) {
conversion = *str++;
} else {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
terse_str_format_value_error();
- } else if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_NORMAL) {
+ #elif MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_NORMAL
mp_raise_ValueError(translate("bad conversion specifier"));
- } else {
+ #else
if (str >= top) {
mp_raise_ValueError(
translate("end of format while looking for conversion specifier"));
} else {
mp_raise_ValueError_varg(translate("unknown conversion specifier %c"), *str);
}
- }
+ #endif
}
}
@@ -1047,18 +1047,18 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar
}
}
if (str >= top) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
terse_str_format_value_error();
- } else {
+ #else
mp_raise_ValueError(translate("unmatched '{' in format"));
- }
+ #endif
}
if (*str != '}') {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
- terse_str_format_value_error();
- } else {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
+:w
+ #else
mp_raise_ValueError(translate("expected ':' after format specifier"));
- }
+ #endif
}
mp_obj_t arg = mp_const_none;
@@ -1067,12 +1067,12 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar
int index = 0;
if (MP_LIKELY(unichar_isdigit(*field_name))) {
if (*arg_i > 0) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
terse_str_format_value_error();
- } else {
+ #else
mp_raise_ValueError(
translate("can't switch from automatic field numbering to manual field specification"));
- }
+ #endif
}
field_name = str_to_int(field_name, field_name_top, &index);
if ((uint)index >= n_args - 1) {
@@ -1087,7 +1087,7 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar
field_name = lookup;
mp_map_elem_t *key_elem = mp_map_lookup(kwargs, field_q, MP_MAP_LOOKUP);
if (key_elem == NULL) {
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_KeyError, field_q));
+ mp_raise_arg1(&mp_type_KeyError, field_q);
}
arg = key_elem->value;
}
@@ -1096,12 +1096,12 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar
}
} else {
if (*arg_i < 0) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
terse_str_format_value_error();
- } else {
+ #else
mp_raise_ValueError(
translate("can't switch from manual field specification to automatic field numbering"));
- }
+ #endif
}
if ((uint)*arg_i >= n_args - 1) {
mp_raise_IndexError_varg(translate("%q index out of range"), MP_QSTR_tuple);
@@ -1189,11 +1189,11 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar
type = *s++;
}
if (*s) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
terse_str_format_value_error();
- } else {
+ #else
mp_raise_ValueError(translate("invalid format specifier"));
- }
+ #endif
}
vstr_clear(&format_spec_vstr);
}
@@ -1210,19 +1210,19 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar
if (flags & (PF_FLAG_SHOW_SIGN | PF_FLAG_SPACE_SIGN)) {
if (type == 's') {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
terse_str_format_value_error();
- } else {
+ #else
mp_raise_ValueError(translate("sign not allowed in string format specifier"));
- }
+ #endif
}
if (type == 'c') {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
terse_str_format_value_error();
- } else {
+ #else
mp_raise_ValueError(
translate("sign not allowed with integer format specifier 'c'"));
- }
+ #endif
}
}
@@ -1276,13 +1276,13 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar
break;
default:
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
terse_str_format_value_error();
- } else {
+ #else
mp_raise_ValueError_varg(
translate("unknown format code '%c' for object of type '%q'"),
type, mp_obj_get_type_qstr(arg));
- }
+ #endif
}
}
@@ -1348,24 +1348,24 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar
#endif
default:
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
terse_str_format_value_error();
- } else {
+ #else
mp_raise_ValueError_varg(
translate("unknown format code '%c' for object of type '%q'"),
type, mp_obj_get_type_qstr(arg));
- }
+ #endif
}
} else {
// arg doesn't look like a number
if (align == '=') {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
terse_str_format_value_error();
- } else {
+ #else
mp_raise_ValueError(
translate("'=' alignment not allowed in string format specifier"));
- }
+ #endif
}
switch (type) {
@@ -1384,13 +1384,13 @@ STATIC vstr_t mp_obj_str_format_helper(const char *str, const char *top, int *ar
}
default:
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
terse_str_format_value_error();
- } else {
+ #else
mp_raise_ValueError_varg(
translate("unknown format code '%c' for object of type '%q'"),
type, mp_obj_get_type_qstr(arg));
- }
+ #endif
}
}
}
@@ -1442,11 +1442,11 @@ STATIC mp_obj_t str_modulo_format(mp_obj_t pattern, size_t n_args, const mp_obj_
const byte *key = ++str;
while (*str != ')') {
if (str >= top) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
terse_str_format_value_error();
- } else {
+ #else
mp_raise_ValueError(translate("incomplete format key"));
- }
+ #endif
}
++str;
}
@@ -1500,11 +1500,11 @@ STATIC mp_obj_t str_modulo_format(mp_obj_t pattern, size_t n_args, const mp_obj_
if (str >= top) {
incomplete_format:
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
terse_str_format_value_error();
- } else {
+ #else
mp_raise_ValueError(translate("incomplete format"));
- }
+ #endif
}
// Tuple value lookup
@@ -1587,13 +1587,13 @@ not_enough_args:
break;
default:
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
terse_str_format_value_error();
- } else {
+ #else
mp_raise_ValueError_varg(
translate("unsupported format character '%c' (0x%x) at index %d"),
*str, *str, str - start_str);
- }
+ #endif
}
}
@@ -2130,14 +2130,13 @@ bool mp_obj_str_equal(mp_obj_t s1, mp_obj_t s2) {
}
STATIC NORETURN void bad_implicit_conversion(mp_obj_t self_in) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("can't convert to str implicitly"));
- } else {
+ #else
const qstr src_name = mp_obj_get_type_qstr(self_in);
- nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_TypeError,
- translate("can't convert '%q' object to %q implicitly"),
- src_name, src_name == MP_QSTR_str ? MP_QSTR_bytes : MP_QSTR_str));
- }
+ mp_raise_TypeError_varg(translate("can't convert '%q' object to %q implicitly"),
+ src_name, src_name == MP_QSTR_str ? MP_QSTR_bytes : MP_QSTR_str);
+ #endif
}
// use this if you will anyway convert the string to a qstr
diff --git a/py/objtype.c b/py/objtype.c
index ccd014c33..1254b015c 100644
--- a/py/objtype.c
+++ b/py/objtype.c
@@ -373,12 +373,12 @@ mp_obj_t mp_obj_instance_make_new(const mp_obj_type_t *self, size_t n_args, cons
m_del(mp_obj_t, args2, 2 + n_args + 2 * n_kw);
}
if (init_ret != mp_const_none) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("__init__() should return None"));
- } else {
+ #else
mp_raise_TypeError_varg(translate("__init__() should return None, not '%q'"),
mp_obj_get_type_qstr(init_ret));
- }
+ #endif
}
}
@@ -888,12 +888,12 @@ mp_obj_t mp_obj_instance_call(mp_obj_t self_in, size_t n_args, size_t n_kw, cons
mp_obj_t member[2] = {MP_OBJ_NULL, MP_OBJ_NULL};
mp_obj_t call = mp_obj_instance_get_call(self_in, member);
if (call == MP_OBJ_NULL) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("object not callable"));
- } else {
+ #else
mp_raise_TypeError_varg(translate("'%q' object is not callable"),
mp_obj_get_type_qstr(self_in));
- }
+ #endif
}
mp_obj_instance_t *self = MP_OBJ_TO_PTR(self_in);
if (call == MP_OBJ_SENTINEL) {
@@ -1024,11 +1024,11 @@ STATIC mp_obj_t type_call(mp_obj_t self_in, size_t n_args, size_t n_kw, const mp
mp_obj_type_t *self = MP_OBJ_TO_PTR(self_in);
if (self->make_new == NULL) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("cannot create instance"));
- } else {
+ #else
mp_raise_TypeError_varg(translate("cannot create '%q' instances"), self->name);
- }
+ #endif
}
// create a map directly from the given args array and make a new instance
@@ -1134,12 +1134,12 @@ mp_obj_t mp_obj_new_type(qstr name, mp_obj_t bases_tuple, mp_obj_t locals_dict)
mp_obj_type_t *t = MP_OBJ_TO_PTR(bases_items[i]);
// TODO: Verify with CPy, tested on function type
if (t->make_new == NULL) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("type is not an acceptable base type"));
- } else {
+ #else
mp_raise_TypeError_varg(
translate("type '%q' is not an acceptable base type"), t->name);
- }
+ #endif
}
#if ENABLE_SPECIAL_ACCESSORS
if (mp_obj_is_instance_type(t)) {
diff --git a/py/parsenum.c b/py/parsenum.c
index da63825e4..a72829b20 100644
--- a/py/parsenum.c
+++ b/py/parsenum.c
@@ -145,16 +145,16 @@ overflow:
goto have_ret_val;
}
-value_error:
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+value_error: ;
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_obj_t exc = mp_obj_new_exception_msg(&mp_type_ValueError,
translate("invalid syntax for integer"));
raise_exc(exc, lex);
- } else if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_NORMAL) {
+ #elif MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_NORMAL
mp_obj_t exc = mp_obj_new_exception_msg_varg(&mp_type_ValueError,
translate("invalid syntax for integer with base %d"), base);
raise_exc(exc, lex);
- } else {
+ #else
vstr_t vstr;
mp_print_t print;
vstr_init_print(&vstr, 50, &print);
@@ -163,7 +163,7 @@ value_error:
mp_obj_t exc = mp_obj_new_exception_arg1(&mp_type_ValueError,
mp_obj_new_str_from_vstr(&mp_type_str, &vstr));
raise_exc(exc, lex);
- }
+ #endif
}
typedef enum {
diff --git a/py/py.mk b/py/py.mk
index acf5d127b..1a8f1219a 100644
--- a/py/py.mk
+++ b/py/py.mk
@@ -7,7 +7,7 @@ HEADER_BUILD = $(BUILD)/genhdr
# file containing qstr defs for the core Python bit
PY_QSTR_DEFS = $(PY_SRC)/qstrdefs.h
-TRANSLATION := en_US
+TRANSLATION ?= en_US
# If qstr autogeneration is not disabled we specify the output header
# for all collected qstrings.
@@ -109,7 +109,7 @@ ifeq ($(CIRCUITPY_ULAB),1)
SRC_MOD += $(patsubst $(TOP)/%,%,$(wildcard $(TOP)/extmod/ulab/code/*.c))
SRC_MOD += $(patsubst $(TOP)/%,%,$(wildcard $(TOP)/extmod/ulab/code/*/*.c))
CFLAGS_MOD += -DCIRCUITPY_ULAB=1 -DMODULE_ULAB_ENABLED=1
-$(BUILD)/extmod/ulab/code/%.o: CFLAGS += -Wno-float-equal -Wno-sign-compare -DCIRCUITPY
+$(BUILD)/extmod/ulab/code/%.o: CFLAGS += -Wno-missing-declarations -Wno-missing-prototypes -Wno-unused-parameter -Wno-float-equal -Wno-sign-compare -Wno-cast-align -Wno-shadow -DCIRCUITPY
endif
# External modules written in C.
diff --git a/py/pystack.c b/py/pystack.c
index f79ea9210..0def75b10 100644
--- a/py/pystack.c
+++ b/py/pystack.c
@@ -43,8 +43,8 @@ void *mp_pystack_alloc(size_t n_bytes) {
#endif
if (MP_STATE_THREAD(pystack_cur) + n_bytes > MP_STATE_THREAD(pystack_end)) {
// out of memory in the pystack
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_RuntimeError,
- MP_OBJ_NEW_QSTR(MP_QSTR_pystack_space_exhausted)));
+ mp_raise_arg1(&mp_type_RuntimeError,
+ MP_OBJ_NEW_QSTR(MP_QSTR_pystack_space_exhausted));
}
void *ptr = MP_STATE_THREAD(pystack_cur);
MP_STATE_THREAD(pystack_cur) += n_bytes;
diff --git a/py/runtime.c b/py/runtime.c
index e63e2337d..a3acb954a 100644
--- a/py/runtime.c
+++ b/py/runtime.c
@@ -177,12 +177,12 @@ mp_obj_t mp_load_global(qstr qst) {
#endif
elem = mp_map_lookup((mp_map_t*)&mp_module_builtins_globals.map, MP_OBJ_NEW_QSTR(qst), MP_MAP_LOOKUP);
if (elem == NULL) {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_msg(&mp_type_NameError, translate("name not defined"));
- } else {
+ #else
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_NameError,
translate("name '%q' is not defined"), qst));
- }
+ #endif
}
}
return elem->value;
@@ -275,13 +275,13 @@ mp_obj_t mp_unary_op(mp_unary_op_t op, mp_obj_t arg) {
return result;
}
}
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("unsupported type for operator"));
- } else {
+ #else
mp_raise_TypeError_varg(
translate("unsupported type for %q: '%q'"),
mp_unary_op_method_name[op], mp_obj_get_type_qstr(arg));
- }
+ #endif
}
}
@@ -582,13 +582,13 @@ generic_binary_op:
}
unsupported_op:
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("unsupported type for operator"));
- } else {
+ #else
mp_raise_TypeError_varg(
translate("unsupported types for %q: '%q', '%q'"),
mp_binary_op_method_name[op], mp_obj_get_type_qstr(lhs), mp_obj_get_type_qstr(rhs));
- }
+ #endif
zero_division:
mp_raise_msg(&mp_type_ZeroDivisionError, translate("division by zero"));
@@ -624,11 +624,11 @@ mp_obj_t mp_call_function_n_kw(mp_obj_t fun_in, size_t n_args, size_t n_kw, cons
return type->call(fun_in, n_args, n_kw, args);
}
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("object not callable"));
- } else {
+ #else
mp_raise_TypeError_varg(translate("'%q' object is not callable"), mp_obj_get_type_qstr(fun_in));
- }
+ #endif
}
// args contains: fun self/NULL arg(0) ... arg(n_args-2) arg(n_args-1) kw_key(0) kw_val(0) ... kw_key(n_kw-1) kw_val(n_kw-1)
@@ -852,19 +852,19 @@ void mp_unpack_sequence(mp_obj_t seq_in, size_t num, mp_obj_t *items) {
return;
too_short:
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_ValueError(translate("wrong number of values to unpack"));
- } else {
+ #else
mp_raise_ValueError_varg(translate("need more than %d values to unpack"),
(int)seq_len);
- }
+ #endif
too_long:
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_ValueError(translate("wrong number of values to unpack"));
- } else {
+ #else
mp_raise_ValueError_varg(translate("too many values to unpack (expected %d)"),
(int)num);
- }
+ #endif
}
// unpacked items are stored in reverse order into the array pointed to by items
@@ -916,12 +916,12 @@ void mp_unpack_ex(mp_obj_t seq_in, size_t num_in, mp_obj_t *items) {
return;
too_short:
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_ValueError(translate("wrong number of values to unpack"));
- } else {
+ #else
mp_raise_ValueError_varg(translate("need more than %d values to unpack"),
(int)seq_len);
- }
+ #endif
}
mp_obj_t mp_load_attr(mp_obj_t base, qstr attr) {
@@ -1094,9 +1094,9 @@ void mp_load_method(mp_obj_t base, qstr attr, mp_obj_t *dest) {
if (dest[0] == MP_OBJ_NULL) {
// no attribute/method called attr
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_AttributeError(translate("no such attribute"));
- } else {
+ #elif MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_DETAILED
// following CPython, we give a more detailed error message for type objects
if (MP_OBJ_IS_TYPE(base, &mp_type_type)) {
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_AttributeError,
@@ -1107,7 +1107,11 @@ void mp_load_method(mp_obj_t base, qstr attr, mp_obj_t *dest) {
translate("'%q' object has no attribute '%q'"),
mp_obj_get_type_qstr(base), attr));
}
- }
+ #else
+ nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_AttributeError,
+ translate("'%q' object has no attribute '%q'"),
+ mp_obj_get_type_qstr(base), attr));
+ #endif
}
}
@@ -1168,13 +1172,13 @@ void mp_store_attr(mp_obj_t base, qstr attr, mp_obj_t value) {
}
#endif
}
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_AttributeError(translate("no such attribute"));
- } else {
+ #else
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_AttributeError,
translate("'%q' object cannot assign attribute '%q'"),
mp_obj_get_type_qstr(base), attr));
- }
+ #endif
}
mp_obj_t mp_getiter(mp_obj_t o_in, mp_obj_iter_buf_t *iter_buf) {
@@ -1209,12 +1213,12 @@ mp_obj_t mp_getiter(mp_obj_t o_in, mp_obj_iter_buf_t *iter_buf) {
}
// object not iterable
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("object not iterable"));
- } else {
+ #else
mp_raise_TypeError_varg(
translate("'%q' object is not iterable"), mp_obj_get_type_qstr(o_in));
- }
+ #endif
}
// may return MP_OBJ_STOP_ITERATION as an optimisation instead of raise StopIteration()
@@ -1231,12 +1235,12 @@ mp_obj_t mp_iternext_allow_raise(mp_obj_t o_in) {
// __next__ exists, call it and return its result
return mp_call_method_n_kw(0, 0, dest);
} else {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("object not an iterator"));
- } else {
+ #else
mp_raise_TypeError_varg(translate("'%q' object is not an iterator"),
mp_obj_get_type_qstr(o_in));
- }
+ #endif
}
}
}
@@ -1267,12 +1271,12 @@ mp_obj_t mp_iternext(mp_obj_t o_in) {
}
}
} else {
- if (MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE) {
+ #if MICROPY_ERROR_REPORTING == MICROPY_ERROR_REPORTING_TERSE
mp_raise_TypeError(translate("object not an iterator"));
- } else {
+ #else
mp_raise_TypeError_varg(translate("'%q' object is not an iterator"),
mp_obj_get_type_qstr(o_in));
- }
+ #endif
}
}
}
@@ -1514,6 +1518,10 @@ NORETURN void m_malloc_fail(size_t num_bytes) {
translate("memory allocation failed, allocating %u bytes"), (uint)num_bytes);
}
+NORETURN void mp_raise_arg1(const mp_obj_type_t *exc_type, mp_obj_t arg) {
+ nlr_raise(mp_obj_new_exception_arg1(exc_type, arg));
+}
+
NORETURN void mp_raise_msg(const mp_obj_type_t *exc_type, const compressed_string_t *msg) {
if (msg == NULL) {
nlr_raise(mp_obj_new_exception(exc_type));
@@ -1580,7 +1588,7 @@ NORETURN void mp_raise_TypeError_varg(const compressed_string_t *fmt, ...) {
}
NORETURN void mp_raise_OSError(int errno_) {
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(errno_)));
+ mp_raise_arg1(&mp_type_OSError, MP_OBJ_NEW_SMALL_INT(errno_));
}
NORETURN void mp_raise_OSError_msg(const compressed_string_t *msg) {
@@ -1607,7 +1615,7 @@ NORETURN void mp_raise_ConnectionError(const compressed_string_t *msg) {
}
NORETURN void mp_raise_BrokenPipeError(void) {
- nlr_raise(mp_obj_new_exception_arg1(&mp_type_BrokenPipeError, MP_OBJ_NEW_SMALL_INT(MP_EPIPE)));
+ mp_raise_arg1(&mp_type_BrokenPipeError, MP_OBJ_NEW_SMALL_INT(MP_EPIPE));
}
NORETURN void mp_raise_NotImplementedError(const compressed_string_t *msg) {
diff --git a/py/runtime.h b/py/runtime.h
index ad7d0feab..5e8fda35c 100644
--- a/py/runtime.h
+++ b/py/runtime.h
@@ -150,6 +150,7 @@ mp_obj_t mp_import_name(qstr name, mp_obj_t fromlist, mp_obj_t level);
mp_obj_t mp_import_from(mp_obj_t module, qstr name);
void mp_import_all(mp_obj_t module);
+NORETURN void mp_raise_arg1(const mp_obj_type_t *exc_type, mp_obj_t arg);
NORETURN void mp_raise_msg(const mp_obj_type_t *exc_type, const compressed_string_t *msg);
NORETURN void mp_raise_msg_varg(const mp_obj_type_t *exc_type, const compressed_string_t *fmt, ...);
NORETURN void mp_raise_msg_vlist(const mp_obj_type_t *exc_type, const compressed_string_t *fmt, va_list argptr);
diff --git a/shared-bindings/board/__init__.c b/shared-bindings/board/__init__.c
index 6837fc41c..717698408 100644
--- a/shared-bindings/board/__init__.c
+++ b/shared-bindings/board/__init__.c
@@ -28,6 +28,12 @@
#include "py/runtime.h"
#include "shared-bindings/board/__init__.h"
+#if BOARD_I2C
+#include "shared-bindings/busio/I2C.h"
+#endif
+#if BOARD_SPI
+#include "shared-bindings/busio/SPI.h"
+#endif
//| """Board specific pin names
//|
@@ -45,7 +51,7 @@
#if BOARD_I2C
mp_obj_t board_i2c(void) {
mp_obj_t singleton = common_hal_board_get_i2c();
- if (singleton != NULL) {
+ if (singleton != NULL && !common_hal_busio_i2c_deinited(singleton)) {
return singleton;
}
assert_pin_free(DEFAULT_I2C_BUS_SDA);
@@ -69,7 +75,7 @@ MP_DEFINE_CONST_FUN_OBJ_0(board_i2c_obj, board_i2c);
#if BOARD_SPI
mp_obj_t board_spi(void) {
mp_obj_t singleton = common_hal_board_get_spi();
- if (singleton != NULL) {
+ if (singleton != NULL && !common_hal_busio_spi_deinited(singleton)) {
return singleton;
}
assert_pin_free(DEFAULT_SPI_BUS_SCK);
diff --git a/shared-bindings/canio/CAN.c b/shared-bindings/canio/CAN.c
index 6dae36943..13066764e 100644
--- a/shared-bindings/canio/CAN.c
+++ b/shared-bindings/canio/CAN.c
@@ -49,7 +49,7 @@
//| loopback: bool = False,
//| silent: bool = False,
//| auto_restart: bool = False,
-//| ):
+//| ) -> None:
//| """A common shared-bus protocol. The rx and tx pins are generally
//| connected to a transceiver which controls the H and L pins on a
//| shared bus.
@@ -171,7 +171,7 @@ STATIC const mp_obj_property_t canio_can_receive_error_count_obj = {
(mp_obj_t)mp_const_none},
};
-//| state: State
+//| state: BusState
//| """The current state of the bus. (read-only)"""
STATIC mp_obj_t canio_can_state_get(mp_obj_t self_in) {
canio_can_obj_t *self = MP_OBJ_TO_PTR(self_in);
@@ -214,7 +214,24 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(canio_can_restart_obj, canio_can_restart);
//|
//| An empty filter list causes all messages to be accepted.
//|
-//| Timeout dictates how long receive() and next() will block."""
+//| Timeout dictates how long receive() and next() will block.
+//|
+//| Platform specific notes:
+//|
+//| SAM E5x supports two Listeners. Filter blocks are shared between the two
+//| listeners. There are 4 standard filter blocks and 4 extended filter blocks.
+//| Each block can either match 2 single addresses or a mask of addresses.
+//| The number of filter blocks can be increased, up to a hardware maximum, by
+//| rebuilding CircuitPython, but this decreases the CircuitPython free
+//| memory even if canio is not used.
+//|
+//| STM32F405 supports two Listeners. Filter blocks are shared between the two listeners.
+//| There are 14 filter blocks. Each block can match 2 standard addresses with
+//| mask or 1 extended address with mask.
+//|
+//| ESP32S2 supports one Listener. There is a single filter block, which can either match a
+//| standard address with mask or an extended address with mask.
+//| """
//| ...
//|
STATIC mp_obj_t canio_can_listen(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
@@ -274,7 +291,7 @@ STATIC const mp_obj_property_t canio_can_loopback_obj = {
};
-//| def send(message: Union[RemoteTransmissionRequest, Message]) -> None:
+//| def send(self, message: Union[RemoteTransmissionRequest, Message]) -> None:
//| """Send a message on the bus with the given data and id.
//| If the message could not be sent due to a full fifo or a bus error condition, RuntimeError is raised.
//| """
@@ -335,7 +352,7 @@ STATIC mp_obj_t canio_can_enter(mp_obj_t self_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(canio_can_enter_obj, canio_can_enter);
-//| def __exit__(self, unused1, unused2, unused3) -> None:
+//| def __exit__(self, unused1: Optional[Type[BaseException]], unused2: Optional[BaseException], unused3: Optional[TracebackType]) -> None:
//| """Calls deinit()"""
//| ...
STATIC mp_obj_t canio_can_exit(size_t num_args, const mp_obj_t args[]) {
diff --git a/shared-bindings/canio/Listener.c b/shared-bindings/canio/Listener.c
index 93552af81..8a39f0f2a 100644
--- a/shared-bindings/canio/Listener.c
+++ b/shared-bindings/canio/Listener.c
@@ -123,7 +123,7 @@ STATIC mp_obj_t canio_listener_enter(mp_obj_t self_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(canio_listener_enter_obj, canio_listener_enter);
-//| def __exit__(self, unused1, unused2, unused3) -> None:
+//| def __exit__(self, unused1: Optional[Type[BaseException]], unused2: Optional[BaseException], unused3: Optional[TracebackType]) -> None:
//| """Calls deinit()"""
//| ...
STATIC mp_obj_t canio_listener_exit(size_t num_args, const mp_obj_t args[]) {
diff --git a/shared-bindings/canio/Match.c b/shared-bindings/canio/Match.c
index 3fbc1773e..6039631fa 100644
--- a/shared-bindings/canio/Match.c
+++ b/shared-bindings/canio/Match.c
@@ -33,7 +33,7 @@
//| """Describe CAN bus messages to match"""
//|
//|
-//| def __init__(self, id: int, *, mask: Optional[int] = None, extended: bool = False):
+//| def __init__(self, id: int, *, mask: Optional[int] = None, extended: bool = False) -> None:
//| """Construct a Match with the given properties.
//|
//| If mask is not None, then the filter is for any id which matches all
diff --git a/shared-bindings/canio/Message.c b/shared-bindings/canio/Message.c
index e47e997c7..04fa8fc6c 100644
--- a/shared-bindings/canio/Message.c
+++ b/shared-bindings/canio/Message.c
@@ -31,7 +31,7 @@
#include "py/runtime.h"
//| class Message:
-//| def __init__(self, id: int, data: bytes, *, extended: bool = False):
+//| def __init__(self, id: int, data: bytes, *, extended: bool = False) -> None:
//| """Construct a Message to send on a CAN bus.
//|
//| :param int id: The numeric ID of the message
diff --git a/shared-bindings/canio/RemoteTransmissionRequest.c b/shared-bindings/canio/RemoteTransmissionRequest.c
index d762787b1..fcd259034 100644
--- a/shared-bindings/canio/RemoteTransmissionRequest.c
+++ b/shared-bindings/canio/RemoteTransmissionRequest.c
@@ -31,7 +31,7 @@
#include "py/runtime.h"
//| class RemoteTransmissionRequest:
-//| def __init__(self, id: int, length: int, *, extended: bool = False):
+//| def __init__(self, id: int, length: int, *, extended: bool = False) -> None:
//| """Construct a RemoteTransmissionRequest to send on a CAN bus.
//|
//| :param int id: The numeric ID of the requested message
diff --git a/shared-bindings/displayio/Bitmap.c b/shared-bindings/displayio/Bitmap.c
index 5a2fc785f..b9f06fe14 100644
--- a/shared-bindings/displayio/Bitmap.c
+++ b/shared-bindings/displayio/Bitmap.c
@@ -172,7 +172,7 @@ STATIC mp_obj_t bitmap_subscr(mp_obj_t self_in, mp_obj_t index_obj, mp_obj_t val
return mp_const_none;
}
-//| def blit(self, x: int, y: int, source_bitmap: bitmap, *, x1: int, y1: int, x2: int, y2: int, skip_index: int) -> None:
+//| def blit(self, x: int, y: int, source_bitmap: Bitmap, *, x1: int, y1: int, x2: int, y2: int, skip_index: int) -> None:
//| """Inserts the source_bitmap region defined by rectangular boundaries
//| (x1,y1) and (x2,y2) into the bitmap at the specified (x,y) location.
//|
@@ -274,7 +274,7 @@ STATIC mp_obj_t displayio_bitmap_obj_blit(size_t n_args, const mp_obj_t *pos_arg
MP_DEFINE_CONST_FUN_OBJ_KW(displayio_bitmap_blit_obj, 4, displayio_bitmap_obj_blit);
// `displayio_bitmap_obj_blit` requires at least 4 arguments
-//| def fill(self, value: Any) -> None:
+//| def fill(self, value: int) -> None:
//| """Fills the bitmap with the supplied palette index value."""
//| ...
//|
diff --git a/shared-bindings/displayio/ColorConverter.c b/shared-bindings/displayio/ColorConverter.c
index 0e6e9bfd9..88d3a1ba8 100644
--- a/shared-bindings/displayio/ColorConverter.c
+++ b/shared-bindings/displayio/ColorConverter.c
@@ -116,7 +116,7 @@ const mp_obj_property_t displayio_colorconverter_dither_obj = {
STATIC mp_obj_t displayio_colorconverter_make_transparent(mp_obj_t self_in, mp_obj_t transparent_color_obj) {
displayio_colorconverter_t *self = MP_OBJ_TO_PTR(self_in);
- mp_int_t transparent_color = mp_obj_get_int(&transparent_color);
+ mp_int_t transparent_color = mp_obj_get_int(transparent_color_obj);
common_hal_displayio_colorconverter_make_transparent(self, transparent_color);
return mp_const_none;
}
@@ -128,7 +128,7 @@ MP_DEFINE_CONST_FUN_OBJ_2(displayio_colorconverter_make_transparent_obj, display
STATIC mp_obj_t displayio_colorconverter_make_opaque(mp_obj_t self_in, mp_obj_t transparent_color_obj) {
displayio_colorconverter_t *self = MP_OBJ_TO_PTR(self_in);
- mp_int_t transparent_color = mp_obj_get_int(&transparent_color);
+ mp_int_t transparent_color = mp_obj_get_int(transparent_color_obj);
common_hal_displayio_colorconverter_make_opaque(self, transparent_color);
return mp_const_none;
}
diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c
index e78a893b0..8d1a888fe 100644
--- a/shared-bindings/displayio/Display.c
+++ b/shared-bindings/displayio/Display.c
@@ -39,7 +39,7 @@
#include "shared-module/displayio/__init__.h"
#include "supervisor/shared/translate.h"
-//| _DisplayBus = Union[FourWire, ParallelBus, I2CDisplay]
+//| _DisplayBus = Union['FourWire', 'ParallelBus', 'I2CDisplay']
//| """:py:class:`FourWire`, :py:class:`ParallelBus` or :py:class:`I2CDisplay`"""
//|
@@ -58,24 +58,26 @@
//| r"""Create a Display object on the given display bus (`FourWire`, `ParallelBus` or `I2CDisplay`).
//|
//| The ``init_sequence`` is bitpacked to minimize the ram impact. Every command begins with a
-//| command byte followed by a byte to determine the parameter count and if a delay is need after.
-//| When the top bit of the second byte is 1, the next byte will be the delay time in milliseconds.
-//| The remaining 7 bits are the parameter count excluding any delay byte. The third through final
-//| bytes are the remaining command parameters. The next byte will begin a new command definition.
-//| Here is a portion of ILI9341 init code:
+//| command byte followed by a byte to determine the parameter count and delay. When the top bit
+//| of the second byte is 1 (0x80), a delay will occur after the command parameters are sent.
+//| The remaining 7 bits are the parameter count excluding any delay byte. The bytes following
+//| are the parameters. When the delay bit is set, a single byte after the parameters specifies
+//| the delay duration in milliseconds. The value 0xff will lead to an extra long 500 ms delay
+//| instead of 255 ms. The next byte will begin a new command definition.
+//| Here is an example:
//|
//| .. code-block:: python
//|
//| init_sequence = (b"\xe1\x0f\x00\x0E\x14\x03\x11\x07\x31\xC1\x48\x08\x0F\x0C\x31\x36\x0F" # Set Gamma
//| b"\x11\x80\x78"# Exit Sleep then delay 0x78 (120ms)
-//| b"\x29\x80\x78"# Display on then delay 0x78 (120ms)
+//| b"\x29\x81\xaa\x78"# Display on then delay 0x78 (120ms)
//| )
//| display = displayio.Display(display_bus, init_sequence, width=320, height=240)
//|
-//| The first command is 0xe1 with 15 (0xf) parameters following. The second and third are 0x11 and
-//| 0x29 respectively with delays (0x80) of 120ms (0x78) and no parameters. Multiple byte literals
-//| (b"") are merged together on load. The parens are needed to allow byte literals on subsequent
-//| lines.
+//| The first command is 0xe1 with 15 (0xf) parameters following. The second is 0x11 with 0
+//| parameters and a 120ms (0x78) delay. The third command is 0x29 with one parameter 0xaa and a
+//| 120ms delay (0x78). Multiple byte literals (b"") are merged together on load. The parens
+//| are needed to allow byte literals on subsequent lines.
//|
//| The initialization sequence should always leave the display memory access inline with the scan
//| of the display to minimize tearing artifacts.
diff --git a/shared-bindings/displayio/EPaperDisplay.c b/shared-bindings/displayio/EPaperDisplay.c
index 8be4ee4c4..4f5c47aca 100644
--- a/shared-bindings/displayio/EPaperDisplay.c
+++ b/shared-bindings/displayio/EPaperDisplay.c
@@ -49,15 +49,28 @@
//| Most people should not use this class directly. Use a specific display driver instead that will
//| contain the startup and shutdown sequences at minimum."""
//|
-//| def __init__(self, display_bus: _DisplayBus, start_sequence: ReadableBuffer, stop_sequence: ReadableBuffer, *, width: int, height: int, ram_width: int, ram_height: int, colstart: int = 0, rowstart: int = 0, rotation: int = 0, set_column_window_command: Optional[int] = None, set_row_window_command: Optional[int] = None, single_byte_bounds: bool = False, write_black_ram_command: int, black_bits_inverted: bool = False, write_color_ram_command: Optional[int] = None, color_bits_inverted: bool = False, highlight_color: int = 0x000000, refresh_display_command: int, refresh_time: float = 40, busy_pin: Optional[microcontroller.Pin] = None, busy_state: bool = True, seconds_per_frame: float = 180, always_toggle_chip_select: bool = False) -> None:
+//| def __init__(self, display_bus: _DisplayBus,
+//| start_sequence: ReadableBuffer, stop_sequence: ReadableBuffer, *,
+//| width: int, height: int, ram_width: int, ram_height: int,
+//| colstart: int = 0, rowstart: int = 0, rotation: int = 0,
+//| set_column_window_command: Optional[int] = None,
+//| set_row_window_command: Optional[int] = None, single_byte_bounds: bool = False,
+//| write_black_ram_command: int, black_bits_inverted: bool = False,
+//| write_color_ram_command: Optional[int] = None,
+//| color_bits_inverted: bool = False, highlight_color: int = 0x000000,
+//| refresh_display_command: int, refresh_time: float = 40,
+//| busy_pin: Optional[microcontroller.Pin] = None, busy_state: bool = True,
+//| seconds_per_frame: float = 180, always_toggle_chip_select: bool = False,
+//| grayscale: bool = False) -> None:
//| """Create a EPaperDisplay object on the given display bus (`displayio.FourWire` or `displayio.ParallelBus`).
//|
//| The ``start_sequence`` and ``stop_sequence`` are bitpacked to minimize the ram impact. Every
-//| command begins with a command byte followed by a byte to determine the parameter count and if
-//| a delay is need after. When the top bit of the second byte is 1, the next byte will be the
-//| delay time in milliseconds. The remaining 7 bits are the parameter count excluding any delay
-//| byte. The third through final bytes are the remaining command parameters. The next byte will
-//| begin a new command definition.
+//| command begins with a command byte followed by a byte to determine the parameter count and
+//| delay. When the top bit of the second byte is 1 (0x80), a delay will occur after the command
+//| parameters are sent. The remaining 7 bits are the parameter count excluding any delay
+//| byte. The bytes following are the parameters. When the delay bit is set, a single byte after
+//| the parameters specifies the delay duration in milliseconds. The value 0xff will lead to an
+//| extra long 500 ms delay instead of 255 ms. The next byte will begin a new command definition.
//|
//| :param display_bus: The bus that the display is connected to
//| :type _DisplayBus: displayio.FourWire or displayio.ParallelBus
@@ -84,11 +97,18 @@
//| :param microcontroller.Pin busy_pin: Pin used to signify the display is busy
//| :param bool busy_state: State of the busy pin when the display is busy
//| :param float seconds_per_frame: Minimum number of seconds between screen refreshes
-//| :param bool always_toggle_chip_select: When True, chip select is toggled every byte"""
+//| :param bool always_toggle_chip_select: When True, chip select is toggled every byte
+//| :param bool grayscale: When true, the color ram is the low bit of 2-bit grayscale"""
//| ...
//|
STATIC mp_obj_t displayio_epaperdisplay_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_display_bus, ARG_start_sequence, ARG_stop_sequence, ARG_width, ARG_height, ARG_ram_width, ARG_ram_height, ARG_colstart, ARG_rowstart, ARG_rotation, ARG_set_column_window_command, ARG_set_row_window_command, ARG_set_current_column_command, ARG_set_current_row_command, ARG_write_black_ram_command, ARG_black_bits_inverted, ARG_write_color_ram_command, ARG_color_bits_inverted, ARG_highlight_color, ARG_refresh_display_command, ARG_refresh_time, ARG_busy_pin, ARG_busy_state, ARG_seconds_per_frame, ARG_always_toggle_chip_select };
+ enum { ARG_display_bus, ARG_start_sequence, ARG_stop_sequence, ARG_width, ARG_height,
+ ARG_ram_width, ARG_ram_height, ARG_colstart, ARG_rowstart, ARG_rotation,
+ ARG_set_column_window_command, ARG_set_row_window_command, ARG_set_current_column_command,
+ ARG_set_current_row_command, ARG_write_black_ram_command, ARG_black_bits_inverted,
+ ARG_write_color_ram_command, ARG_color_bits_inverted, ARG_highlight_color,
+ ARG_refresh_display_command, ARG_refresh_time, ARG_busy_pin, ARG_busy_state,
+ ARG_seconds_per_frame, ARG_always_toggle_chip_select, ARG_grayscale };
static const mp_arg_t allowed_args[] = {
{ MP_QSTR_display_bus, MP_ARG_REQUIRED | MP_ARG_OBJ },
{ MP_QSTR_start_sequence, MP_ARG_REQUIRED | MP_ARG_OBJ },
@@ -115,6 +135,7 @@ STATIC mp_obj_t displayio_epaperdisplay_make_new(const mp_obj_type_t *type, size
{ MP_QSTR_busy_state, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = true} },
{ MP_QSTR_seconds_per_frame, MP_ARG_OBJ | MP_ARG_KW_ONLY, {.u_obj = MP_OBJ_NEW_SMALL_INT(180)} },
{ MP_QSTR_always_toggle_chip_select, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = false} },
+ { MP_QSTR_grayscale, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = false} },
};
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);
@@ -151,11 +172,14 @@ STATIC mp_obj_t displayio_epaperdisplay_make_new(const mp_obj_type_t *type, size
self,
display_bus,
start_bufinfo.buf, start_bufinfo.len, stop_bufinfo.buf, stop_bufinfo.len,
- args[ARG_width].u_int, args[ARG_height].u_int, args[ARG_ram_width].u_int, args[ARG_ram_height].u_int, args[ARG_colstart].u_int, args[ARG_rowstart].u_int, rotation,
+ args[ARG_width].u_int, args[ARG_height].u_int, args[ARG_ram_width].u_int, args[ARG_ram_height].u_int,
+ args[ARG_colstart].u_int, args[ARG_rowstart].u_int, rotation,
args[ARG_set_column_window_command].u_int, args[ARG_set_row_window_command].u_int,
args[ARG_set_current_column_command].u_int, args[ARG_set_current_row_command].u_int,
- args[ARG_write_black_ram_command].u_int, args[ARG_black_bits_inverted].u_bool, write_color_ram_command, args[ARG_color_bits_inverted].u_bool, highlight_color, args[ARG_refresh_display_command].u_int, refresh_time,
- busy_pin, args[ARG_busy_state].u_bool, seconds_per_frame, args[ARG_always_toggle_chip_select].u_bool
+ args[ARG_write_black_ram_command].u_int, args[ARG_black_bits_inverted].u_bool, write_color_ram_command,
+ args[ARG_color_bits_inverted].u_bool, highlight_color, args[ARG_refresh_display_command].u_int, refresh_time,
+ busy_pin, args[ARG_busy_state].u_bool, seconds_per_frame,
+ args[ARG_always_toggle_chip_select].u_bool, args[ARG_grayscale].u_bool
);
return self;
@@ -221,6 +245,23 @@ const mp_obj_property_t displayio_epaperdisplay_time_to_refresh_obj = {
(mp_obj_t)&mp_const_none_obj},
};
+//| busy: bool
+//| """True when the display is refreshing. This uses the ``busy_pin`` when available or the
+//| ``refresh_time`` otherwise."""
+//|
+STATIC mp_obj_t displayio_epaperdisplay_obj_get_busy(mp_obj_t self_in) {
+ displayio_epaperdisplay_obj_t *self = native_display(self_in);
+ return mp_obj_new_bool(common_hal_displayio_epaperdisplay_get_busy(self));
+}
+MP_DEFINE_CONST_FUN_OBJ_1(displayio_epaperdisplay_get_busy_obj, displayio_epaperdisplay_obj_get_busy);
+
+const mp_obj_property_t displayio_epaperdisplay_busy_obj = {
+ .base.type = &mp_type_property,
+ .proxy = {(mp_obj_t)&displayio_epaperdisplay_get_busy_obj,
+ (mp_obj_t)&mp_const_none_obj,
+ (mp_obj_t)&mp_const_none_obj},
+};
+
//| width: int
//| """Gets the width of the display in pixels"""
//|
@@ -253,6 +294,29 @@ const mp_obj_property_t displayio_epaperdisplay_height_obj = {
(mp_obj_t)&mp_const_none_obj},
};
+//| rotation: int
+//| """The rotation of the display as an int in degrees."""
+//|
+STATIC mp_obj_t displayio_epaperdisplay_obj_get_rotation(mp_obj_t self_in) {
+ displayio_epaperdisplay_obj_t *self = native_display(self_in);
+ return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_epaperdisplay_get_rotation(self));
+}
+MP_DEFINE_CONST_FUN_OBJ_1(displayio_epaperdisplay_get_rotation_obj, displayio_epaperdisplay_obj_get_rotation);
+STATIC mp_obj_t displayio_epaperdisplay_obj_set_rotation(mp_obj_t self_in, mp_obj_t value) {
+ displayio_epaperdisplay_obj_t *self = native_display(self_in);
+ common_hal_displayio_epaperdisplay_set_rotation(self, mp_obj_get_int(value));
+ return mp_const_none;
+}
+MP_DEFINE_CONST_FUN_OBJ_2(displayio_epaperdisplay_set_rotation_obj, displayio_epaperdisplay_obj_set_rotation);
+
+
+const mp_obj_property_t displayio_epaperdisplay_rotation_obj = {
+ .base.type = &mp_type_property,
+ .proxy = {(mp_obj_t)&displayio_epaperdisplay_get_rotation_obj,
+ (mp_obj_t)&displayio_epaperdisplay_set_rotation_obj,
+ (mp_obj_t)&mp_const_none_obj},
+};
+
//| bus: _DisplayBus
//| """The bus being used by the display"""
//|
@@ -276,7 +340,9 @@ STATIC const mp_rom_map_elem_t displayio_epaperdisplay_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&displayio_epaperdisplay_width_obj) },
{ MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&displayio_epaperdisplay_height_obj) },
+ { MP_ROM_QSTR(MP_QSTR_rotation), MP_ROM_PTR(&displayio_epaperdisplay_rotation_obj) },
{ MP_ROM_QSTR(MP_QSTR_bus), MP_ROM_PTR(&displayio_epaperdisplay_bus_obj) },
+ { MP_ROM_QSTR(MP_QSTR_busy), MP_ROM_PTR(&displayio_epaperdisplay_busy_obj) },
{ MP_ROM_QSTR(MP_QSTR_time_to_refresh), MP_ROM_PTR(&displayio_epaperdisplay_time_to_refresh_obj) },
};
STATIC MP_DEFINE_CONST_DICT(displayio_epaperdisplay_locals_dict, displayio_epaperdisplay_locals_dict_table);
diff --git a/shared-bindings/displayio/EPaperDisplay.h b/shared-bindings/displayio/EPaperDisplay.h
index e4b81c883..14d4f6aa9 100644
--- a/shared-bindings/displayio/EPaperDisplay.h
+++ b/shared-bindings/displayio/EPaperDisplay.h
@@ -39,12 +39,12 @@ extern const mp_obj_type_t displayio_epaperdisplay_type;
#define NO_COMMAND 0x100
void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t* self,
- mp_obj_t bus, uint8_t* start_sequence, uint16_t start_sequence_len, uint8_t* stop_sequence, uint16_t stop_sequence_len,
+ mp_obj_t bus, const uint8_t* start_sequence, uint16_t start_sequence_len, const uint8_t* stop_sequence, uint16_t stop_sequence_len,
uint16_t width, uint16_t height, uint16_t ram_width, uint16_t ram_height, int16_t colstart, int16_t rowstart, uint16_t rotation,
uint16_t set_column_window_command, uint16_t set_row_window_command,
uint16_t set_current_column_command, uint16_t set_current_row_command,
uint16_t write_black_ram_command, bool black_bits_inverted, uint16_t write_color_ram_command, bool color_bits_inverted, uint32_t highlight_color, uint16_t refresh_display_command, mp_float_t refresh_time,
- const mcu_pin_obj_t* busy_pin, bool busy_state, mp_float_t seconds_per_frame, bool always_toggle_chip_select);
+ const mcu_pin_obj_t* busy_pin, bool busy_state, mp_float_t seconds_per_frame, bool always_toggle_chip_select, bool grayscale);
bool common_hal_displayio_epaperdisplay_refresh(displayio_epaperdisplay_obj_t* self);
@@ -52,9 +52,12 @@ bool common_hal_displayio_epaperdisplay_show(displayio_epaperdisplay_obj_t* self
// Returns time in milliseconds.
uint32_t common_hal_displayio_epaperdisplay_get_time_to_refresh(displayio_epaperdisplay_obj_t* self);
+bool common_hal_displayio_epaperdisplay_get_busy(displayio_epaperdisplay_obj_t* self);
uint16_t common_hal_displayio_epaperdisplay_get_width(displayio_epaperdisplay_obj_t* self);
uint16_t common_hal_displayio_epaperdisplay_get_height(displayio_epaperdisplay_obj_t* self);
+uint16_t common_hal_displayio_epaperdisplay_get_rotation(displayio_epaperdisplay_obj_t* self);
+void common_hal_displayio_epaperdisplay_set_rotation(displayio_epaperdisplay_obj_t* self, int rotation);
mp_obj_t common_hal_displayio_epaperdisplay_get_bus(displayio_epaperdisplay_obj_t* self);
diff --git a/shared-bindings/displayio/FourWire.h b/shared-bindings/displayio/FourWire.h
index ac186d2c3..6f6b528e7 100644
--- a/shared-bindings/displayio/FourWire.h
+++ b/shared-bindings/displayio/FourWire.h
@@ -48,7 +48,8 @@ bool common_hal_displayio_fourwire_bus_free(mp_obj_t self);
bool common_hal_displayio_fourwire_begin_transaction(mp_obj_t self);
-void common_hal_displayio_fourwire_send(mp_obj_t self, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length);
+void common_hal_displayio_fourwire_send(mp_obj_t self, display_byte_type_t byte_type,
+ display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length);
void common_hal_displayio_fourwire_end_transaction(mp_obj_t self);
diff --git a/shared-bindings/displayio/I2CDisplay.h b/shared-bindings/displayio/I2CDisplay.h
index bae53c491..37520202e 100644
--- a/shared-bindings/displayio/I2CDisplay.h
+++ b/shared-bindings/displayio/I2CDisplay.h
@@ -44,7 +44,8 @@ bool common_hal_displayio_i2cdisplay_bus_free(mp_obj_t self);
bool common_hal_displayio_i2cdisplay_begin_transaction(mp_obj_t self);
-void common_hal_displayio_i2cdisplay_send(mp_obj_t self, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length);
+void common_hal_displayio_i2cdisplay_send(mp_obj_t self, display_byte_type_t byte_type,
+ display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length);
void common_hal_displayio_i2cdisplay_end_transaction(mp_obj_t self);
diff --git a/shared-bindings/displayio/ParallelBus.h b/shared-bindings/displayio/ParallelBus.h
index be2aef7d4..1e74e3a0a 100644
--- a/shared-bindings/displayio/ParallelBus.h
+++ b/shared-bindings/displayio/ParallelBus.h
@@ -46,7 +46,8 @@ bool common_hal_displayio_parallelbus_bus_free(mp_obj_t self);
bool common_hal_displayio_parallelbus_begin_transaction(mp_obj_t self);
-void common_hal_displayio_parallelbus_send(mp_obj_t self, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length);
+void common_hal_displayio_parallelbus_send(mp_obj_t self, display_byte_type_t byte_type,
+ display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length);
void common_hal_displayio_parallelbus_end_transaction(mp_obj_t self);
diff --git a/shared-bindings/displayio/__init__.h b/shared-bindings/displayio/__init__.h
index a7748d029..4fc666c59 100644
--- a/shared-bindings/displayio/__init__.h
+++ b/shared-bindings/displayio/__init__.h
@@ -42,7 +42,8 @@ typedef enum {
typedef bool (*display_bus_bus_reset)(mp_obj_t bus);
typedef bool (*display_bus_bus_free)(mp_obj_t bus);
typedef bool (*display_bus_begin_transaction)(mp_obj_t bus);
-typedef void (*display_bus_send)(mp_obj_t bus, display_byte_type_t byte_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length);
+typedef void (*display_bus_send)(mp_obj_t bus, display_byte_type_t byte_type,
+ display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length);
typedef void (*display_bus_end_transaction)(mp_obj_t bus);
void common_hal_displayio_release_displays(void);
diff --git a/shared-bindings/ipaddress/IPv4Address.c b/shared-bindings/ipaddress/IPv4Address.c
index b2a10158a..e027f32d6 100644
--- a/shared-bindings/ipaddress/IPv4Address.c
+++ b/shared-bindings/ipaddress/IPv4Address.c
@@ -126,7 +126,7 @@ const mp_obj_property_t ipaddress_ipv4address_version_obj = {
(mp_obj_t)&mp_const_none_obj},
};
-//| def __eq__(self, other: IPv4Address) -> bool:
+//| def __eq__(self, other: object) -> bool:
//| """Two Address objects are equal if their addresses and address types are equal."""
//| ...
//|
diff --git a/shared-bindings/ps2io/Ps2.c b/shared-bindings/ps2io/Ps2.c
index 0977e08ff..07fa5cebb 100644
--- a/shared-bindings/ps2io/Ps2.c
+++ b/shared-bindings/ps2io/Ps2.c
@@ -116,8 +116,9 @@ STATIC void check_for_deinit(ps2io_ps2_obj_t *self) {
//| ...
//|
STATIC mp_obj_t ps2io_ps2_obj___exit__(size_t n_args, const mp_obj_t *args) {
- (void)n_args;
- common_hal_ps2io_ps2_deinit(args[0]);
+ mp_check_self(MP_OBJ_IS_TYPE(args[0], &ps2io_ps2_type));
+ ps2io_ps2_obj_t *self = MP_OBJ_TO_PTR(args[0]);
+ common_hal_ps2io_ps2_deinit(self);
return mp_const_none;
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(ps2io_ps2___exit___obj, 4, 4, ps2io_ps2_obj___exit__);
diff --git a/shared-bindings/rgbmatrix/RGBMatrix.c b/shared-bindings/rgbmatrix/RGBMatrix.c
index 753c1c920..5f5ea4fae 100644
--- a/shared-bindings/rgbmatrix/RGBMatrix.c
+++ b/shared-bindings/rgbmatrix/RGBMatrix.c
@@ -197,6 +197,11 @@ STATIC mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n
uint8_t clock_pin = validate_pin(args[ARG_clock_pin].u_obj);
uint8_t latch_pin = validate_pin(args[ARG_latch_pin].u_obj);
uint8_t output_enable_pin = validate_pin(args[ARG_output_enable_pin].u_obj);
+ int bit_depth = args[ARG_bit_depth].u_int;
+
+ if (bit_depth <= 0 || bit_depth > 6) {
+ mp_raise_ValueError_varg(translate("Bit depth must be from 1 to 6 inclusive, not %d"), bit_depth);
+ }
validate_pins(MP_QSTR_rgb_pins, rgb_pins, MP_ARRAY_SIZE(self->rgb_pins), args[ARG_rgb_list].u_obj, &rgb_count);
validate_pins(MP_QSTR_addr_pins, addr_pins, MP_ARRAY_SIZE(self->addr_pins), args[ARG_addr_list].u_obj, &addr_count);
@@ -229,7 +234,7 @@ STATIC mp_obj_t rgbmatrix_rgbmatrix_make_new(const mp_obj_type_t *type, size_t n
common_hal_rgbmatrix_rgbmatrix_construct(self,
args[ARG_width].u_int,
- args[ARG_bit_depth].u_int,
+ bit_depth,
rgb_count, rgb_pins,
addr_count, addr_pins,
clock_pin, latch_pin, output_enable_pin,
diff --git a/shared-bindings/socket/__init__.c b/shared-bindings/socket/__init__.c
index 38840da5e..799bf28af 100644
--- a/shared-bindings/socket/__init__.c
+++ b/shared-bindings/socket/__init__.c
@@ -49,7 +49,14 @@ STATIC const mp_obj_type_t socket_type;
//| class socket:
//|
-//| def __init__(self, family: int, type: int, proto: int) -> None:
+//| AF_INET: int
+//| AF_INET6: int
+//| SOCK_STREAM: int
+//| SOCK_DGRAM: int
+//| SOCK_RAW: int
+//| IPPROTO_TCP: int
+//|
+//| def __init__(self, family: int = AF_INET, type: int = SOCK_STREAM, proto: int = IPPROTO_TCP) -> None:
//| """Create a new socket
//|
//| :param int family: AF_INET or AF_INET6
@@ -57,12 +64,6 @@ STATIC const mp_obj_type_t socket_type;
//| :param int proto: IPPROTO_TCP, IPPROTO_UDP or IPPROTO_RAW (ignored)"""
//| ...
//|
-//| AF_INET: int
-//| AF_INET6: int
-//| SOCK_STREAM: int
-//| SOCK_DGRAM: int
-//| SOCK_RAW: int
-//|
STATIC mp_obj_t socket_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *args, mp_map_t *kw_args) {
mp_arg_check_num(n_args, kw_args, 0, 4, false);
diff --git a/shared-bindings/socketpool/Socket.c b/shared-bindings/socketpool/Socket.c
index e7b31842d..0e6968d5f 100644
--- a/shared-bindings/socketpool/Socket.c
+++ b/shared-bindings/socketpool/Socket.c
@@ -36,6 +36,8 @@
#include "py/runtime.h"
#include "py/mperrno.h"
+#include "lib/netutils/netutils.h"
+
//| class Socket:
//| """TCP, UDP and RAW socket. Cannot be created directly. Instead, call
//| `SocketPool.socket()`.
@@ -161,7 +163,7 @@ STATIC mp_obj_t socketpool_socket_close(mp_obj_t self_in) {
}
STATIC MP_DEFINE_CONST_FUN_OBJ_1(socketpool_socket_close_obj, socketpool_socket_close);
-//| def connect(self, address: tuple) -> None:
+//| def connect(self, address: Tuple[str, int]) -> None:
//| """Connect a socket to a remote address
//|
//| :param ~tuple address: tuple of (remote_address, remote_port)"""
@@ -274,79 +276,63 @@ STATIC mp_obj_t socketpool_socket_recv_into(size_t n_args, const mp_obj_t *args)
}
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(socketpool_socket_recv_into_obj, 2, 3, socketpool_socket_recv_into);
-// //| def sendto(self, bytes: ReadableBuffer, address: tuple) -> int:
-// //| """Send some bytes to a specific address.
-// //| Suits sockets of type SOCK_DGRAM
-// //|
-// //| :param ~bytes bytes: some bytes to send
-// //| :param ~tuple address: tuple of (remote_address, remote_port)"""
-// //| ...
-// //|
-
-// STATIC mp_obj_t socketpool_socket_sendto(mp_obj_t self_in, mp_obj_t data_in, mp_obj_t addr_in) {
-// // mod_network_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
+//| def sendto(self, bytes: ReadableBuffer, address: Tuple[str, int]) -> int:
+//| """Send some bytes to a specific address.
+//| Suits sockets of type SOCK_DGRAM
+//|
+//| :param ~bytes bytes: some bytes to send
+//| :param ~tuple address: tuple of (remote_address, remote_port)"""
+//| ...
+//|
-// // // get the data
-// // mp_buffer_info_t bufinfo;
-// // mp_get_buffer_raise(data_in, &bufinfo, MP_BUFFER_READ);
+STATIC mp_obj_t socketpool_socket_sendto(mp_obj_t self_in, mp_obj_t data_in, mp_obj_t addr_in) {
+ socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
-// // // get address
-// // uint8_t ip[MOD_NETWORK_IPADDR_BUF_SIZE];
-// // mp_uint_t port = netutils_parse_inet_addr(addr_in, ip, NETUTILS_BIG);
+ // get the data
+ mp_buffer_info_t bufinfo;
+ mp_get_buffer_raise(data_in, &bufinfo, MP_BUFFER_READ);
-// // // check if we need to select a NIC
-// // socket_select_nic(self, ip);
+ mp_obj_t *addr_items;
+ mp_obj_get_array_fixed_n(addr_in, 2, &addr_items);
-// // // call the NIC to sendto
-// // int _errno;
-// // mp_int_t ret = self->nic_type->sendto(self, bufinfo.buf, bufinfo.len, ip, port, &_errno);
-// // if (ret == -1) {
-// // mp_raise_OSError(_errno);
-// // }
-// mp_int_t ret = 0;
+ size_t hostlen;
+ const char* host = mp_obj_str_get_data(addr_items[0], &hostlen);
+ mp_int_t port = mp_obj_get_int(addr_items[1]);
-// return mp_obj_new_int(ret);
-// }
-// STATIC MP_DEFINE_CONST_FUN_OBJ_3(socketpool_socket_sendto_obj, socketpool_socket_sendto);
+ mp_int_t ret = common_hal_socketpool_socket_sendto(self, host, hostlen, port, bufinfo.buf, bufinfo.len);
+ if (!ret) {
+ mp_raise_OSError(0);
+ }
-// //| def recvfrom(self, bufsize: int) -> Tuple[bytes, tuple]:
-// //| """Reads some bytes from the connected remote address.
-// //| Suits sockets of type SOCK_STREAM
-// //|
-// //| Returns a tuple containing
-// //| * a bytes() of length <= bufsize
-// //| * a remote_address, which is a tuple of ip address and port number
-// //|
-// //| :param ~int bufsize: maximum number of bytes to receive"""
-// //| ...
-// //|
+ return mp_obj_new_int_from_uint(ret);
+}
+STATIC MP_DEFINE_CONST_FUN_OBJ_3(socketpool_socket_sendto_obj, socketpool_socket_sendto);
-// STATIC mp_obj_t socketpool_socket_recvfrom_into(mp_obj_t self_in, mp_obj_t len_in) {
-// // mod_network_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
-// // if (self->nic == MP_OBJ_NULL) {
-// // // not connected
-// // mp_raise_OSError(MP_ENOTCONN);
-// // }
-// // vstr_t vstr;
-// // vstr_init_len(&vstr, mp_obj_get_int(len_in));
-// // byte ip[4];
-// // mp_uint_t port;
-// // int _errno;
-// // mp_int_t ret = self->nic_type->recvfrom(self, (byte*)vstr.buf, vstr.len, ip, &port, &_errno);
-// // if (ret == -1) {
-// // mp_raise_OSError(_errno);
-// // }
-// mp_obj_t tuple[2];
-// // if (ret == 0) {
-// // tuple[0] = mp_const_empty_bytes;
-// // } else {
-// // vstr.len = ret;
-// // tuple[0] = mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr);
-// // }
-// // tuple[1] = netutils_format_inet_addr(ip, port, NETUTILS_BIG);
-// return mp_obj_new_tuple(2, tuple);
-// }
-// STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_recvfrom_into_obj, socketpool_socket_recvfrom_into);
+//| def recvfrom_into(self, buffer: WriteableBuffer) -> Tuple[int, Tuple[str, int]]:
+//| """Reads some bytes from a remote address.
+//|
+//| Returns a tuple containing
+//| * the number of bytes received into the given buffer
+//| * a remote_address, which is a tuple of ip address and port number
+//|
+//| :param object buffer: buffer to read into"""
+//| ...
+//|
+STATIC mp_obj_t socketpool_socket_recvfrom_into(mp_obj_t self_in, mp_obj_t data_in) {
+ socketpool_socket_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ mp_buffer_info_t bufinfo;
+ mp_get_buffer_raise(data_in, &bufinfo, MP_BUFFER_WRITE);
+
+ byte ip[4];
+ mp_uint_t port;
+ mp_int_t ret = common_hal_socketpool_socket_recvfrom_into(self,
+ (byte*)bufinfo.buf, bufinfo.len, ip, &port);
+ mp_obj_t tuple_contents[2];
+ tuple_contents[0] = mp_obj_new_int_from_uint(ret);
+ tuple_contents[1] = netutils_format_inet_addr(ip, port, NETUTILS_BIG);
+ return mp_obj_new_tuple(2, tuple_contents);
+}
+STATIC MP_DEFINE_CONST_FUN_OBJ_2(socketpool_socket_recvfrom_into_obj, socketpool_socket_recvfrom_into);
// //| def setsockopt(self, level: int, optname: int, value: int) -> None:
// //| """Sets socket options"""
@@ -449,8 +435,8 @@ STATIC const mp_rom_map_elem_t socketpool_socket_locals_dict_table[] = {
// { MP_ROM_QSTR(MP_QSTR_accept), MP_ROM_PTR(&socketpool_socket_accept_obj) },
{ MP_ROM_QSTR(MP_QSTR_connect), MP_ROM_PTR(&socketpool_socket_connect_obj) },
{ MP_ROM_QSTR(MP_QSTR_send), MP_ROM_PTR(&socketpool_socket_send_obj) },
- // { MP_ROM_QSTR(MP_QSTR_sendto), MP_ROM_PTR(&socketpool_socket_sendto_obj) },
- // { MP_ROM_QSTR(MP_QSTR_recvfrom_into), MP_ROM_PTR(&socketpool_socket_recvfrom_into_obj) },
+ { MP_ROM_QSTR(MP_QSTR_sendto), MP_ROM_PTR(&socketpool_socket_sendto_obj) },
+ { MP_ROM_QSTR(MP_QSTR_recvfrom_into), MP_ROM_PTR(&socketpool_socket_recvfrom_into_obj) },
{ MP_ROM_QSTR(MP_QSTR_recv_into), MP_ROM_PTR(&socketpool_socket_recv_into_obj) },
// { MP_ROM_QSTR(MP_QSTR_setsockopt), MP_ROM_PTR(&socketpool_socket_setsockopt_obj) },
{ MP_ROM_QSTR(MP_QSTR_settimeout), MP_ROM_PTR(&socketpool_socket_settimeout_obj) },
diff --git a/shared-bindings/socketpool/Socket.h b/shared-bindings/socketpool/Socket.h
index f0be95c92..54fbe59b2 100644
--- a/shared-bindings/socketpool/Socket.h
+++ b/shared-bindings/socketpool/Socket.h
@@ -35,6 +35,10 @@ void common_hal_socketpool_socket_settimeout(socketpool_socket_obj_t* self, mp_u
bool common_hal_socketpool_socket_connect(socketpool_socket_obj_t* self, const char* host, size_t hostlen, mp_int_t port);
mp_uint_t common_hal_socketpool_socket_send(socketpool_socket_obj_t* self, const uint8_t* buf, mp_uint_t len);
mp_uint_t common_hal_socketpool_socket_recv_into(socketpool_socket_obj_t* self, const uint8_t* buf, mp_uint_t len);
+mp_uint_t common_hal_socketpool_socket_sendto(socketpool_socket_obj_t* self,
+ const char* host, size_t hostlen, uint8_t port, const uint8_t* buf, mp_uint_t len);
+mp_uint_t common_hal_socketpool_socket_recvfrom_into(socketpool_socket_obj_t* self,
+ uint8_t* buf, mp_uint_t len, uint8_t* ip, uint *port);
void common_hal_socketpool_socket_close(socketpool_socket_obj_t* self);
bool common_hal_socketpool_socket_get_closed(socketpool_socket_obj_t* self);
bool common_hal_socketpool_socket_get_connected(socketpool_socket_obj_t* self);
diff --git a/shared-bindings/socketpool/SocketPool.c b/shared-bindings/socketpool/SocketPool.c
index 527cf7e98..73eeed265 100644
--- a/shared-bindings/socketpool/SocketPool.c
+++ b/shared-bindings/socketpool/SocketPool.c
@@ -57,8 +57,14 @@ STATIC mp_obj_t socketpool_socketpool_make_new(const mp_obj_type_t *type, size_t
return MP_OBJ_FROM_PTR(s);
}
-
-//| def socket(self, family: int = AF_INET, type: int = SOCK_STREAM, proto: int = IPPROTO_TCP) -> None:
+//| AF_INET: int
+//| AF_INET6: int
+//| SOCK_STREAM: int
+//| SOCK_DGRAM: int
+//| SOCK_RAW: int
+//| IPPROTO_TCP: int
+//|
+//| def socket(self, family: int = AF_INET, type: int = SOCK_STREAM, proto: int = IPPROTO_TCP) -> socketpool.Socket:
//| """Create a new socket
//|
//| :param ~int family: AF_INET or AF_INET6
@@ -66,6 +72,7 @@ STATIC mp_obj_t socketpool_socketpool_make_new(const mp_obj_type_t *type, size_t
//| :param ~int proto: IPPROTO_TCP, IPPROTO_UDP or IPPROTO_RAW (ignored)"""
//| ...
//|
+
STATIC mp_obj_t socketpool_socketpool_socket(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
mp_arg_check_num(n_args, kw_args, 0, 5, false);
@@ -82,7 +89,7 @@ STATIC mp_obj_t socketpool_socketpool_socket(size_t n_args, const mp_obj_t *pos_
}
MP_DEFINE_CONST_FUN_OBJ_KW(socketpool_socketpool_socket_obj, 1, socketpool_socketpool_socket);
-//| def getaddrinfo(host: str, port: int, family: int = 0, type: int = 0, proto: int = 0, flags: int = 0) -> tuple:
+//| def getaddrinfo(host: str, port: int, family: int = 0, type: int = 0, proto: int = 0, flags: int = 0) -> Tuple[int, int, int, str, Tuple[str, int]]:
//| """Gets the address information for a hostname and port
//|
//| Returns the appropriate family, socket type, socket protocol and
diff --git a/shared-bindings/ssl/SSLContext.c b/shared-bindings/ssl/SSLContext.c
index d2c236d3b..9d4df7261 100644
--- a/shared-bindings/ssl/SSLContext.c
+++ b/shared-bindings/ssl/SSLContext.c
@@ -51,7 +51,7 @@ STATIC mp_obj_t ssl_sslcontext_make_new(const mp_obj_type_t *type, size_t n_args
return MP_OBJ_FROM_PTR(s);
}
-//| def wrap_socket(sock: socketpool.Socket, *, server_side: bool = False, server_hostname: str = None) -> socketpool.Socket:
+//| def wrap_socket(sock: socketpool.Socket, *, server_side: bool = False, server_hostname: Optional[str] = None) -> socketpool.Socket:
//| """Wraps the socket into a socket-compatible class that handles SSL negotiation.
//| The socket must be of type SOCK_STREAM."""
//| ...
diff --git a/shared-bindings/watchdog/WatchDogTimer.c b/shared-bindings/watchdog/WatchDogTimer.c
index 09219f710..575021a21 100644
--- a/shared-bindings/watchdog/WatchDogTimer.c
+++ b/shared-bindings/watchdog/WatchDogTimer.c
@@ -66,6 +66,7 @@ STATIC mp_obj_t watchdog_watchdogtimer_feed(mp_obj_t self_in) {
if (current_mode == WATCHDOGMODE_NONE) {
mp_raise_ValueError(translate("WatchDogTimer is not currently running"));
}
+
common_hal_watchdog_feed(self);
return mp_const_none;
}
@@ -78,12 +79,6 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(watchdog_watchdogtimer_feed_obj, watchdog_watch
//|
STATIC mp_obj_t watchdog_watchdogtimer_deinit(mp_obj_t self_in) {
watchdog_watchdogtimer_obj_t *self = MP_OBJ_TO_PTR(self_in);
- watchdog_watchdogmode_t current_mode = common_hal_watchdog_get_mode(self);
-
- if (current_mode == WATCHDOGMODE_RESET) {
- mp_raise_NotImplementedError(translate("WatchDogTimer cannot be deinitialized once mode is set to RESET"));
- }
-
common_hal_watchdog_deinit(self);
return mp_const_none;
}
diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c
index a274c437e..991abd4f1 100644
--- a/shared-bindings/wifi/Radio.c
+++ b/shared-bindings/wifi/Radio.c
@@ -79,7 +79,7 @@ const mp_obj_property_t wifi_radio_mac_address_obj = {
};
-//| def start_scanning_networks(self, *, start_channel=1, stop_channel=11) -> Iterable[Network]:
+//| def start_scanning_networks(self, *, start_channel: int = 1, stop_channel: int = 11) -> Iterable[Network]:
//| """Scans for available wifi networks over the given channel range. Make sure the channels are allowed in your country."""
//| ...
//|
@@ -142,9 +142,25 @@ const mp_obj_property_t wifi_radio_hostname_obj = {
(mp_obj_t)&mp_const_none_obj},
};
-//| def connect(self, ssid: ReadableBuffer, password: ReadableBuffer = b"", *, channel: Optional[int] = 0, timeout: Optional[float] = None) -> bool:
+//| def connect(self,
+//| ssid: ReadableBuffer,
+//| password: ReadableBuffer = b"",
+//| *,
+//| channel: Optional[int] = 0,
+//| bssid: Optional[ReadableBuffer] = b"",
+//| timeout: Optional[float] = None) -> bool:
//| """Connects to the given ssid and waits for an ip address. Reconnections are handled
-//| automatically once one connection succeeds."""
+//| automatically once one connection succeeds.
+//|
+//| By default, this will scan all channels and connect to the access point (AP) with the
+//| given ``ssid`` and greatest signal strength (rssi).
+//|
+//| If ``channel`` is given, the scan will begin with the given channel and connect to
+//| the first AP with the given ``ssid``. This can speed up the connection time
+//| significantly because a full scan doesn't occur.
+//|
+//| If ``bssid`` is given, the scan will start at the first channel or the one given and
+//| connect to the AP with the given ``bssid`` and ``ssid``."""
//| ...
//|
STATIC mp_obj_t wifi_radio_connect(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
@@ -283,7 +299,7 @@ const mp_obj_property_t wifi_radio_ap_info_obj = {
(mp_obj_t)&mp_const_none_obj },
};
-//| def ping(self, ip, *, timeout: float = 0.5) -> float:
+//| def ping(self, ip: ipaddress.IPv4Address, *, timeout: Optional[float] = 0.5) -> float:
//| """Ping an IP to test connectivity. Returns echo time in seconds.
//| Returns None when it times out."""
//| ...
diff --git a/shared-module/_eve/__init__.c b/shared-module/_eve/__init__.c
index 0f1e12d9f..d95c777dc 100644
--- a/shared-module/_eve/__init__.c
+++ b/shared-module/_eve/__init__.c
@@ -70,8 +70,8 @@ void common_hal__eve_Vertex2f(common_hal__eve_t *eve, mp_float_t x, mp_float_t y
void common_hal__eve_VertexFormat(common_hal__eve_t *eve, uint32_t frac)
{
- C4(eve, ((27 << 24) | ((frac & 7))));
- eve->vscale = 1 << eve->vscale;
+ C4(eve, ((39 << 24) | ((frac & 7))));
+ eve->vscale = 1 << frac;
}
diff --git a/shared-module/board/__init__.c b/shared-module/board/__init__.c
index 39b68a0f1..2f1c34e56 100644
--- a/shared-module/board/__init__.c
+++ b/shared-module/board/__init__.c
@@ -55,9 +55,8 @@ mp_obj_t common_hal_board_get_i2c(void) {
}
mp_obj_t common_hal_board_create_i2c(void) {
- if (i2c_singleton != NULL) {
- return i2c_singleton;
- }
+ // All callers have either already verified this or come so early that it can't be otherwise.
+ assert(i2c_singleton == NULL || common_hal_busio_i2c_deinited(i2c_singleton));
busio_i2c_obj_t *self = &i2c_obj;
self->base.type = &busio_i2c_type;
@@ -79,9 +78,8 @@ mp_obj_t common_hal_board_get_spi(void) {
}
mp_obj_t common_hal_board_create_spi(void) {
- if (spi_singleton != NULL) {
- return spi_singleton;
- }
+ // All callers have either already verified this or come so early that it can't be otherwise.
+ assert(spi_singleton == NULL || common_hal_busio_spi_deinited(spi_singleton));
busio_spi_obj_t *self = &spi_obj;
self->base.type = &busio_spi_type;
@@ -139,14 +137,17 @@ void reset_board_busses(void) {
bool display_using_i2c = false;
#if CIRCUITPY_DISPLAYIO
for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) {
- if (displays[i].i2cdisplay_bus.bus == i2c_singleton) {
+ if (displays[i].bus_base.type == &displayio_i2cdisplay_type && displays[i].i2cdisplay_bus.bus == i2c_singleton) {
display_using_i2c = true;
break;
}
}
#endif
- if (!display_using_i2c) {
- i2c_singleton = NULL;
+ if (i2c_singleton != NULL) {
+ if (!display_using_i2c) {
+ common_hal_busio_i2c_deinit(i2c_singleton);
+ i2c_singleton = NULL;
+ }
}
#endif
#if BOARD_SPI
@@ -169,9 +170,10 @@ void reset_board_busses(void) {
// make sure SPI lock is not held over a soft reset
if (spi_singleton != NULL) {
common_hal_busio_spi_unlock(spi_singleton);
- }
- if (!display_using_spi) {
- spi_singleton = NULL;
+ if (!display_using_spi) {
+ common_hal_busio_spi_deinit(spi_singleton);
+ spi_singleton = NULL;
+ }
}
#endif
#if BOARD_UART
diff --git a/shared-module/displayio/ColorConverter.c b/shared-module/displayio/ColorConverter.c
index dc64da03d..80558d037 100644
--- a/shared-module/displayio/ColorConverter.c
+++ b/shared-module/displayio/ColorConverter.c
@@ -55,7 +55,7 @@ uint8_t displayio_colorconverter_compute_luma(uint32_t color_rgb888) {
uint32_t r8 = (color_rgb888 >> 16);
uint32_t g8 = (color_rgb888 >> 8) & 0xff;
uint32_t b8 = color_rgb888 & 0xff;
- return (r8 * 19) / 255 + (g8 * 182) / 255 + (b8 + 54) / 255;
+ return (r8 * 19 + g8 * 182 + b8 * 54) / 255;
}
uint8_t displayio_colorconverter_compute_chroma(uint32_t color_rgb888) {
@@ -165,9 +165,9 @@ void displayio_colorconverter_convert(displayio_colorconverter_t *self, const _d
g8 = MIN(255,g8 + (randg&0x03));
} else {
int bitmask = 0xFF >> colorspace->depth;
- b8 = MIN(255,b8 + (randb&bitmask));
- r8 = MIN(255,r8 + (randr&bitmask));
- g8 = MIN(255,g8 + (randg&bitmask));
+ b8 = MIN(255,b8 + (randb & bitmask));
+ r8 = MIN(255,r8 + (randr & bitmask));
+ g8 = MIN(255,g8 + (randg & bitmask));
}
pixel = r8 << 16 | g8 << 8 | b8;
}
@@ -196,7 +196,8 @@ void displayio_colorconverter_convert(displayio_colorconverter_t *self, const _d
return;
} else if (colorspace->grayscale && colorspace->depth <= 8) {
uint8_t luma = displayio_colorconverter_compute_luma(pixel);
- output_color->pixel = luma >> (8 - colorspace->depth);
+ size_t bitmask = (1 << colorspace->depth) - 1;
+ output_color->pixel = (luma >> colorspace->grayscale_bit) & bitmask;
output_color->opaque = true;
return;
}
diff --git a/shared-module/displayio/EPaperDisplay.c b/shared-module/displayio/EPaperDisplay.c
index 46c7ea82e..3fb37ff21 100644
--- a/shared-module/displayio/EPaperDisplay.c
+++ b/shared-module/displayio/EPaperDisplay.c
@@ -43,13 +43,14 @@
#include <string.h>
void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t* self,
- mp_obj_t bus, uint8_t* start_sequence, uint16_t start_sequence_len, uint8_t* stop_sequence, uint16_t stop_sequence_len,
+ mp_obj_t bus, const uint8_t* start_sequence, uint16_t start_sequence_len,
+ const uint8_t* stop_sequence, uint16_t stop_sequence_len,
uint16_t width, uint16_t height, uint16_t ram_width, uint16_t ram_height,
int16_t colstart, int16_t rowstart, uint16_t rotation,
uint16_t set_column_window_command, uint16_t set_row_window_command,
uint16_t set_current_column_command, uint16_t set_current_row_command,
uint16_t write_black_ram_command, bool black_bits_inverted, uint16_t write_color_ram_command, bool color_bits_inverted, uint32_t highlight_color, uint16_t refresh_display_command, mp_float_t refresh_time,
- const mcu_pin_obj_t* busy_pin, bool busy_state, mp_float_t seconds_per_frame, bool chip_select) {
+ const mcu_pin_obj_t* busy_pin, bool busy_state, mp_float_t seconds_per_frame, bool chip_select, bool grayscale) {
if (highlight_color != 0x000000) {
self->core.colorspace.tricolor = true;
self->core.colorspace.tricolor_hue = displayio_colorconverter_compute_hue(highlight_color);
@@ -72,6 +73,7 @@ void common_hal_displayio_epaperdisplay_construct(displayio_epaperdisplay_obj_t*
self->refreshing = false;
self->milliseconds_per_frame = seconds_per_frame * 1000;
self->chip_select = chip_select ? CHIP_SELECT_TOGGLE_EVERY_BYTE : CHIP_SELECT_UNTOUCHED;
+ self->grayscale = grayscale;
self->start_sequence = start_sequence;
self->start_sequence_len = start_sequence_len;
@@ -132,14 +134,15 @@ STATIC void wait_for_busy(displayio_epaperdisplay_obj_t* self) {
}
}
-STATIC void send_command_sequence(displayio_epaperdisplay_obj_t* self, bool should_wait_for_busy, uint8_t* sequence, uint32_t sequence_len) {
+STATIC void send_command_sequence(displayio_epaperdisplay_obj_t* self,
+ bool should_wait_for_busy, const uint8_t* sequence, uint32_t sequence_len) {
uint32_t i = 0;
while (i < sequence_len) {
- uint8_t *cmd = sequence + i;
+ const uint8_t *cmd = sequence + i;
uint8_t data_size = *(cmd + 1);
bool delay = (data_size & DELAY) != 0;
data_size &= ~DELAY;
- uint8_t *data = cmd + 2;
+ const uint8_t *data = cmd + 2;
displayio_display_core_begin_transaction(&self->core);
self->core.send(self->core.bus, DISPLAY_COMMAND, self->chip_select, cmd, 1);
self->core.send(self->core.bus, DISPLAY_DATA, self->chip_select, data, data_size);
@@ -195,6 +198,29 @@ mp_obj_t common_hal_displayio_epaperdisplay_get_bus(displayio_epaperdisplay_obj_
return self->core.bus;
}
+void common_hal_displayio_epaperdisplay_set_rotation(displayio_epaperdisplay_obj_t* self, int rotation){
+ bool transposed = (self->core.rotation == 90 || self->core.rotation == 270);
+ bool will_transposed = (rotation == 90 || rotation == 270);
+ if(transposed != will_transposed) {
+ int tmp = self->core.width;
+ self->core.width = self->core.height;
+ self->core.height = tmp;
+ }
+ displayio_display_core_set_rotation(&self->core, rotation);
+ if (self == &displays[0].epaper_display) {
+ supervisor_stop_terminal();
+ supervisor_start_terminal(self->core.width, self->core.height);
+ }
+ if (self->core.current_group != NULL) {
+ displayio_group_update_transform(self->core.current_group, &self->core.transform);
+ }
+}
+
+uint16_t common_hal_displayio_epaperdisplay_get_rotation(displayio_epaperdisplay_obj_t* self){
+ return self->core.rotation;
+}
+
+
bool displayio_epaperdisplay_refresh_area(displayio_epaperdisplay_obj_t* self, const displayio_area_t* area) {
uint16_t buffer_size = 128; // In uint32_ts
@@ -230,17 +256,16 @@ bool displayio_epaperdisplay_refresh_area(displayio_epaperdisplay_obj_t* self, c
uint32_t mask[mask_length];
uint8_t passes = 1;
- if (self->core.colorspace.tricolor) {
+ if (self->core.colorspace.tricolor || self->grayscale) {
passes = 2;
}
for (uint8_t pass = 0; pass < passes; pass++) {
uint16_t remaining_rows = displayio_area_height(&clipped);
- // added false parameter at end for SH1107_addressing quirk
if (self->set_row_window_command != NO_COMMAND) {
displayio_display_core_set_region_to_update(&self->core, self->set_column_window_command,
self->set_row_window_command, self->set_current_column_command, self->set_current_row_command,
- false, self->chip_select, &clipped, false);
+ false, self->chip_select, &clipped, false /* SH1107_addressing */);
}
uint8_t write_command = self->write_black_ram_command;
@@ -270,8 +295,13 @@ bool displayio_epaperdisplay_refresh_area(displayio_epaperdisplay_obj_t* self, c
memset(buffer, 0, buffer_size * sizeof(buffer[0]));
self->core.colorspace.grayscale = true;
+ self->core.colorspace.grayscale_bit = 7;
if (pass == 1) {
- self->core.colorspace.grayscale = false;
+ if (self->grayscale) { // 4-color grayscale
+ self->core.colorspace.grayscale_bit = 6;
+ } else { // Tri-color
+ self->core.colorspace.grayscale = false;
+ }
}
displayio_display_core_fill_area(&self->core, &subrectangle, mask, buffer);
@@ -353,6 +383,11 @@ void displayio_epaperdisplay_background(displayio_epaperdisplay_obj_t* self) {
}
}
+bool common_hal_displayio_epaperdisplay_get_busy(displayio_epaperdisplay_obj_t* self) {
+ displayio_epaperdisplay_background(self);
+ return self->refreshing;
+}
+
void release_epaperdisplay(displayio_epaperdisplay_obj_t* self) {
if (self->refreshing) {
wait_for_busy(self);
@@ -370,8 +405,8 @@ void release_epaperdisplay(displayio_epaperdisplay_obj_t* self) {
void displayio_epaperdisplay_collect_ptrs(displayio_epaperdisplay_obj_t* self) {
displayio_display_core_collect_ptrs(&self->core);
- gc_collect_ptr(self->start_sequence);
- gc_collect_ptr(self->stop_sequence);
+ gc_collect_ptr((void *) self->start_sequence);
+ gc_collect_ptr((void *) self->stop_sequence);
}
bool maybe_refresh_epaperdisplay(void) {
diff --git a/shared-module/displayio/EPaperDisplay.h b/shared-module/displayio/EPaperDisplay.h
index 3b9f6e368..d0668ff44 100644
--- a/shared-module/displayio/EPaperDisplay.h
+++ b/shared-module/displayio/EPaperDisplay.h
@@ -38,9 +38,9 @@ typedef struct {
displayio_display_core_t core;
digitalio_digitalinout_obj_t busy;
uint32_t milliseconds_per_frame;
- uint8_t* start_sequence;
+ const uint8_t* start_sequence;
uint32_t start_sequence_len;
- uint8_t* stop_sequence;
+ const uint8_t* stop_sequence;
uint32_t stop_sequence_len;
uint16_t refresh_time;
uint16_t set_column_window_command;
@@ -55,6 +55,7 @@ typedef struct {
bool black_bits_inverted;
bool color_bits_inverted;
bool refreshing;
+ bool grayscale;
display_chip_select_behavior_t chip_select;
} displayio_epaperdisplay_obj_t;
diff --git a/shared-module/displayio/FourWire.c b/shared-module/displayio/FourWire.c
index 8c56d7ab6..06f8a84e3 100644
--- a/shared-module/displayio/FourWire.c
+++ b/shared-module/displayio/FourWire.c
@@ -113,7 +113,8 @@ bool common_hal_displayio_fourwire_begin_transaction(mp_obj_t obj) {
return true;
}
-void common_hal_displayio_fourwire_send(mp_obj_t obj, display_byte_type_t data_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length) {
+void common_hal_displayio_fourwire_send(mp_obj_t obj, display_byte_type_t data_type,
+ display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) {
displayio_fourwire_obj_t* self = MP_OBJ_TO_PTR(obj);
common_hal_digitalio_digitalinout_set_value(&self->command, data_type == DISPLAY_DATA);
if (chip_select == CHIP_SELECT_TOGGLE_EVERY_BYTE) {
diff --git a/shared-module/displayio/I2CDisplay.c b/shared-module/displayio/I2CDisplay.c
index 5bd03dcd6..cc811e83d 100644
--- a/shared-module/displayio/I2CDisplay.c
+++ b/shared-module/displayio/I2CDisplay.c
@@ -103,7 +103,8 @@ bool common_hal_displayio_i2cdisplay_begin_transaction(mp_obj_t obj) {
return common_hal_busio_i2c_try_lock(self->bus);
}
-void common_hal_displayio_i2cdisplay_send(mp_obj_t obj, display_byte_type_t data_type, display_chip_select_behavior_t chip_select, uint8_t *data, uint32_t data_length) {
+void common_hal_displayio_i2cdisplay_send(mp_obj_t obj, display_byte_type_t data_type,
+ display_chip_select_behavior_t chip_select, const uint8_t *data, uint32_t data_length) {
displayio_i2cdisplay_obj_t* self = MP_OBJ_TO_PTR(obj);
if (data_type == DISPLAY_COMMAND) {
uint8_t command_bytes[2 * data_length];
diff --git a/shared-module/displayio/Palette.c b/shared-module/displayio/Palette.c
index facb1fa73..ba5ff665c 100644
--- a/shared-module/displayio/Palette.c
+++ b/shared-module/displayio/Palette.c
@@ -83,7 +83,8 @@ bool displayio_palette_get_color(displayio_palette_t *self, const _displayio_col
uint8_t pixel_hue = self->colors[palette_index].hue;
displayio_colorconverter_compute_tricolor(colorspace, pixel_hue, luma, color);
} else if (colorspace->grayscale) {
- *color = self->colors[palette_index].luma >> (8 - colorspace->depth);
+ size_t bitmask = (1 << colorspace->depth) - 1;
+ *color = (self->colors[palette_index].luma >> colorspace->grayscale_bit) & bitmask;
} else {
uint16_t packed = self->colors[palette_index].rgb565;
if (colorspace->reverse_bytes_in_word) {
diff --git a/shared-module/displayio/Palette.h b/shared-module/displayio/Palette.h
index da72f250f..993912cc5 100644
--- a/shared-module/displayio/Palette.h
+++ b/shared-module/displayio/Palette.h
@@ -37,6 +37,7 @@ typedef struct {
uint8_t bytes_per_cell;
uint8_t tricolor_hue;
uint8_t tricolor_luma;
+ uint8_t grayscale_bit; // The lowest grayscale bit. Normally 8 - depth.
bool grayscale;
bool tricolor;
bool pixels_in_byte_share_row;
diff --git a/shared-module/displayio/TileGrid.c b/shared-module/displayio/TileGrid.c
index e3642107f..19ea10e55 100644
--- a/shared-module/displayio/TileGrid.c
+++ b/shared-module/displayio/TileGrid.c
@@ -83,10 +83,16 @@ bool common_hal_displayio_tilegrid_get_hidden(displayio_tilegrid_t* self) {
void common_hal_displayio_tilegrid_set_hidden(displayio_tilegrid_t* self, bool hidden) {
self->hidden = hidden;
+ if(!hidden){
+ self->full_change = true;
+ }
}
void displayio_tilegrid_set_hidden_by_parent(displayio_tilegrid_t *self, bool hidden) {
self->hidden_by_parent = hidden;
+ if(!hidden){
+ self->full_change = true;
+ }
}
bool displayio_tilegrid_get_previous_area(displayio_tilegrid_t *self, displayio_area_t* area) {
diff --git a/shared-module/displayio/display_core.c b/shared-module/displayio/display_core.c
index 411f9f373..57d33b565 100644
--- a/shared-module/displayio/display_core.c
+++ b/shared-module/displayio/display_core.c
@@ -48,6 +48,7 @@ void displayio_display_core_construct(displayio_display_core_t* self,
uint16_t color_depth, bool grayscale, bool pixels_in_byte_share_row, uint8_t bytes_per_cell, bool reverse_pixels_in_byte, bool reverse_bytes_in_word) {
self->colorspace.depth = color_depth;
self->colorspace.grayscale = grayscale;
+ self->colorspace.grayscale_bit = 8 - color_depth;
self->colorspace.pixels_in_byte_share_row = pixels_in_byte_share_row;
self->colorspace.bytes_per_cell = bytes_per_cell;
self->colorspace.reverse_pixels_in_byte = reverse_pixels_in_byte;
diff --git a/shared-module/rgbmatrix/RGBMatrix.c b/shared-module/rgbmatrix/RGBMatrix.c
index 94c3eda27..a09767b62 100644
--- a/shared-module/rgbmatrix/RGBMatrix.c
+++ b/shared-module/rgbmatrix/RGBMatrix.c
@@ -78,10 +78,10 @@ void common_hal_rgbmatrix_rgbmatrix_reconstruct(rgbmatrix_rgbmatrix_obj_t* self,
// verify that the matrix is big enough
mp_get_index(mp_obj_get_type(self->framebuffer), self->bufinfo.len, MP_OBJ_NEW_SMALL_INT(self->bufsize-1), false);
} else {
- _PM_free(self->bufinfo.buf);
- _PM_free(self->protomatter.rgbPins);
- _PM_free(self->protomatter.addr);
- _PM_free(self->protomatter.screenData);
+ common_hal_rgbmatrix_free_impl(self->bufinfo.buf);
+ common_hal_rgbmatrix_free_impl(self->protomatter.rgbPins);
+ common_hal_rgbmatrix_free_impl(self->protomatter.addr);
+ common_hal_rgbmatrix_free_impl(self->protomatter.screenData);
self->framebuffer = NULL;
self->bufinfo.buf = common_hal_rgbmatrix_allocator_impl(self->bufsize);
@@ -180,9 +180,6 @@ void common_hal_rgbmatrix_rgbmatrix_deinit(rgbmatrix_rgbmatrix_obj_t* self) {
void rgbmatrix_rgbmatrix_collect_ptrs(rgbmatrix_rgbmatrix_obj_t* self) {
gc_collect_ptr(self->framebuffer);
- gc_collect_ptr(self->protomatter.rgbPins);
- gc_collect_ptr(self->protomatter.addr);
- gc_collect_ptr(self->protomatter.screenData);
}
void common_hal_rgbmatrix_rgbmatrix_set_paused(rgbmatrix_rgbmatrix_obj_t* self, bool paused) {
@@ -217,18 +214,10 @@ int common_hal_rgbmatrix_rgbmatrix_get_height(rgbmatrix_rgbmatrix_obj_t* self) {
}
void *common_hal_rgbmatrix_allocator_impl(size_t sz) {
- if (gc_alloc_possible()) {
- return m_malloc_maybe(sz + sizeof(void*), true);
- } else {
- supervisor_allocation *allocation = allocate_memory(align32_size(sz), false);
- return allocation ? allocation->ptr : NULL;
- }
+ supervisor_allocation *allocation = allocate_memory(align32_size(sz), false, true);
+ return allocation ? allocation->ptr : NULL;
}
void common_hal_rgbmatrix_free_impl(void *ptr_in) {
- supervisor_allocation *allocation = allocation_from_ptr(ptr_in);
-
- if (allocation) {
- free_memory(allocation);
- }
+ free_memory(allocation_from_ptr(ptr_in));
}
diff --git a/shared-module/sharpdisplay/SharpMemoryFramebuffer.c b/shared-module/sharpdisplay/SharpMemoryFramebuffer.c
index b199e98d6..4b92bd637 100644
--- a/shared-module/sharpdisplay/SharpMemoryFramebuffer.c
+++ b/shared-module/sharpdisplay/SharpMemoryFramebuffer.c
@@ -34,32 +34,10 @@
#include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h"
#include "supervisor/memory.h"
-#include "supervisor/shared/safe_mode.h"
#define SHARPMEM_BIT_WRITECMD_LSB (0x80)
#define SHARPMEM_BIT_VCOM_LSB (0x40)
-static void *hybrid_alloc(size_t sz) {
- supervisor_allocation *allocation = allocate_memory(align32_size(sz), false);
- if (allocation) {
- memset(allocation->ptr, 0, sz);
- return allocation->ptr;
- }
- if (gc_alloc_possible()) {
- return m_malloc(sz, true);
- }
- reset_into_safe_mode(MEM_MANAGE);
- return NULL; // unreached
-}
-
-static inline void hybrid_free(void *ptr_in) {
- supervisor_allocation *allocation = allocation_from_ptr(ptr_in);
-
- if (allocation) {
- free_memory(allocation);
- }
-}
-
STATIC uint8_t bitrev(uint8_t n) {
uint8_t r = 0;
for(int i=0;i<8;i++) r |= ((n>>i) & 1)<<(7-i);
@@ -102,9 +80,9 @@ void common_hal_sharpdisplay_framebuffer_reset(sharpdisplay_framebuffer_obj_t *s
}
void common_hal_sharpdisplay_framebuffer_reconstruct(sharpdisplay_framebuffer_obj_t *self) {
- if (!allocation_from_ptr(self->bufinfo.buf)) {
- self->bufinfo.buf = NULL;
- }
+ // Look up the allocation by the old pointer and get the new pointer from it.
+ supervisor_allocation* alloc = allocation_from_ptr(self->bufinfo.buf);
+ self->bufinfo.buf = alloc ? alloc->ptr : NULL;
}
void common_hal_sharpdisplay_framebuffer_get_bufinfo(sharpdisplay_framebuffer_obj_t *self, mp_buffer_info_t *bufinfo) {
@@ -112,7 +90,12 @@ void common_hal_sharpdisplay_framebuffer_get_bufinfo(sharpdisplay_framebuffer_ob
int row_stride = common_hal_sharpdisplay_framebuffer_get_row_stride(self);
int height = common_hal_sharpdisplay_framebuffer_get_height(self);
self->bufinfo.len = row_stride * height + 2;
- self->bufinfo.buf = hybrid_alloc(self->bufinfo.len);
+ supervisor_allocation* alloc = allocate_memory(align32_size(self->bufinfo.len), false, true);
+ if (alloc == NULL) {
+ m_malloc_fail(self->bufinfo.len);
+ }
+ self->bufinfo.buf = alloc->ptr;
+ memset(alloc->ptr, 0, self->bufinfo.len);
uint8_t *data = self->bufinfo.buf;
*data++ = SHARPMEM_BIT_WRITECMD_LSB;
@@ -123,7 +106,9 @@ void common_hal_sharpdisplay_framebuffer_get_bufinfo(sharpdisplay_framebuffer_ob
}
self->full_refresh = true;
}
- *bufinfo = self->bufinfo;
+ if (bufinfo) {
+ *bufinfo = self->bufinfo;
+ }
}
void common_hal_sharpdisplay_framebuffer_deinit(sharpdisplay_framebuffer_obj_t *self) {
@@ -137,7 +122,7 @@ void common_hal_sharpdisplay_framebuffer_deinit(sharpdisplay_framebuffer_obj_t *
common_hal_reset_pin(self->chip_select.pin);
- hybrid_free(self->bufinfo.buf);
+ free_memory(allocation_from_ptr(self->bufinfo.buf));
memset(self, 0, sizeof(*self));
}
@@ -154,19 +139,7 @@ void common_hal_sharpdisplay_framebuffer_construct(sharpdisplay_framebuffer_obj_
self->height = height;
self->baudrate = baudrate;
- int row_stride = common_hal_sharpdisplay_framebuffer_get_row_stride(self);
- self->bufinfo.len = row_stride * height + 2;
- // re-use a supervisor allocation if possible
- self->bufinfo.buf = hybrid_alloc(self->bufinfo.len);
-
- uint8_t *data = self->bufinfo.buf;
- *data++ = SHARPMEM_BIT_WRITECMD_LSB;
-
- for(int y=0; y<self->height; y++) {
- *data = bitrev(y+1);
- data += row_stride;
- }
- self->full_refresh = true;
+ common_hal_sharpdisplay_framebuffer_get_bufinfo(self, NULL);
}
void common_hal_sharpdisplay_framebuffer_swapbuffers(sharpdisplay_framebuffer_obj_t *self, uint8_t *dirty_row_bitmask) {
@@ -271,7 +244,5 @@ const framebuffer_p_t sharpdisplay_framebuffer_proto = {
};
void common_hal_sharpdisplay_framebuffer_collect_ptrs(sharpdisplay_framebuffer_obj_t *self) {
- gc_collect_ptr(self->framebuffer);
gc_collect_ptr(self->bus);
- gc_collect_ptr(self->bufinfo.buf);
}
diff --git a/shared-module/sharpdisplay/SharpMemoryFramebuffer.h b/shared-module/sharpdisplay/SharpMemoryFramebuffer.h
index 8acacc94e..08966a89c 100644
--- a/shared-module/sharpdisplay/SharpMemoryFramebuffer.h
+++ b/shared-module/sharpdisplay/SharpMemoryFramebuffer.h
@@ -33,7 +33,6 @@
typedef struct {
mp_obj_base_t base;
- mp_obj_t framebuffer;
busio_spi_obj_t* bus;
busio_spi_obj_t inline_bus;
digitalio_digitalinout_obj_t chip_select;
diff --git a/shared-module/usb_midi/__init__.c b/shared-module/usb_midi/__init__.c
index 73a314b99..3fb3f836c 100644
--- a/shared-module/usb_midi/__init__.c
+++ b/shared-module/usb_midi/__init__.c
@@ -40,12 +40,12 @@ supervisor_allocation* usb_midi_allocation;
void usb_midi_init(void) {
// TODO(tannewt): Make this dynamic.
- uint16_t tuple_size = align32_size(sizeof(mp_obj_tuple_t) + sizeof(mp_obj_t*) * 2);
- uint16_t portin_size = align32_size(sizeof(usb_midi_portin_obj_t));
- uint16_t portout_size = align32_size(sizeof(usb_midi_portout_obj_t));
+ size_t tuple_size = align32_size(sizeof(mp_obj_tuple_t) + sizeof(mp_obj_t*) * 2);
+ size_t portin_size = align32_size(sizeof(usb_midi_portin_obj_t));
+ size_t portout_size = align32_size(sizeof(usb_midi_portout_obj_t));
// For each embedded MIDI Jack in the descriptor we create a Port
- usb_midi_allocation = allocate_memory(tuple_size + portin_size + portout_size, false);
+ usb_midi_allocation = allocate_memory(tuple_size + portin_size + portout_size, false, false);
mp_obj_tuple_t *ports = (mp_obj_tuple_t *) usb_midi_allocation->ptr;
ports->base.type = &mp_type_tuple;
diff --git a/supervisor/memory.h b/supervisor/memory.h
index f4359ca46..0f820eac1 100755
--- a/supervisor/memory.h
+++ b/supervisor/memory.h
@@ -33,32 +33,45 @@
#include <stdbool.h>
#include <stdint.h>
+#include <stddef.h>
typedef struct {
uint32_t* ptr;
- uint32_t length; // in bytes
} supervisor_allocation;
-void memory_init(void);
void free_memory(supervisor_allocation* allocation);
+
+// Find the allocation with the given ptr, NULL if not found. When called from the context of a
+// supervisor_move_memory() callback, finds the allocation that had that ptr *before* the move, but
+// the returned allocation already contains the ptr after the move.
+// When called with NULL, may return either NULL or an unused allocation whose ptr is NULL (this is
+// a feature used internally in allocate_memory to save code size). Passing the return value to
+// free_memory() is a permissible no-op in either case.
supervisor_allocation* allocation_from_ptr(void *ptr);
+
supervisor_allocation* allocate_remaining_memory(void);
// Allocate a piece of a given length in bytes. If high_address is true then it should be allocated
// at a lower address from the top of the stack. Otherwise, addresses will increase starting after
-// statically allocated memory.
-supervisor_allocation* allocate_memory(uint32_t length, bool high_address);
+// statically allocated memory. If movable is false, memory will be taken from outside the GC heap
+// and will stay stationary until freed. While the VM is running, this will fail unless a previous
+// allocation of exactly matching length has recently been freed. If movable is true, memory will be
+// taken from either outside or inside the GC heap, and when the VM exits, will be moved outside.
+// The ptr of the returned supervisor_allocation will change at that point. If you need to be
+// notified of that, add your own callback function at the designated place near the end of
+// supervisor_move_memory().
+supervisor_allocation* allocate_memory(uint32_t length, bool high_address, bool movable);
-static inline uint16_t align32_size(uint16_t size) {
- if (size % 4 != 0) {
- return (size & 0xfffc) + 0x4;
- }
- return size;
+static inline size_t align32_size(size_t size) {
+ return (size + 3) & ~3;
}
-// Called after the heap is freed in case the supervisor wants to save some values.
+size_t get_allocation_length(supervisor_allocation* allocation);
+
+// Called after the GC heap is freed, transfers movable allocations from the GC heap to the
+// supervisor heap and compacts the supervisor heap.
void supervisor_move_memory(void);
#endif // MICROPY_INCLUDED_SUPERVISOR_MEMORY_H
diff --git a/supervisor/port.h b/supervisor/port.h
index f5b3c15d1..5bc06bc4e 100644
--- a/supervisor/port.h
+++ b/supervisor/port.h
@@ -61,7 +61,8 @@ uint32_t *port_stack_get_limit(void);
// Get stack top address
uint32_t *port_stack_get_top(void);
-supervisor_allocation* port_fixed_stack(void);
+// True if stack is not located inside heap (at the top)
+bool port_has_fixed_stack(void);
// Get heap bottom address
uint32_t *port_heap_get_bottom(void);
@@ -69,8 +70,6 @@ uint32_t *port_heap_get_bottom(void);
// Get heap top address
uint32_t *port_heap_get_top(void);
-supervisor_allocation* port_fixed_heap(void);
-
// Save and retrieve a word from memory that is preserved over reset. Used for safe mode.
void port_set_saved_word(uint32_t);
uint32_t port_get_saved_word(void);
diff --git a/supervisor/serial.h b/supervisor/serial.h
index 9c2d44737..066886303 100644
--- a/supervisor/serial.h
+++ b/supervisor/serial.h
@@ -47,5 +47,4 @@ char serial_read(void);
bool serial_bytes_available(void);
bool serial_connected(void);
-extern volatile bool _serial_connected;
#endif // MICROPY_INCLUDED_SUPERVISOR_SERIAL_H
diff --git a/supervisor/shared/display.c b/supervisor/shared/display.c
index afb3f3a9a..9c9c66cd7 100644
--- a/supervisor/shared/display.c
+++ b/supervisor/shared/display.c
@@ -60,38 +60,44 @@ void supervisor_start_terminal(uint16_t width_px, uint16_t height_px) {
#if CIRCUITPY_TERMINALIO
displayio_tilegrid_t* grid = &supervisor_terminal_text_grid;
- uint16_t width_in_tiles = (width_px - blinka_bitmap.width) / grid->tile_width;
+ bool tall = height_px > width_px;
+ uint16_t terminal_width_px = tall ? width_px : width_px - blinka_bitmap.width;
+ uint16_t terminal_height_px = tall ? height_px - blinka_bitmap.height : height_px ;
+ uint16_t width_in_tiles = terminal_width_px / grid->tile_width;
// determine scale based on h
if (width_in_tiles < 80) {
scale = 1;
}
- width_in_tiles = (width_px - blinka_bitmap.width * scale) / (grid->tile_width * scale);
+ width_in_tiles = terminal_width_px / (grid->tile_width * scale);
if (width_in_tiles < 1) {
width_in_tiles = 1;
}
- uint16_t height_in_tiles = height_px / (grid->tile_height * scale);
- uint16_t remaining_pixels = height_px % (grid->tile_height * scale);
+ uint16_t height_in_tiles = terminal_height_px / (grid->tile_height * scale);
+ uint16_t remaining_pixels = tall ? 0 : terminal_height_px % (grid->tile_height * scale);
if (height_in_tiles < 1 || remaining_pixels > 0) {
height_in_tiles += 1;
}
uint16_t total_tiles = width_in_tiles * height_in_tiles;
- // First try to allocate outside the heap. This will fail when the VM is running.
- tilegrid_tiles = allocate_memory(align32_size(total_tiles), false);
- uint8_t* tiles;
- if (tilegrid_tiles == NULL) {
- tiles = m_malloc(total_tiles, true);
- MP_STATE_VM(terminal_tilegrid_tiles) = tiles;
- } else {
- tiles = (uint8_t*) tilegrid_tiles->ptr;
+ // Reuse the previous allocation if possible
+ if (tilegrid_tiles) {
+ if (get_allocation_length(tilegrid_tiles) != align32_size(total_tiles)) {
+ free_memory(tilegrid_tiles);
+ tilegrid_tiles = NULL;
+ }
}
-
- if (tiles == NULL) {
- return;
+ if (!tilegrid_tiles) {
+ tilegrid_tiles = allocate_memory(align32_size(total_tiles), false, true);
+ if (!tilegrid_tiles) {
+ return;
+ }
}
- grid->y = 0;
+ uint8_t* tiles = (uint8_t*) tilegrid_tiles->ptr;
+
+ grid->y = tall ? blinka_bitmap.height : 0;
+ grid->x = tall ? 0 : blinka_bitmap.width;
grid->top_left_y = 0;
if (remaining_pixels > 0) {
grid->y -= (grid->tile_height - remaining_pixels);
@@ -116,7 +122,6 @@ void supervisor_stop_terminal(void) {
if (tilegrid_tiles != NULL) {
free_memory(tilegrid_tiles);
tilegrid_tiles = NULL;
- supervisor_terminal_text_grid.inline_tiles = false;
supervisor_terminal_text_grid.tiles = NULL;
}
#endif
@@ -124,20 +129,10 @@ void supervisor_stop_terminal(void) {
void supervisor_display_move_memory(void) {
#if CIRCUITPY_TERMINALIO
- displayio_tilegrid_t* grid = &supervisor_terminal_text_grid;
- if (MP_STATE_VM(terminal_tilegrid_tiles) != NULL &&
- grid->tiles == MP_STATE_VM(terminal_tilegrid_tiles)) {
- uint16_t total_tiles = grid->width_in_tiles * grid->height_in_tiles;
-
- tilegrid_tiles = allocate_memory(align32_size(total_tiles), false);
- if (tilegrid_tiles != NULL) {
- memcpy(tilegrid_tiles->ptr, grid->tiles, total_tiles);
- grid->tiles = (uint8_t*) tilegrid_tiles->ptr;
- } else {
- grid->tiles = NULL;
- grid->inline_tiles = false;
- }
- MP_STATE_VM(terminal_tilegrid_tiles) = NULL;
+ if (tilegrid_tiles != NULL) {
+ supervisor_terminal_text_grid.tiles = (uint8_t*) tilegrid_tiles->ptr;
+ } else {
+ supervisor_terminal_text_grid.tiles = NULL;
}
#endif
diff --git a/supervisor/shared/external_flash/external_flash.c b/supervisor/shared/external_flash/external_flash.c
index 5bde7fd48..e2d767235 100644
--- a/supervisor/shared/external_flash/external_flash.c
+++ b/supervisor/shared/external_flash/external_flash.c
@@ -338,7 +338,7 @@ static bool allocate_ram_cache(void) {
uint32_t table_size = blocks_per_sector * pages_per_block * sizeof(uint32_t);
// Attempt to allocate outside the heap first.
- supervisor_cache = allocate_memory(table_size + SPI_FLASH_ERASE_SIZE, false);
+ supervisor_cache = allocate_memory(table_size + SPI_FLASH_ERASE_SIZE, false, false);
if (supervisor_cache != NULL) {
MP_STATE_VM(flash_ram_cache) = (uint8_t **) supervisor_cache->ptr;
uint8_t* page_start = (uint8_t *) supervisor_cache->ptr + table_size;
diff --git a/supervisor/shared/memory.c b/supervisor/shared/memory.c
index 0f96ae273..480c322b0 100755
--- a/supervisor/shared/memory.c
+++ b/supervisor/shared/memory.c
@@ -27,78 +27,111 @@
#include "supervisor/memory.h"
#include "supervisor/port.h"
-#include <stddef.h>
+#include <string.h>
+#include "py/gc.h"
#include "supervisor/shared/display.h"
-#define CIRCUITPY_SUPERVISOR_ALLOC_COUNT (12)
-
-// Using a zero length to mark an unused allocation makes the code a bit shorter (but makes it
-// impossible to support zero-length allocations).
-#define FREE 0
+enum {
+ CIRCUITPY_SUPERVISOR_IMMOVABLE_ALLOC_COUNT =
+ // stack + heap
+ 2
+#ifdef EXTERNAL_FLASH_DEVICES
+ + 1
+#endif
+#if CIRCUITPY_USB_MIDI
+ + 1
+#endif
+ ,
+ CIRCUITPY_SUPERVISOR_MOVABLE_ALLOC_COUNT =
+ 0
+#if CIRCUITPY_DISPLAYIO
+ #if CIRCUITPY_TERMINALIO
+ + 1
+ #endif
+ + CIRCUITPY_DISPLAY_LIMIT * (
+ // Maximum needs of one display: max(4 if RGBMATRIX, 1 if SHARPDISPLAY, 0)
+ #if CIRCUITPY_RGBMATRIX
+ 4
+ #elif CIRCUITPY_SHARPDISPLAY
+ 1
+ #else
+ 0
+ #endif
+ )
+#endif
+ ,
+ CIRCUITPY_SUPERVISOR_ALLOC_COUNT = CIRCUITPY_SUPERVISOR_IMMOVABLE_ALLOC_COUNT + CIRCUITPY_SUPERVISOR_MOVABLE_ALLOC_COUNT
+};
// The lowest two bits of a valid length are always zero, so we can use them to mark an allocation
-// as freed by the client but not yet reclaimed into the FREE middle.
+// as a hole (freed by the client but not yet reclaimed into the free middle) and as movable.
+#define FLAGS 3
#define HOLE 1
+#define MOVABLE 2
static supervisor_allocation allocations[CIRCUITPY_SUPERVISOR_ALLOC_COUNT];
-// We use uint32_t* to ensure word (4 byte) alignment.
-uint32_t* low_address;
-uint32_t* high_address;
+supervisor_allocation* old_allocations;
-void memory_init(void) {
- low_address = port_heap_get_bottom();
- high_address = port_heap_get_top();
-}
+typedef struct _supervisor_allocation_node {
+ struct _supervisor_allocation_node* next;
+ size_t length;
+ // We use uint32_t to ensure word (4 byte) alignment.
+ uint32_t data[];
+} supervisor_allocation_node;
+
+supervisor_allocation_node* low_head;
+supervisor_allocation_node* high_head;
+
+// Intermediate (void*) is to suppress -Wcast-align warning. Alignment will always be correct
+// because this only reverses how (alloc)->ptr was obtained as &(node->data[0]).
+#define ALLOCATION_NODE(alloc) ((supervisor_allocation_node*)(void*)((char*)((alloc)->ptr) - sizeof(supervisor_allocation_node)))
void free_memory(supervisor_allocation* allocation) {
- if (allocation == NULL) {
+ if (allocation == NULL || allocation->ptr == NULL) {
return;
}
- int32_t index = 0;
- bool found = false;
- for (index = 0; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index++) {
- found = allocation == &allocations[index];
- if (found) {
- break;
- }
+ supervisor_allocation_node* node = ALLOCATION_NODE(allocation);
+ if (node == low_head) {
+ do {
+ low_head = low_head->next;
+ } while (low_head != NULL && (low_head->length & HOLE));
}
- if (!found) {
- // Bad!
- // TODO(tannewt): Add a way to escape into safe mode on error.
+ else if (node == high_head) {
+ do {
+ high_head = high_head->next;
+ } while (high_head != NULL && (high_head->length & HOLE));
}
- if (allocation->ptr == high_address) {
- high_address += allocation->length / 4;
- allocation->length = FREE;
- for (index++; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index++) {
- if (!(allocations[index].length & HOLE)) {
- break;
- }
- // Division automatically shifts out the HOLE bit.
- high_address += allocations[index].length / 4;
- allocations[index].length = FREE;
+ else {
+ // Check if it's in the list of embedded allocations.
+ supervisor_allocation_node** emb = &MP_STATE_VM(first_embedded_allocation);
+ while (*emb != NULL && *emb != node) {
+ emb = &((*emb)->next);
}
- } else if (allocation->ptr + allocation->length / 4 == low_address) {
- low_address = allocation->ptr;
- allocation->length = FREE;
- for (index--; index >= 0; index--) {
- if (!(allocations[index].length & HOLE)) {
- break;
- }
- low_address -= allocations[index].length / 4;
- allocations[index].length = FREE;
+ if (*emb != NULL) {
+ // Found, remove it from the list.
+ *emb = node->next;
+ m_free(node
+#if MICROPY_MALLOC_USES_ALLOCATED_SIZE
+ , sizeof(supervisor_allocation_node) + (node->length & ~FLAGS)
+#endif
+ );
+ }
+ else {
+ // Else it must be within the low or high ranges and becomes a hole.
+ node->length = ((node->length & ~FLAGS) | HOLE);
}
- } else {
- // Freed memory isn't in the middle so skip updating bounds. The memory will be added to the
- // middle when the memory to the inside is freed. We still need its length, but setting
- // only the lowest bit is nondestructive.
- allocation->length |= HOLE;
}
+ allocation->ptr = NULL;
}
supervisor_allocation* allocation_from_ptr(void *ptr) {
+ // When called from the context of supervisor_move_memory() (old_allocations != NULL), search
+ // by old pointer to give clients a way of mapping from old to new pointer. But not if
+ // ptr == NULL, then the caller wants an allocation whose current ptr is NULL.
+ supervisor_allocation* list = (old_allocations && ptr) ? old_allocations : &allocations[0];
for (size_t index = 0; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index++) {
- if (allocations[index].ptr == ptr) {
+ if (list[index].ptr == ptr) {
return &allocations[index];
}
}
@@ -106,50 +139,182 @@ supervisor_allocation* allocation_from_ptr(void *ptr) {
}
supervisor_allocation* allocate_remaining_memory(void) {
- if (low_address == high_address) {
- return NULL;
+ return allocate_memory((uint32_t)-1, false, false);
+}
+
+static supervisor_allocation_node* find_hole(supervisor_allocation_node* node, size_t length) {
+ for (; node != NULL; node = node->next) {
+ if (node->length == (length | HOLE)) {
+ break;
+ }
}
- return allocate_memory((high_address - low_address) * 4, false);
+ return node;
}
-supervisor_allocation* allocate_memory(uint32_t length, bool high) {
+static supervisor_allocation_node* allocate_memory_node(uint32_t length, bool high, bool movable) {
+ if (CIRCUITPY_SUPERVISOR_MOVABLE_ALLOC_COUNT == 0) {
+ assert(!movable);
+ }
+ // supervisor_move_memory() currently does not support movable allocations on the high side, it
+ // must be extended first if this is ever needed.
+ assert(!(high && movable));
+ uint32_t* low_address = low_head ? low_head->data + low_head->length / 4 : port_heap_get_bottom();
+ uint32_t* high_address = high_head ? (uint32_t*)high_head : port_heap_get_top();
+ // Special case for allocate_remaining_memory(), avoids computing low/high_address twice.
+ if (length == (uint32_t)-1) {
+ length = (high_address - low_address) * 4 - sizeof(supervisor_allocation_node);
+ }
if (length == 0 || length % 4 != 0) {
return NULL;
}
- uint8_t index = 0;
- int8_t direction = 1;
- if (high) {
- index = CIRCUITPY_SUPERVISOR_ALLOC_COUNT - 1;
- direction = -1;
- }
- supervisor_allocation* alloc;
- for (; index < CIRCUITPY_SUPERVISOR_ALLOC_COUNT; index += direction) {
- alloc = &allocations[index];
- if (alloc->length == FREE && (high_address - low_address) * 4 >= (int32_t) length) {
- break;
+ // 1. Matching hole on the requested side?
+ supervisor_allocation_node* node = find_hole(high ? high_head : low_head, length);
+ if (!node) {
+ // 2. Enough free space in the middle?
+ if ((high_address - low_address) * 4 >= (int32_t)(sizeof(supervisor_allocation_node) + length)) {
+ if (high) {
+ high_address -= (sizeof(supervisor_allocation_node) + length) / 4;
+ node = (supervisor_allocation_node*)high_address;
+ node->next = high_head;
+ high_head = node;
+ }
+ else {
+ node = (supervisor_allocation_node*)low_address;
+ node->next = low_head;
+ low_head = node;
+ }
}
- // If a hole matches in length exactly, we can reuse it.
- if (alloc->length == (length | HOLE)) {
- alloc->length = length;
- return alloc;
+ else {
+ // 3. Matching hole on the other side?
+ node = find_hole(high ? low_head : high_head, length);
+ if (!node) {
+ // 4. GC allocation?
+ if (movable && gc_alloc_possible()) {
+ node = m_malloc_maybe(sizeof(supervisor_allocation_node) + length, true);
+ if (node) {
+ node->next = MP_STATE_VM(first_embedded_allocation);
+ MP_STATE_VM(first_embedded_allocation) = node;
+ }
+ }
+ if (!node) {
+ // 5. Give up.
+ return NULL;
+ }
+ }
}
}
- if (index >= CIRCUITPY_SUPERVISOR_ALLOC_COUNT) {
+ node->length = length;
+ if (movable) {
+ node->length |= MOVABLE;
+ }
+ return node;
+}
+
+supervisor_allocation* allocate_memory(uint32_t length, bool high, bool movable) {
+ supervisor_allocation_node* node = allocate_memory_node(length, high, movable);
+ if (!node) {
return NULL;
}
- if (high) {
- high_address -= length / 4;
- alloc->ptr = high_address;
- } else {
- alloc->ptr = low_address;
- low_address += length / 4;
+ // Find the first free allocation.
+ supervisor_allocation* alloc = allocation_from_ptr(NULL);
+ if (!alloc) {
+ // We should free node again to avoid leaking, but something is wrong anyway if clients try
+ // to make more allocations than available, so don't bother.
+ return NULL;
}
- alloc->length = length;
+ alloc->ptr = &(node->data[0]);
return alloc;
}
+size_t get_allocation_length(supervisor_allocation* allocation) {
+ return ALLOCATION_NODE(allocation)->length & ~FLAGS;
+}
+
void supervisor_move_memory(void) {
+ // This whole function is not needed when there are no movable allocations, let it be optimized
+ // out.
+ if (CIRCUITPY_SUPERVISOR_MOVABLE_ALLOC_COUNT == 0) {
+ return;
+ }
+ // This must be called exactly after freeing the heap, so that the embedded allocations, if any,
+ // are now in the free region.
+ assert(MP_STATE_VM(first_embedded_allocation) == NULL || (low_head < MP_STATE_VM(first_embedded_allocation) && MP_STATE_VM(first_embedded_allocation) < high_head));
+
+ // Save the old pointers for allocation_from_ptr().
+ supervisor_allocation old_allocations_array[CIRCUITPY_SUPERVISOR_ALLOC_COUNT];
+ memcpy(old_allocations_array, allocations, sizeof(allocations));
+
+ // Compact the low side. Traverse the list repeatedly, finding movable allocations preceded by a
+ // hole and swapping them, until no more are found. This is not the most runtime-efficient way,
+ // but probably the shortest and simplest code.
+ bool acted;
+ do {
+ acted = false;
+ supervisor_allocation_node** nodep = &low_head;
+ while (*nodep != NULL && (*nodep)->next != NULL) {
+ if (((*nodep)->length & MOVABLE) && ((*nodep)->next->length & HOLE)) {
+ supervisor_allocation_node* oldnode = *nodep;
+ supervisor_allocation_node* start = oldnode->next;
+ supervisor_allocation* alloc = allocation_from_ptr(&(oldnode->data[0]));
+ assert(alloc != NULL);
+ alloc->ptr = &(start->data[0]);
+ oldnode->next = start->next;
+ size_t holelength = start->length;
+ size_t size = sizeof(supervisor_allocation_node) + (oldnode->length & ~FLAGS);
+ memmove(start, oldnode, size);
+ supervisor_allocation_node* newhole = (supervisor_allocation_node*)(void*)((char*)start + size);
+ newhole->next = start;
+ newhole->length = holelength;
+ *nodep = newhole;
+ acted = true;
+ }
+ nodep = &((*nodep)->next);
+ }
+ } while (acted);
+ // Any holes bubbled to the top can be absorbed into the free middle.
+ while (low_head != NULL && (low_head->length & HOLE)) {
+ low_head = low_head->next;
+ };
+
+ // Don't bother compacting the high side, there are no movable allocations and no holes there in
+ // current usage.
+
+ // Promote the embedded allocations to top-level ones, compacting them at the beginning of the
+ // now free region (or possibly in matching holes).
+ // The linked list is unordered, but allocations must be processed in order to avoid risking
+ // overwriting each other. To that end, repeatedly find the lowest element of the list, remove
+ // it from the list, and process it. This ad-hoc selection sort results in substantially shorter
+ // code than using the qsort() function from the C library.
+ while (MP_STATE_VM(first_embedded_allocation)) {
+ // First element is first candidate.
+ supervisor_allocation_node** pminnode = &MP_STATE_VM(first_embedded_allocation);
+ // Iterate from second element (if any) on.
+ for (supervisor_allocation_node** pnode = &(MP_STATE_VM(first_embedded_allocation)->next); *pnode != NULL; pnode = &(*pnode)->next) {
+ if (*pnode < *pminnode) {
+ pminnode = pnode;
+ }
+ }
+ // Remove from list.
+ supervisor_allocation_node* node = *pminnode;
+ *pminnode = node->next;
+ // Process.
+ size_t length = (node->length & ~FLAGS);
+ supervisor_allocation* alloc = allocation_from_ptr(&(node->data[0]));
+ assert(alloc != NULL);
+ // This may overwrite the header of node if it happened to be there already, but not the
+ // data.
+ supervisor_allocation_node* new_node = allocate_memory_node(length, false, true);
+ // There must be enough free space.
+ assert(new_node != NULL);
+ memmove(&(new_node->data[0]), &(node->data[0]), length);
+ alloc->ptr = &(new_node->data[0]);
+ }
+
+ // Notify clients that their movable allocations may have moved.
+ old_allocations = &old_allocations_array[0];
#if CIRCUITPY_DISPLAYIO
supervisor_display_move_memory();
#endif
+ // Add calls to further clients here.
+ old_allocations = NULL;
}
diff --git a/supervisor/shared/serial.c b/supervisor/shared/serial.c
index 91e90671d..7383cc228 100644
--- a/supervisor/shared/serial.c
+++ b/supervisor/shared/serial.c
@@ -47,8 +47,6 @@ busio_uart_obj_t debug_uart;
byte buf_array[64];
#endif
-volatile bool _serial_connected;
-
void serial_early_init(void) {
#if defined(DEBUG_UART_TX) && defined(DEBUG_UART_RX)
debug_uart.base.type = &busio_uart_type;
@@ -71,7 +69,9 @@ bool serial_connected(void) {
#if defined(DEBUG_UART_TX) && defined(DEBUG_UART_RX)
return true;
#else
- return _serial_connected;
+ // True if DTR is asserted, and the USB connection is up.
+ // tud_cdc_get_line_state(): bit 0 is DTR, bit 1 is RTS
+ return (tud_cdc_get_line_state() & 1) && tud_ready();
#endif
}
diff --git a/supervisor/shared/stack.c b/supervisor/shared/stack.c
index e7aa956b0..afea20401 100755
--- a/supervisor/shared/stack.c
+++ b/supervisor/shared/stack.c
@@ -34,36 +34,42 @@
extern uint32_t _estack;
+// Requested size.
static uint32_t next_stack_size = CIRCUITPY_DEFAULT_STACK_SIZE;
static uint32_t current_stack_size = 0;
-supervisor_allocation* stack_alloc = NULL;
+// Actual location and size, may be larger than requested.
+static uint32_t* stack_limit = NULL;
+static size_t stack_length = 0;
#define EXCEPTION_STACK_SIZE 1024
void allocate_stack(void) {
- if (port_fixed_stack() != NULL) {
- stack_alloc = port_fixed_stack();
- current_stack_size = stack_alloc->length;
+ if (port_has_fixed_stack()) {
+ stack_limit = port_stack_get_limit();
+ stack_length = (port_stack_get_top() - stack_limit)*sizeof(uint32_t);
+ current_stack_size = stack_length;
} else {
mp_uint_t regs[10];
mp_uint_t sp = cpu_get_regs_and_sp(regs);
mp_uint_t c_size = (uint32_t) port_stack_get_top() - sp;
- stack_alloc = allocate_memory(c_size + next_stack_size + EXCEPTION_STACK_SIZE, true);
+ supervisor_allocation* stack_alloc = allocate_memory(c_size + next_stack_size + EXCEPTION_STACK_SIZE, true, false);
if (stack_alloc == NULL) {
- stack_alloc = allocate_memory(c_size + CIRCUITPY_DEFAULT_STACK_SIZE + EXCEPTION_STACK_SIZE, true);
+ stack_alloc = allocate_memory(c_size + CIRCUITPY_DEFAULT_STACK_SIZE + EXCEPTION_STACK_SIZE, true, false);
current_stack_size = CIRCUITPY_DEFAULT_STACK_SIZE;
} else {
current_stack_size = next_stack_size;
}
+ stack_limit = stack_alloc->ptr;
+ stack_length = get_allocation_length(stack_alloc);
}
- *stack_alloc->ptr = STACK_CANARY_VALUE;
+ *stack_limit = STACK_CANARY_VALUE;
}
inline bool stack_ok(void) {
- return stack_alloc == NULL || *stack_alloc->ptr == STACK_CANARY_VALUE;
+ return stack_limit == NULL || *stack_limit == STACK_CANARY_VALUE;
}
inline void assert_heap_ok(void) {
@@ -77,18 +83,26 @@ void stack_init(void) {
}
void stack_resize(void) {
- if (stack_alloc == NULL) {
+ if (stack_limit == NULL) {
return;
}
if (next_stack_size == current_stack_size) {
- *stack_alloc->ptr = STACK_CANARY_VALUE;
+ *stack_limit = STACK_CANARY_VALUE;
return;
}
- free_memory(stack_alloc);
- stack_alloc = NULL;
+ free_memory(allocation_from_ptr(stack_limit));
+ stack_limit = NULL;
allocate_stack();
}
+uint32_t* stack_get_bottom(void) {
+ return stack_limit;
+}
+
+size_t stack_get_length(void) {
+ return stack_length;
+}
+
void set_next_stack_size(uint32_t size) {
next_stack_size = size;
}
diff --git a/supervisor/shared/stack.h b/supervisor/shared/stack.h
index 7096f0b3e..1c75de5f7 100755
--- a/supervisor/shared/stack.h
+++ b/supervisor/shared/stack.h
@@ -31,10 +31,12 @@
#include "supervisor/memory.h"
-extern supervisor_allocation* stack_alloc;
-
void stack_init(void);
void stack_resize(void);
+// Actual stack location and size, may be larger than requested.
+uint32_t* stack_get_bottom(void);
+size_t stack_get_length(void);
+// Next/current requested stack size.
void set_next_stack_size(uint32_t size);
uint32_t get_current_stack_size(void);
bool stack_ok(void);
diff --git a/supervisor/shared/usb/usb.c b/supervisor/shared/usb/usb.c
index 89fbf56f3..93d3436e9 100644
--- a/supervisor/shared/usb/usb.c
+++ b/supervisor/shared/usb/usb.c
@@ -116,7 +116,6 @@ void tud_umount_cb(void) {
// remote_wakeup_en : if host allows us to perform remote wakeup
// USB Specs: Within 7ms, device must draw an average current less than 2.5 mA from bus
void tud_suspend_cb(bool remote_wakeup_en) {
- _serial_connected = false;
}
// Invoked when usb bus is resumed
@@ -128,8 +127,6 @@ void tud_resume_cb(void) {
void tud_cdc_line_state_cb(uint8_t itf, bool dtr, bool rts) {
(void) itf; // interface ID, not used
- _serial_connected = dtr;
-
// DTR = false is counted as disconnected
if ( !dtr )
{
diff --git a/supervisor/shared/usb/usb_msc_flash.c b/supervisor/shared/usb/usb_msc_flash.c
index 7532b6aea..b39f60dcd 100644
--- a/supervisor/shared/usb/usb_msc_flash.c
+++ b/supervisor/shared/usb/usb_msc_flash.c
@@ -39,7 +39,7 @@
#define MSC_FLASH_BLOCK_SIZE 512
-static bool ejected[1] = {true};
+static bool ejected[1] = {false};
void usb_msc_mount(void) {
// Reset the ejection tracking every time we're plugged into USB. This allows for us to battery
diff --git a/tools/build_board_info.py b/tools/build_board_info.py
index f83282ea9..ce9d45fe2 100644
--- a/tools/build_board_info.py
+++ b/tools/build_board_info.py
@@ -19,20 +19,24 @@ import shared_bindings_matrix
sys.path.append("adabot")
import adabot.github_requests as github
-SUPPORTED_PORTS = ["atmel-samd", "cxd56", "esp32s2", "litex", "mimxrt10xx", "nrf", "stm"]
-
-BIN = ('bin',)
-UF2 = ('uf2',)
-BIN_UF2 = ('bin', 'uf2')
-HEX = ('hex',)
-HEX_UF2 = ('hex', 'uf2')
-SPK = ('spk',)
-DFU = ('dfu',)
-BIN_DFU = ('bin', 'dfu')
-
-# Example:
-# https://downloads.circuitpython.org/bin/trinket_m0/en_US/adafruit-circuitpython-trinket_m0-en_US-5.0.0-rc.0.uf2
-DOWNLOAD_BASE_URL = "https://downloads.circuitpython.org/bin"
+SUPPORTED_PORTS = [
+ "atmel-samd",
+ "cxd56",
+ "esp32s2",
+ "litex",
+ "mimxrt10xx",
+ "nrf",
+ "stm",
+]
+
+BIN = ("bin",)
+UF2 = ("uf2",)
+BIN_UF2 = ("bin", "uf2")
+HEX = ("hex",)
+HEX_UF2 = ("hex", "uf2")
+SPK = ("spk",)
+DFU = ("dfu",)
+BIN_DFU = ("bin", "dfu")
# Default extensions
extension_by_port = {
@@ -42,7 +46,7 @@ extension_by_port = {
"cxd56": SPK,
"mimxrt10xx": HEX_UF2,
"litex": DFU,
- "esp32s2": BIN_UF2
+ "esp32s2": BIN_UF2,
}
# Per board overrides
@@ -57,26 +61,28 @@ extension_by_board = {
"feather_m0_rfm69": BIN_UF2,
"feather_m0_rfm9x": BIN_UF2,
"uchip": BIN_UF2,
-
# nRF52840 dev kits that may not have UF2 bootloaders,
"makerdiary_nrf52840_mdk": HEX,
"makerdiary_nrf52840_mdk_usb_dongle": HEX_UF2,
"pca10056": BIN_UF2,
"pca10059": BIN_UF2,
"electronut_labs_blip": HEX,
-
# stm32
- "meowbit_v121": UF2
+ "meowbit_v121": UF2,
}
aliases_by_board = {
- "circuitplayground_express": ["circuitplayground_express_4h", "circuitplayground_express_digikey_pycon2019"],
+ "circuitplayground_express": [
+ "circuitplayground_express_4h",
+ "circuitplayground_express_digikey_pycon2019",
+ ],
"pybadge": ["edgebadge"],
"pyportal": ["pyportal_pynt"],
"gemma_m0": ["gemma_m0_pycon2018"],
- "pewpew10": ["pewpew13"]
+ "pewpew10": ["pewpew13"],
}
+
def get_languages():
languages = []
for f in os.scandir("../locale"):
@@ -84,6 +90,7 @@ def get_languages():
languages.append(f.name[:-3])
return languages
+
def get_board_mapping():
boards = {}
for port in SUPPORTED_PORTS:
@@ -95,23 +102,30 @@ def get_board_mapping():
extensions = extension_by_port[port]
extensions = extension_by_board.get(board_path.name, extensions)
aliases = aliases_by_board.get(board_path.name, [])
- boards[board_id] = {"port": port,
- "extensions": extensions,
- "download_count": 0,
- "aliases": aliases}
+ boards[board_id] = {
+ "port": port,
+ "extensions": extensions,
+ "download_count": 0,
+ "aliases": aliases,
+ }
for alias in aliases:
- boards[alias] = {"port": port,
- "extensions": extensions,
- "download_count": 0,
- "alias": True,
- "aliases": []}
+ boards[alias] = {
+ "port": port,
+ "extensions": extensions,
+ "download_count": 0,
+ "alias": True,
+ "aliases": [],
+ }
return boards
+
def get_version_info():
version = None
sha = git("rev-parse", "--short", "HEAD").stdout.decode("utf-8")
try:
- version = git("describe", "--tags", "--exact-match").stdout.decode("utf-8").strip()
+ version = (
+ git("describe", "--tags", "--exact-match").stdout.decode("utf-8").strip()
+ )
except sh.ErrorReturnCode_128:
# No exact match
pass
@@ -120,10 +134,11 @@ def get_version_info():
sha = os.environ["GITHUB_SHA"]
if not version:
- version="{}-{}".format(date.today().strftime("%Y%m%d"), sha[:7])
+ version = "{}-{}".format(date.today().strftime("%Y%m%d"), sha[:7])
return sha, version
+
def get_current_info():
response = github.get("/repos/adafruit/circuitpython-org/git/refs/heads/master")
if not response.ok:
@@ -131,7 +146,9 @@ def get_current_info():
raise RuntimeError("cannot get master sha")
commit_sha = response.json()["object"]["sha"]
- response = github.get("/repos/adafruit/circuitpython-org/contents/_data/files.json?ref=" + commit_sha)
+ response = github.get(
+ "/repos/adafruit/circuitpython-org/contents/_data/files.json?ref=" + commit_sha
+ )
if not response.ok:
print(response.text)
raise RuntimeError("cannot get previous files.json")
@@ -145,6 +162,7 @@ def get_current_info():
current_info[info["id"]] = info
return git_info, current_info
+
def create_pr(changes, updated, git_info, user):
commit_sha, original_blob_sha = git_info
branch_name = "new_release_" + changes["new_release"]
@@ -158,7 +176,7 @@ def create_pr(changes, updated, git_info, user):
updated_list.append(info)
updated = json.dumps(updated_list, sort_keys=True, indent=1).encode("utf-8") + b"\n"
- #print(updated.decode("utf-8"))
+ # print(updated.decode("utf-8"))
pr_title = "Automated website update for release {}".format(changes["new_release"])
boards = ""
if changes["new_boards"]:
@@ -167,16 +185,13 @@ def create_pr(changes, updated, git_info, user):
if changes["new_languages"]:
languages = "New languages:\n* " + "\n* ".join(changes["new_languages"])
message = "Automated website update for release {} by Blinka.\n\n{}\n\n{}\n".format(
- changes["new_release"],
- boards,
- languages
+ changes["new_release"], boards, languages
)
- create_branch = {
- "ref": "refs/heads/" + branch_name,
- "sha": commit_sha
- }
- response = github.post("/repos/{}/circuitpython-org/git/refs".format(user), json=create_branch)
+ create_branch = {"ref": "refs/heads/" + branch_name, "sha": commit_sha}
+ response = github.post(
+ "/repos/{}/circuitpython-org/git/refs".format(user), json=create_branch
+ )
if not response.ok and response.json()["message"] != "Reference already exists":
print("unable to create branch")
print(response.text)
@@ -186,10 +201,13 @@ def create_pr(changes, updated, git_info, user):
"message": message,
"content": base64.b64encode(updated).decode("utf-8"),
"sha": original_blob_sha,
- "branch": branch_name
+ "branch": branch_name,
}
- response = github.put("/repos/{}/circuitpython-org/contents/_data/files.json".format(user), json=update_file)
+ response = github.put(
+ "/repos/{}/circuitpython-org/contents/_data/files.json".format(user),
+ json=update_file,
+ )
if not response.ok:
print("unable to post new file")
print(response.text)
@@ -199,7 +217,7 @@ def create_pr(changes, updated, git_info, user):
"head": user + ":" + branch_name,
"base": "master",
"body": message,
- "maintainer_can_modify": True
+ "maintainer_can_modify": True,
}
response = github.post("/repos/adafruit/circuitpython-org/pulls", json=pr_info)
if not response.ok:
@@ -220,17 +238,14 @@ def print_active_user():
print("Not logged in")
return None
+
def generate_download_info():
boards = {}
errors = []
new_tag = os.environ["RELEASE_TAG"]
- changes = {
- "new_release": new_tag,
- "new_boards": [],
- "new_languages": []
- }
+ changes = {"new_release": new_tag, "new_boards": [], "new_languages": []}
user = print_active_user()
@@ -254,8 +269,9 @@ def generate_download_info():
info = current_info[board]
for version in info["versions"]:
previous_releases.add(version["version"])
- previous_languages.update(version["files"].keys())
- if version["stable"] == new_stable:
+ if version["stable"] == new_stable or (
+ new_stable and version["version"].startswith(this_version)
+ ):
info["versions"].remove(version)
board_mapping = get_board_mapping()
@@ -272,29 +288,15 @@ def generate_download_info():
alias_info = board_mapping[alias]
if alias not in current_info:
changes["new_boards"].append(alias)
- current_info[alias] = {"downloads": 0,
- "versions": []}
+ current_info[alias] = {"downloads": 0, "versions": []}
new_version = {
"stable": new_stable,
"version": new_tag,
"modules": support_matrix.get(alias, "[]"),
- "files": {},
"languages": languages,
- "extensions": board_info["extensions"]
+ "extensions": board_info["extensions"],
}
- for language in languages:
- files = []
- new_version["files"][language] = files
- for extension in board_info["extensions"]:
- files.append(
- "{base_url}/{alias}/{language}/adafruit-circuitpython-{alias}-{language}-{tag}.{extension}"
- .format(
- base_url=DOWNLOAD_BASE_URL,
- tag=new_tag,
- alias=alias,
- language=language,
- extension=extension))
current_info[alias]["downloads"] = alias_info["download_count"]
current_info[alias]["versions"].append(new_version)
@@ -305,6 +307,7 @@ def generate_download_info():
else:
print("No new release to update")
+
if __name__ == "__main__":
if "RELEASE_TAG" in os.environ and os.environ["RELEASE_TAG"]:
generate_download_info()
diff --git a/tools/extract_pyi.py b/tools/extract_pyi.py
index 651216e11..b7ce584a1 100644
--- a/tools/extract_pyi.py
+++ b/tools/extract_pyi.py
@@ -17,7 +17,8 @@ import black
IMPORTS_IGNORE = frozenset({'int', 'float', 'bool', 'str', 'bytes', 'tuple', 'list', 'set', 'dict', 'bytearray', 'slice', 'file', 'buffer', 'range', 'array', 'struct_time'})
-IMPORTS_TYPING = frozenset({'Any', 'Optional', 'Union', 'Tuple', 'List', 'Sequence', 'NamedTuple', 'Iterable', 'Iterator', 'Callable', 'AnyStr', 'overload'})
+IMPORTS_TYPING = frozenset({'Any', 'Optional', 'Union', 'Tuple', 'List', 'Sequence', 'NamedTuple', 'Iterable', 'Iterator', 'Callable', 'AnyStr', 'overload', 'Type'})
+IMPORTS_TYPES = frozenset({'TracebackType'})
CPY_TYPING = frozenset({'ReadableBuffer', 'WriteableBuffer', 'AudioSample', 'FrameBuffer'})
@@ -63,6 +64,7 @@ def find_stub_issues(tree):
def extract_imports(tree):
modules = set()
typing = set()
+ types = set()
cpy_typing = set()
def collect_annotations(anno_tree):
@@ -74,6 +76,8 @@ def extract_imports(tree):
continue
elif node.id in IMPORTS_TYPING:
typing.add(node.id)
+ elif node.id in IMPORTS_TYPES:
+ types.add(node.id)
elif node.id in CPY_TYPING:
cpy_typing.add(node.id)
elif isinstance(node, ast.Attribute):
@@ -94,6 +98,7 @@ def extract_imports(tree):
return {
"modules": sorted(modules),
"typing": sorted(typing),
+ "types": sorted(types),
"cpy_typing": sorted(cpy_typing),
}
@@ -181,6 +186,8 @@ def convert_folder(top_level, stub_directory):
# Add import statements
imports = extract_imports(tree)
import_lines = ["from __future__ import annotations"]
+ if imports["types"]:
+ import_lines.append("from types import " + ", ".join(imports["types"]))
if imports["typing"]:
import_lines.append("from typing import " + ", ".join(imports["typing"]))
if imports["cpy_typing"]: