diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 41b52e3d0f..9899972ebd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -43,6 +43,32 @@ jobs: run: | gcc --version python3 --version + - name: Translations + run: make check-translate + - name: New boards check + run: python3 -u ci_new_boards_check.py + working-directory: tools + - name: Duplicate USB VID/PID Check + run: python3 -u -m tools.ci_check_duplicate_usb_vid_pid + - name: Build and Validate Stubs + run: make check-stubs -j2 + - uses: actions/upload-artifact@v2 + with: + name: stubs + path: circuitpython-stubs* + - name: Test Documentation Build (HTML) + run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html + - uses: actions/upload-artifact@v2 + with: + name: docs + path: _build/html + - name: Test Documentation Build (LaTeX/PDF) + run: | + make latexpdf + - uses: actions/upload-artifact@v2 + with: + name: docs + path: _build/latex - name: Build mpy-cross run: make -C mpy-cross -j2 - name: Build unix port @@ -68,32 +94,6 @@ 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: Build and Validate Stubs - run: make check-stubs -j2 - - uses: actions/upload-artifact@v2 - with: - name: stubs - path: circuitpython-stubs* - - name: Test Documentation Build (HTML) - run: sphinx-build -E -W -b html -D version=${{ env.CP_VERSION }} -D release=${{ env.CP_VERSION }} . _build/html - - uses: actions/upload-artifact@v2 - with: - name: docs - path: _build/html - - name: Test Documentation Build (LaTeX/PDF) - run: | - make latexpdf - - uses: actions/upload-artifact@v2 - with: - name: docs - path: _build/latex - - name: Translations - run: make check-translate - - name: New boards check - run: python3 -u ci_new_boards_check.py - working-directory: tools - - name: Duplicate USB VID/PID Check - run: python3 -u -m tools.ci_check_duplicate_usb_vid_pid - name: Build mpy-cross.static-raspbian run: make -C mpy-cross -j2 -f Makefile.static-raspbian - uses: actions/upload-artifact@v2 @@ -185,6 +185,7 @@ jobs: - "arduino_nano_33_iot" - "arduino_zero" - "bast_pro_mini_m0" + - "bastble" - "bdmicro_vina_d21" - "bdmicro_vina_d51" - "bless_dev_board_multi_sensor" @@ -260,6 +261,7 @@ jobs: - "monster_m4sk" - "ndgarage_ndbit6" - "ndgarage_ndbit6_v2" + - "neopixel_trinkey_m0" - "nfc_copy_cat" - "nice_nano" - "nucleo_f746zg" @@ -430,6 +432,8 @@ jobs: fail-fast: false matrix: board: + - "adafruit_feather_esp32s2_nopsram" + - "adafruit_feather_esp32s2_tftback_nopsram" - "adafruit_magtag_2.9_grayscale" - "adafruit_metro_esp32s2" - "electroniccats_bastwifi" diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 8caf56d268..af62072c89 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -15,6 +15,10 @@ jobs: steps: - uses: actions/checkout@v1 - uses: actions/setup-python@v1 + - name: Install deps + run: sudo apt-get update && sudo apt-get install -y gettext + - name: Populate selected submodules + run: git submodule update --init extmod/ulab - name: set PY run: echo >>$GITHUB_ENV PY="$(python -c 'import hashlib, sys;print(hashlib.sha256(sys.version.encode()+sys.executable.encode()).hexdigest())')" - uses: actions/cache@v1 diff --git a/.gitmodules b/.gitmodules index d36613d604..b74cd0b30d 100644 --- a/.gitmodules +++ b/.gitmodules @@ -152,7 +152,7 @@ url = https://github.com/adafruit/Adafruit_CircuitPython_RFM69.git [submodule "ports/esp32s2/esp-idf"] path = ports/esp32s2/esp-idf - url = https://github.com/jepler/esp-idf.git + url = https://github.com/adafruit/esp-idf.git [submodule "ports/esp32s2/certificates/nina-fw"] path = ports/esp32s2/certificates/nina-fw url = https://github.com/adafruit/nina-fw.git diff --git a/Makefile b/Makefile index a1807c308f..adb206d7bc 100644 --- a/Makefile +++ b/Makefile @@ -222,7 +222,7 @@ pseudoxml: all-source: locale/circuitpython.pot: all-source - find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o circuitpython.pot -p locale + find $(TRANSLATE_SOURCES) -type d \( $(TRANSLATE_SOURCES_EXC) \) -prune -o -type f \( -iname "*.c" -o -iname "*.h" \) -print | (LC_ALL=C sort) | xgettext -f- -L C -s --add-location=file --keyword=translate -o - | sed -e '/"POT-Creation-Date: /d' > $@ # Historically, `make translate` updated the .pot file and ran msgmerge. # However, this was a frequent source of merge conflicts. Weblate can perform diff --git a/conf.py b/conf.py index 1a90b617b8..590e5bc2c5 100644 --- a/conf.py +++ b/conf.py @@ -276,7 +276,7 @@ html_static_path = ['docs/static'] # Add any extra paths that contain custom files (such as robots.txt or # .htaccess) here, relative to this directory. These files are copied # directly to the root of the documentation. -#html_extra_path = [] +html_extra_path = ["docs/robots.txt"] # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, # using the given strftime format. diff --git a/docs/robots.txt b/docs/robots.txt new file mode 100644 index 0000000000..ad3189d42c --- /dev/null +++ b/docs/robots.txt @@ -0,0 +1,6 @@ +User-agent: * +Allow: /*/latest/ +Allow: /en/latest/ # Fallback for bots that don't understand wildcards +Allow: /*/6.0.x/ +Allow: /en/6.0.x/ # Fallback for bots that don't understand wildcards +Disallow: / diff --git a/extmod/ulab b/extmod/ulab index aa7e741530..d62d07ea0b 160000 --- a/extmod/ulab +++ b/extmod/ulab @@ -1 +1 @@ -Subproject commit aa7e741530df471d206a4a321823a37a913a0eb8 +Subproject commit d62d07ea0b9597535428ebe6012da6b0d6608bf9 diff --git a/frozen/Adafruit_CircuitPython_BLE b/frozen/Adafruit_CircuitPython_BLE index 41f7a3530d..8bb1210eeb 160000 --- a/frozen/Adafruit_CircuitPython_BLE +++ b/frozen/Adafruit_CircuitPython_BLE @@ -1 +1 @@ -Subproject commit 41f7a3530d4cacdbf668399d3a015ea29c7e169b +Subproject commit 8bb1210eebed4846dae7e76ff1db86a010b132bc diff --git a/frozen/Adafruit_CircuitPython_DRV2605 b/frozen/Adafruit_CircuitPython_DRV2605 index 209edd164e..ce30b04a3c 160000 --- a/frozen/Adafruit_CircuitPython_DRV2605 +++ b/frozen/Adafruit_CircuitPython_DRV2605 @@ -1 +1 @@ -Subproject commit 209edd164eb640a8ced561a54505792fc99a67b9 +Subproject commit ce30b04a3c8e557d48a0607ddcb25272b196a433 diff --git a/frozen/Adafruit_CircuitPython_DS3231 b/frozen/Adafruit_CircuitPython_DS3231 index 5d81a9ea82..4f5dc66d50 160000 --- a/frozen/Adafruit_CircuitPython_DS3231 +++ b/frozen/Adafruit_CircuitPython_DS3231 @@ -1 +1 @@ -Subproject commit 5d81a9ea822a85e46be4a512ac44abf21e77d816 +Subproject commit 4f5dc66d50e43ca8d413ab0d86c125a7a13d394f diff --git a/frozen/Adafruit_CircuitPython_ESP32SPI b/frozen/Adafruit_CircuitPython_ESP32SPI index 01f3f6674b..fce466bd2b 160000 --- a/frozen/Adafruit_CircuitPython_ESP32SPI +++ b/frozen/Adafruit_CircuitPython_ESP32SPI @@ -1 +1 @@ -Subproject commit 01f3f6674b4493ba29b857e0f43deb69975736ec +Subproject commit fce466bd2bb70ca86b79e5cb36bbaca00afacfd1 diff --git a/frozen/Adafruit_CircuitPython_LIS3DH b/frozen/Adafruit_CircuitPython_LIS3DH index 9fe8f314c0..bea5d4a347 160000 --- a/frozen/Adafruit_CircuitPython_LIS3DH +++ b/frozen/Adafruit_CircuitPython_LIS3DH @@ -1 +1 @@ -Subproject commit 9fe8f314c032cee89b9ad7697d61e9cba76431ff +Subproject commit bea5d4a347aeece71a421ee292551264e3bf7ae2 diff --git a/frozen/Adafruit_CircuitPython_LSM6DS b/frozen/Adafruit_CircuitPython_LSM6DS index f1cc47f024..fee951908c 160000 --- a/frozen/Adafruit_CircuitPython_LSM6DS +++ b/frozen/Adafruit_CircuitPython_LSM6DS @@ -1 +1 @@ -Subproject commit f1cc47f024b27e670b9bf2a51c89e32f93c1b957 +Subproject commit fee951908cc5f1ba7db5edd2537fade09d626730 diff --git a/frozen/Adafruit_CircuitPython_Motor b/frozen/Adafruit_CircuitPython_Motor index 434e5b5346..608291801c 160000 --- a/frozen/Adafruit_CircuitPython_Motor +++ b/frozen/Adafruit_CircuitPython_Motor @@ -1 +1 @@ -Subproject commit 434e5b5346cb0a1a9eb15989b00278be87cb2ff1 +Subproject commit 608291801ce7112b280d32518de79993cc80963a diff --git a/frozen/Adafruit_CircuitPython_RFM9x b/frozen/Adafruit_CircuitPython_RFM9x index cfffc23378..4696e07638 160000 --- a/frozen/Adafruit_CircuitPython_RFM9x +++ b/frozen/Adafruit_CircuitPython_RFM9x @@ -1 +1 @@ -Subproject commit cfffc233784961929d722ea4e9acfe5786790609 +Subproject commit 4696e07638eff28392b57162d2a70e20473e97b7 diff --git a/frozen/Adafruit_CircuitPython_Register b/frozen/Adafruit_CircuitPython_Register index 6143ec2a96..dd7cc167c5 160000 --- a/frozen/Adafruit_CircuitPython_Register +++ b/frozen/Adafruit_CircuitPython_Register @@ -1 +1 @@ -Subproject commit 6143ec2a96a6d218041e9cab5968de26702d7bbf +Subproject commit dd7cc167c528a94a9feed81f9c52b5d372f68258 diff --git a/frozen/Adafruit_CircuitPython_Requests b/frozen/Adafruit_CircuitPython_Requests index 53902152c6..c070f6e8db 160000 --- a/frozen/Adafruit_CircuitPython_Requests +++ b/frozen/Adafruit_CircuitPython_Requests @@ -1 +1 @@ -Subproject commit 53902152c674b0ba31536b50291f7ddd28960f47 +Subproject commit c070f6e8dbc37757cbcb444269c6cd6a4b676647 diff --git a/frozen/Adafruit_CircuitPython_seesaw b/frozen/Adafruit_CircuitPython_seesaw index 88738da275..9d91ec849e 160000 --- a/frozen/Adafruit_CircuitPython_seesaw +++ b/frozen/Adafruit_CircuitPython_seesaw @@ -1 +1 @@ -Subproject commit 88738da275a83acabb14b7140d1c79b33cdc7b02 +Subproject commit 9d91ec849efb5fbc3d26d350a75a61f15d19bc48 diff --git a/lib/tinyusb b/lib/tinyusb index 218b80e63a..cfcffe94ce 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit 218b80e63ab6ff87c1851e403f08b3d716d68f5e +Subproject commit cfcffe94ce62f5ef1fb5aef4641924d64dc4b1c0 diff --git a/locale/ID.po b/locale/ID.po index dd9693f536..6aa4f0fba2 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-14 12:59-0500\n" -"PO-Revision-Date: 2020-10-10 23:51+0000\n" +"POT-Creation-Date: 2021-01-04 12:55-0600\n" +"PO-Revision-Date: 2021-01-03 05:29+0000\n" "Last-Translator: oon arfiandwi \n" "Language-Team: LANGUAGE \n" "Language: ID\n" @@ -14,15 +14,21 @@ 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-dev\n" +"X-Generator: Weblate 4.4.1-dev\n" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" msgstr "" "\n" -"Kode selesai berjalan. Menunggu memuat ulang.\n" +"Kode selesai beroperasi.\n" + +#: main.c +msgid "" +"\n" +"Code stopped by auto-reload.\n" +msgstr "" #: supervisor/shared/safe_mode.c msgid "" @@ -58,7 +64,7 @@ msgstr "pin alamat %d dan pin rgb %d menunjukkan tinggi %d, bukan %d" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" -msgstr "" +msgstr "%q gagal: %d" #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -74,7 +80,7 @@ msgstr "%q indeks di luar batas" #: py/obj.c msgid "%q indices must be integers, not %q" -msgstr "" +msgstr "%q indeks harus bilangan bulat, bukan %q" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" @@ -82,7 +88,7 @@ msgstr "daftar %q harus berupa daftar" #: shared-bindings/memorymonitor/AllocationAlarm.c msgid "%q must be >= 0" -msgstr "" +msgstr "%q harus >= 0" #: shared-bindings/_bleio/CharacteristicBuffer.c #: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c @@ -98,7 +104,7 @@ msgstr "%q harus berupa tuple dengan panjang 2" #: shared-bindings/canio/Match.c msgid "%q out of range" -msgstr "" +msgstr "%q di luar jangkauan" #: ports/atmel-samd/common-hal/microcontroller/Pin.c msgid "%q pin invalid" @@ -112,6 +118,11 @@ msgstr "%q harus berupa int" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() mengambil posisi argumen %d tapi %d yang diberikan" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + #: py/argcheck.c msgid "'%q' argument required" msgstr "'%q' argumen dibutuhkan" @@ -122,23 +133,23 @@ msgstr "" #: py/proto.c msgid "'%q' object does not support '%q'" -msgstr "" +msgstr "Objek '%q' tidak mendukung '%q'" #: py/obj.c msgid "'%q' object does not support item assignment" -msgstr "" +msgstr "Objek '%q' tidak mendukung penugasan item" #: py/obj.c msgid "'%q' object does not support item deletion" -msgstr "" +msgstr "Objek '%q' tidak mendukung penghapusan item" #: py/runtime.c msgid "'%q' object has no attribute '%q'" -msgstr "" +msgstr "Objek '%q' tidak memiliki atribut '%q'" #: py/runtime.c msgid "'%q' object is not an iterator" -msgstr "" +msgstr "Objek '%q' bukan merupakan iterator" #: py/objtype.c py/runtime.c msgid "'%q' object is not callable" @@ -146,7 +157,7 @@ msgstr "" #: py/runtime.c msgid "'%q' object is not iterable" -msgstr "" +msgstr "Objek '%q' tidak dapat diulang" #: py/obj.c msgid "'%q' object is not subscriptable" @@ -220,7 +231,7 @@ msgstr "'await' diluar fungsi" #: py/compile.c msgid "'await', 'async for' or 'async with' outside async function" -msgstr "" +msgstr "'await', 'async for' atau 'async with' di luar fungsi async" #: py/compile.c msgid "'break' outside loop" @@ -252,7 +263,7 @@ msgstr "'return' diluar fungsi" #: py/compile.c msgid "'yield from' inside async function" -msgstr "" +msgstr "'yield from' di dalam fungsi async" #: py/compile.c msgid "'yield' outside function" @@ -274,6 +285,10 @@ msgstr "0.0 ke kompleks berpangkat" msgid "3-arg pow() not supported" msgstr "pow() 3-arg tidak didukung" +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" @@ -281,7 +296,7 @@ msgstr "Sebuah channel hardware interrupt sedang digunakan" #: ports/esp32s2/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" -msgstr "" +msgstr "ADC2 sedang digunakan oleh WiFi" #: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c #, c-format @@ -304,13 +319,13 @@ msgstr "Semua perangkat I2C sedang digunakan" #: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c #: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" -msgstr "" +msgstr "Semua unit PCNT sedang digunakan" #: 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 "Semua RX FIFO sedang digunakan" #: ports/esp32s2/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c msgid "All SPI peripherals are in use" @@ -536,10 +551,26 @@ msgstr "Bytes harus di antara 0 dan 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Blok CBC harus merupakan kelipatan 16 byte" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "Panggil super().__init__() sebelum mengakses objek asli." +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "Tidak dapat mengatur CCCD pada Karakteristik lokal" @@ -576,6 +607,10 @@ msgstr "" "Tidak dapat menggunakan output di kedua channel dengan menggunakan pin yang " "sama" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "Tidak dapat membaca tanpa pin MISO." @@ -623,6 +658,10 @@ msgstr "" "Tidak dapat membuat variasi frekuensi pada penghitung waktu yang sudah " "digunakan" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." msgstr "Tidak dapat menulis tanpa pin MOSI." @@ -954,6 +993,10 @@ msgstr "File sudah ada" msgid "Filters too complex" msgstr "" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "" + #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" msgstr "" @@ -963,11 +1006,6 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "" -"Frekuensi yang ditangkap berada di atas kemampuan. Penangkapan Ditunda." - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "Frekuensi harus cocok dengan PWMOut yang ada menggunakan timer ini" @@ -977,6 +1015,10 @@ msgstr "Frekuensi harus cocok dengan PWMOut yang ada menggunakan timer ini" msgid "Function requires lock" msgstr "Fungsinya membutuhkan kunci" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "" + #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -1105,6 +1147,7 @@ msgstr "Frekuensi PWM tidak valid" msgid "Invalid Pin" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Argumen tidak valid" @@ -1165,6 +1208,7 @@ msgstr "Fase tidak valid" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1213,6 +1257,14 @@ msgstr "Mode operasi tidak valid." msgid "Invalid security_mode" msgstr "security_mode tidak valid" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "" + #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" msgstr "Suara tidak valid" @@ -1253,6 +1305,10 @@ msgstr "Panjang harus berupa int" msgid "Length must be non-negative" msgstr "Panjangnya harus non-negatif" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "Pin MISO gagal inisialisasi." @@ -1485,7 +1541,11 @@ msgstr "" "Hanya monokrom, 4bpp atau 8bpp yang diindeks, dan 16bpp atau lebih yang " "didukung: %d bpp diberikan" -#: ports/esp32s2/common-hal/alarm/__init__.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1497,6 +1557,18 @@ msgstr "" msgid "Only raw int supported for ip" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1505,6 +1577,10 @@ msgstr "" msgid "Oversample must be multiple of 8." msgstr "Sampel berlebihan harus kelipatan 8." +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" @@ -1523,6 +1599,10 @@ msgstr "" msgid "ParallelBus not yet supported" msgstr "ParallelBus belum didukung" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + #: py/moduerrno.c msgid "Permission denied" msgstr "Izin ditolak" @@ -1549,10 +1629,6 @@ msgstr "Pin harus mendukung interupsi perangkat keras" msgid "Pin number already reserved by EXTI" msgstr "Nomor pin sudah dipesan oleh EXTI" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -1596,7 +1672,7 @@ msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" #: shared-bindings/digitalio/DigitalInOut.c @@ -1648,6 +1724,10 @@ msgstr "sistem file (filesystem) bersifat Read-only" msgid "Read-only object" msgstr "sistem file (filesystem) bersifat Read-only" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" msgstr "Segarkan terlalu cepat" @@ -1660,6 +1740,10 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "Mode AES yang diminta tidak didukung" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" msgstr "Channel Kanan tidak didukung" @@ -1806,38 +1890,41 @@ msgid "" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY).\n" msgstr "" +"Kekuatan mikrokontroler menurun. Pastikan catu daya Anda menyediakan\n" +"daya yang cukup untuk seluruh rangkaian dan tekan reset (setelah " +"mengeluarkan CIRCUITPY).\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" -msgstr "" +msgstr "Sampel bits_per_sampel tidak cocok dengan mixer" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's channel count does not match the mixer's" -msgstr "" +msgstr "Jumlah saluran sampel tidak cocok dengan mixer" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's sample rate does not match the mixer's" -msgstr "" +msgstr "Tingkat sampel dari sampel tidak cocok dengan mixer" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's signedness does not match the mixer's" -msgstr "" +msgstr "signedness dari sampel tidak cocok dengan mixer" #: shared-bindings/displayio/TileGrid.c msgid "Tile height must exactly divide bitmap height" -msgstr "" +msgstr "Tinggi tile harus persis membagi tinggi bitmap" #: shared-bindings/displayio/TileGrid.c shared-module/displayio/TileGrid.c msgid "Tile index out of bounds" -msgstr "" +msgstr "Indeks ubin di luar batas" #: shared-bindings/displayio/TileGrid.c msgid "Tile value out of bounds" -msgstr "" +msgstr "Nilai ubin di luar batas" #: shared-bindings/displayio/TileGrid.c msgid "Tile width must exactly divide bitmap width" -msgstr "" +msgstr "Lebar ubin harus persis membagi lebar bitmap" #: shared-bindings/alarm/time/TimeAlarm.c msgid "Time is in the past." @@ -1863,63 +1950,64 @@ msgstr "Terlalu banyak channel dalam sampel" #: shared-module/displayio/__init__.c msgid "Too many display busses" -msgstr "" +msgstr "Terlalu banyak tampilan bus" #: shared-module/displayio/__init__.c msgid "Too many displays" -msgstr "" +msgstr "Terlalu banyak tampilan" #: ports/nrf/common-hal/_bleio/PacketBuffer.c msgid "Total data to write is larger than outgoing_packet_length" msgstr "" +"Total data yang akan ditulis lebih besar daripada outgoing_packet_length" #: py/obj.c msgid "Traceback (most recent call last):\n" -msgstr "" +msgstr "Traceback (bagian terakhir dari panggilan terkini):\n" #: shared-bindings/time/__init__.c msgid "Tuple or struct_time argument required" -msgstr "" +msgstr "Diperlukan argumen Tuple atau struct_time" #: ports/stm/common-hal/busio/UART.c msgid "UART Buffer allocation error" -msgstr "" +msgstr "Kesalahan alokasi Buffer UART" #: ports/stm/common-hal/busio/UART.c msgid "UART De-init error" -msgstr "" +msgstr "Kesalahan UART De-init" #: ports/stm/common-hal/busio/UART.c msgid "UART Init Error" -msgstr "" +msgstr "Kesalahan Init UART" #: ports/stm/common-hal/busio/UART.c msgid "UART Re-init error" -msgstr "" +msgstr "Kesalahan Re-init UART" #: ports/stm/common-hal/busio/UART.c msgid "UART write error" -msgstr "" +msgstr "Kesalahan penulisan UART" #: shared-module/usb_hid/Device.c msgid "USB Busy" -msgstr "" +msgstr "USB Sibuk" #: shared-module/usb_hid/Device.c msgid "USB Error" -msgstr "" +msgstr "Kesalahan USB" #: shared-bindings/_bleio/UUID.c msgid "UUID integer value must be 0-0xffff" -msgstr "" +msgstr "Nilai integer UUID harus 0-0xffff" #: shared-bindings/_bleio/UUID.c msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" -msgstr "" +msgstr "String UUID bukan 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" #: shared-bindings/_bleio/UUID.c msgid "UUID value is not str, int or byte buffer" -msgstr "" +msgstr "Nilai UUID bukan str, int atau byte buffer" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -1933,7 +2021,7 @@ msgstr "" #: shared-module/displayio/I2CDisplay.c #, c-format msgid "Unable to find I2C Display at %x" -msgstr "" +msgstr "Tidak dapat menemukan Tampilan I2C di %x" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c @@ -1942,15 +2030,15 @@ msgstr "Tidak dapat menemukan GCLK yang kosong" #: py/parse.c msgid "Unable to init parser" -msgstr "" +msgstr "Tidak dapat memulai parser" #: shared-module/displayio/OnDiskBitmap.c msgid "Unable to read color palette data" -msgstr "" +msgstr "Tidak dapat membaca data palet warna" #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." -msgstr "" +msgstr "Tidak dapat menulis ke nvm." #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." @@ -1958,7 +2046,7 @@ msgstr "" #: ports/nrf/common-hal/_bleio/UUID.c msgid "Unexpected nrfx uuid type" -msgstr "" +msgstr "Tipe urf nrfx tak sesuai" #: ports/esp32s2/common-hal/socketpool/Socket.c #, c-format @@ -2021,6 +2109,10 @@ msgstr "" msgid "Unsupported pull value." msgstr "" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -2031,6 +2123,10 @@ msgstr "" msgid "Value length > max_length" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "" @@ -2440,6 +2536,10 @@ msgstr "" msgid "circle can only be registered in one parent" msgstr "" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "" @@ -2512,6 +2612,10 @@ msgstr "" msgid "data must be of equal length" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "data type not understood" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "" @@ -2520,6 +2624,10 @@ msgstr "" msgid "default 'except' must be last" msgstr "'except' standar harus terakhir" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2619,6 +2727,10 @@ msgstr "hanya mengharapkan sebuah nilai (value) untuk set" msgid "expecting key:value for dict" msgstr "key:value diharapkan untuk dict" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "argumen keyword ekstra telah diberikan" @@ -2822,7 +2934,7 @@ 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" +msgid "input argument must be an integer, a tuple, or a list" msgstr "" #: extmod/ulab/code/fft/fft.c @@ -3046,7 +3158,7 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" +msgid "max_length must be >= 0" msgstr "" #: extmod/ulab/code/ndarray.c @@ -3065,6 +3177,10 @@ msgstr "" msgid "maxiter should be > 0" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3147,6 +3263,10 @@ msgstr "" msgid "no binding for nonlocal found" msgstr "tidak ada ikatan/bind pada temuan nonlocal" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "tidak ada modul yang bernama '%q'" @@ -3184,6 +3304,14 @@ msgstr "non-keyword arg setelah */**" msgid "non-keyword arg after keyword arg" msgstr "non-keyword arg setelah keyword arg" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "" + #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3256,6 +3384,10 @@ msgstr "panjang data string memiliki keganjilan (odd-length)" msgid "offset is too large" msgstr "" +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "" + #: py/objstr.c py/objstrunicode.c #, fuzzy msgid "offset out of bounds" @@ -3283,10 +3415,6 @@ msgstr "" 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 "" @@ -3377,6 +3505,8 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3473,6 +3603,10 @@ msgstr "kompilasi script tidak didukung" msgid "shape must be a tuple" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "" @@ -3602,6 +3736,10 @@ msgstr "" msgid "timeout must be 0.0-100.0 seconds" msgstr "" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "" + #: shared-bindings/_bleio/CharacteristicBuffer.c #, fuzzy msgid "timeout must be >= 0.0" @@ -3627,6 +3765,10 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "" @@ -3636,6 +3778,10 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -3644,10 +3790,6 @@ msgstr "" msgid "trigger level must be 0 or 1" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "" - #: py/obj.c msgid "tuple/list has wrong length" msgstr "" @@ -3838,6 +3980,10 @@ msgstr "" msgid "x value out of bounds" msgstr "" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "" @@ -3862,6 +4008,17 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "" +#~ "\n" +#~ "Code done running. Waiting for reload.\n" +#~ msgstr "" +#~ "\n" +#~ "Kode selesai berjalan. Menunggu memuat ulang.\n" + +#~ msgid "Frequency captured is above capability. Capture Paused." +#~ msgstr "" +#~ "Frekuensi yang ditangkap berada di atas kemampuan. Penangkapan Ditunda." + #~ msgid "Press any key to enter the REPL. Use CTRL-D to reload." #~ msgstr "" #~ "Tekan tombol apa saja untuk masuk ke dalam REPL. Gunakan CTRL+D untuk " diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 65c31ee229..58663ae633 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,6 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-21 14:14-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -20,7 +19,13 @@ msgstr "" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" +msgstr "" + +#: main.c +msgid "" +"\n" +"Code stopped by auto-reload.\n" msgstr "" #: supervisor/shared/safe_mode.c @@ -108,6 +113,11 @@ msgstr "" msgid "%q() takes %d positional arguments but %d were given" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + #: py/argcheck.c msgid "'%q' argument required" msgstr "" @@ -270,6 +280,10 @@ msgstr "" msgid "3-arg pow() not supported" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" @@ -530,10 +544,26 @@ msgstr "" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "" @@ -566,6 +596,10 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "" @@ -609,6 +643,10 @@ msgstr "" msgid "Cannot vary frequency on a timer that is already in use" msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." msgstr "" @@ -940,6 +978,10 @@ msgstr "" msgid "Filters too complex" msgstr "" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "" + #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" msgstr "" @@ -949,10 +991,6 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -962,6 +1000,10 @@ msgstr "" msgid "Function requires lock" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "" + #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -1088,6 +1130,7 @@ msgstr "" msgid "Invalid Pin" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -1148,6 +1191,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1196,10 +1240,18 @@ msgstr "" msgid "Invalid security_mode" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/Socket.c msgid "Invalid socket for TLS" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/Socket.c msgid "Invalid use of TLS Socket" msgstr "" @@ -1220,6 +1272,10 @@ msgstr "" msgid "Invalid word/bit length" msgstr "" +#: ports/esp32s2/common-hal/socketpool/Socket.c +msgid "Issue setting SO_REUSEADDR" +msgstr "" + #: shared-bindings/aesio/aes.c msgid "Key must be 16, 24, or 32 bytes long" msgstr "" @@ -1244,6 +1300,10 @@ msgstr "" msgid "Length must be non-negative" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "" @@ -1470,7 +1530,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1482,6 +1546,18 @@ msgstr "" msgid "Only raw int supported for ip" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/Socket.c msgid "Out of sockets" msgstr "" @@ -1490,6 +1566,10 @@ msgstr "" msgid "Oversample must be multiple of 8." msgstr "" +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" @@ -1506,6 +1586,10 @@ msgstr "" msgid "ParallelBus not yet supported" msgstr "" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + #: py/moduerrno.c msgid "Permission denied" msgstr "" @@ -1532,10 +1616,6 @@ msgstr "" msgid "Pin number already reserved by EXTI" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -1576,7 +1656,7 @@ msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" #: shared-bindings/digitalio/DigitalInOut.c @@ -1627,6 +1707,10 @@ msgstr "" msgid "Read-only object" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" msgstr "" @@ -1639,6 +1723,10 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" msgstr "" @@ -1995,6 +2083,10 @@ msgstr "" msgid "Unsupported pull value." msgstr "" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -2005,6 +2097,10 @@ msgstr "" msgid "Value length > max_length" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "" @@ -2407,6 +2503,10 @@ msgstr "" msgid "circle can only be registered in one parent" msgstr "" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "" @@ -2479,6 +2579,10 @@ msgstr "" msgid "data must be of equal length" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "data type not understood" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "" @@ -2487,6 +2591,10 @@ msgstr "" msgid "default 'except' must be last" msgstr "" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2586,6 +2694,10 @@ msgstr "" msgid "expecting key:value for dict" msgstr "" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "" @@ -2789,7 +2901,7 @@ 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" +msgid "input argument must be an integer, a tuple, or a list" msgstr "" #: extmod/ulab/code/fft/fft.c @@ -3013,7 +3125,7 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" +msgid "max_length must be >= 0" msgstr "" #: extmod/ulab/code/ndarray.c @@ -3032,6 +3144,10 @@ msgstr "" msgid "maxiter should be > 0" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3114,6 +3230,10 @@ msgstr "" msgid "no binding for nonlocal found" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "" @@ -3151,6 +3271,14 @@ msgstr "" msgid "non-keyword arg after keyword arg" msgstr "" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "" + #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3223,6 +3351,10 @@ msgstr "" msgid "offset is too large" msgstr "" +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "" + #: py/objstr.c py/objstrunicode.c msgid "offset out of bounds" msgstr "" @@ -3249,10 +3381,6 @@ msgstr "" 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 "" @@ -3343,6 +3471,8 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3439,6 +3569,10 @@ msgstr "" msgid "shape must be a tuple" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "" @@ -3568,6 +3702,10 @@ msgstr "" msgid "timeout must be 0.0-100.0 seconds" msgstr "" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "" + #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "timeout must be >= 0.0" msgstr "" @@ -3592,6 +3730,10 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "" @@ -3601,6 +3743,10 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -3609,10 +3755,6 @@ msgstr "" msgid "trigger level must be 0 or 1" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "" - #: py/obj.c msgid "tuple/list has wrong length" msgstr "" @@ -3803,6 +3945,10 @@ msgstr "" msgid "x value out of bounds" msgstr "" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index e178a3fd5b..a27a1459a1 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-14 12:59-0500\n" +"POT-Creation-Date: 2021-01-04 12:55-0600\n" "PO-Revision-Date: 2020-12-04 18:33+0000\n" "Last-Translator: vkuthan \n" "Language-Team: LANGUAGE \n" @@ -19,10 +19,14 @@ msgstr "" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" msgstr "" + +#: main.c +msgid "" "\n" -"Kód byl dokončen. Čekám na opětovné nahrání.\n" +"Code stopped by auto-reload.\n" +msgstr "" #: supervisor/shared/safe_mode.c msgid "" @@ -112,6 +116,11 @@ msgstr "%q by měl být int" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() vyžaduje %d pozičních argumentů, ale %d jich bylo zadáno" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + #: py/argcheck.c msgid "'%q' argument required" msgstr "Je vyžadován argument '%q'" @@ -274,6 +283,10 @@ msgstr "" msgid "3-arg pow() not supported" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" @@ -534,10 +547,26 @@ msgstr "" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "" @@ -570,6 +599,10 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "" @@ -613,6 +646,10 @@ msgstr "" msgid "Cannot vary frequency on a timer that is already in use" msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." msgstr "" @@ -940,6 +977,10 @@ msgstr "" msgid "Filters too complex" msgstr "" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "" + #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" msgstr "" @@ -949,10 +990,6 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -962,6 +999,10 @@ msgstr "" msgid "Function requires lock" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "" + #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -1088,6 +1129,7 @@ msgstr "" msgid "Invalid Pin" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -1148,6 +1190,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1196,6 +1239,14 @@ msgstr "" msgid "Invalid security_mode" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "" + #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" msgstr "" @@ -1236,6 +1287,10 @@ msgstr "" msgid "Length must be non-negative" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "" @@ -1462,7 +1517,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1474,6 +1533,18 @@ msgstr "" msgid "Only raw int supported for ip" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1482,6 +1553,10 @@ msgstr "" msgid "Oversample must be multiple of 8." msgstr "" +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" @@ -1498,6 +1573,10 @@ msgstr "" msgid "ParallelBus not yet supported" msgstr "" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + #: py/moduerrno.c msgid "Permission denied" msgstr "" @@ -1524,10 +1603,6 @@ msgstr "" msgid "Pin number already reserved by EXTI" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -1568,7 +1643,7 @@ msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" #: shared-bindings/digitalio/DigitalInOut.c @@ -1619,6 +1694,10 @@ msgstr "" msgid "Read-only object" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" msgstr "" @@ -1631,6 +1710,10 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" msgstr "" @@ -1987,6 +2070,10 @@ msgstr "" msgid "Unsupported pull value." msgstr "" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -1997,6 +2084,10 @@ msgstr "" msgid "Value length > max_length" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "" @@ -2399,6 +2490,10 @@ msgstr "" msgid "circle can only be registered in one parent" msgstr "" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "" @@ -2471,6 +2566,10 @@ msgstr "" msgid "data must be of equal length" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "data type not understood" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "" @@ -2479,6 +2578,10 @@ msgstr "" msgid "default 'except' must be last" msgstr "" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2578,6 +2681,10 @@ msgstr "" msgid "expecting key:value for dict" msgstr "" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "" @@ -2781,7 +2888,7 @@ 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" +msgid "input argument must be an integer, a tuple, or a list" msgstr "" #: extmod/ulab/code/fft/fft.c @@ -3005,7 +3112,7 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" +msgid "max_length must be >= 0" msgstr "" #: extmod/ulab/code/ndarray.c @@ -3024,6 +3131,10 @@ msgstr "" msgid "maxiter should be > 0" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3106,6 +3217,10 @@ msgstr "" msgid "no binding for nonlocal found" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "" @@ -3143,6 +3258,14 @@ msgstr "" msgid "non-keyword arg after keyword arg" msgstr "" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "" + #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3215,6 +3338,10 @@ msgstr "" msgid "offset is too large" msgstr "" +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "" + #: py/objstr.c py/objstrunicode.c msgid "offset out of bounds" msgstr "" @@ -3241,10 +3368,6 @@ msgstr "" 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 "" @@ -3335,6 +3458,8 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3431,6 +3556,10 @@ msgstr "" msgid "shape must be a tuple" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "" @@ -3560,6 +3689,10 @@ msgstr "" msgid "timeout must be 0.0-100.0 seconds" msgstr "" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "" + #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "timeout must be >= 0.0" msgstr "" @@ -3584,6 +3717,10 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "" @@ -3593,6 +3730,10 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -3601,10 +3742,6 @@ msgstr "" msgid "trigger level must be 0 or 1" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "" - #: py/obj.c msgid "tuple/list has wrong length" msgstr "" @@ -3795,6 +3932,10 @@ msgstr "" msgid "x value out of bounds" msgstr "" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "" @@ -3819,6 +3960,13 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "" +#~ "\n" +#~ "Code done running. Waiting for reload.\n" +#~ msgstr "" +#~ "\n" +#~ "Kód byl dokončen. Čekám na opětovné nahrání.\n" + #~ msgid "" #~ "\n" #~ "To exit, please reset the board without " diff --git a/locale/de_DE.po b/locale/de_DE.po index 85b3b90a06..350c7aac1a 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -5,23 +5,29 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-14 12:59-0500\n" -"PO-Revision-Date: 2020-11-26 03:11+0000\n" -"Last-Translator: Daniel Bravo Darriba \n" +"POT-Creation-Date: 2021-01-04 12:55-0600\n" +"PO-Revision-Date: 2021-01-07 18:01+0000\n" +"Last-Translator: Dennis Schweer \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.4-dev\n" +"X-Generator: Weblate 4.4.1-dev\n" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" msgstr "" "\n" -"Der Code wurde ausgeführt. Warte auf reload.\n" +"Programm wird ausgeführt.\n" + +#: main.c +msgid "" +"\n" +"Code stopped by auto-reload.\n" +msgstr "" #: supervisor/shared/safe_mode.c msgid "" @@ -111,6 +117,11 @@ msgstr "%q sollte ein integer sein" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() nimmt %d Argumente ohne Keyword an, aber es wurden %d angegeben" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + #: py/argcheck.c msgid "'%q' argument required" msgstr "'%q' Argument erforderlich" @@ -125,7 +136,7 @@ msgstr "'%q' Objekt unterstützt '%q' nicht" #: py/obj.c msgid "'%q' object does not support item assignment" -msgstr "" +msgstr "'%q' Objekt unterschützt keine Elementzuweisung" #: py/obj.c msgid "'%q' object does not support item deletion" @@ -137,7 +148,7 @@ msgstr "'%q' Objekt hat kein Attribut '%q'" #: py/runtime.c msgid "'%q' object is not an iterator" -msgstr "" +msgstr "'%q' Objekt ist kein Iterator" #: py/objtype.c py/runtime.c msgid "'%q' object is not callable" @@ -231,7 +242,7 @@ msgstr "'continue' außerhalb einer Schleife" #: py/objgenerator.c msgid "'coroutine' object is not an iterator" -msgstr "" +msgstr "'coroutine' Objekt ist kein Iterator" #: py/compile.c msgid "'data' requires at least 2 arguments" @@ -273,6 +284,10 @@ msgstr "0.0 zu einer komplexen Potenz" msgid "3-arg pow() not supported" msgstr "3-arg pow() wird nicht unterstützt" +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" @@ -303,7 +318,7 @@ msgstr "Alle I2C-Peripheriegeräte sind in Benutzung" #: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c #: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" -msgstr "" +msgstr "Alle PCNT Einheiten sind in Benutzung" #: ports/atmel-samd/common-hal/canio/Listener.c #: ports/esp32s2/common-hal/canio/Listener.c @@ -537,10 +552,26 @@ msgstr "Ein Bytes kann nur Werte zwischen 0 und 255 annehmen." msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBC-Blöcke müssen ein Vielfaches von 16 Bytes sein" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "Rufe super().__init__() vor dem Zugriff auf ein natives Objekt auf." +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "CCCD kann nicht auf lokales Merkmal eingestellt werden" @@ -574,6 +605,10 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "Kann nicht beite Kanäle auf dem gleichen Pin ausgeben" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "Kann ohne MISO-Pin nicht lesen." @@ -618,6 +653,10 @@ msgid "Cannot vary frequency on a timer that is already in use" msgstr "" "Die Frequenz eines bereits verwendeten Timers kann nicht variiert werden" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." msgstr "Kann nicht ohne MOSI-Pin schreiben." @@ -686,7 +725,7 @@ msgstr "Konnte Kamera nicht initialisieren" #: ports/cxd56/common-hal/gnss/GNSS.c msgid "Could not initialize GNSS" -msgstr "" +msgstr "GNSS konnte nicht initialisiert werden" #: ports/cxd56/common-hal/sdioio/SDCard.c msgid "Could not initialize SDCard" @@ -813,7 +852,7 @@ msgstr "Die EZB arbeitet jeweils nur mit 16 Bytes" #: ports/esp32s2/common-hal/busio/SPI.c ports/esp32s2/common-hal/canio/CAN.c msgid "ESP-IDF memory allocation failed" -msgstr "" +msgstr "ESP-IDF Speicherallozierung fehlgeschlagen" #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c #: ports/atmel-samd/common-hal/ps2io/Ps2.c @@ -879,7 +918,7 @@ msgstr "FFT ist nur für ndarrays definiert" #: extmod/ulab/code/fft/fft.c msgid "FFT is implemented for linear arrays only" -msgstr "" +msgstr "FFT ist nur für lineare Arrays implementiert" #: ports/esp32s2/common-hal/socketpool/Socket.c msgid "Failed SSL handshake" @@ -910,7 +949,7 @@ msgstr "Konnte keine RX Buffer mit %d allozieren" #: ports/esp32s2/common-hal/wifi/__init__.c msgid "Failed to allocate Wifi memory" -msgstr "" +msgstr "Zuweisung des Wifi Speichers ist fehlgeschlagen" #: ports/esp32s2/common-hal/wifi/ScannedNetworks.c msgid "Failed to allocate wifi scan memory" @@ -926,7 +965,7 @@ msgstr "Verbindung nicht erfolgreich: timeout" #: ports/esp32s2/common-hal/wifi/__init__.c msgid "Failed to init wifi" -msgstr "" +msgstr "Wifi Initialisierung ist fehlgeschlagen" #: shared-module/audiomp3/MP3Decoder.c msgid "Failed to parse MP3 file" @@ -951,6 +990,10 @@ msgstr "Datei existiert" msgid "Filters too complex" msgstr "Filter zu komplex" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "" + #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" msgstr "Format nicht unterstützt" @@ -960,12 +1003,6 @@ msgstr "Format nicht unterstützt" msgid "Framebuffer requires %d bytes" msgstr "Framepuffer benötigt %d bytes" -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "" -"Die aufgezeichnete Frequenz liegt über der Leistungsgrenze. Aufnahme " -"angehalten." - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -977,6 +1014,10 @@ msgstr "" msgid "Function requires lock" msgstr "Die Funktion erwartet, dass der 'lock'-Befehl zuvor ausgeführt wurde" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "" + #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -1015,7 +1056,7 @@ msgstr "I2SOut nicht verfügbar" #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "IOs 0, 2 & 4 do not support internal pullup in sleep" -msgstr "" +msgstr "IOs 0, 2 & 4 unterstützen keinen internen Pull up im sleep-Modus" #: shared-bindings/aesio/aes.c #, c-format @@ -1036,7 +1077,7 @@ msgstr "Inkorrekte Puffergröße" #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" -msgstr "" +msgstr "Initialisierung aufgrund von Speichermangel fehlgeschlagen" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c msgid "Input taking too long" @@ -1105,6 +1146,7 @@ msgstr "Ungültige PWM Frequenz" msgid "Invalid Pin" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Ungültiges Argument" @@ -1165,6 +1207,7 @@ msgstr "Ungültige Phase" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1213,6 +1256,14 @@ msgstr "Ungültiger Ausführungsmodus." msgid "Invalid security_mode" msgstr "Ungültiger security_mode" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "" + #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" msgstr "Ungültige Stimme" @@ -1253,6 +1304,10 @@ msgstr "Länge muss ein int sein" msgid "Length must be non-negative" msgstr "Länge darf nicht negativ sein" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "MISO pin Initialisierung fehlgeschlagen." @@ -1487,7 +1542,11 @@ msgstr "" "Nur monochrome, indizierte 4bpp oder 8bpp, und 16bpp oder größere BMPs " "unterstützt: %d bpp wurden gegeben" -#: ports/esp32s2/common-hal/alarm/__init__.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1499,6 +1558,18 @@ msgstr "" msgid "Only raw int supported for ip" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1507,6 +1578,10 @@ msgstr "" msgid "Oversample must be multiple of 8." msgstr "Oversample muss ein Vielfaches von 8 sein." +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" @@ -1523,6 +1598,10 @@ msgstr "Die PWM-Frequenz ist nicht schreibbar wenn variable_Frequenz = False." msgid "ParallelBus not yet supported" msgstr "ParallelBus wird noch nicht unterstützt" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + #: py/moduerrno.c msgid "Permission denied" msgstr "Zugang verweigert" @@ -1549,10 +1628,6 @@ msgstr "Pin muss Hardware-Interrupts unterstützen" msgid "Pin number already reserved by EXTI" msgstr "PIN-Nummer bereits von EXTI reserviert" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -1596,7 +1671,7 @@ msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" #: shared-bindings/digitalio/DigitalInOut.c @@ -1647,6 +1722,10 @@ msgstr "Schreibgeschützte Dateisystem" msgid "Read-only object" msgstr "Schreibgeschützte Objekt" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" msgstr "Zu früh neu geladen" @@ -1659,6 +1738,10 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "Der angeforderte AES-Modus wird nicht unterstützt" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" msgstr "Rechter Kanal wird nicht unterstützt" @@ -2033,6 +2116,10 @@ msgstr "Nicht unterstützte Operation" msgid "Unsupported pull value." msgstr "Nicht unterstützter Pull-Wert." +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -2043,6 +2130,10 @@ msgstr "Wert Länge != Erforderliche feste Länge" msgid "Value length > max_length" msgstr "Länge des Wertes > max_length" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "Viper-Funktionen unterstützen derzeit nicht mehr als 4 Argumente" @@ -2464,6 +2555,10 @@ msgstr "chr() arg ist nicht in range(256)" msgid "circle can only be registered in one parent" msgstr "Kreis kann nur in einem Elternteil registriert werden" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "Farbpuffer muss 3 Bytes (RGB) oder 4 Bytes (RGB + pad byte) sein" @@ -2538,6 +2633,10 @@ msgstr "" msgid "data must be of equal length" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "data type not understood" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "Dezimalzahlen nicht unterstützt" @@ -2546,6 +2645,10 @@ msgstr "Dezimalzahlen nicht unterstützt" msgid "default 'except' must be last" msgstr "Die Standart-Ausnahmebehandlung muss als letztes sein" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2647,6 +2750,10 @@ msgstr "Erwarte nur einen Wert für set" msgid "expecting key:value for dict" msgstr "Erwarte key:value für dict" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "Es wurden zusätzliche Keyword-Argumente angegeben" @@ -2851,8 +2958,8 @@ 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" +msgid "input argument must be an integer, a tuple, or a list" +msgstr "" #: extmod/ulab/code/fft/fft.c msgid "input array length must be power of 2" @@ -3081,7 +3188,7 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "max_length muss 0-%d sein, wenn fixed_length %s ist" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" +msgid "max_length must be >= 0" msgstr "" #: extmod/ulab/code/ndarray.c @@ -3100,6 +3207,10 @@ msgstr "" msgid "maxiter should be > 0" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3182,6 +3293,10 @@ msgstr "kein verfügbares Netzwerkadapter (NIC)" msgid "no binding for nonlocal found" msgstr "Kein Binding für nonlocal gefunden" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "Kein Modul mit dem Namen '%q'" @@ -3219,6 +3334,14 @@ msgstr "Nicht-Schlüsselwort arg nach * / **" msgid "non-keyword arg after keyword arg" msgstr "Nicht-Schlüsselwort Argument nach Schlüsselwort Argument" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "" + #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3292,6 +3415,10 @@ msgstr "String mit ungerader Länge" msgid "offset is too large" msgstr "" +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "" + #: py/objstr.c py/objstrunicode.c msgid "offset out of bounds" msgstr "offset außerhalb der Grenzen" @@ -3319,10 +3446,6 @@ msgstr "Operanden konnten nicht zusammen gesendet werden" 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" @@ -3415,6 +3538,8 @@ 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_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3513,6 +3638,10 @@ msgstr "kompilieren von Skripten nicht unterstützt" msgid "shape must be a tuple" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "Vorzeichen nicht erlaubt in einem String formatierungs specifier" @@ -3643,6 +3772,10 @@ msgstr "Das Zeitlimit hat den maximal zulässigen Wert überschritten" msgid "timeout must be 0.0-100.0 seconds" msgstr "Das Zeitlimit muss 0,0-100,0 Sekunden betragen" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "" + #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "timeout must be >= 0.0" msgstr "timeout muss >= 0.0 sein" @@ -3667,6 +3800,10 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "zu viele Argumente mit dem angegebenen Format" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "zu viele Indizes" @@ -3676,6 +3813,10 @@ msgstr "zu viele Indizes" msgid "too many values to unpack (expected %d)" msgstr "zu viele Werte zum Auspacken (erwartet %d)" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -3684,10 +3825,6 @@ msgstr "" msgid "trigger level must be 0 or 1" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "Tupelindex außerhalb des Bereichs" - #: py/obj.c msgid "tuple/list has wrong length" msgstr "tupel/list hat falsche Länge" @@ -3807,7 +3944,7 @@ msgstr "nicht unterstütztes Formatzeichen '%c' (0x%x) bei Index %d" #: py/runtime.c msgid "unsupported type for %q: '%q'" -msgstr "" +msgstr "nicht unterstützer Typ für %q: '%q'" #: py/runtime.c msgid "unsupported type for operator" @@ -3815,7 +3952,7 @@ msgstr "nicht unterstützter Typ für Operator" #: py/runtime.c msgid "unsupported types for %q: '%q', '%q'" -msgstr "" +msgstr "nicht unterstützte Typen für %q: '%q', '%q'" #: py/objint.c #, c-format @@ -3860,7 +3997,7 @@ msgstr "" #: extmod/ulab/code/vector/vectorise.c msgid "wrong input type" -msgstr "" +msgstr "falscher Eingabetyp" #: extmod/ulab/code/ulab_create.c py/objstr.c msgid "wrong number of arguments" @@ -3876,12 +4013,16 @@ msgstr "falscher Operandentyp" #: extmod/ulab/code/vector/vectorise.c msgid "wrong output type" -msgstr "" +msgstr "Falscher Ausgabetyp" #: shared-module/displayio/Shape.c msgid "x value out of bounds" msgstr "x Wert außerhalb der Grenzen" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "y sollte ein int sein" @@ -3906,6 +4047,24 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "input argument must be an integer or a 2-tuple" +#~ msgstr "Das Eingabeargument muss eine Ganzzahl oder ein 2-Tupel sein" + +#~ msgid "tuple index out of range" +#~ msgstr "Tupelindex außerhalb des Bereichs" + +#~ msgid "" +#~ "\n" +#~ "Code done running. Waiting for reload.\n" +#~ msgstr "" +#~ "\n" +#~ "Der Code wurde ausgeführt. Warte auf reload.\n" + +#~ msgid "Frequency captured is above capability. Capture Paused." +#~ msgstr "" +#~ "Die aufgezeichnete Frequenz liegt über der Leistungsgrenze. Aufnahme " +#~ "angehalten." + #~ msgid "Press any key to enter the REPL. Use CTRL-D to reload." #~ msgstr "" #~ "Drücke eine Taste um dich mit der REPL zu verbinden. Drücke Strg-D zum " diff --git a/locale/el.po b/locale/el.po index 1a835fd424..7001c2aa23 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-12-14 12:59-0500\n" +"POT-Creation-Date: 2021-01-04 12:55-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -19,7 +19,13 @@ msgstr "" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" +msgstr "" + +#: main.c +msgid "" +"\n" +"Code stopped by auto-reload.\n" msgstr "" #: supervisor/shared/safe_mode.c @@ -107,6 +113,11 @@ msgstr "" msgid "%q() takes %d positional arguments but %d were given" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + #: py/argcheck.c msgid "'%q' argument required" msgstr "" @@ -269,6 +280,10 @@ msgstr "" msgid "3-arg pow() not supported" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" @@ -529,10 +544,26 @@ msgstr "" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "" @@ -565,6 +596,10 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "" @@ -608,6 +643,10 @@ msgstr "" msgid "Cannot vary frequency on a timer that is already in use" msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." msgstr "" @@ -935,6 +974,10 @@ msgstr "" msgid "Filters too complex" msgstr "" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "" + #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" msgstr "" @@ -944,10 +987,6 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -957,6 +996,10 @@ msgstr "" msgid "Function requires lock" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "" + #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -1083,6 +1126,7 @@ msgstr "" msgid "Invalid Pin" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -1143,6 +1187,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1191,6 +1236,14 @@ msgstr "" msgid "Invalid security_mode" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "" + #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" msgstr "" @@ -1231,6 +1284,10 @@ msgstr "" msgid "Length must be non-negative" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "" @@ -1457,7 +1514,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1469,6 +1530,18 @@ msgstr "" msgid "Only raw int supported for ip" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1477,6 +1550,10 @@ msgstr "" msgid "Oversample must be multiple of 8." msgstr "" +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" @@ -1493,6 +1570,10 @@ msgstr "" msgid "ParallelBus not yet supported" msgstr "" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + #: py/moduerrno.c msgid "Permission denied" msgstr "" @@ -1519,10 +1600,6 @@ msgstr "" msgid "Pin number already reserved by EXTI" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -1563,7 +1640,7 @@ msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" #: shared-bindings/digitalio/DigitalInOut.c @@ -1614,6 +1691,10 @@ msgstr "" msgid "Read-only object" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" msgstr "" @@ -1626,6 +1707,10 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" msgstr "" @@ -1982,6 +2067,10 @@ msgstr "" msgid "Unsupported pull value." msgstr "" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -1992,6 +2081,10 @@ msgstr "" msgid "Value length > max_length" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "" @@ -2394,6 +2487,10 @@ msgstr "" msgid "circle can only be registered in one parent" msgstr "" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "" @@ -2466,6 +2563,10 @@ msgstr "" msgid "data must be of equal length" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "data type not understood" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "" @@ -2474,6 +2575,10 @@ msgstr "" msgid "default 'except' must be last" msgstr "" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2573,6 +2678,10 @@ msgstr "" msgid "expecting key:value for dict" msgstr "" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "" @@ -2776,7 +2885,7 @@ 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" +msgid "input argument must be an integer, a tuple, or a list" msgstr "" #: extmod/ulab/code/fft/fft.c @@ -3000,7 +3109,7 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" +msgid "max_length must be >= 0" msgstr "" #: extmod/ulab/code/ndarray.c @@ -3019,6 +3128,10 @@ msgstr "" msgid "maxiter should be > 0" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3101,6 +3214,10 @@ msgstr "" msgid "no binding for nonlocal found" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "" @@ -3138,6 +3255,14 @@ msgstr "" msgid "non-keyword arg after keyword arg" msgstr "" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "" + #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3210,6 +3335,10 @@ msgstr "" msgid "offset is too large" msgstr "" +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "" + #: py/objstr.c py/objstrunicode.c msgid "offset out of bounds" msgstr "" @@ -3236,10 +3365,6 @@ msgstr "" 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 "" @@ -3330,6 +3455,8 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3426,6 +3553,10 @@ msgstr "" msgid "shape must be a tuple" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "" @@ -3555,6 +3686,10 @@ msgstr "" msgid "timeout must be 0.0-100.0 seconds" msgstr "" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "" + #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "timeout must be >= 0.0" msgstr "" @@ -3579,6 +3714,10 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "" @@ -3588,6 +3727,10 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -3596,10 +3739,6 @@ msgstr "" msgid "trigger level must be 0 or 1" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "" - #: py/obj.c msgid "tuple/list has wrong length" msgstr "" @@ -3790,6 +3929,10 @@ msgstr "" msgid "x value out of bounds" msgstr "" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "" diff --git a/locale/es.po b/locale/es.po index 27b1756571..45695665c1 100644 --- a/locale/es.po +++ b/locale/es.po @@ -7,24 +7,28 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-14 12:59-0500\n" -"PO-Revision-Date: 2020-11-27 18:34+0000\n" -"Last-Translator: Iván Montiel Cardona \n" +"POT-Creation-Date: 2021-01-04 12:55-0600\n" +"PO-Revision-Date: 2020-12-30 22:25+0000\n" +"Last-Translator: Hugo Dahl \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.4-dev\n" +"X-Generator: Weblate 4.4.1-dev\n" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" msgstr "" + +#: main.c +msgid "" "\n" -"El código terminó su ejecución. Esperando para recargar.\n" +"Code stopped by auto-reload.\n" +msgstr "" #: supervisor/shared/safe_mode.c msgid "" @@ -115,6 +119,11 @@ msgstr "%q debe ser un int" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() toma %d argumentos posicionales pero %d fueron dados" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + #: py/argcheck.c msgid "'%q' argument required" msgstr "argumento '%q' requerido" @@ -277,6 +286,10 @@ msgstr "0.0 a una potencia compleja" msgid "3-arg pow() not supported" msgstr "pow() con 3 argumentos no soportado" +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" @@ -543,10 +556,26 @@ msgstr "Bytes debe estar entre 0 y 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Los bloques CBC deben ser múltiplos de 16 bytes" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "Llame a super().__ init __() antes de acceder al objeto nativo." +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "No se puede configurar CCCD en la característica local" @@ -581,6 +610,10 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "No se puede tener ambos canales en el mismo pin" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "No se puede leer sin pin MISO." @@ -624,6 +657,10 @@ msgstr "No se puede obtener inequívocamente sizeof escalar" msgid "Cannot vary frequency on a timer that is already in use" msgstr "No puede variar la frecuencia en un temporizador que ya está en uso" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." msgstr "No se puede escribir sin pin MOSI." @@ -955,6 +992,10 @@ msgstr "El archivo ya existe" msgid "Filters too complex" msgstr "Filtros muy complejos" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "" + #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" msgstr "Sin capacidades para el formato" @@ -964,10 +1005,6 @@ msgstr "Sin capacidades para el formato" msgid "Framebuffer requires %d bytes" msgstr "Framebuffer requiere %d bytes" -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "Frecuencia capturada por encima de la capacidad. Captura en pausa." - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -978,6 +1015,10 @@ msgstr "" msgid "Function requires lock" msgstr "La función requiere lock" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "" + #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -1106,6 +1147,7 @@ msgstr "Frecuencia PWM inválida" msgid "Invalid Pin" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Argumento inválido" @@ -1166,6 +1208,7 @@ msgstr "Fase inválida" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1212,7 +1255,15 @@ msgstr "Modo de ejecución inválido." #: shared-module/_bleio/Attribute.c msgid "Invalid security_mode" -msgstr "Modo de seguridad no válido" +msgstr "'security_mode' no válido" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "" #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" @@ -1252,7 +1303,11 @@ msgstr "Length debe ser un int" #: py/objslice.c msgid "Length must be non-negative" -msgstr "Longitud no deberia ser negativa" +msgstr "Length no deberia ser negativa" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "" #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." @@ -1486,7 +1541,11 @@ msgstr "" "Solo se admiten BMP monocromáticos, indexados de 4 bpp u 8 bpp y 16 bpp o " "más: %d bpp proporcionados" -#: ports/esp32s2/common-hal/alarm/__init__.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1498,6 +1557,18 @@ msgstr "Solo un color puede ser transparente a la vez" msgid "Only raw int supported for ip" msgstr "Solo se aceptan enteros crudos para ip" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "Se acabaron los enchufes" @@ -1506,6 +1577,10 @@ msgstr "Se acabaron los enchufes" msgid "Oversample must be multiple of 8." msgstr "El sobremuestreo debe ser un múltiplo de 8." +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" @@ -1524,6 +1599,10 @@ msgstr "" msgid "ParallelBus not yet supported" msgstr "ParallelBus todavía no soportado" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + #: py/moduerrno.c msgid "Permission denied" msgstr "Permiso denegado" @@ -1550,10 +1629,6 @@ msgstr "El pin debe admitir interrupciones de hardware" msgid "Pin number already reserved by EXTI" msgstr "Número de pin ya reservado por EXTI" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -1601,7 +1676,7 @@ msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" #: shared-bindings/digitalio/DigitalInOut.c @@ -1652,6 +1727,10 @@ msgstr "Sistema de archivos de solo-Lectura" msgid "Read-only object" msgstr "Objeto de solo-lectura" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" msgstr "Refresco demasiado pronto" @@ -1664,6 +1743,10 @@ msgstr "RemoteTransmissionRequests limitado a 8 bytes" msgid "Requested AES mode is unsupported" msgstr "El modo AES solicitado no es compatible" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" msgstr "Canal derecho no soportado" @@ -2036,6 +2119,10 @@ msgstr "Operación no soportada" msgid "Unsupported pull value." msgstr "valor pull no soportado." +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -2046,6 +2133,10 @@ msgstr "Tamaño del valor != del tamaño fijo requerido" msgid "Value length > max_length" msgstr "Tamaño de valor > max_length" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "funciones Viper no soportan por el momento, más de 4 argumentos" @@ -2462,6 +2553,10 @@ msgstr "El argumento de chr() no esta en el rango(256)" msgid "circle can only be registered in one parent" msgstr "circulo solo puede ser registrado con un pariente" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "color buffer debe ser 3 bytes (RGB) ó 4 bytes (RGB + pad byte)" @@ -2534,6 +2629,10 @@ 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/ndarray.c +msgid "data type not understood" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "números decimales no soportados" @@ -2542,6 +2641,10 @@ msgstr "números decimales no soportados" msgid "default 'except' must be last" msgstr "'except' por defecto deberia estar de último" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2643,6 +2746,10 @@ msgstr "esperando solo un valor para set" msgid "expecting key:value for dict" msgstr "esperando la clave:valor para dict" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "argumento(s) por palabra clave adicionales fueron dados" @@ -2846,8 +2953,8 @@ 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" +msgid "input argument must be an integer, a tuple, or a list" +msgstr "" #: extmod/ulab/code/fft/fft.c msgid "input array length must be power of 2" @@ -3073,8 +3180,8 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "max_length debe ser 0-%d cuando fixed_length es %s" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" -msgstr "max_lenght debe ser > 0" +msgid "max_length must be >= 0" +msgstr "" #: extmod/ulab/code/ndarray.c msgid "maximum number of dimensions is 4" @@ -3092,6 +3199,10 @@ msgstr "maxiter tiene que ser > 0" msgid "maxiter should be > 0" msgstr "maxiter debe ser > 0" +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3174,6 +3285,10 @@ msgstr "NIC no disponible" msgid "no binding for nonlocal found" msgstr "no se ha encontrado ningún enlace para nonlocal" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "ningún módulo se llama '%q'" @@ -3213,6 +3328,14 @@ msgstr "" "no deberia estar/tener agumento por palabra clave despues de argumento por " "palabra clave" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "" + #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "norma está definida para arrays 1D y 2D" @@ -3286,6 +3409,10 @@ msgstr "string de longitud impar" msgid "offset is too large" msgstr "offset es demasiado grande" +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "" + #: py/objstr.c py/objstrunicode.c msgid "offset out of bounds" msgstr "offset fuera de límites" @@ -3312,10 +3439,6 @@ msgstr "los operandos no se pueden transmitir juntos" 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" @@ -3406,6 +3529,8 @@ 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_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3504,6 +3629,10 @@ msgstr "script de compilación no soportado" msgid "shape must be a tuple" msgstr "forma tiene que ser una tupla" +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "signo no permitido en el espeficador de string format" @@ -3634,6 +3763,10 @@ msgstr "" msgid "timeout must be 0.0-100.0 seconds" msgstr "el tiempo de espera debe ser 0.0-100.0 segundos" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "" + #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "timeout must be >= 0.0" msgstr "tiempo muerto debe ser >= 0.0" @@ -3658,6 +3791,10 @@ msgstr "tobytes solo pueden ser invocados por arrays densos" msgid "too many arguments provided with the given format" msgstr "demasiados argumentos provistos con el formato dado" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "demasiados índices" @@ -3667,6 +3804,10 @@ msgstr "demasiados índices" msgid "too many values to unpack (expected %d)" msgstr "demasiados valores para descomprimir (%d esperado)" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "trapz está definido para arreglos 1D de igual tamaño" @@ -3675,10 +3816,6 @@ msgstr "trapz está definido para arreglos 1D de igual tamaño" msgid "trigger level must be 0 or 1" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "tuple index fuera de rango" - #: py/obj.c msgid "tuple/list has wrong length" msgstr "tupla/lista tiene una longitud incorrecta" @@ -3869,6 +4006,10 @@ msgstr "tipo de salida incorrecta" msgid "x value out of bounds" msgstr "valor x fuera de límites" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "y deberia ser un int" @@ -3893,6 +4034,28 @@ 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 "input argument must be an integer or a 2-tuple" +#~ msgstr "el argumento de entrada debe ser un entero o una tupla de par" + +#~ msgid "operation is not implemented for flattened array" +#~ msgstr "operación no está implementada para arrays aplanados" + +#~ msgid "tuple index out of range" +#~ msgstr "tuple index fuera de rango" + +#~ msgid "" +#~ "\n" +#~ "Code done running. Waiting for reload.\n" +#~ msgstr "" +#~ "\n" +#~ "El código terminó su ejecución. Esperando para recargar.\n" + +#~ msgid "Frequency captured is above capability. Capture Paused." +#~ msgstr "Frecuencia capturada por encima de la capacidad. Captura en pausa." + +#~ msgid "max_length must be > 0" +#~ msgstr "max_lenght debe ser > 0" + #~ msgid "Press any key to enter the REPL. Use CTRL-D to reload." #~ msgstr "" #~ "Presiona cualquier tecla para entrar al REPL. Usa CTRL-D para recargar." diff --git a/locale/fil.po b/locale/fil.po index e55fc5e2cc..ddd5f3dfe4 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-12-14 12:59-0500\n" +"POT-Creation-Date: 2021-01-04 12:55-0600\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy \n" "Language-Team: fil\n" @@ -18,7 +18,13 @@ msgstr "" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" +msgstr "" + +#: main.c +msgid "" +"\n" +"Code stopped by auto-reload.\n" msgstr "" #: supervisor/shared/safe_mode.c @@ -109,6 +115,11 @@ msgid "%q() takes %d positional arguments but %d were given" msgstr "" "Ang %q() ay kumukuha ng %d positional arguments pero %d lang ang binigay" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + #: py/argcheck.c msgid "'%q' argument required" msgstr "'%q' argument kailangan" @@ -271,6 +282,10 @@ msgstr "0.0 para sa complex power" msgid "3-arg pow() not supported" msgstr "3-arg pow() hindi suportado" +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" @@ -535,10 +550,26 @@ msgstr "Sa gitna ng 0 o 255 dapat ang bytes." msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "" @@ -572,6 +603,10 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "Hindi maaaring output ang mga parehong channel sa parehong pin" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "Hindi maaring mabasa kapag walang MISO pin." @@ -615,6 +650,10 @@ msgstr "Hindi puedeng hindi sigurado ang get sizeof scalar" msgid "Cannot vary frequency on a timer that is already in use" msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." msgstr "Hindi maaring isulat kapag walang MOSI pin." @@ -948,6 +987,10 @@ msgstr "Mayroong file" msgid "Filters too complex" msgstr "" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "" + #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" msgstr "" @@ -957,10 +1000,6 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -970,6 +1009,10 @@ msgstr "" msgid "Function requires lock" msgstr "Function nangangailangan ng lock" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "" + #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -1098,6 +1141,7 @@ msgstr "Mali ang PWM frequency" msgid "Invalid Pin" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Maling argumento" @@ -1158,6 +1202,7 @@ msgstr "Mali ang phase" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1206,6 +1251,14 @@ msgstr "Mali ang run mode." msgid "Invalid security_mode" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "" + #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" msgstr "" @@ -1246,6 +1299,10 @@ msgstr "Haba ay dapat int" msgid "Length must be non-negative" msgstr "Haba ay dapat hindi negatibo" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "Hindi ma-initialize ang MISO pin." @@ -1475,7 +1532,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1487,6 +1548,18 @@ msgstr "" msgid "Only raw int supported for ip" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1495,6 +1568,10 @@ msgstr "" msgid "Oversample must be multiple of 8." msgstr "Oversample ay dapat multiple ng 8." +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" @@ -1512,6 +1589,10 @@ msgstr "" msgid "ParallelBus not yet supported" msgstr "" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + #: py/moduerrno.c msgid "Permission denied" msgstr "Walang pahintulot" @@ -1538,10 +1619,6 @@ msgstr "" msgid "Pin number already reserved by EXTI" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -1582,7 +1659,7 @@ msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" #: shared-bindings/digitalio/DigitalInOut.c @@ -1634,6 +1711,10 @@ msgstr "Basahin-lamang mode" msgid "Read-only object" msgstr "Basahin-lamang" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" msgstr "" @@ -1646,6 +1727,10 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" msgstr "Hindi supportado ang kanang channel" @@ -2004,6 +2089,10 @@ msgstr "Hindi sinusuportahang operasyon" msgid "Unsupported pull value." msgstr "Hindi suportado ang pull value." +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -2014,6 +2103,10 @@ msgstr "" msgid "Value length > max_length" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "" @@ -2431,6 +2524,10 @@ msgstr "chr() arg wala sa sakop ng range(256)" msgid "circle can only be registered in one parent" msgstr "" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "color buffer ay dapat na 3 bytes (RGB) o 4 bytes (RGB + pad byte)" @@ -2503,6 +2600,10 @@ msgstr "" msgid "data must be of equal length" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "data type not understood" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "decimal numbers hindi sinusuportahan" @@ -2511,6 +2612,10 @@ msgstr "decimal numbers hindi sinusuportahan" msgid "default 'except' must be last" msgstr "default 'except' ay dapat sa huli" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2615,6 +2720,10 @@ msgstr "umaasa sa value para sa set" msgid "expecting key:value for dict" msgstr "umaasang key: halaga para sa dict" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "dagdag na keyword argument na ibinigay" @@ -2819,7 +2928,7 @@ 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" +msgid "input argument must be an integer, a tuple, or a list" msgstr "" #: extmod/ulab/code/fft/fft.c @@ -3047,7 +3156,7 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" +msgid "max_length must be >= 0" msgstr "" #: extmod/ulab/code/ndarray.c @@ -3066,6 +3175,10 @@ msgstr "" msgid "maxiter should be > 0" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3148,6 +3261,10 @@ msgstr "walang magagamit na NIC" msgid "no binding for nonlocal found" msgstr "no binding para sa nonlocal, nahanap" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "walang module na '%q'" @@ -3185,6 +3302,14 @@ msgstr "non-keyword arg sa huli ng */**" msgid "non-keyword arg after keyword arg" msgstr "non-keyword arg sa huli ng keyword arg" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "" + #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3257,6 +3382,10 @@ msgstr "odd-length string" msgid "offset is too large" msgstr "" +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "" + #: py/objstr.c py/objstrunicode.c #, fuzzy msgid "offset out of bounds" @@ -3284,10 +3413,6 @@ msgstr "" 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 "" @@ -3379,6 +3504,8 @@ 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_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3477,6 +3604,10 @@ msgstr "script kompilasyon hindi supportado" msgid "shape must be a tuple" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "sign hindi maaring string format specifier" @@ -3607,6 +3738,10 @@ msgstr "" msgid "timeout must be 0.0-100.0 seconds" msgstr "" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "" + #: shared-bindings/_bleio/CharacteristicBuffer.c #, fuzzy msgid "timeout must be >= 0.0" @@ -3632,6 +3767,10 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "masyadong maraming mga argumento na ibinigay sa ibinigay na format" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "" @@ -3641,6 +3780,10 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "masyadong maraming values para i-unpact (umaasa ng %d)" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -3649,10 +3792,6 @@ msgstr "" msgid "trigger level must be 0 or 1" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "indeks ng tuple wala sa sakop" - #: py/obj.c msgid "tuple/list has wrong length" msgstr "mali ang haba ng tuple/list" @@ -3844,6 +3983,10 @@ msgstr "" msgid "x value out of bounds" msgstr "wala sa sakop ang address" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "y ay dapat int" @@ -3869,6 +4012,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "tuple index out of range" +#~ msgstr "indeks ng tuple wala sa sakop" + #~ msgid "Press any key to enter the REPL. Use CTRL-D to reload." #~ msgstr "" #~ "Pindutin ang anumang key upang pumasok sa REPL. Gamitin ang CTRL-D upang " diff --git a/locale/fr.po b/locale/fr.po index eef3132739..ad0ed6e7af 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -7,23 +7,31 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-14 12:59-0500\n" -"PO-Revision-Date: 2020-12-08 19:21+0000\n" -"Last-Translator: Antonin ENFRUN \n" +"POT-Creation-Date: 2021-01-04 12:55-0600\n" +"PO-Revision-Date: 2021-01-13 16:07+0000\n" +"Last-Translator: Hugo Dahl \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.4-dev\n" +"X-Generator: Weblate 4.4.1-dev\n" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" msgstr "" "\n" -"Fin d'exécution du code. En attente de rechargement.\n" +"Exécution du code complété.\n" + +#: main.c +msgid "" +"\n" +"Code stopped by auto-reload.\n" +msgstr "" +"\n" +"Exécution du code arrêté par l'auto-rechargement.\n" #: supervisor/shared/safe_mode.c msgid "" @@ -51,7 +59,7 @@ msgstr " sortie :\n" #: py/objstr.c #, c-format msgid "%%c requires int or char" -msgstr "%%c nécessite un entier 'int' ou un caractère 'char'" +msgstr "%%c nécessite un chiffre entier 'int' ou un caractère 'char'" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format @@ -66,7 +74,7 @@ msgstr "Échec de %q : %d" #: shared-bindings/microcontroller/Pin.c msgid "%q in use" -msgstr "%q utilisé" +msgstr "%q en cours d'utilisation" #: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c @@ -74,7 +82,7 @@ msgstr "%q utilisé" #: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c #: py/objstrunicode.c msgid "%q index out of range" -msgstr "index %q hors gamme" +msgstr "index %q hors de portée" #: py/obj.c msgid "%q indices must be integers, not %q" @@ -94,7 +102,7 @@ msgstr "%q doit être >= 0" #: shared-bindings/memorymonitor/AllocationAlarm.c #: shared-bindings/vectorio/Circle.c shared-bindings/vectorio/Rectangle.c msgid "%q must be >= 1" -msgstr "%q doit être >=1" +msgstr "%q doit être >= 1" #: shared-module/vectorio/Polygon.c msgid "%q must be a tuple of length 2" @@ -106,19 +114,24 @@ msgstr "%q est hors de porté" #: ports/atmel-samd/common-hal/microcontroller/Pin.c msgid "%q pin invalid" -msgstr "PIN %q invalide" +msgstr "broche %q invalide" #: shared-bindings/fontio/BuiltinFont.c msgid "%q should be an int" -msgstr "%q doit être un entier (int)" +msgstr "%q doit être un chiffre entier (int)" #: py/bc.c py/objnamedtuple.c msgid "%q() takes %d positional arguments but %d were given" -msgstr "%q() prend %d arguments positionnels mais %d ont été donnés" +msgstr "%q() prend %d paramètres positionnels mais %d ont été donnés" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "%s erreur 0x%x" #: py/argcheck.c msgid "'%q' argument required" -msgstr "'%q' argument requis" +msgstr "paramètre '%q' requis" #: py/runtime.c msgid "'%q' object cannot assign attribute '%q'" @@ -159,7 +172,7 @@ msgstr "l'objet '%q' n'est pas souscriptable" #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" -msgstr "'%s' attend un label" +msgstr "'%s' attend une étiquette" #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format @@ -184,12 +197,12 @@ msgstr "'%s' attend une adresse de la forme [a, b]" #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects an integer" -msgstr "'%s' attend un entier" +msgstr "'%s' attend un chiffre entier" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects at most r%d" -msgstr "'%s' s'attend au plus à r%d" +msgstr "'%s' attend au plus r%d" #: py/emitinlinethumb.c #, c-format @@ -199,16 +212,16 @@ msgstr "'%s' attend {r0, r1, ...}" #: py/emitinlinextensa.c #, c-format msgid "'%s' integer %d is not within range %d..%d" -msgstr "'%s' l'entier %d n'est pas dans la gamme %d..%d" +msgstr "'%s' le chiffre entier %d n'est pas dans la portée %d..%d" #: py/emitinlinethumb.c #, c-format msgid "'%s' integer 0x%x does not fit in mask 0x%x" -msgstr "'%s' l'entier 0x%x ne correspond pas au masque 0x%x" +msgstr "'%s' le chiffre entier 0x%x ne correspond pas au masque 0x%x" #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" -msgstr "'=' alignement non autorisé dans la spéc. de format de chaîne" +msgstr "'=' alignement non permis dans la spécification du format de chaîne" #: shared-module/struct/__init__.c msgid "'S' and 'O' are not supported format types" @@ -216,43 +229,43 @@ msgstr "'S' et 'O' ne sont pas des types de format supportés" #: py/compile.c msgid "'align' requires 1 argument" -msgstr "'align' nécessite 1 argument" +msgstr "'align' nécessite 1 paramètre" #: py/compile.c msgid "'await' outside function" -msgstr "'await' en dehors d'une fonction" +msgstr "'await' dehors d'une fonction" #: py/compile.c msgid "'await', 'async for' or 'async with' outside async function" -msgstr "'await', 'async for' ou 'async with' au dehors d'une fonction async" +msgstr "'await', 'async for' ou 'async with' dehors d'une fonction async" #: py/compile.c msgid "'break' outside loop" -msgstr "'break' en dehors d'une boucle" +msgstr "'break' dehors d'une boucle" #: py/compile.c msgid "'continue' outside loop" -msgstr "'continue' en dehors d'une boucle" +msgstr "'continue' dehors d'une boucle" #: py/objgenerator.c msgid "'coroutine' object is not an iterator" -msgstr "L'objet « coroutine » n'est pas un itérateur" +msgstr "L'objet \"coroutine\" n'est pas un itérateur" #: py/compile.c msgid "'data' requires at least 2 arguments" -msgstr "'data' nécessite au moins 2 arguments" +msgstr "'data' nécessite au moins 2 paramètres" #: py/compile.c msgid "'data' requires integer arguments" -msgstr "'data' nécessite des arguments entiers" +msgstr "'data' nécessite des paramètre de chiffres entiers" #: py/compile.c msgid "'label' requires 1 argument" -msgstr "'label' nécessite 1 argument" +msgstr "'label' nécessite 1 paramètre" #: py/compile.c msgid "'return' outside function" -msgstr "'return' en dehors d'une fonction" +msgstr "'return' dehors d'une fonction" #: py/compile.c msgid "'yield from' inside async function" @@ -260,7 +273,7 @@ msgstr "'yield from' dans une fonction async" #: py/compile.c msgid "'yield' outside function" -msgstr "'yield' en dehors d'une fonction" +msgstr "'yield' dehors d'une fonction" #: py/compile.c msgid "*x must be assignment target" @@ -276,12 +289,16 @@ msgstr "0.0 à une puissance complexe" #: py/modbuiltins.c msgid "3-arg pow() not supported" -msgstr "pow() non supporté avec 3 arguments" +msgstr "pow() non supporté avec 3 paramètres" + +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "types à 64 bit" #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" -msgstr "Un canal d'interruptions matérielles est déjà utilisé" +msgstr "Un canal d'interruptions matériel est déjà utilisé" #: ports/esp32s2/common-hal/analogio/AnalogIn.c msgid "ADC2 is being used by WiFi" @@ -294,7 +311,7 @@ msgstr "L'adresse doit être longue de %d octets" #: shared-bindings/_bleio/Address.c msgid "Address type out of range" -msgstr "Type d'adresse hors plage" +msgstr "Type d'adresse hors portée" #: ports/esp32s2/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" @@ -330,11 +347,11 @@ msgstr "Tous les canaux d'événements sont utilisés" #: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "All sync event channels in use" -msgstr "Tous les canaux d'événements de synchro sont utilisés" +msgstr "Tous les canaux d'événements sync (sync event channels) sont utilisés" #: shared-bindings/pwmio/PWMOut.c msgid "All timers for this pin are in use" -msgstr "Tous les timers pour cette broche sont utilisés" +msgstr "Tous les minuteurs pour cette broche sont utilisés" #: ports/atmel-samd/common-hal/_pew/PewPew.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -350,7 +367,7 @@ msgstr "Tous les timers pour cette broche sont utilisés" #: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c #: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c msgid "All timers in use" -msgstr "Tous les timers sont utilisés" +msgstr "Tous les minuteurs sont utilisés" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Already advertising." @@ -382,7 +399,8 @@ msgstr "Fonctionnalité AnalogOut non supportée" #: shared-bindings/analogio/AnalogOut.c msgid "AnalogOut is only 16 bits. Value must be less than 65536." msgstr "" -"AnalogOut est seulement 16 bits. Les valeurs doivent être inf. à 65536." +"AnalogOut est seulement 16 bits. Les valeurs doivent être inférieures à " +"65536." #: ports/atmel-samd/common-hal/analogio/AnalogOut.c msgid "AnalogOut not supported on given pin" @@ -399,7 +417,7 @@ msgstr "Le tableau doit contenir des demi-mots (type 'H')" #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Array values should be single bytes." -msgstr "Les valeurs du tableau doivent être des octets simples 'bytes'." +msgstr "Les valeurs du tableau doivent être des octets singuliers." #: shared-bindings/microcontroller/Pin.c msgid "At most %d %q may be specified (not %d)" @@ -429,17 +447,17 @@ msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" msgstr "" -"Auto-chargement activé. Copiez simplement les fichiers en USB pour les " -"lancer ou entrez sur REPL pour le désactiver.\n" +"Auto-chargement activé. Copiez ou sauvegardez les fichiers via USB pour les " +"lancer ou démarrez le 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" +msgstr "Baudrate non supporté par le périphérique" #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c msgid "Below minimum frame rate" -msgstr "Inférieur à la fréquence d'images minimale" +msgstr "Au-dessous de la fréquence d'images minimale" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Bit clock and word select must share a clock unit" @@ -448,7 +466,7 @@ 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" +msgstr "Bit depth doit être entre 1 et 6 inclusivement, et non %d" #: shared-bindings/audiobusio/PDMIn.c msgid "Bit depth must be multiple of 8." @@ -460,7 +478,7 @@ msgstr "RX et TX requis pour le contrôle de flux" #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" -msgstr "Les deux entrées doivent supporter les interruptions matérielles" +msgstr "Les deux broches doivent supporter les interruptions matérielles" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -543,10 +561,30 @@ msgstr "Les octets 'bytes' doivent être entre 0 et 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Les blocs CBC doivent être des multiples de 16 octets" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "CRC ou somme de contrôle invalide" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "Appelez super () .__ init __ () avant d'accéder à l'objet natif." +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "L'alarme peut seulement être depuis TRC IO depuis le someil profond." + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" +"L'alarme peut seulement être sur une broche basse tandis que d'autres " +"alarment sont sur des broches hautes depuis le someil profond." + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" +"L'alarme peut seulement être sur deux broches basses depuis le someil " +"profond." + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "Impossible de définir CCCD sur une caractéristique locale" @@ -566,7 +604,7 @@ msgstr "Impossible de supprimer les valeurs" #: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c #: ports/nrf/common-hal/digitalio/DigitalInOut.c msgid "Cannot get pull while in output mode" -msgstr "Ne peut être tiré ('pull') en mode 'output'" +msgstr "Ne peut être tiré ('pull') en mode sortie ('output')" #: ports/nrf/common-hal/microcontroller/Processor.c msgid "Cannot get temperature" @@ -582,6 +620,10 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "Les 2 canaux de sortie ne peuvent être sur la même broche" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "Ne peut tirer ('pull') sur une broche d'entrée ('input') seule." + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "Impossible de lire sans broche MISO." @@ -603,7 +645,8 @@ msgstr "" #: shared-bindings/digitalio/DigitalInOut.c msgid "Cannot set value when direction is input." -msgstr "Impossible d'affecter une valeur quand la direction est 'input'." +msgstr "" +"Impossible d'affecter une valeur quand la direction est entrentre ('input')." #: ports/esp32s2/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c @@ -620,12 +663,15 @@ msgstr "Pas de transfert sans broches MOSI et MISO." #: extmod/moductypes.c msgid "Cannot unambiguously get sizeof scalar" -msgstr "Impossible d'obtenir la taille du scalaire sans ambigüité" +msgstr "Impossible d'obtenir la taille (sizeof) du scalaire sans ambigüité" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Cannot vary frequency on a timer that is already in use" -msgstr "" -"Impossible de faire varier la fréquence sur une minuterie déjà utilisée" +msgstr "Impossible de faire varier la fréquence sur un minuteur déjà utilisée" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "Ne peut reveillé sur le board de broche. Seuleument à niveau." #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." @@ -650,11 +696,11 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "CircuitPython was unable to allocate the heap.\n" -msgstr "CircuitPython n'as pu faire l'allocation de la pile\n" +msgstr "CircuitPython n'as pu faire l'allocation de la pile.\n" #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." -msgstr "Echec de l'init. de la broche d'horloge." +msgstr "Échec de l'initialization de la broche d'horloge." #: shared-module/bitbangio/I2C.c msgid "Clock stretch too long" @@ -671,7 +717,7 @@ msgstr "L'entrée 'Column' doit être un digitalio.DigitalInOut" #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c #: shared-bindings/displayio/ParallelBus.c msgid "Command must be an int between 0 and 255" -msgstr "La commande doit être un entier entre 0 et 255" +msgstr "La commande doit être un chiffre entier entre 0 et 255" #: shared-bindings/_bleio/Connection.c msgid "" @@ -691,7 +737,7 @@ msgstr "Code brut corrompu" #: ports/cxd56/common-hal/camera/Camera.c msgid "Could not initialize Camera" -msgstr "Impossible d'initialisé la Camera" +msgstr "Impossible d'initialiser Camera" #: ports/cxd56/common-hal/gnss/GNSS.c msgid "Could not initialize GNSS" @@ -704,19 +750,19 @@ msgstr "Impossible d'initialiser la carte SD" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c #: ports/esp32s2/common-hal/busio/UART.c msgid "Could not initialize UART" -msgstr "L'UART n'a pu être initialisé" +msgstr "Impossible d'initialiser UART" #: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not initialize channel" -msgstr "Impossible d'initialiser la chaîne" +msgstr "Impossible d'initialiser le canal" #: ports/esp32s2/common-hal/pwmio/PWMOut.c ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not initialize timer" -msgstr "Impossible d'initialiser la minuterie" +msgstr "Impossible d'initialiser le minuteur" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init channel" -msgstr "Impossible de réinitialiser la chaîne" +msgstr "Impossible de réinitialiser le canal" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Could not re-init timer" @@ -749,7 +795,7 @@ msgstr "Impossible d'allouer le décodeur" #: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c #: shared-module/audiomp3/MP3Decoder.c msgid "Couldn't allocate first buffer" -msgstr "Impossible d'allouer le 1er tampon" +msgstr "Impossible d'allouer le premier tampon" #: shared-module/audiomp3/MP3Decoder.c msgid "Couldn't allocate input buffer" @@ -758,11 +804,11 @@ msgstr "Impossible d'allouer le tampon d'entrée" #: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c #: shared-module/audiomp3/MP3Decoder.c msgid "Couldn't allocate second buffer" -msgstr "Impossible d'allouer le 2e tampon" +msgstr "Impossible d'allouer le deuxième tampon" #: supervisor/shared/safe_mode.c msgid "Crash into the HardFault_Handler." -msgstr "Crash dans le HardFault_Handler." +msgstr "Échec vers le HardFault_Handler." #: ports/stm/common-hal/analogio/AnalogOut.c msgid "DAC Channel Init Error" @@ -783,11 +829,11 @@ msgstr "La broche 'Data 0' doit être aligné sur l'octet" #: shared-module/audiocore/WaveFile.c msgid "Data chunk must follow fmt chunk" -msgstr "Un bloc de données doit suivre un bloc de format" +msgstr "Un bloc de données doit suivre un bloc fmt" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Data too large for advertisement packet" -msgstr "Données trop volumineuses pour un paquet de diffusion" +msgstr "Données trop volumineuses pour un paquet d'avertissement" #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." @@ -814,7 +860,8 @@ msgstr "La rotation d'affichage doit se faire par incréments de 90 degrés" #: shared-bindings/digitalio/DigitalInOut.c msgid "Drive mode not used when direction is input." -msgstr "Le mode Drive n'est pas utilisé quand la direction est 'input'." +msgstr "" +"Le mode Drive n'est pas utilisé quand la direction est entrante ('input')." #: shared-bindings/aesio/aes.c msgid "ECB only operates on 16 bytes at a time" @@ -853,11 +900,11 @@ msgstr "Un 'DigitalInOut' est attendu" #: shared-bindings/_bleio/Characteristic.c msgid "Expected a Service" -msgstr "Attendu un service" +msgstr "Un Service est attendu" #: shared-bindings/_bleio/Adapter.c msgid "Expected a UART" -msgstr "Un 'UART' est attendu" +msgstr "Un UART est attendu" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c #: shared-bindings/_bleio/Service.c @@ -866,11 +913,11 @@ msgstr "Un UUID est attendu" #: shared-bindings/_bleio/Adapter.c msgid "Expected an Address" -msgstr "Attendu une adresse" +msgstr "Un Address est attendu" #: shared-bindings/alarm/__init__.c msgid "Expected an alarm" -msgstr "" +msgstr "Une alarme était prévue" #: shared-module/_pixelbuf/PixelBuf.c #, c-format @@ -880,11 +927,11 @@ msgstr "Tuple de longueur %d attendu, obtenu %d" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Extended advertisements with scan response not supported." msgstr "" -"Les publicités étendues avec réponse d'analyse ne sont pas prises en charge." +"Les avertissement étendues avec analyse de réponse ne sont pas supportées." #: extmod/ulab/code/fft/fft.c msgid "FFT is defined for ndarrays only" -msgstr "La FFT est définie pour les ndarrays uniquement" +msgstr "La FFT est définie uniquement pour les ndarrays" #: extmod/ulab/code/fft/fft.c msgid "FFT is implemented for linear arrays only" @@ -931,7 +978,7 @@ msgstr "Impossible de se connecter : erreur interne" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Failed to connect: timeout" -msgstr "Impossible de se connecter : délai d'expiration" +msgstr "Impossible de se connecter: délai dépassé" #: ports/esp32s2/common-hal/wifi/__init__.c msgid "Failed to init wifi" @@ -948,7 +995,7 @@ msgstr "Impossible de libérer mutex, err 0x%04x" #: supervisor/shared/safe_mode.c msgid "Failed to write internal flash." -msgstr "Échec de l'écriture du flash interne." +msgstr "Échec de l'écriture vers flash interne." #: py/moduerrno.c msgid "File exists" @@ -958,7 +1005,11 @@ msgstr "Le fichier existe" #: ports/esp32s2/common-hal/canio/Listener.c #: ports/stm/common-hal/canio/Listener.c msgid "Filters too complex" -msgstr "Filtre trop complexe" +msgstr "Filtres trop complexe" + +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "Image du microprogramme est invalide" #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" @@ -967,21 +1018,22 @@ msgstr "Format non supporté" #: shared-module/framebufferio/FramebufferDisplay.c #, c-format msgid "Framebuffer requires %d bytes" -msgstr "Le framebuffer nécessite %d octets" - -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "La fréquence capturée est au delà des capacités. Capture en pause." +msgstr "FrameBuffer nécessite %d octets" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" -"La fréquence doit correspondre à PWMOut existant à l'aide de cette minuterie" +"La fréquence doit correspondre à PWMOut existant à l'utilisation de ce " +"minuteur" #: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c #: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c msgid "Function requires lock" -msgstr "La fonction nécessite un verrou" +msgstr "La fonction nécessite un verrou ('lock')" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "Échec génerique" #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c @@ -1005,11 +1057,11 @@ msgstr "Matériel utilisé, essayez d'autres broches" #: shared-bindings/wifi/Radio.c msgid "Hostname must be between 1 and 253 characters" -msgstr "Hostname doit faire entre 1 et 253 caractères" +msgstr "Hostname doit être entre 1 et 253 caractères" #: extmod/vfs_posix_file.c py/objstringio.c msgid "I/O operation on closed file" -msgstr "opération d'E/S sur un fichier fermé" +msgstr "Opération d'E/S sur un fichier fermé" #: ports/stm/common-hal/busio/I2C.c msgid "I2C Init Error" @@ -1021,19 +1073,19 @@ msgstr "I2SOut n'est pas disponible" #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "IOs 0, 2 & 4 do not support internal pullup in sleep" -msgstr "" +msgstr "IOs 0, 2 & 4 ne supportent pas l'éleveuse interne en mode someil" #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" -msgstr "IV doit être long de %d octets" +msgstr "IV doit être de longueur de %d octets" #: py/persistentcode.c msgid "" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "mpy-update for more info." msgstr "" -"Fichier .mpy incompatible. Merci de mettre à jour tous les fichiers .mpy." +"Fichier .mpy incompatible. Merci de mettre à jour tous les fichiers .mpy. " "Voir http://adafru.it/mpy-update pour plus d'informations." #: shared-bindings/_pew/PewPew.c @@ -1042,7 +1094,7 @@ 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" +msgstr "Échec d'initialisation par manque de mémoire" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c msgid "Input taking too long" @@ -1082,7 +1134,7 @@ msgstr "Broche invalide pour '%q'" #: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/canio/CAN.c #: ports/stm/common-hal/sdioio/SDCard.c msgid "Invalid %q pin selection" -msgstr "Sélection de pin %q invalide" +msgstr "Sélection de broche %q invalide" #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" @@ -1094,7 +1146,7 @@ msgstr "Fichier BMP invalide" #: shared-bindings/wifi/Radio.c msgid "Invalid BSSID" -msgstr "BSSID Invalide" +msgstr "BSSID invalide" #: ports/esp32s2/common-hal/analogio/AnalogOut.c #: ports/stm/common-hal/analogio/AnalogOut.c @@ -1109,11 +1161,12 @@ msgstr "Fréquence de PWM invalide" #: ports/esp32s2/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" -msgstr "" +msgstr "Broche invalide" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" -msgstr "Argument invalide" +msgstr "Paramètre invalide" #: shared-module/displayio/Bitmap.c msgid "Invalid bits per value" @@ -1125,12 +1178,12 @@ msgstr "Longueur de tampon invalide" #: shared-bindings/_pixelbuf/PixelBuf.c msgid "Invalid byteorder string" -msgstr "Chaîne d'octets non valide" +msgstr "Chaîne byteorder 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" +msgstr "Période de capture invalide. Portée valide : 1 à 500" #: shared-bindings/audiomixer/Mixer.c msgid "Invalid channel count" @@ -1150,7 +1203,7 @@ msgstr "Taille de bloc de formatage invalide" #: ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "Invalid frequency" -msgstr "fréquence non Valide" +msgstr "Fréquence non valide" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Invalid frequency supplied" @@ -1158,7 +1211,7 @@ msgstr "Fréquence invalide fournie" #: supervisor/shared/safe_mode.c msgid "Invalid memory access." -msgstr "Accès mémoire invalide." +msgstr "Accès à la mémoire invalide." #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c msgid "Invalid number of bits" @@ -1171,6 +1224,7 @@ msgstr "Phase invalide" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1200,7 +1254,7 @@ msgstr "Broches invalides" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Invalid pins for PWMOut" -msgstr "Broches non valides pour PWMOut" +msgstr "Broches invalides pour PWMOut" #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c #: shared-bindings/displayio/FourWire.c @@ -1209,7 +1263,7 @@ msgstr "Polarité invalide" #: shared-bindings/_bleio/Characteristic.c msgid "Invalid properties" -msgstr "Propriétés non valides" +msgstr "Propriétés invalides" #: shared-bindings/microcontroller/__init__.c msgid "Invalid run mode." @@ -1217,7 +1271,15 @@ msgstr "Mode de lancement invalide." #: shared-module/_bleio/Attribute.c msgid "Invalid security_mode" -msgstr "'mode_security' non valide" +msgstr "'security_mode' invalide" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "Taille invalide" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "État invalide" #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" @@ -1233,7 +1295,7 @@ msgstr "Fichier WAVE invalide" #: ports/stm/common-hal/busio/UART.c msgid "Invalid word/bit length" -msgstr "Longueur de mot / bit non valide" +msgstr "Longueur de mot / bit invalide" #: shared-bindings/aesio/aes.c msgid "Key must be 16, 24, or 32 bytes long" @@ -1253,32 +1315,36 @@ msgstr "'Layer' doit être un 'Group' ou une sous-classe 'TileGrid'." #: py/objslice.c msgid "Length must be an int" -msgstr "La longueur doit être un nombre entier" +msgstr "Length doit être un chiffre entier (int)" #: py/objslice.c msgid "Length must be non-negative" -msgstr "La longueur ne doit pas être négative" +msgstr "Length ne doit pas être négatif" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "Adresse physique (MAC) invalide" #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." -msgstr "Echec de l'init. de la broche MISO." +msgstr "Échec de l'initialization de la broche MISO." #: shared-module/bitbangio/SPI.c msgid "MOSI pin init failed." -msgstr "Echec de l'init. de la broche MOSI." +msgstr "Échec de l'initialization de la broche MOSI." #: shared-module/displayio/Shape.c #, c-format msgid "Maximum x value when mirrored is %d" -msgstr "La valeur max. de x est %d lors d'une opération miroir" +msgstr "La valeur maximale de x est %d lors d'une opération miroir" #: shared-bindings/canio/Message.c msgid "Messages limited to 8 bytes" -msgstr "Message limité a 8 bytes" +msgstr "Messages limités à 8 octets" #: supervisor/shared/safe_mode.c msgid "MicroPython NLR jump failed. Likely memory corruption." -msgstr "Le saut MicroPython NLR a échoué. Altération probable de la mémoire." +msgstr "Échec du saut MicroPython NLR. Corruption de la mémoire probable." #: supervisor/shared/safe_mode.c msgid "MicroPython fatal error." @@ -1374,7 +1440,7 @@ msgstr "Pas de GCLK libre" #: shared-bindings/os/__init__.c msgid "No hardware random available" -msgstr "Pas de source matérielle d'aléa disponible" +msgstr "Aucunes source de valeurs aléatoire matérielle disponible" #: ports/atmel-samd/common-hal/ps2io/Ps2.c msgid "No hardware support on clk pin" @@ -1391,7 +1457,7 @@ msgstr "Aucune clé n'a été spécifiée" #: shared-bindings/time/__init__.c msgid "No long integer support" -msgstr "Pas de support entier long" +msgstr "Pas de support pour chiffre entier long" #: ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "No more channels available" @@ -1399,7 +1465,7 @@ msgstr "Pas de canal supplémentaire disponible" #: ports/esp32s2/common-hal/pwmio/PWMOut.c msgid "No more timers available" -msgstr "Pas d'horloge supplémentaire disponible" +msgstr "Plus de minuteurs disponibles" #: ports/stm/common-hal/pwmio/PWMOut.c msgid "No more timers available on this pin." @@ -1415,15 +1481,15 @@ msgstr "Pas de pulldown sur la broche ; 1Mohm recommandé" #: py/moduerrno.c msgid "No space left on device" -msgstr "Il n'y a plus d'espace libre sur le périphérique" +msgstr "Aucun espace libre sur le dispositif" #: py/moduerrno.c msgid "No such file/directory" -msgstr "Fichier/dossier introuvable" +msgstr "Fichier/répertoire introuvable" #: shared-module/rgbmatrix/RGBMatrix.c msgid "No timer available" -msgstr "Pas de minuterie disponible" +msgstr "Aucun minuteur disponible" #: supervisor/shared/safe_mode.c msgid "Nordic Soft Device failure assertion." @@ -1468,18 +1534,18 @@ msgstr "Uniquement 8 ou 16 bit mono avec " #: ports/esp32s2/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" -msgstr "Seules les adresses IPv4 sont prises en charge" +msgstr "Seulement les adresses IPv4 sont supportées" #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" -msgstr "Seules les sockets IPv4 sont prises en charge" +msgstr "Seulement les sockets IPv4 sont supportés" #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" "Only Windows format, uncompressed BMP supported: given header size is %d" msgstr "" -"Seul le format BMP Windows, non compressé est supporté : la taille de " +"Seulement le format BMP Windows, non compressé est supporté : la taille de " "l'entête fournie est %d" #: shared-module/displayio/OnDiskBitmap.c @@ -1488,12 +1554,16 @@ msgid "" "Only monochrome, indexed 4bpp or 8bpp, and 16bpp or greater BMPs supported: " "%d bpp given" msgstr "" -"Prise en charge uniquement des monochromes, 4 bpp ou 8 bpp indexés et 16 bpp " -"ou plus : %d bpp fournis" +"Seulement les BMP monochromes, 4 bpp ou 8 bpp, ou 16 bpp et plus sont " +"supportés: %d bpp fournis" -#: ports/esp32s2/common-hal/alarm/__init__.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "Seulement une TouchAlarm peu être réglée en someil profond." + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." -msgstr "" +msgstr "Seulement une alarme alarm.time peut être réglée." #: shared-module/displayio/ColorConverter.c msgid "Only one color can be transparent at a time" @@ -1501,7 +1571,19 @@ msgstr "Une seule couleur peut être transparente à la fois" #: shared-bindings/ipaddress/__init__.c msgid "Only raw int supported for ip" -msgstr "IP n'accepte que les entiers bruts" +msgstr "IP n'accepte que les chiffres entiers bruts" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "Opération ou fonction non supportée" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "Timeout de l'opération" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "Hors de mémoire" #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" @@ -1511,12 +1593,16 @@ msgstr "Plus de sockets" msgid "Oversample must be multiple of 8." msgstr "Le sur-échantillonage doit être un multiple de 8." +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "PDMIn non disponible" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" msgstr "" -"La valeur de cycle PWM doit être entre 0 et 65535 inclus (résolution de 16 " -"bits)" +"La valeur de duty_cycle de PWM doit être entre 0 et 65535 inclusivement " +"(résolution de 16 bits)" #: shared-bindings/pwmio/PWMOut.c msgid "" @@ -1529,7 +1615,11 @@ msgstr "" #: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c #: ports/stm/common-hal/displayio/ParallelBus.c msgid "ParallelBus not yet supported" -msgstr "ParallelBus pas encore pris en charge" +msgstr "ParallelBus pas encore supporté" + +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "Périphérique en utilisation" #: py/moduerrno.c msgid "Permission denied" @@ -1542,7 +1632,7 @@ msgstr "Permission refusée" #: ports/nrf/common-hal/analogio/AnalogIn.c #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Pin does not have ADC capabilities" -msgstr "La broche ne peut être utilisée pour l'ADC" +msgstr "La broche 'pin' ne supporte pas les capacitées ADC" #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c @@ -1551,15 +1641,11 @@ msgstr "La broche est entrée uniquement" #: ports/atmel-samd/common-hal/countio/Counter.c msgid "Pin must support hardware interrupts" -msgstr "La broche doit prendre en charge les interruptions matérielles" +msgstr "La broche doit supporter les interruptions matérielles" #: ports/stm/common-hal/pulseio/PulseIn.c msgid "Pin number already reserved by EXTI" -msgstr "Numéro de broche déjà réservé par EXTI" - -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "PinAlarm pas encore implémenté" +msgstr "Numéro de broche 'pin' déjà réservé par EXTI" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format @@ -1574,19 +1660,19 @@ msgstr "" #: py/builtinhelp.c msgid "Plus any modules on the filesystem\n" -msgstr "Ainsi que tout autre module présent sur le système de fichiers\n" +msgstr "Ainsi que tout autres modules présents sur le système de fichiers\n" #: shared-module/vectorio/Polygon.c msgid "Polygon needs at least 3 points" -msgstr "Polygone a besoin d’au moins 3 points" +msgstr "Polygon a besoin d’au moins 3 points" #: ports/esp32s2/common-hal/pulseio/PulseOut.c msgid "" "Port does not accept PWM carrier. Pass a pin, frequency and duty cycle " "instead" msgstr "" -"Ce portage n'accepte pas de PWM carrier. Précisez plutôt pin, frequency et " -"duty cycle" +"Ce port n'accepte pas de PWM carrier. Précisez plutôt les valeurs pin, " +"frequency et duty_cycle" #: ports/atmel-samd/common-hal/pulseio/PulseOut.c #: ports/cxd56/common-hal/pulseio/PulseOut.c @@ -1596,20 +1682,23 @@ msgid "" "Port does not accept pins or frequency. Construct and pass a PWMOut Carrier " "instead" msgstr "" -"Ce portage n'accepte pas pins ou frequency. Construisez et passez un PWMOut " -"Carrier à la place" +"Ce port n'accepte pas de broches ou de fréquence. Construisez plutôt en " +"passant un PWMOut Carrier" #: shared-bindings/_bleio/Adapter.c msgid "Prefix buffer must be on the heap" -msgstr "Le tampon de préfixe doit être sur le tas" +msgstr "Le tampon de préfixe doit être sur la pile" #: main.c msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" +"Appuyez sur n'importe quelle touche pour utiliser le REPL. Utilisez CTRL-D " +"pour relancer.\n" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" +"Feinte de someil profond jusqu'à l'alarme, CTRL-C ou écriture au fichier.\n" #: shared-bindings/digitalio/DigitalInOut.c msgid "Pull not used when direction is output." @@ -1617,34 +1706,34 @@ msgstr "Le tirage 'pull' n'est pas utilisé quand la direction est 'output'." #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" -msgstr "Erreur RNG DeInit" +msgstr "Erreur de désinitiation du RNG (RNG DeInit)" #: ports/stm/common-hal/os/__init__.c msgid "RNG Init Error" -msgstr "Erreur d'initialisation RNG" +msgstr "Erreur d'initialisation du RNG (RNG Init)" #: ports/esp32s2/common-hal/busio/UART.c #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "RS485 inversion specified when not in RS485 mode" -msgstr "Inversion RS485 spécifiée lorsqu'elle n'est pas en mode RS485" +msgstr "Inversion RS485 spécifiée sans être en mode 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 msgid "RTC calibration is not supported on this board" -msgstr "étalonnage de la RTC non supportée sur cette carte" +msgstr "La calibration du RTC non supportée sur cette carte" #: shared-bindings/alarm/time/TimeAlarm.c shared-bindings/time/__init__.c msgid "RTC is not supported on this board" -msgstr "RTC non supportée sur cette carte" +msgstr "RTC non supporté sur cette carte" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c msgid "RTS/CTS/RS485 Not yet supported on this device" -msgstr "RTS / CTS / RS485 Pas encore pris en charge sur cet appareil" +msgstr "RTS / CTS / RS485 Pas encore supporté sur cet appareil" #: ports/stm/common-hal/os/__init__.c msgid "Random number generation error" -msgstr "Erreur de génération de nombres aléatoires" +msgstr "Erreur de génération de chiffres aléatoires" #: shared-bindings/memorymonitor/AllocationSize.c #: shared-bindings/pulseio/PulseIn.c @@ -1659,9 +1748,13 @@ msgstr "Système de fichier en lecture seule" msgid "Read-only object" msgstr "Objet en lecture seule" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "Réponse reçue invalide" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" -msgstr "Rafraîchissez trop tôt" +msgstr "Rafraîchissement trop tôt" #: shared-bindings/canio/RemoteTransmissionRequest.c msgid "RemoteTransmissionRequests limited to 8 bytes" @@ -1669,7 +1762,11 @@ msgstr "RemoteTransmissionRequests limité à 8 octets" #: shared-bindings/aesio/aes.c msgid "Requested AES mode is unsupported" -msgstr "Le mode AES demandé n'est pas pris en charge" +msgstr "Le mode AES demandé n'est pas supporté" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "Resource demandée non trouvée" #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" @@ -1681,11 +1778,11 @@ msgstr "L'entrée de ligne 'Row' doit être un digitalio.DigitalInOut" #: main.c msgid "Running in safe mode! " -msgstr "Tourne en mode sécurisé " +msgstr "Exécution en mode sécurisé! " #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" -msgstr "Le format de carte SD CSD n'est pas pris en charge" +msgstr "Le format de carte SD CSD n'est pas supporté" #: ports/atmel-samd/common-hal/busio/I2C.c ports/esp32s2/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c @@ -1695,12 +1792,12 @@ msgstr "SDA ou SCL a besoin d'une résistance de tirage ('pull up')" #: ports/stm/common-hal/sdioio/SDCard.c #, c-format msgid "SDIO GetCardInfo Error %d" -msgstr "SDIO GetCardInfo erreur %d" +msgstr "Erreur de SDIO GetCardInfo %d" #: ports/stm/common-hal/sdioio/SDCard.c #, c-format msgid "SDIO Init Error %d" -msgstr "SDIO Init erreur %d" +msgstr "Erreur d'initialisation SDIO %d" #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" @@ -1717,7 +1814,7 @@ msgstr "Le taux d'échantillonage doit être positif" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #, c-format msgid "Sample rate too high. It must be less than %d" -msgstr "Taux d'échantillonage trop élevé. Doit être inf. à %d" +msgstr "Taux d'échantillonage trop élevé. Doit être inférieur à %d" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Scan already in progess. Stop with stop_scan." @@ -1725,11 +1822,11 @@ msgstr "Scan déjà en cours. Arrêtez avec stop_scan." #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Selected CTS pin not valid" -msgstr "Broche CTS sélectionnée non valide" +msgstr "La broche CTS sélectionnée n'est pas valide" #: ports/mimxrt10xx/common-hal/busio/UART.c msgid "Selected RTS pin not valid" -msgstr "Broche RTS sélectionnée non valide" +msgstr "La broche RTS sélectionnée n'est pas valide" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c @@ -1742,7 +1839,7 @@ msgstr "Un contexte niveau serveur ne peut avoir de hostname" #: ports/cxd56/common-hal/camera/Camera.c msgid "Size not supported" -msgstr "Taille non prise en charge" +msgstr "Taille n'est pas supportée" #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." @@ -1789,7 +1886,7 @@ msgstr "L'entrée du système doit être gnss.SatelliteSystem" #: ports/stm/common-hal/microcontroller/Processor.c msgid "Temperature read timed out" -msgstr "Temporisation de lecture dépassée" +msgstr "Délais de lecture de température dépassée" #: supervisor/shared/safe_mode.c msgid "" @@ -1804,7 +1901,7 @@ msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode.\n" msgstr "" -"Le module `microcontrôleur` a été utilisé pour démarrer en mode sans échec. " +"Le module `microcontroller` a été utilisé pour démarrer en mode sans échec. " "Appuyez sur reset pour quitter le mode sans échec.\n" #: shared-bindings/rgbmatrix/RGBMatrix.c @@ -1818,7 +1915,7 @@ msgid "" "CIRCUITPY).\n" msgstr "" "La puissance du microcontrôleur a baissé. Assurez-vous que votre " -"alimentation\n" +"alimentation fournit\n" "assez de puissance pour tout le circuit et appuyez sur reset (après avoir " "éjecté CIRCUITPY).\n" @@ -1857,7 +1954,7 @@ msgstr "La largeur de la tuile doit diviser exactement la largeur de l'image" #: shared-bindings/alarm/time/TimeAlarm.c msgid "Time is in the past." -msgstr "" +msgstr "L'heure est dans le passé." #: ports/nrf/common-hal/_bleio/Adapter.c #, c-format @@ -1868,12 +1965,12 @@ msgstr "Le délai est trop long : le délai maximal est de %d secondes" msgid "" "Timer was reserved for internal use - declare PWM pins earlier in the program" msgstr "" -"Timer est reservé pour un usage interne - déclarez la broche PWM plus tôt " -"dans le programme" +"Le minuteur est reservé pour un usage interne - déclarez la broche PWM plus " +"tôt dans le programme" #: supervisor/shared/safe_mode.c msgid "To exit, please reset the board without " -msgstr "Pour quitter, redémarrez la carte SVP sans " +msgstr "Pour quitter, SVP redémarrez la carte sans " #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." @@ -1894,11 +1991,11 @@ msgstr "" #: py/obj.c msgid "Traceback (most recent call last):\n" -msgstr "Trace (appels les plus récents en dernier) :\n" +msgstr "Traceback (appels les plus récents en dernier) :\n" #: shared-bindings/time/__init__.c msgid "Tuple or struct_time argument required" -msgstr "Argument de type tuple ou struct_time nécessaire" +msgstr "Paramètre de type tuple ou struct_time requis" #: ports/stm/common-hal/busio/UART.c msgid "UART Buffer allocation error" @@ -1930,7 +2027,7 @@ msgstr "Erreur USB" #: shared-bindings/_bleio/UUID.c msgid "UUID integer value must be 0-0xffff" -msgstr "La valeur entière UUID doit être 0-0xffff" +msgstr "La valeur du chiffre entier de UUID doit être 0-0xffff" #: shared-bindings/_bleio/UUID.c msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" @@ -1940,8 +2037,8 @@ msgstr "" #: shared-bindings/_bleio/UUID.c msgid "UUID value is not str, int or byte buffer" msgstr "" -"la valeur de l'UUID n'est pas une chaîne de caractères, un entier ou un " -"tampon d'octets" +"La valeur de l'UUID n'est pas une chaîne de caractères, un chiffre entier ou " +"un tampon d'octets" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -1950,7 +2047,7 @@ msgstr "Impossible d'allouer des tampons pour une conversion signée" #: ports/esp32s2/common-hal/busio/I2C.c msgid "Unable to create lock" -msgstr "Impossible de créer un verrou" +msgstr "Impossible de créer un verrou ('lock')" #: shared-module/displayio/I2CDisplay.c #, c-format @@ -1972,11 +2069,11 @@ msgstr "Impossible de lire les données de la palette de couleurs" #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." -msgstr "Impossible d'écrire sur la mémoire non-volatile." +msgstr "Écriture impossible vers nvm." #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." -msgstr "" +msgstr "Écriture impossible vers sleep_memory." #: ports/nrf/common-hal/_bleio/UUID.c msgid "Unexpected nrfx uuid type" @@ -2027,7 +2124,7 @@ msgstr "" #: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c #: ports/esp32s2/common-hal/busio/UART.c ports/stm/common-hal/busio/I2C.c msgid "Unsupported baudrate" -msgstr "Débit non supporté" +msgstr "Débit en bauds non supporté" #: shared-module/displayio/display_core.c msgid "Unsupported display bus type" @@ -2045,6 +2142,10 @@ msgstr "Opération non supportée" msgid "Unsupported pull value." msgstr "Valeur de tirage 'pull' non supportée." +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "Mise-à-jour échouée" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -2055,6 +2156,10 @@ msgstr "Longueur de valeur != Longueur fixe requise" msgid "Value length > max_length" msgstr "Longueur de la valeur > max_length" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "Version est invalide" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "" @@ -2081,7 +2186,7 @@ msgstr "WatchDogTimer n'est pas en cours d'exécution" #: shared-bindings/watchdog/WatchDogTimer.c msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" msgstr "" -"WatchDogTimer.mode ne peut pas être changé une fois réglé pour WatchDogMode." +"WatchDogTimer.mode ne peut pas être changé une fois réglé à WatchDogMode." "RESET" #: shared-bindings/watchdog/WatchDogTimer.c @@ -2113,11 +2218,11 @@ msgstr "Le mot de passe WiFi doit faire entre 8 et 63 caractères" #: main.c msgid "Woken up by alarm.\n" -msgstr "" +msgstr "Réveil par alarme.\n" #: ports/nrf/common-hal/_bleio/PacketBuffer.c msgid "Writes not supported on Characteristic" -msgstr "Écritures non prises en charge sur la caractéristique" +msgstr "Écritures non supporté vers les Characteristic" #: supervisor/shared/safe_mode.c msgid "You are in safe mode: something unanticipated happened.\n" @@ -2183,19 +2288,19 @@ msgstr "l'argument doit être un ndarray" #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c msgid "argument num/types mismatch" -msgstr "argument num/types ne correspond pas" +msgstr "Nombre/types de paramètres ne correspondent pas" #: py/runtime.c msgid "argument should be a '%q' not a '%q'" -msgstr "l'argument devrait être un(e) '%q', pas '%q'" +msgstr "le paramètre devrait être un(e) '%q', pas '%q'" #: extmod/ulab/code/linalg/linalg.c extmod/ulab/code/numerical/numerical.c msgid "arguments must be ndarrays" -msgstr "les arguments doivent être des ndarrays" +msgstr "les paramètres 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" +msgstr "la longueur du tableau et de l'index doivent être égaux" #: py/objarray.c shared-bindings/alarm/SleepMemory.c #: shared-bindings/nvm/ByteArray.c @@ -2438,7 +2543,7 @@ msgstr "" #: extmod/ulab/code/ndarray_operators.c msgid "cannot cast output with casting rule" -msgstr "" +msgstr "output ne peut être projeté sans règle de projection" #: py/objtype.c msgid "cannot create '%q' instances" @@ -2466,16 +2571,20 @@ msgstr "tampon de caractères trop petit" #: py/modbuiltins.c msgid "chr() arg not in range(0x110000)" -msgstr "argument de chr() hors de la gamme range(0x11000)" +msgstr "paramètre de chr() hors les bornes de range(0x11000)" #: py/modbuiltins.c msgid "chr() arg not in range(256)" -msgstr "argument de chr() hors de la gamme range(256)" +msgstr "paramètre de chr() hors les bornes de range(256)" #: shared-module/vectorio/Circle.c msgid "circle can only be registered in one parent" msgstr "le cercle ne peut être enregistré que dans un seul parent" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "code hors bornes 0~127" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "le tampon de couleur doit faire 3 octets (RVB) ou 4 (RVB + pad byte)" @@ -2550,6 +2659,10 @@ 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/ndarray.c +msgid "data type not understood" +msgstr "le type de donnée n'est pas reconnu" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "nombres décimaux non supportés" @@ -2558,6 +2671,10 @@ msgstr "nombres décimaux non supportés" msgid "default 'except' must be last" msgstr "l''except' par défaut doit être en dernier" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "default n'est pas une fonction" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2583,7 +2700,7 @@ 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" +msgstr "differentiation order hors de portée" #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c @@ -2616,7 +2733,7 @@ msgstr "end_x doit être un entier 'int'" #: shared-bindings/alarm/time/TimeAlarm.c msgid "epoch_time not supported on this board" -msgstr "" +msgstr "epoch_time n'est pas supporté sur ce panneau" #: ports/nrf/common-hal/busio/UART.c #, c-format @@ -2659,6 +2776,10 @@ msgstr "une simple valeur est attendue pour l'ensemble 'set'" msgid "expecting key:value for dict" msgstr "couple clef:valeur attendu pour un dictionnaire 'dict'" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "ext_hook n'est pas une fonction" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "argument(s) nommé(s) supplémentaire(s) donné(s)" @@ -2770,7 +2891,7 @@ msgstr "La fonction n'est définie que pour les ndarrays" #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" -msgstr "il manque %d arguments obligatoires à la fonction" +msgstr "il manque %d argument(s) positionnel(s) requis pour la fonction" #: py/bc.c msgid "function missing keyword-only argument" @@ -2837,7 +2958,7 @@ 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" +msgstr "index est hors bornes" #: py/obj.c msgid "indices must be integers" @@ -2865,8 +2986,8 @@ 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" +msgid "input argument must be an integer, a tuple, or a list" +msgstr "Paramètre entrant doit être un chiffre entier, un tuple, ou une liste" #: extmod/ulab/code/fft/fft.c msgid "input array length must be power of 2" @@ -2898,11 +3019,11 @@ 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 "" +msgstr "l'entrée doit être un ndarray" #: extmod/ulab/code/filter/filter.c msgid "input must be one-dimensional" -msgstr "" +msgstr "l'entrée doit être uni-dimensionelle" #: extmod/ulab/code/linalg/linalg.c msgid "input must be square matrix" @@ -2910,7 +3031,7 @@ msgstr "l'entrée doit être une matrice carrée" #: extmod/ulab/code/numerical/numerical.c msgid "input must be tuple, list, range, or ndarray" -msgstr "l'entrée doit être tuple, list, range ou ndarray" +msgstr "l'entrée 'input' doit être tuple, list, range ou ndarray" #: extmod/ulab/code/poly/poly.c msgid "input vectors must be of equal length" @@ -2918,7 +3039,7 @@ msgstr "les vecteurs d'entrée doivent être de longueur égale" #: extmod/ulab/code/poly/poly.c msgid "inputs are not iterable" -msgstr "" +msgstr "les entrées ne sont pas itérables" #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" @@ -2935,7 +3056,7 @@ msgstr "interp est défini pour les tableaux 1D de longueur égale" #: shared-bindings/_bleio/Adapter.c #, c-format msgid "interval must be in range %s-%s" -msgstr "l'intervalle doit être dans la plage %s-%s" +msgstr "interval doit être dans la portée %s-%s" #: lib/netutils/netutils.c msgid "invalid arguments" @@ -2992,7 +3113,7 @@ msgstr "syntaxe invalide pour un nombre" #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "io must be rtc io" -msgstr "" +msgstr "io doit être rtc io" #: py/objtype.c msgid "issubclass() arg 1 must be a class" @@ -3032,11 +3153,11 @@ msgstr "label '%q' non supporté" #: py/compile.c msgid "label redefined" -msgstr "label redéfini" +msgstr "étiquette redéfinie" #: py/stream.c msgid "length argument not allowed for this type" -msgstr "argument 'length' non-permis pour ce type" +msgstr "paramètre 'length' non-permis pour ce type" #: shared-bindings/audiomixer/MixerVoice.c msgid "level must be between 0 and 1" @@ -3093,12 +3214,12 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "max_length doit être 0-%d lorsque fixed_length est %s" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" -msgstr "max_length doit être > 0" +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 "" +msgstr "nombre maximal de dimensions est 4" #: py/runtime.c msgid "maximum recursion depth exceeded" @@ -3112,6 +3233,10 @@ msgstr "maxiter doit être > 0" msgid "maxiter should be > 0" msgstr "maxiter devrait être > 0" +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" +msgstr "Paramètre pour median doit être un ndarray" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3159,7 +3284,7 @@ msgstr "nom non défini" #: py/compile.c msgid "name reused for argument" -msgstr "nom réutilisé comme argument" +msgstr "nom réutilisé comme paramètre" #: py/emitnative.c msgid "native yield" @@ -3194,6 +3319,10 @@ msgstr "adapteur réseau non disponible" msgid "no binding for nonlocal found" msgstr "pas de lien trouvé pour nonlocal" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "aucun emballeur par défault" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "pas de module '%q'" @@ -3232,9 +3361,17 @@ msgstr "argument non-nommé après */**" msgid "non-keyword arg after keyword arg" msgstr "argument non-nommé après argument nommé" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "le délai non-zéro doit être > 0.01" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "le délai non-zéro doit être >= interval" + #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" -msgstr "" +msgstr "norm est défini pour des tableaux 1D et 2D" #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" @@ -3303,7 +3440,11 @@ msgstr "chaîne de longueur impaire" #: extmod/ulab/code/ulab_create.c msgid "offset is too large" -msgstr "" +msgstr "offset est trop large" + +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "offset doit être >= 0" #: py/objstr.c py/objstrunicode.c msgid "offset out of bounds" @@ -3329,11 +3470,7 @@ 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 "" +msgstr "opération implémentée que pour des tableaux 1D booléennes" #: extmod/ulab/code/numerical/numerical.c msgid "operation is not implemented on ndarrays" @@ -3428,6 +3565,8 @@ 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_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3474,7 +3613,7 @@ 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 "" +msgstr "résultats ne peuvent être transformé au type spécifié" #: py/compile.c msgid "return annotation must be an identifier" @@ -3496,7 +3635,7 @@ msgstr "rgb_pins[%d] n'est pas sur le même port que l'horloge" #: extmod/ulab/code/numerical/numerical.c msgid "roll argument must be an ndarray" -msgstr "" +msgstr "paramêtre roll doit être un ndarray" #: py/objstr.c msgid "rsplit(None,n)" @@ -3512,7 +3651,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c msgid "sampling rate out of range" -msgstr "taux d'échantillonage hors gamme" +msgstr "taux d'échantillonage hors bornes" #: py/modmicropython.c msgid "schedule stack full" @@ -3524,7 +3663,11 @@ msgstr "compilation de script non supportée" #: extmod/ulab/code/ndarray.c msgid "shape must be a tuple" -msgstr "" +msgstr "forme doit être un tuple" + +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "donnée trop petite" #: py/objstr.c msgid "sign not allowed in string format specifier" @@ -3641,7 +3784,7 @@ msgstr "erreur de syntaxe dans le descripteur d'uctypes" #: shared-bindings/touchio/TouchIn.c msgid "threshold must be in the range 0-65536" -msgstr "le seuil doit être dans la gamme 0-65536" +msgstr "le seuil doit être dans la portée 0-65536" #: shared-bindings/time/__init__.c msgid "time.struct_time() takes a 9-sequence" @@ -3656,6 +3799,10 @@ msgstr "le délai d'expiration a dépassé la valeur maximale prise en charge" msgid "timeout must be 0.0-100.0 seconds" msgstr "le délai doit être compris entre 0.0 et 100.0 secondes" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "le délai (timeout) doit être < 655.35 secondes" + #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "timeout must be >= 0.0" msgstr "'timeout' doit être >= 0.0" @@ -3670,16 +3817,20 @@ msgstr "Délai d’expiration dépassé en attendant une carte v2" #: shared-bindings/time/__init__.c msgid "timestamp out of range for platform time_t" -msgstr "'timestamp' hors bornes pour 'time_t' de la plateforme" +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 "" +msgstr "tobytes ne peut être appelé que pour des tableaux dense" #: shared-module/struct/__init__.c msgid "too many arguments provided with the given format" msgstr "trop d'arguments fournis avec ce format" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "Trop de dimensions" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "trop d'indices" @@ -3689,17 +3840,17 @@ msgstr "trop d'indices" msgid "too many values to unpack (expected %d)" msgstr "trop de valeur à dégrouper (%d attendues)" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "trapz est défini pour tableaux à une dimension" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "trapz n'est défini que pour des tableaux 1D de longueur égale" #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "trigger level must be 0 or 1" -msgstr "" - -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "index du tuple hors gamme" +msgstr "niveau du déclencheur doit être 0 ou 1" #: py/obj.c msgid "tuple/list has wrong length" @@ -3755,11 +3906,11 @@ msgstr "indentation inattendue" #: py/bc.c msgid "unexpected keyword argument" -msgstr "argument nommé inattendu" +msgstr "paramètre nommé inattendu" #: py/bc.c py/objnamedtuple.c msgid "unexpected keyword argument '%q'" -msgstr "argument nommé '%q' inattendu" +msgstr "paramètre nommé '%q' inattendu" #: py/lexer.c msgid "unicode name escapes" @@ -3802,12 +3953,12 @@ msgstr "type %q non pris on charge" #: py/emitinlinethumb.c #, c-format msgid "unsupported Thumb instruction '%s' with %d arguments" -msgstr "instruction Thumb '%s' non supportée avec %d arguments" +msgstr "instruction Thumb '%s' non supportée avec %d paramètres" #: py/emitinlinextensa.c #, c-format msgid "unsupported Xtensa instruction '%s' with %d arguments" -msgstr "instruction Xtensa '%s' non supportée avec %d arguments" +msgstr "instruction Xtensa '%s' non supportée avec %d paramètres" #: py/objstr.c #, c-format @@ -3841,11 +3992,11 @@ msgstr "les vecteurs doivent avoir la même longueur" #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" -msgstr "" +msgstr "conflit au réveil" #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" -msgstr "chien de garde non initialisé" +msgstr "chien de garde (watchdog) non initialisé" #: shared-bindings/watchdog/WatchDogTimer.c msgid "watchdog timeout must be greater than 0" @@ -3857,15 +4008,15 @@ msgstr "width doit être plus grand que zero" #: shared-bindings/_bleio/Adapter.c msgid "window must be <= interval" -msgstr "la fenêtre doit être <= intervalle" +msgstr "la fenêtre (window) doit être <= intervalle (interval)" #: extmod/ulab/code/numerical/numerical.c msgid "wrong axis index" -msgstr "" +msgstr "index d'axe incorrecte" #: extmod/ulab/code/ulab_create.c msgid "wrong axis specified" -msgstr "" +msgstr "axe incorrecte spécifiée" #: extmod/ulab/code/vector/vectorise.c msgid "wrong input type" @@ -3891,6 +4042,10 @@ msgstr "type de sortie incorrect" msgid "x value out of bounds" msgstr "valeur x hors limites" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "Échec de xTaskCreate" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "'y' doit être un entier 'int'" @@ -3915,6 +4070,37 @@ 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 one alarm.touch alarm can be set." +#~ msgstr "Seulement une alarme alarm.touch peut être réglée." + +#~ msgid "TouchAlarm not available in light sleep" +#~ msgstr "TouchAlarm n'est pas disponible en mode someil léger" + +#~ 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" + +#~ msgid "operation is not implemented for flattened array" +#~ msgstr "l'opération n'est pas implémentée pour un tableau applatit" + +#~ msgid "tuple index out of range" +#~ msgstr "index du tuple hors de portée" + +#~ msgid "" +#~ "\n" +#~ "Code done running. Waiting for reload.\n" +#~ msgstr "" +#~ "\n" +#~ "Fin d'exécution du code. En attente de rechargement.\n" + +#~ msgid "PinAlarm not yet implemented" +#~ msgstr "PinAlarm pas encore implémenté" + +#~ msgid "Frequency captured is above capability. Capture Paused." +#~ msgstr "La fréquence capturée est au delà des capacités. Capture en pause." + +#~ msgid "max_length must be > 0" +#~ msgstr "max_length doit être > 0" + #~ msgid "Press any key to enter the REPL. Use CTRL-D to reload." #~ msgstr "" #~ "Appuyez sur une touche pour entrer sur REPL ou CTRL-D pour recharger." diff --git a/locale/hi.po b/locale/hi.po index 51b751c82a..618490b378 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-12-14 12:59-0500\n" +"POT-Creation-Date: 2021-01-04 12:55-0600\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -19,7 +19,13 @@ msgstr "" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" +msgstr "" + +#: main.c +msgid "" +"\n" +"Code stopped by auto-reload.\n" msgstr "" #: supervisor/shared/safe_mode.c @@ -107,6 +113,11 @@ msgstr "" msgid "%q() takes %d positional arguments but %d were given" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + #: py/argcheck.c msgid "'%q' argument required" msgstr "" @@ -269,6 +280,10 @@ msgstr "" msgid "3-arg pow() not supported" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" @@ -529,10 +544,26 @@ msgstr "" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "" @@ -565,6 +596,10 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "" @@ -608,6 +643,10 @@ msgstr "" msgid "Cannot vary frequency on a timer that is already in use" msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." msgstr "" @@ -935,6 +974,10 @@ msgstr "" msgid "Filters too complex" msgstr "" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "" + #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" msgstr "" @@ -944,10 +987,6 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -957,6 +996,10 @@ msgstr "" msgid "Function requires lock" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "" + #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -1083,6 +1126,7 @@ msgstr "" msgid "Invalid Pin" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -1143,6 +1187,7 @@ msgstr "" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1191,6 +1236,14 @@ msgstr "" msgid "Invalid security_mode" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "" + #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" msgstr "" @@ -1231,6 +1284,10 @@ msgstr "" msgid "Length must be non-negative" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "" @@ -1457,7 +1514,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1469,6 +1530,18 @@ msgstr "" msgid "Only raw int supported for ip" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1477,6 +1550,10 @@ msgstr "" msgid "Oversample must be multiple of 8." msgstr "" +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" @@ -1493,6 +1570,10 @@ msgstr "" msgid "ParallelBus not yet supported" msgstr "" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + #: py/moduerrno.c msgid "Permission denied" msgstr "" @@ -1519,10 +1600,6 @@ msgstr "" msgid "Pin number already reserved by EXTI" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -1563,7 +1640,7 @@ msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" #: shared-bindings/digitalio/DigitalInOut.c @@ -1614,6 +1691,10 @@ msgstr "" msgid "Read-only object" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" msgstr "" @@ -1626,6 +1707,10 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" msgstr "" @@ -1982,6 +2067,10 @@ msgstr "" msgid "Unsupported pull value." msgstr "" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -1992,6 +2081,10 @@ msgstr "" msgid "Value length > max_length" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "" @@ -2394,6 +2487,10 @@ msgstr "" msgid "circle can only be registered in one parent" msgstr "" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "" @@ -2466,6 +2563,10 @@ msgstr "" msgid "data must be of equal length" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "data type not understood" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "" @@ -2474,6 +2575,10 @@ msgstr "" msgid "default 'except' must be last" msgstr "" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2573,6 +2678,10 @@ msgstr "" msgid "expecting key:value for dict" msgstr "" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "" @@ -2776,7 +2885,7 @@ 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" +msgid "input argument must be an integer, a tuple, or a list" msgstr "" #: extmod/ulab/code/fft/fft.c @@ -3000,7 +3109,7 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" +msgid "max_length must be >= 0" msgstr "" #: extmod/ulab/code/ndarray.c @@ -3019,6 +3128,10 @@ msgstr "" msgid "maxiter should be > 0" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3101,6 +3214,10 @@ msgstr "" msgid "no binding for nonlocal found" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "" @@ -3138,6 +3255,14 @@ msgstr "" msgid "non-keyword arg after keyword arg" msgstr "" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "" + #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3210,6 +3335,10 @@ msgstr "" msgid "offset is too large" msgstr "" +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "" + #: py/objstr.c py/objstrunicode.c msgid "offset out of bounds" msgstr "" @@ -3236,10 +3365,6 @@ msgstr "" 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 "" @@ -3330,6 +3455,8 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3426,6 +3553,10 @@ msgstr "" msgid "shape must be a tuple" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "" @@ -3555,6 +3686,10 @@ msgstr "" msgid "timeout must be 0.0-100.0 seconds" msgstr "" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "" + #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "timeout must be >= 0.0" msgstr "" @@ -3579,6 +3714,10 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "" @@ -3588,6 +3727,10 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -3596,10 +3739,6 @@ msgstr "" msgid "trigger level must be 0 or 1" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "" - #: py/obj.c msgid "tuple/list has wrong length" msgstr "" @@ -3790,6 +3929,10 @@ msgstr "" msgid "x value out of bounds" msgstr "" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 80dabb6256..f9f77b20ef 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-12-14 12:59-0500\n" +"POT-Creation-Date: 2021-01-04 12:55-0600\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin \n" "Language-Team: \n" @@ -18,7 +18,13 @@ msgstr "" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" +msgstr "" + +#: main.c +msgid "" +"\n" +"Code stopped by auto-reload.\n" msgstr "" #: supervisor/shared/safe_mode.c @@ -108,6 +114,11 @@ msgstr "y dovrebbe essere un int" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() prende %d argomenti posizionali ma ne sono stati forniti %d" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + #: py/argcheck.c msgid "'%q' argument required" msgstr "'%q' argomento richiesto" @@ -270,6 +281,10 @@ msgstr "0.0 elevato alla potenza di un numero complesso" msgid "3-arg pow() not supported" msgstr "pow() con tre argmomenti non supportata" +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" @@ -535,10 +550,26 @@ msgstr "I byte devono essere compresi tra 0 e 255" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "" @@ -572,6 +603,10 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "Impossibile dare in output entrambi i canal sullo stesso pin" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "Impossibile leggere senza pin MISO." @@ -616,6 +651,10 @@ msgstr "Impossibile ricavare la grandezza scalare di sizeof inequivocabilmente" msgid "Cannot vary frequency on a timer that is already in use" msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." msgstr "Impossibile scrivere senza pin MOSI." @@ -948,6 +987,10 @@ msgstr "File esistente" msgid "Filters too complex" msgstr "" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "" + #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" msgstr "" @@ -957,10 +1000,6 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -970,6 +1009,10 @@ msgstr "" msgid "Function requires lock" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "" + #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -1098,6 +1141,7 @@ msgstr "Frequenza PWM non valida" msgid "Invalid Pin" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Argomento non valido" @@ -1160,6 +1204,7 @@ msgstr "Fase non valida" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1208,6 +1253,14 @@ msgstr "Modalità di esecuzione non valida." msgid "Invalid security_mode" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "" + #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" msgstr "" @@ -1249,6 +1302,10 @@ msgstr "Length deve essere un intero" msgid "Length must be non-negative" msgstr "Length deve essere non negativo" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "inizializzazione del pin MISO fallita." @@ -1480,7 +1537,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1492,6 +1553,18 @@ msgstr "" msgid "Only raw int supported for ip" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1500,6 +1573,10 @@ msgstr "" msgid "Oversample must be multiple of 8." msgstr "L'oversampling deve essere multiplo di 8." +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" @@ -1521,6 +1598,10 @@ msgstr "" msgid "ParallelBus not yet supported" msgstr "" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + #: py/moduerrno.c msgid "Permission denied" msgstr "Permesso negato" @@ -1547,10 +1628,6 @@ msgstr "" msgid "Pin number already reserved by EXTI" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -1592,7 +1669,7 @@ msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" #: shared-bindings/digitalio/DigitalInOut.c @@ -1644,6 +1721,10 @@ msgstr "Filesystem in sola lettura" msgid "Read-only object" msgstr "Sola lettura" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" msgstr "" @@ -1656,6 +1737,10 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" msgstr "Canale destro non supportato" @@ -2016,6 +2101,10 @@ msgstr "Operazione non supportata" msgid "Unsupported pull value." msgstr "Valore di pull non supportato." +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -2026,6 +2115,10 @@ msgstr "" msgid "Value length > max_length" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "Le funzioni Viper non supportano più di 4 argomenti al momento" @@ -2432,6 +2525,10 @@ msgstr "argomento di chr() non è in range(256)" msgid "circle can only be registered in one parent" msgstr "" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "" @@ -2506,6 +2603,10 @@ msgstr "" msgid "data must be of equal length" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "data type not understood" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "numeri decimali non supportati" @@ -2514,6 +2615,10 @@ msgstr "numeri decimali non supportati" msgid "default 'except' must be last" msgstr "'except' predefinito deve essere ultimo" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2617,6 +2722,10 @@ msgstr "un solo valore atteso per set" msgid "expecting key:value for dict" msgstr "chiave:valore atteso per dict" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "argomento nominato aggiuntivo fornito" @@ -2821,7 +2930,7 @@ 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" +msgid "input argument must be an integer, a tuple, or a list" msgstr "" #: extmod/ulab/code/fft/fft.c @@ -3050,7 +3159,7 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" +msgid "max_length must be >= 0" msgstr "" #: extmod/ulab/code/ndarray.c @@ -3069,6 +3178,10 @@ msgstr "" msgid "maxiter should be > 0" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3152,6 +3265,10 @@ msgstr "busio.UART non ancora implementato" msgid "no binding for nonlocal found" msgstr "nessun binding per nonlocal trovato" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "nessun modulo chiamato '%q'" @@ -3189,6 +3306,14 @@ msgstr "argomento non nominato dopo */**" msgid "non-keyword arg after keyword arg" msgstr "argomento non nominato seguito da argomento nominato" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "" + #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3263,6 +3388,10 @@ msgstr "stringa di lunghezza dispari" msgid "offset is too large" msgstr "" +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "" + #: py/objstr.c py/objstrunicode.c #, fuzzy msgid "offset out of bounds" @@ -3290,10 +3419,6 @@ msgstr "" 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 "" @@ -3387,6 +3512,8 @@ 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_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3485,6 +3612,10 @@ msgstr "compilazione dello scrip non suportata" msgid "shape must be a tuple" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "segno non permesso nello spcificatore di formato della stringa" @@ -3615,6 +3746,10 @@ msgstr "" msgid "timeout must be 0.0-100.0 seconds" msgstr "" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "" + #: shared-bindings/_bleio/CharacteristicBuffer.c #, fuzzy msgid "timeout must be >= 0.0" @@ -3640,6 +3775,10 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "troppi argomenti forniti con il formato specificato" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "" @@ -3649,6 +3788,10 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "troppi valori da scompattare (%d attesi)" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -3657,10 +3800,6 @@ msgstr "" msgid "trigger level must be 0 or 1" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "indice della tupla fuori intervallo" - #: py/obj.c msgid "tuple/list has wrong length" msgstr "tupla/lista ha la lunghezza sbagliata" @@ -3852,6 +3991,10 @@ msgstr "" msgid "x value out of bounds" msgstr "indirizzo fuori limite" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "y dovrebbe essere un int" @@ -3877,6 +4020,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "tuple index out of range" +#~ msgstr "indice della tupla fuori intervallo" + #~ msgid "Press any key to enter the REPL. Use CTRL-D to reload." #~ msgstr "" #~ "Premi un qualunque tasto per entrare nel REPL. Usa CTRL-D per ricaricare." diff --git a/locale/ja.po b/locale/ja.po index 226a8e179b..37d23f9594 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-14 12:59-0500\n" +"POT-Creation-Date: 2021-01-04 12:55-0600\n" "PO-Revision-Date: 2020-11-27 18:34+0000\n" "Last-Translator: sporeball \n" "Language-Team: none\n" @@ -21,10 +21,14 @@ msgstr "" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" msgstr "" + +#: main.c +msgid "" "\n" -"コードの実行が完了しました。リロードを待っています。\n" +"Code stopped by auto-reload.\n" +msgstr "" #: supervisor/shared/safe_mode.c msgid "" @@ -114,6 +118,11 @@ msgstr "%qはint型でなければなりません" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() は %d 個の位置引数を取りますが、%d 個与えられました" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + #: py/argcheck.c msgid "'%q' argument required" msgstr "'%q' 引数が必要" @@ -276,6 +285,10 @@ msgstr "0.0を複素数でべき乗" msgid "3-arg pow() not supported" msgstr "引数3つのpow()は非対応" +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" @@ -538,12 +551,28 @@ msgstr "バイト値は0から255の間でなければなりません" msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBCブロックは16バイトの整数倍でなければなりません" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "" "ネイティブオブジェクトにアクセスする前にsuper().__init__()を呼び出してくださ" "い" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "ローカルのCharacteristicにはCCCDを設定できません" @@ -576,6 +605,10 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "同じピン上の両チャネルに出力できません" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "MISOピンなしで読み込めません" @@ -619,6 +652,10 @@ msgstr "スカラのサイズを曖昧さなしに取得できません" msgid "Cannot vary frequency on a timer that is already in use" msgstr "使用中のタイマー上では周波数を変えられません" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." msgstr "MOSIピンなしで書き込みできません" @@ -948,6 +985,10 @@ msgstr "ファイルが存在します" msgid "Filters too complex" msgstr "" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "" + #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" msgstr "非対応の形式" @@ -957,10 +998,6 @@ msgstr "非対応の形式" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "キャプチャした周波数は能力を超えています。キャプチャ停止" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "このタイマーを使う既存のPWMOutと周波数を一致させる必要があります" @@ -970,6 +1007,10 @@ msgstr "このタイマーを使う既存のPWMOutと周波数を一致させる msgid "Function requires lock" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "" + #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -1098,6 +1139,7 @@ msgstr "無効なPWM周波数" msgid "Invalid Pin" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "不正な引数" @@ -1158,6 +1200,7 @@ msgstr "不正なphase" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1206,6 +1249,14 @@ msgstr "不正なrun mode" msgid "Invalid security_mode" msgstr "不正なsecurity_mode" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "" + #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" msgstr "不正なボイス" @@ -1246,6 +1297,10 @@ msgstr "長さには整数が必要" msgid "Length must be non-negative" msgstr "Lengthは非負数でなければなりません" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "MISOピン初期化に失敗" @@ -1474,7 +1529,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1486,6 +1545,18 @@ msgstr "" msgid "Only raw int supported for ip" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1494,6 +1565,10 @@ msgstr "" msgid "Oversample must be multiple of 8." msgstr "オーバーサンプルは8の倍数でなければなりません" +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" @@ -1511,6 +1586,10 @@ msgstr "PWM周波数は生成時のvariable_frequencyがFalseのとき書き換 msgid "ParallelBus not yet supported" msgstr "ParallelBusにはまだ対応していません" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + #: py/moduerrno.c msgid "Permission denied" msgstr "パーミッション拒否" @@ -1537,10 +1616,6 @@ msgstr "ピンはハードウェア割り込みに対応していなければな msgid "Pin number already reserved by EXTI" msgstr "ピン番号はすでにEXTIによって予約されています" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -1581,7 +1656,7 @@ msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" #: shared-bindings/digitalio/DigitalInOut.c @@ -1632,6 +1707,10 @@ msgstr "読み込み専用のファイルシステム" msgid "Read-only object" msgstr "読み込み専用のオブジェクト" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" msgstr "リフレッシュが早すぎます" @@ -1644,6 +1723,10 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "要求のAESモードは非対応" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" msgstr "右チャネルは非対応" @@ -2007,6 +2090,10 @@ msgstr "非対応の操作" msgid "Unsupported pull value." msgstr "非対応のpull値" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -2017,6 +2104,10 @@ msgstr "" msgid "Value length > max_length" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "" @@ -2419,6 +2510,10 @@ msgstr "" msgid "circle can only be registered in one parent" msgstr "" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "" @@ -2493,6 +2588,10 @@ msgstr "dataはイテレート可能でなければなりません" msgid "data must be of equal length" msgstr "dataは同じ長さでなければなりません" +#: extmod/ulab/code/ndarray.c +msgid "data type not understood" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "" @@ -2501,6 +2600,10 @@ msgstr "" msgid "default 'except' must be last" msgstr "デフォルトのexceptは最後に置く必要があります" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2602,6 +2705,10 @@ msgstr "setには値のみが必要" msgid "expecting key:value for dict" msgstr "dictには key:value が必要" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "余分なキーワード引数があります" @@ -2806,7 +2913,7 @@ 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" +msgid "input argument must be an integer, a tuple, or a list" msgstr "" #: extmod/ulab/code/fft/fft.c @@ -3030,8 +3137,8 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" -msgstr "max_lengthは0より大きくなければなりません" +msgid "max_length must be >= 0" +msgstr "" #: extmod/ulab/code/ndarray.c msgid "maximum number of dimensions is 4" @@ -3049,6 +3156,10 @@ msgstr "" msgid "maxiter should be > 0" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3131,6 +3242,10 @@ msgstr "利用可能なNICがありません" msgid "no binding for nonlocal found" msgstr "nonlocalの対象が見つかりません" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "'%q' という名前のモジュールはありません" @@ -3168,6 +3283,14 @@ msgstr "*/** の後に非キーワード引数は置けません" msgid "non-keyword arg after keyword arg" msgstr "キーワード引数の後に非キーワード引数は置けません" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "" + #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3240,6 +3363,10 @@ msgstr "奇数長の文字列" msgid "offset is too large" msgstr "" +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "" + #: py/objstr.c py/objstrunicode.c msgid "offset out of bounds" msgstr "" @@ -3266,10 +3393,6 @@ msgstr "" 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上で実装されていません" @@ -3362,6 +3485,8 @@ msgstr "pow()の3つ目の引数は0にできません" msgid "pow() with 3 arguments requires integers" msgstr "pow()の第3引数には整数が必要" +#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3459,6 +3584,10 @@ msgstr "スクリプトのコンパイルは非対応" msgid "shape must be a tuple" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "文字列フォーマット指定子で符号は使えません" @@ -3588,6 +3717,10 @@ msgstr "タイムアウト長は対応する最大値を超えています" msgid "timeout must be 0.0-100.0 seconds" msgstr "timeoutは0.0〜100.0秒でなければなりません" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "" + #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "timeout must be >= 0.0" msgstr "timeoutは0.0以上でなければなりません" @@ -3612,6 +3745,10 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "指定された書式に対して引数が多すぎます" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "インデクスが多すぎます" @@ -3621,6 +3758,10 @@ msgstr "インデクスが多すぎます" msgid "too many values to unpack (expected %d)" msgstr "アンパックする値が多すぎます (%d個を期待)" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "trapzは同じ長さの1次元arrayに対して定義されています" @@ -3629,10 +3770,6 @@ msgstr "trapzは同じ長さの1次元arrayに対して定義されています" msgid "trigger level must be 0 or 1" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "" - #: py/obj.c msgid "tuple/list has wrong length" msgstr "タプル/リストの長さが正しくありません" @@ -3823,6 +3960,10 @@ msgstr "" msgid "x value out of bounds" msgstr "xが範囲外" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "yは整数でなければなりません" @@ -3847,6 +3988,19 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "" +#~ "\n" +#~ "Code done running. Waiting for reload.\n" +#~ msgstr "" +#~ "\n" +#~ "コードの実行が完了しました。リロードを待っています。\n" + +#~ msgid "Frequency captured is above capability. Capture Paused." +#~ msgstr "キャプチャした周波数は能力を超えています。キャプチャ停止" + +#~ msgid "max_length must be > 0" +#~ msgstr "max_lengthは0より大きくなければなりません" + #~ msgid "Press any key to enter the REPL. Use CTRL-D to reload." #~ msgstr "何らかのキーを押すとREPLに入ります。CTRL-Dでリロード。" diff --git a/locale/ko.po b/locale/ko.po index 456cb47e65..b7fc29629b 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-12-14 12:59-0500\n" +"POT-Creation-Date: 2021-01-04 12:55-0600\n" "PO-Revision-Date: 2020-10-05 12:12+0000\n" "Last-Translator: Michal Čihař \n" "Language-Team: LANGUAGE \n" @@ -20,10 +20,14 @@ msgstr "" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" msgstr "" + +#: main.c +msgid "" "\n" -"실행 완료 코드. 재장전 을 기다리는 중입니다\n" +"Code stopped by auto-reload.\n" +msgstr "" #: supervisor/shared/safe_mode.c msgid "" @@ -110,6 +114,11 @@ msgstr "%q 는 정수(int) 여야합니다" msgid "%q() takes %d positional arguments but %d were given" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + #: py/argcheck.c msgid "'%q' argument required" msgstr "" @@ -272,6 +281,10 @@ msgstr "" msgid "3-arg pow() not supported" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" @@ -534,10 +547,26 @@ msgstr "바이트는 0에서 255 사이 여야합니다." msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "" @@ -570,6 +599,10 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "MISO핀이 없으면 읽을 수 없습니다" @@ -613,6 +646,10 @@ msgstr "" msgid "Cannot vary frequency on a timer that is already in use" msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." msgstr "" @@ -940,6 +977,10 @@ msgstr "" msgid "Filters too complex" msgstr "" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "" + #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" msgstr "" @@ -949,10 +990,6 @@ msgstr "" msgid "Framebuffer requires %d bytes" msgstr "" -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "" - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -962,6 +999,10 @@ msgstr "" msgid "Function requires lock" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "" + #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -1088,6 +1129,7 @@ msgstr "" msgid "Invalid Pin" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -1148,6 +1190,7 @@ msgstr "단계가 잘못되었습니다" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1196,6 +1239,14 @@ msgstr "" msgid "Invalid security_mode" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "" + #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" msgstr "" @@ -1236,6 +1287,10 @@ msgstr "길이는 정수(int) 여야합니다" msgid "Length must be non-negative" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "" @@ -1462,7 +1517,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1474,6 +1533,18 @@ msgstr "" msgid "Only raw int supported for ip" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1482,6 +1553,10 @@ msgstr "" msgid "Oversample must be multiple of 8." msgstr "" +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" @@ -1498,6 +1573,10 @@ msgstr "" msgid "ParallelBus not yet supported" msgstr "" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + #: py/moduerrno.c msgid "Permission denied" msgstr "" @@ -1524,10 +1603,6 @@ msgstr "" msgid "Pin number already reserved by EXTI" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -1568,7 +1643,7 @@ msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" #: shared-bindings/digitalio/DigitalInOut.c @@ -1619,6 +1694,10 @@ msgstr "" msgid "Read-only object" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" msgstr "" @@ -1631,6 +1710,10 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" msgstr "" @@ -1988,6 +2071,10 @@ msgstr "" msgid "Unsupported pull value." msgstr "" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -1998,6 +2085,10 @@ msgstr "" msgid "Value length > max_length" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "" @@ -2400,6 +2491,10 @@ msgstr "" msgid "circle can only be registered in one parent" msgstr "" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "" @@ -2472,6 +2567,10 @@ msgstr "" msgid "data must be of equal length" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "data type not understood" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "" @@ -2480,6 +2579,10 @@ msgstr "" msgid "default 'except' must be last" msgstr "" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2579,6 +2682,10 @@ msgstr "" msgid "expecting key:value for dict" msgstr "" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "" @@ -2782,7 +2889,7 @@ 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" +msgid "input argument must be an integer, a tuple, or a list" msgstr "" #: extmod/ulab/code/fft/fft.c @@ -3006,7 +3113,7 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" +msgid "max_length must be >= 0" msgstr "" #: extmod/ulab/code/ndarray.c @@ -3025,6 +3132,10 @@ msgstr "" msgid "maxiter should be > 0" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3107,6 +3218,10 @@ msgstr "" msgid "no binding for nonlocal found" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "" @@ -3144,6 +3259,14 @@ msgstr "" msgid "non-keyword arg after keyword arg" msgstr "" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "" + #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3216,6 +3339,10 @@ msgstr "" msgid "offset is too large" msgstr "" +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "" + #: py/objstr.c py/objstrunicode.c msgid "offset out of bounds" msgstr "" @@ -3242,10 +3369,6 @@ msgstr "" 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 "" @@ -3336,6 +3459,8 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3432,6 +3557,10 @@ msgstr "" msgid "shape must be a tuple" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "" @@ -3561,6 +3690,10 @@ msgstr "" msgid "timeout must be 0.0-100.0 seconds" msgstr "" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "" + #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "timeout must be >= 0.0" msgstr "" @@ -3585,6 +3718,10 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "" @@ -3594,6 +3731,10 @@ msgstr "" msgid "too many values to unpack (expected %d)" msgstr "" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -3602,10 +3743,6 @@ msgstr "" msgid "trigger level must be 0 or 1" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "" - #: py/obj.c msgid "tuple/list has wrong length" msgstr "" @@ -3796,6 +3933,10 @@ msgstr "" msgid "x value out of bounds" msgstr "" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "" @@ -3820,6 +3961,13 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "" +#~ "\n" +#~ "Code done running. Waiting for reload.\n" +#~ msgstr "" +#~ "\n" +#~ "실행 완료 코드. 재장전 을 기다리는 중입니다\n" + #~ msgid "%q indices must be integers, not %s" #~ msgstr "%q 인덱스는 %s 가 아닌 정수 여야합니다" diff --git a/locale/nl.po b/locale/nl.po index 63ff70716f..52984373c2 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -5,24 +5,28 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-14 12:59-0500\n" -"PO-Revision-Date: 2020-10-27 16:47+0000\n" -"Last-Translator: Jelle Jager \n" +"POT-Creation-Date: 2021-01-04 12:55-0600\n" +"PO-Revision-Date: 2020-12-23 20:14+0000\n" +"Last-Translator: _fonzlate \n" "Language-Team: none\n" "Language: nl\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.2-dev\n" +"X-Generator: Weblate 4.4.1-dev\n" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" msgstr "" + +#: main.c +msgid "" "\n" -"Code is uitgevoerd. Wachten op herladen.\n" +"Code stopped by auto-reload.\n" +msgstr "" #: supervisor/shared/safe_mode.c msgid "" @@ -112,6 +116,11 @@ msgstr "%q moet een int zijn" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() verwacht %d positionele argumenten maar kreeg %d" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + #: py/argcheck.c msgid "'%q' argument required" msgstr "'%q' argument vereist" @@ -274,6 +283,10 @@ msgstr "0.0 tot een complexe macht" msgid "3-arg pow() not supported" msgstr "3-arg pow() niet ondersteund" +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" @@ -294,7 +307,7 @@ msgstr "Adres type buiten bereik" #: ports/esp32s2/common-hal/canio/CAN.c msgid "All CAN peripherals are in use" -msgstr "" +msgstr "Alle CAN-peripherals zijn in gebruik" #: ports/esp32s2/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c msgid "All I2C peripherals are in use" @@ -304,7 +317,7 @@ msgstr "Alle I2C peripherals zijn in gebruik" #: ports/esp32s2/common-hal/frequencyio/FrequencyIn.c #: ports/esp32s2/common-hal/rotaryio/IncrementalEncoder.c msgid "All PCNT units in use" -msgstr "" +msgstr "Alle PCNT-eenheden zijn in gebruik" #: ports/atmel-samd/common-hal/canio/Listener.c #: ports/esp32s2/common-hal/canio/Listener.c @@ -427,7 +440,7 @@ msgstr "" #: ports/esp32s2/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" -msgstr "" +msgstr "Baudrate wordt niet ondersteund door randapparatuur" #: shared-module/displayio/Display.c #: shared-module/framebufferio/FramebufferDisplay.c @@ -441,7 +454,7 @@ 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 "" +msgstr "Bitdiepte moet tussen 1 en 6 liggen, niet %d" #: shared-bindings/audiobusio/PDMIn.c msgid "Bit depth must be multiple of 8." @@ -536,10 +549,26 @@ msgstr "Bytes moeten tussen 0 en 255 liggen." msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBC blocks moeten meervouden van 16 bytes zijn" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "Roep super().__init__() aan voor toegang native object." +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "Kan CCCD niet toewijzen aan lokaal Characteristic" @@ -573,6 +602,10 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "Output van beide kanalen kan niet op dezelfde pin" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "Kan niet lezen zonder MISO pin." @@ -617,6 +650,10 @@ msgstr "Kan niet ondubbelzinning sizeof scalar verkrijgen" msgid "Cannot vary frequency on a timer that is already in use" msgstr "Kan de frequentie van een timer die al in gebruik is niet variëren" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." msgstr "Kan niet schrijven zonder MOSI pin." @@ -859,7 +896,7 @@ msgstr "Verwachtte een adres" #: shared-bindings/alarm/__init__.c msgid "Expected an alarm" -msgstr "" +msgstr "Verwachtte een alarm" #: shared-module/_pixelbuf/PixelBuf.c #, c-format @@ -876,7 +913,7 @@ msgstr "FFT alleen voor ndarrays gedefineerd" #: extmod/ulab/code/fft/fft.c msgid "FFT is implemented for linear arrays only" -msgstr "" +msgstr "FFT is alleen geïmplementeerd voor lineaire arrays" #: ports/esp32s2/common-hal/socketpool/Socket.c msgid "Failed SSL handshake" @@ -948,6 +985,10 @@ msgstr "Bestand bestaat" msgid "Filters too complex" msgstr "Filters zijn te complex" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "Firmware image is ongeldig" + #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" msgstr "Formaat wordt niet ondersteund" @@ -957,11 +998,6 @@ msgstr "Formaat wordt niet ondersteund" msgid "Framebuffer requires %d bytes" msgstr "Framebuffer benodigd %d bytes" -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "" -"De vastgelegde frequentie is boven de capaciteit. Vastleggen gepauzeerd." - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -972,6 +1008,10 @@ msgstr "" msgid "Function requires lock" msgstr "Functie vereist lock" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "" + #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -1010,7 +1050,7 @@ msgstr "I2SOut is niet beschikbaar" #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "IOs 0, 2 & 4 do not support internal pullup in sleep" -msgstr "" +msgstr "IO's 0, 2 en 4 ondersteunen geen interne pullup in slaapstand" #: shared-bindings/aesio/aes.c #, c-format @@ -1031,7 +1071,7 @@ msgstr "Incorrecte buffer grootte" #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c msgid "Initialization failed due to lack of memory" -msgstr "" +msgstr "De initialisatie is mislukt vanwege een gebrek aan geheugen" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c msgid "Input taking too long" @@ -1098,8 +1138,9 @@ msgstr "Ongeldige PWM frequentie" #: ports/esp32s2/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" -msgstr "" +msgstr "Ongeldige Pin" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Ongeldig argument" @@ -1160,6 +1201,7 @@ msgstr "Ongeldige fase" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1208,6 +1250,14 @@ msgstr "Ongeldige run modus." msgid "Invalid security_mode" msgstr "Ongeldige security_mode" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "" + #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" msgstr "Ongeldige stem" @@ -1248,6 +1298,10 @@ msgstr "Lengte moet een int zijn" msgid "Length must be non-negative" msgstr "Lengte moet niet negatief zijn" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "MISO pin init mislukt." @@ -1296,7 +1350,7 @@ msgstr "Een meervoud van 6 rgb pinnen moet worden gebruikt, niet %d" #: ports/esp32s2/common-hal/nvm/ByteArray.c msgid "NVS Error" -msgstr "" +msgstr "NVS-fout" #: py/parse.c msgid "Name too long" @@ -1319,7 +1373,7 @@ msgstr "Geen DMA kanaal gevonden" #: shared-module/adafruit_bus_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" -msgstr "" +msgstr "Geen I2C-apparaat op adres: %x" #: ports/esp32s2/common-hal/busio/SPI.c ports/mimxrt10xx/common-hal/busio/SPI.c #: ports/stm/common-hal/busio/SPI.c @@ -1461,7 +1515,7 @@ msgstr "Alleen IPv4 adressen worden ondersteund" #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Only IPv4 sockets supported" -msgstr "" +msgstr "Alleen IPv4-sockets ondersteund" #: shared-module/displayio/OnDiskBitmap.c #, c-format @@ -1480,10 +1534,14 @@ msgstr "" "Alleen monochrome en 4bpp of 8bpp, en 16bpp of grotere geïndiceerde BMP's " "zijn ondersteund: %d bpp is gegeven" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "Only one alarm.time alarm can be set." +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." msgstr "" +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +msgid "Only one alarm.time alarm can be set." +msgstr "Slechts één alarm.time alarm kan worden ingesteld." + #: shared-module/displayio/ColorConverter.c msgid "Only one color can be transparent at a time" msgstr "Er kan maar één kleur per keer transparant zijn" @@ -1492,6 +1550,18 @@ msgstr "Er kan maar één kleur per keer transparant zijn" msgid "Only raw int supported for ip" msgstr "Alleen raw int ondersteund voor IP" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "Geen sockets meer beschikbaar" @@ -1500,6 +1570,10 @@ msgstr "Geen sockets meer beschikbaar" msgid "Oversample must be multiple of 8." msgstr "Oversample moet een meervoud van 8 zijn." +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" @@ -1519,6 +1593,10 @@ msgstr "" msgid "ParallelBus not yet supported" msgstr "ParallelBus nog niet ondersteund" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + #: py/moduerrno.c msgid "Permission denied" msgstr "Toegang geweigerd" @@ -1545,10 +1623,6 @@ msgstr "Pin moet hardware interrupts ondersteunen" msgid "Pin number already reserved by EXTI" msgstr "Pin nummer al gereserveerd door EXTI" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -1594,9 +1668,11 @@ msgstr "Prefix buffer moet op de heap zijn" #: main.c msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" +"Druk een willekeurige toets om de REPL te starten. Gebruik CTRL+D om te " +"herstarten.\n" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" #: shared-bindings/digitalio/DigitalInOut.c @@ -1647,6 +1723,10 @@ msgstr "Alleen-lezen bestandssysteem" msgid "Read-only object" msgstr "Alleen-lezen object" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" msgstr "Verversing te snel" @@ -1659,6 +1739,10 @@ msgstr "RemoteTransmissionRequests is beperkt tot 8 bytes" msgid "Requested AES mode is unsupported" msgstr "Gevraagde AES modus is niet ondersteund" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" msgstr "Rechter kanaal niet ondersteund" @@ -1769,7 +1853,7 @@ msgstr "Geef op zijn minst 1 UART pin op" #: shared-bindings/alarm/time/TimeAlarm.c msgid "Supply one of monotonic_time or epoch_time" -msgstr "" +msgstr "Geef monotonic_time of epoch_time" #: shared-bindings/gnss/GNSS.c msgid "System entry must be gnss.SatelliteSystem" @@ -1844,7 +1928,7 @@ msgstr "Tile breedte moet exact de bitmap breedte verdelen" #: shared-bindings/alarm/time/TimeAlarm.c msgid "Time is in the past." -msgstr "" +msgstr "Tijdstip ligt in het verleden." #: ports/nrf/common-hal/_bleio/Adapter.c #, c-format @@ -1959,7 +2043,7 @@ msgstr "Niet in staat om naar nvm te schrijven." #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." -msgstr "" +msgstr "Kan niet naar sleep_memory schrijven." #: ports/nrf/common-hal/_bleio/UUID.c msgid "Unexpected nrfx uuid type" @@ -2027,6 +2111,10 @@ msgstr "Niet-ondersteunde operatie" msgid "Unsupported pull value." msgstr "Niet-ondersteunde pull-waarde." +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "Update Mislukt" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -2037,6 +2125,10 @@ msgstr "Waarde lengte != vereist vaste lengte" msgid "Value length > max_length" msgstr "Waarde length > max_length" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "Viper-functies ondersteunen momenteel niet meer dan 4 argumenten" @@ -2094,7 +2186,7 @@ msgstr "WiFi wachtwoord moet tussen 8 en 63 karakters bevatten" #: main.c msgid "Woken up by alarm.\n" -msgstr "" +msgstr "Gewekt door alarm.\n" #: ports/nrf/common-hal/_bleio/PacketBuffer.c msgid "Writes not supported on Characteristic" @@ -2151,7 +2243,7 @@ msgstr "argsort argument moet een ndarray zijn" #: extmod/ulab/code/numerical/numerical.c msgid "argsort is not implemented for flattened arrays" -msgstr "" +msgstr "argsort wordt niet geïmplementeerd voor vlakke arrays" #: py/runtime.c msgid "argument has wrong type" @@ -2176,7 +2268,7 @@ msgstr "argumenten moeten ndarrays zijn" #: extmod/ulab/code/ndarray.c msgid "array and index length must be equal" -msgstr "" +msgstr "array en indexlengte moeten gelijk zijn" #: py/objarray.c shared-bindings/alarm/SleepMemory.c #: shared-bindings/nvm/ByteArray.c @@ -2185,7 +2277,7 @@ 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 "" +msgstr "verzoek om (arg)min.(arg)max te krijgen van lege reeks" #: extmod/ulab/code/numerical/numerical.c msgid "attempt to get argmin/argmax of an empty sequence" @@ -2197,15 +2289,15 @@ msgstr "attributen nog niet ondersteund" #: extmod/ulab/code/numerical/numerical.c msgid "axis is out of bounds" -msgstr "" +msgstr "as is buiten bereik" #: extmod/ulab/code/numerical/numerical.c msgid "axis must be None, or an integer" -msgstr "" +msgstr "as moet None of een integer zijn" #: extmod/ulab/code/numerical/numerical.c msgid "axis too long" -msgstr "" +msgstr "as te lang" #: py/builtinevex.c msgid "bad compile mode" @@ -2411,7 +2503,7 @@ msgstr "kan niet schakelen tussen handmatige en automatische veld specificatie" #: extmod/ulab/code/ndarray_operators.c msgid "cannot cast output with casting rule" -msgstr "" +msgstr "kan uitvoer niet converteren zonder conversieregel" #: py/objtype.c msgid "cannot create '%q' instances" @@ -2450,6 +2542,10 @@ msgid "circle can only be registered in one parent" msgstr "" "cirkel kan slechts bij één object van een hoger niveau worden geregistreerd" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "kleurbuffer moet 3 bytes (RGB) of 4 bytes (RGB + pad byte) zijn" @@ -2512,7 +2608,7 @@ msgstr "kon SD kaart versie niet bepalen" #: extmod/ulab/code/numerical/numerical.c msgid "cross is defined for 1D arrays of length 3" -msgstr "" +msgstr "kruis wordt gedefinieerd voor 1D-arrays van lengte 3" #: extmod/ulab/code/approx/approx.c msgid "data must be iterable" @@ -2522,6 +2618,10 @@ msgstr "data moet itereerbaar zijn" msgid "data must be of equal length" msgstr "data moet van gelijke lengte zijn" +#: extmod/ulab/code/ndarray.c +msgid "data type not understood" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "decimale getallen zijn niet ondersteund" @@ -2530,6 +2630,10 @@ msgstr "decimale getallen zijn niet ondersteund" msgid "default 'except' must be last" msgstr "standaard 'expect' moet laatste zijn" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2555,7 +2659,7 @@ msgstr "diff argument moet een ndarray zijn" #: extmod/ulab/code/numerical/numerical.c msgid "differentiation order out of range" -msgstr "" +msgstr "differentiatievolgorde buiten bereik" #: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c #: shared-bindings/math/__init__.c @@ -2588,7 +2692,7 @@ msgstr "end_x moet een int zijn" #: shared-bindings/alarm/time/TimeAlarm.c msgid "epoch_time not supported on this board" -msgstr "" +msgstr "epoch_time niet ondersteund op dit bord" #: ports/nrf/common-hal/busio/UART.c #, c-format @@ -2631,6 +2735,10 @@ msgstr "verwacht alleen een waarde voor set" msgid "expecting key:value for dict" msgstr "verwacht key:waarde for dict" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "extra keyword argumenten gegeven" @@ -2678,7 +2786,7 @@ msgstr "eerste argument moet een functie zijn" #: extmod/ulab/code/ulab_create.c msgid "first argument must be a tuple of ndarrays" -msgstr "" +msgstr "eerste argument moet een tupel van ndarrays zijn" #: extmod/ulab/code/ndarray.c msgid "first argument must be an iterable" @@ -2735,7 +2843,7 @@ msgstr "functie heeft hetzelfde teken aan beide uiteinden van het interval" #: extmod/ulab/code/ndarray.c msgid "function is defined for ndarrays only" -msgstr "" +msgstr "functie is alleen gedefinieerd voor ndarrays" #: py/argcheck.c #, c-format @@ -2832,11 +2940,11 @@ msgstr "inline assembler moet een functie zijn" #: extmod/ulab/code/ndarray.c msgid "input and output shapes are not compatible" -msgstr "" +msgstr "in- en uitvoervormen zijn niet compatibel" #: 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" +msgid "input argument must be an integer, a tuple, or a list" +msgstr "" #: extmod/ulab/code/fft/fft.c msgid "input array length must be power of 2" @@ -2844,7 +2952,7 @@ msgstr "invoer array lengte moet een macht van 2 zijn" #: extmod/ulab/code/ulab_create.c msgid "input arrays are not compatible" -msgstr "" +msgstr "input arrays zijn niet compatibel" #: extmod/ulab/code/poly/poly.c msgid "input data must be an iterable" @@ -2860,19 +2968,19 @@ msgstr "invoermatrix is singulier" #: extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" -msgstr "" +msgstr "invoer moet een gesloten ndarray zijn" #: extmod/ulab/code/ulab_create.c msgid "input must be a tensor of rank 2" -msgstr "" +msgstr "invoer moet een tensor van rang 2 zijn" #: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" -msgstr "" +msgstr "invoer moet een ndarray zijn" #: extmod/ulab/code/filter/filter.c msgid "input must be one-dimensional" -msgstr "" +msgstr "invoer moet eendimensionaal zijn" #: extmod/ulab/code/linalg/linalg.c msgid "input must be square matrix" @@ -2888,7 +2996,7 @@ msgstr "invoervectors moeten van gelijke lengte zijn" #: extmod/ulab/code/poly/poly.c msgid "inputs are not iterable" -msgstr "" +msgstr "invoer is niet itereerbaar" #: py/parsenum.c msgid "int() arg 2 must be >= 2 and <= 36" @@ -2962,7 +3070,7 @@ msgstr "ongeldige syntax voor nummer" #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "io must be rtc io" -msgstr "" +msgstr "io moet rtc io zijn" #: py/objtype.c msgid "issubclass() arg 1 must be a class" @@ -3033,7 +3141,7 @@ 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 "" +msgstr "loopback + silent mode wordt niet ondersteund door randapparaat" #: py/parse.c msgid "malformed f-string" @@ -3062,12 +3170,12 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "max_length moet 0-%d zijn als fixed_length %s is" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" -msgstr "max_length moet >0 zijn" +msgid "max_length must be >= 0" +msgstr "" #: extmod/ulab/code/ndarray.c msgid "maximum number of dimensions is 4" -msgstr "" +msgstr "maximaal aantal dimensies is 4" #: py/runtime.c msgid "maximum recursion depth exceeded" @@ -3075,10 +3183,14 @@ msgstr "maximale recursiediepte overschreden" #: extmod/ulab/code/approx/approx.c msgid "maxiter must be > 0" -msgstr "" +msgstr "maxiter moet groter dan 0 zijn" #: extmod/ulab/code/approx/approx.c msgid "maxiter should be > 0" +msgstr "maxiter moet groter dan 0 zijn" + +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" msgstr "" #: py/runtime.c @@ -3163,6 +3275,10 @@ msgstr "geen netwerkadapter (NIC) beschikbaar" msgid "no binding for nonlocal found" msgstr "geen binding voor nonlocal gevonden" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "geen module met naam '%q'" @@ -3200,9 +3316,17 @@ msgstr "niet-trefwoord argument na */**" msgid "non-keyword arg after keyword arg" msgstr "niet-trefwoord argument na trefwoord argument" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "" + #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" -msgstr "" +msgstr "norm is gedefinieerd voor 1D en 2D arrays" #: shared-bindings/_bleio/UUID.c msgid "not a 128-bit UUID" @@ -3270,7 +3394,11 @@ msgstr "string met oneven lengte" #: extmod/ulab/code/ulab_create.c msgid "offset is too large" -msgstr "" +msgstr "compensatie is te groot" + +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "compensatie moet groter of gelijk 0 zijn" #: py/objstr.c py/objstrunicode.c msgid "offset out of bounds" @@ -3296,11 +3424,7 @@ 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 "" +msgstr "operatie is alleen geïmplementeerd voor 1D Booleaanse arrays" #: extmod/ulab/code/numerical/numerical.c msgid "operation is not implemented on ndarrays" @@ -3393,6 +3517,8 @@ 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_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3439,7 +3565,7 @@ 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 "" +msgstr "resultaat kan niet naar gespecificeerd type geconverteerd worden" #: py/compile.c msgid "return annotation must be an identifier" @@ -3461,7 +3587,7 @@ msgstr "rgb_pins[%d] bevindt zich niet op dezelfde poort als klok" #: extmod/ulab/code/numerical/numerical.c msgid "roll argument must be an ndarray" -msgstr "" +msgstr "roll argument moet een ndarray zijn" #: py/objstr.c msgid "rsplit(None,n)" @@ -3489,6 +3615,10 @@ msgstr "scriptcompilatie wordt niet ondersteund" #: extmod/ulab/code/ndarray.c msgid "shape must be a tuple" +msgstr "vorm moet een tupel zijn" + +#: shared-module/msgpack/__init__.c +msgid "short read" msgstr "" #: py/objstr.c @@ -3620,6 +3750,10 @@ msgstr "time-outduur is groter dan de ondersteunde maximale waarde" msgid "timeout must be 0.0-100.0 seconds" msgstr "timeout moet tussen 0.0 en 100.0 seconden zijn" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "" + #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "timeout must be >= 0.0" msgstr "timeout moet groter dan 0.0 zijn" @@ -3638,12 +3772,16 @@ msgstr "timestamp buiten bereik voor platform time_t" #: extmod/ulab/code/ndarray.c msgid "tobytes can be invoked for dense arrays only" -msgstr "" +msgstr "tobytes kunnen alleen ingeroepen worden voor gesloten arrays" #: shared-module/struct/__init__.c msgid "too many arguments provided with the given format" msgstr "te veel argumenten opgegeven bij dit formaat" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "te veel indices" @@ -3653,17 +3791,17 @@ msgstr "te veel indices" msgid "too many values to unpack (expected %d)" msgstr "te veel waarden om uit te pakken (%d verwacht)" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "trapz is gedefinieerd voor eendimensionale arrays van gelijke lengte" #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "trigger level must be 0 or 1" -msgstr "" - -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "tuple index buiten bereik" +msgstr "triggerniveau moet 0 of 1 zijn" #: py/obj.c msgid "tuple/list has wrong length" @@ -3672,12 +3810,12 @@ 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 "" +msgstr "twai_driver_install geeft esp-idf fout #%d" #: ports/esp32s2/common-hal/canio/CAN.c #, c-format msgid "twai_start returned esp-idf error #%d" -msgstr "" +msgstr "twai_start geeft 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 @@ -3805,11 +3943,11 @@ msgstr "vectoren moeten van gelijke lengte zijn" #: ports/esp32s2/common-hal/alarm/pin/__init__.c msgid "wakeup conflict" -msgstr "" +msgstr "conflict bij ontwaken" #: ports/esp32s2/common-hal/watchdog/WatchDogTimer.c msgid "watchdog not initialized" -msgstr "" +msgstr "watchdog niet geïnitialiseerd" #: shared-bindings/watchdog/WatchDogTimer.c msgid "watchdog timeout must be greater than 0" @@ -3825,11 +3963,11 @@ msgstr "window moet <= interval zijn" #: extmod/ulab/code/numerical/numerical.c msgid "wrong axis index" -msgstr "" +msgstr "foute index voor as" #: extmod/ulab/code/ulab_create.c msgid "wrong axis specified" -msgstr "" +msgstr "onjuiste as gespecificeerd" #: extmod/ulab/code/vector/vectorise.c msgid "wrong input type" @@ -3855,6 +3993,10 @@ msgstr "onjuist uitvoer type" msgid "x value out of bounds" msgstr "x-waarde buiten bereik" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "y moet een int zijn" @@ -3879,6 +4021,37 @@ 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 "input argument must be an integer or a 2-tuple" +#~ msgstr "invoerargument moet een integer of 2-tuple zijn" + +#~ msgid "operation is not implemented for flattened array" +#~ msgstr "operatie is niet geïmplementeerd voor vlakke array" + +#~ msgid "tuple index out of range" +#~ msgstr "tuple index buiten bereik" + +#~ msgid "" +#~ "\n" +#~ "Code done running. Waiting for reload.\n" +#~ msgstr "" +#~ "\n" +#~ "Code is uitgevoerd. Wachten op herladen.\n" + +#~ msgid "PinAlarm not yet implemented" +#~ msgstr "PinAlarm nog niet geïmplementeerd" + +#~ msgid "Pretending to deep sleep until alarm, any key or file write.\n" +#~ msgstr "" +#~ "Simuleert diepe slaapstand tot alarm, een willekeurige toets of schrijven " +#~ "naar bestand.\n" + +#~ msgid "Frequency captured is above capability. Capture Paused." +#~ msgstr "" +#~ "De vastgelegde frequentie is boven de capaciteit. Vastleggen gepauzeerd." + +#~ msgid "max_length must be > 0" +#~ msgstr "max_length moet >0 zijn" + #~ msgid "Press any key to enter the REPL. Use CTRL-D to reload." #~ msgstr "" #~ "Druk een willekeurige toets om de REPL te starten. Gebruik CTRL+D om te " diff --git a/locale/pl.po b/locale/pl.po index 718bf50f42..41eee9e745 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-14 12:59-0500\n" +"POT-Creation-Date: 2021-01-04 12:55-0600\n" "PO-Revision-Date: 2020-12-02 20:29+0000\n" "Last-Translator: Maciej Stankiewicz \n" "Language-Team: pl\n" @@ -21,10 +21,14 @@ msgstr "" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" msgstr "" + +#: main.c +msgid "" "\n" -"Kod wykonany. Czekam na przeładowanie.\n" +"Code stopped by auto-reload.\n" +msgstr "" #: supervisor/shared/safe_mode.c msgid "" @@ -114,6 +118,11 @@ msgstr "%q powinno być typu int" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() bierze %d argumentów pozycyjnych, lecz podano %d" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + #: py/argcheck.c msgid "'%q' argument required" msgstr "'%q' wymaga argumentu" @@ -276,6 +285,10 @@ msgstr "0.0 do potęgi zespolonej" msgid "3-arg pow() not supported" msgstr "3-argumentowy pow() jest niewspierany" +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" @@ -538,10 +551,26 @@ msgstr "Bytes musi być między 0 a 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Bloki CBC muszą być wielokrotnościami 16 bajtów" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "" @@ -574,6 +603,10 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "Nie można mieć obu kanałów na tej samej nóżce" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "Nie można czytać bez nóżki MISO." @@ -617,6 +650,10 @@ msgstr "Wielkość skalara jest niejednoznaczna" msgid "Cannot vary frequency on a timer that is already in use" msgstr "Nie można zmieniać częstotliwości timera, który jest już używany" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." msgstr "Nie można pisać bez nóżki MOSI." @@ -948,6 +985,10 @@ msgstr "Plik istnieje" msgid "Filters too complex" msgstr "" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "" + #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" msgstr "Nie wspierany format" @@ -957,10 +998,6 @@ msgstr "Nie wspierany format" msgid "Framebuffer requires %d bytes" msgstr "Bufor ramki wymaga %d bajtów" -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "Uzyskana częstotliwość jest niemożliwa. Spauzowano." - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -970,6 +1007,10 @@ msgstr "" msgid "Function requires lock" msgstr "Funkcja wymaga blokady" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "" + #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -1098,6 +1139,7 @@ msgstr "Zła częstotliwość PWM" msgid "Invalid Pin" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Zły argument" @@ -1158,6 +1200,7 @@ msgstr "Zła faza" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1206,6 +1249,14 @@ msgstr "Zły tryb uruchomienia." msgid "Invalid security_mode" msgstr "Nieprawidłowy security_mode" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "" + #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" msgstr "" @@ -1246,6 +1297,10 @@ msgstr "Długość musi być całkowita" msgid "Length must be non-negative" msgstr "Długość musi być nieujemna" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "Nie powiodło się ustawienie pinu MISO." @@ -1473,7 +1528,11 @@ msgid "" "%d bpp given" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1485,6 +1544,18 @@ msgstr "W danym momencie przezroczysty może być tylko jeden kolor" msgid "Only raw int supported for ip" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "" @@ -1493,6 +1564,10 @@ msgstr "" msgid "Oversample must be multiple of 8." msgstr "Nadpróbkowanie musi być wielokrotnością 8." +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" @@ -1509,6 +1584,10 @@ msgstr "Nie można zmienić częstotliwości PWM gdy variable_frequency=False." msgid "ParallelBus not yet supported" msgstr "ParallelBus nie jest jeszcze obsługiwany" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + #: py/moduerrno.c msgid "Permission denied" msgstr "Odmowa dostępu" @@ -1535,10 +1614,6 @@ msgstr "Pin musi obsługiwać przerwania sprzętowe" msgid "Pin number already reserved by EXTI" msgstr "" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -1579,7 +1654,7 @@ msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" #: shared-bindings/digitalio/DigitalInOut.c @@ -1630,6 +1705,10 @@ msgstr "System plików tylko do odczytu" msgid "Read-only object" msgstr "Obiekt tylko do odczytu" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" msgstr "Zbyt wczesne odświeżenie" @@ -1642,6 +1721,10 @@ msgstr "" msgid "Requested AES mode is unsupported" msgstr "Żądany tryb AES nie jest obsługiwany" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" msgstr "Prawy kanał jest niewspierany" @@ -1998,6 +2081,10 @@ msgstr "Zła operacja" msgid "Unsupported pull value." msgstr "Zła wartość podciągnięcia." +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -2008,6 +2095,10 @@ msgstr "" msgid "Value length > max_length" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "Funkcje Viper nie obsługują obecnie więcej niż 4 argumentów" @@ -2416,6 +2507,10 @@ msgstr "argument chr() poza zakresem range(256)" msgid "circle can only be registered in one parent" msgstr "" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "bufor kolorów musi nieć 3 bajty (RGB) lub 4 bajty (RGB + wypełnienie)" @@ -2488,6 +2583,10 @@ msgstr "" msgid "data must be of equal length" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "data type not understood" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "liczby dziesiętne nieobsługiwane" @@ -2496,6 +2595,10 @@ msgstr "liczby dziesiętne nieobsługiwane" msgid "default 'except' must be last" msgstr "domyślny 'except' musi być ostatni" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2596,6 +2699,10 @@ msgstr "oczekiwano tylko wartości dla zbioru" msgid "expecting key:value for dict" msgstr "oczekiwano klucz:wartość dla słownika" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "nadmiarowe argumenty nazwane" @@ -2799,7 +2906,7 @@ 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" +msgid "input argument must be an integer, a tuple, or a list" msgstr "" #: extmod/ulab/code/fft/fft.c @@ -3023,8 +3130,8 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" -msgstr "max_length musi być > 0" +msgid "max_length must be >= 0" +msgstr "" #: extmod/ulab/code/ndarray.c msgid "maximum number of dimensions is 4" @@ -3042,6 +3149,10 @@ msgstr "" msgid "maxiter should be > 0" msgstr "" +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3124,6 +3235,10 @@ msgstr "brak wolnego NIC" msgid "no binding for nonlocal found" msgstr "brak wiązania dla zmiennej nielokalnej" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "brak modułu o nazwie '%q'" @@ -3161,6 +3276,14 @@ msgstr "argument nienazwany po */**" msgid "non-keyword arg after keyword arg" msgstr "argument nienazwany po nazwanym" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "" + #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3233,6 +3356,10 @@ msgstr "łańcuch o nieparzystej długości" msgid "offset is too large" msgstr "" +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "" + #: py/objstr.c py/objstrunicode.c msgid "offset out of bounds" msgstr "offset poza zakresem" @@ -3259,10 +3386,6 @@ msgstr "operandy nie mogły być rozgłaszane razem" 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 "" @@ -3354,6 +3477,8 @@ 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_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3451,6 +3576,10 @@ msgstr "kompilowanie skryptów nieobsługiwane" msgid "shape must be a tuple" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "znak jest niedopuszczalny w specyfikacji formatu łańcucha" @@ -3580,6 +3709,10 @@ msgstr "" msgid "timeout must be 0.0-100.0 seconds" msgstr "" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "" + #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "timeout must be >= 0.0" msgstr "timeout musi być >= 0.0" @@ -3604,6 +3737,10 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "zbyt wiele argumentów podanych dla tego formatu" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "zbyt wiele indeksów" @@ -3613,6 +3750,10 @@ msgstr "zbyt wiele indeksów" msgid "too many values to unpack (expected %d)" msgstr "zbyt wiele wartości do rozpakowania (oczekiwano %d)" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "" @@ -3621,10 +3762,6 @@ msgstr "" msgid "trigger level must be 0 or 1" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "indeks krotki poza zakresem" - #: py/obj.c msgid "tuple/list has wrong length" msgstr "krotka/lista ma złą długość" @@ -3815,6 +3952,10 @@ msgstr "" msgid "x value out of bounds" msgstr "x poza zakresem" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "y powinno być całkowite" @@ -3839,6 +3980,22 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "tuple index out of range" +#~ msgstr "indeks krotki poza zakresem" + +#~ msgid "" +#~ "\n" +#~ "Code done running. Waiting for reload.\n" +#~ msgstr "" +#~ "\n" +#~ "Kod wykonany. Czekam na przeładowanie.\n" + +#~ msgid "Frequency captured is above capability. Capture Paused." +#~ msgstr "Uzyskana częstotliwość jest niemożliwa. Spauzowano." + +#~ msgid "max_length must be > 0" +#~ msgstr "max_length musi być > 0" + #~ msgid "Press any key to enter the REPL. Use CTRL-D to reload." #~ msgstr "Dowolny klawisz aby uruchomić konsolę. CTRL-D aby przeładować." diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 8d3d54fabc..64723c1938 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-12-14 12:59-0500\n" -"PO-Revision-Date: 2020-12-16 17:00+0000\n" +"POT-Creation-Date: 2021-01-04 12:55-0600\n" +"PO-Revision-Date: 2021-01-13 02:19+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -14,15 +14,23 @@ 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.4-dev\n" +"X-Generator: Weblate 4.4.1-dev\n" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" msgstr "" "\n" -"O código concluiu a execução. Esperando pela recarga.\n" +"O código concluiu a sua execução.\n" + +#: main.c +msgid "" +"\n" +"Code stopped by auto-reload.\n" +msgstr "" +"\n" +"O código parou através do auto-reload.\n" #: supervisor/shared/safe_mode.c msgid "" @@ -112,6 +120,11 @@ msgstr "%q deve ser um int" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() recebe %d argumentos posicionais, porém %d foram informados" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "%s erro 0x%x" + #: py/argcheck.c msgid "'%q' argument required" msgstr "'%q' argumento(s) requerido(s)" @@ -278,6 +291,10 @@ msgstr "0,0 para uma potência complexa" msgid "3-arg pow() not supported" msgstr "3-arg pow() não compatível" +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "Tipos 64 bit" + #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" @@ -544,10 +561,29 @@ msgstr "Os bytes devem estar entre 0 e 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Os blocos CBC devem ter múltiplos de 16 bytes" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "CRC ou checksum inválido" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "Chame super().__init__() antes de acessar o objeto nativo." +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "O alarme só pode acontecer no RTC IO a partir do deep sleep." + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" +"O alarme só pode acontecer em um pino com nível baixo enquanto os outros " +"alarmes só com nível alto a partir do deep sleep." + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" +"O alarme só é possível nos dois pinos com sinal baixo a partir do deep sleep." + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "Não é possível definir o CCCD com a característica local" @@ -566,7 +602,7 @@ msgstr "Não é possível excluir valores" #: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c #: ports/nrf/common-hal/digitalio/DigitalInOut.c msgid "Cannot get pull while in output mode" -msgstr "Não é possível obter pull enquanto está modo de saída" +msgstr "Não é possível obter (pull) enquanto estiver no modo saída" #: ports/nrf/common-hal/microcontroller/Processor.c msgid "Cannot get temperature" @@ -582,6 +618,10 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "Não é possível emitir os dois canais no mesmo pino" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "Não é possível obter (pull) nos pinos somente de entrada." + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "Não é possível ler sem o pino MISO." @@ -626,6 +666,10 @@ msgstr "Não é possível obter inequivocamente o tamanho do escalar" msgid "Cannot vary frequency on a timer that is already in use" msgstr "Não é possível variar a frequência em um timer que já esteja em uso" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "Não é possível acordar (wake) no pino edge. Nível apenas." + #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." msgstr "Não é possível fazer a escrita sem um pino MOSI." @@ -957,6 +1001,10 @@ msgstr "Arquivo já existe" msgid "Filters too complex" msgstr "Os filtros são muito complexos" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "A imagem do firmware é invalida" + #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" msgstr "O formato não é suportado" @@ -966,11 +1014,6 @@ msgstr "O formato não é suportado" msgid "Framebuffer requires %d bytes" msgstr "O Framebuffer requer %d bytes" -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "" -"A frequência capturada está acima da capacidade. A captura está em pausa." - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "" @@ -981,6 +1024,10 @@ msgstr "" msgid "Function requires lock" msgstr "A função requer bloqueio" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "Falha Genérica" + #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -1109,6 +1156,7 @@ msgstr "Frequência PWM inválida" msgid "Invalid Pin" msgstr "Pino inválido" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Argumento inválido" @@ -1169,6 +1217,7 @@ msgstr "Fase Inválida" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1217,6 +1266,14 @@ msgstr "O modo de execução é inválido." msgid "Invalid security_mode" msgstr "O Security_mode é inválido" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "Tamanho inválido" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "Estado inválido" + #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" msgstr "A voz é inválida" @@ -1257,6 +1314,10 @@ msgstr "Tamanho deve ser um int" msgid "Length must be non-negative" msgstr "O comprimento deve ser positivo" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "Endereço MAC inválido" + #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "A inicialização do pino MISO falhou." @@ -1323,7 +1384,7 @@ msgstr "Nenhum DAC no chip" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "No DMA channel found" -msgstr "Nenhum canal DMA encontrado" +msgstr "Nenhum canal DMA foi encontrado" #: shared-module/adafruit_bus_device/I2CDevice.c #, c-format @@ -1488,7 +1549,11 @@ msgstr "" "São compatíveis apenas os BMPs monocromáticos, indexados em 4bpp ou 8bpp e " "16bpp ou superior: determinado %d bpp" -#: ports/esp32s2/common-hal/alarm/__init__.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "Apenas um TouchAlarm pode ser colocado em deep sleep." + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "Apenas um alarme alarm.time pode ser definido." @@ -1500,6 +1565,18 @@ msgstr "Apenas uma cor pode ser transparente de cada vez" msgid "Only raw int supported for ip" msgstr "Apenas o int bruto é compatível para o ip" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "A operação ou o recurso não é suportado" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "A operação expirou" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "Sem memória" + #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "Sem soquetes" @@ -1508,6 +1585,10 @@ msgstr "Sem soquetes" msgid "Oversample must be multiple of 8." msgstr "A superamostragem deve ser um múltiplo de 8." +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "O PDMIn não está disponível" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" @@ -1528,6 +1609,10 @@ msgstr "" msgid "ParallelBus not yet supported" msgstr "O ParallelBus ainda não é compatível" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "O periférico está em uso" + #: py/moduerrno.c msgid "Permission denied" msgstr "Permissão negada" @@ -1554,10 +1639,6 @@ msgstr "O pino deve ser compatível com as interrupções do hardware" msgid "Pin number already reserved by EXTI" msgstr "Número do PIN já está reservado através da EXTI" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "PinAlarm ainda não foi implementado" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -1608,9 +1689,9 @@ msgstr "" "Pressione qualquer tecla para entrar no REPL. Use CTRL-D para recarregar.\n" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" -"Simular o deep sleep até o alarme, até qualquer chave ou até a escrita do " +"Tentando entrar no deep sleep até o alarme, pressione CTRL-C ou grave o " "arquivo.\n" #: shared-bindings/digitalio/DigitalInOut.c @@ -1661,6 +1742,10 @@ msgstr "Sistema de arquivos somente leitura" msgid "Read-only object" msgstr "Objeto de leitura apenas" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "A resposta recebida foi inválida" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" msgstr "A recarga foi cedo demais" @@ -1673,6 +1758,10 @@ msgstr "As requisições de transmissões remotas é limitada a 8 bytes" msgid "Requested AES mode is unsupported" msgstr "O modo AES solicitado não é compatível" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "O recurso solicitado não foi encontrado" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" msgstr "Canal direito não suportado" @@ -2045,6 +2134,10 @@ msgstr "Operação não suportada" msgid "Unsupported pull value." msgstr "O valor pull não é compatível." +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "A atualização falou" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -2055,6 +2148,10 @@ msgstr "Comprimento do valor != comprimento fixo necessário" msgid "Value length > max_length" msgstr "O comprimento do valor é > max_length" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "A versão era inválida" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "Atualmente, as funções do Viper não suportam mais de 4 argumentos" @@ -2471,6 +2568,10 @@ msgstr "o arg chr() está fora do intervalo(256)" msgid "circle can only be registered in one parent" msgstr "o círculo só pode ser registrado em um pai" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "código fora do alcance 0~127" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "o buffer das cores deve ter 3 bytes (RGB) ou 4 bytes (RGB + pad byte)" @@ -2545,6 +2646,10 @@ 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/ndarray.c +msgid "data type not understood" +msgstr "o tipo do dado não foi compreendido" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "os números decimais não são compatíveis" @@ -2553,6 +2658,10 @@ msgstr "os números decimais não são compatíveis" msgid "default 'except' must be last" msgstr "a predefinição 'exceto' deve ser o último" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "o padrão não é uma função" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2655,6 +2764,10 @@ msgstr "esperando apenas um valor para o conjunto" msgid "expecting key:value for dict" msgstr "chave esperada: valor para dict" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "o ext_hook não é uma função" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "argumentos extras de palavras-chave passados" @@ -2858,8 +2971,9 @@ 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" +msgid "input argument must be an integer, a tuple, or a list" +msgstr "" +"argumento da entrada deve ser um número inteiro, uma tupla ou uma lista" #: extmod/ulab/code/fft/fft.c msgid "input array length must be power of 2" @@ -3085,8 +3199,8 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "o max_length deve ser 0-%d quando Fixed_length for %s" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" -msgstr "max_length deve ser > 0" +msgid "max_length must be >= 0" +msgstr "max_length deve ser >= 0" #: extmod/ulab/code/ndarray.c msgid "maximum number of dimensions is 4" @@ -3104,6 +3218,10 @@ msgstr "maxiter deve ser > 0" msgid "maxiter should be > 0" msgstr "maxiter pode ser > 0" +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" +msgstr "o argumento mediano deve ser um ndarray" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3188,6 +3306,10 @@ msgstr "não há uma Placa de Rede disponível" msgid "no binding for nonlocal found" msgstr "nenhuma ligação para nonlocal foi encontrada" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "nenhum empacotador padrão" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "nenhum módulo chamado '%q'" @@ -3225,6 +3347,14 @@ 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" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "o tempo limite não zero deve ser > 0.01" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "o tempo limite não zero deve ser >= intervalo" + #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "a norma é definida para matrizes 1D e 2D" @@ -3297,6 +3427,10 @@ msgstr "sequência com comprimento ímpar" msgid "offset is too large" msgstr "o offset é muito grande" +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "o offset deve ser >= 0" + #: py/objstr.c py/objstrunicode.c msgid "offset out of bounds" msgstr "desvio fora dos limites" @@ -3324,10 +3458,6 @@ msgstr "os operandos não puderam ser transmitidos juntos" 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" @@ -3422,6 +3552,8 @@ 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_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3520,6 +3652,10 @@ msgstr "compilação de script não suportada" msgid "shape must be a tuple" msgstr "a forma deve ser uma tupla" +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "leitura curta" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "sinal não permitido no especificador do formato da sequência" @@ -3649,6 +3785,10 @@ msgstr "a duração do tempo limite excedeu o valor máximo suportado" msgid "timeout must be 0.0-100.0 seconds" msgstr "o tempo limite deve ser entre 0.0 a 100.0 segundos" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "o tempo limite deve ser < 655.35 seg" + #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "timeout must be >= 0.0" msgstr "o tempo limite deve ser >= 0,0" @@ -3673,6 +3813,10 @@ msgstr "os tobytes podem ser invocados apenas nas matrizes densas" msgid "too many arguments provided with the given format" msgstr "Muitos argumentos fornecidos com o formato dado" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "dimensões demais" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "índices demais" @@ -3682,6 +3826,10 @@ msgstr "índices demais" msgid "too many values to unpack (expected %d)" msgstr "valores demais para descompactar (esperado %d)" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "Trapz está definido para arrays 1D" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "o trapz está definido para 1D arrays de igual tamanho" @@ -3690,10 +3838,6 @@ msgstr "o trapz está definido para 1D arrays de igual tamanho" msgid "trigger level must be 0 or 1" msgstr "nível do gatilho deve ser 0 ou 1" -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "o índice da tupla está fora do intervalo" - #: py/obj.c msgid "tuple/list has wrong length" msgstr "a tupla/lista está com tamanho incorreto" @@ -3884,6 +4028,10 @@ msgstr "tipo da saída incorreta" msgid "x value out of bounds" msgstr "o valor x está fora dos limites" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "o xTaskCreate falhou" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "y deve ser um int" @@ -3908,6 +4056,43 @@ 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 one alarm.touch alarm can be set." +#~ msgstr "Apenas um alarme alarm.touch pode ser definido." + +#~ msgid "TouchAlarm not available in light sleep" +#~ msgstr "O TouchAlarm não está disponívle no modo light sleep" + +#~ 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" + +#~ msgid "operation is not implemented for flattened array" +#~ msgstr "a operação não é implementada para a matriz achatada" + +#~ msgid "tuple index out of range" +#~ msgstr "o índice da tupla está fora do intervalo" + +#~ msgid "" +#~ "\n" +#~ "Code done running. Waiting for reload.\n" +#~ msgstr "" +#~ "\n" +#~ "O código concluiu a execução. Esperando pela recarga.\n" + +#~ msgid "PinAlarm not yet implemented" +#~ msgstr "PinAlarm ainda não foi implementado" + +#~ msgid "Pretending to deep sleep until alarm, any key or file write.\n" +#~ msgstr "" +#~ "Simular o deep sleep até o alarme, até qualquer chave ou até a escrita do " +#~ "arquivo.\n" + +#~ msgid "Frequency captured is above capability. Capture Paused." +#~ msgstr "" +#~ "A frequência capturada está acima da capacidade. A captura está em pausa." + +#~ msgid "max_length must be > 0" +#~ msgstr "max_length deve ser > 0" + #~ msgid "Press any key to enter the REPL. Use CTRL-D to reload." #~ msgstr "" #~ "Pressione qualquer tecla para entrar no REPL. Use CTRL-D para recarregar." diff --git a/locale/sv.po b/locale/sv.po index a608866e3b..477664972c 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-12-14 12:59-0500\n" -"PO-Revision-Date: 2020-12-07 20:26+0000\n" +"POT-Creation-Date: 2021-01-04 12:55-0600\n" +"PO-Revision-Date: 2021-01-05 21:03+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -14,15 +14,23 @@ 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.4-dev\n" +"X-Generator: Weblate 4.4.1-dev\n" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" msgstr "" "\n" -"Koden har kört klart. Väntar på omladdning.\n" +"Koden har kört klart.\n" + +#: main.c +msgid "" +"\n" +"Code stopped by auto-reload.\n" +msgstr "" +"\n" +"Koden stoppades av auto-omladdning.\n" #: supervisor/shared/safe_mode.c msgid "" @@ -112,6 +120,11 @@ msgstr "%q ska vara en int" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() kräver %d positionsargument men %d gavs" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + #: py/argcheck.c msgid "'%q' argument required" msgstr "'%q' argument krävs" @@ -274,6 +287,10 @@ msgstr "0,0 till ett komplext nummer" msgid "3-arg pow() not supported" msgstr "3-arguments pow() stöds inte" +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" @@ -536,10 +553,27 @@ msgstr "Bytes måste vara mellan 0 och 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBC-block måste vara multiplar om 16 byte" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "Anropa super().__init__() innan du använder det ursprungliga objektet." +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "Kan bara larma på RTC-IO från djupsömn." + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" +"Kan bara larma från djup sömn på låg för en pinne medan andra larmar på hög." + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "Kan bara larma från djup sömn på två låga pinnar." + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "Kan inte ställa in CCCD på lokal karaktäristik" @@ -573,6 +607,10 @@ msgstr "" msgid "Cannot output both channels on the same pin" msgstr "Det går inte att mata ut båda kanalerna på samma pinne" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "Kan bara använda pull på pinne för input." + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "Kan inte läsa utan MISO-pinne." @@ -617,6 +655,10 @@ msgstr "Kan inte entydigt få sizeof scalar" msgid "Cannot vary frequency on a timer that is already in use" msgstr "Det går inte att ändra frekvensen på en timer som redan används" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "Kan inte vakna på nivåskift, enbart nivå." + #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." msgstr "Kan inte skriva utan MOSI-pinne." @@ -948,6 +990,10 @@ msgstr "Filen finns redan" msgid "Filters too complex" msgstr "Filter för komplexa" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "Firmware-avbilden är ogiltig" + #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" msgstr "Formatet stöds inte" @@ -957,10 +1003,6 @@ msgstr "Formatet stöds inte" msgid "Framebuffer requires %d bytes" msgstr "Framebuffer kräver %d byte" -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "Infångningsfrekvens är för hög. Infångning pausad." - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "Frekvensen måste matcha befintlig PWMOut med denna timer" @@ -970,6 +1012,10 @@ msgstr "Frekvensen måste matcha befintlig PWMOut med denna timer" msgid "Function requires lock" msgstr "Funktion kräver lås" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "" + #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -1096,8 +1142,9 @@ msgstr "Ogiltig PWM-frekvens" #: ports/esp32s2/common-hal/analogio/AnalogIn.c msgid "Invalid Pin" -msgstr "" +msgstr "Ogiltig pinne" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Ogiltigt argument" @@ -1158,6 +1205,7 @@ msgstr "Ogiltig fas" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1206,6 +1254,14 @@ msgstr "Ogiltigt körläge." msgid "Invalid security_mode" msgstr "Ogiltigt säkerhetsläge" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "" + #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" msgstr "Ogiltig kanal" @@ -1246,6 +1302,10 @@ msgstr "Length måste vara en int" msgid "Length must be non-negative" msgstr "Length måste vara positiv" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "init för MISO-pinne misslyckades." @@ -1478,7 +1538,11 @@ msgstr "" "Endast monokrom, indexerad 4 bpp eller 8 bpp och 16 bpp eller högre BMP: er " "stöds: %d bpp angiven" -#: ports/esp32s2/common-hal/alarm/__init__.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "Endast ett alarm.time kan ställas in." @@ -1490,6 +1554,18 @@ msgstr "Bara en färg kan vara genomskinlig i taget" msgid "Only raw int supported for ip" msgstr "Endast raw int stöds för ip" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "Slut på sockets" @@ -1498,6 +1574,10 @@ msgstr "Slut på sockets" msgid "Oversample must be multiple of 8." msgstr "Översampling måste vara multipel av 8." +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" @@ -1516,6 +1596,10 @@ msgstr "" msgid "ParallelBus not yet supported" msgstr "ParallelBus stöds ännu inte" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + #: py/moduerrno.c msgid "Permission denied" msgstr "Åtkomst nekad" @@ -1542,10 +1626,6 @@ msgstr "Pinnen måste stödja hårdvaruavbrott" msgid "Pin number already reserved by EXTI" msgstr "PInn-nummer redan reserverat av EXTI" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "PinAlarm är inte implementerat ännu" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -1591,10 +1671,12 @@ msgstr "Prefixbufferten måste finnas på heap" #: main.c msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" +"Tryck på valfri tangent för att gå in i REPL. Använd CTRL-D för att ladda " +"om.\n" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" -msgstr "" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" +msgstr "Fingerar djup sömn tills larm, Ctrl-C eller filskrivning.\n" #: shared-bindings/digitalio/DigitalInOut.c msgid "Pull not used when direction is output." @@ -1644,6 +1726,10 @@ msgstr "Skrivskyddat filsystem" msgid "Read-only object" msgstr "Skrivskyddat objekt" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" msgstr "Uppdaterad för tidigt" @@ -1656,6 +1742,10 @@ msgstr "RemoteTransmissionRequests begränsad till 8 byte" msgid "Requested AES mode is unsupported" msgstr "Det begärda AES-läget stöds inte" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" msgstr "Höger kanal stöds inte" @@ -1956,7 +2046,7 @@ msgstr "Det gick inte att skriva till nvm." #: shared-bindings/alarm/SleepMemory.c msgid "Unable to write to sleep_memory." -msgstr "" +msgstr "Det gick inte att skriva till sleep_memory." #: ports/nrf/common-hal/_bleio/UUID.c msgid "Unexpected nrfx uuid type" @@ -2024,6 +2114,10 @@ msgstr "Åtgärd som inte stöds" msgid "Unsupported pull value." msgstr "Ogiltigt Pull-värde." +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "Uppdateringen misslyckades" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -2034,6 +2128,10 @@ msgstr "Värdets längde ! = krävd fast längd" msgid "Value length > max_length" msgstr "Värdets längd > max_length" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "Viper-funktioner stöder för närvarande inte mer än fyra argument" @@ -2088,7 +2186,7 @@ msgstr "WiFi-lösenord måste vara mellan 8 och 63 tecken" #: main.c msgid "Woken up by alarm.\n" -msgstr "" +msgstr "Vaknade av larm.\n" #: ports/nrf/common-hal/_bleio/PacketBuffer.c msgid "Writes not supported on Characteristic" @@ -2444,6 +2542,10 @@ msgstr "chr() arg är inte i intervallet(256)" msgid "circle can only be registered in one parent" msgstr "circle kan endast registreras i en förälder" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "färgbuffert måste vara 3 byte (RGB) eller 4 byte (RGB + pad byte)" @@ -2516,6 +2618,10 @@ 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/ndarray.c +msgid "data type not understood" +msgstr "datatyp inte förstådd" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "decimaltal stöds inte" @@ -2524,6 +2630,10 @@ msgstr "decimaltal stöds inte" msgid "default 'except' must be last" msgstr "standard \"except\" måste ligga sist" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2626,6 +2736,10 @@ msgstr "förväntar bara ett värde för set" msgid "expecting key:value for dict" msgstr "förväntar nyckel:värde för dict" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "extra keyword-argument angivna" @@ -2829,8 +2943,8 @@ 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" +msgid "input argument must be an integer, a tuple, or a list" +msgstr "indataargument måste vara integer, en tuple eller list" #: extmod/ulab/code/fft/fft.c msgid "input array length must be power of 2" @@ -3056,8 +3170,8 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "max_length måste vara 0-%d när fixed_length är %s" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" -msgstr "max_length måste vara > 0" +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" @@ -3075,6 +3189,10 @@ msgstr "maxiter måste vara > 0" msgid "maxiter should be > 0" msgstr "maxiter bör vara > 0" +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" +msgstr "argumentet median måste vara en ndarray" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3157,6 +3275,10 @@ msgstr "ingen tillgänglig NIC" msgid "no binding for nonlocal found" msgstr "ingen bindning för ickelokal hittad" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "ingen modul med namnet '%q'" @@ -3194,6 +3316,14 @@ msgstr "icke nyckelord arg efter * / **" msgid "non-keyword arg after keyword arg" msgstr "icke nyckelord arg efter nyckelord arg" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "Icke-noll timeout måste vara > 0.01" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "Icke-noll timeout måste vara >= intervall" + #: 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" @@ -3266,6 +3396,10 @@ msgstr "sträng har udda längd" msgid "offset is too large" msgstr "offset är för stor" +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "offset måste vara >= 0" + #: py/objstr.c py/objstrunicode.c msgid "offset out of bounds" msgstr "offset utanför gränserna" @@ -3292,10 +3426,6 @@ msgstr "operander kan inte sändas tillsammans" 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" @@ -3387,6 +3517,8 @@ 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_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3485,6 +3617,10 @@ msgstr "skriptkompilering stöds inte" msgid "shape must be a tuple" msgstr "shape måste vara en tuple" +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "tecknet tillåts inte i strängformatspecificerare" @@ -3614,6 +3750,10 @@ msgstr "timeout-längd överskred det maximala värde som stöds" msgid "timeout must be 0.0-100.0 seconds" msgstr "timeout måste vara 0.0-100.0 sekunder" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "timeout måste vara < 655,35 sekunder" + #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "timeout must be >= 0.0" msgstr "timeout måste vara >= 0.0" @@ -3638,6 +3778,10 @@ msgstr "tobyte kan enbart anropas för täta matriser" msgid "too many arguments provided with the given format" msgstr "för många argument för det givna formatet" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "för många dimensioner" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "för många index" @@ -3647,6 +3791,10 @@ msgstr "för många index" msgid "too many values to unpack (expected %d)" msgstr "för många värden att packa upp (förväntat %d)" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "trapz är definierat för 1D-matriser" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "trapz är definierad för 1D-matriser med samma längd" @@ -3655,10 +3803,6 @@ msgstr "trapz är definierad för 1D-matriser med samma längd" msgid "trigger level must be 0 or 1" msgstr "triggernivå måste vara 0 eller 1" -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "tupelindex utanför intervallet" - #: py/obj.c msgid "tuple/list has wrong length" msgstr "tupel/lista har fel längd" @@ -3849,6 +3993,10 @@ msgstr "fel utdatatyp" msgid "x value out of bounds" msgstr "x-värde utanför intervall" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "y ska vara en int" @@ -3873,6 +4021,37 @@ 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 one alarm.touch alarm can be set." +#~ msgstr "Endast ett larm av typ alarm.touch kan ställas in." + +#~ msgid "input argument must be an integer or a 2-tuple" +#~ msgstr "indataargumentet måste vara ett heltal eller en 2-tupel" + +#~ msgid "operation is not implemented for flattened array" +#~ msgstr "operationen inte implementeras för tillplattad matris" + +#~ msgid "tuple index out of range" +#~ msgstr "tupelindex utanför intervallet" + +#~ msgid "" +#~ "\n" +#~ "Code done running. Waiting for reload.\n" +#~ msgstr "" +#~ "\n" +#~ "Koden har kört klart. Väntar på omladdning.\n" + +#~ msgid "PinAlarm not yet implemented" +#~ msgstr "PinAlarm är inte implementerat ännu" + +#~ msgid "Pretending to deep sleep until alarm, any key or file write.\n" +#~ msgstr "Fingerar djup sömn tills larm, valfri tangent eller filskrivning.\n" + +#~ msgid "Frequency captured is above capability. Capture Paused." +#~ msgstr "Infångningsfrekvens är för hög. Infångning pausad." + +#~ msgid "max_length must be > 0" +#~ msgstr "max_length måste vara > 0" + #~ msgid "Press any key to enter the REPL. Use CTRL-D to reload." #~ msgstr "" #~ "Tryck på valfri knapp för att gå in i REPL. Använd CTRL-D för att ladda " diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 1cbcc709ff..d9a750b348 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-12-14 12:59-0500\n" +"POT-Creation-Date: 2021-01-04 12:55-0600\n" "PO-Revision-Date: 2020-11-19 01:28+0000\n" "Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" @@ -20,10 +20,14 @@ msgstr "" #: main.c msgid "" "\n" -"Code done running. Waiting for reload.\n" +"Code done running.\n" msgstr "" + +#: main.c +msgid "" "\n" -"Dàimǎ yǐ wánchéng yùnxíng. Zhèngzài děngdài chóngxīn jiāzài.\n" +"Code stopped by auto-reload.\n" +msgstr "" #: supervisor/shared/safe_mode.c msgid "" @@ -114,6 +118,11 @@ msgstr "%q yīnggāi shì yīgè int" msgid "%q() takes %d positional arguments but %d were given" msgstr "%q() cǎiyòng %d wèizhì cānshù, dàn gěi chū %d" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "" + #: py/argcheck.c msgid "'%q' argument required" msgstr "xūyào '%q' cānshù" @@ -276,6 +285,10 @@ msgstr "0.0 dào fùzá diànyuán" msgid "3-arg pow() not supported" msgstr "bù zhīchí 3-arg pow ()" +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "" + #: ports/atmel-samd/common-hal/countio/Counter.c #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "A hardware interrupt channel is already in use" @@ -538,10 +551,26 @@ msgstr "Zì jié bìxū jiè yú 0 dào 255 zhī jiān." msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBC kuài bì xū shì 16 zì jié de bèi shù" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + #: py/objtype.c msgid "Call super().__init__() before accessing native object." msgstr "Zài fǎngwèn běn jī wùjiàn zhīqián diàoyòng super().__init__()." +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on two low pins from deep sleep." +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c msgid "Can't set CCCD on local Characteristic" msgstr "Wúfǎ jiāng CCCD shèzhì wéi běndì tèzhēng" @@ -574,6 +603,10 @@ msgstr "Nín wúfǎ sǎomiáo kuòzhǎn de, kě liánjiē de guǎnggào." msgid "Cannot output both channels on the same pin" msgstr "Wúfǎ shūchū tóng yīgè yǐn jiǎo shàng de liǎng gè píndào" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot pull on input-only pin." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot read without MISO pin." msgstr "Wúfǎ dòu qǔ méiyǒu MISO de yǐn jiǎo." @@ -617,6 +650,10 @@ msgstr "Wúfǎ míngquè de huòdé biāoliàng de dàxiǎo" msgid "Cannot vary frequency on a timer that is already in use" msgstr "Wúfǎ gēnggǎi yǐ zài shǐyòng de jìshí qì shàng de pínlǜ" +#: ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +msgid "Cannot wake on pin edge. Only level." +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "Cannot write without MOSI pin." msgstr "Wúfǎ xiě rù MOSI de yǐn jiǎo." @@ -946,6 +983,10 @@ msgstr "Wénjiàn cúnzài" msgid "Filters too complex" msgstr "guò lǜ qì tài fù zá" +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "" + #: ports/cxd56/common-hal/camera/Camera.c msgid "Format not supported" msgstr "Bù zhīyuán géshì" @@ -955,10 +996,6 @@ msgstr "Bù zhīyuán géshì" msgid "Framebuffer requires %d bytes" msgstr "zhēn huǎn chōng qū xū yào %d zì jié" -#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c -msgid "Frequency captured is above capability. Capture Paused." -msgstr "Pínlǜ bǔhuò gāo yú nénglì. Bǔhuò zàntíng." - #: ports/stm/common-hal/pwmio/PWMOut.c msgid "Frequency must match existing PWMOut using this timer" msgstr "Pínlǜ bìxū yǔ shǐyòng cǐ jìshí qì de xiàn yǒu PWMOut xiāng pǐpèi" @@ -968,6 +1005,10 @@ msgstr "Pínlǜ bìxū yǔ shǐyòng cǐ jìshí qì de xiàn yǒu PWMOut xiāng msgid "Function requires lock" msgstr "Hánshù xūyào suǒdìng" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Generic Failure" +msgstr "" + #: shared-bindings/displayio/Display.c #: shared-bindings/displayio/EPaperDisplay.c #: shared-bindings/framebufferio/FramebufferDisplay.c @@ -1096,6 +1137,7 @@ msgstr "Wúxiào de PWM pínlǜ" msgid "Invalid Pin" msgstr "" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "Wúxiào de cānshù" @@ -1156,6 +1198,7 @@ msgstr "Jiēduàn wúxiào" #: ports/atmel-samd/common-hal/audioio/AudioOut.c #: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c #: ports/esp32s2/common-hal/touchio/TouchIn.c shared-bindings/pwmio/PWMOut.c #: shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid pin" @@ -1204,6 +1247,14 @@ msgstr "Wúxiào de yùnxíng móshì." msgid "Invalid security_mode" msgstr "Ānquán móshì wúxiào" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Invalid state" +msgstr "" + #: shared-bindings/audiomixer/Mixer.c msgid "Invalid voice" msgstr "Yǔyīn wúxiào" @@ -1244,6 +1295,10 @@ msgstr "Chángdù bìxū shì yīgè zhěngshù" msgid "Length must be non-negative" msgstr "Chángdù bìxū shìfēi fùshù" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "MAC address was invalid" +msgstr "" + #: shared-module/bitbangio/SPI.c msgid "MISO pin init failed." msgstr "MISO yǐn jiǎo chūshǐhuà shībài." @@ -1475,7 +1530,11 @@ msgstr "" "Jǐn zhīchí dān sè, suǒyǐn wéi 4bpp huò 8bpp yǐjí 16bpp huò gèng gāo de BMP: " "Gěi chū %d bpp" -#: ports/esp32s2/common-hal/alarm/__init__.c +#: ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1487,6 +1546,18 @@ msgstr "Yīcì zhǐ néng yǒuyī zhǒng yánsè shì tòumíng de" msgid "Only raw int supported for ip" msgstr "Ip jǐn zhīchí raw int" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Out of memory" +msgstr "" + #: ports/esp32s2/common-hal/socketpool/SocketPool.c msgid "Out of sockets" msgstr "tào jiē zì wài" @@ -1495,6 +1566,10 @@ msgstr "tào jiē zì wài" msgid "Oversample must be multiple of 8." msgstr "Guò cǎiyàng bìxū shì 8 de bèishù." +#: shared-bindings/audiobusio/PDMIn.c +msgid "PDMIn not available" +msgstr "" + #: shared-bindings/pwmio/PWMOut.c msgid "" "PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" @@ -1512,6 +1587,10 @@ msgstr "Dāng biànliàng_pínlǜ shì False zài jiànzhú shí PWM pínlǜ bù msgid "ParallelBus not yet supported" msgstr "Shàng bù zhīchí ParallelBus" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + #: py/moduerrno.c msgid "Permission denied" msgstr "Quánxiàn bèi jùjué" @@ -1538,10 +1617,6 @@ msgstr "Yǐn jiǎo bìxū zhīchí yìngjiàn zhōngduàn" msgid "Pin number already reserved by EXTI" msgstr "Zhēn hào yǐ bèi EXTI bǎoliú" -#: ports/esp32s2/common-hal/alarm/__init__.c -msgid "PinAlarm not yet implemented" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -1586,7 +1661,7 @@ msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" #: main.c -msgid "Pretending to deep sleep until alarm, any key or file write.\n" +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" msgstr "" #: shared-bindings/digitalio/DigitalInOut.c @@ -1637,6 +1712,10 @@ msgstr "Zhǐ dú wénjiàn xìtǒng" msgid "Read-only object" msgstr "Zhǐ dú duìxiàng" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Received response was invalid" +msgstr "" + #: shared-bindings/displayio/EPaperDisplay.c msgid "Refresh too soon" msgstr "Shuāxīn tài kuàile" @@ -1649,6 +1728,10 @@ msgstr "RemoteTransmissionRequests xiànzhì wèi 8 gè zì jié" msgid "Requested AES mode is unsupported" msgstr "Qǐngqiú de AES móshì bù shòu zhīchí" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Requested resource not found" +msgstr "" + #: ports/atmel-samd/common-hal/audioio/AudioOut.c msgid "Right channel unsupported" msgstr "Bù zhīchí yòu tōngdào" @@ -2016,6 +2099,10 @@ msgstr "Bù zhīchí de cāozuò" msgid "Unsupported pull value." msgstr "Bù zhīchí de lādòng zhí." +#: ports/esp32s2/common-hal/dualbank/__init__.c +msgid "Update Failed" +msgstr "" + #: ports/nrf/common-hal/_bleio/Characteristic.c #: ports/nrf/common-hal/_bleio/Descriptor.c msgid "Value length != required fixed length" @@ -2026,6 +2113,10 @@ msgstr "Zhí chángdù != Suǒ xū de gùdìng chángdù" msgid "Value length > max_length" msgstr "Zhí chángdù > zuìdà chángdù" +#: ports/esp32s2/bindings/espidf/__init__.c ports/esp32s2/esp_error.c +msgid "Version was invalid" +msgstr "" + #: py/emitnative.c msgid "Viper functions don't currently support more than 4 arguments" msgstr "Viper hánshù mùqián bù zhīchí chāoguò 4 gè cānshù" @@ -2435,6 +2526,10 @@ msgstr "chr() cān shǔ bùzài fànwéi (256)" msgid "circle can only be registered in one parent" msgstr "quānzi zhǐ néng zài yī wèi jiāzhǎng zhōng zhùcè" +#: shared-bindings/msgpack/ExtType.c +msgid "code outside range 0~127" +msgstr "" + #: shared-bindings/displayio/Palette.c msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" msgstr "" @@ -2510,6 +2605,10 @@ 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/ndarray.c +msgid "data type not understood" +msgstr "" + #: py/parsenum.c msgid "decimal numbers not supported" msgstr "bù zhīchí xiǎoshù shù" @@ -2518,6 +2617,10 @@ msgstr "bù zhīchí xiǎoshù shù" msgid "default 'except' must be last" msgstr "mòrèn 'except' bìxū shì zuìhòu yīgè" +#: shared-bindings/msgpack/__init__.c +msgid "default is not a function" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "" "destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" @@ -2619,6 +2722,10 @@ msgstr "jǐn qídài shèzhì de zhí" msgid "expecting key:value for dict" msgstr "qídài guānjiàn: Zìdiǎn de jiàzhí" +#: shared-bindings/msgpack/__init__.c +msgid "ext_hook is not a function" +msgstr "" + #: py/argcheck.c msgid "extra keyword arguments given" msgstr "éwài de guānjiàn cí cānshù" @@ -2822,8 +2929,8 @@ 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ǔ" +msgid "input argument must be an integer, a tuple, or a list" +msgstr "" #: extmod/ulab/code/fft/fft.c msgid "input array length must be power of 2" @@ -3047,8 +3154,8 @@ msgid "max_length must be 0-%d when fixed_length is %s" msgstr "Dāng gùdìng chángdù wèi %s shí, zuìdà chángdù bìxū wèi 0-%d" #: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c -msgid "max_length must be > 0" -msgstr "Max_length bìxū > 0" +msgid "max_length must be >= 0" +msgstr "" #: extmod/ulab/code/ndarray.c msgid "maximum number of dimensions is 4" @@ -3066,6 +3173,10 @@ msgstr "maxiter bì xū > 0" msgid "maxiter should be > 0" msgstr "maxiter yìng wéi > 0" +#: extmod/ulab/code/numerical/numerical.c +msgid "median argument must be an ndarray" +msgstr "" + #: py/runtime.c #, c-format msgid "memory allocation failed, allocating %u bytes" @@ -3148,6 +3259,10 @@ msgstr "méiyǒu kěyòng de NIC" msgid "no binding for nonlocal found" msgstr "zhǎo bù dào fēi běndì de bǎng dìng" +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + #: py/builtinimport.c msgid "no module named '%q'" msgstr "méiyǒu mókuài '%q'" @@ -3185,6 +3300,14 @@ 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ù" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "non-zero timeout must be > 0.01" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "non-zero timeout must be >= interval" +msgstr "" + #: extmod/ulab/code/linalg/linalg.c msgid "norm is defined for 1D and 2D arrays" msgstr "" @@ -3257,6 +3380,10 @@ msgstr "jīshù zìfú chuàn" msgid "offset is too large" msgstr "" +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "" + #: py/objstr.c py/objstrunicode.c msgid "offset out of bounds" msgstr "piānlí biānjiè" @@ -3283,10 +3410,6 @@ msgstr "cāozuò shǔ bùnéng yīqǐ guǎngbò" 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" @@ -3377,6 +3500,8 @@ 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_feather_esp32s2_nopsram/mpconfigboard.h +#: ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: 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 @@ -3475,6 +3600,10 @@ msgstr "bù zhīchí jiǎoběn biānyì" msgid "shape must be a tuple" msgstr "" +#: shared-module/msgpack/__init__.c +msgid "short read" +msgstr "" + #: py/objstr.c msgid "sign not allowed in string format specifier" msgstr "zìfú chuàn géshì shuōmíng fú zhōng bù yǔnxǔ shǐyòng fúhào" @@ -3604,6 +3733,10 @@ msgstr "chāoshí shíjiān chāoguò zuìdà zhīchí zhí" msgid "timeout must be 0.0-100.0 seconds" msgstr "Chāo shí shíjiān bìxū wèi 0.0 Dào 100.0 Miǎo" +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "timeout must be < 655.35 secs" +msgstr "" + #: shared-bindings/_bleio/CharacteristicBuffer.c msgid "timeout must be >= 0.0" msgstr "chāoshí bìxū shì >= 0.0" @@ -3628,6 +3761,10 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "tígōng jǐ dìng géshì de cānshù tài duō" +#: extmod/ulab/code/ulab_create.c +msgid "too many dimensions" +msgstr "" + #: extmod/ulab/code/ndarray.c msgid "too many indices" msgstr "suǒyǐn tài duō" @@ -3637,6 +3774,10 @@ msgstr "suǒyǐn tài duō" msgid "too many values to unpack (expected %d)" msgstr "dǎkāi tài duō zhí (yùqí %d)" +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays" +msgstr "" + #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" msgstr "Trapz shì wèi děng zhǎng de 1D shùzǔ dìngyì de" @@ -3645,10 +3786,6 @@ msgstr "Trapz shì wèi děng zhǎng de 1D shùzǔ dìngyì de" msgid "trigger level must be 0 or 1" msgstr "" -#: extmod/ulab/code/linalg/linalg.c -msgid "tuple index out of range" -msgstr "yuán zǔ suǒyǐn chāochū fànwéi" - #: py/obj.c msgid "tuple/list has wrong length" msgstr "yuán zǔ/lièbiǎo chángdù cuòwù" @@ -3839,6 +3976,10 @@ msgstr "cuòwù de shūchū lèixíng" msgid "x value out of bounds" msgstr "x zhí chāochū biānjiè" +#: ports/esp32s2/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + #: shared-bindings/displayio/Shape.c msgid "y should be an int" msgstr "y yīnggāi shì yīgè zhěngshù" @@ -3863,6 +4004,25 @@ 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 "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ǔ" + +#~ msgid "tuple index out of range" +#~ msgstr "yuán zǔ suǒyǐn chāochū fànwéi" + +#~ msgid "" +#~ "\n" +#~ "Code done running. Waiting for reload.\n" +#~ msgstr "" +#~ "\n" +#~ "Dàimǎ yǐ wánchéng yùnxíng. Zhèngzài děngdài chóngxīn jiāzài.\n" + +#~ msgid "Frequency captured is above capability. Capture Paused." +#~ msgstr "Pínlǜ bǔhuò gāo yú nénglì. Bǔhuò zàntíng." + +#~ msgid "max_length must be > 0" +#~ msgstr "Max_length bìxū > 0" + #~ msgid "Press any key to enter the REPL. Use CTRL-D to reload." #~ msgstr "Àn xià rènhé jiàn jìnrù REPL. Shǐyòng CTRL-D chóngxīn jiāzài." diff --git a/main.c b/main.c index 378c506579..91b6a062d2 100755 --- a/main.c +++ b/main.c @@ -157,7 +157,7 @@ STATIC void start_mp(supervisor_allocation* heap) { #if CIRCUITPY_ALARM // Record which alarm woke us up, if any. An object may be created so the heap must be functional. - alarm_save_wakeup_alarm(); + alarm_save_wake_alarm(); // Reset alarm module only after we retrieved the wakeup alarm. alarm_reset(); #endif @@ -260,10 +260,10 @@ STATIC void print_code_py_status_message(safe_mode_t safe_mode) { STATIC bool run_code_py(safe_mode_t safe_mode) { bool serial_connected_at_start = serial_connected(); #if CIRCUITPY_AUTORELOAD_DELAY_MS > 0 - if (serial_connected_at_start) { - serial_write("\n"); - print_code_py_status_message(safe_mode); - } + serial_write("\n"); + print_code_py_status_message(safe_mode); + print_safe_mode_message(safe_mode); + serial_write("\n"); #endif pyexec_result_t result; @@ -307,16 +307,17 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { if (result.return_code & PYEXEC_FORCED_EXIT) { return reload_requested; } + + if (reload_requested && result.return_code == PYEXEC_EXCEPTION) { + serial_write_compressed(translate("\nCode stopped by auto-reload.\n")); + } else { + serial_write_compressed(translate("\nCode done running.\n")); + } } // Program has finished running. - // Display a different completion message if the user has no USB attached (cannot save files) - if (!serial_connected_at_start) { - serial_write_compressed(translate("\nCode done running. Waiting for reload.\n")); - } - - bool serial_connected_before_animation = false; + bool serial_connected_before_animation = serial_connected(); #if CIRCUITPY_DISPLAYIO bool refreshed_epaper_display = false; #endif @@ -409,7 +410,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { alarm_enter_deep_sleep(); // Does not return. } else { - serial_write_compressed(translate("Pretending to deep sleep until alarm, any key or file write.\n")); + serial_write_compressed(translate("Pretending to deep sleep until alarm, CTRL-C or file write.\n")); } } } @@ -615,6 +616,10 @@ void gc_collect(void) { background_callback_gc_collect(); + #if CIRCUITPY_ALARM + common_hal_alarm_gc_collect(); + #endif + #if CIRCUITPY_DISPLAYIO displayio_gc_collect(); #endif diff --git a/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk b/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk index f976dfe787..b5a4bc735f 100644 --- a/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk +++ b/ports/atmel-samd/boards/8086_commander/mpconfigboard.mk @@ -22,6 +22,7 @@ CIRCUITPY_GAMEPAD = 1 CIRCUITPY_BUSDEVICE = 1 # Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD #FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_ADXL34x diff --git a/ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.mk b/ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.mk index fd24edafa2..07b1b98002 100644 --- a/ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.mk +++ b/ports/atmel-samd/boards/arduino_nano_33_iot/mpconfigboard.mk @@ -11,3 +11,5 @@ LONGINT_IMPL = NONE CIRCUITPY_FULL_BUILD = 0 SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 diff --git a/ports/atmel-samd/boards/bdmicro_vina_d21/mpconfigboard.mk b/ports/atmel-samd/boards/bdmicro_vina_d21/mpconfigboard.mk index a0d9a779f8..cff5a32d1c 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d21/mpconfigboard.mk +++ b/ports/atmel-samd/boards/bdmicro_vina_d21/mpconfigboard.mk @@ -14,6 +14,7 @@ LONGINT_IMPL = MPZ CIRCUITPY_BITBANGIO = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_MSGPACK = 0 CIRCUITPY_VECTORIO = 0 CIRCUITPY_BUSDEVICE = 0 diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk index 5389fc89a5..505f5c145d 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk @@ -15,12 +15,14 @@ LONGINT_IMPL = MPZ CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_MSGPACK = 0 MICROPY_PY_ASYNC_AWAIT = 0 SUPEROPT_GC = 0 CFLAGS_INLINE_LIMIT = 55 # Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk index 31e10d736c..c3be33134c 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk @@ -16,6 +16,7 @@ CIRCUITPY_BITBANGIO = 0 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_MSGPACK = 0 CIRCUITPY_PIXELBUF = 1 CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 0 @@ -25,6 +26,7 @@ CFLAGS_INLINE_LIMIT = 50 # Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Crickit FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk index 36b49b0eef..51e9b05af2 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk @@ -16,6 +16,7 @@ CIRCUITPY_BITBANGIO = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_MSGPACK = 0 CIRCUITPY_PIXELBUF = 0 CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 0 @@ -26,6 +27,7 @@ SUPEROPT_GC = 0 CFLAGS_INLINE_LIMIT = 55 # Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk index 2fe085567a..d1a6fc7ae5 100644 --- a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk @@ -15,6 +15,7 @@ CIRCUITPY_BITBANGIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_MSGPACK = 0 CIRCUITPY_VECTORIO = 0 CIRCUITPY_BUSDEVICE = 0 diff --git a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk index 331a3110ef..f06163b84a 100644 --- a/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_express_crickit/mpconfigboard.mk @@ -18,8 +18,10 @@ CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_GAMEPAD = 0 CFLAGS_INLINE_LIMIT = 50 +CIRCUITPY_MSGPACK = 0 # Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Crickit FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Motor FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk index 6ea21ed82e..6e089bb90d 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_rfm69/mpconfigboard.mk @@ -28,4 +28,5 @@ CFLAGS_INLINE_LIMIT = 35 SUPEROPT_GC = 0 # Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_RFM69 diff --git a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk index 76a6be2e34..383b6a6df4 100644 --- a/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_rfm9x/mpconfigboard.mk @@ -29,4 +29,5 @@ CFLAGS_INLINE_LIMIT = 35 SUPEROPT_GC = 0 # Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_RFM9x diff --git a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk index c2d692f9b7..3078544fcb 100644 --- a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk @@ -15,6 +15,7 @@ CIRCUITPY_BITBANGIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_MSGPACK = 0 # supersized, not ultra-supersized CIRCUITPY_VECTORIO = 0 CIRCUITPY_BUSDEVICE = 0 diff --git a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk index 2b211abd4e..1931ceb9a8 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk @@ -27,6 +27,7 @@ CFLAGS_INLINE_LIMIT = 55 SUPEROPT_GC = 0 # Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk index c35854758c..03f633e6d8 100644 --- a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk @@ -14,6 +14,7 @@ LONGINT_IMPL = MPZ CIRCUITPY_BITBANGIO = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_MSGPACK = 0 CIRCUITPY_VECTORIO = 0 CIRCUITPY_BUSDEVICE = 0 diff --git a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk index 393adf8397..321ee5f476 100644 --- a/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/mini_sam_m4/mpconfigboard.mk @@ -15,3 +15,6 @@ LONGINT_IMPL = MPZ CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_BITBANG_APA102 = 1 + +#Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_DotStar diff --git a/ports/atmel-samd/boards/neopixel_trinkey_m0/board.c b/ports/atmel-samd/boards/neopixel_trinkey_m0/board.c new file mode 100644 index 0000000000..cde441b3d9 --- /dev/null +++ b/ports/atmel-samd/boards/neopixel_trinkey_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 "supervisor/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/neopixel_trinkey_m0/mpconfigboard.h b/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.h new file mode 100644 index 0000000000..ebf8b1e345 --- /dev/null +++ b/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.h @@ -0,0 +1,57 @@ +#define MICROPY_HW_BOARD_NAME "Adafruit NeoPixel Trinkey M0" +#define MICROPY_HW_MCU_NAME "samd21e18" + +#define MICROPY_HW_NEOPIXEL (&pin_PA05) + +#define MICROPY_PORT_A (0) +#define MICROPY_PORT_B (0) +#define MICROPY_PORT_C (0) + +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 +#define IGNORE_PIN_PA02 1 +#define IGNORE_PIN_PA04 1 +#define IGNORE_PIN_PA06 1 +#define IGNORE_PIN_PA08 1 +#define IGNORE_PIN_PA09 1 +#define IGNORE_PIN_PA10 1 +#define IGNORE_PIN_PA11 1 +#define IGNORE_PIN_PA12 1 +#define IGNORE_PIN_PA13 1 +#define IGNORE_PIN_PA14 1 +#define IGNORE_PIN_PA15 1 +#define IGNORE_PIN_PA16 1 +#define IGNORE_PIN_PA17 1 +#define IGNORE_PIN_PA18 1 +#define IGNORE_PIN_PA19 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_PB00 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 diff --git a/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk new file mode 100644 index 0000000000..ab8065a9c5 --- /dev/null +++ b/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk @@ -0,0 +1,44 @@ +USB_VID = 0x239A +USB_PID = 0x80F0 +USB_PRODUCT = "NeoPixel Trinkey M0" +USB_MANUFACTURER = "Adafruit Industries LLC" + +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = NONE + +SUPEROPT_GC = 0 + +CIRCUITPY_ANALOGIO = 0 +CIRCUITPY_ROTARYIO = 0 +CIRCUITPY_RTC = 0 +CIRCUITPY_SAMD = 0 +CIRCUITPY_PS2IO = 0 +CIRCUITPY_PULSEIO = 0 +CIRCUITPY_PWMIO = 0 +CIRCUITPY_AUDIOCORE = 0 +CIRCUITPY_BUSIO = 0 +CIRCUITPY_STORAGE = 0 + +CIRCUITPY_MATH = 1 +CIRCUITPY_PIXELBUF = 1 +CIRCUITPY_USB_MIDI = 1 +CIRCUITPY_TOUCHIO = 1 +CIRCUITPY_FULL_BUILD = 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 + +# Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID diff --git a/ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c b/ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c new file mode 100644 index 0000000000..3673fcbeca --- /dev/null +++ b/ports/atmel-samd/boards/neopixel_trinkey_m0/pins.c @@ -0,0 +1,9 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_TOUCH1), MP_ROM_PTR(&pin_PA03) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_TOUCH2), MP_ROM_PTR(&pin_PA07) }, + +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/atmel-samd/boards/pewpew10/mpconfigboard.mk b/ports/atmel-samd/boards/pewpew10/mpconfigboard.mk index 1cc91a8df6..fadcc21448 100644 --- a/ports/atmel-samd/boards/pewpew10/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pewpew10/mpconfigboard.mk @@ -24,3 +24,8 @@ SUPEROPT_GC = 0 FROZEN_MPY_DIRS += $(TOP)/frozen/pew-pewpew-standalone-10.x CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/pycubed/mpconfigboard.mk b/ports/atmel-samd/boards/pycubed/mpconfigboard.mk index a82362b8d2..b7b8073ab9 100644 --- a/ports/atmel-samd/boards/pycubed/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pycubed/mpconfigboard.mk @@ -21,6 +21,7 @@ CIRCUITPY_GAMEPAD = 0 CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_PS2IO = 0 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD diff --git a/ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk b/ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk index 3bf42d7054..f49bb3fef0 100644 --- a/ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk +++ b/ports/atmel-samd/boards/pycubed_mram/mpconfigboard.mk @@ -21,6 +21,7 @@ CIRCUITPY_GAMEPAD = 0 CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_PS2IO = 0 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD diff --git a/ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk b/ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk index a63f142742..8773c5771d 100644 --- a/ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk +++ b/ports/atmel-samd/boards/qtpy_m0_haxpress/mpconfigboard.mk @@ -17,6 +17,7 @@ CIRCUITPY_BITBANGIO = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_MSGPACK = 0 SUPEROPT_GC = 0 diff --git a/ports/atmel-samd/boards/sam32/mpconfigboard.mk b/ports/atmel-samd/boards/sam32/mpconfigboard.mk index 9ac24a014c..1dc686ef8a 100644 --- a/ports/atmel-samd/boards/sam32/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sam32/mpconfigboard.mk @@ -13,4 +13,5 @@ LONGINT_IMPL = MPZ CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_USTACK = 1 +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/atmel-samd/boards/shirtty/mpconfigboard.mk b/ports/atmel-samd/boards/shirtty/mpconfigboard.mk index a04e097692..0b56e9ae02 100644 --- a/ports/atmel-samd/boards/shirtty/mpconfigboard.mk +++ b/ports/atmel-samd/boards/shirtty/mpconfigboard.mk @@ -13,3 +13,5 @@ CIRCUITPY_I2CPERIPHERAL = 1 CIRCUITPY_TOUCHIO = 0 SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 diff --git a/ports/atmel-samd/boards/snekboard/mpconfigboard.mk b/ports/atmel-samd/boards/snekboard/mpconfigboard.mk index 67e5b2312d..889490450f 100644 --- a/ports/atmel-samd/boards/snekboard/mpconfigboard.mk +++ b/ports/atmel-samd/boards/snekboard/mpconfigboard.mk @@ -14,6 +14,7 @@ LONGINT_IMPL = MPZ CIRCUITPY_BITBANGIO = 0 CIRCUITPY_GAMEPAD = 0 CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_MSGPACK = 0 CIRCUITPY_VECTORIO = 0 CIRCUITPY_BUSDEVICE = 0 diff --git a/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk index 590c4795fb..5b7f93328d 100755 --- a/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk @@ -15,6 +15,7 @@ CIRCUITPY_BITBANGIO = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_GAMEPAD = 0 CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_MSGPACK = 0 CIRCUITPY_VECTORIO = 0 CIRCUITPY_BUSDEVICE = 0 diff --git a/ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk b/ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk index 704d265141..734be2d145 100644 --- a/ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk +++ b/ports/atmel-samd/boards/stackrduino_m0_pro/mpconfigboard.mk @@ -16,6 +16,7 @@ CIRCUITPY_BITBANGIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_MSGPACK = 0 CIRCUITPY_VECTORIO = 0 CIRCUITPY_BUSDEVICE = 0 diff --git a/ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.mk b/ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.mk index d6f333b5be..3562228c71 100644 --- a/ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.mk +++ b/ports/atmel-samd/boards/xinabox_cc03/mpconfigboard.mk @@ -24,3 +24,4 @@ CIRCUITPY_TOUCHIO=0 CIRCUITPY_BUSDEVICE=1 # Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice diff --git a/ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.mk b/ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.mk index fd2fa044a8..53908293f5 100644 --- a/ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.mk +++ b/ports/atmel-samd/boards/xinabox_cs11/mpconfigboard.mk @@ -27,4 +27,5 @@ CIRCUITPY_COUNTIO=0 CIRCUITPY_BUSDEVICE=1 # Include these Python libraries in firmware. +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SD diff --git a/ports/atmel-samd/common-hal/analogio/AnalogOut.c b/ports/atmel-samd/common-hal/analogio/AnalogOut.c index 1565b0a8f4..3ddd9cac66 100644 --- a/ports/atmel-samd/common-hal/analogio/AnalogOut.c +++ b/ports/atmel-samd/common-hal/analogio/AnalogOut.c @@ -55,21 +55,22 @@ void common_hal_analogio_analogout_construct(analogio_analogout_obj_t* self, mp_raise_NotImplementedError(translate("No DAC on chip")); #else - int channel = -1; + uint8_t channel; + switch (pin->number) { + #if defined(PIN_PA02) && !defined(IGNORE_PIN_PA02) + case PIN_PA02: + channel = 0; + break; + #endif - #if defined(PIN_PA02) && !defined(IGNORE_PIN_PA02) - if (pin->number != PIN_PA02) { - channel = 0; - } - #endif - #if defined(PIN_PA05) && defined(PIN_PA05) && !defined(IGNORE_PIN_PA05) - if (pin->number != PIN_PA05) { - channel = 1; - } - #endif + #if defined(SAM_D5X_E5X) && defined(PIN_PA05) && !defined(IGNORE_PIN_PA05) + case PIN_PA05: + channel = 1; + break; + #endif - if(channel == -1) { - mp_raise_ValueError(translate("AnalogOut not supported on given pin")); + default: + mp_raise_ValueError(translate("AnalogOut not supported on given pin")); return; } diff --git a/ports/atmel-samd/common-hal/audioio/AudioOut.c b/ports/atmel-samd/common-hal/audioio/AudioOut.c index 5cefba56f1..34b718dca8 100644 --- a/ports/atmel-samd/common-hal/audioio/AudioOut.c +++ b/ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -197,7 +197,7 @@ void common_hal_audioio_audioout_construct(audioio_audioout_obj_t* self, #endif #ifdef SAM_D5X_E5X DAC->EVCTRL.reg |= DAC_EVCTRL_STARTEI0; - DAC->DACCTRL[0].reg = DAC_DACCTRL_CCTRL_CC100K | + DAC->DACCTRL[0].reg = DAC_DACCTRL_CCTRL_CC12M | DAC_DACCTRL_ENABLE | DAC_DACCTRL_LEFTADJ; DAC->CTRLB.reg = DAC_CTRLB_REFSEL_VREFPU; @@ -206,7 +206,7 @@ void common_hal_audioio_audioout_construct(audioio_audioout_obj_t* self, #ifdef SAM_D5X_E5X if (channel1_enabled) { DAC->EVCTRL.reg |= DAC_EVCTRL_STARTEI1; - DAC->DACCTRL[1].reg = DAC_DACCTRL_CCTRL_CC100K | + DAC->DACCTRL[1].reg = DAC_DACCTRL_CCTRL_CC12M | DAC_DACCTRL_ENABLE | DAC_DACCTRL_LEFTADJ; DAC->CTRLB.reg = DAC_CTRLB_REFSEL_VREFPU; diff --git a/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c b/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c index 02d0482dca..f973db90b0 100644 --- a/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +++ b/ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c @@ -82,7 +82,8 @@ void frequencyin_emergency_cancel_capture(uint8_t index) { #ifdef SAM_D5X_E5X NVIC_EnableIRQ(EIC_0_IRQn + self->channel); #endif - mp_raise_RuntimeError(translate("Frequency captured is above capability. Capture Paused.")); + // Frequency captured is above capability. Capture paused. + // We can't raise an error here; we're in an interrupt handler. } void frequencyin_interrupt_handler(uint8_t index) { diff --git a/ports/atmel-samd/common-hal/microcontroller/Pin.c b/ports/atmel-samd/common-hal/microcontroller/Pin.c index 7dd87a3b2c..564d037e03 100644 --- a/ports/atmel-samd/common-hal/microcontroller/Pin.c +++ b/ports/atmel-samd/common-hal/microcontroller/Pin.c @@ -169,6 +169,9 @@ void common_hal_never_reset_pin(const mcu_pin_obj_t* pin) { } void common_hal_reset_pin(const mcu_pin_obj_t* pin) { + if (pin == NULL) { + return; + } reset_pin_number(pin->number); } diff --git a/ports/atmel-samd/common-hal/pwmio/PWMOut.c b/ports/atmel-samd/common-hal/pwmio/PWMOut.c index 2e538ccdc3..b5142c21e1 100644 --- a/ports/atmel-samd/common-hal/pwmio/PWMOut.c +++ b/ports/atmel-samd/common-hal/pwmio/PWMOut.c @@ -44,6 +44,7 @@ # define _TCC_SIZE(unused, n) TCC ## n ## _SIZE, # define TCC_SIZES { REPEAT_MACRO(_TCC_SIZE, 0, TCC_INST_NUM) } +static const uint8_t tcc_sizes[TCC_INST_NUM] = TCC_SIZES; static uint32_t tcc_periods[TCC_INST_NUM]; static uint32_t tc_periods[TC_INST_NUM]; @@ -233,8 +234,7 @@ pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t* self, resolution = 16; } else { // TCC resolution varies so look it up. - const uint8_t _tcc_sizes[TCC_INST_NUM] = TCC_SIZES; - resolution = _tcc_sizes[timer->index]; + resolution = tcc_sizes[timer->index]; } // First determine the divisor that gets us the highest resolution. uint32_t system_clock = common_hal_mcu_processor_get_frequency(); @@ -421,7 +421,8 @@ void common_hal_pwmio_pwmout_set_frequency(pwmio_pwmout_obj_t* self, if (t->is_tc) { resolution = 16; } else { - resolution = 24; + // TCC resolution varies so look it up. + resolution = tcc_sizes[t->index]; } uint32_t system_clock = common_hal_mcu_processor_get_frequency(); uint32_t new_top; diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index 7d02789e82..c2e27e1e7f 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -319,8 +319,9 @@ safe_mode_t port_init(void) { } void reset_port(void) { +#if CIRCUITPY_BUSIO reset_sercoms(); - +#endif #if CIRCUITPY_AUDIOIO audio_dma_reset(); audioout_reset(); @@ -429,9 +430,11 @@ uint32_t port_get_saved_word(void) { // TODO: Move this to an RTC backup register so we can preserve it when only the BACKUP power domain // is enabled. static volatile uint64_t overflowed_ticks = 0; +#ifdef SAMD21 static volatile bool _ticks_enabled = false; +#endif -static uint32_t _get_count(uint32_t* overflow_count) { +static uint32_t _get_count(uint64_t* overflow_count) { #ifdef SAM_D5X_E5X while ((RTC->MODE0.SYNCBUSY.reg & (RTC_MODE0_SYNCBUSY_COUNTSYNC | RTC_MODE0_SYNCBUSY_COUNT)) != 0) {} #endif @@ -500,7 +503,7 @@ void RTC_Handler(void) { } uint64_t port_get_raw_ticks(uint8_t* subticks) { - uint32_t overflow_count; + uint64_t overflow_count; uint32_t current_ticks = _get_count(&overflow_count); if (subticks != NULL) { *subticks = (current_ticks % 16) * 2; @@ -537,9 +540,11 @@ void port_disable_tick(void) { // they'll wake us up earlier. If we don't, we'll mess up ticks by overwriting // the next RTC wake up time. void port_interrupt_after_ticks(uint32_t ticks) { + #ifdef SAMD21 if (_ticks_enabled) { return; } + #endif _port_interrupt_after_ticks(ticks); } diff --git a/ports/cxd56/boards/spresense/mpconfigboard.mk b/ports/cxd56/boards/spresense/mpconfigboard.mk index 7b8ac6ff63..80c6e4b692 100644 --- a/ports/cxd56/boards/spresense/mpconfigboard.mk +++ b/ports/cxd56/boards/spresense/mpconfigboard.mk @@ -4,3 +4,5 @@ USB_PRODUCT = "Spresense" USB_MANUFACTURER = "Sony" INTERNAL_FLASH_FILESYSTEM = 1 + +CIRCUITPY_MSGPACK = 0 diff --git a/ports/esp32s2/Makefile b/ports/esp32s2/Makefile index 01f8f48a78..aac9347824 100644 --- a/ports/esp32s2/Makefile +++ b/ports/esp32s2/Makefile @@ -106,6 +106,8 @@ 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 += -isystem esp-idf/components/app_update/include +INC += -isystem esp-idf/components/bootloader_support/include INC += -I$(BUILD)/esp-idf/config CFLAGS += -DHAVE_CONFIG_H \ @@ -143,7 +145,6 @@ LDFLAGS += -L$(BUILD)/esp-idf/esp-idf/esp32s2 \ -Tesp32s2.peripherals.ld \ -Lesp-idf/components/esp_rom/esp32s2/ld \ -Tesp32s2.rom.ld \ - -Tesp32s2.rom.api.ld \ -Tesp32s2.rom.libgcc.ld \ -Tesp32s2.rom.newlib-data.ld \ -Tesp32s2.rom.newlib-funcs.ld \ @@ -192,6 +193,7 @@ SRC_C += \ lib/utils/sys_stdio_mphal.c \ lib/netutils/netutils.c \ peripherals/timer.c \ + peripherals/touch.c \ peripherals/pcnt.c \ peripherals/pins.c \ peripherals/rmt.c \ @@ -276,7 +278,7 @@ menuconfig: $(BUILD)/esp-idf/config # qstr builds include headers so we need to make sure they are up to date $(HEADER_BUILD)/qstr.split: | $(BUILD)/esp-idf/config/sdkconfig.h -ESP_IDF_COMPONENTS_LINK = freertos log hal esp_system esp_adc_cal esp32s2 bootloader_support pthread esp_timer vfs spi_flash app_update esp_common esp32s2 heap newlib driver xtensa soc esp_ringbuf esp_wifi esp_event wpa_supplicant mbedtls efuse nvs_flash esp_netif lwip esp_rom esp-tls +ESP_IDF_COMPONENTS_LINK = freertos log esp_system esp_adc_cal esp32s2 bootloader_support pthread esp_timer vfs spi_flash app_update esp_common esp32s2 heap newlib driver xtensa soc esp_ringbuf esp_wifi esp_event wpa_supplicant mbedtls efuse nvs_flash esp_netif lwip esp-tls ESP_IDF_COMPONENTS_INCLUDE = driver freertos log soc @@ -288,15 +290,17 @@ ESP_IDF_WIFI_COMPONENTS_EXPANDED = $(foreach component, $(ESP_IDF_WIFI_COMPONENT MBEDTLS_COMPONENTS_LINK = crypto tls x509 MBEDTLS_COMPONENTS_LINK_EXPANDED = $(foreach component, $(MBEDTLS_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/mbedtls/mbedtls/library/libmbed$(component).a) -BINARY_BLOBS = esp-idf/components/xtensa/esp32s2/libxt_hal.a +BINARY_BLOBS = esp-idf/components/xtensa/esp32s2/libhal.a BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a librtc.a libsmartconfig.a libphy.a BINARY_BLOBS += $(addprefix esp-idf/components/esp_wifi/lib/esp32s2/, $(BINARY_WIFI_BLOBS)) -ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/soc/soc/esp32s2/libsoc_esp32s2.a esp-idf/components/xtensa/esp32s2/libxt_hal.a +ESP_IDF_COMPONENTS_EXPANDED += $(BUILD)/esp-idf/esp-idf/soc/soc/esp32s2/libsoc_esp32s2.a ESP_AUTOGEN_LD = $(BUILD)/esp-idf/esp-idf/esp32s2/esp32s2_out.ld $(BUILD)/esp-idf/esp-idf/esp32s2/ld/esp32s2.project.ld FLASH_FLAGS = --flash_mode $(CIRCUITPY_ESP_FLASH_MODE) --flash_freq $(CIRCUITPY_ESP_FLASH_FREQ) --flash_size $(CIRCUITPY_ESP_FLASH_SIZE) +ESPTOOL_FLAGS ?= -b 460800 --before=default_reset --after=no_reset + all: $(BUILD)/firmware.bin $(BUILD)/firmware.uf2 .PHONY: esp-idf-stamp @@ -308,7 +312,6 @@ esp-idf-stamp: $(BUILD)/esp-idf/config/sdkconfig.h esp-idf/esp32s2/ld/esp32s2.project.ld \ esp-idf/esp_event/libesp_event.a \ esp-idf/esp_netif/libesp_netif.a \ - esp-idf/esp_rom/libesp_rom.a \ esp-idf/esp_system/libesp_system.a \ esp-idf/esp_wifi/libesp_wifi.a \ esp-idf/lwip/liblwip.a \ @@ -336,10 +339,10 @@ $(BUILD)/firmware.uf2: $(BUILD)/circuitpython-firmware.bin $(Q)$(PYTHON3) $(TOP)/tools/uf2/utils/uf2conv.py -f 0xbfdd4eee -b 0x0000 -c -o $@ $^ flash: $(BUILD)/firmware.bin - esptool.py --chip esp32s2 -p $(PORT) --no-stub -b 460800 --before=default_reset --after=no_reset write_flash $(FLASH_FLAGS) 0x0000 $^ + esptool.py --chip esp32s2 -p $(PORT) $(ESPTOOL_FLAGS) write_flash $(FLASH_FLAGS) 0x0000 $^ flash-circuitpython-only: $(BUILD)/circuitpython-firmware.bin - esptool.py --chip esp32s2 -p $(PORT) --no-stub -b 460800 --before=default_reset --after=no_reset write_flash $(FLASH_FLAGS) 0x10000 $^ + esptool.py --chip esp32s2 -p $(PORT) $(ESPTOOL_FLAGS) write_flash $(FLASH_FLAGS) 0x10000 $^ include $(TOP)/py/mkrules.mk diff --git a/ports/esp32s2/README.md b/ports/esp32s2/README.md deleted file mode 100644 index 0738d520e7..0000000000 --- a/ports/esp32s2/README.md +++ /dev/null @@ -1,84 +0,0 @@ -# Circuitpython on ESP32-S2 # - -This port adds the ESP32-S2 line of modules from Espressif to Circuitpython. ESP32-S2 modules are low power, single-core Wi-Fi microcontroller SoCs designed for IoT applications. - -## How this port is organized: ## - -- **bindings/** contains some required bindings to the ESP-IDF for exceptions and memory. -- **boards/** contains the configuration files for each development board and breakout available on the port. -- **common-hal/** contains the port-specific module implementations, used by shared-module and shared-bindings. -- **esp-idf/** contains the Espressif IoT development framework installation, includign all the drivers for the port. -- **modules/** contains information specific to certain ESP32-S2 hardware modules, such as the pins used for flash and RAM on the WROVER and WROOM. -- **peripherals/** contains peripheral setup files and peripheral mapping information, sorted by family and sub-variant. Most files in this directory can be generated with the python scripts in **tools/**. -- **supervisor/** contains port-specific implementations of internal flash, serial and USB, as well as the **port.c** file, which initializes the port at startup. -- **tools/** includes useful python scripts for debugging and other purposes. - -At the root level, refer to **mpconfigboard.h** and **mpconfigport.mk** for port specific settings and a list of enabled circuitpython modules. - -## Connecting to the ESP32-S2 ## - -The USB port built into ESP32-S2 boards such as the Saola is not the native USB of the board, but a debugging and programming interface. The actual ESP32-S2 native USB which exposes the Circuitpython drive and CDC connection is located on IO pins 19 and 20: - -| GPIO | USB | -| ---- | ----------- | -| 20 | D+ (green) | -| 19 | D- (white) | -| GND | GND (black) | -| 5V | +5V (red) | - -Connect these pins using a [USB adapter](https://www.adafruit.com/product/4090) or [breakout cable](https://www.adafruit.com/product/4448) to access the Circuitpython drive. - -## 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/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 -``` - -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: - -``` -make BOARD=espressif_saola_1_wrover flash PORT=/dev/tty.usbserial-1421120 -``` - -## Debugging ## - -The ESP32-S2 supports JTAG debugging over OpenOCD using a JLink or other probe hardware. The official tutorials can be found on the Espressif website [here](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-guides/jtag-debugging/index.html), but they are mostly for the ESP32-S2 Kaluga, which has built-in debugging. - -OpenOCD is automatically installed and added to your bash environment during the esp-idf installation and setup process. You can double check that it is installed by using `openocd --version`, as per the tutorial. Attach the JTAG probe pins according to the [instructions](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-guides/jtag-debugging/configure-other-jtag.html) for JTAG debugging on boards that do not contain an integrated debugger. - -Once the debugger is connected physically, you must run OpenOCD with attached configuration files specifying the **interface** (your debugger probe) and either a **target** or a **board** (targets are for SoCs only, and can be used when a full board configuration file doesn't exist). You can find the path location of these files by checking the `OPENOCD_SCRIPTS` environmental variable by running `echo $OPENOCD_SCRIPTS` in bash. Interfaces will be in the `interface/` directory, and targets and boards in the `target/` and `board/` directories, respectively. - -**Note:** Unfortunately, there are no board files for the esp32-s2 other than the Kaluga, and the included `target/esp32s2.cfg` target file will not work by default on the Jlink for boards like the Saola 1, as the default speed is incorrect. In addition, these files are covered under the GPL and cannot be included in Circuitpython. Thus, you must make a copy of the esp32s2.cfg file yourself and add the following line manually, under `transport select jtag` at the start of the file: - -``` -adapter_khz 1000 -``` - -Once this is complete, your final OpenOCD command may look something like this: - -`openocd -f interface/jlink.cfg -f SOMEPATH/copied-esp32s2-saola-1.cfg` - -Where `SOMEPATH` is the location of your copied configuration file (this can be placed in the port/boards director with a prefix to ignore it with `.gitignore`, for instance). Interface, target and board config files sourced from espressif only need their paths from the $OPENOCD_SCRIPTS location, you don't need to include their full path. Once OpenOCD is running, connect to GDB with: - -`xtensa-esp32s2-elf-gdb build-espressif_saola_1_wrover/firmware.elf` - -And follow the Espressif GDB tutorial [instructions](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/api-guides/jtag-debugging/using-debugger.html) for connecting, or add them to your `gdbinit`: - -``` -target remote :3333 -set remote hardware-watchpoint-limit 2 -mon reset halt -flushregs -thb app_main -c -``` diff --git a/ports/esp32s2/README.rst b/ports/esp32s2/README.rst new file mode 100644 index 0000000000..827aba41b7 --- /dev/null +++ b/ports/esp32s2/README.rst @@ -0,0 +1,94 @@ +Circuitpython on ESP32-S2 +======================================= + +This port adds the ESP32-S2 line of modules from Espressif to Circuitpython. ESP32-S2 modules are low power, single-core Wi-Fi microcontroller SoCs designed for IoT applications. + +How this port is organized: +--------------------------------------- + +- **bindings/** contains some required bindings to the ESP-IDF for exceptions and memory. +- **boards/** contains the configuration files for each development board and breakout available on the port. +- **common-hal/** contains the port-specific module implementations, used by shared-module and shared-bindings. +- **esp-idf/** contains the Espressif IoT development framework installation, including all the drivers for the port. +- **modules/** contains information specific to certain ESP32-S2 hardware modules, such as the pins used for flash and RAM on the WROVER and WROOM. +- **peripherals/** contains peripheral setup files and peripheral mapping information, sorted by family and sub-variant. Most files in this directory can be generated with the python scripts in **tools/**. +- **supervisor/** contains port-specific implementations of internal flash, serial and USB, as well as the **port.c** file, which initializes the port at startup. +- **tools/** includes useful python scripts for debugging and other purposes. + +At the root level, refer to **mpconfigboard.h** and **mpconfigport.mk** for port specific settings and a list of enabled circuitpython modules. + +Connecting to the ESP32-S2 +--------------------------------------- + +The USB port built into ESP32-S2 boards such as the Saola is not the native USB of the board, but a debugging and programming interface. The actual ESP32-S2 native USB which exposes the Circuitpython drive and CDC connection is located on IO pins 19 and 20: + +.. csv-table:: + :header: GPIO, USB + + 20, "D+ (green)" + 19, "D- (white)" + GND, "GND (black)" + 5V, "+5V (red)" + +Connect these pins using a `USB adapter `_ or `breakout cable `_ to access the Circuitpython drive. + +Building and flashing +--------------------------------------- + +Before building or flashing the ESP32-S2, you must `install the esp-idf `_. 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: + +.. code-block:: + + ./esp-idf/install.sh + +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**: + +.. code-block:: + + . 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: + +.. code-block:: + + make BOARD=espressif_saola_1_wrover flash PORT=/dev/tty.usbserial-1421120 + +Debugging +--------------------------------------- + +The ESP32-S2 supports JTAG debugging over OpenOCD using a JLink or other probe hardware. The official tutorials can be found on the Espressif website `here `_, but they are mostly for the ESP32-S2 Kaluga, which has built-in debugging. + +OpenOCD is automatically installed and added to your bash environment during the esp-idf installation and setup process. You can double check that it is installed by using ``openocd --version``, as per the tutorial. Attach the JTAG probe pins according to the `instructions for JTAG debugging `_ on boards that do not contain an integrated debugger. + +Once the debugger is connected physically, you must run OpenOCD with attached configuration files specifying the **interface** (your debugger probe) and either a **target** or a **board** (targets are for SoCs only, and can be used when a full board configuration file doesn't exist). You can find the path location of these files by checking the ``OPENOCD_SCRIPTS`` environmental variable by running ``echo $OPENOCD_SCRIPTS`` in bash. Interfaces will be in the ``interface/`` directory, and targets and boards in the ``target/`` and ``board/`` directories, respectively. + +**Note:** Unfortunately, there are no board files for the esp32-s2 other than the Kaluga, and the included ``target/esp32s2.cfg`` target file will not work by default on the Jlink for boards like the Saola 1, as the default speed is incorrect. In addition, these files are covered under the GPL and cannot be included in Circuitpython. Thus, you must make a copy of the esp32s2.cfg file yourself and add the following line manually, under ``transport select jtag`` at the start of the file: + +.. code-block:: + + adapter_khz 1000 + +Once this is complete, your final OpenOCD command may look something like this: + +.. code-block:: + + openocd -f interface/jlink.cfg -f SOMEPATH/copied-esp32s2-saola-1.cfg + +Where ``SOMEPATH`` is the location of your copied configuration file (this can be placed in the port/boards directory with a prefix to ignore it with ``.gitignore``, for instance). Interface, target and board config files sourced from espressif only need their paths from the $OPENOCD_SCRIPTS location, you don't need to include their full path. Once OpenOCD is running, connect to GDB with: + +.. code-block:: + + xtensa-esp32s2-elf-gdb build-espressif_saola_1_wrover/firmware.elf + +And follow the Espressif GDB tutorial `instructions for connecting `_, or add them to your ``gdbinit``: + +.. code-block:: + + target remote :3333 + set remote hardware-watchpoint-limit 2 + mon reset halt + flushregs + thb app_main + c diff --git a/ports/esp32s2/bindings/espidf/__init__.c b/ports/esp32s2/bindings/espidf/__init__.c index 554bfaa39e..708c30c391 100644 --- a/ports/esp32s2/bindings/espidf/__init__.c +++ b/ports/esp32s2/bindings/espidf/__init__.c @@ -65,12 +65,12 @@ STATIC mp_obj_t espidf_heap_caps_get_largest_free_block(void) { } MP_DEFINE_CONST_FUN_OBJ_0(espidf_heap_caps_get_largest_free_block_obj, espidf_heap_caps_get_largest_free_block); -//| class MemoryError(MemoryError): -//| """Raised when an ESP IDF memory allocation fails.""" +//| class IDFError(OSError): +//| """Raised for certain generic ESP IDF errors.""" //| ... //| -NORETURN void mp_raise_espidf_MemoryError(void) { - nlr_raise(mp_obj_new_exception(&mp_type_espidf_MemoryError)); +NORETURN void mp_raise_espidf_IDFError(void) { + nlr_raise(mp_obj_new_exception(&mp_type_espidf_IDFError)); } void espidf_exception_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind) { @@ -83,6 +83,24 @@ void espidf_exception_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kin mp_obj_exception_print(print, o_in, kind); } +const mp_obj_type_t mp_type_espidf_IDFError = { + { &mp_type_type }, + .name = MP_QSTR_IDFError, + .print = espidf_exception_print, + .make_new = mp_obj_exception_make_new, + .attr = mp_obj_exception_attr, + .parent = &mp_type_OSError, +}; + + +//| class MemoryError(MemoryError): +//| """Raised when an ESP IDF memory allocation fails.""" +//| ... +//| +NORETURN void mp_raise_espidf_MemoryError(void) { + nlr_raise(mp_obj_new_exception(&mp_type_espidf_MemoryError)); +} + const mp_obj_type_t mp_type_espidf_MemoryError = { { &mp_type_type }, .name = MP_QSTR_MemoryError, @@ -99,6 +117,7 @@ STATIC const mp_rom_map_elem_t espidf_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_heap_caps_get_free_size), MP_ROM_PTR(&espidf_heap_caps_get_free_size_obj)}, { MP_ROM_QSTR(MP_QSTR_heap_caps_get_largest_free_block), MP_ROM_PTR(&espidf_heap_caps_get_largest_free_block_obj)}, + { MP_ROM_QSTR(MP_QSTR_IDFError), MP_ROM_PTR(&mp_type_espidf_IDFError) }, { MP_ROM_QSTR(MP_QSTR_MemoryError), MP_ROM_PTR(&mp_type_espidf_MemoryError) }, }; @@ -108,3 +127,64 @@ const mp_obj_module_t espidf_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t*)&espidf_module_globals, }; + +void raise_esp_error(esp_err_t err) { + const compressed_string_t *msg = NULL; + const mp_obj_type_t * exception_type = &mp_type_espidf_IDFError; + switch(err) { + case ESP_FAIL: + msg = translate("Generic Failure"); + break; + case ESP_ERR_NO_MEM: + exception_type = &mp_type_espidf_MemoryError; + msg = translate("Out of memory"); + break; + case ESP_ERR_INVALID_ARG: + msg = translate("Invalid argument"); + break; + case ESP_ERR_INVALID_STATE: + msg = translate("Invalid state"); + break; + case ESP_ERR_INVALID_SIZE: + msg = translate("Invalid size"); + break; + case ESP_ERR_NOT_FOUND: + msg = translate("Requested resource not found"); + break; + case ESP_ERR_NOT_SUPPORTED: + msg = translate("Operation or feature not supported"); + break; + case ESP_ERR_TIMEOUT: + msg = translate("Operation timed out"); + break; + case ESP_ERR_INVALID_RESPONSE: + msg = translate("Received response was invalid"); + break; + case ESP_ERR_INVALID_CRC: + msg = translate("CRC or checksum was invalid"); + break; + case ESP_ERR_INVALID_VERSION: + msg = translate("Version was invalid"); + break; + case ESP_ERR_INVALID_MAC: + msg = translate("MAC address was invalid"); + break; + } + if (msg) { + mp_raise_msg(exception_type, msg); + } + + const char *group = "ESP-IDF"; + + // tests must be in descending order + MP_STATIC_ASSERT( ESP_ERR_FLASH_BASE > ESP_ERR_MESH_BASE ); + MP_STATIC_ASSERT( ESP_ERR_MESH_BASE > ESP_ERR_WIFI_BASE ); + if(err >= ESP_ERR_FLASH_BASE) { + group = "Flash"; + } else if (err >= ESP_ERR_MESH_BASE) { + group = "Mesh"; + } else if (err >= ESP_ERR_WIFI_BASE) { + group = "WiFi"; + } + mp_raise_msg_varg(exception_type, translate("%s error 0x%x"), group, err); +} diff --git a/ports/esp32s2/bindings/espidf/__init__.h b/ports/esp32s2/bindings/espidf/__init__.h index 356c1c8140..9248b01acd 100644 --- a/ports/esp32s2/bindings/espidf/__init__.h +++ b/ports/esp32s2/bindings/espidf/__init__.h @@ -27,8 +27,16 @@ #ifndef MICROPY_INCLUDED_ESP32S2_BINDINGS_ESPIDF___INIT___H #define MICROPY_INCLUDED_ESP32S2_BINDINGS_ESPIDF___INIT___H +#include "esp_err.h" +#include "py/mpconfig.h" +#include "py/obj.h" + +extern const mp_obj_type_t mp_type_espidf_IDFError; extern const mp_obj_type_t mp_type_espidf_MemoryError; NORETURN void mp_raise_espidf_MemoryError(void); +void raise_esp_error(esp_err_t err) NORETURN; +#define CHECK_ESP_RESULT(x) do { int res = (x); if(res != ESP_OK) raise_esp_error(res); } while(0) + #endif // MICROPY_INCLUDED_ESP32S2_BINDINGS_ESPIDF___INIT___H diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/board.c b/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/board.c new file mode 100644 index 0000000000..aaef97c7d1 --- /dev/null +++ b/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/board.c @@ -0,0 +1,52 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/microcontroller/Pin.h" + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART +#ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); +#endif /* DEBUG */ +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h b/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.h new file mode 100644 index 0000000000..9d95e8e437 --- /dev/null +++ b/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/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 "Feather ESP32S2 without PSRAM" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO33) + +#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_GPIO4) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO3) + +#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_feather_esp32s2_nopsram/mpconfigboard.mk b/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.mk new file mode 100644 index 0000000000..3290f8cae3 --- /dev/null +++ b/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/mpconfigboard.mk @@ -0,0 +1,22 @@ +USB_VID = 0x239A +USB_PID = 0x80EC +USB_PRODUCT = "Feather ESP32S2 no PSRAM" +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=wroom + +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c b/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c new file mode 100644 index 0000000000..d4704c2246 --- /dev/null +++ b/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/pins.c @@ -0,0 +1,63 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO4) }, + + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, + + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO14) }, + + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO16) }, + + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO33) }, + + { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, + + { MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, + + { MP_ROM_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) }, + + + { MP_ROM_QSTR(MP_QSTR_D38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO38) }, + + { MP_ROM_QSTR(MP_QSTR_D39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO39) }, + + { 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/esp32s2/boards/adafruit_feather_esp32s2_nopsram/sdkconfig b/ports/esp32s2/boards/adafruit_feather_esp32s2_nopsram/sdkconfig new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c new file mode 100644 index 0000000000..c8be187470 --- /dev/null +++ b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c @@ -0,0 +1,122 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-module/displayio/__init__.h" +#include "shared-module/displayio/mipi_constants.h" + +/* +displayio_fourwire_obj_t board_display_obj; + +#define DELAY 0x80 + +uint8_t display_init_sequence[] = { + 0x01, 0 | DELAY, 150, // SWRESET + 0x11, 0 | DELAY, 255, // SLPOUT + 0x36, 1, 0x00, // _MADCTL bottom to top refresh in vsync aligned order. + 0x3a, 1, 0x55, // COLMOD - 16bit color + 0x21, 0 | DELAY, 10, // _INVON + 0x13, 0 | DELAY, 10, // _NORON + 0x29, 0 | DELAY, 255, // _DISPON +}; + +*/ + +void board_init(void) { + // USB + common_hal_never_reset_pin(&pin_GPIO19); + common_hal_never_reset_pin(&pin_GPIO20); + + // Debug UART +#ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); +#endif /* DEBUG */ + + /* + 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_GPIO40, // TFT_DC Command or data + &pin_GPIO42, // TFT_CS Chip select + &pin_GPIO41, // TFT_RST Reset + 4000000, // Baudrate + 0, // Polarity + 0); // Phase + + displayio_display_obj_t* display = &displays[0].display; + display->base.type = &displayio_display_type; + common_hal_displayio_display_construct(display, + bus, + 240, // Width (after rotation) + 135, // Height (after rotation) + 0, // column start + 0, // row start + 0, // rotation + 16, // Color depth + false, // Grayscale + false, // Pixels in a byte share a row. Only used for depth < 8 + 1, // bytes per cell. Only valid for depths < 8 + false, // reverse_pixels_in_byte. Only valid for depths < 8 + true, // reverse_pixels_in_word + MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command + MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command + MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command + 0x37, // set vertical scroll command + display_init_sequence, + sizeof(display_init_sequence), + &pin_GPIO7, // backlight pin + NO_BRIGHTNESS_COMMAND, + 1.0f, // brightness (ignored) + true, // auto_brightness + false, // single_byte_bounds + false, // data_as_commands + true, // auto_refresh + 60, // native_frames_per_second + true, // backlight_on_high + false); // not SH1107 + */ +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h new file mode 100644 index 0000000000..9d95e8e437 --- /dev/null +++ b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/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 "Feather ESP32S2 without PSRAM" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO33) + +#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_GPIO4) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO3) + +#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_feather_esp32s2_tftback_nopsram/mpconfigboard.mk b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.mk new file mode 100644 index 0000000000..3ba6f62289 --- /dev/null +++ b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.mk @@ -0,0 +1,22 @@ +USB_VID = 0x239A +USB_PID = 0x80EE +USB_PRODUCT = "Feather ESP32S2 TFT no PSRAM" +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=wroom + +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Requests +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Register diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c new file mode 100644 index 0000000000..7e1a723742 --- /dev/null +++ b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/pins.c @@ -0,0 +1,72 @@ +#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_D0), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO4) }, + + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, + + { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_L), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO14) }, + + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO16) }, + + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO33) }, + + { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, + + { MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, + + { MP_ROM_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) }, + + { MP_ROM_QSTR(MP_QSTR_D38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO38) }, + + { MP_ROM_QSTR(MP_QSTR_D39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO39) }, + + { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO42) }, + + { 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].display)} +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig b/ports/esp32s2/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h index be376e5a94..8dfe912712 100644 --- a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +++ b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h @@ -26,7 +26,7 @@ //Micropython setup -#define MICROPY_HW_BOARD_NAME "MagTag" +#define MICROPY_HW_BOARD_NAME "Adafruit MagTag" #define MICROPY_HW_MCU_NAME "ESP32S2" #define MICROPY_HW_NEOPIXEL (&pin_GPIO1) diff --git a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c index 0cefb6dfbc..645dc12a1b 100644 --- a/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c +++ b/ports/esp32s2/boards/adafruit_magtag_2.9_grayscale/pins.c @@ -49,6 +49,8 @@ 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_DISPLAY), MP_ROM_PTR(&displays[0].epaper_display)} + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].epaper_display)}, + + { MP_ROM_QSTR(MP_QSTR_ACCELEROMETER_INTERRUPT), MP_ROM_PTR(&pin_GPIO9) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h b/ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h index 7280aab9c2..b25d7d1169 100644 --- a/ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h +++ b/ports/esp32s2/boards/adafruit_metro_esp32s2/mpconfigboard.h @@ -26,7 +26,7 @@ //Micropython setup -#define MICROPY_HW_BOARD_NAME "Metro ESP32S2" +#define MICROPY_HW_BOARD_NAME "Adafruit Metro ESP32S2" #define MICROPY_HW_MCU_NAME "ESP32S2" #define MICROPY_HW_NEOPIXEL (&pin_GPIO45) diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2/board.c b/ports/esp32s2/boards/unexpectedmaker_feathers2/board.c index d8fd3a0a2b..ac08190a5b 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2/board.c +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2/board.c @@ -27,6 +27,8 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" +#include "components/driver/include/driver/gpio.h" +#include "components/soc/include/hal/gpio_hal.h" void board_init(void) { // USB @@ -47,6 +49,12 @@ void board_init(void) { common_hal_never_reset_pin(&pin_GPIO30); common_hal_never_reset_pin(&pin_GPIO31); common_hal_never_reset_pin(&pin_GPIO32); + + + // Add LDO2 to never reset list, set to output and enable + common_hal_never_reset_pin(&pin_GPIO21); + gpio_set_direction(pin_GPIO21.number, GPIO_MODE_DEF_OUTPUT); + gpio_set_level(pin_GPIO21.number, true); } bool board_requests_safe_mode(void) { diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h b/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h index b68a31b9e5..6b1a0c4aa5 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.h @@ -30,13 +30,12 @@ #define MICROPY_HW_MCU_NAME "ESP32S2" #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) - #define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") #define AUTORESET_DELAY_MS 500 -// #define MICROPY_HW_APA102_MOSI (&pin_GPIO40) -// #define MICROPY_HW_APA102_SCK (&pin_GPIO45) +#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) diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c b/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c index c294fb9d3c..bef2001bac 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2/pins.c @@ -9,9 +9,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, - { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO13) }, - { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO14) }, { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO12) }, @@ -82,18 +82,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO11) }, { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO11) }, - { MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_GPIO40) }, // MTDO - { MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, // Blue LED + { MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_GPIO40) }, // APA102 + { MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_GPIO45) }, // APA102 - { MP_ROM_QSTR(MP_QSTR_LDO2), MP_ROM_PTR(&pin_GPIO21) }, - { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_LDO2), MP_ROM_PTR(&pin_GPIO21) }, // Second LDO Enable control + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, // Second LDO Enable control - { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, - - { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, - { MP_ROM_QSTR(MP_QSTR_AMB), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, // Ambient Light Sensor + { MP_ROM_QSTR(MP_QSTR_AMB), MP_ROM_PTR(&pin_GPIO4) }, // Ambient Light Sensor { 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/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h b/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h index 93d901becb..d550ff64fe 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h @@ -36,3 +36,13 @@ // #define MICROPY_HW_APA102_MOSI (&pin_GPIO40) // #define MICROPY_HW_APA102_SCK (&pin_GPIO45) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO38) +#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) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c b/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c index a1036f8506..57ac27aeb9 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2_prerelease/pins.c @@ -9,10 +9,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, - { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO13) }, - { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO13) }, - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO14) }, { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO12) }, @@ -26,7 +25,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) }, { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO5) }, - { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO36) }, @@ -83,17 +82,16 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO11) }, { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO11) }, - { MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_GPIO40) }, // MTDO - { MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, // Blue LED - { MP_ROM_QSTR(MP_QSTR_LDO2), MP_ROM_PTR(&pin_GPIO21) }, - { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_GPIO40) }, // APA102 + { MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_GPIO45) }, // APA102 - { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_LDO2), MP_ROM_PTR(&pin_GPIO21) }, // Second LDO Enable control + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, // Second LDO Enable control - { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, - { MP_ROM_QSTR(MP_QSTR_AMB), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, // Ambient Light Sensor + { MP_ROM_QSTR(MP_QSTR_AMB), MP_ROM_PTR(&pin_GPIO4) }, // Ambient Light Sensor { 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/esp32s2/common-hal/alarm/__init__.c b/ports/esp32s2/common-hal/alarm/__init__.c index fae921db0b..1cec5d4ae8 100644 --- a/ports/esp32s2/common-hal/alarm/__init__.c +++ b/ports/esp32s2/common-hal/alarm/__init__.c @@ -25,23 +25,28 @@ * THE SOFTWARE. */ +#include "py/gc.h" #include "py/obj.h" #include "py/objtuple.h" #include "py/runtime.h" -#include "shared-bindings/alarm/pin/PinAlarm.h" +#include "shared-bindings/alarm/__init__.h" #include "shared-bindings/alarm/SleepMemory.h" +#include "shared-bindings/alarm/pin/PinAlarm.h" #include "shared-bindings/alarm/time/TimeAlarm.h" -#include "shared-bindings/microcontroller/__init__.h" +#include "shared-bindings/alarm/touch/TouchAlarm.h" + #include "shared-bindings/wifi/__init__.h" +#include "shared-bindings/microcontroller/__init__.h" #include "supervisor/port.h" #include "supervisor/shared/workflow.h" -#include "common-hal/alarm/__init__.h" - #include "esp_sleep.h" +#include "components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h" +#include "components/driver/include/driver/uart.h" + // Singleton instance of SleepMemory. const alarm_sleep_memory_obj_t alarm_sleep_memory_obj = { .base = { @@ -49,18 +54,24 @@ const alarm_sleep_memory_obj_t alarm_sleep_memory_obj = { }, }; - void alarm_reset(void) { - alarm_time_timealarm_reset(); alarm_sleep_memory_reset(); + alarm_pin_pinalarm_reset(); + alarm_time_timealarm_reset(); + alarm_touch_touchalarm_reset(); esp_sleep_disable_wakeup_source(ESP_SLEEP_WAKEUP_ALL); } STATIC esp_sleep_wakeup_cause_t _get_wakeup_cause(void) { + if (alarm_pin_pinalarm_woke_us_up()) { + return ESP_SLEEP_WAKEUP_GPIO; + } if (alarm_time_timealarm_woke_us_up()) { return ESP_SLEEP_WAKEUP_TIMER; } - + if (alarm_touch_touchalarm_woke_us_up()) { + return ESP_SLEEP_WAKEUP_TOUCHPAD; + } return esp_sleep_get_wakeup_cause(); } @@ -69,20 +80,21 @@ bool alarm_woken_from_sleep(void) { } STATIC mp_obj_t _get_wake_alarm(size_t n_alarms, const mp_obj_t *alarms) { - switch (_get_wakeup_cause()) { + esp_sleep_wakeup_cause_t cause = _get_wakeup_cause(); + switch (cause) { case ESP_SLEEP_WAKEUP_TIMER: { return alarm_time_timealarm_get_wakeup_alarm(n_alarms, alarms); } - case ESP_SLEEP_WAKEUP_EXT0: { - // TODO: implement pin alarm wake. - break; + case ESP_SLEEP_WAKEUP_GPIO: + case ESP_SLEEP_WAKEUP_EXT0: + case ESP_SLEEP_WAKEUP_EXT1: { + return alarm_pin_pinalarm_get_wakeup_alarm(n_alarms, alarms); } - case ESP_SLEEP_WAKEUP_TOUCHPAD: - // TODO: implement TouchIO - // Wake up from touch on pad, esp_sleep_get_touchpad_wakeup_status() - break; + case ESP_SLEEP_WAKEUP_TOUCHPAD: { + return alarm_touch_touchalarm_get_wakeup_alarm(n_alarms, alarms); + } case ESP_SLEEP_WAKEUP_UNDEFINED: default: @@ -98,24 +110,9 @@ mp_obj_t common_hal_alarm_get_wake_alarm(void) { // Set up light sleep or deep sleep alarms. STATIC void _setup_sleep_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms) { - bool time_alarm_set = false; - alarm_time_time_alarm_obj_t *time_alarm = MP_OBJ_NULL; - - for (size_t i = 0; i < n_alarms; i++) { - if (MP_OBJ_IS_TYPE(alarms[i], &alarm_pin_pin_alarm_type)) { - mp_raise_NotImplementedError(translate("PinAlarm not yet implemented")); - } else if (MP_OBJ_IS_TYPE(alarms[i], &alarm_time_time_alarm_type)) { - if (time_alarm_set) { - mp_raise_ValueError(translate("Only one alarm.time alarm can be set.")); - } - time_alarm = MP_OBJ_TO_PTR(alarms[i]); - time_alarm_set = true; - } - } - - if (time_alarm_set) { - alarm_time_timealarm_set_alarm(time_alarm); - } + alarm_pin_pinalarm_set_alarms(deep_sleep, n_alarms, alarms); + alarm_time_timealarm_set_alarms(deep_sleep, n_alarms, alarms); + alarm_touch_touchalarm_set_alarm(deep_sleep, n_alarms, alarms); } STATIC void _idle_until_alarm(void) { @@ -124,28 +121,23 @@ STATIC void _idle_until_alarm(void) { RUN_BACKGROUND_TASKS; // Allow ctrl-C interrupt. if (alarm_woken_from_sleep()) { + alarm_save_wake_alarm(); return; } - port_idle_until_interrupt(); } } -// Is it safe to do a light sleep? Check whether WiFi is on or there are -// other ongoing tasks that should not be shut down. -STATIC bool _light_sleep_ok(void) { - return !common_hal_wifi_radio_get_enabled(&common_hal_wifi_radio_obj) && !supervisor_workflow_active(); -} - mp_obj_t common_hal_alarm_light_sleep_until_alarms(size_t n_alarms, const mp_obj_t *alarms) { _setup_sleep_alarms(false, n_alarms, alarms); - // Light sleep can break some functionality so only do it when possible. Otherwise we idle. - if (_light_sleep_ok()) { - esp_light_sleep_start(); - } else { - _idle_until_alarm(); + // We cannot esp_light_sleep_start() here because it shuts down all non-RTC peripherals. + _idle_until_alarm(); + + if (mp_hal_is_interrupted()) { + return mp_const_none; // Shouldn't be given to python code because exception handling should kick in. } + mp_obj_t wake_alarm = _get_wake_alarm(n_alarms, alarms); alarm_reset(); return wake_alarm; @@ -156,7 +148,13 @@ void common_hal_alarm_set_deep_sleep_alarms(size_t n_alarms, const mp_obj_t *ala } void NORETURN alarm_enter_deep_sleep(void) { + alarm_pin_pinalarm_prepare_for_deep_sleep(); + alarm_touch_touchalarm_prepare_for_deep_sleep(); // The ESP-IDF caches the deep sleep settings and applies them before sleep. // We don't need to worry about resetting them in the interim. esp_deep_sleep_start(); } + +void common_hal_alarm_gc_collect(void) { + gc_collect_ptr(alarm_get_wake_alarm()); +} diff --git a/ports/esp32s2/common-hal/alarm/pin/PinAlarm.c b/ports/esp32s2/common-hal/alarm/pin/PinAlarm.c index 582a665729..df8d10ef9e 100644 --- a/ports/esp32s2/common-hal/alarm/pin/PinAlarm.c +++ b/ports/esp32s2/common-hal/alarm/pin/PinAlarm.c @@ -4,6 +4,7 @@ * The MIT License (MIT) * * Copyright (c) 2020 Dan Halbert for Adafruit Industries + * 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 @@ -24,30 +25,283 @@ * THE SOFTWARE. */ -#include "esp_sleep.h" +#include "py/runtime.h" #include "shared-bindings/alarm/pin/PinAlarm.h" +#include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/microcontroller/Pin.h" +#include "supervisor/esp_port.h" -void common_hal_alarm_pin_pin_alarm_construct(alarm_pin_pin_alarm_obj_t *self, mcu_pin_obj_t *pin, bool value, bool edge, bool pull) { +#include "components/driver/include/driver/rtc_io.h" +#include "components/esp32s2/include/esp_sleep.h" +#include "components/freertos/include/freertos/FreeRTOS.h" +#include "components/soc/src/esp32s2/include/hal/gpio_ll.h" +#include "components/xtensa/include/esp_debug_helpers.h" + +void common_hal_alarm_pin_pinalarm_construct(alarm_pin_pinalarm_obj_t *self, mcu_pin_obj_t *pin, bool value, bool edge, bool pull) { + if (edge) { + mp_raise_ValueError(translate("Cannot wake on pin edge. Only level.")); + } + + if (pull && !GPIO_IS_VALID_OUTPUT_GPIO(pin->number)) { + mp_raise_ValueError(translate("Cannot pull on input-only pin.")); + } self->pin = pin; self->value = value; - self->edge = edge; self->pull = pull; } -mcu_pin_obj_t *common_hal_alarm_pin_pin_alarm_get_pin(alarm_pin_pin_alarm_obj_t *self) { +mcu_pin_obj_t *common_hal_alarm_pin_pinalarm_get_pin(alarm_pin_pinalarm_obj_t *self) { return self->pin; } -bool common_hal_alarm_pin_pin_alarm_get_value(alarm_pin_pin_alarm_obj_t *self) { +bool common_hal_alarm_pin_pinalarm_get_value(alarm_pin_pinalarm_obj_t *self) { return self->value; } -bool common_hal_alarm_pin_pin_alarm_get_edge(alarm_pin_pin_alarm_obj_t *self) { - return self->edge; +bool common_hal_alarm_pin_pinalarm_get_edge(alarm_pin_pinalarm_obj_t *self) { + return false; } -bool common_hal_alarm_pin_pin_alarm_get_pull(alarm_pin_pin_alarm_obj_t *self) { +bool common_hal_alarm_pin_pinalarm_get_pull(alarm_pin_pinalarm_obj_t *self) { return self->pull; } + +gpio_isr_handle_t gpio_interrupt_handle; +// Low and high are relative to pin number. 32+ is high. <32 is low. +static volatile uint32_t pin_31_0_status = 0; +static volatile uint32_t pin_63_32_status = 0; +void gpio_interrupt(void *arg) { + (void) arg; + + gpio_ll_get_intr_status(&GPIO, xPortGetCoreID(), (uint32_t*) &pin_31_0_status); + gpio_ll_clear_intr_status(&GPIO, pin_31_0_status); + gpio_ll_get_intr_status_high(&GPIO, xPortGetCoreID(), (uint32_t*) &pin_63_32_status); + gpio_ll_clear_intr_status_high(&GPIO, pin_63_32_status); + + // disable the interrupts that fired, maybe all of them + for (size_t i = 0; i < 32; i++) { + uint32_t mask = 1 << i; + if ((pin_31_0_status & mask) != 0) { + gpio_ll_intr_disable(&GPIO, i); + } + if ((pin_63_32_status & mask) != 0) { + gpio_ll_intr_disable(&GPIO, 32 + i); + } + } + BaseType_t high_task_wakeup; + vTaskNotifyGiveFromISR(circuitpython_task, &high_task_wakeup); + if (high_task_wakeup) { + portYIELD_FROM_ISR(); + } +} + +bool alarm_pin_pinalarm_woke_us_up(void) { + return pin_31_0_status != 0 || pin_63_32_status != 0; +} + +mp_obj_t alarm_pin_pinalarm_get_wakeup_alarm(size_t n_alarms, const mp_obj_t *alarms) { + // First, check to see if we match any given alarms. + uint64_t pin_status = ((uint64_t) pin_63_32_status) << 32 | pin_31_0_status; + for (size_t i = 0; i < n_alarms; i++) { + if (!MP_OBJ_IS_TYPE(alarms[i], &alarm_pin_pinalarm_type)) { + continue; + } + alarm_pin_pinalarm_obj_t *alarm = MP_OBJ_TO_PTR(alarms[i]); + if ((pin_status & (1ull << alarm->pin->number)) != 0) { + return alarms[i]; + } + } + esp_sleep_wakeup_cause_t cause = esp_sleep_get_wakeup_cause(); + size_t pin_number = 64; + if (cause == ESP_SLEEP_WAKEUP_EXT0) { + pin_number = REG_GET_FIELD(RTC_IO_EXT_WAKEUP0_REG, RTC_IO_EXT_WAKEUP0_SEL); + } else { + if (cause == ESP_SLEEP_WAKEUP_EXT1) { + pin_status = esp_sleep_get_ext1_wakeup_status(); + } + // If the cause is GPIO, we've already snagged pin_status in the interrupt. + // We'll only get here if we pretended to deep sleep. Light sleep will + // pass in existing objects. + for (size_t i = 0; i < 64; i++) { + if ((pin_status & (1ull << i)) != 0) { + pin_number = i; + break; + } + } + } + + alarm_pin_pinalarm_obj_t *alarm = m_new_obj(alarm_pin_pinalarm_obj_t); + alarm->base.type = &alarm_pin_pinalarm_type; + alarm->pin = NULL; + // Map the pin number back to a pin object. + for (size_t i = 0; i < mcu_pin_globals.map.used; i++) { + const mcu_pin_obj_t* pin_obj = MP_OBJ_TO_PTR(mcu_pin_globals.map.table[i].value); + if ((size_t) pin_obj->number == pin_number) { + alarm->pin = mcu_pin_globals.map.table[i].value; + break; + } + } + return alarm; +} + +// These must be static because we need to configure pulls later, right before +// deep sleep. +static uint64_t high_alarms = 0; +static uint64_t low_alarms = 0; +static uint64_t pull_pins = 0; + +void alarm_pin_pinalarm_reset(void) { + if (gpio_interrupt_handle != NULL) { + esp_intr_free(gpio_interrupt_handle); + gpio_interrupt_handle = NULL; + } + for (size_t i = 0; i < 64; i++) { + uint64_t mask = 1ull << i; + bool high = (high_alarms & mask) != 0; + bool low = (low_alarms & mask) != 0; + if (!(high || low)) { + continue; + } + reset_pin_number(i); + } + high_alarms = 0; + low_alarms = 0; + pull_pins = 0; + pin_63_32_status = 0; + pin_31_0_status = 0; +} + +void alarm_pin_pinalarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms) { + // Bitmask of wake up settings. + size_t high_count = 0; + size_t low_count = 0; + + for (size_t i = 0; i < n_alarms; i++) { + // TODO: Check for ULP or touch alarms because they can't coexist with GPIO alarms. + if (!MP_OBJ_IS_TYPE(alarms[i], &alarm_pin_pinalarm_type)) { + continue; + } + alarm_pin_pinalarm_obj_t *alarm = MP_OBJ_TO_PTR(alarms[i]); + + gpio_num_t pin_number = alarm->pin->number; + if (alarm->value) { + high_alarms |= 1ull << pin_number; + high_count++; + } else { + low_alarms |= 1ull << pin_number; + low_count++; + } + if (alarm->pull) { + pull_pins |= 1ull << pin_number; + } + } + if (high_count == 0 && low_count == 0) { + return; + } + if (deep_sleep && low_count > 2 && high_count == 0) { + mp_raise_ValueError(translate("Can only alarm on two low pins from deep sleep.")); + } + if (deep_sleep && low_count > 1 && high_count > 0) { + mp_raise_ValueError(translate("Can only alarm on one low pin while others alarm high from deep sleep.")); + } + // Only use ext0 and ext1 during deep sleep. + if (deep_sleep) { + if (high_count > 0) { + if (esp_sleep_enable_ext1_wakeup(high_alarms, ESP_EXT1_WAKEUP_ANY_HIGH) != ESP_OK) { + mp_raise_ValueError(translate("Can only alarm on RTC IO from deep sleep.")); + } + } + size_t low_pins[2]; + size_t j = 0; + for (size_t i = 0; i < 64; i++) { + uint64_t mask = 1ull << i; + if ((low_alarms & mask) != 0) { + low_pins[j++] = i; + } + if (j == 2) { + break; + } + } + if (low_count > 1) { + if (esp_sleep_enable_ext1_wakeup(1ull << low_pins[1], ESP_EXT1_WAKEUP_ALL_LOW) != ESP_OK) { + mp_raise_ValueError(translate("Can only alarm on RTC IO from deep sleep.")); + } + } + if (low_count > 0) { + if (esp_sleep_enable_ext0_wakeup(low_pins[0], 0) != ESP_OK) { + mp_raise_ValueError(translate("Can only alarm on RTC IO from deep sleep.")); + } + } + } else { + // Enable GPIO wake up if we're sleeping. + esp_sleep_enable_gpio_wakeup(); + } + // Set GPIO interrupts so they wake us from light sleep or from idle via the + // interrupt handler above. + pin_31_0_status = 0; + pin_63_32_status = 0; + if (gpio_isr_register(gpio_interrupt, NULL, 0, &gpio_interrupt_handle) != ESP_OK) { + mp_raise_ValueError(translate("Can only alarm on RTC IO from deep sleep.")); + } + for (size_t i = 0; i < 64; i++) { + uint64_t mask = 1ull << i; + bool high = (high_alarms & mask) != 0; + bool low = (low_alarms & mask) != 0; + bool pull = (pull_pins & mask) != 0; + if (!(high || low)) { + continue; + } + if (rtc_gpio_is_valid_gpio(i)) { + rtc_gpio_deinit(i); + } + gpio_int_type_t interrupt_mode = GPIO_INTR_DISABLE; + gpio_pull_mode_t pull_mode = GPIO_FLOATING; + if (high) { + interrupt_mode = GPIO_INTR_HIGH_LEVEL; + pull_mode = GPIO_PULLDOWN_ONLY; + } + if (low) { + interrupt_mode = GPIO_INTR_LOW_LEVEL; + pull_mode = GPIO_PULLUP_ONLY; + } + gpio_set_direction(i, GPIO_MODE_DEF_INPUT); + PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[i], PIN_FUNC_GPIO); + if (pull) { + gpio_set_pull_mode(i, pull_mode); + size_t j = 0; + while (gpio_get_level(i) == false) { + j++; + } + } + never_reset_pin_number(i); + // Sets interrupt type and wakeup bits. + gpio_wakeup_enable(i, interrupt_mode); + gpio_intr_enable(i); + } +} + + +void alarm_pin_pinalarm_prepare_for_deep_sleep(void) { + if (pull_pins == 0) { + return; + } + for (size_t i = 0; i < 64; i++) { + uint64_t mask = 1ull << i; + bool pull = (pull_pins & mask) != 0; + if (!pull) { + continue; + } + bool high = (high_alarms & mask) != 0; + bool low = (low_alarms & mask) != 0; + // The pull direction is opposite from alarm value. + if (high) { + rtc_gpio_pullup_dis(i); + rtc_gpio_pulldown_en(i); + } + if (low) { + rtc_gpio_pullup_en(i); + rtc_gpio_pulldown_dis(i); + } + } +} diff --git a/ports/esp32s2/common-hal/alarm/pin/PinAlarm.h b/ports/esp32s2/common-hal/alarm/pin/PinAlarm.h index 0eaa7777f5..93672c1f2d 100644 --- a/ports/esp32s2/common-hal/alarm/pin/PinAlarm.h +++ b/ports/esp32s2/common-hal/alarm/pin/PinAlarm.h @@ -31,7 +31,11 @@ typedef struct { mp_obj_base_t base; mcu_pin_obj_t *pin; bool value; - bool all_same_value; - bool edge; bool pull; -} alarm_pin_pin_alarm_obj_t; +} alarm_pin_pinalarm_obj_t; + +void alarm_pin_pinalarm_reset(void); +void alarm_pin_pinalarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms); +void alarm_pin_pinalarm_prepare_for_deep_sleep(void); +mp_obj_t alarm_pin_pinalarm_get_wakeup_alarm(size_t n_alarms, const mp_obj_t *alarms); +bool alarm_pin_pinalarm_woke_us_up(void); diff --git a/ports/esp32s2/common-hal/alarm/time/TimeAlarm.c b/ports/esp32s2/common-hal/alarm/time/TimeAlarm.c index 4d0bba2387..bcde0ab3c0 100644 --- a/ports/esp32s2/common-hal/alarm/time/TimeAlarm.c +++ b/ports/esp32s2/common-hal/alarm/time/TimeAlarm.c @@ -34,23 +34,23 @@ #include "shared-bindings/alarm/time/TimeAlarm.h" #include "shared-bindings/time/__init__.h" -void common_hal_alarm_time_time_alarm_construct(alarm_time_time_alarm_obj_t *self, mp_float_t monotonic_time) { +void common_hal_alarm_time_timealarm_construct(alarm_time_timealarm_obj_t *self, mp_float_t monotonic_time) { self->monotonic_time = monotonic_time; } -mp_float_t common_hal_alarm_time_time_alarm_get_monotonic_time(alarm_time_time_alarm_obj_t *self) { +mp_float_t common_hal_alarm_time_timealarm_get_monotonic_time(alarm_time_timealarm_obj_t *self) { return self->monotonic_time; } mp_obj_t alarm_time_timealarm_get_wakeup_alarm(size_t n_alarms, const mp_obj_t *alarms) { // First, check to see if we match for (size_t i = 0; i < n_alarms; i++) { - if (MP_OBJ_IS_TYPE(alarms[i], &alarm_time_time_alarm_type)) { + if (MP_OBJ_IS_TYPE(alarms[i], &alarm_time_timealarm_type)) { return alarms[i]; } } - alarm_time_time_alarm_obj_t *timer = m_new_obj(alarm_time_time_alarm_obj_t); - timer->base.type = &alarm_time_time_alarm_type; + alarm_time_timealarm_obj_t *timer = m_new_obj(alarm_time_timealarm_obj_t); + timer->base.type = &alarm_time_timealarm_type; // TODO: Set monotonic_time based on the RTC state. timer->monotonic_time = 0.0f; return timer; @@ -63,9 +63,7 @@ STATIC bool woke_up = false; void timer_callback(void *arg) { (void) arg; woke_up = true; - if (sleeping_circuitpython_task) { - xTaskNotifyGive(sleeping_circuitpython_task); - } + xTaskNotifyGive(circuitpython_task); } bool alarm_time_timealarm_woke_us_up(void) { @@ -79,7 +77,24 @@ void alarm_time_timealarm_reset(void) { woke_up = false; } -void alarm_time_timealarm_set_alarm(alarm_time_time_alarm_obj_t *self) { +void alarm_time_timealarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms) { + bool timealarm_set = false; + alarm_time_timealarm_obj_t *timealarm = MP_OBJ_NULL; + + for (size_t i = 0; i < n_alarms; i++) { + if (!MP_OBJ_IS_TYPE(alarms[i], &alarm_time_timealarm_type)) { + continue; + } + if (timealarm_set) { + mp_raise_ValueError(translate("Only one alarm.time alarm can be set.")); + } + timealarm = MP_OBJ_TO_PTR(alarms[i]); + timealarm_set = true; + } + if (!timealarm_set) { + return; + } + if (pretend_sleep_timer != NULL) { esp_timer_stop(pretend_sleep_timer); } else { @@ -94,7 +109,7 @@ void alarm_time_timealarm_set_alarm(alarm_time_time_alarm_obj_t *self) { // Compute how long to actually sleep, considering the time now. mp_float_t now_secs = uint64_to_float(common_hal_time_monotonic_ms()) / 1000.0f; - mp_float_t wakeup_in_secs = MAX(0.0f, self->monotonic_time - now_secs); + mp_float_t wakeup_in_secs = MAX(0.0f, timealarm->monotonic_time - now_secs); const uint64_t sleep_for_us = (uint64_t) (wakeup_in_secs * 1000000); esp_sleep_enable_timer_wakeup(sleep_for_us); diff --git a/ports/esp32s2/common-hal/alarm/time/TimeAlarm.h b/ports/esp32s2/common-hal/alarm/time/TimeAlarm.h index 04c553009e..dfd75524fd 100644 --- a/ports/esp32s2/common-hal/alarm/time/TimeAlarm.h +++ b/ports/esp32s2/common-hal/alarm/time/TimeAlarm.h @@ -30,11 +30,11 @@ typedef struct { mp_obj_base_t base; mp_float_t monotonic_time; // values compatible with time.monotonic_time() -} alarm_time_time_alarm_obj_t; +} alarm_time_timealarm_obj_t; // Find the alarm object that caused us to wake up or create an equivalent one. mp_obj_t alarm_time_timealarm_get_wakeup_alarm(size_t n_alarms, const mp_obj_t *alarms); // Check for the wake up alarm from pretend deep sleep. bool alarm_time_timealarm_woke_us_up(void); -void alarm_time_timealarm_set_alarm(alarm_time_time_alarm_obj_t *self); +void alarm_time_timealarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms); void alarm_time_timealarm_reset(void); diff --git a/ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c b/ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c new file mode 100644 index 0000000000..3095bc9e8b --- /dev/null +++ b/ports/esp32s2/common-hal/alarm/touch/TouchAlarm.c @@ -0,0 +1,179 @@ +/* + * 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/alarm/touch/TouchAlarm.h" +#include "shared-bindings/microcontroller/__init__.h" + +#include "esp_sleep.h" +#include "peripherals/touch.h" +#include "supervisor/esp_port.h" + +static uint16_t touch_channel_mask; +static volatile bool woke_up = false; + +void common_hal_alarm_touch_touchalarm_construct(alarm_touch_touchalarm_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); + self->pin = pin; +} + +mp_obj_t alarm_touch_touchalarm_get_wakeup_alarm(const size_t n_alarms, const mp_obj_t *alarms) { + // First, check to see if we match any given alarms. + for (size_t i = 0; i < n_alarms; i++) { + if (MP_OBJ_IS_TYPE(alarms[i], &alarm_touch_touchalarm_type)) { + return alarms[i]; + } + } + + // Create TouchAlarm object. + alarm_touch_touchalarm_obj_t *alarm = m_new_obj(alarm_touch_touchalarm_obj_t); + alarm->base.type = &alarm_touch_touchalarm_type; + alarm->pin = NULL; + + touch_pad_t wake_channel = touch_pad_get_current_meas_channel(); + if (wake_channel == TOUCH_PAD_MAX) { + return alarm; + } + + // Map the pin number back to a pin object. + for (size_t i = 0; i < mcu_pin_globals.map.used; i++) { + const mcu_pin_obj_t* pin_obj = MP_OBJ_TO_PTR(mcu_pin_globals.map.table[i].value); + if (pin_obj->touch_channel == wake_channel) { + alarm->pin = mcu_pin_globals.map.table[i].value; + break; + } + } + + return alarm; +} + +// This is used to wake the main CircuitPython task. +void touch_interrupt(void *arg) { + (void) arg; + woke_up = true; + BaseType_t task_wakeup; + vTaskNotifyGiveFromISR(circuitpython_task, &task_wakeup); + if (task_wakeup) { + portYIELD_FROM_ISR(); + } +} + +void alarm_touch_touchalarm_set_alarm(const bool deep_sleep, const size_t n_alarms, const mp_obj_t *alarms) { + bool touch_alarm_set = false; + alarm_touch_touchalarm_obj_t *touch_alarm = MP_OBJ_NULL; + + for (size_t i = 0; i < n_alarms; i++) { + if (MP_OBJ_IS_TYPE(alarms[i], &alarm_touch_touchalarm_type)) { + if (deep_sleep && touch_alarm_set) { + mp_raise_ValueError(translate("Only one TouchAlarm can be set in deep sleep.")); + } + touch_alarm = MP_OBJ_TO_PTR(alarms[i]); + touch_channel_mask |= 1 << touch_alarm->pin->number; + touch_alarm_set = true; + } + } + + if (!touch_alarm_set) { + return; + } + + // configure interrupt for pretend to deep sleep + // this will be disabled if we actually deep sleep + + // reset touch peripheral + peripherals_touch_reset(); + peripherals_touch_never_reset(true); + + for (uint8_t i = 1; i <= 14; i++) { + if ((touch_channel_mask & 1 << i) != 0) { + touch_pad_t touch_channel = (touch_pad_t)i; + // intialize touchpad + peripherals_touch_init(touch_channel); + + // wait for touch data to reset + mp_hal_delay_ms(10); + + // configure trigger threshold + uint32_t touch_value; + touch_pad_read_benchmark(touch_channel, &touch_value); + touch_pad_set_thresh(touch_channel, touch_value * 0.1); //10% + } + } + + // configure touch interrupt + touch_pad_timeout_set(true, SOC_TOUCH_PAD_THRESHOLD_MAX); + touch_pad_isr_register(touch_interrupt, NULL, TOUCH_PAD_INTR_MASK_ALL); + touch_pad_intr_enable(TOUCH_PAD_INTR_MASK_ACTIVE | TOUCH_PAD_INTR_MASK_INACTIVE); +} + +void alarm_touch_touchalarm_prepare_for_deep_sleep(void) { + if (!touch_channel_mask) { + return; + } + + touch_pad_t touch_channel = TOUCH_PAD_MAX; + for (uint8_t i = 1; i <= 14; i++) { + if ((touch_channel_mask & 1 << i) != 0) { + touch_channel = (touch_pad_t)i; + break; + } + } + + // reset touch peripheral + peripherals_touch_never_reset(false); + peripherals_touch_reset(); + + // intialize touchpad + peripherals_touch_init(touch_channel); + + // configure touchpad for sleep + touch_pad_sleep_channel_enable(touch_channel, true); + touch_pad_sleep_channel_enable_proximity(touch_channel, false); + + // wait for touch data to reset + mp_hal_delay_ms(10); + + // configure trigger threshold + uint32_t touch_value; + touch_pad_sleep_channel_read_smooth(touch_channel, &touch_value); + touch_pad_sleep_set_threshold(touch_channel, touch_value * 0.1); //10% + + // enable touchpad wakeup + esp_sleep_enable_touchpad_wakeup(); + esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON); +} + +bool alarm_touch_touchalarm_woke_us_up(void) { + return woke_up; +} + +void alarm_touch_touchalarm_reset(void) { + woke_up = false; + touch_channel_mask = 0; + peripherals_touch_never_reset(false); +} diff --git a/ports/esp32s2/common-hal/alarm/touch/TouchAlarm.h b/ports/esp32s2/common-hal/alarm/touch/TouchAlarm.h new file mode 100644 index 0000000000..755a3977ad --- /dev/null +++ b/ports/esp32s2/common-hal/alarm/touch/TouchAlarm.h @@ -0,0 +1,46 @@ +/* + * 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_COMMON_HAL_ALARM_TOUCH_TOUCHALARM_H +#define MICROPY_INCLUDED_COMMON_HAL_ALARM_TOUCH_TOUCHALARM_H + +#include "py/obj.h" +#include "common-hal/microcontroller/Pin.h" + +typedef struct { + mp_obj_base_t base; + const mcu_pin_obj_t *pin; +} alarm_touch_touchalarm_obj_t; + +// Find the alarm object that caused us to wake up or create an equivalent one. +mp_obj_t alarm_touch_touchalarm_get_wakeup_alarm(const size_t n_alarms, const mp_obj_t *alarms); +// Check for the wake up alarm from pretend deep sleep. +void alarm_touch_touchalarm_set_alarm(const bool deep_sleep, const size_t n_alarms, const mp_obj_t *alarms); +void alarm_touch_touchalarm_prepare_for_deep_sleep(void); +bool alarm_touch_touchalarm_woke_us_up(void); +void alarm_touch_touchalarm_reset(void); + +#endif // MICROPY_INCLUDED_COMMON_HAL_ALARM_TOUCH_TOUCHALARM_H diff --git a/ports/esp32s2/common-hal/analogio/AnalogIn.h b/ports/esp32s2/common-hal/analogio/AnalogIn.h index fed4d02170..b9c4866f29 100644 --- a/ports/esp32s2/common-hal/analogio/AnalogIn.h +++ b/ports/esp32s2/common-hal/analogio/AnalogIn.h @@ -29,7 +29,7 @@ #include "common-hal/microcontroller/Pin.h" -#include "components/hal/include/hal/adc_types.h" +#include "components/soc/include/hal/adc_types.h" #include "FreeRTOS.h" #include "freertos/semphr.h" #include "py/obj.h" diff --git a/ports/esp32s2/common-hal/audiobusio/I2SOut.c b/ports/esp32s2/common-hal/audiobusio/I2SOut.c new file mode 100644 index 0000000000..86322be865 --- /dev/null +++ b/ports/esp32s2/common-hal/audiobusio/I2SOut.c @@ -0,0 +1,126 @@ +/* + * 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 +#include + +#include "mpconfigport.h" + +#include "bindings/espidf/__init__.h" + +// Some boards don't implement I2SOut, so suppress any routines from here. +#if CIRCUITPY_AUDIOBUSIO_I2SOUT + +#include "extmod/vfs_fat.h" +#include "py/gc.h" +#include "py/mperrno.h" +#include "py/runtime.h" +#include "common-hal/audiobusio/I2SOut.h" +#include "shared-bindings/audiobusio/I2SOut.h" +#include "shared-bindings/audiocore/RawSample.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "supervisor/shared/translate.h" + +#include "driver/i2s.h" + +// Caller validates that pins are free. +void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t* self, + const mcu_pin_obj_t* bit_clock, const mcu_pin_obj_t* word_select, + const mcu_pin_obj_t* data, bool left_justified) { + + port_i2s_allocate_init(&self->peripheral, left_justified); + + i2s_pin_config_t i2s_pin_config = { + .bck_io_num = bit_clock->number, + .ws_io_num = word_select->number, + .data_out_num = data->number, + .data_in_num = I2S_PIN_NO_CHANGE, + }; + CHECK_ESP_RESULT(i2s_set_pin(self->peripheral.instance, &i2s_pin_config)); + self->bit_clock = bit_clock; + self->word_select = word_select; + self->data = data; +} + +bool common_hal_audiobusio_i2sout_deinited(audiobusio_i2sout_obj_t* self) { + return self->peripheral.instance == -1; +} + +void common_hal_audiobusio_i2sout_deinit(audiobusio_i2sout_obj_t* self) { + if (common_hal_audiobusio_i2sout_deinited(self)) { + return; + } + + if (self->bit_clock) { + reset_pin_number(self->bit_clock->number); + } + self->bit_clock = NULL; + + if (self->word_select) { + reset_pin_number(self->word_select->number); + } + self->word_select = NULL; + + if (self->data) { + reset_pin_number(self->data->number); + } + self->data = NULL; + + if (self->peripheral.instance >= 0) { + port_i2s_reset_instance(self->peripheral.instance); + } + self->peripheral.instance = -1; +} + +void common_hal_audiobusio_i2sout_play(audiobusio_i2sout_obj_t* self, + mp_obj_t sample, bool loop) { + if (common_hal_audiobusio_i2sout_get_playing(self)) { + common_hal_audiobusio_i2sout_stop(self); + } + port_i2s_play(&self->peripheral, sample, loop); +} + +void common_hal_audiobusio_i2sout_pause(audiobusio_i2sout_obj_t* self) { + port_i2s_pause(&self->peripheral); +} + +void common_hal_audiobusio_i2sout_resume(audiobusio_i2sout_obj_t* self) { + port_i2s_resume(&self->peripheral); +} + +bool common_hal_audiobusio_i2sout_get_paused(audiobusio_i2sout_obj_t* self) { + return port_i2s_paused(&self->peripheral); +} + +void common_hal_audiobusio_i2sout_stop(audiobusio_i2sout_obj_t* self) { + port_i2s_stop(&self->peripheral); +} + +bool common_hal_audiobusio_i2sout_get_playing(audiobusio_i2sout_obj_t* self) { + return port_i2s_playing(&self->peripheral); +} + +#endif // CIRCUITPY_AUDIOBUSIO_I2SOUT diff --git a/ports/esp32s2/common-hal/audiobusio/I2SOut.h b/ports/esp32s2/common-hal/audiobusio/I2SOut.h new file mode 100644 index 0000000000..891e9af674 --- /dev/null +++ b/ports/esp32s2/common-hal/audiobusio/I2SOut.h @@ -0,0 +1,45 @@ +/* + * 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 "supervisor/background_callback.h" +#include "common-hal/microcontroller/Pin.h" + +#include "common-hal/audiobusio/__init__.h" + +// Some boards don't implement I2SOut, so suppress any routines from here. +#if CIRCUITPY_AUDIOBUSIO_I2SOUT + +typedef struct { + mp_obj_base_t base; + i2s_t peripheral; + const mcu_pin_obj_t *bit_clock; + const mcu_pin_obj_t *word_select; + const mcu_pin_obj_t *data; +} audiobusio_i2sout_obj_t; + +#endif diff --git a/ports/esp32s2/common-hal/audiobusio/PDMIn.c b/ports/esp32s2/common-hal/audiobusio/PDMIn.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ports/esp32s2/common-hal/audiobusio/PDMIn.h b/ports/esp32s2/common-hal/audiobusio/PDMIn.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/ports/esp32s2/common-hal/audiobusio/__init__.c b/ports/esp32s2/common-hal/audiobusio/__init__.c new file mode 100644 index 0000000000..01c77c5313 --- /dev/null +++ b/ports/esp32s2/common-hal/audiobusio/__init__.c @@ -0,0 +1,245 @@ +/* + * 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 + +#include "py/runtime.h" + +#include "common-hal/audiobusio/__init__.h" +#include "bindings/espidf/__init__.h" +#include "freertos/FreeRTOS.h" +#include "freertos/task.h" + +#include "shared-module/audiocore/__init__.h" + +#define I2S_QUEUE_SIZE (3) + +static i2s_t *i2s_instance[I2S_NUM_MAX]; +static QueueHandle_t i2s_queues[I2S_NUM_MAX]; +static TaskHandle_t i2s_tasks[I2S_NUM_MAX]; + +static int8_t port_i2s_allocate(void) { +#if defined(I2S_NUM_1) + if(!i2s_instance[1]) return 1; +#endif + if(!i2s_instance[0]) return 0; + + mp_raise_RuntimeError(translate("Peripheral in use")); +} + +void port_i2s_reset_instance(int i) { + assert(i >= 0 && i < I2S_NUM_MAX); + if (i2s_tasks[i]) { + vTaskDelete(i2s_tasks[i]); + } + i2s_tasks[i] = NULL; + + (void)i2s_driver_uninstall(i); + i2s_instance[i] = NULL; +} + +void i2s_reset(void) { + for (int i=0; i < I2S_NUM_MAX; i++) { + port_i2s_reset_instance(i); + } +} + +static void i2s_fill_buffer(i2s_t *self) { + if (self->instance < 0 || self->instance >= I2S_NUM_MAX) { + return; + } +#define STACK_BUFFER_SIZE (512) + int16_t signed_samples[STACK_BUFFER_SIZE / sizeof(int16_t)]; + + if (!self->playing || self->paused || !self->sample || self->stopping) { + memset(signed_samples, 0, sizeof(signed_samples)); + + size_t bytes_written = 0; + do { + CHECK_ESP_RESULT(i2s_write(self->instance, signed_samples, sizeof(signed_samples), &bytes_written, 0)); + } while (bytes_written != 0); + return; + } + while (!self->stopping) { + if (self->sample_data == self->sample_end) { + uint32_t sample_buffer_length; + audioio_get_buffer_result_t get_buffer_result = + audiosample_get_buffer(self->sample, false, 0, + &self->sample_data, &sample_buffer_length); + self->sample_end = self->sample_data + sample_buffer_length; + if (get_buffer_result == GET_BUFFER_DONE) { + if (self->loop) { + audiosample_reset_buffer(self->sample, false, 0); + } else { + self->stopping = true; + break; + } + } + if (get_buffer_result == GET_BUFFER_ERROR || sample_buffer_length == 0) { + self->stopping = true; + break; + } + } + size_t bytes_written = 0; + size_t bytecount = self->sample_end - self->sample_data; + if (self->samples_signed && self->channel_count == 2) { + if (self->bytes_per_sample == 2) { + CHECK_ESP_RESULT(i2s_write(self->instance, self->sample_data, bytecount, &bytes_written, 0)); + } else { + CHECK_ESP_RESULT(i2s_write_expand(self->instance, self->sample_data, bytecount, 8, 16, &bytes_written, 0)); + } + } else { + const size_t bytes_per_output_frame = 4; + size_t bytes_per_input_frame = self->channel_count * self->bytes_per_sample; + size_t framecount = MIN(STACK_BUFFER_SIZE / bytes_per_output_frame, bytecount / bytes_per_input_frame); + if (self->samples_signed) { + assert(self->channel_count == 1); + if (self->bytes_per_sample == 1) { + audiosample_convert_s8m_s16s(signed_samples, (int8_t*)(void*)self->sample_data, framecount); + } else { + audiosample_convert_s16m_s16s(signed_samples, (int16_t*)(void*)self->sample_data, framecount); + } + } else { + if (self->channel_count == 1) { + if (self->bytes_per_sample == 1) { + audiosample_convert_u8m_s16s(signed_samples, (uint8_t*)(void*)self->sample_data, framecount); + } else { + audiosample_convert_u16m_s16s(signed_samples, (uint16_t*)(void*)self->sample_data, framecount); + } + } else { + if (self->bytes_per_sample == 1) { + audiosample_convert_u8s_s16s(signed_samples, (uint8_t*)(void*)self->sample_data, framecount); + } else { + audiosample_convert_u16s_s16s(signed_samples, (uint16_t*)(void*)self->sample_data, framecount); + } + } + } + size_t expanded_bytes_written = 0; + CHECK_ESP_RESULT(i2s_write(self->instance, signed_samples, bytes_per_output_frame*framecount, &expanded_bytes_written, 0)); + assert(expanded_bytes_written % 4 == 0); + bytes_written = expanded_bytes_written / bytes_per_output_frame * bytes_per_input_frame; + } + self->sample_data += bytes_written; + // We have filled the DMA buffer + if (!bytes_written) { + break; + } + } +} + +static void i2s_callback_fun(void *self_in) { + i2s_t *self = self_in; + i2s_fill_buffer(self); +} + +static void i2s_event_task(void *self_in) { + i2s_t *self = self_in; + while(true) { + i2s_event_type_t event; + BaseType_t result = xQueueReceive(i2s_queues[self->instance], &event, portMAX_DELAY); + if (result && event == I2S_EVENT_TX_DONE) { + background_callback_add(&self->callback, i2s_callback_fun, self_in); + } + } +} + +void port_i2s_allocate_init(i2s_t *self, bool left_justified) { + self->instance = port_i2s_allocate(); + + i2s_config_t i2s_config = { + .mode = I2S_MODE_MASTER | I2S_MODE_TX, + .sample_rate = 44100, + .bits_per_sample = 16, + .channel_format = I2S_CHANNEL_FMT_RIGHT_LEFT, + .communication_format = left_justified ? I2S_COMM_FORMAT_STAND_I2S : I2S_COMM_FORMAT_STAND_I2S, + .dma_buf_count = 2, + .dma_buf_len = 128, // in _frames_, so 128 is 512 bytes per dma buf + .use_apll = false, + }; + CHECK_ESP_RESULT(i2s_driver_install(self->instance, &i2s_config, I2S_QUEUE_SIZE, &i2s_queues[self->instance])); + + if (!xTaskCreate(i2s_event_task, "I2S_task", 3 * configMINIMAL_STACK_SIZE, self, CONFIG_PTHREAD_TASK_PRIO_DEFAULT, &i2s_tasks[self->instance])) { + mp_raise_OSError_msg(translate("xTaskCreate failed")); + } + i2s_instance[self->instance] = self; + +} + + +void port_i2s_play(i2s_t *self, mp_obj_t sample, bool loop) { + self->sample = sample; + self->loop = loop; + self->bytes_per_sample = audiosample_bits_per_sample(sample) / 8; + self->channel_count = audiosample_channel_count(sample); + bool single_buffer; + bool samples_signed; + uint32_t max_buffer_length; + uint8_t spacing; + audiosample_get_buffer_structure(sample, false, &single_buffer, &samples_signed, + &max_buffer_length, &spacing); + self->samples_signed = samples_signed; + self->playing = true; + self->paused = false; + self->stopping = false; + self->sample_data = self->sample_end = NULL; + // We always output stereo so output twice as many bits. + // uint16_t bits_per_sample_output = bits_per_sample * 2; + + audiosample_reset_buffer(self->sample, false, 0); + + CHECK_ESP_RESULT(i2s_set_sample_rates(self->instance, audiosample_sample_rate(sample))); + + background_callback_add(&self->callback, i2s_callback_fun, self); +} + +bool port_i2s_playing(i2s_t *self) { + return self->playing && !self->stopping; +} + +bool port_i2s_paused(i2s_t *self) { + return self->paused; +} + +void port_i2s_stop(i2s_t *self) { + self->sample = NULL; + self->paused = false; + self->playing = false; + self->stopping = false; +} + +void port_i2s_pause(i2s_t *self) { + if (!self->paused) { + self->paused = true; + CHECK_ESP_RESULT(i2s_stop(self->instance)); + } +} + +void port_i2s_resume(i2s_t *self) { + if (self->paused) { + self->paused = false; + CHECK_ESP_RESULT(i2s_start(self->instance)); + } +} diff --git a/ports/esp32s2/common-hal/audiobusio/__init__.h b/ports/esp32s2/common-hal/audiobusio/__init__.h new file mode 100644 index 0000000000..7709735dae --- /dev/null +++ b/ports/esp32s2/common-hal/audiobusio/__init__.h @@ -0,0 +1,61 @@ +/* + * 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 "supervisor/background_callback.h" + +#include "driver/i2s.h" + +typedef struct { + mp_obj_t *sample; + bool left_justified; + bool loop; + bool paused; + bool playing; + bool stopping; + bool samples_signed; + int8_t bytes_per_sample; + int8_t channel_count; + int8_t instance; + uint16_t buffer_length; + uint8_t *sample_data, *sample_end; + i2s_config_t i2s_config; + background_callback_t callback; +} i2s_t; + + +void port_i2s_allocate_init(i2s_t *self, bool left_justified); +void port_i2s_reset_instance(int i); +void i2s_reset(void); +void port_i2s_play(i2s_t *self, mp_obj_t sample, bool loop); +void port_i2s_stop(i2s_t *self); +bool port_i2s_playing(i2s_t *self); +bool port_i2s_paused(i2s_t *self); +void port_i2s_pause(i2s_t *self); +void port_i2s_resume(i2s_t *self); diff --git a/ports/esp32s2/common-hal/busio/I2C.h b/ports/esp32s2/common-hal/busio/I2C.h index c39d6d7448..1a989e30a4 100644 --- a/ports/esp32s2/common-hal/busio/I2C.h +++ b/ports/esp32s2/common-hal/busio/I2C.h @@ -29,7 +29,7 @@ #include "common-hal/microcontroller/Pin.h" -#include "components/hal/include/hal/i2c_types.h" +#include "components/soc/include/hal/i2c_types.h" #include "FreeRTOS.h" #include "freertos/semphr.h" #include "py/obj.h" diff --git a/ports/esp32s2/common-hal/busio/SPI.c b/ports/esp32s2/common-hal/busio/SPI.c index 562881585d..c4d54ec81c 100644 --- a/ports/esp32s2/common-hal/busio/SPI.c +++ b/ports/esp32s2/common-hal/busio/SPI.c @@ -248,12 +248,8 @@ void common_hal_busio_spi_deinit(busio_spi_obj_t *self) { spi_bus_free(self->host_id); common_hal_reset_pin(self->clock_pin); - if (self->MOSI_pin != NULL) { - common_hal_reset_pin(self->MOSI_pin); - } - if (self->MISO_pin != NULL) { - common_hal_reset_pin(self->MISO_pin); - } + common_hal_reset_pin(self->MOSI_pin); + common_hal_reset_pin(self->MISO_pin); self->clock_pin = NULL; self->MISO_pin = NULL; self->MOSI_pin = NULL; @@ -273,7 +269,7 @@ bool common_hal_busio_spi_configure(busio_spi_obj_t *self, self->bits = bits; self->target_frequency = baudrate; self->hal_context.timing_conf = &self->timing_conf; - esp_err_t result = spi_hal_cal_clock_conf(&self->hal_context, + esp_err_t result = spi_hal_get_clock_conf(&self->hal_context, self->target_frequency, 128 /* duty_cycle */, self->connected_through_gpio, @@ -366,7 +362,8 @@ bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_ou 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); + hal->hw->dma_out_link.dma_tx_ena = 0; + hal->hw->dma_out_link.stop = 1; } // This rounds up. diff --git a/ports/esp32s2/common-hal/busio/SPI.h b/ports/esp32s2/common-hal/busio/SPI.h index f6c1c344a1..d6203feae6 100644 --- a/ports/esp32s2/common-hal/busio/SPI.h +++ b/ports/esp32s2/common-hal/busio/SPI.h @@ -30,8 +30,8 @@ #include "common-hal/microcontroller/Pin.h" #include "components/driver/include/driver/spi_common_internal.h" -#include "components/hal/include/hal/spi_hal.h" -#include "components/hal/include/hal/spi_types.h" +#include "components/soc/include/hal/spi_hal.h" +#include "components/soc/include/hal/spi_types.h" #include "py/obj.h" typedef struct { diff --git a/ports/esp32s2/common-hal/busio/UART.h b/ports/esp32s2/common-hal/busio/UART.h index 1d7f135115..751fb2e002 100644 --- a/ports/esp32s2/common-hal/busio/UART.h +++ b/ports/esp32s2/common-hal/busio/UART.h @@ -29,7 +29,7 @@ #include "common-hal/microcontroller/Pin.h" -#include "components/hal/include/hal/uart_types.h" +#include "components/soc/include/hal/uart_types.h" #include "py/obj.h" typedef struct { diff --git a/ports/esp32s2/common-hal/digitalio/DigitalInOut.c b/ports/esp32s2/common-hal/digitalio/DigitalInOut.c index 152db1e71d..a2a0209f93 100644 --- a/ports/esp32s2/common-hal/digitalio/DigitalInOut.c +++ b/ports/esp32s2/common-hal/digitalio/DigitalInOut.c @@ -30,7 +30,7 @@ #include "components/driver/include/driver/gpio.h" -#include "components/hal/include/hal/gpio_hal.h" +#include "components/soc/include/hal/gpio_hal.h" void common_hal_digitalio_digitalinout_never_reset( digitalio_digitalinout_obj_t *self) { diff --git a/ports/esp32s2/common-hal/dualbank/__init__.c b/ports/esp32s2/common-hal/dualbank/__init__.c new file mode 100644 index 0000000000..1414f131d1 --- /dev/null +++ b/ports/esp32s2/common-hal/dualbank/__init__.c @@ -0,0 +1,139 @@ +/* + * 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/dualbank/__init__.h" +#include "shared-bindings/dualbank/__init__.h" + +#include + +#include "esp_log.h" +#include "esp_ota_ops.h" + +static const esp_partition_t *update_partition = NULL; +static esp_ota_handle_t update_handle = 0; + +static const char *TAG = "dualbank"; + +void dualbank_reset(void) { + // should use `abort` instead of `end` + // but not in idf v4.2 + // esp_ota_abort(update_handle); + if (esp_ota_end(update_handle) == ESP_OK) { + update_handle = 0; + update_partition = NULL; + } +} + +static void __attribute__((noreturn)) task_fatal_error(void) { + ESP_LOGE(TAG, "Exiting task due to fatal error..."); + mp_raise_RuntimeError(translate("Update Failed")); +} + +void common_hal_dualbank_flash(const void *buf, const size_t len, const size_t offset) { + esp_err_t err; + + const esp_partition_t *running = esp_ota_get_running_partition(); + const esp_partition_t *last_invalid = esp_ota_get_last_invalid_partition(); + + if (update_partition == NULL) { + update_partition = esp_ota_get_next_update_partition(NULL); + + ESP_LOGI(TAG, "Running partition type %d subtype %d (offset 0x%08x)", + running->type, running->subtype, running->address); + + ESP_LOGI(TAG, "Writing partition type %d subtype %d (offset 0x%08x)\n", + update_partition->type, update_partition->subtype, update_partition->address); + + assert(update_partition != NULL); + } + + if (update_handle == 0) { + if (len > sizeof(esp_image_header_t) + sizeof(esp_image_segment_header_t) + sizeof(esp_app_desc_t)) { + esp_app_desc_t new_app_info; + memcpy(&new_app_info, &((char *)buf)[sizeof(esp_image_header_t) + sizeof(esp_image_segment_header_t)], sizeof(esp_app_desc_t)); + ESP_LOGI(TAG, "New firmware version: %s", new_app_info.version); + + esp_app_desc_t running_app_info; + if (esp_ota_get_partition_description(running, &running_app_info) == ESP_OK) { + ESP_LOGI(TAG, "Running firmware version: %s", running_app_info.version); + } + + esp_app_desc_t invalid_app_info; + if (esp_ota_get_partition_description(last_invalid, &invalid_app_info) == ESP_OK) { + ESP_LOGI(TAG, "Last invalid firmware version: %s", invalid_app_info.version); + } + + // check new version with running version + if (memcmp(new_app_info.version, running_app_info.version, sizeof(new_app_info.version)) == 0) { + ESP_LOGW(TAG, "New version is the same as running version."); + task_fatal_error(); + } + + // check new version with last invalid partition + if (last_invalid != NULL) { + if (memcmp(new_app_info.version, invalid_app_info.version, sizeof(new_app_info.version)) == 0) { + ESP_LOGW(TAG, "New version is the same as invalid version."); + task_fatal_error(); + } + } + + err = esp_ota_begin(update_partition, OTA_SIZE_UNKNOWN, &update_handle); + if (err != ESP_OK) { + ESP_LOGE(TAG, "esp_ota_begin failed (%s)", esp_err_to_name(err)); + task_fatal_error(); + } + } else { + ESP_LOGE(TAG, "received package is not fit len"); + task_fatal_error(); + } + } + + if (offset == 0) { + err = esp_ota_write(update_handle, buf, len); + } else { + err = esp_ota_write_with_offset(update_handle, buf, len, offset); + } + if (err != ESP_OK) { + ESP_LOGE(TAG, "esp_ota_write failed (%s)", esp_err_to_name(err)); + task_fatal_error(); + } +} + +void common_hal_dualbank_switch(void) { + if (esp_ota_end(update_handle) == ESP_OK) { + update_handle = 0; + update_partition = NULL; + } + esp_err_t err = esp_ota_set_boot_partition(esp_ota_get_next_update_partition(NULL)); + if (err != ESP_OK) { + if (err == ESP_ERR_OTA_VALIDATE_FAILED) { + ESP_LOGE(TAG, "Image validation failed, image is corrupted"); + mp_raise_RuntimeError(translate("Firmware image is invalid")); + } + ESP_LOGE(TAG, "esp_ota_set_boot_partition failed (%s)!", esp_err_to_name(err)); + task_fatal_error(); + } +} diff --git a/ports/esp32s2/common-hal/dualbank/__init__.h b/ports/esp32s2/common-hal/dualbank/__init__.h new file mode 100644 index 0000000000..8b18336c94 --- /dev/null +++ b/ports/esp32s2/common-hal/dualbank/__init__.h @@ -0,0 +1,32 @@ +/* + * 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_DUALBANK___INIT___H +#define MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DUALBANK___INIT___H + +extern void dualbank_reset(void); + +#endif //MICROPY_INCLUDED_ESP32S2_COMMON_HAL_DUALBANK___INIT___H diff --git a/ports/esp32s2/common-hal/microcontroller/Pin.c b/ports/esp32s2/common-hal/microcontroller/Pin.c index 81dfa1308d..6889720e84 100644 --- a/ports/esp32s2/common-hal/microcontroller/Pin.c +++ b/ports/esp32s2/common-hal/microcontroller/Pin.c @@ -32,18 +32,19 @@ #include "py/mphal.h" #include "components/driver/include/driver/gpio.h" -#include "components/hal/include/hal/gpio_hal.h" +#include "components/soc/include/hal/gpio_hal.h" #ifdef MICROPY_HW_NEOPIXEL bool neopixel_in_use; #endif +#ifdef MICROPY_HW_APA102_MOSI +bool apa102_sck_in_use; +bool apa102_mosi_in_use; +#endif STATIC uint32_t never_reset_pins[2]; STATIC uint32_t in_use[2]; -bool apa102_mosi_in_use; -bool apa102_sck_in_use; - STATIC void floating_gpio_reset(gpio_num_t pin_number) { // This is the same as gpio_reset_pin(), but without the pullup. // Note that gpio_config resets the iomatrix to GPIO_FUNC as well. @@ -86,9 +87,26 @@ void reset_pin_number(gpio_num_t pin_number) { return; } #endif + #ifdef MICROPY_HW_APA102_MOSI + if (pin_number == MICROPY_HW_APA102_MOSI->number || + pin_number == MICROPY_HW_APA102_SCK->number) { + apa102_mosi_in_use = apa102_mosi_in_use && pin_number != MICROPY_HW_APA102_MOSI->number; + apa102_sck_in_use = apa102_sck_in_use && pin_number != MICROPY_HW_APA102_SCK->number; + if (!apa102_sck_in_use && !apa102_mosi_in_use) { + rgb_led_status_init(); + } + return; + } + #endif + + + } void common_hal_reset_pin(const mcu_pin_obj_t* pin) { + if (pin == NULL) { + return; + } reset_pin_number(pin->number); } @@ -107,6 +125,11 @@ void reset_all_pins(void) { #ifdef MICROPY_HW_NEOPIXEL neopixel_in_use = false; #endif + #ifdef MICROPY_HW_APA102_MOSI + apa102_sck_in_use = false; + apa102_mosi_in_use = false; + #endif + } void claim_pin(const mcu_pin_obj_t* pin) { @@ -116,6 +139,15 @@ void claim_pin(const mcu_pin_obj_t* pin) { neopixel_in_use = true; } #endif + #ifdef MICROPY_HW_APA102_MOSI + 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_claim(const mcu_pin_obj_t* pin) { @@ -128,10 +160,18 @@ bool pin_number_is_free(gpio_num_t pin_number) { return !neopixel_in_use; } #endif + #ifdef MICROPY_HW_APA102_MOSI + if (pin_number == MICROPY_HW_APA102_MOSI->number) { + return !apa102_mosi_in_use; + } + if (pin_number == MICROPY_HW_APA102_SCK->number) { + return !apa102_sck_in_use; + } + #endif uint8_t offset = pin_number / 32; uint32_t mask = 1 << (pin_number % 32); - return (never_reset_pins[offset] & mask) == 0 && (in_use[offset] & mask) == 0; + return (in_use[offset] & mask) == 0; } bool common_hal_mcu_pin_is_free(const mcu_pin_obj_t *pin) { diff --git a/ports/esp32s2/common-hal/microcontroller/Pin.h b/ports/esp32s2/common-hal/microcontroller/Pin.h index f6c0087031..65f57a82d4 100644 --- a/ports/esp32s2/common-hal/microcontroller/Pin.h +++ b/ports/esp32s2/common-hal/microcontroller/Pin.h @@ -31,8 +31,10 @@ #include "peripherals/pins.h" -extern bool apa102_mosi_in_use; +#ifdef MICROPY_HW_APA102_MOSI extern bool apa102_sck_in_use; +extern bool apa102_mosi_in_use; +#endif #ifdef MICROPY_HW_NEOPIXEL extern bool neopixel_in_use; diff --git a/ports/esp32s2/common-hal/socketpool/Socket.c b/ports/esp32s2/common-hal/socketpool/Socket.c index 743414ae72..69ef41c6ec 100644 --- a/ports/esp32s2/common-hal/socketpool/Socket.c +++ b/ports/esp32s2/common-hal/socketpool/Socket.c @@ -366,7 +366,7 @@ mp_uint_t common_hal_socketpool_socket_recvfrom_into(socketpool_socket_obj_t* se timed_out = supervisor_ticks_ms64() - start_ticks >= self->timeout_ms; } RUN_BACKGROUND_TASKS; - received = lwip_recvfrom(self->num, buf, len - 1, 0, (struct sockaddr *)&source_addr, &socklen); + received = lwip_recvfrom(self->num, buf, len, 0, (struct sockaddr *)&source_addr, &socklen); // In non-blocking mode, fail instead of looping if (received == -1 && self->timeout_ms == 0) { @@ -384,10 +384,9 @@ mp_uint_t common_hal_socketpool_socket_recvfrom_into(socketpool_socket_obj_t* se if (received < 0) { mp_raise_BrokenPipeError(); return 0; - } else { - buf[received] = 0; // Null-terminate whatever we received - return received; } + + return received; } void common_hal_socketpool_socket_close(socketpool_socket_obj_t* self) { diff --git a/ports/esp32s2/common-hal/touchio/TouchIn.c b/ports/esp32s2/common-hal/touchio/TouchIn.c index b27cbcf86d..401b84d5c2 100644 --- a/ports/esp32s2/common-hal/touchio/TouchIn.c +++ b/ports/esp32s2/common-hal/touchio/TouchIn.c @@ -27,20 +27,11 @@ #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; - } -} +#include "peripherals/touch.h" 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); + touch_pad_read_raw_data(self->pin->touch_channel, &touch_value); if (touch_value > UINT16_MAX) { return UINT16_MAX; } @@ -54,21 +45,12 @@ void common_hal_touchio_touchin_construct(touchio_touchin_obj_t* self, } 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; - } + // initialize touchpad + peripherals_touch_init(pin->touch_channel); - touch_pad_config((touch_pad_t)pin->touch_channel); - - // wait for "raw data" to reset + // wait for touch 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. diff --git a/ports/esp32s2/common-hal/touchio/TouchIn.h b/ports/esp32s2/common-hal/touchio/TouchIn.h index 91de209316..2f7c66d2b8 100644 --- a/ports/esp32s2/common-hal/touchio/TouchIn.h +++ b/ports/esp32s2/common-hal/touchio/TouchIn.h @@ -27,9 +27,8 @@ #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" +#include "common-hal/microcontroller/Pin.h" typedef struct { mp_obj_base_t base; @@ -37,6 +36,4 @@ typedef struct { 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/wifi/Network.c b/ports/esp32s2/common-hal/wifi/Network.c index e90b3d552c..b6eb6bb433 100644 --- a/ports/esp32s2/common-hal/wifi/Network.c +++ b/ports/esp32s2/common-hal/wifi/Network.c @@ -48,3 +48,43 @@ mp_obj_t common_hal_wifi_network_get_rssi(wifi_network_obj_t *self) { mp_obj_t common_hal_wifi_network_get_channel(wifi_network_obj_t *self) { return mp_obj_new_int(self->record.primary); } + +mp_obj_t common_hal_wifi_network_get_country(wifi_network_obj_t *self) { + const char* cstr = (const char*) self->record.country.cc; + // 2 instead of strlen(cstr) as this gives us only the country-code + return mp_obj_new_str(cstr, 2); +} + +mp_obj_t common_hal_wifi_network_get_authmode(wifi_network_obj_t *self) { + const char* authmode = ""; + switch (self->record.authmode) { + case WIFI_AUTH_OPEN: + authmode = "OPEN"; + break; + case WIFI_AUTH_WEP: + authmode = "WEP"; + break; + case WIFI_AUTH_WPA_PSK: + authmode = "WPA_PSK"; + break; + case WIFI_AUTH_WPA2_PSK: + authmode = "WPA2_PSK"; + break; + case WIFI_AUTH_WPA_WPA2_PSK: + authmode = "WPA_WPA2_PSK"; + break; + case WIFI_AUTH_WPA2_ENTERPRISE: + authmode = "WPA2_ENTERPRISE"; + break; + case WIFI_AUTH_WPA3_PSK: + authmode = "WPA3_PSK"; + break; + case WIFI_AUTH_WPA2_WPA3_PSK: + authmode = "WPA2_WPA3_PSK"; + break; + default: + authmode = "UNKNOWN"; + break; + } + return mp_obj_new_str(authmode, strlen(authmode)); +} diff --git a/ports/esp32s2/common-hal/wifi/Radio.c b/ports/esp32s2/common-hal/wifi/Radio.c index 05506783e7..e9f374a06b 100644 --- a/ports/esp32s2/common-hal/wifi/Radio.c +++ b/ports/esp32s2/common-hal/wifi/Radio.c @@ -55,8 +55,6 @@ static void start_station(wifi_radio_obj_t *self) { esp_wifi_set_mode(next_mode); self->sta_mode = 1; - - esp_wifi_set_config(WIFI_MODE_STA, &self->sta_config); } bool common_hal_wifi_radio_get_enabled(wifi_radio_obj_t *self) { @@ -198,6 +196,17 @@ mp_obj_t common_hal_wifi_radio_get_ap_info(wifi_radio_obj_t *self) { if (esp_wifi_sta_get_ap_info(&self->ap_info.record) != ESP_OK){ return mp_const_none; } else { + if (strlen(self->ap_info.record.country.cc) == 0) { + // Workaround to fill country related information in ap_info until ESP-IDF carries a fix + // esp_wifi_sta_get_ap_info does not appear to fill wifi_country_t (e.g. country.cc) details + // (IDFGH-4437) #6267 + // Note: It is possible that Wi-Fi APs don't have a CC set, then even after this workaround + // the element would remain empty. + memset(&self->ap_info.record.country, 0, sizeof(wifi_country_t)); + if (esp_wifi_get_country(&self->ap_info.record.country) != ESP_OK) { + return mp_const_none; + } + } memcpy(&ap_info->record, &self->ap_info.record, sizeof(wifi_ap_record_t)); return MP_OBJ_FROM_PTR(ap_info); } diff --git a/ports/esp32s2/common-hal/wifi/__init__.c b/ports/esp32s2/common-hal/wifi/__init__.c index 8de3775375..08d7a164f4 100644 --- a/ports/esp32s2/common-hal/wifi/__init__.c +++ b/ports/esp32s2/common-hal/wifi/__init__.c @@ -47,23 +47,23 @@ static void event_handler(void* arg, esp_event_base_t event_base, if (event_base == WIFI_EVENT) { switch (event_id) { case WIFI_EVENT_SCAN_DONE: - ESP_EARLY_LOGW(TAG, "scan"); + ESP_LOGW(TAG, "scan"); xEventGroupSetBits(radio->event_group_handle, WIFI_SCAN_DONE_BIT); break; case WIFI_EVENT_STA_START: - ESP_EARLY_LOGW(TAG, "start"); + ESP_LOGW(TAG, "start"); break; case WIFI_EVENT_STA_STOP: - ESP_EARLY_LOGW(TAG, "stop"); + ESP_LOGW(TAG, "stop"); break; case WIFI_EVENT_STA_CONNECTED: - ESP_EARLY_LOGW(TAG, "connected"); + ESP_LOGW(TAG, "connected"); break; case WIFI_EVENT_STA_DISCONNECTED: { - ESP_EARLY_LOGW(TAG, "disconnected"); + ESP_LOGW(TAG, "disconnected"); wifi_event_sta_disconnected_t* d = (wifi_event_sta_disconnected_t*) event_data; uint8_t reason = d->reason; - ESP_EARLY_LOGW(TAG, "reason %d 0x%02x", reason, reason); + ESP_LOGW(TAG, "reason %d 0x%02x", reason, reason); if (radio->retries_left > 0 && (reason == WIFI_REASON_AUTH_EXPIRE || reason == WIFI_REASON_NOT_AUTHED || @@ -71,24 +71,27 @@ static void event_handler(void* arg, esp_event_base_t event_base, reason == WIFI_REASON_CONNECTION_FAIL || reason == WIFI_REASON_4WAY_HANDSHAKE_TIMEOUT)) { radio->retries_left--; - ESP_EARLY_LOGI(TAG, "Retrying connect. %d retries remaining", radio->retries_left); + ESP_LOGI(TAG, "Retrying connect. %d retries remaining", radio->retries_left); esp_wifi_connect(); return; } radio->last_disconnect_reason = reason; xEventGroupSetBits(radio->event_group_handle, WIFI_DISCONNECTED_BIT); + break; } // Cases to handle later. // case WIFI_EVENT_STA_AUTHMODE_CHANGE: - default: + default: { + ESP_LOGW(TAG, "event %d 0x%02x", event_id, event_id); break; + } } } if (event_base == IP_EVENT && event_id == IP_EVENT_STA_GOT_IP) { - ESP_EARLY_LOGW(TAG, "got ip"); + ESP_LOGW(TAG, "got ip"); radio->retries_left = radio->starting_retries; xEventGroupSetBits(radio->event_group_handle, WIFI_CONNECTED_BIT); } diff --git a/ports/esp32s2/esp-idf b/ports/esp32s2/esp-idf index d06744f5ef..ebe7784258 160000 --- a/ports/esp32s2/esp-idf +++ b/ports/esp32s2/esp-idf @@ -1 +1 @@ -Subproject commit d06744f5efc382c61cbad8758107cec308feef09 +Subproject commit ebe7784258d8c10e9cc334ccc00c3fd270746c8b diff --git a/ports/esp32s2/esp-idf-config/sdkconfig-debug.defaults b/ports/esp32s2/esp-idf-config/sdkconfig-debug.defaults index f45f6ae9f1..b108532aa2 100644 --- a/ports/esp32s2/esp-idf-config/sdkconfig-debug.defaults +++ b/ports/esp32s2/esp-idf-config/sdkconfig-debug.defaults @@ -10,4 +10,7 @@ CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y # CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT is not set # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set -# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set \ No newline at end of file +# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG=y +CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y \ No newline at end of file diff --git a/ports/esp32s2/esp_error.c b/ports/esp32s2/esp_error.c new file mode 100644 index 0000000000..57bc51528d --- /dev/null +++ b/ports/esp32s2/esp_error.c @@ -0,0 +1,91 @@ +/* + * 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 "esp_error.h" +#include "py/runtime.h" + +#include "bindings/espidf/__init__.h" + +void raise_esp_error(esp_err_t err) { + const compressed_string_t *msg = NULL; + const mp_obj_type_t * exception_type = &mp_type_espidf_IDFError; + switch(err) { + case ESP_FAIL: + msg = translate("Generic Failure"); + break; + case ESP_ERR_NO_MEM: + exception_type = &mp_type_espidf_MemoryError; + msg = translate("Out of memory"); + break; + case ESP_ERR_INVALID_ARG: + msg = translate("Invalid argument"); + break; + case ESP_ERR_INVALID_STATE: + msg = translate("Invalid state"); + break; + case ESP_ERR_INVALID_SIZE: + msg = translate("Invalid size"); + break; + case ESP_ERR_NOT_FOUND: + msg = translate("Requested resource not found"); + break; + case ESP_ERR_NOT_SUPPORTED: + msg = translate("Operation or feature not supported"); + break; + case ESP_ERR_TIMEOUT: + msg = translate("Operation timed out"); + break; + case ESP_ERR_INVALID_RESPONSE: + msg = translate("Received response was invalid"); + break; + case ESP_ERR_INVALID_CRC: + msg = translate("CRC or checksum was invalid"); + break; + case ESP_ERR_INVALID_VERSION: + msg = translate("Version was invalid"); + break; + case ESP_ERR_INVALID_MAC: + msg = translate("MAC address was invalid"); + break; + } + if (msg) { + mp_raise_msg(exception_type, msg); + } + + const char *group = "ESP-IDF"; + + // tests must be in descending order + MP_STATIC_ASSERT( ESP_ERR_FLASH_BASE > ESP_ERR_MESH_BASE ); + MP_STATIC_ASSERT( ESP_ERR_MESH_BASE > ESP_ERR_WIFI_BASE ); + if(err >= ESP_ERR_FLASH_BASE) { + group = "Flash"; + } else if (err >= ESP_ERR_MESH_BASE) { + group = "Mesh"; + } else if (err >= ESP_ERR_WIFI_BASE) { + group = "WiFi"; + } + mp_raise_msg_varg(exception_type, translate("%s error 0x%x"), group, err); +} diff --git a/ports/esp32s2/mpconfigport.h b/ports/esp32s2/mpconfigport.h index db7393d8ef..9c0fd9da3e 100644 --- a/ports/esp32s2/mpconfigport.h +++ b/ports/esp32s2/mpconfigport.h @@ -32,6 +32,7 @@ #define MICROPY_PY_UJSON (1) #define MICROPY_USE_INTERNAL_PRINTF (0) +#define MICROPY_PY_SYS_PLATFORM "Espressif ESP32-S2" #include "py/circuitpy_mpconfig.h" diff --git a/ports/esp32s2/mpconfigport.mk b/ports/esp32s2/mpconfigport.mk index b3b2a6d700..562c60998c 100644 --- a/ports/esp32s2/mpconfigport.mk +++ b/ports/esp32s2/mpconfigport.mk @@ -15,10 +15,15 @@ LONGINT_IMPL = MPZ # These modules are implemented in ports//common-hal: CIRCUITPY_FULL_BUILD = 1 CIRCUITPY_ALARM = 1 -CIRCUITPY_AUDIOBUSIO = 0 +CIRCUITPY_AUDIOCORE = 1 +CIRCUITPY_AUDIOMP3 = 0 +CIRCUITPY_AUDIOBUSIO = 1 +CIRCUITPY_AUDIOBUSIO_PDMIN = 0 +CIRCUITPY_AUDIOBUSIO_I2SOUT = 1 CIRCUITPY_AUDIOIO = 0 CIRCUITPY_CANIO = 1 CIRCUITPY_COUNTIO = 1 +CIRCUITPY_DUALBANK = 1 CIRCUITPY_FREQUENCYIO = 1 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_ROTARYIO = 1 diff --git a/ports/esp32s2/peripherals/pins.h b/ports/esp32s2/peripherals/pins.h index c78eb83851..e0f5e7ddfe 100644 --- a/ports/esp32s2/peripherals/pins.h +++ b/ports/esp32s2/peripherals/pins.h @@ -35,16 +35,16 @@ #include "esp32s2_peripherals_config.h" #include "esp-idf/config/sdkconfig.h" -#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" +#include "components/soc/include/hal/gpio_types.h" +#include "components/soc/include/hal/adc_types.h" +#include "components/soc/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; + touch_pad_t touch_channel; } mcu_pin_obj_t; extern const mcu_pin_obj_t pin_GPIO0; diff --git a/ports/esp32s2/peripherals/touch.c b/ports/esp32s2/peripherals/touch.c new file mode 100644 index 0000000000..6cf33b2bde --- /dev/null +++ b/ports/esp32s2/peripherals/touch.c @@ -0,0 +1,53 @@ +/* + * 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 "components/soc/include/hal/gpio_types.h" +// above include fixes build error in idf@v4.2 +#include "peripherals/touch.h" + +static bool touch_inited = false; +static bool touch_never_reset = false; + +void peripherals_touch_reset(void) { + if (touch_inited && !touch_never_reset) { + touch_pad_deinit(); + touch_inited = false; + } +} + +void peripherals_touch_never_reset(const bool enable) { + touch_never_reset = enable; +} + +void peripherals_touch_init(const touch_pad_t touchpad) { + 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(touchpad); +} diff --git a/ports/esp32s2/peripherals/touch.h b/ports/esp32s2/peripherals/touch.h new file mode 100644 index 0000000000..218045f398 --- /dev/null +++ b/ports/esp32s2/peripherals/touch.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_TOUCH_HANDLER_H +#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TOUCH_HANDLER_H + +#include "driver/touch_pad.h" + +extern void peripherals_touch_reset(void); +extern void peripherals_touch_never_reset(const bool enable); +extern void peripherals_touch_init(const touch_pad_t touchpad); + +#endif // MICROPY_INCLUDED_ESP32S2_PERIPHERALS_TOUCH_HANDLER_H diff --git a/ports/esp32s2/supervisor/esp_port.h b/ports/esp32s2/supervisor/esp_port.h index 1164666cda..8b9e13829f 100644 --- a/ports/esp32s2/supervisor/esp_port.h +++ b/ports/esp32s2/supervisor/esp_port.h @@ -30,6 +30,6 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" -extern TaskHandle_t sleeping_circuitpython_task; +extern TaskHandle_t circuitpython_task; #endif // MICROPY_INCLUDED_ESP32S2_SUPERVISOR_PORT_H diff --git a/ports/esp32s2/supervisor/port.c b/ports/esp32s2/supervisor/port.c index 1b123d19d1..f7cb7b3c6f 100644 --- a/ports/esp32s2/supervisor/port.c +++ b/ports/esp32s2/supervisor/port.c @@ -41,10 +41,10 @@ #include "common-hal/busio/I2C.h" #include "common-hal/busio/SPI.h" #include "common-hal/busio/UART.h" +#include "common-hal/dualbank/__init__.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/socketpool/Socket.h" #include "common-hal/wifi/__init__.h" @@ -55,25 +55,39 @@ #include "peripherals/rmt.h" #include "peripherals/pcnt.h" #include "peripherals/timer.h" -#include "components/esp_rom/include/esp_rom_uart.h" +#include "peripherals/touch.h" +#include "components/esp_rom/include/esp32s2/rom/ets_sys.h" #include "components/heap/include/esp_heap_caps.h" #include "components/xtensa/include/esp_debug_helpers.h" #include "components/soc/soc/esp32s2/include/soc/cache_memory.h" #include "components/soc/soc/esp32s2/include/soc/rtc_cntl_reg.h" +#if CIRCUITPY_AUDIOBUSIO +#include "common-hal/audiobusio/__init__.h" +#endif + #define HEAP_SIZE (48 * 1024) uint32_t* heap; uint32_t heap_size; STATIC esp_timer_handle_t _tick_timer; +STATIC esp_timer_handle_t _sleep_timer; + +TaskHandle_t circuitpython_task = NULL; extern void esp_restart(void) NORETURN; void tick_timer_cb(void* arg) { supervisor_tick(); + + // CircuitPython's VM is run in a separate FreeRTOS task from timer callbacks. So, we have to + // notify the main task every time in case it's waiting for us. + xTaskNotifyGive(circuitpython_task); } +void sleep_timer_cb(void* arg); + safe_mode_t port_init(void) { esp_timer_create_args_t args; args.callback = &tick_timer_cb; @@ -82,14 +96,36 @@ safe_mode_t port_init(void) { args.name = "CircuitPython Tick"; esp_timer_create(&args, &_tick_timer); - #ifdef DEBUG + args.callback = &sleep_timer_cb; + args.arg = NULL; + args.dispatch_method = ESP_TIMER_TASK; + args.name = "CircuitPython Sleep"; + esp_timer_create(&args, &_sleep_timer); + + circuitpython_task = xTaskGetCurrentTaskHandle(); + // Send the ROM output out of the UART. This includes early logs. - esp_rom_install_channel_putc(1, esp_rom_uart_putc); + #ifdef DEBUG + ets_install_uart_printf(); #endif heap = NULL; never_reset_module_internal_pins(); + #if defined(DEBUG) + // debug UART + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif + + #if defined(DEBUG) || defined(ENABLE_JTAG) + // JTAG + common_hal_never_reset_pin(&pin_GPIO39); + common_hal_never_reset_pin(&pin_GPIO40); + common_hal_never_reset_pin(&pin_GPIO41); + common_hal_never_reset_pin(&pin_GPIO42); + #endif + #ifdef CONFIG_SPIRAM heap = (uint32_t*) (DRAM0_CACHE_ADDRESS_HIGH - CONFIG_SPIRAM_SIZE); heap_size = CONFIG_SPIRAM_SIZE / sizeof(uint32_t); @@ -104,11 +140,15 @@ safe_mode_t port_init(void) { } esp_reset_reason_t reason = esp_reset_reason(); - if (reason == ESP_RST_BROWNOUT) { - return BROWNOUT; - } - if (reason == ESP_RST_PANIC) { - return HARD_CRASH; + switch (reason) { + case ESP_RST_BROWNOUT: + return BROWNOUT; + case ESP_RST_PANIC: + case ESP_RST_INT_WDT: + case ESP_RST_WDT: + return HARD_CRASH; + default: + break; } return NO_SAFE_MODE; @@ -124,10 +164,18 @@ void reset_port(void) { analogout_reset(); #endif +#if CIRCUITPY_DUALBANK + dualbank_reset(); +#endif + #if CIRCUITPY_PS2IO ps2_reset(); #endif +#if CIRCUITPY_AUDIOBUSIO + i2s_reset(); +#endif + #if CIRCUITPY_PULSEIO esp32s2_peripherals_rmt_reset(); pulsein_reset(); @@ -165,7 +213,7 @@ void reset_port(void) { #endif #if CIRCUITPY_TOUCHIO_USE_NATIVE - touchin_reset(); + peripherals_touch_reset(); #endif #if CIRCUITPY_WATCHDOG @@ -252,32 +300,28 @@ void port_enable_tick(void) { // Disable 1/1024 second tick. void port_disable_tick(void) { esp_timer_stop(_tick_timer); - - // CircuitPython's VM is run in a separate FreeRTOS task from TinyUSB. - // Tick disable can happen via auto-reload so poke the main task here. - if (sleeping_circuitpython_task != NULL) { - xTaskNotifyGive(sleeping_circuitpython_task); - } } -TickType_t sleep_time_duration; +void port_wake_main_task() { + xTaskNotifyGive(circuitpython_task); +} + +void sleep_timer_cb(void* arg) { + port_wake_main_task(); +} void port_interrupt_after_ticks(uint32_t ticks) { - sleep_time_duration = (ticks * 100)/1024; + uint64_t timeout_us = ticks * 1000000ull / 1024; + if (esp_timer_start_once(_sleep_timer, timeout_us) != ESP_OK) { + esp_timer_stop(_sleep_timer); + esp_timer_start_once(_sleep_timer, timeout_us); + } } +// On the ESP we use FreeRTOS notifications instead of interrupts so this is a +// bit of a misnomer. void port_idle_until_interrupt(void) { - uint32_t notify_value = 0; - - if (sleep_time_duration == 0) { - return; - } - sleeping_circuitpython_task = xTaskGetCurrentTaskHandle(); - xTaskNotifyWait(0x01, 0x01, ¬ify_value, sleep_time_duration ); - sleeping_circuitpython_task = NULL; - if (notify_value == 1) { - mp_handle_pending(); - } + xTaskNotifyWait(0x01, 0x01, NULL, portMAX_DELAY); } // Wrap main in app_main that the IDF expects. diff --git a/ports/esp32s2/supervisor/usb.c b/ports/esp32s2/supervisor/usb.c index 2bfcdfb125..16657d4079 100644 --- a/ports/esp32s2/supervisor/usb.c +++ b/ports/esp32s2/supervisor/usb.c @@ -26,6 +26,7 @@ */ #include "supervisor/usb.h" +#include "supervisor/esp_port.h" #include "lib/utils/interrupt_char.h" #include "lib/mp-readline/readline.h" @@ -33,8 +34,7 @@ #include "components/driver/include/driver/periph_ctrl.h" #include "components/driver/include/driver/gpio.h" #include "components/esp_rom/include/esp32s2/rom/gpio.h" -#include "components/esp_rom/include/esp_rom_gpio.h" -#include "components/hal/esp32s2/include/hal/gpio_ll.h" +#include "components/soc/src/esp32s2/include/hal/gpio_ll.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" @@ -52,8 +52,6 @@ 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) @@ -78,23 +76,20 @@ static void configure_pins (usb_hal_context_t *usb) * Introduce additional parameters in usb_hal_context_t when adding support * for USB Host. */ - for ( const usb_iopin_dsc_t *iopin = usb_periph_iopins; iopin->pin != -1; ++iopin ) { - if ( (usb->use_external_phy) || (iopin->ext_phy_only == 0) ) { - esp_rom_gpio_pad_select_gpio(iopin->pin); - if ( iopin->is_output ) { - esp_rom_gpio_connect_out_signal(iopin->pin, iopin->func, false, false); + for (const usb_iopin_dsc_t* iopin = usb_periph_iopins; iopin->pin != -1; ++iopin) { + if ((usb->use_external_phy) || (iopin->ext_phy_only == 0)) { + gpio_pad_select_gpio(iopin->pin); + if (iopin->is_output) { + gpio_matrix_out(iopin->pin, iopin->func, false, false); + } else { + gpio_matrix_in(iopin->pin, iopin->func, false); + gpio_pad_input_enable(iopin->pin); } - else { - esp_rom_gpio_connect_in_signal(iopin->pin, iopin->func, false); - if ( (iopin->pin != GPIO_FUNC_IN_LOW) && (iopin->pin != GPIO_FUNC_IN_HIGH) ) { - gpio_ll_input_enable(&GPIO, iopin->pin); - } - } - esp_rom_gpio_pad_unhold(iopin->pin); + gpio_pad_unhold(iopin->pin); } } - if ( !usb->use_external_phy ) { - gpio_set_drive_capability(USBPHY_DM_NUM, GPIO_DRIVE_CAP_3); + if (!usb->use_external_phy) { + gpio_set_drive_capability(USBPHY_DP_NUM, GPIO_DRIVE_CAP_3); gpio_set_drive_capability(USBPHY_DP_NUM, GPIO_DRIVE_CAP_3); } } @@ -131,8 +126,6 @@ void tud_cdc_rx_wanted_cb(uint8_t itf, char wanted_char) 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); - } + xTaskNotifyGive(circuitpython_task); } } diff --git a/ports/litex/boards/fomu/fomu-spi.ld b/ports/litex/boards/fomu/fomu-spi.ld index 9b6443c673..e7db25b0c5 100644 --- a/ports/litex/boards/fomu/fomu-spi.ld +++ b/ports/litex/boards/fomu/fomu-spi.ld @@ -51,6 +51,11 @@ SECTIONS *(.text.tu_edpt_dir) *(.text.tu_fifo_empty) *(.text.usbd_edpt_busy) + *(.text.usb_irq_handler) + *(.text.supervisor_tick) + *(.text.port_get_raw_ticks) + *(.text.__modsi3) + *(.text.__udivsi3) *(.text.irq_getmask) *(.text.irq_setmask) *(.text.irq_pending) diff --git a/ports/litex/common-hal/microcontroller/Pin.c b/ports/litex/common-hal/microcontroller/Pin.c index 38601e0d3c..4d088a0763 100644 --- a/ports/litex/common-hal/microcontroller/Pin.c +++ b/ports/litex/common-hal/microcontroller/Pin.c @@ -42,6 +42,9 @@ void reset_pin_number(uint8_t pin_port, uint8_t pin_number) { } void common_hal_reset_pin(const mcu_pin_obj_t* pin) { + if (pin == NULL) { + return; + } reset_pin_number(0, pin->number); } diff --git a/ports/litex/common-hal/microcontroller/__init__.c b/ports/litex/common-hal/microcontroller/__init__.c index 3c91661144..522a41e2e3 100644 --- a/ports/litex/common-hal/microcontroller/__init__.c +++ b/ports/litex/common-hal/microcontroller/__init__.c @@ -59,12 +59,15 @@ void common_hal_mcu_delay_us(uint32_t delay) { volatile uint32_t nesting_count = 0; +__attribute__((section(".ramtext"))) void common_hal_mcu_disable_interrupts(void) { - irq_setie(0); - // __DMB(); + if (nesting_count == 0) { + irq_setie(0); + } nesting_count++; } +__attribute__((section(".ramtext"))) void common_hal_mcu_enable_interrupts(void) { if (nesting_count == 0) { // This is very very bad because it means there was mismatched disable/enables so we diff --git a/ports/litex/mphalport.c b/ports/litex/mphalport.c index 862f163939..c7369dc050 100644 --- a/ports/litex/mphalport.c +++ b/ports/litex/mphalport.c @@ -44,16 +44,31 @@ void mp_hal_delay_us(mp_uint_t delay) { extern void SysTick_Handler(void); +// This value contains the number of times "common_hal_mcu_disable_interrupts()" +// has been called without calling "common_hal_mcu_enable_interrupts()". Since +// this is the interrupt handler, that means we're handling an interrupt, so +// this value should be `0`. +// +// Interrupts should already be disabled when this handler is running, which means +// this value is logically already `1`. If we didn't do this, then interrupts would +// be prematurely enabled by interrupt handlers that enable and disable interrupts. +extern volatile uint32_t nesting_count; + __attribute__((section(".ramtext"))) void isr(void) { uint8_t irqs = irq_pending() & irq_getmask(); + // Increase the "nesting count". Note: This should be going from 0 -> 1. + nesting_count += 1; #ifdef CFG_TUSB_MCU if (irqs & (1 << USB_INTERRUPT)) usb_irq_handler(); #endif if (irqs & (1 << TIMER0_INTERRUPT)) SysTick_Handler(); + + // Decrease the "nesting count". Note: This should be going from 1 -> 0. + nesting_count -= 1; } mp_uint_t cpu_get_regs_and_sp(mp_uint_t *regs) { diff --git a/ports/litex/supervisor/port.c b/ports/litex/supervisor/port.c index 4dea020652..04ff1c09bf 100644 --- a/ports/litex/supervisor/port.c +++ b/ports/litex/supervisor/port.c @@ -32,6 +32,8 @@ #include "irq.h" #include "csr.h" +#include "shared-bindings/microcontroller/__init__.h" + // Global millisecond tick count. 1024 per second because most RTCs are clocked with 32.768khz // crystals. volatile uint64_t raw_ticks = 0; @@ -129,9 +131,9 @@ uint32_t port_get_saved_word(void) { uint64_t port_get_raw_ticks(uint8_t* subticks) { // Reading 64 bits may take two loads, so turn of interrupts while we do it. - irq_setie(false); + common_hal_mcu_disable_interrupts(); uint64_t raw_tick_snapshot = raw_ticks; - irq_setie(true); + common_hal_mcu_enable_interrupts(); return raw_tick_snapshot; } diff --git a/ports/mimxrt10xx/boards/feather_m7_1011/mpconfigboard.h b/ports/mimxrt10xx/boards/feather_m7_1011/mpconfigboard.h index e96ec13dd9..e027e2b5ee 100644 --- a/ports/mimxrt10xx/boards/feather_m7_1011/mpconfigboard.h +++ b/ports/mimxrt10xx/boards/feather_m7_1011/mpconfigboard.h @@ -1,4 +1,4 @@ -#define MICROPY_HW_BOARD_NAME "Feather MIMXRT1011" +#define MICROPY_HW_BOARD_NAME "Adafruit Feather MIMXRT1011" #define MICROPY_HW_MCU_NAME "IMXRT1011DAE5A" #define MICROPY_HW_NEOPIXEL (&pin_GPIO_00) diff --git a/ports/mimxrt10xx/common-hal/busio/SPI.c b/ports/mimxrt10xx/common-hal/busio/SPI.c index 8fe1b799d6..ce7cbea7ec 100644 --- a/ports/mimxrt10xx/common-hal/busio/SPI.c +++ b/ports/mimxrt10xx/common-hal/busio/SPI.c @@ -220,12 +220,9 @@ void common_hal_busio_spi_deinit(busio_spi_obj_t *self) { never_reset_spi[self->clock->bank_idx - 1] = false; common_hal_reset_pin(self->clock->pin); - if (self->mosi != NULL) { - common_hal_reset_pin(self->mosi->pin); - } - if (self->miso != NULL) { - common_hal_reset_pin(self->miso->pin); - } + common_hal_reset_pin(self->mosi->pin); + common_hal_reset_pin(self->miso->pin); + self->clock = NULL; self->mosi = NULL; self->miso = NULL; diff --git a/ports/mimxrt10xx/common-hal/busio/UART.c b/ports/mimxrt10xx/common-hal/busio/UART.c index db5582d150..03a6e8f3ef 100644 --- a/ports/mimxrt10xx/common-hal/busio/UART.c +++ b/ports/mimxrt10xx/common-hal/busio/UART.c @@ -295,12 +295,10 @@ void common_hal_busio_uart_deinit(busio_uart_obj_t *self) { LPUART_Deinit(self->uart); gc_free(self->ringbuf); - if (self->rx) { - common_hal_reset_pin(self->rx->pin); - } - if (self->tx) { - common_hal_reset_pin(self->tx->pin); - } + + common_hal_reset_pin(self->rx->pin); + common_hal_reset_pin(self->tx->pin); + self->rx = NULL; self->tx = NULL; diff --git a/ports/mimxrt10xx/common-hal/microcontroller/Pin.c b/ports/mimxrt10xx/common-hal/microcontroller/Pin.c index a005924e2f..50970f8e22 100644 --- a/ports/mimxrt10xx/common-hal/microcontroller/Pin.c +++ b/ports/mimxrt10xx/common-hal/microcontroller/Pin.c @@ -67,6 +67,9 @@ void reset_all_pins(void) { // Since i.MX pins need extra register and reset information to reset properly, // resetting pins by number alone has been removed. void common_hal_reset_pin(const mcu_pin_obj_t* pin) { + if (pin == NULL) { + return; + } never_reset_pins[pin->mux_idx] = false; claimed_pins[pin->mux_idx] = false; *(uint32_t*)pin->mux_reg = pin->mux_reset; diff --git a/ports/nrf/boards/bastble/README.md b/ports/nrf/boards/bastble/README.md new file mode 100644 index 0000000000..0af6209bdb --- /dev/null +++ b/ports/nrf/boards/bastble/README.md @@ -0,0 +1,4 @@ +# Electronic Cats BastBLE + +The [BastBLE](https://electroniccats.com/store/bast-ble/) based on Nordic nRF 52840 and containing +a powerful Cortex M4F. This board include a external memory QSPI flash. diff --git a/ports/nrf/boards/bastble/board.c b/ports/nrf/boards/bastble/board.c new file mode 100644 index 0000000000..b6fb04f06c --- /dev/null +++ b/ports/nrf/boards/bastble/board.c @@ -0,0 +1,41 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "nrf.h" +#include "nrf_rtc.h" + +void board_init(void) { + +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} diff --git a/ports/nrf/boards/bastble/mpconfigboard.h b/ports/nrf/boards/bastble/mpconfigboard.h new file mode 100644 index 0000000000..e36227c6bc --- /dev/null +++ b/ports/nrf/boards/bastble/mpconfigboard.h @@ -0,0 +1,25 @@ +#include "nrfx/hal/nrf_gpio.h" + +#define MICROPY_HW_BOARD_NAME "BastBLE" +#define MICROPY_HW_MCU_NAME "nRF52840" + +#define CIRCUITPY_AUTORELOAD_DELAY_MS 500 + +#if QSPI_FLASH_FILESYSTEM +#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 30) +#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 29) +#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 28) +#define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(0, 2) +#define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(0, 3) +#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 26) +#endif + +#define DEFAULT_I2C_BUS_SCL (&pin_P1_10) +#define DEFAULT_I2C_BUS_SDA (&pin_P1_11) + +#define DEFAULT_SPI_BUS_SCK (&pin_P1_00) +#define DEFAULT_SPI_BUS_MOSI (&pin_P1_06) +#define DEFAULT_SPI_BUS_MISO (&pin_P0_15) + +#define DEFAULT_UART_BUS_RX (&pin_P0_09) +#define DEFAULT_UART_BUS_TX (&pin_P0_10) diff --git a/ports/nrf/boards/bastble/mpconfigboard.mk b/ports/nrf/boards/bastble/mpconfigboard.mk new file mode 100644 index 0000000000..eca900de77 --- /dev/null +++ b/ports/nrf/boards/bastble/mpconfigboard.mk @@ -0,0 +1,10 @@ +USB_VID = 0x1209 +USB_PID = 0x805A +USB_PRODUCT = "BastBLE" +USB_MANUFACTURER = "ElectronicCats" + +MCU_CHIP = nrf52840 + +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICE_COUNT = 1 +EXTERNAL_FLASH_DEVICES = "GD25Q16C" diff --git a/ports/nrf/boards/bastble/pins.c b/ports/nrf/boards/bastble/pins.c new file mode 100644 index 0000000000..b35dad43de --- /dev/null +++ b/ports/nrf/boards/bastble/pins.c @@ -0,0 +1,47 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P1_10) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P1_00) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P1_02) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_P1_06) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_P0_15) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_P1_09) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P0_07) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_P0_03) }, + + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_P0_30) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P1_11) }, + + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P1_10) }, + + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P1_06) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_15) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P1_00) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_24) }, + + { MP_ROM_QSTR(MP_QSTR_AREF), MP_ROM_PTR(&pin_P0_31) }, + + // voltage sense battery + { MP_ROM_QSTR(MP_QSTR_VBAT), MP_ROM_PTR(&pin_P0_26) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P0_10) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P0_09) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { 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/nrf/boards/pca10100/mpconfigboard.mk b/ports/nrf/boards/pca10100/mpconfigboard.mk index 86ba654548..76d15e6081 100644 --- a/ports/nrf/boards/pca10100/mpconfigboard.mk +++ b/ports/nrf/boards/pca10100/mpconfigboard.mk @@ -15,6 +15,7 @@ CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FRAMEBUFFERIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_MSGPACK = 0 CIRCUITPY_NEOPIXEL_WRITE = 0 CIRCUITPY_NVM = 0 CIRCUITPY_PIXELBUF = 0 diff --git a/ports/nrf/boards/simmel/mpconfigboard.mk b/ports/nrf/boards/simmel/mpconfigboard.mk index dd6b1fbfdf..4eb6c98c7e 100644 --- a/ports/nrf/boards/simmel/mpconfigboard.mk +++ b/ports/nrf/boards/simmel/mpconfigboard.mk @@ -16,6 +16,7 @@ CIRCUITPY_AUDIOMP3 = 0 CIRCUITPY_BUSIO = 1 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_FRAMEBUFFERIO = 0 +CIRCUITPY_MSGPACK = 0 CIRCUITPY_GAMEPAD = 0 CIRCUITPY_NEOPIXEL_WRITE = 0 CIRCUITPY_NVM = 0 diff --git a/ports/nrf/common-hal/_bleio/Adapter.c b/ports/nrf/common-hal/_bleio/Adapter.c index 537f43f237..10794c16a8 100644 --- a/ports/nrf/common-hal/_bleio/Adapter.c +++ b/ports/nrf/common-hal/_bleio/Adapter.c @@ -469,16 +469,25 @@ mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t* ble_drv_add_event_handler(scan_on_ble_evt, self->scan_results); - uint32_t nrf_timeout = SEC_TO_UNITS(timeout, UNIT_10_MS); - if (timeout <= 0.0001) { + uint32_t nrf_timeout = SEC_TO_UNITS(timeout, UNIT_10_MS) + 0.5f; + if (nrf_timeout > UINT16_MAX) { + // 0xffff / 100 + mp_raise_ValueError(translate("timeout must be < 655.35 secs")); + } + if (nrf_timeout == 0 && timeout > 0.0f) { + // Make sure converted timeout is > 0 if original timeout is > 0. + mp_raise_ValueError(translate("non-zero timeout must be > 0.01")); + } + + if (nrf_timeout == 0) { nrf_timeout = BLE_GAP_SCAN_TIMEOUT_UNLIMITED; } ble_gap_scan_params_t scan_params = { .extended = extended, - .interval = SEC_TO_UNITS(interval, UNIT_0_625_MS), + .interval = SEC_TO_UNITS(interval, UNIT_0_625_MS) + 0.5f, .timeout = nrf_timeout, - .window = SEC_TO_UNITS(window, UNIT_0_625_MS), + .window = SEC_TO_UNITS(window, UNIT_0_625_MS) + 0.5f, .scan_phys = BLE_GAP_PHY_1MBPS, .active = active }; @@ -544,7 +553,7 @@ mp_obj_t common_hal_bleio_adapter_connect(bleio_adapter_obj_t *self, bleio_addre .window = MSEC_TO_UNITS(100, UNIT_0_625_MS), .scan_phys = BLE_GAP_PHY_1MBPS, // timeout of 0 means no timeout - .timeout = SEC_TO_UNITS(timeout, UNIT_10_MS), + .timeout = SEC_TO_UNITS(timeout, UNIT_10_MS) + 0.5f, }; ble_gap_conn_params_t conn_params = { @@ -687,7 +696,7 @@ uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, } ble_gap_adv_params_t adv_params = { - .interval = SEC_TO_UNITS(interval, UNIT_0_625_MS), + .interval = SEC_TO_UNITS(interval, UNIT_0_625_MS) + 0.5f, .properties.type = adv_type, .duration = SEC_TO_UNITS(timeout, UNIT_10_MS), .filter_policy = BLE_GAP_ADV_FP_ANY, diff --git a/ports/nrf/common-hal/microcontroller/Pin.c b/ports/nrf/common-hal/microcontroller/Pin.c index bc7ff831a5..23d6e23bfe 100644 --- a/ports/nrf/common-hal/microcontroller/Pin.c +++ b/ports/nrf/common-hal/microcontroller/Pin.c @@ -134,6 +134,9 @@ void common_hal_never_reset_pin(const mcu_pin_obj_t* pin) { } void common_hal_reset_pin(const mcu_pin_obj_t* pin) { + if (pin == NULL) { + return; + } reset_pin_number(pin->number); } diff --git a/ports/nrf/supervisor/port.c b/ports/nrf/supervisor/port.c index 00485d8588..78bb20ce6c 100644 --- a/ports/nrf/supervisor/port.c +++ b/ports/nrf/supervisor/port.c @@ -276,7 +276,7 @@ uint32_t port_get_saved_word(void) { uint64_t port_get_raw_ticks(uint8_t* subticks) { common_hal_mcu_disable_interrupts(); uint32_t rtc = nrfx_rtc_counter_get(&rtc_instance); - uint32_t overflow_count = overflow_tracker.overflowed_ticks; + uint64_t overflow_count = overflow_tracker.overflowed_ticks; common_hal_mcu_enable_interrupts(); if (subticks != NULL) { diff --git a/ports/stm/boards/feather_stm32f405_express/mpconfigboard.h b/ports/stm/boards/feather_stm32f405_express/mpconfigboard.h index 0d49748c84..e69be6cf95 100644 --- a/ports/stm/boards/feather_stm32f405_express/mpconfigboard.h +++ b/ports/stm/boards/feather_stm32f405_express/mpconfigboard.h @@ -26,7 +26,7 @@ //Micropython setup -#define MICROPY_HW_BOARD_NAME "Feather STM32F405 Express" +#define MICROPY_HW_BOARD_NAME "Adafruit Feather STM32F405 Express" #define MICROPY_HW_MCU_NAME "STM32F405RG" #define FLASH_SIZE (0x100000) diff --git a/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.h b/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.h index 83a8bded39..4351339540 100644 --- a/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.h +++ b/ports/stm/boards/stm32f411ce_blackpill/mpconfigboard.h @@ -42,6 +42,9 @@ // #define SPI_FLASH_SCK_PIN (&pin_PA05) // #define SPI_FLASH_CS_PIN (&pin_PA04) +#define DEFAULT_I2C_BUS_SCL (&pin_PB06) +#define DEFAULT_I2C_BUS_SDA (&pin_PB07) + #define CIRCUITPY_AUTORELOAD_DELAY_MS (500) #define BOARD_FLASH_SIZE (FLASH_SIZE - 0x2000 - 0xC000) diff --git a/ports/stm/boards/stm32f411ce_blackpill/pins.c b/ports/stm/boards/stm32f411ce_blackpill/pins.c index 2f8aab6e8e..16946b8bee 100644 --- a/ports/stm/boards/stm32f411ce_blackpill/pins.c +++ b/ports/stm/boards/stm32f411ce_blackpill/pins.c @@ -35,5 +35,10 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_C14), MP_ROM_PTR(&pin_PC14) }, { MP_ROM_QSTR(MP_QSTR_C13), MP_ROM_PTR(&pin_PC13) }, { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PC13) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PB07) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PB06) }, + + { 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/microcontroller/Pin.c b/ports/stm/common-hal/microcontroller/Pin.c index 0e333c71cf..37c202d86e 100644 --- a/ports/stm/common-hal/microcontroller/Pin.c +++ b/ports/stm/common-hal/microcontroller/Pin.c @@ -125,6 +125,9 @@ void common_hal_never_reset_pin(const mcu_pin_obj_t* pin) { } void common_hal_reset_pin(const mcu_pin_obj_t* pin) { + if (pin == NULL) { + return; + } reset_pin_number(pin->port, pin->number); } diff --git a/ports/unix/mphalport.h b/ports/unix/mphalport.h index 6f2880d4ef..4e459ffca5 100644 --- a/ports/unix/mphalport.h +++ b/ports/unix/mphalport.h @@ -24,12 +24,14 @@ * THE SOFTWARE. */ #include +#include #ifndef CHAR_CTRL_C #define CHAR_CTRL_C (3) #endif void mp_hal_set_interrupt_char(char c); +bool mp_hal_is_interrupted(void); void mp_hal_stdio_mode_raw(void); void mp_hal_stdio_mode_orig(void); diff --git a/ports/unix/unix_mphal.c b/ports/unix/unix_mphal.c index e9494d7ff2..77deb3152f 100644 --- a/ports/unix/unix_mphal.c +++ b/ports/unix/unix_mphal.c @@ -81,6 +81,10 @@ void mp_hal_set_interrupt_char(char c) { } } +bool mp_hal_is_interrupted(void) { + return false; +} + #if MICROPY_USE_READLINE == 1 #include diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index 1eafce2595..21bd5b9658 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -58,6 +58,14 @@ BASE_CFLAGS = \ # -H +# Set a global CIRCUITPY_DEBUG flag. +# Don't just call it "DEBUG": too many libraries use plain DEBUG. +ifneq ($(DEBUG),) +CFLAGS += -DCIRCUITPY_DEBUG=$(DEBUG) +else +CFLAGS += -DCIRCUITPY_DEBUG=0 +endif + ### # Handle frozen modules. @@ -205,6 +213,9 @@ endif ifeq ($(CIRCUITPY_OS),1) SRC_PATTERNS += os/% endif +ifeq ($(CIRCUITPY_DUALBANK),1) +SRC_PATTERNS += dualbank/% +endif ifeq ($(CIRCUITPY_PIXELBUF),1) SRC_PATTERNS += _pixelbuf/% endif @@ -289,6 +300,9 @@ endif ifeq ($(CIRCUITPY_PEW),1) SRC_PATTERNS += _pew/% endif +ifeq ($(CIRCUITPY_MSGPACK),1) +SRC_PATTERNS += msgpack/% +endif # All possible sources are listed here, and are filtered by SRC_PATTERNS in SRC_COMMON_HAL SRC_COMMON_HAL_ALL = \ @@ -308,6 +322,7 @@ SRC_COMMON_HAL_ALL = \ alarm/__init__.c \ alarm/pin/PinAlarm.c \ alarm/time/TimeAlarm.c \ + alarm/touch/TouchAlarm.c \ analogio/AnalogIn.c \ analogio/AnalogOut.c \ analogio/__init__.c \ @@ -348,6 +363,7 @@ SRC_COMMON_HAL_ALL = \ nvm/ByteArray.c \ nvm/__init__.c \ os/__init__.c \ + dualbank/__init__.c \ ps2io/Ps2.c \ ps2io/__init__.c \ pulseio/PulseIn.c \ @@ -407,6 +423,8 @@ $(filter $(SRC_PATTERNS), \ math/__init__.c \ microcontroller/ResetReason.c \ microcontroller/RunMode.c \ + msgpack/__init__.c \ + msgpack/ExtType.c \ supervisor/RunReason.c \ ) @@ -476,6 +494,7 @@ SRC_SHARED_MODULE_ALL = \ memorymonitor/AllocationAlarm.c \ memorymonitor/AllocationSize.c \ network/__init__.c \ + msgpack/__init__.c \ os/__init__.c \ random/__init__.c \ rgbmatrix/RGBMatrix.c \ diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 0bd889ccdf..a3411b7adb 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -539,6 +539,13 @@ extern const struct _mp_obj_module_t os_module; #define OS_MODULE_ALT_NAME #endif +#if CIRCUITPY_DUALBANK +extern const struct _mp_obj_module_t dualbank_module; +#define DUALBANK_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_dualbank), (mp_obj_t)&dualbank_module }, +#else +#define DUALBANK_MODULE +#endif + #if CIRCUITPY_PEW extern const struct _mp_obj_module_t pew_module; #define PEW_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR__pew),(mp_obj_t)&pew_module }, @@ -767,6 +774,13 @@ extern const struct _mp_obj_module_t wifi_module; #define WIFI_MODULE #endif +#if CIRCUITPY_MSGPACK +extern const struct _mp_obj_module_t msgpack_module; +#define MSGPACK_MODULE { MP_ROM_QSTR(MP_QSTR_msgpack), MP_ROM_PTR(&msgpack_module) }, +#else +#define MSGPACK_MODULE +#endif + // Define certain native modules with weak links so they can be replaced with Python // implementations. This list may grow over time. #define MICROPY_PORT_BUILTIN_MODULE_WEAK_LINKS \ @@ -823,10 +837,12 @@ extern const struct _mp_obj_module_t wifi_module; _EVE_MODULE \ MEMORYMONITOR_MODULE \ MICROCONTROLLER_MODULE \ + MSGPACK_MODULE \ NEOPIXEL_WRITE_MODULE \ NETWORK_MODULE \ SOCKET_MODULE \ WIZNET_MODULE \ + DUALBANK_MODULE \ PEW_MODULE \ PIXELBUF_MODULE \ PS2IO_MODULE \ diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 370f133739..d0145a90f3 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -55,6 +55,10 @@ CFLAGS += -DCIRCUITPY_AUDIOBUSIO=$(CIRCUITPY_AUDIOBUSIO) CIRCUITPY_AUDIOBUSIO_I2SOUT ?= $(CIRCUITPY_AUDIOBUSIO) CFLAGS += -DCIRCUITPY_AUDIOBUSIO_I2SOUT=$(CIRCUITPY_AUDIOBUSIO_I2SOUT) +# Likewise, some boards have I2SOut but do not implement PDMIn. +CIRCUITPY_AUDIOBUSIO_PDMIN ?= $(CIRCUITPY_AUDIOBUSIO) +CFLAGS += -DCIRCUITPY_AUDIOBUSIO_PDMIN=$(CIRCUITPY_AUDIOBUSIO_PDMIN) + CIRCUITPY_AUDIOIO ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_AUDIOIO=$(CIRCUITPY_AUDIOIO) @@ -96,7 +100,7 @@ CFLAGS += -DCIRCUITPY_BLEIO=$(CIRCUITPY_BLEIO) CIRCUITPY_BOARD ?= 1 CFLAGS += -DCIRCUITPY_BOARD=$(CIRCUITPY_BOARD) -CIRCUITPY_BUSDEVICE ?= $(CIRCUITPY_FULL_BUILD) +CIRCUITPY_BUSDEVICE = 0 CFLAGS += -DCIRCUITPY_BUSDEVICE=$(CIRCUITPY_BUSDEVICE) CIRCUITPY_BUILTINS_POW3 ?= $(CIRCUITPY_FULL_BUILD) @@ -179,6 +183,9 @@ CFLAGS += -DCIRCUITPY_NVM=$(CIRCUITPY_NVM) CIRCUITPY_OS ?= 1 CFLAGS += -DCIRCUITPY_OS=$(CIRCUITPY_OS) +CIRCUITPY_DUALBANK ?= 0 +CFLAGS += -DCIRCUITPY_DUALBANK=$(CIRCUITPY_DUALBANK) + CIRCUITPY_PIXELBUF ?= $(CIRCUITPY_FULL_BUILD) CFLAGS += -DCIRCUITPY_PIXELBUF=$(CIRCUITPY_PIXELBUF) @@ -305,3 +312,6 @@ CFLAGS += -DCIRCUITPY_WIFI=$(CIRCUITPY_WIFI) # Enabled micropython.native decorator (experimental) CIRCUITPY_ENABLE_MPY_NATIVE ?= 0 CFLAGS += -DCIRCUITPY_ENABLE_MPY_NATIVE=$(CIRCUITPY_ENABLE_MPY_NATIVE) + +CIRCUITPY_MSGPACK ?= $(CIRCUITPY_FULL_BUILD) +CFLAGS += -DCIRCUITPY_MSGPACK=$(CIRCUITPY_MSGPACK) diff --git a/py/obj.c b/py/obj.c index b6462641ce..5f19089e85 100644 --- a/py/obj.c +++ b/py/obj.c @@ -29,6 +29,7 @@ #include #include +#include "lib/utils/interrupt_char.h" #include "py/obj.h" #include "py/objtype.h" #include "py/objint.h" @@ -67,7 +68,12 @@ void mp_obj_print_helper(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t #ifdef RUN_BACKGROUND_TASKS RUN_BACKGROUND_TASKS; #endif - mp_handle_pending(); + #if MICROPY_KBD_EXCEPTION + // Stop printing if we've been interrupted. + if (mp_hal_is_interrupted()) { + return; + } + #endif #ifndef NDEBUG if (o_in == MP_OBJ_NULL) { diff --git a/py/vm.c b/py/vm.c index 9b3354b096..13a9980aad 100644 --- a/py/vm.c +++ b/py/vm.c @@ -1015,7 +1015,7 @@ unwind_jump:; } #endif SET_TOP(mp_call_method_n_kw(unum & 0xff, (unum >> 8) & 0xff, sp)); - DISPATCH(); + DISPATCH_WITH_PEND_EXC_CHECK(); } ENTRY(MP_BC_CALL_METHOD_VAR_KW): { diff --git a/shared-bindings/_bleio/Adapter.c b/shared-bindings/_bleio/Adapter.c index 682177093d..81277fd701 100644 --- a/shared-bindings/_bleio/Adapter.c +++ b/shared-bindings/_bleio/Adapter.c @@ -33,8 +33,8 @@ #include "shared-bindings/_bleio/Address.h" #include "shared-bindings/_bleio/Adapter.h" -#define ADV_INTERVAL_MIN (0.0020f) -#define ADV_INTERVAL_MIN_STRING "0.0020" +#define ADV_INTERVAL_MIN (0.02f) +#define ADV_INTERVAL_MIN_STRING "0.02" #define ADV_INTERVAL_MAX (10.24f) #define ADV_INTERVAL_MAX_STRING "10.24" // 20ms is recommended by Apple @@ -204,7 +204,7 @@ const mp_obj_property_t bleio_adapter_name_obj = { //| :param ~_typing.ReadableBuffer scan_response: scan response data packet bytes. ``None`` if no scan response is needed. //| :param bool connectable: If `True` then other devices are allowed to connect to this peripheral. //| :param bool anonymous: If `True` then this device's MAC address is randomized before advertising. -//| :param int timeout: If set, we will only advertise for this many seconds. +//| :param int timeout: If set, we will only advertise for this many seconds. Zero means no timeout. //| :param float interval: advertising interval, in seconds""" //| ... //| @@ -237,7 +237,7 @@ STATIC mp_obj_t bleio_adapter_start_advertising(mp_uint_t n_args, const mp_obj_t args[ARG_interval].u_obj = mp_obj_new_float(ADV_INTERVAL_DEFAULT); } - const mp_float_t interval = mp_obj_float_get(args[ARG_interval].u_obj); + const mp_float_t interval = mp_obj_get_float(args[ARG_interval].u_obj); if (interval < ADV_INTERVAL_MIN || interval > ADV_INTERVAL_MAX) { mp_raise_ValueError_varg(translate("interval must be in range %s-%s"), ADV_INTERVAL_MIN_STRING, ADV_INTERVAL_MAX_STRING); @@ -279,7 +279,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_stop_advertising_obj, bleio_adapt //| ignored. Format is one byte for length (n) and n bytes of prefix and can be repeated. //| :param int buffer_size: the maximum number of advertising bytes to buffer. //| :param bool extended: When True, support extended advertising packets. Increasing buffer_size is recommended when this is set. -//| :param float timeout: the scan timeout in seconds. If None, will scan until `stop_scan` is called. +//| :param float timeout: the scan timeout in seconds. If None or zero, will scan until `stop_scan` is called. //| :param float interval: the interval (in seconds) between the start of two consecutive scan windows //| Must be in the range 0.0025 - 40.959375 seconds. //| :param float window: the duration (in seconds) to scan a single BLE channel. @@ -307,7 +307,7 @@ STATIC mp_obj_t bleio_adapter_start_scan(size_t n_args, const mp_obj_t *pos_args mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - mp_float_t timeout = 0; + mp_float_t timeout = 0.0f; if (args[ARG_timeout].u_obj != mp_const_none) { timeout = mp_obj_get_float(args[ARG_timeout].u_obj); } @@ -320,12 +320,19 @@ STATIC mp_obj_t bleio_adapter_start_scan(size_t n_args, const mp_obj_t *pos_args args[ARG_window].u_obj = mp_obj_new_float(WINDOW_DEFAULT); } - const mp_float_t interval = mp_obj_float_get(args[ARG_interval].u_obj); + const mp_float_t interval = mp_obj_get_float(args[ARG_interval].u_obj); if (interval < INTERVAL_MIN || interval > INTERVAL_MAX) { mp_raise_ValueError_varg(translate("interval must be in range %s-%s"), INTERVAL_MIN_STRING, INTERVAL_MAX_STRING); } - const mp_float_t window = mp_obj_float_get(args[ARG_window].u_obj); +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wfloat-equal" + if (timeout != 0.0f && timeout < interval) { + mp_raise_ValueError(translate("non-zero timeout must be >= interval")); + } +#pragma GCC diagnostic pop + + const mp_float_t window = mp_obj_get_float(args[ARG_window].u_obj); if (window > interval) { mp_raise_ValueError(translate("window must be <= interval")); } diff --git a/shared-bindings/_bleio/Characteristic.c b/shared-bindings/_bleio/Characteristic.c index 5e384a44ca..a0751b7e34 100644 --- a/shared-bindings/_bleio/Characteristic.c +++ b/shared-bindings/_bleio/Characteristic.c @@ -110,8 +110,8 @@ STATIC mp_obj_t bleio_characteristic_add_to_service(size_t n_args, const mp_obj_ common_hal_bleio_attribute_security_mode_check_valid(write_perm); const mp_int_t max_length_int = args[ARG_max_length].u_int; - if (max_length_int <= 0) { - mp_raise_ValueError(translate("max_length must be > 0")); + if (max_length_int < 0) { + mp_raise_ValueError(translate("max_length must be >= 0")); } const size_t max_length = (size_t) max_length_int; const bool fixed_length = args[ARG_fixed_length].u_bool; diff --git a/shared-bindings/_bleio/Descriptor.c b/shared-bindings/_bleio/Descriptor.c index c313007c6d..60f0acf44b 100644 --- a/shared-bindings/_bleio/Descriptor.c +++ b/shared-bindings/_bleio/Descriptor.c @@ -101,8 +101,8 @@ STATIC mp_obj_t bleio_descriptor_add_to_characteristic(size_t n_args, const mp_o common_hal_bleio_attribute_security_mode_check_valid(write_perm); const mp_int_t max_length_int = args[ARG_max_length].u_int; - if (max_length_int <= 0) { - mp_raise_ValueError(translate("max_length must be > 0")); + if (max_length_int < 0) { + mp_raise_ValueError(translate("max_length must be >= 0")); } const size_t max_length = (size_t) max_length_int; const bool fixed_length = args[ARG_fixed_length].u_bool; diff --git a/shared-bindings/_pixelbuf/PixelBuf.c b/shared-bindings/_pixelbuf/PixelBuf.c index 88e8aa8010..a4b5b5b1b3 100644 --- a/shared-bindings/_pixelbuf/PixelBuf.c +++ b/shared-bindings/_pixelbuf/PixelBuf.c @@ -185,7 +185,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(pixelbuf_pixelbuf_get_brightness_obj, pixelbuf_pixelbu STATIC mp_obj_t pixelbuf_pixelbuf_obj_set_brightness(mp_obj_t self_in, mp_obj_t value) { - mp_float_t brightness = mp_obj_float_get(value); + mp_float_t brightness = mp_obj_get_float(value); if (brightness > 1) { brightness = 1; } else if (brightness < 0) { diff --git a/shared-bindings/_pixelbuf/__init__.c b/shared-bindings/_pixelbuf/__init__.c index c61acc939f..fdd02509c8 100644 --- a/shared-bindings/_pixelbuf/__init__.c +++ b/shared-bindings/_pixelbuf/__init__.c @@ -51,7 +51,7 @@ //| STATIC mp_obj_t pixelbuf_colorwheel(mp_obj_t n) { - return MP_OBJ_NEW_SMALL_INT(colorwheel(MP_OBJ_IS_SMALL_INT(n) ? MP_OBJ_SMALL_INT_VALUE(n) : mp_obj_float_get(n))); + return MP_OBJ_NEW_SMALL_INT(colorwheel(MP_OBJ_IS_SMALL_INT(n) ? MP_OBJ_SMALL_INT_VALUE(n) : mp_obj_get_float(n))); } STATIC MP_DEFINE_CONST_FUN_OBJ_1(pixelbuf_colorwheel_obj, pixelbuf_colorwheel); diff --git a/shared-bindings/alarm/SleepMemory.c b/shared-bindings/alarm/SleepMemory.c index bec0b76658..aed24827ad 100644 --- a/shared-bindings/alarm/SleepMemory.c +++ b/shared-bindings/alarm/SleepMemory.c @@ -53,6 +53,25 @@ //| """Not used. Access the sole instance through `alarm.sleep_memory`.""" //| ... //| +//| def __bool__(self) -> bool: +//| """``sleep_memory`` is ``True`` if its length is greater than zero. +//| This is an easy way to check for its existence. +//| """ +//| ... +//| +//| def __len__(self) -> int: +//| """Return the length. This is used by (`len`)""" +//| ... +//| +STATIC mp_obj_t alarm_sleep_memory_unary_op(mp_unary_op_t op, mp_obj_t self_in) { + alarm_sleep_memory_obj_t *self = MP_OBJ_TO_PTR(self_in); + uint16_t len = common_hal_alarm_sleep_memory_get_length(self); + switch (op) { + case MP_UNARY_OP_BOOL: return mp_obj_new_bool(len != 0); + case MP_UNARY_OP_LEN: return MP_OBJ_NEW_SMALL_INT(len); + default: return MP_OBJ_NULL; // op not supported + } +} STATIC const mp_rom_map_elem_t alarm_sleep_memory_locals_dict_table[] = { }; @@ -154,6 +173,7 @@ const mp_obj_type_t alarm_sleep_memory_type = { { &mp_type_type }, .name = MP_QSTR_SleepMemory, .subscr = alarm_sleep_memory_subscr, + .unary_op = alarm_sleep_memory_unary_op, .print = NULL, .locals_dict = (mp_obj_t)&alarm_sleep_memory_locals_dict, }; diff --git a/shared-bindings/alarm/__init__.c b/shared-bindings/alarm/__init__.c index 700fe020ea..7023c70e5d 100644 --- a/shared-bindings/alarm/__init__.c +++ b/shared-bindings/alarm/__init__.c @@ -32,6 +32,7 @@ #include "shared-bindings/alarm/SleepMemory.h" #include "shared-bindings/alarm/pin/PinAlarm.h" #include "shared-bindings/alarm/time/TimeAlarm.h" +#include "shared-bindings/alarm/touch/TouchAlarm.h" #include "shared-bindings/supervisor/Runtime.h" #include "shared-bindings/time/__init__.h" #include "supervisor/shared/autoreload.h" @@ -71,8 +72,9 @@ void validate_objs_are_alarms(size_t n_args, const mp_obj_t *objs) { for (size_t i = 0; i < n_args; i++) { - if (MP_OBJ_IS_TYPE(objs[i], &alarm_pin_pin_alarm_type) || - MP_OBJ_IS_TYPE(objs[i], &alarm_time_time_alarm_type)) { + if (MP_OBJ_IS_TYPE(objs[i], &alarm_pin_pinalarm_type) || + MP_OBJ_IS_TYPE(objs[i], &alarm_time_timealarm_type) || + MP_OBJ_IS_TYPE(objs[i], &alarm_touch_touchalarm_type)) { continue; } mp_raise_TypeError_varg(translate("Expected an alarm")); @@ -159,7 +161,7 @@ MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(alarm_exit_and_deep_sleep_until_alarms_obj, STATIC const mp_map_elem_t alarm_pin_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_pin) }, - { MP_ROM_QSTR(MP_QSTR_PinAlarm), MP_OBJ_FROM_PTR(&alarm_pin_pin_alarm_type) }, + { MP_ROM_QSTR(MP_QSTR_PinAlarm), MP_OBJ_FROM_PTR(&alarm_pin_pinalarm_type) }, }; STATIC MP_DEFINE_CONST_DICT(alarm_pin_globals, alarm_pin_globals_table); @@ -172,7 +174,7 @@ STATIC const mp_obj_module_t alarm_pin_module = { STATIC const mp_map_elem_t alarm_time_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_time) }, - { MP_ROM_QSTR(MP_QSTR_TimeAlarm), MP_OBJ_FROM_PTR(&alarm_time_time_alarm_type) }, + { MP_ROM_QSTR(MP_QSTR_TimeAlarm), MP_OBJ_FROM_PTR(&alarm_time_timealarm_type) }, }; STATIC MP_DEFINE_CONST_DICT(alarm_time_globals, alarm_time_globals_table); @@ -182,6 +184,18 @@ STATIC const mp_obj_module_t alarm_time_module = { .globals = (mp_obj_dict_t*)&alarm_time_globals, }; +STATIC const mp_map_elem_t alarm_touch_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_touch) }, + { MP_ROM_QSTR(MP_QSTR_TouchAlarm), MP_OBJ_FROM_PTR(&alarm_touch_touchalarm_type) }, +}; + +STATIC MP_DEFINE_CONST_DICT(alarm_touch_globals, alarm_touch_globals_table); + +STATIC const mp_obj_module_t alarm_touch_module = { + .base = { &mp_type_module }, + .globals = (mp_obj_dict_t*)&alarm_touch_globals, +}; + // The module table is mutable because .wake_alarm is a mutable attribute. STATIC mp_map_elem_t alarm_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_alarm) }, @@ -195,27 +209,35 @@ STATIC mp_map_elem_t alarm_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_pin), MP_OBJ_FROM_PTR(&alarm_pin_module) }, { MP_ROM_QSTR(MP_QSTR_time), MP_OBJ_FROM_PTR(&alarm_time_module) }, + { MP_ROM_QSTR(MP_QSTR_touch), MP_OBJ_FROM_PTR(&alarm_touch_module) }, { MP_ROM_QSTR(MP_QSTR_SleepMemory), MP_OBJ_FROM_PTR(&alarm_sleep_memory_type) }, { MP_ROM_QSTR(MP_QSTR_sleep_memory), MP_OBJ_FROM_PTR(&alarm_sleep_memory_obj) }, }; STATIC MP_DEFINE_MUTABLE_DICT(alarm_module_globals, alarm_module_globals_table); -STATIC void alarm_set_wake_alarm(mp_obj_t alarm) { +// Fetch value from module dict. +mp_obj_t alarm_get_wake_alarm(void) { + mp_map_elem_t *elem = + mp_map_lookup(&alarm_module_globals.map, MP_ROM_QSTR(MP_QSTR_wake_alarm), MP_MAP_LOOKUP); + if (elem) { + return elem->value; + } else { + return NULL; + } +} + +// Initialize .wake_alarm value. +void alarm_save_wake_alarm(void) { // Equivalent of: // alarm.wake_alarm = alarm mp_map_elem_t *elem = mp_map_lookup(&alarm_module_globals.map, MP_ROM_QSTR(MP_QSTR_wake_alarm), MP_MAP_LOOKUP); if (elem) { - elem->value = alarm; + elem->value = common_hal_alarm_get_wake_alarm(); } } -// Initialize .wake_alarm value. -void alarm_save_wakeup_alarm(void) { - alarm_set_wake_alarm(common_hal_alarm_get_wake_alarm()); -} - const mp_obj_module_t alarm_module = { .base = { &mp_type_module }, .globals = (mp_obj_dict_t*)&alarm_module_globals, diff --git a/shared-bindings/alarm/__init__.h b/shared-bindings/alarm/__init__.h index 8c4b6cad96..154f91e265 100644 --- a/shared-bindings/alarm/__init__.h +++ b/shared-bindings/alarm/__init__.h @@ -43,13 +43,18 @@ extern void common_hal_alarm_set_deep_sleep_alarms(size_t n_alarms, const mp_obj // Deep sleep is entered outside of the VM so we omit the `common_hal_` prefix. extern NORETURN void alarm_enter_deep_sleep(void); +// Fetches value from module dict. +extern mp_obj_t alarm_get_wake_alarm(void); + +extern void common_hal_alarm_gc_collect(void); extern mp_obj_t common_hal_alarm_get_wake_alarm(void); // Used by wake-up code. -void alarm_save_wakeup_alarm(void); +void alarm_save_wake_alarm(void); // True if an alarm is alerting. This is most useful for pretend deep sleep. extern bool alarm_woken_from_sleep(void); + #endif // MICROPY_INCLUDED_SHARED_BINDINGS_ALARM___INIT___H diff --git a/shared-bindings/alarm/pin/PinAlarm.c b/shared-bindings/alarm/pin/PinAlarm.c index 7a5617142b..89de016bcc 100644 --- a/shared-bindings/alarm/pin/PinAlarm.c +++ b/shared-bindings/alarm/pin/PinAlarm.c @@ -60,9 +60,9 @@ //| """ //| ... //| -STATIC mp_obj_t alarm_pin_pin_alarm_make_new(const mp_obj_type_t *type, mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - alarm_pin_pin_alarm_obj_t *self = m_new_obj(alarm_pin_pin_alarm_obj_t); - self->base.type = &alarm_pin_pin_alarm_type; +STATIC mp_obj_t alarm_pin_pinalarm_make_new(const mp_obj_type_t *type, mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + alarm_pin_pinalarm_obj_t *self = m_new_obj(alarm_pin_pinalarm_obj_t); + self->base.type = &alarm_pin_pinalarm_type; enum { ARG_pin, ARG_value, ARG_edge, ARG_pull }; static const mp_arg_t allowed_args[] = { { MP_QSTR_pin, MP_ARG_REQUIRED | MP_ARG_OBJ }, @@ -75,7 +75,7 @@ STATIC mp_obj_t alarm_pin_pin_alarm_make_new(const mp_obj_type_t *type, mp_uint_ mcu_pin_obj_t *pin = validate_obj_is_free_pin(args[ARG_pin].u_obj); - common_hal_alarm_pin_pin_alarm_construct(self, + common_hal_alarm_pin_pinalarm_construct(self, pin, args[ARG_value].u_bool, args[ARG_edge].u_bool, @@ -87,15 +87,19 @@ STATIC mp_obj_t alarm_pin_pin_alarm_make_new(const mp_obj_type_t *type, mp_uint_ //| pin: microcontroller.Pin //| """The trigger pin.""" //| -STATIC mp_obj_t alarm_pin_pin_alarm_obj_get_pin(mp_obj_t self_in) { - alarm_pin_pin_alarm_obj_t *self = MP_OBJ_TO_PTR(self_in); - return common_hal_alarm_pin_pin_alarm_get_pin(self); +STATIC mp_obj_t alarm_pin_pinalarm_obj_get_pin(mp_obj_t self_in) { + alarm_pin_pinalarm_obj_t *self = MP_OBJ_TO_PTR(self_in); + mcu_pin_obj_t* pin = common_hal_alarm_pin_pinalarm_get_pin(self); + if (pin == NULL) { + return mp_const_none; + } + return MP_OBJ_FROM_PTR(pin); } -MP_DEFINE_CONST_FUN_OBJ_1(alarm_pin_pin_alarm_get_pin_obj, alarm_pin_pin_alarm_obj_get_pin); +MP_DEFINE_CONST_FUN_OBJ_1(alarm_pin_pinalarm_get_pin_obj, alarm_pin_pinalarm_obj_get_pin); -const mp_obj_property_t alarm_pin_pin_alarm_pin_obj = { +const mp_obj_property_t alarm_pin_pinalarm_pin_obj = { .base.type = &mp_type_property, - .proxy = {(mp_obj_t)&alarm_pin_pin_alarm_get_pin_obj, + .proxy = {(mp_obj_t)&alarm_pin_pinalarm_get_pin_obj, (mp_obj_t)&mp_const_none_obj, (mp_obj_t)&mp_const_none_obj}, }; @@ -103,29 +107,29 @@ const mp_obj_property_t alarm_pin_pin_alarm_pin_obj = { //| value: bool //| """The value on which to trigger.""" //| -STATIC mp_obj_t alarm_pin_pin_alarm_obj_get_value(mp_obj_t self_in) { - alarm_pin_pin_alarm_obj_t *self = MP_OBJ_TO_PTR(self_in); - return mp_obj_new_bool(common_hal_alarm_pin_pin_alarm_get_value(self)); +STATIC mp_obj_t alarm_pin_pinalarm_obj_get_value(mp_obj_t self_in) { + alarm_pin_pinalarm_obj_t *self = MP_OBJ_TO_PTR(self_in); + return mp_obj_new_bool(common_hal_alarm_pin_pinalarm_get_value(self)); } -MP_DEFINE_CONST_FUN_OBJ_1(alarm_pin_pin_alarm_get_value_obj, alarm_pin_pin_alarm_obj_get_value); +MP_DEFINE_CONST_FUN_OBJ_1(alarm_pin_pinalarm_get_value_obj, alarm_pin_pinalarm_obj_get_value); -const mp_obj_property_t alarm_pin_pin_alarm_value_obj = { +const mp_obj_property_t alarm_pin_pinalarm_value_obj = { .base.type = &mp_type_property, - .proxy = {(mp_obj_t)&alarm_pin_pin_alarm_get_value_obj, + .proxy = {(mp_obj_t)&alarm_pin_pinalarm_get_value_obj, (mp_obj_t)&mp_const_none_obj, (mp_obj_t)&mp_const_none_obj}, }; -STATIC const mp_rom_map_elem_t alarm_pin_pin_alarm_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_pin), MP_ROM_PTR(&alarm_pin_pin_alarm_pin_obj) }, - { MP_ROM_QSTR(MP_QSTR_value), MP_ROM_PTR(&alarm_pin_pin_alarm_value_obj) }, +STATIC const mp_rom_map_elem_t alarm_pin_pinalarm_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_pin), MP_ROM_PTR(&alarm_pin_pinalarm_pin_obj) }, + { MP_ROM_QSTR(MP_QSTR_value), MP_ROM_PTR(&alarm_pin_pinalarm_value_obj) }, }; -STATIC MP_DEFINE_CONST_DICT(alarm_pin_pin_alarm_locals_dict, alarm_pin_pin_alarm_locals_dict_table); +STATIC MP_DEFINE_CONST_DICT(alarm_pin_pinalarm_locals_dict, alarm_pin_pinalarm_locals_dict_table); -const mp_obj_type_t alarm_pin_pin_alarm_type = { +const mp_obj_type_t alarm_pin_pinalarm_type = { { &mp_type_type }, .name = MP_QSTR_PinAlarm, - .make_new = alarm_pin_pin_alarm_make_new, - .locals_dict = (mp_obj_t)&alarm_pin_pin_alarm_locals_dict, + .make_new = alarm_pin_pinalarm_make_new, + .locals_dict = (mp_obj_t)&alarm_pin_pinalarm_locals_dict, }; diff --git a/shared-bindings/alarm/pin/PinAlarm.h b/shared-bindings/alarm/pin/PinAlarm.h index 49ba710899..48865009c3 100644 --- a/shared-bindings/alarm/pin/PinAlarm.h +++ b/shared-bindings/alarm/pin/PinAlarm.h @@ -24,20 +24,20 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_PIN_PIN_ALARM_H -#define MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_PIN_PIN_ALARM_H +#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_PIN_PINALARM_H +#define MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_PIN_PINALARM_H #include "py/obj.h" #include "py/objtuple.h" #include "common-hal/microcontroller/Pin.h" #include "common-hal/alarm/pin/PinAlarm.h" -extern const mp_obj_type_t alarm_pin_pin_alarm_type; +extern const mp_obj_type_t alarm_pin_pinalarm_type; -void common_hal_alarm_pin_pin_alarm_construct(alarm_pin_pin_alarm_obj_t *self, mcu_pin_obj_t *pin, bool value, bool edge, bool pull); -extern mcu_pin_obj_t *common_hal_alarm_pin_pin_alarm_get_pin(alarm_pin_pin_alarm_obj_t *self); -extern bool common_hal_alarm_pin_pin_alarm_get_value(alarm_pin_pin_alarm_obj_t *self); -extern bool common_hal_alarm_pin_pin_alarm_get_edge(alarm_pin_pin_alarm_obj_t *self); -extern bool common_hal_alarm_pin_pin_alarm_get_pull(alarm_pin_pin_alarm_obj_t *self); +void common_hal_alarm_pin_pinalarm_construct(alarm_pin_pinalarm_obj_t *self, mcu_pin_obj_t *pin, bool value, bool edge, bool pull); +extern mcu_pin_obj_t *common_hal_alarm_pin_pinalarm_get_pin(alarm_pin_pinalarm_obj_t *self); +extern bool common_hal_alarm_pin_pinalarm_get_value(alarm_pin_pinalarm_obj_t *self); +extern bool common_hal_alarm_pin_pinalarm_get_edge(alarm_pin_pinalarm_obj_t *self); +extern bool common_hal_alarm_pin_pinalarm_get_pull(alarm_pin_pinalarm_obj_t *self); -#endif // MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_PIN_PIN_ALARM_H +#endif // MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_PIN_PINALARM_H diff --git a/shared-bindings/alarm/time/TimeAlarm.c b/shared-bindings/alarm/time/TimeAlarm.c index 1c4d976ada..1c9b8d37c5 100644 --- a/shared-bindings/alarm/time/TimeAlarm.c +++ b/shared-bindings/alarm/time/TimeAlarm.c @@ -56,10 +56,10 @@ mp_obj_t MP_WEAK rtc_get_time_source_time(void) { //| """ //| ... //| -STATIC mp_obj_t alarm_time_time_alarm_make_new(const mp_obj_type_t *type, +STATIC mp_obj_t alarm_time_timealarm_make_new(const mp_obj_type_t *type, mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { - alarm_time_time_alarm_obj_t *self = m_new_obj(alarm_time_time_alarm_obj_t); - self->base.type = &alarm_time_time_alarm_type; + alarm_time_timealarm_obj_t *self = m_new_obj(alarm_time_timealarm_obj_t); + self->base.type = &alarm_time_timealarm_type; enum { ARG_monotonic_time, ARG_epoch_time }; static const mp_arg_t allowed_args[] = { @@ -105,7 +105,7 @@ STATIC mp_obj_t alarm_time_time_alarm_make_new(const mp_obj_type_t *type, mp_raise_ValueError(translate("Time is in the past.")); } - common_hal_alarm_time_time_alarm_construct(self, monotonic_time); + common_hal_alarm_time_timealarm_construct(self, monotonic_time); return MP_OBJ_FROM_PTR(self); } @@ -116,28 +116,28 @@ STATIC mp_obj_t alarm_time_time_alarm_make_new(const mp_obj_type_t *type, //| by this property only as a `time.monotonic()` time. //| """ //| -STATIC mp_obj_t alarm_time_time_alarm_obj_get_monotonic_time(mp_obj_t self_in) { - alarm_time_time_alarm_obj_t *self = MP_OBJ_TO_PTR(self_in); - return mp_obj_new_float(common_hal_alarm_time_time_alarm_get_monotonic_time(self)); +STATIC mp_obj_t alarm_time_timealarm_obj_get_monotonic_time(mp_obj_t self_in) { + alarm_time_timealarm_obj_t *self = MP_OBJ_TO_PTR(self_in); + return mp_obj_new_float(common_hal_alarm_time_timealarm_get_monotonic_time(self)); } -MP_DEFINE_CONST_FUN_OBJ_1(alarm_time_time_alarm_get_monotonic_time_obj, alarm_time_time_alarm_obj_get_monotonic_time); +MP_DEFINE_CONST_FUN_OBJ_1(alarm_time_timealarm_get_monotonic_time_obj, alarm_time_timealarm_obj_get_monotonic_time); -const mp_obj_property_t alarm_time_time_alarm_monotonic_time_obj = { +const mp_obj_property_t alarm_time_timealarm_monotonic_time_obj = { .base.type = &mp_type_property, - .proxy = {(mp_obj_t)&alarm_time_time_alarm_get_monotonic_time_obj, + .proxy = {(mp_obj_t)&alarm_time_timealarm_get_monotonic_time_obj, (mp_obj_t)&mp_const_none_obj, (mp_obj_t)&mp_const_none_obj}, }; -STATIC const mp_rom_map_elem_t alarm_time_time_alarm_locals_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_monotonic_time), MP_ROM_PTR(&alarm_time_time_alarm_monotonic_time_obj) }, +STATIC const mp_rom_map_elem_t alarm_time_timealarm_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_monotonic_time), MP_ROM_PTR(&alarm_time_timealarm_monotonic_time_obj) }, }; -STATIC MP_DEFINE_CONST_DICT(alarm_time_time_alarm_locals_dict, alarm_time_time_alarm_locals_dict_table); +STATIC MP_DEFINE_CONST_DICT(alarm_time_timealarm_locals_dict, alarm_time_timealarm_locals_dict_table); -const mp_obj_type_t alarm_time_time_alarm_type = { +const mp_obj_type_t alarm_time_timealarm_type = { { &mp_type_type }, .name = MP_QSTR_TimeAlarm, - .make_new = alarm_time_time_alarm_make_new, - .locals_dict = (mp_obj_t)&alarm_time_time_alarm_locals_dict, + .make_new = alarm_time_timealarm_make_new, + .locals_dict = (mp_obj_t)&alarm_time_timealarm_locals_dict, }; diff --git a/shared-bindings/alarm/time/TimeAlarm.h b/shared-bindings/alarm/time/TimeAlarm.h index ceb3291c9d..0a4b9caf4a 100644 --- a/shared-bindings/alarm/time/TimeAlarm.h +++ b/shared-bindings/alarm/time/TimeAlarm.h @@ -24,16 +24,16 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_TIME_MONOTONIC_TIME_ALARM_H -#define MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_TIME_MONOTINIC_TIME_ALARM_H +#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_TIME_TIMEALARM_H +#define MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_TIME_TIMEALARM_H #include "py/obj.h" #include "common-hal/alarm/time/TimeAlarm.h" -extern const mp_obj_type_t alarm_time_time_alarm_type; +extern const mp_obj_type_t alarm_time_timealarm_type; -extern void common_hal_alarm_time_time_alarm_construct(alarm_time_time_alarm_obj_t *self, mp_float_t monotonic_time); -extern mp_float_t common_hal_alarm_time_time_alarm_get_monotonic_time(alarm_time_time_alarm_obj_t *self); +extern void common_hal_alarm_time_timealarm_construct(alarm_time_timealarm_obj_t *self, mp_float_t monotonic_time); +extern mp_float_t common_hal_alarm_time_timealarm_get_monotonic_time(alarm_time_timealarm_obj_t *self); -#endif // MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_TIME_MONOTONIC_TIME_ALARM_H +#endif // MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_TIME_TIMEALARM_H diff --git a/shared-bindings/alarm/touch/TouchAlarm.c b/shared-bindings/alarm/touch/TouchAlarm.c new file mode 100644 index 0000000000..4259b71bdf --- /dev/null +++ b/shared-bindings/alarm/touch/TouchAlarm.c @@ -0,0 +1,91 @@ +/* + * 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/alarm/touch/TouchAlarm.h" +#include "shared-bindings/board/__init__.h" + +#include "py/objproperty.h" + +//| class TouchAlarm: +//| """Trigger an alarm when touch is detected.""" +//| +//| def __init__(self, *pin: microcontroller.Pin) -> None: +//| """Create an alarm that will be triggered when the given pin is touched. +//| The alarm is not active until it is passed to an `alarm`-enabling function, such as +//| `alarm.light_sleep_until_alarms()` or `alarm.exit_and_deep_sleep_until_alarms()`. +//| +//| :param microcontroller.Pin pin: The pin to monitor. On some ports, the choice of pin +//| may be limited due to hardware restrictions, particularly for deep-sleep alarms. +//| """ +//| ... +//| +STATIC mp_obj_t alarm_touch_touchalarm_make_new(const mp_obj_type_t *type, + mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + alarm_touch_touchalarm_obj_t *self = m_new_obj(alarm_touch_touchalarm_obj_t); + self->base.type = &alarm_touch_touchalarm_type; + + enum { ARG_pin }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_pin, MP_ARG_REQUIRED | MP_ARG_OBJ }, + }; + + 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); + + const mcu_pin_obj_t *pin = validate_obj_is_free_pin(args[ARG_pin].u_obj); + + common_hal_alarm_touch_touchalarm_construct(self, pin); + + return MP_OBJ_FROM_PTR(self); +} + +//| pin: microcontroller.Pin +//| """The trigger pin.""" +//| +STATIC mp_obj_t alarm_touch_touchalarm_obj_get_pin(mp_obj_t self_in) { + alarm_touch_touchalarm_obj_t *self = MP_OBJ_TO_PTR(self_in); + return MP_OBJ_FROM_PTR(self->pin); +} +MP_DEFINE_CONST_FUN_OBJ_1(alarm_touch_touchalarm_get_pin_obj, alarm_touch_touchalarm_obj_get_pin); + +const mp_obj_property_t alarm_touch_touchalarm_pin_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&alarm_touch_touchalarm_get_pin_obj, + (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&mp_const_none_obj}, +}; + +STATIC const mp_rom_map_elem_t alarm_touch_touchalarm_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_pin), MP_ROM_PTR(&alarm_touch_touchalarm_pin_obj) }, +}; +STATIC MP_DEFINE_CONST_DICT(alarm_touch_touchalarm_locals_dict, alarm_touch_touchalarm_locals_dict_table); + +const mp_obj_type_t alarm_touch_touchalarm_type = { + { &mp_type_type }, + .name = MP_QSTR_TouchAlarm, + .make_new = alarm_touch_touchalarm_make_new, + .locals_dict = (mp_obj_t)&alarm_touch_touchalarm_locals_dict, +}; diff --git a/shared-bindings/alarm/touch/TouchAlarm.h b/shared-bindings/alarm/touch/TouchAlarm.h new file mode 100644 index 0000000000..1b70d4dae5 --- /dev/null +++ b/shared-bindings/alarm/touch/TouchAlarm.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_SHARED_BINDINGS_ALARM_TOUCH_TOUCHALARM_H +#define MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_TOUCH_TOUCHALARM_H + +#include "py/obj.h" +#include "py/runtime.h" + +#include "common-hal/microcontroller/Pin.h" +#include "common-hal/alarm/touch/TouchAlarm.h" + +extern const mp_obj_type_t alarm_touch_touchalarm_type; + +extern void common_hal_alarm_touch_touchalarm_construct(alarm_touch_touchalarm_obj_t *self, const mcu_pin_obj_t *pin); + +#endif // MICROPY_INCLUDED_SHARED_BINDINGS_ALARM_TOUCH_TOUCHALARM_H diff --git a/shared-bindings/audiobusio/PDMIn.c b/shared-bindings/audiobusio/PDMIn.c index 6c5fa79394..a3cc8b07e9 100644 --- a/shared-bindings/audiobusio/PDMIn.c +++ b/shared-bindings/audiobusio/PDMIn.c @@ -84,6 +84,9 @@ //| ... //| STATIC mp_obj_t audiobusio_pdmin_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { +#if !CIRCUITPY_AUDIOBUSIO_PDMIN + mp_raise_NotImplementedError(translate("PDMIn not available")); +#else enum { ARG_clock_pin, ARG_data_pin, ARG_sample_rate, ARG_bit_depth, ARG_mono, ARG_oversample, ARG_startup_delay }; static const mp_arg_t allowed_args[] = { { MP_QSTR_clock_pin, MP_ARG_REQUIRED | MP_ARG_OBJ }, @@ -132,8 +135,10 @@ STATIC mp_obj_t audiobusio_pdmin_make_new(const mp_obj_type_t *type, size_t n_ar mp_hal_delay_ms(startup_delay * 1000); return MP_OBJ_FROM_PTR(self); +#endif } +#if CIRCUITPY_AUDIOBUSIO_PDMIN //| def deinit(self) -> None: //| """Deinitialises the PDMIn and releases any hardware resources for reuse.""" //| ... @@ -237,10 +242,13 @@ STATIC const mp_rom_map_elem_t audiobusio_pdmin_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_sample_rate), MP_ROM_PTR(&audiobusio_pdmin_sample_rate_obj) } }; STATIC MP_DEFINE_CONST_DICT(audiobusio_pdmin_locals_dict, audiobusio_pdmin_locals_dict_table); +#endif const mp_obj_type_t audiobusio_pdmin_type = { { &mp_type_type }, .name = MP_QSTR_PDMIn, .make_new = audiobusio_pdmin_make_new, +#if CIRCUITPY_AUDIOBUSIO_PDMIN .locals_dict = (mp_obj_dict_t*)&audiobusio_pdmin_locals_dict, +#endif }; diff --git a/shared-bindings/audiobusio/PDMIn.h b/shared-bindings/audiobusio/PDMIn.h index c2a8bab2f8..e89fc7e232 100644 --- a/shared-bindings/audiobusio/PDMIn.h +++ b/shared-bindings/audiobusio/PDMIn.h @@ -33,6 +33,7 @@ extern const mp_obj_type_t audiobusio_pdmin_type; +#if CIRCUITPY_AUDIOBUSIO_PDMIN void common_hal_audiobusio_pdmin_construct(audiobusio_pdmin_obj_t* self, const mcu_pin_obj_t* clock_pin, const mcu_pin_obj_t* data_pin, uint32_t sample_rate, uint8_t bit_depth, bool mono, uint8_t oversample); @@ -43,5 +44,6 @@ uint32_t common_hal_audiobusio_pdmin_record_to_buffer(audiobusio_pdmin_obj_t* se uint8_t common_hal_audiobusio_pdmin_get_bit_depth(audiobusio_pdmin_obj_t* self); uint32_t common_hal_audiobusio_pdmin_get_sample_rate(audiobusio_pdmin_obj_t* self); // TODO(tannewt): Add record to file +#endif #endif // MICROPY_INCLUDED_SHARED_BINDINGS_AUDIOBUSIO_AUDIOOUT_H diff --git a/shared-bindings/dualbank/__init__.c b/shared-bindings/dualbank/__init__.c new file mode 100644 index 0000000000..8021ab18b9 --- /dev/null +++ b/shared-bindings/dualbank/__init__.c @@ -0,0 +1,115 @@ +/* + * This file is part of the Micro Python 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/dualbank/__init__.h" + +//| """DUALBANK Module +//| +//| The `dualbank` module adds ability to update and switch +//| between the two app partitions. +//| +//| There are two identical partitions, these contain different +//| firmware versions. +//| Having two partitions enables rollback functionality. +//| +//| The two partitions are defined as boot partition and +//| next-update partition. Calling `dualbank.flash()` writes +//| the next-update partition. +//| +//| After the next-update partition is written a validation +//| check is performed and on a successful validation this +//| partition is set as the boot partition. On next reset, +//| firmware will be loaded from this partition. +//| +//| Here is the sequence of commands to follow: +//| +//| .. code-block:: python +//| +//| import dualbank +//| +//| dualbank.flash(buffer, offset) +//| dualbank.switch() +//| """ +//| ... +//| + +//| def flash(*buffer: ReadableBuffer, offset: int=0) -> None: +//| """Writes one of two app partitions at the given offset. +//| +//| This can be called multiple times when flashing the firmware +//| in small chunks. +//| """ +//| ... +//| +STATIC mp_obj_t dualbank_flash(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_buffer, ARG_offset }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_buffer, MP_ARG_OBJ | MP_ARG_REQUIRED }, + { MP_QSTR_offset, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} }, + }; + + 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); + + if (args[ARG_offset].u_int < 0) { + mp_raise_ValueError(translate("offset must be >= 0")); + } + + mp_buffer_info_t bufinfo; + mp_get_buffer_raise(args[ARG_buffer].u_obj, &bufinfo, MP_BUFFER_READ); + + common_hal_dualbank_flash(bufinfo.buf, bufinfo.len, args[ARG_offset].u_int); + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_KW(dualbank_flash_obj, 0, dualbank_flash); + +//| def switch() -> None: +//| """Switches the boot partition. +//| +//| On next reset, firmware will be loaded from the partition +//| just switched over to. +//| """ +//| ... +//| +STATIC mp_obj_t dualbank_switch(void) { + common_hal_dualbank_switch(); + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_0(dualbank_switch_obj, dualbank_switch); + +STATIC const mp_rom_map_elem_t dualbank_module_globals_table[] = { + // module name + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_dualbank) }, + // module functions + { MP_ROM_QSTR(MP_QSTR_flash), MP_ROM_PTR(&dualbank_flash_obj) }, + { MP_ROM_QSTR(MP_QSTR_switch), MP_ROM_PTR(&dualbank_switch_obj) }, +}; +STATIC MP_DEFINE_CONST_DICT(dualbank_module_globals, dualbank_module_globals_table); + +const mp_obj_module_t dualbank_module = { + .base = { &mp_type_module }, + .globals = (mp_obj_dict_t*)&dualbank_module_globals, +}; diff --git a/shared-bindings/dualbank/__init__.h b/shared-bindings/dualbank/__init__.h new file mode 100644 index 0000000000..7edbc6d68a --- /dev/null +++ b/shared-bindings/dualbank/__init__.h @@ -0,0 +1,35 @@ +/* + * 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_SHARED_BINDINGS_DUALBANK___INIT___H +#define MICROPY_INCLUDED_SHARED_BINDINGS_DUALBANK___INIT___H + +#include "py/runtime.h" + +extern void common_hal_dualbank_switch(void); +extern void common_hal_dualbank_flash(const void *buf, const size_t len, const size_t offset); + +#endif // MICROPY_INCLUDED_SHARED_BINDINGS_DUALBANK___INIT___H diff --git a/shared-bindings/msgpack/ExtType.c b/shared-bindings/msgpack/ExtType.c new file mode 100644 index 0000000000..e9ddd32bce --- /dev/null +++ b/shared-bindings/msgpack/ExtType.c @@ -0,0 +1,126 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Bernhard Boser + * + * 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 "py/smallint.h" +#include "py/objproperty.h" +#include "shared-bindings/msgpack/ExtType.h" + +//| class ExtType: +//| """ExtType represents ext type in msgpack.""" +//| def __init__(self, code: int, data: bytes) -> None: +//| """Constructor +//| :param int code: type code in range 0~127. +//| :param bytes data: representation.""" +//| +STATIC mp_obj_t mod_msgpack_exttype_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + mod_msgpack_extype_obj_t *self = m_new_obj(mod_msgpack_extype_obj_t); + self->base.type = &mod_msgpack_exttype_type; + enum { ARG_code, ARG_data }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_code, MP_ARG_INT | MP_ARG_REQUIRED }, + { MP_QSTR_data, MP_ARG_OBJ | MP_ARG_REQUIRED }, + }; + 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); + + int code = args[ARG_code].u_int; + if (code < 0 || code > 127) { + mp_raise_AttributeError(translate("code outside range 0~127")); + } + self->code = code; + + mp_obj_t data = args[ARG_data].u_obj; + self->data = data; + return MP_OBJ_FROM_PTR(self); +} + + +//| code: int +//| """The type code, in range 0~127.""" +//| ... +//| +STATIC mp_obj_t mod_msgpack_exttype_get_code(mp_obj_t self_in) { + mod_msgpack_extype_obj_t *self = MP_OBJ_TO_PTR(self_in); + return MP_OBJ_NEW_SMALL_INT(self->code); +} +MP_DEFINE_CONST_FUN_OBJ_1(mod_msgpack_exttype_get_code_obj, mod_msgpack_exttype_get_code); + +STATIC mp_obj_t mod_msgpack_exttype_set_code(mp_obj_t self_in, mp_obj_t code_in) { + mod_msgpack_extype_obj_t *self = MP_OBJ_TO_PTR(self_in); + int code = mp_obj_get_int(code_in); + if (code < 0 || code > 127) { + mp_raise_AttributeError(translate("code outside range 0~127")); + } + self->code = code; + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_2(mod_msgpack_exttype_set_code_obj, mod_msgpack_exttype_set_code); + +const mp_obj_property_t mod_msgpack_exttype_code_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&mod_msgpack_exttype_get_code_obj, + (mp_obj_t)&mod_msgpack_exttype_set_code_obj, + (mp_obj_t)&mp_const_none_obj}, +}; + +//| data: bytes +//| """Data.""" +//| ... +//| +STATIC mp_obj_t mod_msgpack_exttype_get_data(mp_obj_t self_in) { + mod_msgpack_extype_obj_t *self = MP_OBJ_TO_PTR(self_in); + return self->data; +} +MP_DEFINE_CONST_FUN_OBJ_1(mod_msgpack_exttype_get_data_obj, mod_msgpack_exttype_get_data); + +STATIC mp_obj_t mod_msgpack_exttype_set_data(mp_obj_t self_in, mp_obj_t data_in) { + mod_msgpack_extype_obj_t *self = MP_OBJ_TO_PTR(self_in); + self->data = data_in; + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_2(mod_msgpack_exttype_set_data_obj, mod_msgpack_exttype_set_data); + +const mp_obj_property_t mod_msgpack_exttype_data_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&mod_msgpack_exttype_get_data_obj, + (mp_obj_t)&mod_msgpack_exttype_set_data_obj, + (mp_obj_t)&mp_const_none_obj}, +}; + +STATIC mp_rom_map_elem_t mod_msgpack_exttype_locals_dict_table[] = { + // Properties + { MP_ROM_QSTR(MP_QSTR_code), MP_ROM_PTR(&mod_msgpack_exttype_code_obj) }, + { MP_ROM_QSTR(MP_QSTR_data), MP_ROM_PTR(&mod_msgpack_exttype_data_obj) }, +}; +STATIC MP_DEFINE_CONST_DICT(mod_msgpack_exttype_locals_dict, mod_msgpack_exttype_locals_dict_table); + +const mp_obj_type_t mod_msgpack_exttype_type = { + { &mp_type_type }, + .name = MP_QSTR_ExtType, + .make_new = mod_msgpack_exttype_make_new, + .locals_dict = (mp_obj_dict_t*)&mod_msgpack_exttype_locals_dict, +}; diff --git a/shared-bindings/msgpack/ExtType.h b/shared-bindings/msgpack/ExtType.h new file mode 100644 index 0000000000..64173b2213 --- /dev/null +++ b/shared-bindings/msgpack/ExtType.h @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Bernhard Boser + * + * 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_SHARED_BINDINGS_MSGPACK_EXTTYPE___INIT___H +#define MICROPY_INCLUDED_SHARED_BINDINGS_MSGPACK_EXTTYPE___INIT___H + +#include "py/obj.h" + +typedef struct { + mp_obj_base_t base; + int32_t code; + mp_obj_t data; +} mod_msgpack_extype_obj_t; + +extern const mp_obj_type_t mod_msgpack_exttype_type; + +#endif // MICROPY_INCLUDED_SHARED_BINDINGS_MSGPACK_EXTTYPE___INIT___H diff --git a/shared-bindings/msgpack/__init__.c b/shared-bindings/msgpack/__init__.c new file mode 100644 index 0000000000..f5c47bb218 --- /dev/null +++ b/shared-bindings/msgpack/__init__.c @@ -0,0 +1,162 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Bernhard Boser + * + * 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 +#include "py/obj.h" +#include "py/runtime.h" +#include "shared-bindings/msgpack/__init__.h" +#include "shared-module/msgpack/__init__.h" +#include "shared-bindings/msgpack/ExtType.h" + +#define MP_OBJ_IS_METH(o) (MP_OBJ_IS_OBJ(o) && (((mp_obj_base_t*)MP_OBJ_TO_PTR(o))->type->name == MP_QSTR_bound_method)) + +//| """Pack object in msgpack format +//| +//| The msgpack format is similar to json, except that the encoded data is binary. +//| See https://msgpack.org for details. The module implements a subset of the cpython +//| module msgpack-python. +//| +//| Not implemented: 64-bit int, uint, float. +//| +//| Example 1:: +//| +//| import msgpack +//| from io import BytesIO +//| +//| b = BytesIO() +//| msgpack.pack({'list': [True, False, None, 1, 3.14], 'str': 'blah'}, b) +//| b.seek(0) +//| print(msgpack.unpack(b)) +//| +//| Example 2: handling objects:: +//| +//| from msgpack import pack, unpack, ExtType +//| from io import BytesIO +//| +//| class MyClass: +//| def __init__(self, val): +//| self.value = val +//| def __str__(self): +//| return str(self.value) +//| +//| data = MyClass(b'my_value') +//| +//| def encoder(obj): +//| if isinstance(obj, MyClass): +//| return ExtType(1, obj.value) +//| return f"no encoder for {obj}" +//| +//| def decoder(code, data): +//| if code == 1: +//| return MyClass(data) +//| return f"no decoder for type {code}" +//| +//| buffer = BytesIO() +//| pack(data, buffer, default=encoder) +//| buffer.seek(0) +//| decoded = unpack(buffer, ext_hook=decoder) +//| print(f"{data} -> {buffer.getvalue()} -> {decoded}") +//| +//| """ +//| + +//| def pack(obj: object, buffer: WriteableBuffer, *, default: Union[Callable[[object], None], None] = None) -> None: +//| """Ouput object to buffer in msgpack format. +//| +//| :param object obj: Object to convert to msgpack format. +//| :param ~_typing.WriteableBuffer buffer: buffer to write into +//| :param Optional[~_typing.Callable[[object], None]] default: +//| function called for python objects that do not have +//| a representation in msgpack format. +//| """ +//| ... +//| +STATIC mp_obj_t mod_msgpack_pack(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_obj, ARG_buffer, ARG_default }; + STATIC const mp_arg_t allowed_args[] = { + { MP_QSTR_obj, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_buffer, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_default, MP_ARG_KW_ONLY | MP_ARG_OBJ, { .u_obj = mp_const_none } }, + }; + 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); + + mp_obj_t handler = args[ARG_default].u_obj; + if (handler != mp_const_none && !MP_OBJ_IS_FUN(handler) && !MP_OBJ_IS_METH(handler)) { + mp_raise_ValueError(translate("default is not a function")); + } + + common_hal_msgpack_pack(args[ARG_obj].u_obj, args[ARG_buffer].u_obj, handler); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_KW(mod_msgpack_pack_obj, 1, mod_msgpack_pack); + + +//| def unpack(buffer: ReadableBuffer, *, ext_hook: Union[Callable[[int, bytes], object], None] = None, use_list: bool=True) -> object: +//| """Unpack and return one object from buffer. +//| +//| :param ~_typing.ReadableBuffer buffer: buffer to read from +//| :param Optional[~_typing.Callable[[int, bytes], object]] ext_hook: function called for objects in +//| msgpack ext format. +//| :param Optional[bool] use_list: return array as list or tuple (use_list=False). +//| +//| :return object: object read from buffer. +//| """ +//| ... +//| +STATIC mp_obj_t mod_msgpack_unpack(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_buffer, ARG_ext_hook, ARG_use_list }; + STATIC const mp_arg_t allowed_args[] = { + { MP_QSTR_buffer, MP_ARG_REQUIRED | MP_ARG_OBJ, }, + { MP_QSTR_ext_hook, MP_ARG_KW_ONLY | MP_ARG_OBJ, { .u_obj = mp_const_none } }, + { MP_QSTR_use_list, MP_ARG_KW_ONLY | MP_ARG_BOOL, { .u_bool = true } }, + }; + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + mp_obj_t hook = args[ARG_ext_hook].u_obj; + if (hook != mp_const_none && !MP_OBJ_IS_FUN(hook) && !MP_OBJ_IS_METH(hook)) { + mp_raise_ValueError(translate("ext_hook is not a function")); + } + + return common_hal_msgpack_unpack(args[ARG_buffer].u_obj, hook, args[ARG_use_list].u_bool); +} +MP_DEFINE_CONST_FUN_OBJ_KW(mod_msgpack_unpack_obj, 1, mod_msgpack_unpack); + + +STATIC const mp_rom_map_elem_t msgpack_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_msgpack) }, + { MP_ROM_QSTR(MP_QSTR_ExtType), MP_ROM_PTR(&mod_msgpack_exttype_type) }, + { MP_ROM_QSTR(MP_QSTR_pack), MP_ROM_PTR(&mod_msgpack_pack_obj) }, + { MP_ROM_QSTR(MP_QSTR_unpack), MP_ROM_PTR(&mod_msgpack_unpack_obj) }, +}; + +STATIC MP_DEFINE_CONST_DICT(msgpack_module_globals, msgpack_module_globals_table); + +const mp_obj_module_t msgpack_module = { + .base = { &mp_type_module }, + .globals = (mp_obj_dict_t*)&msgpack_module_globals, +}; diff --git a/shared-bindings/msgpack/__init__.h b/shared-bindings/msgpack/__init__.h new file mode 100644 index 0000000000..a02ead0bd0 --- /dev/null +++ b/shared-bindings/msgpack/__init__.h @@ -0,0 +1,34 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2016 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. + */ + +#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_MSGPACK___INIT___H +#define MICROPY_INCLUDED_SHARED_BINDINGS_MSGPACK___INIT___H + +#include "py/obj.h" + +// nothing for now + +#endif // MICROPY_INCLUDED_SHARED_BINDINGS_MSGPACK___INIT___H diff --git a/shared-bindings/wifi/Network.c b/shared-bindings/wifi/Network.c index bf970a9c0f..0f3006f2ea 100644 --- a/shared-bindings/wifi/Network.c +++ b/shared-bindings/wifi/Network.c @@ -108,12 +108,45 @@ const mp_obj_property_t wifi_network_channel_obj = { (mp_obj_t)&mp_const_none_obj }, }; +//| country: str +//| """String id of the country code""" +//| +STATIC mp_obj_t wifi_network_get_country(mp_obj_t self) { + return common_hal_wifi_network_get_country(self); + +} +MP_DEFINE_CONST_FUN_OBJ_1(wifi_network_get_country_obj, wifi_network_get_country); + +const mp_obj_property_t wifi_network_country_obj = { + .base.type = &mp_type_property, + .proxy = { (mp_obj_t)&wifi_network_get_country_obj, + (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&mp_const_none_obj }, +}; + +//| authmode: str +//| """String id of the authmode""" +//| +STATIC mp_obj_t wifi_network_get_authmode(mp_obj_t self) { + return common_hal_wifi_network_get_authmode(self); + +} +MP_DEFINE_CONST_FUN_OBJ_1(wifi_network_get_authmode_obj, wifi_network_get_authmode); + +const mp_obj_property_t wifi_network_authmode_obj = { + .base.type = &mp_type_property, + .proxy = { (mp_obj_t)&wifi_network_get_authmode_obj, + (mp_obj_t)&mp_const_none_obj, + (mp_obj_t)&mp_const_none_obj }, +}; STATIC const mp_rom_map_elem_t wifi_network_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_ssid), MP_ROM_PTR(&wifi_network_ssid_obj) }, { MP_ROM_QSTR(MP_QSTR_bssid), MP_ROM_PTR(&wifi_network_bssid_obj) }, { MP_ROM_QSTR(MP_QSTR_rssi), MP_ROM_PTR(&wifi_network_rssi_obj) }, { MP_ROM_QSTR(MP_QSTR_channel), MP_ROM_PTR(&wifi_network_channel_obj) }, + { MP_ROM_QSTR(MP_QSTR_country), MP_ROM_PTR(&wifi_network_country_obj) }, + { MP_ROM_QSTR(MP_QSTR_authmode), MP_ROM_PTR(&wifi_network_authmode_obj) }, }; STATIC MP_DEFINE_CONST_DICT(wifi_network_locals_dict, wifi_network_locals_dict_table); diff --git a/shared-bindings/wifi/Network.h b/shared-bindings/wifi/Network.h index c9bbc685e6..0f07e7b555 100644 --- a/shared-bindings/wifi/Network.h +++ b/shared-bindings/wifi/Network.h @@ -39,5 +39,7 @@ extern mp_obj_t common_hal_wifi_network_get_ssid(wifi_network_obj_t *self); extern mp_obj_t common_hal_wifi_network_get_bssid(wifi_network_obj_t *self); extern mp_obj_t common_hal_wifi_network_get_rssi(wifi_network_obj_t *self); extern mp_obj_t common_hal_wifi_network_get_channel(wifi_network_obj_t *self); +extern mp_obj_t common_hal_wifi_network_get_country(wifi_network_obj_t *self); +extern mp_obj_t common_hal_wifi_network_get_authmode(wifi_network_obj_t *self); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_WIFI_NETWORK_H diff --git a/shared-bindings/wifi/Radio.c b/shared-bindings/wifi/Radio.c index edbd9fd2ff..63f507067a 100644 --- a/shared-bindings/wifi/Radio.c +++ b/shared-bindings/wifi/Radio.c @@ -295,7 +295,7 @@ const mp_obj_property_t wifi_radio_ipv4_dns_obj = { }; //| ap_info: Optional[Network] -//| """Network object containing BSSID, SSID, channel, and RSSI when connected to an access point. None otherwise.""" +//| """Network object containing BSSID, SSID, authmode, channel, country and RSSI when connected to an access point. None otherwise.""" //| STATIC mp_obj_t wifi_radio_get_ap_info(mp_obj_t self) { return common_hal_wifi_radio_get_ap_info(self); diff --git a/shared-module/audiocore/__init__.c b/shared-module/audiocore/__init__.c index ac9d41b60a..7bdfe460ce 100644 --- a/shared-module/audiocore/__init__.c +++ b/shared-module/audiocore/__init__.c @@ -70,3 +70,63 @@ void audiosample_get_buffer_structure(mp_obj_t sample_obj, bool single_channel, proto->get_buffer_structure(MP_OBJ_TO_PTR(sample_obj), single_channel, single_buffer, samples_signed, max_buffer_length, spacing); } + +void audiosample_convert_u8m_s16s(int16_t *buffer_out, const uint8_t *buffer_in, size_t nframes) { + for(;nframes--;) { + int16_t sample = (*buffer_in++ - 0x80) << 8; + *buffer_out++ = sample; + *buffer_out++ = sample; + } +} + + +void audiosample_convert_u8s_s16s(int16_t *buffer_out, const uint8_t *buffer_in, size_t nframes) { + size_t nsamples = 2*nframes; + for(;nsamples--;) { + int16_t sample = (*buffer_in++ - 0x80) << 8; + *buffer_out++ = sample; + } +} + +void audiosample_convert_s8m_s16s(int16_t *buffer_out, const int8_t *buffer_in, size_t nframes) { + for(;nframes--;) { + int16_t sample = (*buffer_in++) << 8; + *buffer_out++ = sample; + *buffer_out++ = sample; + } +} + + +void audiosample_convert_s8s_s16s(int16_t *buffer_out, const int8_t *buffer_in, size_t nframes) { + size_t nsamples = 2*nframes; + for(;nsamples--;) { + int16_t sample = (*buffer_in++) << 8; + *buffer_out++ = sample; + } +} + + +void audiosample_convert_u16m_s16s(int16_t *buffer_out, const uint16_t *buffer_in, size_t nframes) { + for(;nframes--;) { + int16_t sample = *buffer_in++ - 0x8000; + *buffer_out++ = sample; + *buffer_out++ = sample; + } +} + + +void audiosample_convert_u16s_s16s(int16_t *buffer_out, const uint16_t *buffer_in, size_t nframes) { + size_t nsamples = 2*nframes; + for(;nsamples--;) { + int16_t sample = *buffer_in++ - 0x8000; + *buffer_out++ = sample; + } +} + +void audiosample_convert_s16m_s16s(int16_t *buffer_out, const int16_t *buffer_in, size_t nframes) { + for(;nframes--;) { + int16_t sample = *buffer_in++; + *buffer_out++ = sample; + *buffer_out++ = sample; + } +} diff --git a/shared-module/audiocore/__init__.h b/shared-module/audiocore/__init__.h index 7a56454b8a..ec2cf1cfab 100644 --- a/shared-module/audiocore/__init__.h +++ b/shared-module/audiocore/__init__.h @@ -74,4 +74,12 @@ void audiosample_get_buffer_structure(mp_obj_t sample_obj, bool single_channel, bool* single_buffer, bool* samples_signed, uint32_t* max_buffer_length, uint8_t* spacing); +void audiosample_convert_u8m_s16s(int16_t *buffer_out, const uint8_t *buffer_in, size_t nframes); +void audiosample_convert_u8s_s16s(int16_t *buffer_out, const uint8_t *buffer_in, size_t nframes); +void audiosample_convert_s8m_s16s(int16_t *buffer_out, const int8_t *buffer_in, size_t nframes); +void audiosample_convert_s8s_s16s(int16_t *buffer_out, const int8_t *buffer_in, size_t nframes); +void audiosample_convert_u16m_s16s(int16_t *buffer_out, const uint16_t *buffer_in, size_t nframes); +void audiosample_convert_u16s_s16s(int16_t *buffer_out, const uint16_t *buffer_in, size_t nframes); +void audiosample_convert_s16m_s16s(int16_t *buffer_out, const int16_t *buffer_in, size_t nframes); + #endif // MICROPY_INCLUDED_SHARED_MODULE_AUDIOCORE__INIT__H diff --git a/shared-module/displayio/ColorConverter.c b/shared-module/displayio/ColorConverter.c index 80558d037a..40dcd9d167 100644 --- a/shared-module/displayio/ColorConverter.c +++ b/shared-module/displayio/ColorConverter.c @@ -29,6 +29,8 @@ #include "py/misc.h" #include "py/runtime.h" +#define NO_TRANSPARENT_COLOR (0x1000000) + uint32_t displayio_colorconverter_dither_noise_1 (uint32_t n) { n = (n >> 13) ^ n; @@ -42,6 +44,7 @@ uint32_t displayio_colorconverter_dither_noise_2(uint32_t x, uint32_t y) { void common_hal_displayio_colorconverter_construct(displayio_colorconverter_t* self, bool dither) { self->dither = dither; + self->transparent_color = NO_TRANSPARENT_COLOR; } uint16_t displayio_colorconverter_compute_rgb565(uint32_t color_rgb888) { @@ -130,7 +133,7 @@ bool common_hal_displayio_colorconverter_get_dither(displayio_colorconverter_t* } void common_hal_displayio_colorconverter_make_transparent(displayio_colorconverter_t* self, uint32_t transparent_color) { - if (self->transparent_color >= 0x1000000) { + if (self->transparent_color != NO_TRANSPARENT_COLOR) { mp_raise_RuntimeError(translate("Only one color can be transparent at a time")); } self->transparent_color = transparent_color; @@ -138,8 +141,8 @@ void common_hal_displayio_colorconverter_make_transparent(displayio_colorconvert void common_hal_displayio_colorconverter_make_opaque(displayio_colorconverter_t* self, uint32_t transparent_color) { (void) transparent_color; - // 0x1000000 will never equal a valid color - self->transparent_color = 0x1000000; + // NO_TRANSPARENT_COLOR will never equal a valid color + self->transparent_color = NO_TRANSPARENT_COLOR; } void displayio_colorconverter_convert(displayio_colorconverter_t *self, const _displayio_colorspace_t* colorspace, const displayio_input_pixel_t *input_pixel, displayio_output_pixel_t *output_color) { diff --git a/shared-module/displayio/FourWire.c b/shared-module/displayio/FourWire.c index 06f8a84e35..e993f2480c 100644 --- a/shared-module/displayio/FourWire.c +++ b/shared-module/displayio/FourWire.c @@ -76,9 +76,7 @@ void common_hal_displayio_fourwire_deinit(displayio_fourwire_obj_t* self) { common_hal_reset_pin(self->command.pin); common_hal_reset_pin(self->chip_select.pin); - if (self->reset.pin) { - common_hal_reset_pin(self->reset.pin); - } + common_hal_reset_pin(self->reset.pin); } bool common_hal_displayio_fourwire_reset(mp_obj_t obj) { diff --git a/shared-module/displayio/OnDiskBitmap.c b/shared-module/displayio/OnDiskBitmap.c index 993fc03de6..c1a0ddeb7e 100644 --- a/shared-module/displayio/OnDiskBitmap.c +++ b/shared-module/displayio/OnDiskBitmap.c @@ -57,7 +57,7 @@ void common_hal_displayio_ondiskbitmap_construct(displayio_ondiskbitmap_t *self, uint32_t compression = read_word(bmp_header, 15); uint32_t number_of_colors = read_word(bmp_header, 23); - bool indexed = ((bits_per_pixel <= 8) && (number_of_colors != 0)); + bool indexed = bits_per_pixel <= 8; self->bitfield_compressed = (compression == 3); self->bits_per_pixel = bits_per_pixel; self->width = read_word(bmp_header, 9); @@ -75,6 +75,9 @@ void common_hal_displayio_ondiskbitmap_construct(displayio_ondiskbitmap_t *self, self->b_bitmask = 0x1f; } } else if (indexed && self->bits_per_pixel != 1) { + if (number_of_colors == 0) { + number_of_colors = 1 << bits_per_pixel; + } uint16_t palette_size = number_of_colors * sizeof(uint32_t); uint16_t palette_offset = 0xe + header_size; diff --git a/shared-module/msgpack/__init__.c b/shared-module/msgpack/__init__.c new file mode 100644 index 0000000000..39178d46e1 --- /dev/null +++ b/shared-module/msgpack/__init__.c @@ -0,0 +1,464 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Bernhard Boser + * + * 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 +#include + +#include "py/obj.h" +#include "py/binary.h" +#include "py/objarray.h" +#include "py/objlist.h" +#include "py/objstringio.h" +#include "py/parsenum.h" +#include "py/runtime.h" +#include "py/stream.h" + +#include "supervisor/shared/translate.h" +#include "shared-bindings/msgpack/ExtType.h" + +//////////////////////////////////////////////////////////////// +// stream management + +typedef struct _msgpack_stream_t { + mp_obj_t stream_obj; + mp_uint_t (*read)(mp_obj_t obj, void *buf, mp_uint_t size, int *errcode); + mp_uint_t (*write)(mp_obj_t obj, const void *buf, mp_uint_t size, int *errcode); + int errcode; +} msgpack_stream_t; + +STATIC msgpack_stream_t get_stream(mp_obj_t stream_obj, int flags) { + const mp_stream_p_t *stream_p = mp_get_stream_raise(stream_obj, flags); + msgpack_stream_t s = {stream_obj, stream_p->read, stream_p->write, 0}; + return s; +} + +//////////////////////////////////////////////////////////////// +// readers + +STATIC void read(msgpack_stream_t *s, void *buf, mp_uint_t size) { + if (size == 0) return; + mp_uint_t ret = s->read(s->stream_obj, buf, size, &s->errcode); + if (s->errcode != 0) { + mp_raise_OSError(s->errcode); + } + if (ret == 0) { + mp_raise_msg(&mp_type_EOFError, NULL); + } + if (ret < size) { + mp_raise_ValueError(translate("short read")); + } +} + +STATIC uint8_t read1(msgpack_stream_t *s) { + uint8_t res = 0; + read(s, &res, 1); + return res; +} + +STATIC uint16_t read2(msgpack_stream_t *s) { + uint16_t res = 0; + read(s, &res, 2); + int n = 1; + if (*(char *)&n == 1) res = __builtin_bswap16(res); + return res; +} + +STATIC uint32_t read4(msgpack_stream_t *s) { + uint32_t res = 0; + read(s, &res, 4); + int n = 1; + if (*(char *)&n == 1) res = __builtin_bswap32(res); + return res; +} + +STATIC size_t read_size(msgpack_stream_t *s, uint8_t len_index) { + size_t res = 0; + switch (len_index) { + case 0: res = (size_t)read1(s); break; + case 1: res = (size_t)read2(s); break; + case 2: res = (size_t)read4(s); break; + } + return res; +} + +//////////////////////////////////////////////////////////////// +// writers + +STATIC void write(msgpack_stream_t *s, const void *buf, mp_uint_t size) { + mp_uint_t ret = s->write(s->stream_obj, buf, size, &s->errcode); + if (s->errcode != 0) { + mp_raise_OSError(s->errcode); + } + if (ret == 0) { + mp_raise_msg(&mp_type_EOFError, NULL); + } +} + +STATIC void write1(msgpack_stream_t *s, uint8_t obj) { + write(s, &obj, 1); +} + +STATIC void write2(msgpack_stream_t *s, uint16_t obj) { + int n = 1; + if (*(char *)&n == 1) obj = __builtin_bswap16(obj); + write(s, &obj, 2); +} + +STATIC void write4(msgpack_stream_t *s, uint32_t obj) { + int n = 1; + if (*(char *)&n == 1) obj = __builtin_bswap32(obj); + write(s, &obj, 4); +} + +// compute and write msgpack size code (array structures) +STATIC void write_size(msgpack_stream_t *s, uint8_t code, size_t size) { + if ((uint8_t)size == size) { + write1(s, code); + write1(s, size); + } else if ((uint16_t)size == size) { + write1(s, code+1); + write2(s, size); + } else { + write1(s, code+2); + write4(s, size); + } +} + +//////////////////////////////////////////////////////////////// +// packers + +// This is a helper function to iterate through a dictionary. The state of +// the iteration is held in *cur and should be initialised with zero for the +// first call. Will return NULL when no more elements are available. +STATIC mp_map_elem_t *dict_iter_next(mp_obj_dict_t *dict, size_t *cur) { + size_t max = dict->map.alloc; + mp_map_t *map = &dict->map; + + for (size_t i = *cur; i < max; i++) { + if (MP_MAP_SLOT_IS_FILLED(map, i)) { + *cur = i + 1; + return &(map->table[i]); + } + } + + return NULL; +} + +STATIC void pack_int(msgpack_stream_t *s, int32_t x) { + if (x > -32 && x < 128) { + write1(s, x); + } else if ((int8_t)x == x) { + write1(s, 0xd0); + write1(s, x); + } else if ((int16_t)x == x) { + write1(s, 0xd1); + write2(s, x); + } else { + write1(s, 0xd2); + write4(s, x); + } +} + +STATIC void pack_bin(msgpack_stream_t *s, const uint8_t* data, size_t len) { + write_size(s, 0xc4, len); + if (len > 0) write(s, data, len); +} + +STATIC void pack_ext(msgpack_stream_t *s, int8_t code, const uint8_t* data, size_t len) { + if (len == 1) { + write1(s, 0xd4); + } else if (len == 2) { + write1(s, 0xd5); + } else if (len == 4) { + write1(s, 0xd6); + } else if (len == 8) { + write1(s, 0xd7); + } else if (len == 16) { + write1(s, 0xd8); + } else { + write_size(s, 0xc7, len); + } + write1(s, code); // type byte + if (len > 0) write(s, data, len); +} + +STATIC void pack_str(msgpack_stream_t *s, const char* str, size_t len) { + if (len < 32) { + write1(s, 0b10100000 | (uint8_t)len); + } else { + write_size(s, 0xd9, len); + } + if (len > 0) write(s, str, len); +} + +STATIC void pack_array(msgpack_stream_t *s, size_t len) { + // only writes the header, manually write the objects after calling pack_array! + if (len < 16) { + write1(s, 0b10010000 | (uint8_t)len); + } else if (len < 0x10000) { + write1(s, 0xdc); + write2(s, len); + } else { + write1(s, 0xdd); + write4(s, len); + } +} + +STATIC void pack_dict(msgpack_stream_t *s, size_t len) { + // only writes the header, manually write the objects after calling pack_array! + if (len < 16) { + write1(s, 0b10000000 | (uint8_t)len); + } else if (len < 0x10000) { + write1(s, 0xde); + write2(s, len); + } else { + write1(s, 0xdf); + write4(s, len); + } +} + +STATIC void pack(mp_obj_t obj, msgpack_stream_t *s, mp_obj_t default_handler) { + if (MP_OBJ_IS_SMALL_INT(obj)) { + // int + int32_t x = MP_OBJ_SMALL_INT_VALUE(obj); + pack_int(s, x); + } else if (MP_OBJ_IS_STR(obj)) { + // string + size_t len; + const char *data = mp_obj_str_get_data(obj, &len); + pack_str(s, data, len); + } else if (MP_OBJ_IS_TYPE(obj, &mod_msgpack_exttype_type)) { + mod_msgpack_extype_obj_t *ext = MP_OBJ_TO_PTR(obj); + mp_buffer_info_t bufinfo; + mp_get_buffer_raise(ext->data, &bufinfo, MP_BUFFER_READ); + pack_ext(s, ext->code, bufinfo.buf, bufinfo.len); + } else if (MP_OBJ_IS_TYPE(obj, &mp_type_bytes)) { + // bytes + mp_buffer_info_t bufinfo; + mp_get_buffer_raise(obj, &bufinfo, MP_BUFFER_READ); + pack_bin(s, bufinfo.buf, bufinfo.len); + } else if (MP_OBJ_IS_TYPE(obj, &mp_type_tuple)) { + // tuple + mp_obj_tuple_t *self = MP_OBJ_TO_PTR(obj); + pack_array(s, self->len); + for (size_t i=0; ilen; i++) { + pack(self->items[i], s, default_handler); + } + } else if (MP_OBJ_IS_TYPE(obj, &mp_type_list)) { + // list (layout differs from tuple) + mp_obj_list_t *self = MP_OBJ_TO_PTR(obj); + pack_array(s, self->len); + for (size_t i=0; ilen; i++) { + pack(self->items[i], s, default_handler); + } + } else if (MP_OBJ_IS_TYPE(obj, &mp_type_dict)) { + // dict + mp_obj_dict_t *self = MP_OBJ_TO_PTR(obj); + pack_dict(s, self->map.used); + size_t cur = 0; + mp_map_elem_t *next = NULL; + while ((next = dict_iter_next(self, &cur)) != NULL) { + pack(next->key, s, default_handler); + pack(next->value, s, default_handler); + } + } else if (mp_obj_is_float(obj)) { + union Float { mp_float_t f; uint32_t u; }; + union Float data; + data.f = mp_obj_float_get(obj); + write1(s, 0xca); + write4(s, data.u); + } else if (obj == mp_const_none) { + write1(s, 0xc0); + } else if (obj == mp_const_false) { + write1(s, 0xc2); + } else if (obj == mp_const_true) { + write1(s, 0xc3); + } else { + if (default_handler != mp_const_none) { + // set default_handler to mp_const_none to avoid infinite recursion + // this also precludes some valid outputs + pack(mp_call_function_1(default_handler, obj), s, mp_const_none); + } else { + mp_raise_ValueError(translate("no default packer")); + } + } +} + +//////////////////////////////////////////////////////////////// +// unpacker + +STATIC mp_obj_t unpack(msgpack_stream_t *s, mp_obj_t ext_hook, bool use_list); + +STATIC mp_obj_t unpack_array_elements(msgpack_stream_t *s, size_t size, mp_obj_t ext_hook, bool use_list) { + if (use_list) { + mp_obj_list_t *t = MP_OBJ_TO_PTR(mp_obj_new_list(size, NULL)); + for (size_t i=0; iitems[i] = unpack(s, ext_hook, use_list); + } + return MP_OBJ_FROM_PTR(t); + } else { + mp_obj_tuple_t *t = MP_OBJ_TO_PTR(mp_obj_new_tuple(size, NULL)); + for (size_t i=0; iitems[i] = unpack(s, ext_hook, use_list); + } + return MP_OBJ_FROM_PTR(t); + } +} + +STATIC mp_obj_t unpack_bytes(msgpack_stream_t *s, size_t size) { + vstr_t vstr; + vstr_init_len(&vstr, size); + byte *p = (byte*)vstr.buf; + read(s, p, size); + return mp_obj_new_str_from_vstr(&mp_type_bytes, &vstr); +} + +STATIC mp_obj_t unpack_ext(msgpack_stream_t *s, size_t size, mp_obj_t ext_hook) { + int8_t code = read1(s); + mp_obj_t data = unpack_bytes(s, size); + if (ext_hook != mp_const_none) { + return mp_call_function_2(ext_hook, MP_OBJ_NEW_SMALL_INT(code), data); + } else { + mod_msgpack_extype_obj_t *o = m_new_obj(mod_msgpack_extype_obj_t); + o->base.type = &mod_msgpack_exttype_type; + o->code = code; + o->data = data; + return MP_OBJ_FROM_PTR(o); + } +} + +STATIC mp_obj_t unpack(msgpack_stream_t *s, mp_obj_t ext_hook, bool use_list) { + uint8_t code = read1(s); + if (((code & 0b10000000) == 0) || ((code & 0b11100000) == 0b11100000)) { + // int + return MP_OBJ_NEW_SMALL_INT((int8_t)code); + } + if ((code & 0b11100000) == 0b10100000) { + // str + size_t len = code & 0b11111; + // allocate on stack; len < 32 + char str[len]; + read(s, &str, len); + return mp_obj_new_str(str, len); + } + if ((code & 0b11110000) == 0b10010000) { + // array (list / tuple) + return unpack_array_elements(s, code & 0b1111, ext_hook, use_list); + } + if ((code & 0b11110000) == 0b10000000) { + // map (dict) + size_t len = code & 0b1111; + mp_obj_dict_t *d = MP_OBJ_TO_PTR(mp_obj_new_dict(len)); + for (size_t i=0; iprev || callback_head == cb) { @@ -55,6 +57,8 @@ void background_callback_add_core(background_callback_t *cb) { } callback_tail = cb; CALLBACK_CRITICAL_END; + + port_wake_main_task(); } void background_callback_add(background_callback_t *cb, background_callback_fun fun, void *data) { diff --git a/supervisor/shared/board.c b/supervisor/shared/board.c index 30603aa66c..6d648510e7 100644 --- a/supervisor/shared/board.c +++ b/supervisor/shared/board.c @@ -36,7 +36,7 @@ void board_reset_user_neopixels(const mcu_pin_obj_t* pin, size_t count) { // Turn off on-board NeoPixel string uint8_t empty[count * 3]; - memset(empty, 0, count); + memset(empty, 0, count * 3); digitalio_digitalinout_obj_t neopixel_pin; common_hal_digitalio_digitalinout_construct(&neopixel_pin, pin); common_hal_digitalio_digitalinout_switch_to_output(&neopixel_pin, false, diff --git a/supervisor/shared/external_flash/devices.h b/supervisor/shared/external_flash/devices.h index 6797f86f08..c8c941adf8 100644 --- a/supervisor/shared/external_flash/devices.h +++ b/supervisor/shared/external_flash/devices.h @@ -94,6 +94,26 @@ typedef struct { .single_status_byte = false, \ } +// Settings for the Adesto Tech AT25DF641-SSHD-T 8MiB SPI flash +// for the Oak Dev Tech Icy Tree M0 (SAMD21) feather board. +// Source: https://www.digikey.com/product-detail/en/adesto-technologies/AT25SF641-SDHD-T/1265-1180-1-ND/ +// Datasheet: https://www.adestotech.com/wp-content/uploads/doc8693.pdf +#define AT25DF641A {\ + .total_size = (1 << 23), /* 8 MiB */ \ + .start_up_time_us = 10000, \ + .manufacturer_id = 0x1f, \ + .memory_type = 0x48, \ + .capacity = 0x00, \ + .max_clock_speed_mhz = 85, \ + .quad_enable_bit_mask = 0x00, \ + .has_sector_protection = true, \ + .supports_fast_read = true, \ + .supports_qspi = false, \ + .supports_qspi_writes = false, \ + .write_status_register_split = false, \ + .single_status_byte = false, \ +} + // Settings for the Adesto Tech AT25SF161-SSHD-T 2MiB SPI flash // for the StringCar M0 (SAMD21) Express board. // Source: https://www.digikey.com/product-detail/en/adesto-technologies/AT25SF161-SDHD-T/1265-1230-1-ND/ @@ -114,6 +134,7 @@ typedef struct { .single_status_byte = false, \ } + // Settings for the Adesto Tech AT25SF041 1MiB SPI flash. It's on the SparkFun // SAMD51 Thing Plus board // Datasheet: https://www.adestotech.com/wp-content/uploads/DS-AT25SF041_044.pdf @@ -363,6 +384,24 @@ typedef struct { .write_status_register_split = false, \ } +// Settings for the Winbond W25Q64FV 8MiB SPI flash. +// Datasheet: https://www.winbond.com/resource-files/w25q64fv%20revs%2007182017.pdf +#define W25Q64FV {\ + .total_size = (1 << 23), /* 8 MiB */ \ + .start_up_time_us = 5000, \ + .manufacturer_id = 0xef, \ + .memory_type = 0x40, \ + .capacity = 0x17, \ + .max_clock_speed_mhz = 104, \ + .quad_enable_bit_mask = 0x02, \ + .has_sector_protection = false, \ + .supports_fast_read = true, \ + .supports_qspi = true, \ + .supports_qspi_writes = true, \ + .write_status_register_split = false, \ + .single_status_byte = false, \ +} + // Settings for the Winbond W25Q64JV-IM 8MiB SPI flash. Note that JV-IQ has a different .memory_type (0x40) // Datasheet: http://www.winbond.com/resource-files/w25q64jv%20revj%2003272018%20plus.pdf #define W25Q64JV_IM {\ @@ -566,6 +605,43 @@ typedef struct { .single_status_byte = true, \ } +// Settings for the Macronix MX25L51245G 64MiB SPI flash. +// Datasheet: https://www.macronix.com/Lists/Datasheet/Attachments/7437/MX25L51245G,%203V,%20512Mb,%20v1.6.pdf +#define MX25L25645G {\ + .total_size = (1 << 25), /* 32 MiB */ \ + .start_up_time_us = 5000, \ + .manufacturer_id = 0x9f, \ + .memory_type = 0xab, \ + .capacity = 0x90, \ + .max_clock_speed_mhz = 133, \ + .quad_enable_bit_mask = 0xaf, \ + .has_sector_protection = false, \ + .supports_fast_read = true, \ + .supports_qspi = true, \ + .supports_qspi_writes = true, \ + .write_status_register_split = false, \ + .single_status_byte = true, \ +} + +// Settings for the Macronix MX25L12833F 16MiB SPI flash +// Datasheet: https://www.macronix.com/Lists/Datasheet/Attachments/7447/MX25L12833F,%203V,%20128Mb,%20v1.0.pdf + +#define MX25L12833F {\ + .total_size = (1UL << 24), /* 16 MiB */ \ + .start_up_time_us = 5000, \ + .manufacturer_id = 0xc2, \ + .memory_type = 0x20, \ + .capacity = 0x18, \ + .max_clock_speed_mhz = 133, \ + .quad_enable_bit_mask = 0x40, \ + .has_sector_protection = true, \ + .supports_fast_read = true, \ + .supports_qspi = true, \ + .supports_qspi_writes = true, \ + .write_status_register_split = false, \ + .single_status_byte = true, \ + } + // Settings for the Winbond W25Q128JV-PM 16MiB SPI flash. Note that JV-IM has a different .memory_type (0x70) // Datasheet: https://www.winbond.com/resource-files/w25q128jv%20revf%2003272018%20plus.pdf #define W25Q128JV_PM {\ diff --git a/supervisor/shared/filesystem.c b/supervisor/shared/filesystem.c index 88603be0c0..618dc796b8 100644 --- a/supervisor/shared/filesystem.c +++ b/supervisor/shared/filesystem.c @@ -74,7 +74,7 @@ static void make_sample_code_file(FATFS *fatfs) { #if CIRCUITPY_FULL_BUILD FIL fs; UINT char_written = 0; - const byte buffer[] = "print('Hello World!')\n"; + const byte buffer[] = "print(\"Hello World!\")\n"; //Create or modify existing code.py file f_open(fatfs, &fs, "/code.py", FA_WRITE | FA_CREATE_ALWAYS); f_write(&fs, buffer, sizeof(buffer) - 1, &char_written); diff --git a/supervisor/shared/tick.c b/supervisor/shared/tick.c index d37a585eb2..e51c48c739 100644 --- a/supervisor/shared/tick.c +++ b/supervisor/shared/tick.c @@ -26,6 +26,7 @@ #include "supervisor/shared/tick.h" +#include "lib/utils/interrupt_char.h" #include "py/mpstate.h" #include "py/runtime.h" #include "supervisor/linker.h" @@ -145,10 +146,11 @@ void mp_hal_delay_ms(mp_uint_t delay) { delay = delay * 1024 / 1000; uint64_t end_tick = start_tick + delay; int64_t remaining = delay; - while (remaining > 0) { + + // Loop until we've waited long enough or we've been CTRL-Ced by autoreload + // or the user. + while (remaining > 0 && !mp_hal_is_interrupted()) { RUN_BACKGROUND_TASKS; - // Check to see if we've been CTRL-Ced by autoreload or the user. - mp_handle_pending(); remaining = end_tick - port_get_raw_ticks(NULL); // We break a bit early so we don't risk setting the alarm before the time when we call // sleep. diff --git a/supervisor/shared/translate.c b/supervisor/shared/translate.c index 44544c98dd..8bd3c5acde 100644 --- a/supervisor/shared/translate.c +++ b/supervisor/shared/translate.c @@ -122,7 +122,12 @@ char* decompress(const compressed_string_t* compressed, char* decompressed) { return decompressed; } -inline __attribute__((always_inline)) const compressed_string_t* translate(const char* original) { +inline +// gcc10 -flto has issues with this being always_inline for debug builds. +#if CIRCUITPY_DEBUG < 1 + __attribute__((always_inline)) +#endif +const compressed_string_t* translate(const char* original) { #ifndef NO_QSTR #define QDEF(id, str) #define TRANSLATION(id, firstbyte, ...) if (strcmp(original, id) == 0) { static const compressed_string_t v = { .data = firstbyte, .tail = { __VA_ARGS__ } }; return &v; } else diff --git a/supervisor/shared/usb/usb_msc_flash.c b/supervisor/shared/usb/usb_msc_flash.c index b39f60dcd2..7532b6aead 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] = {false}; +static bool ejected[1] = {true}; 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/tests/extmod/umsgpack_pack.py b/tests/extmod/umsgpack_pack.py new file mode 100644 index 0000000000..d9f0005e1b --- /dev/null +++ b/tests/extmod/umsgpack_pack.py @@ -0,0 +1,30 @@ +try: + from uio import BytesIO + import umsgpack as msgpack +except: + try: + from io import BytesIO + import msgpack + except ImportError: + print("SKIP") + raise SystemExit + +b = BytesIO() +msgpack.pack(False, s) +print(b.getvalue()) + +b = BytesIO() +msgpack.pack({"a": (-1, 0, 2, [3, None], 128)}, b) +print(b.getvalue()) + +# pack to a small-int not allowed +try: + msgpack.pack(123, 1) +except (AttributeError, OSError): # CPython and uPy have different errors + print('Exception') + +# pack to an object not allowed +try: + msgpack.pack(123, {}) +except (AttributeError, OSError): # CPython and uPy have different errors + print('Exception') diff --git a/tests/extmod/umsgpack_pack.py.ext b/tests/extmod/umsgpack_pack.py.ext new file mode 100644 index 0000000000..2f966be069 --- /dev/null +++ b/tests/extmod/umsgpack_pack.py.ext @@ -0,0 +1,5 @@ +b'\xc2' +b'\x82\xa1a\x96\xff\x00\x02\x92\x03\xc0\xd1\x00\x80\xc4\x07abcdefg\xa1b\xd4\x05x' +Exception ExtType +Exception to int +Exception to object diff --git a/tools/analyze_mpy.py b/tools/analyze_mpy.py old mode 100644 new mode 100755 index a2f541d0f4..99c06f62ad --- a/tools/analyze_mpy.py +++ b/tools/analyze_mpy.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # SPDX-FileCopyrightText: 2014 MicroPython & CircuitPython contributors (https://github.com/adafruit/circuitpython/graphs/contributors) # # SPDX-License-Identifier: MIT