diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9d55e947ab..f37df27f45 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,10 +30,10 @@ jobs: with: submodules: false fetch-depth: 1 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.x" - name: Get CP deps run: python tools/ci_fetch_deps.py test ${{ github.sha }} - name: CircuitPython version @@ -136,10 +136,10 @@ jobs: with: submodules: false fetch-depth: 1 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.x" - name: Get CP deps run: python tools/ci_fetch_deps.py mpy-cross-mac ${{ github.sha }} - name: CircuitPython version @@ -202,10 +202,10 @@ jobs: run: | git describe --dirty --tags echo >>$GITHUB_ENV CP_VERSION=$(git describe --dirty --tags) - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.x" - name: Install dependencies run: | sudo apt-get update @@ -241,7 +241,7 @@ jobs: zip -9r circuitpython-stubs.zip circuitpython-stubs [ -z "$AWS_ACCESS_KEY_ID" ] || aws s3 cp circuitpython-stubs/dist/*.tar.gz s3://adafruit-circuit-python/bin/stubs/circuitpython-stubs-${{ env.CP_VERSION }}.zip --no-progress --region us-east-1 - name: Upload stubs to PyPi - if: (github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository_owner == 'adafruit') || (github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested')) + if: github.event_name == 'release' && (github.event.action == 'published' || github.event.action == 'rerequested') env: TWINE_USERNAME: ${{ secrets.pypi_username }} TWINE_PASSWORD: ${{ secrets.pypi_password }} @@ -260,10 +260,10 @@ jobs: board: ${{ fromJSON(needs.test.outputs.boards-arm) }} if: ${{ needs.test.outputs.boards-arm != '[]' }} steps: - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.x" - uses: actions/checkout@v2.2.0 with: submodules: false @@ -312,10 +312,10 @@ jobs: board: ${{ fromJSON(needs.test.outputs.boards-riscv) }} if: ${{ needs.test.outputs.boards-riscv != '[]' }} steps: - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.x" - uses: actions/checkout@v2.2.0 with: submodules: false @@ -364,10 +364,10 @@ jobs: board: ${{ fromJSON(needs.test.outputs.boards-espressif) }} if: ${{ needs.test.outputs.boards-espressif != '[]' }} steps: - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.x" - uses: actions/checkout@v2.2.0 with: submodules: false @@ -451,10 +451,10 @@ jobs: board: ${{ fromJSON(needs.test.outputs.boards-aarch) }} if: ${{ needs.test.outputs.boards-aarch != '[]' }} steps: - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.x" - uses: actions/checkout@v2.2.0 with: submodules: false diff --git a/.github/workflows/create_website_pr.yml b/.github/workflows/create_website_pr.yml index 007cfbd402..dc987f0989 100644 --- a/.github/workflows/create_website_pr.yml +++ b/.github/workflows/create_website_pr.yml @@ -20,10 +20,10 @@ jobs: with: submodules: false fetch-depth: 1 - - name: Set up Python 3.8 - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: "3.x" - name: Get CP deps run: python tools/ci_fetch_deps.py website ${{ github.sha }} - name: Install deps diff --git a/.github/workflows/notify.yml b/.github/workflows/notify.yml new file mode 100644 index 0000000000..4cfb22298f --- /dev/null +++ b/.github/workflows/notify.yml @@ -0,0 +1,14 @@ +name: Notify users based on issue labels + +on: + issues: + types: [labeled] + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - uses: jenschelkopf/issue-label-notification-action@1.3 + with: + recipients: | + ulab=@v923z diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index 2a8811115e..02db3b2c61 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -13,7 +13,10 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v2.2.0 - - uses: actions/setup-python@v1 + - name: Set up Python 3 + uses: actions/setup-python@v2 + with: + python-version: "3.x" - name: Install deps run: | sudo apt-add-repository -y -u ppa:pybricks/ppa diff --git a/.gitmodules b/.gitmodules index 79fd5be7d0..89fbf6b263 100644 --- a/.gitmodules +++ b/.gitmodules @@ -148,8 +148,8 @@ url = https://github.com/adafruit/Adafruit_CircuitPython_RFM69.git [submodule "ports/espressif/esp-idf"] path = ports/espressif/esp-idf - url = https://github.com/espressif/esp-idf.git - branch = release/v4.3 + url = https://github.com/adafruit/esp-idf.git + branch = release/v4.4 [submodule "ports/espressif/certificates/nina-fw"] path = ports/espressif/certificates/nina-fw url = https://github.com/adafruit/nina-fw.git diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cfee897258..bcf7f8da2b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 + rev: v4.0.1 hooks: - id: check-yaml - id: end-of-file-fixer diff --git a/.readthedocs.yml b/.readthedocs.yml index 770888b79e..9743a70494 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -11,7 +11,7 @@ version: 2 build: os: ubuntu-20.04 tools: - python: "3.9" + python: "3" submodules: include: @@ -22,4 +22,4 @@ formats: python: install: - - requirements: docs/requirements.txt + - requirements: requirements-doc.txt diff --git a/BUILDING.md b/BUILDING.md index 0686df3c04..fc7b116595 100644 --- a/BUILDING.md +++ b/BUILDING.md @@ -15,7 +15,7 @@ https://learn.adafruit.com/building-circuitpython/ ## Setup -Please ensure you setup your build environment appropriately, as per the guide. You will need: +Please ensure you set up your build environment appropriately, as per the guide. You will need: * Linux: https://learn.adafruit.com/building-circuitpython/linux * MacOS: https://learn.adafruit.com/building-circuitpython/macos @@ -25,8 +25,9 @@ Please ensure you setup your build environment appropriately, as per the guide. This project has a bunch of git submodules. You will need to update them regularly. - git submodule sync - git submodule update --init +In the root folder of the CircuitPython repository, execute the following: + + make fetch-submodules ### Required Python Packages @@ -100,7 +101,7 @@ We apply code quality checks using pre-commit. Install pre-commit once per syst Activate it once per git clone with - pre-commit --install + pre-commit install Pre-commit also requires some additional programs to be installed through your package manager: diff --git a/README.rst b/README.rst index dafc8ee96e..801466cbad 100644 --- a/README.rst +++ b/README.rst @@ -213,7 +213,7 @@ Supported Support status ================ ============================================================ atmel-samd ``SAMD21`` stable | ``SAMD51`` stable cxd56 stable -espressif ``ESP32-C3`` beta | ``ESP32-S2`` stable +espressif ``ESP32-C3`` beta | ``ESP32-S2`` stable | ``ESP32-S3`` beta litex alpha mimxrt10xx alpha nrf stable @@ -229,7 +229,7 @@ unix alpha Boards ~~~~~~ -- Each ``port`` has a ``boards`` directory containing variations of boards +- Each ``port`` has a ``boards`` directory containing boards which belong to a specific microcontroller line. - A list of native modules supported by a particular board can be found `here `__. diff --git a/data/nvm.toml b/data/nvm.toml index e5b149599d..266ea20ed8 160000 --- a/data/nvm.toml +++ b/data/nvm.toml @@ -1 +1 @@ -Subproject commit e5b149599d14a8841167fe552846ca36925b87a0 +Subproject commit 266ea20ed80104c315dcb124b482fa5f9f48cdec diff --git a/docs/library/re.rst b/docs/library/re.rst index 12e640654e..d09ef59ba4 100644 --- a/docs/library/re.rst +++ b/docs/library/re.rst @@ -95,11 +95,11 @@ Supported operators and special sequences are: Example:: - import ure + import re - # As ure doesn't support escapes itself, use of r"" strings is not + # As re doesn't support escapes itself, use of r"" strings is not # recommended. - regex = ure.compile("[\r\n]") + regex = re.compile("[\r\n]") regex.split("line1\rline2\nline3\r\n") diff --git a/docs/requirements.txt b/docs/requirements.txt deleted file mode 100644 index aa3be74265..0000000000 --- a/docs/requirements.txt +++ /dev/null @@ -1,8 +0,0 @@ -sphinx<4 -myst-parser==0.14.0 -sphinxcontrib-svg2pdfconverter==0.1.0 -astroid -sphinx-autoapi -isort -black -readthedocs-sphinx-search diff --git a/docs/templates/breadcrumbs.html b/docs/templates/breadcrumbs.html new file mode 100644 index 0000000000..4ecb013f86 --- /dev/null +++ b/docs/templates/breadcrumbs.html @@ -0,0 +1,4 @@ +{%- extends "sphinx_rtd_theme/breadcrumbs.html" %} + +{% block breadcrumbs_aside %} +{% endblock %} diff --git a/extmod/ulab b/extmod/ulab index c03990cc56..0c7c6b88f3 160000 --- a/extmod/ulab +++ b/extmod/ulab @@ -1 +1 @@ -Subproject commit c03990cc56283417e752246c2738199f65d1b7ef +Subproject commit 0c7c6b88f3ec1b1d11d2f7d8b185e28ac657c06d diff --git a/extmod/vfs_fat_file.c b/extmod/vfs_fat_file.c index 17b142b95a..65ee5f9024 100644 --- a/extmod/vfs_fat_file.c +++ b/extmod/vfs_fat_file.c @@ -139,39 +139,58 @@ STATIC const mp_arg_t file_open_args[] = { STATIC mp_obj_t file_open(fs_user_mount_t *vfs, const mp_obj_type_t *type, mp_arg_val_t *args) { int mode = 0; const char *mode_s = mp_obj_str_get_str(args[1].u_obj); - // TODO make sure only one of r, w, x, a, and b, t are specified + uint32_t rwxa_count = 0; + uint32_t bt_count = 0; + uint32_t plus_count = 0; + bool bad_mode = false; while (*mode_s) { switch (*mode_s++) { case 'r': mode |= FA_READ; + rwxa_count++; break; case 'w': mode |= FA_WRITE | FA_CREATE_ALWAYS; + rwxa_count++; break; case 'x': mode |= FA_WRITE | FA_CREATE_NEW; + rwxa_count++; break; case 'a': mode |= FA_WRITE | FA_OPEN_ALWAYS; + rwxa_count++; break; case '+': mode |= FA_READ | FA_WRITE; + plus_count++; break; #if MICROPY_PY_IO_FILEIO case 'b': + bt_count++; type = &mp_type_vfs_fat_fileio; break; #endif case 't': + bt_count++; type = &mp_type_vfs_fat_textio; break; + default: + bad_mode = true; + break; } } + + if (rwxa_count != 1 || plus_count > 1 || bt_count > 1 || bad_mode) { + mp_raise_ValueError(translate("Invalid mode")); + } + assert(vfs != NULL); if ((mode & FA_WRITE) != 0 && !filesystem_is_writable_by_python(vfs)) { mp_raise_OSError(MP_EROFS); } + pyb_file_obj_t *o = m_new_obj_with_finaliser(pyb_file_obj_t); o->base.type = type; diff --git a/frozen/Adafruit_CircuitPython_BLE b/frozen/Adafruit_CircuitPython_BLE index 434e367cc7..a695cde1b1 160000 --- a/frozen/Adafruit_CircuitPython_BLE +++ b/frozen/Adafruit_CircuitPython_BLE @@ -1 +1 @@ -Subproject commit 434e367cc7da4c2836affdbf92b8932ca59a25b0 +Subproject commit a695cde1b1cc957bcd10875b12ae82d1deeb0157 diff --git a/frozen/Adafruit_CircuitPython_Display_Shapes b/frozen/Adafruit_CircuitPython_Display_Shapes index bafa35c18a..993bd12e17 160000 --- a/frozen/Adafruit_CircuitPython_Display_Shapes +++ b/frozen/Adafruit_CircuitPython_Display_Shapes @@ -1 +1 @@ -Subproject commit bafa35c18a610660bdce68784195c4a7fbdf1189 +Subproject commit 993bd12e1747ec117e8d104a5e9f4659c8a347a3 diff --git a/frozen/Adafruit_CircuitPython_Display_Text b/frozen/Adafruit_CircuitPython_Display_Text index ca141954c0..0ec87891f9 160000 --- a/frozen/Adafruit_CircuitPython_Display_Text +++ b/frozen/Adafruit_CircuitPython_Display_Text @@ -1 +1 @@ -Subproject commit ca141954c0b39cc0343c63bedb64c02f307159b9 +Subproject commit 0ec87891f9a28ee3c5ae3b020b60d361684f466d diff --git a/frozen/Adafruit_CircuitPython_LSM6DS b/frozen/Adafruit_CircuitPython_LSM6DS index 9873446ebd..f94ef67425 160000 --- a/frozen/Adafruit_CircuitPython_LSM6DS +++ b/frozen/Adafruit_CircuitPython_LSM6DS @@ -1 +1 @@ -Subproject commit 9873446ebde5779c03c2bd4e3e544a801fb27bd5 +Subproject commit f94ef67425516f23c889d217ffe5a3a710c1d278 diff --git a/frozen/Adafruit_CircuitPython_Motor b/frozen/Adafruit_CircuitPython_Motor index 88e5ae5142..9995c45a5e 160000 --- a/frozen/Adafruit_CircuitPython_Motor +++ b/frozen/Adafruit_CircuitPython_Motor @@ -1 +1 @@ -Subproject commit 88e5ae51427aa690de129c157223e93bf936ac41 +Subproject commit 9995c45a5ed1d455a4a8b7bfb9eb134de7f2b9db diff --git a/frozen/Adafruit_CircuitPython_seesaw b/frozen/Adafruit_CircuitPython_seesaw index 0450119e16..f06ac21e96 160000 --- a/frozen/Adafruit_CircuitPython_seesaw +++ b/frozen/Adafruit_CircuitPython_seesaw @@ -1 +1 @@ -Subproject commit 0450119e163df782930a887022e197d6d25ca666 +Subproject commit f06ac21e96321724258e00f7596d874eff53f0b8 diff --git a/lib/protomatter b/lib/protomatter index 7fe6406aff..d0a07e14ad 160000 --- a/lib/protomatter +++ b/lib/protomatter @@ -1 +1 @@ -Subproject commit 7fe6406affb1376193102cf76ded06e61316d7e6 +Subproject commit d0a07e14adcd71a7c22bcceb16c55aadb5e0d104 diff --git a/lib/sdmmc/sdmmc_io.c b/lib/sdmmc/sdmmc_io.c index 369be8c233..17ab291515 100644 --- a/lib/sdmmc/sdmmc_io.c +++ b/lib/sdmmc/sdmmc_io.c @@ -420,7 +420,10 @@ static sdmmc_err_t cis_tuple_func_manfid(const void* p, uint8_t* data, FILE* fp) int size = *(data++); fprintf(fp, "TUPLE: %s, size: %d\n", tuple->name, size); CIS_CHECK_SIZE(size, 4); + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-align" fprintf(fp, " MANF: %04X, CARD: %04X\n", *(uint16_t*)(data), *(uint16_t*)(data+2)); + #pragma GCC diagnostic pop return SDMMC_OK; } @@ -480,7 +483,10 @@ static sdmmc_err_t cis_tuple_func_cftable_entry(const void* p, uint8_t* data, FI CIS_CHECK_SIZE(size, 2); size-=2; CIS_CHECK_UNSUPPORTED(mem_space==1); //other cases not handled yet + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wcast-align" int len = *(uint16_t*)data; + #pragma GCC diagnostic pop fprintf(fp, " LEN: %04X\n", len); data+=2; } diff --git a/lib/tinyusb b/lib/tinyusb index ae73873b5c..3b09b82123 160000 --- a/lib/tinyusb +++ b/lib/tinyusb @@ -1 +1 @@ -Subproject commit ae73873b5cba0eb11c89165f4559964940430d44 +Subproject commit 3b09b82123a50bef6b18cf90c2734ae7581da4a3 diff --git a/locale/ID.po b/locale/ID.po index a145d0048e..d93756faef 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -152,6 +152,10 @@ msgstr "%q harus antara %d dan %d" msgid "%q must be of type %q" msgstr "%q harus bertipe %q" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "%q harus pangkat 2" @@ -584,7 +588,7 @@ msgstr "Kedua pin harus mendukung hardware interrut" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Kecerahan harus di antara 0-1.0" @@ -669,6 +673,10 @@ 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" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -1383,6 +1391,10 @@ msgstr "Ukuran potongan format tidak valid" msgid "Invalid memory access." msgstr "Akses memori tidak valid." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -1483,7 +1495,7 @@ msgstr "Panjang kata/bit tidak valid" msgid "Key must be 16, 24, or 32 bytes long" msgstr "Panjang kunci harus 16, 24, atau 32 byte" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -1613,7 +1625,7 @@ msgstr "tidak ada channel DMA ditemukan" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1920,7 +1932,7 @@ msgstr "Pin tidak mempunya kemampuan untuk ADC (Analog Digital Converter)" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -2007,6 +2019,10 @@ msgstr "Pull tidak digunakan saat arah output." msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "Kesalahan DeInit RNG" @@ -2125,7 +2141,7 @@ msgstr "Tingkat sampel harus positif" msgid "Sample rate too high. It must be less than %d" msgstr "Nilai sampel terlalu tinggi. Nilai harus kurang dari %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2386,7 +2402,7 @@ msgstr "Tidak dapat mengalokasikan buffer untuk signed conversion" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "Tidak dapat menemukan Tampilan I2C di %x" @@ -2480,10 +2496,6 @@ msgstr "Format tidak didukung" msgid "Unsupported operation" msgstr "Operasi yang tidak didukung" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Nilai tarikan yang tidak didukung." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2653,7 +2665,7 @@ msgstr "berusaha mendapatkan argmin/argmax dari urutan kosong" msgid "attributes not supported yet" msgstr "atribut belum didukung" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2709,11 +2721,11 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2763,6 +2775,10 @@ msgstr "kalibrasi adalah read only" msgid "calibration value out of range +/-127" msgstr "nilai kalibrasi keluar dari jangkauan +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "hanya mampu memiliki hingga 4 parameter untuk Thumb assembly" @@ -2801,6 +2817,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2895,6 +2915,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3086,6 +3114,10 @@ msgstr "" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3189,7 +3221,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3254,6 +3286,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3367,7 +3403,7 @@ msgstr "inline assembler harus sebuah fungsi" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3375,7 +3411,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3383,6 +3419,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3392,18 +3432,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3774,7 +3822,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3832,7 +3884,7 @@ msgstr "" msgid "odd-length string" msgstr "panjang data string memiliki keganjilan (odd-length)" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3840,7 +3892,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -3982,18 +4034,26 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4316,7 +4376,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4500,7 +4560,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" @@ -4517,7 +4577,7 @@ msgstr "jendela harus <= interval" msgid "wrong axis index" msgstr "indeks sumbu salah" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "sumbu yang ditentukan salah" @@ -4525,7 +4585,11 @@ msgstr "sumbu yang ditentukan salah" msgid "wrong input type" msgstr "tipe input salah" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "jumlah argumen salah" @@ -4569,6 +4633,9 @@ msgstr "zi harus berjenis float" msgid "zi must be of shape (n_section, 2)" msgstr "Zi harus berbentuk (n_section, 2)" +#~ msgid "Unsupported pull value." +#~ msgstr "Nilai tarikan yang tidak didukung." + #, c-format #~ msgid "" #~ "Welcome to Adafruit CircuitPython %s!\n" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index 5047615abf..c6d7ac0a07 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -144,6 +144,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -574,7 +578,7 @@ msgstr "" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -659,6 +663,10 @@ msgstr "" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -1362,6 +1370,10 @@ msgstr "" msgid "Invalid memory access." msgstr "" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -1462,7 +1474,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -1596,7 +1608,7 @@ msgstr "" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1896,7 +1908,7 @@ msgstr "" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -1978,6 +1990,10 @@ msgstr "" msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2094,7 +2110,7 @@ msgstr "" msgid "Sample rate too high. It must be less than %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2355,7 +2371,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -2447,10 +2463,6 @@ msgstr "" msgid "Unsupported operation" msgstr "" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "" - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2620,7 +2632,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2676,11 +2688,11 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2730,6 +2742,10 @@ msgstr "" msgid "calibration value out of range +/-127" msgstr "" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "" @@ -2768,6 +2784,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2862,6 +2882,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3053,6 +3081,10 @@ msgstr "" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3156,7 +3188,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3221,6 +3253,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3334,7 +3370,7 @@ msgstr "" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3342,7 +3378,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3350,6 +3386,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3359,18 +3399,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3741,7 +3789,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3799,7 +3851,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3807,7 +3859,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -3948,18 +4000,26 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4282,7 +4342,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4466,7 +4526,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" @@ -4483,7 +4543,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4491,7 +4551,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 8a3a920fbb..b25302e388 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -6,27 +6,31 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2020-12-04 18:33+0000\n" -"Last-Translator: vkuthan \n" +"PO-Revision-Date: 2021-12-23 01:53+0000\n" +"Last-Translator: dronecz \n" "Language-Team: LANGUAGE \n" "Language: cs\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -"X-Generator: Weblate 4.4-dev\n" +"X-Generator: Weblate 4.10.1\n" #: main.c msgid "" "\n" "Code done running.\n" msgstr "" +"\n" +"Program byl dokončen.\n" #: main.c msgid "" "\n" "Code stopped by auto-reload.\n" msgstr "" +"\n" +"Program byl zastaven automatickým načtením.\n" #: supervisor/shared/safe_mode.c msgid "" @@ -35,7 +39,7 @@ msgid "" "https://github.com/adafruit/circuitpython/issues\n" msgstr "" "\n" -"Založte prosím problém s obsahem vaší jednotky CIRCUITPY na adrese\n" +"Prosím vytvořte tiket s obsahem vaší jednotky CIRCUITPY na adrese\n" "https://github.com/adafruit/circuitpython/issues\n" #: py/obj.c @@ -48,11 +52,11 @@ msgstr " Soubor \"%q\", řádek %d" #: py/builtinhelp.c msgid " is of type %q\n" -msgstr "" +msgstr " je typu %q\n" #: main.c msgid " not found.\n" -msgstr "" +msgstr " nenalezen\n" #: main.c msgid " output:\n" @@ -67,23 +71,23 @@ msgstr "%%c vyžaduje int nebo char" #, c-format msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" -msgstr "" +msgstr "%d adresní pin, %d rgb pin a %d dlaždice indikuje výšku %d, ne %d" #: shared-bindings/microcontroller/Pin.c msgid "%q and %q contain duplicate pins" -msgstr "" +msgstr "%q a %q obsahují duplicitní piny" #: shared-bindings/microcontroller/Pin.c msgid "%q contains duplicate pins" -msgstr "" +msgstr "%q obsahuje duplicitní piny" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" -msgstr "Selhání %q: %d" +msgstr "%q: selhání %d" #: shared-bindings/microcontroller/Pin.c msgid "%q in use" -msgstr "Používá se %q" +msgstr "%q se právě používá" #: ports/atmel-samd/common-hal/pulseio/PulseIn.c #: ports/cxd56/common-hal/pulseio/PulseIn.c @@ -100,23 +104,23 @@ msgstr "Indexy %q musí být celá čísla, nikoli %s" #: py/argcheck.c msgid "%q length must be %d-%d" -msgstr "" +msgstr "%q délka musí být %d-%d" #: shared-bindings/usb_hid/Device.c msgid "%q length must be >= 1" -msgstr "" +msgstr "%q délka musí být >= 1" #: py/argcheck.c msgid "%q must be %d-%d" -msgstr "" +msgstr "%q musí být %d-%d" #: py/argcheck.c shared-bindings/gifio/GifWriter.c msgid "%q must be <= %d" -msgstr "" +msgstr "%q musí být <= %d" #: py/argcheck.c msgid "%q must be >= %d" -msgstr "" +msgstr "%q musí být >= %d" #: py/argcheck.c shared-bindings/memorymonitor/AllocationAlarm.c msgid "%q must be >= 0" @@ -132,7 +136,7 @@ msgstr "%q musí být > = 1" #: py/argcheck.c msgid "%q must be a string" -msgstr "" +msgstr "%q musí být string" #: shared-module/vectorio/Polygon.c msgid "%q must be a tuple of length 2" @@ -141,19 +145,23 @@ msgstr "%q musí být n-tice délky 2" #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c #: shared-module/vectorio/VectorShape.c msgid "%q must be between %d and %d" -msgstr "" +msgstr "%q musí být mezi %d a %d" #: py/argcheck.c msgid "%q must be of type %q" +msgstr "%q musí být typu %q" + +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" msgstr "" #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" -msgstr "" +msgstr "%q musí být mocnina 2" #: shared-bindings/wifi/Monitor.c msgid "%q out of bounds" -msgstr "" +msgstr "%q je mimo hranice" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #: shared-bindings/canio/Match.c @@ -162,7 +170,7 @@ msgstr "%q je mimo rozsah" #: ports/atmel-samd/common-hal/microcontroller/Pin.c msgid "%q pin invalid" -msgstr "Pin %q není platný" +msgstr "pin %q není platný" #: shared-bindings/fontio/BuiltinFont.c msgid "%q should be an int" @@ -170,7 +178,7 @@ msgstr "%q by měl být int" #: shared-bindings/usb_hid/Device.c msgid "%q with a report ID of 0 must be of length 1" -msgstr "" +msgstr "%q s ID 0 musím být délky 1" #: py/bc.c py/objnamedtuple.c msgid "%q() takes %d positional arguments but %d were given" @@ -178,12 +186,12 @@ msgstr "%q() vyžaduje %d pozičních argumentů, ale %d jich bylo zadáno" #: shared-bindings/usb_hid/Device.c msgid "%q, %q, and %q must all be the same length" -msgstr "" +msgstr "%q, %q, a %q musí mít všechny shodnou délku" #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c #, c-format msgid "%s error 0x%x" -msgstr "" +msgstr "%s chyba 0x%x" #: py/argcheck.c msgid "'%q' argument required" @@ -199,7 +207,7 @@ msgstr "Objekt '%q' není iterátor" #: py/objtype.c py/runtime.c shared-module/atexit/__init__.c msgid "'%q' object is not callable" -msgstr "Objekt '%q' nelze volat" +msgstr "Objekt '%q' nelze zavolat" #: py/runtime.c msgid "'%q' object is not iterable" @@ -208,17 +216,17 @@ msgstr "Objekt '%q' není iterovatelný" #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a label" -msgstr "" +msgstr "'%s' očekává popisek" #: py/emitinlinethumb.c py/emitinlinextensa.c #, c-format msgid "'%s' expects a register" -msgstr "" +msgstr "'%s' očekává register" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects a special register" -msgstr "" +msgstr "'%s' očekává speciální register" #: py/emitinlinethumb.c #, c-format @@ -238,7 +246,7 @@ msgstr "'%s' očekává integer (celé číslo)" #: py/emitinlinethumb.c #, c-format msgid "'%s' expects at most r%d" -msgstr "" +msgstr "'%s' očekává nejvíce r%d" #: py/emitinlinethumb.c #, c-format @@ -248,31 +256,31 @@ msgstr "'%s' očekává {r0, r1, ...}" #: py/emitinlinextensa.c #, c-format msgid "'%s' integer %d isn't within range %d..%d" -msgstr "" +msgstr "'%s' integer %d není v rozsahu %d..%d" #: py/emitinlinethumb.c #, c-format msgid "'%s' integer 0x%x doesn't fit in mask 0x%x" -msgstr "" +msgstr "'%s' integer 0x%x nepatří do masky 0x%x" #: py/obj.c #, c-format msgid "'%s' object doesn't support item assignment" -msgstr "" +msgstr "'%s' objekt nepodporuje přiřazení položky" #: py/obj.c #, c-format msgid "'%s' object doesn't support item deletion" -msgstr "" +msgstr "'%s' objekt nepodporuje smazání položky" #: py/runtime.c msgid "'%s' object has no attribute '%q'" -msgstr "" +msgstr "'%s' objekt nemá žádný atribut '%q'" #: py/obj.c #, c-format msgid "'%s' object isn't subscriptable" -msgstr "" +msgstr "'%s' objekt není vložitelný" #: py/objstr.c msgid "'=' alignment not allowed in string format specifier" @@ -340,7 +348,7 @@ msgstr "" #: py/obj.c msgid ", in %q\n" -msgstr "" +msgstr ", v %q\n" #: py/objcomplex.c msgid "0.0 to a complex power" @@ -525,13 +533,15 @@ msgstr "" #: main.c msgid "Auto-reload is off.\n" -msgstr "" +msgstr "Automatické načtení je vypnuté.\n" #: main.c msgid "" "Auto-reload is on. Simply save files over USB to run them or enter REPL to " "disable.\n" msgstr "" +"Automatické načtení je zapnuté. Stačí uložit soubory na USB nebo vstoupit " +"do REPLu pro jeho zakázání.\n" #: ports/espressif/common-hal/canio/CAN.c msgid "Baudrate not supported by peripheral" @@ -577,7 +587,7 @@ msgstr "" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -662,6 +672,10 @@ msgstr "" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -1365,6 +1379,10 @@ msgstr "" msgid "Invalid memory access." msgstr "" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -1465,7 +1483,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -1595,7 +1613,7 @@ msgstr "" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1895,7 +1913,7 @@ msgstr "" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -1943,10 +1961,12 @@ msgstr "" #: main.c msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" msgstr "" +"Zmáčkněte jakoukoli klávesu pro spuštění REPLu. Použijte CTRL-D pro opětovné " +"načtení.\n" #: main.c msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" -msgstr "" +msgstr "Předstírám hluboký spánek do alarmu, CTRL-C nebo zápisu souboru.\n" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "Program does IN without loading ISR" @@ -1977,6 +1997,10 @@ msgstr "" msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2093,7 +2117,7 @@ msgstr "" msgid "Sample rate too high. It must be less than %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2354,7 +2378,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -2446,10 +2470,6 @@ msgstr "" msgid "Unsupported operation" msgstr "" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "" - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2619,7 +2639,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2675,11 +2695,11 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2729,6 +2749,10 @@ msgstr "" msgid "calibration value out of range +/-127" msgstr "" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "" @@ -2767,6 +2791,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2861,6 +2889,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3052,6 +3088,10 @@ msgstr "" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3155,7 +3195,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3220,6 +3260,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3333,7 +3377,7 @@ msgstr "" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3341,7 +3385,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3349,6 +3393,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3358,18 +3406,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3740,7 +3796,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3798,7 +3858,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3806,7 +3866,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -3947,18 +4007,26 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4281,7 +4349,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4465,7 +4533,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" @@ -4482,7 +4550,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4490,7 +4558,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 2ee5eda3e9..1d2c2437f9 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -152,6 +152,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -585,7 +589,7 @@ msgstr "Beide pins müssen Hardware Interrupts unterstützen" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Die Helligkeit muss zwischen 0 und 1.0 liegen" @@ -670,6 +674,10 @@ 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" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC oder Checksumme ungültig" @@ -1382,6 +1390,10 @@ msgstr "Ungültige format chunk size" msgid "Invalid memory access." msgstr "Ungültiger Speicherzugriff." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -1482,7 +1494,7 @@ msgstr "Ungültige Wort- / Bitlänge" msgid "Key must be 16, 24, or 32 bytes long" msgstr "Der Schlüssel muss 16, 24 oder 32 Byte lang sein" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -1613,7 +1625,7 @@ msgstr "Kein DMA Kanal gefunden" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1919,7 +1931,7 @@ msgstr "Pin hat keine ADC Funktionalität" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "Pin kann nur als Eingang verwendet werden" @@ -2006,6 +2018,10 @@ msgstr "Pull wird nicht verwendet, wenn die Richtung output ist." msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "RNG DeInit-Fehler" @@ -2122,7 +2138,7 @@ msgstr "Abtastrate muss positiv sein" msgid "Sample rate too high. It must be less than %d" msgstr "Abtastrate zu hoch. Wert muss unter %d liegen" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2386,7 +2402,7 @@ msgstr "Konnte keine Buffer für Vorzeichenumwandlung allozieren" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "Konnte kein I2C Display finden an %x" @@ -2482,10 +2498,6 @@ msgstr "Nicht unterstütztes Format" msgid "Unsupported operation" msgstr "Nicht unterstützte Operation" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Nicht unterstützter Pull-Wert." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "Update fehlgeschlagen" @@ -2658,7 +2670,7 @@ msgstr "Sie haben versucht argmin/argmax einer leeren Sequenz zu erhalten" msgid "attributes not supported yet" msgstr "Attribute werden noch nicht unterstützt" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "Achse außerhalb des Wertebereichs" @@ -2714,11 +2726,11 @@ msgstr "Es müssen 8 oder 16 bits_per_sample sein" msgid "branch not in range" msgstr "Zweig ist außerhalb der Reichweite" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "Der Puffer ist kleiner als die angefragte Größe" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "Die Puffergröße muss ein vielfaches der Elementgröße sein" @@ -2768,6 +2780,10 @@ msgstr "Kalibrierung ist Schreibgeschützt" msgid "calibration value out of range +/-127" msgstr "Kalibrierwert nicht im Bereich von +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "kann nur bis zu 4 Parameter für die Thumb assembly haben" @@ -2808,6 +2824,10 @@ msgstr "kann %s nicht nach complex konvertieren" msgid "can't convert '%q' object to %q implicitly" msgstr "Kann '%q' Objekt nicht implizit nach %q konvertieren" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "kann nicht zu %q konvertieren" @@ -2908,6 +2928,14 @@ msgstr "Kann neue shape nicht zuweisen" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "Kann '%q' Instanzen nicht erstellen" @@ -3103,6 +3131,10 @@ msgstr "Division durch Null" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "leer" @@ -3206,7 +3238,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3271,6 +3303,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3386,7 +3422,7 @@ msgstr "inline assembler muss eine function sein" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "das Eingabeargument muss ein Integer, Tupel oder eine Liste sein" @@ -3394,7 +3430,7 @@ msgstr "das Eingabeargument muss ein Integer, Tupel oder eine Liste sein" msgid "input array length must be power of 2" msgstr "Die Länge des Eingabearrays muss eine Potenz von 2 sein" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "Eingabe-Arrays sind nicht kompatibel" @@ -3402,6 +3438,10 @@ msgstr "Eingabe-Arrays sind nicht kompatibel" msgid "input data must be an iterable" msgstr "Eingabedaten müssen iterierbar sein" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "Eingabematrix ist asymmetrisch" @@ -3411,18 +3451,26 @@ msgstr "Eingabematrix ist asymmetrisch" msgid "input matrix is singular" msgstr "Eingabematrix ist singulär" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "die Eingabe muss ein-Dimensional sein" @@ -3800,7 +3848,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "Nicht genügend Argumente für den Formatierungs-String" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "Die Anzahl der Punkte muss mindestens 2 betragen" @@ -3858,7 +3910,7 @@ msgstr "Objekt mit Pufferprotokoll (buffer protocol) erforderlich" msgid "odd-length string" msgstr "String mit ungerader Länge" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3866,7 +3918,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -4010,18 +4062,26 @@ msgstr "pow() drittes Argument darf nicht 0 sein" msgid "pow() with 3 arguments requires integers" msgstr "pow() mit 3 Argumenten erfordert Integer" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4347,7 +4407,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "zu viele Argumente mit dem angegebenen Format" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "zu viele Dimensionen" @@ -4533,7 +4593,7 @@ msgstr "watchdog Zeitlimit muss größer als 0 sein" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "breite muss zwischen (inklusive) 2 und 8 liegen, nicht %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "breite muss größer als 0 sein" @@ -4550,7 +4610,7 @@ msgstr "Fenster muss <= Intervall sein" msgid "wrong axis index" msgstr "falscher Achsenindex" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "falsche Achse gewählt" @@ -4558,7 +4618,11 @@ msgstr "falsche Achse gewählt" msgid "wrong input type" msgstr "falscher Eingabetyp" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "falsche Anzahl an Argumenten" @@ -4602,6 +4666,9 @@ msgstr "zi muss eine Gleitkommazahl sein" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Unsupported pull value." +#~ msgstr "Nicht unterstützter Pull-Wert." + #, c-format #~ msgid "" #~ "Welcome to Adafruit CircuitPython %s!\n" diff --git a/locale/el.po b/locale/el.po index de46c6c73d..216679c9bc 100644 --- a/locale/el.po +++ b/locale/el.po @@ -144,6 +144,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -574,7 +578,7 @@ msgstr "" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -659,6 +663,10 @@ msgstr "" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -1362,6 +1370,10 @@ msgstr "" msgid "Invalid memory access." msgstr "" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -1462,7 +1474,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -1592,7 +1604,7 @@ msgstr "" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1892,7 +1904,7 @@ msgstr "" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -1974,6 +1986,10 @@ msgstr "" msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2090,7 +2106,7 @@ msgstr "" msgid "Sample rate too high. It must be less than %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2351,7 +2367,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -2443,10 +2459,6 @@ msgstr "" msgid "Unsupported operation" msgstr "" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "" - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2616,7 +2628,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2672,11 +2684,11 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2726,6 +2738,10 @@ msgstr "" msgid "calibration value out of range +/-127" msgstr "" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "" @@ -2764,6 +2780,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2858,6 +2878,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3049,6 +3077,10 @@ msgstr "" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3152,7 +3184,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3217,6 +3249,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3330,7 +3366,7 @@ msgstr "" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3338,7 +3374,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3346,6 +3382,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3355,18 +3395,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3737,7 +3785,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3795,7 +3847,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3803,7 +3855,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -3944,18 +3996,26 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4278,7 +4338,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4462,7 +4522,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" @@ -4479,7 +4539,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4487,7 +4547,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index 9301346a34..0e3612c41f 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -153,6 +153,10 @@ msgstr "%q must be between %d and %d" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "%q must be power of 2" @@ -585,7 +589,7 @@ msgstr "Both pins must support hardware interrupts" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Brightness must be 0-1.0" @@ -670,6 +674,10 @@ msgstr "Bytes must be between 0 and 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBC blocks must be multiples of 16 bytes" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC or checksum was invalid" @@ -1377,6 +1385,10 @@ msgstr "Invalid format chunk size" msgid "Invalid memory access." msgstr "Invalid memory access." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -1477,7 +1489,7 @@ msgstr "Invalid word/bit length" msgid "Key must be 16, 24, or 32 bytes long" msgstr "Key must be 16, 24, or 32 bytes long" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -1607,7 +1619,7 @@ msgstr "No DMA channel found" msgid "No DMA pacing timer found" msgstr "No DMA pacing timer found" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "No I2C device at address: %x" @@ -1913,7 +1925,7 @@ msgstr "Pin does not have ADC capabilities" msgid "Pin interrupt already in use" msgstr "Pin interrupt already in use" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "Pin is input only" @@ -1998,6 +2010,10 @@ msgstr "Pull not used when direction is output." msgid "RAISE mode is not implemented" msgstr "RAISE mode is not implemented" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "RNG deinit Error" @@ -2114,7 +2130,7 @@ msgstr "Sample rate must be positive" msgid "Sample rate too high. It must be less than %d" msgstr "Sample rate too high. It must be less than %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2382,7 +2398,7 @@ msgstr "Unable to allocate buffers for signed conversion" msgid "Unable to create lock" msgstr "Unable to create lock" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "Unable to find I2C display at %x" @@ -2476,10 +2492,6 @@ msgstr "Unsupported format" msgid "Unsupported operation" msgstr "Unsupported operation" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Unsupported pull value." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "Update failed" @@ -2650,7 +2662,7 @@ msgstr "attempt to get argmin/argmax of an empty sequence" msgid "attributes not supported yet" msgstr "attributes not supported yet" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "axis is out of bounds" @@ -2706,11 +2718,11 @@ msgstr "bits_per_sample must be 8 or 16" msgid "branch not in range" msgstr "Branch not in range" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "Buffer is smaller than requested size" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "Buffer size must be a multiple of element size" @@ -2760,6 +2772,10 @@ msgstr "Calibration is read only" msgid "calibration value out of range +/-127" msgstr "Calibration value out of range +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "Can only have up to 4 parameters to thumb assembly" @@ -2798,6 +2814,10 @@ msgstr "can't convert %s to complex" msgid "can't convert '%q' object to %q implicitly" msgstr "Can't convert '%q' object to %q implicitly" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "Can't convert to %q" @@ -2894,6 +2914,14 @@ msgstr "cannot assign new shape" msgid "cannot cast output with casting rule" msgstr "can't cast output with casting rule" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "can't create '%q' instances" @@ -3086,6 +3114,10 @@ msgstr "division by zero" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "empty" @@ -3189,7 +3221,7 @@ msgstr "first argument must be a callable" msgid "first argument must be a function" msgstr "first argument must be a function" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "first argument must be a tuple of ndarrays" @@ -3254,6 +3286,10 @@ msgstr "function has the same sign at the ends of interval" msgid "function is defined for ndarrays only" msgstr "function is defined for ndarrays only" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3367,7 +3403,7 @@ msgstr "inline assembler must be a function" msgid "input and output shapes are not compatible" msgstr "input and output shapes are not compatible" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "input argument must be an integer, a tuple, or a list" @@ -3375,7 +3411,7 @@ msgstr "input argument must be an integer, a tuple, or a list" msgid "input array length must be power of 2" msgstr "input array length must be power of 2" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "input arrays are not compatible" @@ -3383,6 +3419,10 @@ msgstr "input arrays are not compatible" msgid "input data must be an iterable" msgstr "input data must be an iterable" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "input matrix is asymmetric" @@ -3392,18 +3432,26 @@ msgstr "input matrix is asymmetric" msgid "input matrix is singular" msgstr "input matrix is singular" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "input must be a dense ndarray" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "input must be a tensor of rank 2" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "input must be an ndarray" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "input must be one-dimensional" @@ -3774,7 +3822,11 @@ msgstr "not all arguments converted during string formatting" msgid "not enough arguments for format string" msgstr "not enough arguments for format string" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "number of points must be at least 2" @@ -3832,7 +3884,7 @@ msgstr "object with buffer protocol required" msgid "odd-length string" msgstr "odd-length string" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "offset is too large" @@ -3840,7 +3892,7 @@ msgstr "offset is too large" msgid "offset must be >= 0" msgstr "offset must be >= 0" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "offset must be non-negative and not greater than buffer length" @@ -3981,18 +4033,26 @@ msgstr "pow() 3rd argument cannot be 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() with 3 arguments requires integers" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4317,7 +4377,7 @@ msgstr "tobytes can be invoked for dense arrays only" msgid "too many arguments provided with the given format" msgstr "too many arguments provided with the given format" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "too many dimensions" @@ -4501,7 +4561,7 @@ msgstr "WatchDog timeout must be greater than 0" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "width must be from 2 to 8 (inclusive), not %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "width must be greater than zero" @@ -4518,7 +4578,7 @@ msgstr "window must be <= interval" msgid "wrong axis index" msgstr "wrong axis index" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "wrong axis specified" @@ -4526,7 +4586,11 @@ msgstr "wrong axis specified" msgid "wrong input type" msgstr "wrong input type" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "wrong number of arguments" @@ -4570,6 +4634,9 @@ msgstr "zi must be of float type" msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" +#~ msgid "Unsupported pull value." +#~ msgstr "Unsupported pull value." + #~ msgid "%q must <= %d" #~ msgstr "%q must <= %d" diff --git a/locale/es.po b/locale/es.po index 330eda2c2a..8eb3848fcd 100644 --- a/locale/es.po +++ b/locale/es.po @@ -155,6 +155,10 @@ msgstr "%q debe estar entre %d y %d" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -589,7 +593,7 @@ msgstr "Ambos pines deben soportar interrupciones por hardware" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "El brillo debe ser 0-1.0" @@ -675,6 +679,10 @@ 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" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC o suma de comprobación inválida" @@ -1395,6 +1403,10 @@ msgstr "Formato de fragmento de formato no válido" msgid "Invalid memory access." msgstr "Acceso a memoria no válido." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -1495,7 +1507,7 @@ msgstr "Tamaño no válido de palabra/bit" msgid "Key must be 16, 24, or 32 bytes long" msgstr "La llave debe tener 16, 24 o 32 bytes de longitud" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -1629,7 +1641,7 @@ msgstr "No se encontró el canal DMA" msgid "No DMA pacing timer found" msgstr "timer por establecedor de paso DMA no encontrado" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "No hay dispositivo I2C en la dirección: %x" @@ -1937,7 +1949,7 @@ msgstr "Pin no tiene capacidad ADC" msgid "Pin interrupt already in use" msgstr "Interrupción de Pin ya está en uso" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "El pin es solo de entrada" @@ -2025,6 +2037,10 @@ msgstr "Pull no se usa cuando la dirección es output." msgid "RAISE mode is not implemented" msgstr "El modo RAISE no esta implementado" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "Error de desinicialización de RNG" @@ -2142,7 +2158,7 @@ msgstr "Sample rate debe ser positivo" msgid "Sample rate too high. It must be less than %d" msgstr "Frecuencia de muestreo demasiado alta. Debe ser menor a %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2413,7 +2429,7 @@ msgstr "No se pudieron asignar buffers para la conversión con signo" msgid "Unable to create lock" msgstr "No se puede crear bloqueo" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "No se puede encontrar la pantalla I2C en %x" @@ -2507,10 +2523,6 @@ msgstr "Formato no soportado" msgid "Unsupported operation" msgstr "Operación no soportada" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "valor pull no soportado." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "La actualización fallo" @@ -2685,7 +2697,7 @@ msgstr "intento de obtener argmin/argmax de una secuencia vacía" msgid "attributes not supported yet" msgstr "atributos aún no soportados" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "Eje está fuera de sus límites" @@ -2741,11 +2753,11 @@ msgstr "bits_per_sample debe ser 8 ó 16" msgid "branch not in range" msgstr "la rama no está dentro del rango" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "El buffer es mas pequeño que el requerido" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "El tamaño del buffer debe ser un múltiplo del tamaño del elemento" @@ -2795,6 +2807,10 @@ msgstr "calibration es de solo lectura" msgid "calibration value out of range +/-127" msgstr "Valor de calibración fuera del rango +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "solo puede tener hasta 4 parámetros para ensamblar Thumb" @@ -2833,6 +2849,10 @@ msgstr "no se puede convertir %s a complejo" msgid "can't convert '%q' object to %q implicitly" msgstr "no se puede convertir el objeto '%q' a %q implícitamente" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "no puede convertir a %q" @@ -2932,6 +2952,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "No se puede realizar cast de la salida sin una regla de cast" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "no se pueden crear '%q' instancias" @@ -3125,6 +3153,10 @@ msgstr "división por cero" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "vacío" @@ -3228,7 +3260,7 @@ msgstr "se debe poder llamar al primer argumento" msgid "first argument must be a function" msgstr "el primer argumento debe ser una función" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "Primer argumento tiene que ser una tupla de ndarrays" @@ -3293,6 +3325,10 @@ msgstr "la función tiene el mismo signo a extremos del intervalo" msgid "function is defined for ndarrays only" msgstr "Función solo definida para ndarrays" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3406,7 +3442,7 @@ msgstr "ensamblador en línea debe ser una función" msgid "input and output shapes are not compatible" msgstr "Formas de entrada y salida no son compatibles" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "argumento de entrada debe ser un entero, una tupla o una lista" @@ -3414,7 +3450,7 @@ msgstr "argumento de entrada debe ser un entero, una tupla o una lista" msgid "input array length must be power of 2" msgstr "el tamaño del arreglo de entrada debe ser potencia de 2" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "Arrays de entrada no son compactibles" @@ -3422,6 +3458,10 @@ msgstr "Arrays de entrada no son compactibles" msgid "input data must be an iterable" msgstr "los datos de entrada deben ser iterables" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "la matriz de entrada es asimétrica" @@ -3431,18 +3471,26 @@ msgstr "la matriz de entrada es asimétrica" msgid "input matrix is singular" msgstr "la matriz de entrada es singular" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "Entrada tiene que ser un ndarray denso" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "Entrada tiene que ser un tensor de rango 2" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "Entrada tiene que ser un ndarray" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "Entrada tiene que ser unidimensional" @@ -3820,7 +3868,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "no suficientes argumentos para format string" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "el número de puntos debe ser al menos 2" @@ -3878,7 +3930,7 @@ msgstr "objeto con protocolo de buffer requerido" msgid "odd-length string" msgstr "string de longitud impar" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "offset es demasiado grande" @@ -3886,7 +3938,7 @@ msgstr "offset es demasiado grande" msgid "offset must be >= 0" msgstr "offset debe ser >= 0" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "offset debe ser non-negative y no mayo que la longitud del buffer" @@ -4027,18 +4079,26 @@ 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/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4364,7 +4424,7 @@ 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/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "demasiadas dimensiones" @@ -4548,7 +4608,7 @@ msgstr "el tiempo de espera del perro guardián debe ser mayor a 0" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "ancho debe estar entre 2 y 8 (inclusivamente), no %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "el ancho debe ser mayor que cero" @@ -4565,7 +4625,7 @@ msgstr "la ventana debe ser <= intervalo" msgid "wrong axis index" msgstr "indice de eje erróneo" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "eje especificado erróneo" @@ -4573,7 +4633,11 @@ msgstr "eje especificado erróneo" msgid "wrong input type" msgstr "tipo de entrada incorrecta" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "numero erroneo de argumentos" @@ -4617,6 +4681,9 @@ 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 "Unsupported pull value." +#~ msgstr "valor pull no soportado." + #~ msgid "%q must <= %d" #~ msgstr "%q debe ser <= %d" diff --git a/locale/fil.po b/locale/fil.po index cdf24b9389..f6dbe03030 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -146,6 +146,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -581,7 +585,7 @@ msgstr "Ang parehong mga pin ay dapat na sumusuporta sa hardware interrupts" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -667,6 +671,10 @@ msgstr "Sa gitna ng 0 o 255 dapat ang bytes." msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -1377,6 +1385,10 @@ msgstr "Mali ang format ng chunk size" msgid "Invalid memory access." msgstr "" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -1477,7 +1489,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -1607,7 +1619,7 @@ msgstr "Walang DMA channel na mahanap" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1911,7 +1923,7 @@ msgstr "Ang pin ay walang kakayahan sa ADC" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -1993,6 +2005,10 @@ msgstr "Pull hindi ginagamit kapag ang direksyon ay output." msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2110,7 +2126,7 @@ msgstr "Sample rate ay dapat positibo" msgid "Sample rate too high. It must be less than %d" msgstr "Sample rate ay masyadong mataas. Ito ay dapat hindi hiigit sa %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2371,7 +2387,7 @@ msgstr "Hindi ma-allocate ang buffers para sa naka-sign na conversion" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -2465,10 +2481,6 @@ msgstr "Hindi supportadong format" msgid "Unsupported operation" msgstr "Hindi sinusuportahang operasyon" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Hindi suportado ang pull value." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2638,7 +2650,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "attributes hindi sinusuportahan" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2694,11 +2706,11 @@ msgstr "bits_per_sample ay dapat 8 o 16" msgid "branch not in range" msgstr "branch wala sa range" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2749,6 +2761,10 @@ msgstr "pagkakalibrate ay basahin lamang" msgid "calibration value out of range +/-127" msgstr "ang halaga ng pagkakalibrate ay wala sa sakop +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "maaari lamang magkaroon ng hanggang 4 na parameter sa Thumb assembly" @@ -2788,6 +2804,10 @@ msgstr "hindi ma-convert %s sa complex" msgid "can't convert '%q' object to %q implicitly" msgstr "hindi maaaring i-convert ang '%q' na bagay sa %q nang walang pahiwatig" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2887,6 +2907,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "hindi magawa '%q' instances" @@ -3082,6 +3110,10 @@ msgstr "dibisyon ng zero" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "walang laman" @@ -3186,7 +3218,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3251,6 +3283,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3365,7 +3401,7 @@ msgstr "inline assembler ay dapat na function" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3373,7 +3409,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3381,6 +3417,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3390,18 +3430,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3776,7 +3824,11 @@ msgstr "hindi lahat ng arguments na i-convert habang string formatting" msgid "not enough arguments for format string" msgstr "kulang sa arguments para sa format string" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3834,7 +3886,7 @@ msgstr "object na may buffer protocol kinakailangan" msgid "odd-length string" msgstr "odd-length string" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3842,7 +3894,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -3985,18 +4037,26 @@ 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/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4323,7 +4383,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "masyadong maraming mga argumento na ibinigay sa ibinigay na format" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4507,7 +4567,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" @@ -4524,7 +4584,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4532,7 +4592,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "mali ang bilang ng argumento" @@ -4578,6 +4642,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Unsupported pull value." +#~ msgstr "Hindi suportado ang pull value." + #, c-format #~ msgid "" #~ "Welcome to Adafruit CircuitPython %s!\n" diff --git a/locale/fr.po b/locale/fr.po index 4e938bae59..8c4a077157 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -8,8 +8,8 @@ msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-11-26 13:46+0000\n" -"Last-Translator: Maxime Leroy \n" +"PO-Revision-Date: 2021-12-13 05:53+0000\n" +"Last-Translator: Jeff Epler \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" @@ -155,6 +155,10 @@ msgstr "%q doit être entre %d et %d" msgid "%q must be of type %q" msgstr "%q doit être du type %q" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "%q doit être une puissance de 2" @@ -591,7 +595,7 @@ msgstr "Les deux broches doivent supporter les interruptions matérielles" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "La luminosité doit être de 0 à 1.0" @@ -676,6 +680,10 @@ 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" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC ou somme de contrôle invalide" @@ -1408,6 +1416,10 @@ msgstr "Taille de bloc de formatage invalide" msgid "Invalid memory access." msgstr "Accès à la mémoire invalide." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "Adresse MAC multicast invalide" @@ -1508,7 +1520,7 @@ msgstr "Longueur de mot / bit invalide" msgid "Key must be 16, 24, or 32 bytes long" msgstr "La clé doit comporter 16, 24 ou 32 octets" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "La disposition des LED doit correspondre à la taille de l'écran" @@ -1640,7 +1652,7 @@ msgstr "Aucun canal DMA trouvé" msgid "No DMA pacing timer found" msgstr "Aucun minuteur de rythme DMA trouvé" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "Pas de dispositif I2C à l'adresse : %x" @@ -1950,7 +1962,7 @@ msgstr "La broche 'pin' ne supporte pas les capacitées ADC" msgid "Pin interrupt already in use" msgstr "L'interruption de cette broche est déjà utilisée" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "La broche est entrée uniquement" @@ -2038,6 +2050,10 @@ msgstr "Le tirage 'pull' n'est pas utilisé quand la direction est 'output'." msgid "RAISE mode is not implemented" msgstr "Mode RAISE n'est pas implémenté" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "Erreur de désinitialisation du RNG" @@ -2154,7 +2170,7 @@ msgstr "Le taux d'échantillonage doit être positif" msgid "Sample rate too high. It must be less than %d" msgstr "Taux d'échantillonage trop élevé. Doit être inférieur à %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "La dimension d'échelle doit être un multiple de 3" @@ -2429,7 +2445,7 @@ msgstr "Impossible d'allouer des tampons pour une conversion signée" msgid "Unable to create lock" msgstr "Impossible de créer un verrou ('lock')" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "Impossible de trouver l'affichage I2C à %x" @@ -2524,10 +2540,6 @@ msgstr "Format non supporté" msgid "Unsupported operation" msgstr "Opération non supportée" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Valeur de tirage 'pull' non supportée." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "Mise-à-jour échouée" @@ -2708,7 +2720,7 @@ msgstr "tenter d'obtenir argmin / argmax d'une séquence vide" msgid "attributes not supported yet" msgstr "attribut pas encore supporté" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "axis est hors limites" @@ -2764,11 +2776,11 @@ msgstr "'bits_per_sample' doivent être 8 ou 16" msgid "branch not in range" msgstr "branche hors-bornes" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "tampon est plus petit que la taille demandée" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "taille du tampon doit être un multiple de la taille de l'élement" @@ -2818,6 +2830,10 @@ msgstr "étalonnage en lecture seule" msgid "calibration value out of range +/-127" msgstr "valeur de étalonnage hors bornes +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "il peut y avoir jusqu'à 4 paramètres pour l'assemblage Thumb" @@ -2857,6 +2873,10 @@ msgstr "ne peut convertir %s en nombre complexe" msgid "can't convert '%q' object to %q implicitly" msgstr "impossible de convertir l'objet '%q' en '%q' implicitement" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "impossible de convertir en %q" @@ -2957,6 +2977,14 @@ msgstr "ne peut assigner une nouvelle forme" msgid "cannot cast output with casting rule" msgstr "output ne peut être projeté sans règle de projection" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "ne peut pas créer une instance de '%q'" @@ -3152,6 +3180,10 @@ msgstr "division par zéro" msgid "divisor must be 4" msgstr "le diviseur doit être 4" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "vide" @@ -3255,7 +3287,7 @@ msgstr "le premier argument doit être un appelable" msgid "first argument must be a function" msgstr "le premier argument doit être une fonction" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "le premier paramêtre doit être un tuple de ndarrays" @@ -3320,6 +3352,10 @@ msgstr "la fonction a le même signe aux extrémités de l’intervalle" msgid "function is defined for ndarrays only" msgstr "fonction définie que pour les ndarrays" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3434,7 +3470,7 @@ msgstr "l'assembleur doit être une fonction" 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 +#: extmod/ulab/code/numpy/create.c 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" @@ -3442,7 +3478,7 @@ msgstr "Paramètre entrant doit être un chiffre entier, un tuple, ou une liste" msgid "input array length must be power of 2" msgstr "longueur de la matrice d'entrée doit être une puissance de 2" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "les matrices d'entrée ne sont pas compatibles" @@ -3450,6 +3486,10 @@ msgstr "les matrices d'entrée ne sont pas compatibles" msgid "input data must be an iterable" msgstr "les données d'entrée doivent être un itérable" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "la matrice d'entrée est asymétrique" @@ -3459,18 +3499,26 @@ msgstr "la matrice d'entrée est asymétrique" msgid "input matrix is singular" msgstr "la matrice d'entrée est singulière" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "l'entrée doit être un ndarray dense" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "l'entrée doit être un tenseur de rang 2" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "l'entrée doit être un ndarray" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "l'entrée doit être uni-dimensionelle" @@ -3566,7 +3614,6 @@ msgid "invalid syntax for number" msgstr "syntaxe invalide pour un nombre" #: py/objexcept.c -#, fuzzy msgid "invalid traceback" msgstr "traceback invalide" @@ -3849,7 +3896,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "pas assez d'arguments pour la chaîne de format" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "le nombre de points doit être d'au moins 2" @@ -3907,7 +3958,7 @@ msgstr "un objet avec un protocole de tampon est nécessaire" msgid "odd-length string" msgstr "chaîne de longueur impaire" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "offset est trop large" @@ -3915,7 +3966,7 @@ msgstr "offset est trop large" msgid "offset must be >= 0" msgstr "offset doit être >= 0" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "offset doit être non-négatif, et au plus la taille du tampon" @@ -4059,18 +4110,26 @@ 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/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4396,7 +4455,7 @@ msgstr "tobytes ne peut être appelée que pour des matrices dense" msgid "too many arguments provided with the given format" msgstr "trop d'arguments fournis avec ce format" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "Trop de dimensions" @@ -4580,7 +4639,7 @@ msgstr "watchdog timeout doit être supérieur à 0" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "width doit être entre 2 et 8 (inclusivement), non %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "width doit être plus que zero" @@ -4597,7 +4656,7 @@ msgstr "la fenêtre (window) doit être <= intervalle (interval)" msgid "wrong axis index" msgstr "index d'axe incorrecte" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "axe incorrecte spécifiée" @@ -4605,7 +4664,11 @@ msgstr "axe incorrecte spécifiée" msgid "wrong input type" msgstr "type d'entrée incorrect" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "mauvais nombres d'arguments" @@ -4649,6 +4712,9 @@ 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 "Unsupported pull value." +#~ msgstr "Valeur de tirage 'pull' non supportée." + #, c-format #~ msgid "" #~ "Welcome to Adafruit CircuitPython %s!\n" diff --git a/locale/hi.po b/locale/hi.po index 7d6327a2ee..4030db6510 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -144,6 +144,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -574,7 +578,7 @@ msgstr "" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -659,6 +663,10 @@ msgstr "" msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -1362,6 +1370,10 @@ msgstr "" msgid "Invalid memory access." msgstr "" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -1462,7 +1474,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -1592,7 +1604,7 @@ msgstr "" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1892,7 +1904,7 @@ msgstr "" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -1974,6 +1986,10 @@ msgstr "" msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2090,7 +2106,7 @@ msgstr "" msgid "Sample rate too high. It must be less than %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2351,7 +2367,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -2443,10 +2459,6 @@ msgstr "" msgid "Unsupported operation" msgstr "" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "" - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2616,7 +2628,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2672,11 +2684,11 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2726,6 +2738,10 @@ msgstr "" msgid "calibration value out of range +/-127" msgstr "" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "" @@ -2764,6 +2780,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2858,6 +2878,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3049,6 +3077,10 @@ msgstr "" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3152,7 +3184,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3217,6 +3249,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3330,7 +3366,7 @@ msgstr "" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3338,7 +3374,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3346,6 +3382,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3355,18 +3395,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3737,7 +3785,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3795,7 +3847,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3803,7 +3855,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -3944,18 +3996,26 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4278,7 +4338,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4462,7 +4522,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" @@ -4479,7 +4539,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4487,7 +4547,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index 0f57f5ba80..c97b1f8910 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -154,6 +154,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -589,7 +593,7 @@ msgstr "Entrambi i pin devono supportare gli interrupt hardware" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "La luminosità deve essere tra 0-1.0" @@ -674,6 +678,10 @@ msgstr "I byte devono essere compresi tra 0 e 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "I blocchi CBC devono essere multipli di 16 bytes" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC o controllo totale è risultato non valido" @@ -1386,6 +1394,10 @@ msgstr "" msgid "Invalid memory access." msgstr "" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -1487,7 +1499,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -1618,7 +1630,7 @@ msgstr "Nessun canale DMA trovato" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1927,7 +1939,7 @@ msgstr "Il pin non ha capacità di ADC" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -2010,6 +2022,10 @@ msgstr "" msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2129,7 +2145,7 @@ msgid "Sample rate too high. It must be less than %d" msgstr "" "Frequenza di campionamento troppo alta. Il valore deve essere inferiore a %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2390,7 +2406,7 @@ msgstr "Ipossibilitato ad allocare buffer per la conversione con segno" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -2484,10 +2500,6 @@ msgstr "Formato non supportato" msgid "Unsupported operation" msgstr "Operazione non supportata" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Valore di pull non supportato." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2657,7 +2669,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "attributi non ancora supportati" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2715,11 +2727,11 @@ msgstr "i bit devono essere 7, 8 o 9" msgid "branch not in range" msgstr "argomento di chr() non è in range(256)" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2770,6 +2782,10 @@ msgstr "la calibrazione è in sola lettura" msgid "calibration value out of range +/-127" msgstr "valore di calibrazione fuori intervallo +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c #, fuzzy msgid "can only have up to 4 parameters to Thumb assembly" @@ -2809,6 +2825,10 @@ msgstr "non è possibile convertire a complex" msgid "can't convert '%q' object to %q implicitly" msgstr "impossibile convertire l'oggetto '%q' implicitamente in %q" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2903,6 +2923,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "creare '%q' istanze" @@ -3099,6 +3127,10 @@ msgstr "divisione per zero" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "vuoto" @@ -3203,7 +3235,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3268,6 +3300,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3382,7 +3418,7 @@ msgstr "inline assembler deve essere una funzione" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3390,7 +3426,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3398,6 +3434,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3407,18 +3447,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3796,7 +3844,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "argomenti non sufficienti per la stringa di formattazione" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3854,7 +3906,7 @@ msgstr "" msgid "odd-length string" msgstr "stringa di lunghezza dispari" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3862,7 +3914,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -4007,18 +4059,26 @@ 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/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4345,7 +4405,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "troppi argomenti forniti con il formato specificato" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4529,7 +4589,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" @@ -4546,7 +4606,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4554,7 +4614,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "numero di argomenti errato" @@ -4600,6 +4664,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Unsupported pull value." +#~ msgstr "Valore di pull non supportato." + #~ msgid "integer required" #~ msgstr "intero richiesto" diff --git a/locale/ja.po b/locale/ja.po index 5c76879f82..abd69060ea 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -149,6 +149,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -581,7 +585,7 @@ msgstr "両方のピンにハードウェア割り込み対応が必要" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "brightnessは0から1.0まででなければなりません" @@ -666,6 +670,10 @@ msgstr "バイト値は0から255の間でなければなりません" msgid "CBC blocks must be multiples of 16 bytes" msgstr "CBCブロックは16バイトの整数倍でなければなりません" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -1373,6 +1381,10 @@ msgstr "フォーマットチャンクのサイズが不正" msgid "Invalid memory access." msgstr "不正なメモリアクセス" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -1473,7 +1485,7 @@ msgstr "不正なワード/ビット長" msgid "Key must be 16, 24, or 32 bytes long" msgstr "Keyの長さは、16, 24, 32バイトのいずれかでなければなりません" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -1603,7 +1615,7 @@ msgstr "DMAチャネルが見つかりません" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1906,7 +1918,7 @@ msgstr "ピンにADCの能力がありません" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "ピンは入力専用" @@ -1988,6 +2000,10 @@ msgstr "方向がoutputのときpullは使われません" msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "RNG解体エラー" @@ -2104,7 +2120,7 @@ msgstr "サンプルレートは正数でなければなりません" msgid "Sample rate too high. It must be less than %d" msgstr "サンプルレートは%d以下でなければなりません" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2366,7 +2382,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "I2Cディスプレイを %x に見つけられません" @@ -2458,10 +2474,6 @@ msgstr "非対応の形式" msgid "Unsupported operation" msgstr "非対応の操作" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "非対応のpull値" - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2631,7 +2643,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "属性は未対応です" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2687,11 +2699,11 @@ msgstr "bits_per_sampleは8または16でなければなりません" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2741,6 +2753,10 @@ msgstr "calibrationは読み込み専用" msgid "calibration value out of range +/-127" msgstr "" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "" @@ -2779,6 +2795,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "オブジェクト '%q' を %q に暗黙に変換できません" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "%q に変換できません" @@ -2873,6 +2893,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3068,6 +3096,10 @@ msgstr "ゼロ除算 (division by zero)" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3171,7 +3203,7 @@ msgstr "1つ目の引数は呼び出し可能でなければなりません" msgid "first argument must be a function" msgstr "1つ目の引数は関数でなければなりません" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3236,6 +3268,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3350,7 +3386,7 @@ msgstr "インラインアセンブラは関数でなければなりません" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3358,7 +3394,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "入力array長は2の累乗でなければなりません" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3366,6 +3402,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "入力行列が非対称" @@ -3375,18 +3415,26 @@ msgstr "入力行列が非対称" msgid "input matrix is singular" msgstr "入力が非正則行列" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3757,7 +3805,11 @@ msgstr "文字列書式化で全ての引数が使われていません" msgid "not enough arguments for format string" msgstr "書式化文字列への引数が足りません" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3815,7 +3867,7 @@ msgstr "" msgid "odd-length string" msgstr "奇数長の文字列" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3823,7 +3875,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -3966,18 +4018,26 @@ msgstr "pow()の3つ目の引数は0にできません" msgid "pow() with 3 arguments requires integers" msgstr "pow()の第3引数には整数が必要" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4301,7 +4361,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "指定された書式に対して引数が多すぎます" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4485,7 +4545,7 @@ msgstr "watchdogのtimeoutは0以上でなければなりません" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" @@ -4502,7 +4562,7 @@ msgstr "windowはinterval以下でなければなりません" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4510,7 +4570,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "" @@ -4554,6 +4618,9 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Unsupported pull value." +#~ msgstr "非対応のpull値" + #~ msgid "integer required" #~ msgstr "整数が必要" diff --git a/locale/ko.po b/locale/ko.po index b6a7791ae6..0de21ab65f 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -145,6 +145,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -577,7 +581,7 @@ msgstr "" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "" @@ -662,6 +666,10 @@ msgstr "바이트는 0에서 255 사이 여야합니다." msgid "CBC blocks must be multiples of 16 bytes" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -1365,6 +1373,10 @@ msgstr "형식 청크 크기가 잘못되었습니다" msgid "Invalid memory access." msgstr "" +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -1465,7 +1477,7 @@ msgstr "" msgid "Key must be 16, 24, or 32 bytes long" msgstr "" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -1595,7 +1607,7 @@ msgstr "" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1895,7 +1907,7 @@ msgstr "" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -1977,6 +1989,10 @@ msgstr "" msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2093,7 +2109,7 @@ msgstr "" msgid "Sample rate too high. It must be less than %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2355,7 +2371,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -2447,10 +2463,6 @@ msgstr "" msgid "Unsupported operation" msgstr "" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "" - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2620,7 +2632,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2676,11 +2688,11 @@ msgstr "bits_per_sample은 8 또는 16이어야합니다." msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2730,6 +2742,10 @@ msgstr "" msgid "calibration value out of range +/-127" msgstr "" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "" @@ -2768,6 +2784,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2862,6 +2882,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3053,6 +3081,10 @@ msgstr "" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3156,7 +3188,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3221,6 +3253,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3334,7 +3370,7 @@ msgstr "" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3342,7 +3378,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3350,6 +3386,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3359,18 +3399,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3741,7 +3789,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3799,7 +3851,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3807,7 +3859,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -3948,18 +4000,26 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4282,7 +4342,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4466,7 +4526,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" @@ -4483,7 +4543,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4491,7 +4551,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 2d888bc99a..9a0b40799f 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -147,6 +147,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -579,7 +583,7 @@ msgstr "Beide pinnen moeten hardware interrupts ondersteunen" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Helderheid moet tussen de 0 en 1.0 liggen" @@ -664,6 +668,10 @@ 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" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -1374,6 +1382,10 @@ msgstr "Ongeldig formaat stuk grootte" msgid "Invalid memory access." msgstr "Ongeldig geheugen adres." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -1474,7 +1486,7 @@ msgstr "Ongeldig woord/bit lengte" msgid "Key must be 16, 24, or 32 bytes long" msgstr "Sleutel moet 16, 24, of 32 bytes lang zijn" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -1604,7 +1616,7 @@ msgstr "Geen DMA kanaal gevonden" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "Geen I2C-apparaat op adres: %x" @@ -1913,7 +1925,7 @@ msgstr "Pin heeft geen ADC mogelijkheden" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "Pin kan alleen voor invoer gebruikt worden" @@ -2000,6 +2012,10 @@ msgstr "Pull niet gebruikt wanneer de richting output is." msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "RNG DeInit Fout" @@ -2116,7 +2132,7 @@ msgstr "Sample rate moet positief zijn" msgid "Sample rate too high. It must be less than %d" msgstr "Sample rate is te hoog. Moet minder dan %d zijn" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2377,7 +2393,7 @@ msgstr "Niet in staat buffers voor gesigneerde conversie te alloceren" msgid "Unable to create lock" msgstr "Kan vergrendeling niet maken" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "Geen I2C beeldscherm gevonden bij %x" @@ -2471,10 +2487,6 @@ msgstr "Niet-ondersteunde format" msgid "Unsupported operation" msgstr "Niet-ondersteunde operatie" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Niet-ondersteunde pull-waarde." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "Update Mislukt" @@ -2648,7 +2660,7 @@ msgstr "poging om argmin/argmax van een lege sequentie te krijgen" msgid "attributes not supported yet" msgstr "attributen nog niet ondersteund" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "as is buiten bereik" @@ -2704,11 +2716,11 @@ msgstr "bits_per_sample moet 8 of 16 zijn" msgid "branch not in range" msgstr "pad (branch) niet binnen bereik" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2758,6 +2770,10 @@ msgstr "calibration is alleen-lezen" msgid "calibration value out of range +/-127" msgstr "calibration waarde buiten bereik +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "kan slechts 4 parameters aan Thumb assembly geven" @@ -2797,6 +2813,10 @@ msgstr "kan %s niet converteren naar een complex" msgid "can't convert '%q' object to %q implicitly" msgstr "kan '%q' object niet omzetten naar %q impliciet" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "kan niet naar %q converteren" @@ -2891,6 +2911,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "kan uitvoer niet converteren zonder conversieregel" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "kan geen instanties van '%q' creëren" @@ -3085,6 +3113,10 @@ msgstr "deling door nul" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "leeg" @@ -3188,7 +3220,7 @@ msgstr "eerste argument moet een aanroepbare (callable) zijn" msgid "first argument must be a function" msgstr "eerste argument moet een functie zijn" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "eerste argument moet een tupel van ndarrays zijn" @@ -3253,6 +3285,10 @@ msgstr "functie heeft hetzelfde teken aan beide uiteinden van het interval" msgid "function is defined for ndarrays only" msgstr "functie is alleen gedefinieerd voor ndarrays" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3367,7 +3403,7 @@ msgstr "inline assembler moet een functie zijn" msgid "input and output shapes are not compatible" msgstr "in- en uitvoervormen zijn niet compatibel" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3375,7 +3411,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "invoer array lengte moet een macht van 2 zijn" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "input arrays zijn niet compatibel" @@ -3383,6 +3419,10 @@ msgstr "input arrays zijn niet compatibel" msgid "input data must be an iterable" msgstr "invoerdata moet itereerbaar zijn" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "invoermatrix is asymmetrisch" @@ -3392,18 +3432,26 @@ msgstr "invoermatrix is asymmetrisch" msgid "input matrix is singular" msgstr "invoermatrix is singulier" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "invoer moet een gesloten ndarray zijn" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "invoer moet een tensor van rang 2 zijn" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "invoer moet een ndarray zijn" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "invoer moet eendimensionaal zijn" @@ -3777,7 +3825,11 @@ msgstr "niet alle argumenten omgezet bij formattering van string" msgid "not enough arguments for format string" msgstr "niet genoeg argumenten om string te formatteren" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "aantal punten moet minimaal 2 zijn" @@ -3835,7 +3887,7 @@ msgstr "object met buffer protocol vereist" msgid "odd-length string" msgstr "string met oneven lengte" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "compensatie is te groot" @@ -3843,7 +3895,7 @@ msgstr "compensatie is te groot" msgid "offset must be >= 0" msgstr "compensatie moet groter of gelijk 0 zijn" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -3985,18 +4037,26 @@ msgstr "derde argument van pow() mag geen 0 zijn" msgid "pow() with 3 arguments requires integers" msgstr "pow() met 3 argumenten vereist integers" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4321,7 +4381,7 @@ msgstr "tobytes kunnen alleen ingeroepen worden voor gesloten arrays" msgid "too many arguments provided with the given format" msgstr "te veel argumenten opgegeven bij dit formaat" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4505,7 +4565,7 @@ msgstr "watchdog time-out moet groter zijn dan 0" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "breedte moet groter dan nul zijn" @@ -4522,7 +4582,7 @@ msgstr "window moet <= interval zijn" msgid "wrong axis index" msgstr "foute index voor as" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "onjuiste as gespecificeerd" @@ -4530,7 +4590,11 @@ msgstr "onjuiste as gespecificeerd" msgid "wrong input type" msgstr "onjuist invoertype" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "onjuist aantal argumenten" @@ -4574,6 +4638,9 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "Unsupported pull value." +#~ msgstr "Niet-ondersteunde pull-waarde." + #, c-format #~ msgid "" #~ "Welcome to Adafruit CircuitPython %s!\n" diff --git a/locale/pl.po b/locale/pl.po index 77d99ea668..4c2b1782ce 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -149,6 +149,10 @@ msgstr "" msgid "%q must be of type %q" msgstr "" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "" @@ -581,7 +585,7 @@ msgstr "Obie nóżki muszą wspierać przerwania sprzętowe" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Jasność musi wynosić 0-1,0" @@ -666,6 +670,10 @@ 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" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "" @@ -1373,6 +1381,10 @@ msgstr "Zła wielkość fragmentu formatu" msgid "Invalid memory access." msgstr "Nieprawidłowy dostęp do pamięci." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "" @@ -1473,7 +1485,7 @@ msgstr "Niepoprawna długość słowa/bitu" msgid "Key must be 16, 24, or 32 bytes long" msgstr "Klucz musi mieć długość 16, 24 lub 32 bajtów" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -1603,7 +1615,7 @@ msgstr "Nie znaleziono kanału DMA" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "" @@ -1903,7 +1915,7 @@ msgstr "Nóżka nie obsługuje ADC" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -1985,6 +1997,10 @@ msgstr "Podciągnięcie nieużywane w trybie wyjścia." msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2101,7 +2117,7 @@ msgstr "Częstotliwość próbkowania musi być dodatnia" msgid "Sample rate too high. It must be less than %d" msgstr "Zbyt wysoka częstotliwość próbkowania. Musi być mniejsza niż %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2362,7 +2378,7 @@ msgstr "Nie udała się alokacja buforów do konwersji ze znakiem" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -2454,10 +2470,6 @@ msgstr "Zły format" msgid "Unsupported operation" msgstr "Zła operacja" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Zła wartość podciągnięcia." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2627,7 +2639,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "atrybuty nie są jeszcze obsługiwane" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2683,11 +2695,11 @@ msgstr "bits_per_sample musi być 8 lub 16" msgid "branch not in range" msgstr "skok poza zakres" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2737,6 +2749,10 @@ msgstr "kalibracja tylko do odczytu" msgid "calibration value out of range +/-127" msgstr "wartość kalibracji poza zakresem +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "asembler Thumb może przyjąć do 4 parameterów" @@ -2775,6 +2791,10 @@ msgstr "nie można skonwertować %s do complex" msgid "can't convert '%q' object to %q implicitly" msgstr "nie można automatycznie skonwertować '%q' do '%q'" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2869,6 +2889,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "nie można tworzyć instancji '%q'" @@ -3061,6 +3089,10 @@ msgstr "dzielenie przez zero" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "puste" @@ -3164,7 +3196,7 @@ msgstr "" msgid "first argument must be a function" msgstr "pierwszy argument musi być funkcją" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3229,6 +3261,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3342,7 +3378,7 @@ msgstr "wtrącony asembler musi być funkcją" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3350,7 +3386,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "długość tablicy wejściowej musi być potęgą 2" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3358,6 +3394,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3367,18 +3407,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3749,7 +3797,11 @@ msgstr "nie wszystkie argumenty wykorzystane w formatowaniu" msgid "not enough arguments for format string" msgstr "nie dość argumentów przy formatowaniu" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "liczba punktów musi wynosić co najmniej 2" @@ -3807,7 +3859,7 @@ msgstr "wymagany obiekt z protokołem buforu" msgid "odd-length string" msgstr "łańcuch o nieparzystej długości" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3815,7 +3867,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -3957,18 +4009,26 @@ msgstr "trzeci argument pow() nie może być 0" msgid "pow() with 3 arguments requires integers" msgstr "trzyargumentowe pow() wymaga liczb całkowitych" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4292,7 +4352,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "zbyt wiele argumentów podanych dla tego formatu" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4476,7 +4536,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "szerokość musi być większa niż zero" @@ -4493,7 +4553,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4501,7 +4561,11 @@ msgstr "" msgid "wrong input type" msgstr "nieprawidłowy typ wejścia" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "zła liczba argumentów" @@ -4545,6 +4609,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Unsupported pull value." +#~ msgstr "Zła wartość podciągnięcia." + #, c-format #~ msgid "" #~ "Welcome to Adafruit CircuitPython %s!\n" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 4e79af465e..92ffd3ffcf 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-11-24 23:51+0000\n" +"PO-Revision-Date: 2022-01-19 23:56+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.10-dev\n" +"X-Generator: Weblate 4.11-dev\n" #: main.c msgid "" @@ -153,6 +153,10 @@ msgstr "%q deve estar entre %d e %d" msgid "%q must be of type %q" msgstr "%q deve ser do tipo %q" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "%q deve ser do tipo %q ou nenhum" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "%q deve ser a potência de 2" @@ -594,7 +598,7 @@ msgstr "Ambos os pinos devem suportar interrupções de hardware" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "O brilho deve ser 0-1,0" @@ -679,6 +683,10 @@ 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" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "A unidade CIRCUITPY não pôde ser encontrada nem criada." + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC ou checksum inválido" @@ -1399,6 +1407,10 @@ msgstr "Tamanho do pedaço de formato inválido" msgid "Invalid memory access." msgstr "O acesso da memória é inválido." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "Endereço MAC multicast inválido" @@ -1499,7 +1511,7 @@ msgstr "O comprimento do bit/palavra são inválidos" msgid "Key must be 16, 24, or 32 bytes long" msgstr "A chave deve ter 16, 24 ou 32 bytes de comprimento" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "Os mapeamentos do led devem corresponder ao tamanho do display" @@ -1629,7 +1641,7 @@ msgstr "Nenhum canal DMA foi encontrado" msgid "No DMA pacing timer found" msgstr "Nenhum temporizador DMA foi encontrado" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "Nenhum dispositivo I2C no endereço: %x" @@ -1940,7 +1952,7 @@ msgstr "O pino não tem recursos de ADC" msgid "Pin interrupt already in use" msgstr "A interrupção do pino já está em uso" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "Apenas o pino de entrada" @@ -2030,6 +2042,10 @@ msgstr "O Pull não foi usado quando a direção for gerada." msgid "RAISE mode is not implemented" msgstr "O modo RAISE não foi implementado" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "RISE_AND_FALL não está disponível neste chip" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "Erro DeInit RNG" @@ -2146,7 +2162,7 @@ msgstr "A taxa de amostragem deve ser positiva" msgid "Sample rate too high. It must be less than %d" msgstr "Taxa de amostragem muito alta. Deve ser menor que %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "As dimensões da escala devem ser poder ser divididas por 3" @@ -2422,7 +2438,7 @@ msgstr "Não é possível alocar buffers para conversão assinada" msgid "Unable to create lock" msgstr "Não é possível criar um lock" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "Não foi possível encontrar a tela I2C no %x" @@ -2516,10 +2532,6 @@ msgstr "Formato não suportado" msgid "Unsupported operation" msgstr "Operação não suportada" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "O valor pull não é compatível." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "A atualização falou" @@ -2700,7 +2712,7 @@ msgstr "tente obter argmin/argmax de uma sequência vazia" msgid "attributes not supported yet" msgstr "atributos ainda não suportados" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "o eixo está fora dos limites" @@ -2756,11 +2768,11 @@ msgstr "bits_per_sample deve ser 8 ou 16" msgid "branch not in range" msgstr "ramo fora do alcance" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "o tamanho do buffer é menor do que o tamanho que foi solicitado" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "o tamanho do buffer deve ser um múltiplo do tamanho do elemento" @@ -2810,6 +2822,10 @@ msgstr "Calibração é somente leitura" msgid "calibration value out of range +/-127" msgstr "Valor de calibração fora do intervalo +/- 127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "pode ser registrado apenas numa principal" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "só pode haver até 4 parâmetros para a montagem Thumb" @@ -2848,6 +2864,10 @@ msgstr "Não é possível converter %s para complex" msgid "can't convert '%q' object to %q implicitly" msgstr "não é possível converter implicitamente o objeto '%q' para %q" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "não foi possível converter complexo em flutuante" + #: py/obj.c msgid "can't convert to %q" msgstr "não é possível converter para %q" @@ -2946,6 +2966,14 @@ msgstr "não é possível atribuir uma nova forma" msgid "cannot cast output with casting rule" msgstr "não pode lançar a saída com a regra de fundição" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "não foi possível converter complexo em dtype" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "não foi possível converter o tipo complexo" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "não é possível criar instâncias '%q'" @@ -3142,6 +3170,10 @@ msgstr "divisão por zero" msgid "divisor must be 4" msgstr "o divisor deve ser 4" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "dtype deve ser flutuante ou complexo" + #: py/objdeque.c msgid "empty" msgstr "vazio" @@ -3245,7 +3277,7 @@ msgstr "o primeiro argumento deve ser chamável" msgid "first argument must be a function" msgstr "o primeiro argumento deve ser uma função" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "o primeiro argumento deve ser um tuple de ndarrays" @@ -3310,6 +3342,10 @@ msgstr "a função tem o mesmo sinal nas extremidades do intervalo" msgid "function is defined for ndarrays only" msgstr "A função é definida apenas para ndarrays" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "a função está implementada apenas para ndarrays" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3423,7 +3459,7 @@ msgstr "o assembler em linha deve ser uma função" 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 +#: extmod/ulab/code/numpy/create.c 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" @@ -3432,7 +3468,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "comprimento da matriz da entrada deve ter potência de 2" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "as matrizes da entrada não são compatíveis" @@ -3440,6 +3476,10 @@ msgstr "as matrizes da entrada não são compatíveis" msgid "input data must be an iterable" msgstr "os dados da entrada devem ser iteráveis" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "o tipo da entrada dtype deve ser flutuante ou complexo" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "a matriz da entrada é assimétrica" @@ -3449,18 +3489,26 @@ msgstr "a matriz da entrada é assimétrica" msgid "input matrix is singular" msgstr "a matriz da entrada é singular" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "a entrada deve ser um 1D ndarray" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "a entrada deve ser um ndarray denso" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "a entrada dos dados deve ser um tensor de nível 2" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "a entrada deve ser um ndarray" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "a entrada deve ser um ndarray ou um escalar" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "a entrada deve ser unidimensional" @@ -3836,7 +3884,11 @@ msgstr "nem todos os argumentos são convertidos durante a formatação da strin msgid "not enough arguments for format string" msgstr "argumentos insuficientes para o formato da string" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "não foi implementado para dtype complexo" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "a quantidade dos pontos deve ser pelo menos 2" @@ -3894,7 +3946,7 @@ msgstr "é necessário objeto com protocolo do buffer" msgid "odd-length string" msgstr "sequência com comprimento ímpar" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "o offset é muito grande" @@ -3902,7 +3954,7 @@ msgstr "o offset é muito grande" msgid "offset must be >= 0" msgstr "o offset deve ser >= 0" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "o offset deve ser positivo e não maior do que o comprimento do buffer" @@ -4048,18 +4100,26 @@ 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/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4384,7 +4444,7 @@ 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/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "dimensões demais" @@ -4568,7 +4628,7 @@ msgstr "o tempo limite do watchdog deve ser maior que 0" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "a largura deve ser entre 2 a 8 (inclusive), não %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "a largura deve ser maior que zero" @@ -4585,7 +4645,7 @@ msgstr "a janela deve ser <= intervalo" msgid "wrong axis index" msgstr "índice do eixo errado" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "um eixo errado foi definido" @@ -4593,7 +4653,11 @@ msgstr "um eixo errado foi definido" msgid "wrong input type" msgstr "tipo da entrada incorreta" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "comprimento errado na condição da matriz" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "quantidade errada dos argumentos" @@ -4637,6 +4701,9 @@ 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 "Unsupported pull value." +#~ msgstr "O valor pull não é compatível." + #~ msgid "Station must be started" #~ msgstr "A estação deve ser iniciada" diff --git a/locale/ru.po b/locale/ru.po index cb190dede4..5a6bbc5626 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2021-11-29 12:53+0000\n" +"PO-Revision-Date: 2021-12-04 12:51+0000\n" "Last-Translator: Clay \n" "Language-Team: none\n" "Language: ru\n" @@ -74,16 +74,17 @@ msgstr "%%c требует int или char" #, c-format msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" -msgstr "" -"%d адресные выводы, %d rgb выводы и %d плитки указывают высоту %d а не %d" +msgstr "%d адресные пины, %d rgb пины и %d плитки указывают высоту %d а не %d" #: shared-bindings/microcontroller/Pin.c +#, fuzzy msgid "%q and %q contain duplicate pins" -msgstr "%q и %q содержат повторяющиеся выводы" +msgstr "%q и %q содержат пины-дупликаты" #: shared-bindings/microcontroller/Pin.c +#, fuzzy msgid "%q contains duplicate pins" -msgstr "%q содержит повторяющиеся выводы" +msgstr "%q содержит пины-дупликаты" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" @@ -155,6 +156,10 @@ msgstr "%q должен быть между %d и %d" msgid "%q must be of type %q" msgstr "%q должен быть типа %q" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "%q должен быть во 2-й степени" @@ -170,7 +175,7 @@ msgstr "%q вне диапазона" #: ports/atmel-samd/common-hal/microcontroller/Pin.c msgid "%q pin invalid" -msgstr "Вывод %q не допустим" +msgstr "Пин %q не допустим" #: shared-bindings/fontio/BuiltinFont.c msgid "%q should be an int" @@ -434,7 +439,7 @@ msgstr "Все каналы событий синхронизации уже и #: shared-bindings/pwmio/PWMOut.c msgid "All timers for this pin are in use" -msgstr "Все таймеры для этого вывода уже используются" +msgstr "Все таймеры для этого Пина уже используются" #: ports/atmel-samd/common-hal/_pew/PewPew.c #: ports/atmel-samd/common-hal/audioio/AudioOut.c @@ -472,7 +477,7 @@ msgstr "Поиск сетей wifi уже происходит" #: ports/cxd56/common-hal/analogio/AnalogIn.c msgid "AnalogIn not supported on given pin" -msgstr "AnalogIn не поддерживается на данном выводе" +msgstr "AnalogIn не поддерживается на данном пине" #: ports/cxd56/common-hal/analogio/AnalogOut.c #: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c @@ -487,7 +492,7 @@ msgstr "AnalogOut имеет только 16 бит. Значение должн #: ports/atmel-samd/common-hal/analogio/AnalogOut.c msgid "AnalogOut not supported on given pin" -msgstr "AnalogOut не поддерживается на данном выводе" +msgstr "AnalogOut не поддерживается на данном пине" #: ports/stm/common-hal/audiopwmio/PWMAudioOut.c msgid "Another PWMAudioOut is already active" @@ -556,8 +561,7 @@ msgstr "Ниже минимальной частоты кадров" #: ports/raspberrypi/common-hal/audiobusio/I2SOut.c msgid "Bit clock and word select must be sequential pins" msgstr "" -"Битовый тактовый генератор и выбор слова должны быть последовательными " -"выводами" +"Битовый тактовый генератор и выбор слова должны быть последовательными пинами" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Bit clock and word select must share a clock unit" @@ -588,11 +592,11 @@ msgstr "Для управления потоком требуется как RX, #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" -msgstr "Оба вывода должны поддерживать аппаратные прерывания" +msgstr "Оба пина должны поддерживать аппаратные прерывания" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Яркость должна быть в диапазоне от 0 до 1.0" @@ -663,7 +667,7 @@ msgstr "Буферы должны быть одинакового размера #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" -msgstr "Вывод шины %d уже используется" +msgstr "Пин шины %d уже используется" #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." @@ -677,6 +681,10 @@ msgstr "Bytes должен быть в диапазоне от 0 до 255." msgid "CBC blocks must be multiples of 16 bytes" msgstr "Блоки CBC должны быть кратны 16 байтам" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC или контрольная сумма неправильная" @@ -687,7 +695,7 @@ msgstr "Вызовите super().__init__() перед обращением к #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on RTC IO from deep sleep." -msgstr "Сигнал из глубокого сна может подаваться только на выводе RTC IO." +msgstr "Сигнал из глубокого сна может подаваться только на пине RTC IO." #: ports/espressif/common-hal/alarm/pin/PinAlarm.c msgid "Can only alarm on one low pin while others alarm high from deep sleep." @@ -1265,8 +1273,9 @@ msgid "Insufficient encryption" msgstr "Недостаточное шифрование" #: ports/espressif/common-hal/wifi/Radio.c +#, fuzzy msgid "Interface must be started" -msgstr "" +msgstr "Интерфейс должен быть запущен" #: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" @@ -1404,6 +1413,10 @@ msgstr "Неверный размер блока формата" msgid "Invalid memory access." msgstr "Неправильный доступ к памяти." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "Неверный MAC-адрес multicast" @@ -1504,7 +1517,7 @@ msgstr "Недопустимая длина слова/бита" msgid "Key must be 16, 24, or 32 bytes long" msgstr "Ключ должен быть длинной 16, 24 или 32 байта" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "" @@ -1561,9 +1574,9 @@ msgstr "" "Отсутствует first_out_pin. Инструкция %d вводит (shifts out) на вывод(ы)" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c -#, c-format +#, fuzzy, c-format msgid "Missing first_in_pin. Instruction %d waits based on pin" -msgstr "" +msgstr "Отсутствует first_in_pin. Инструкция %d ожидает на основе вывода" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c #, c-format @@ -1636,7 +1649,7 @@ msgstr "Канал DMA не найден" msgid "No DMA pacing timer found" msgstr "" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "Нет устройства I2C по адресу: %x" @@ -1687,7 +1700,7 @@ msgstr "Свободные GCLK отсутствуют" #: shared-bindings/os/__init__.c msgid "No hardware random available" -msgstr "" +msgstr "Отсутствует аппаратный генератор случайных чисел" #: ports/atmel-samd/common-hal/ps2io/Ps2.c msgid "No hardware support on clk pin" @@ -1705,7 +1718,7 @@ msgstr "Нет in в программе" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "No in or out in program" -msgstr "" +msgstr "В программе отсутствует ввод или вывод" #: shared-bindings/aesio/aes.c msgid "No key was specified" @@ -1718,7 +1731,7 @@ msgstr "Нет поддержки длинных целых чисел (long int #: shared-module/usb_hid/__init__.c #, c-format msgid "No more than %d HID devices allowed" -msgstr "" +msgstr "Допускается не более %d HID устройств" #: shared-bindings/wifi/Radio.c msgid "No network with that ssid" @@ -1726,7 +1739,7 @@ msgstr "Нет сети с этим ssid" #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "No out in program" -msgstr "" +msgstr "В программе отсутствует вывод" #: ports/atmel-samd/common-hal/busio/I2C.c #: ports/espressif/common-hal/busio/I2C.c @@ -1773,11 +1786,12 @@ msgstr "Не подключено" #: shared-bindings/audiobusio/I2SOut.c shared-bindings/audioio/AudioOut.c #: shared-bindings/audiopwmio/PWMAudioOut.c msgid "Not playing" -msgstr "" +msgstr "Не играет" #: shared-bindings/_bleio/__init__.c +#, fuzzy msgid "Not settable" -msgstr "" +msgstr "Не устанавливается" #: ports/espressif/common-hal/paralleldisplay/ParallelBus.c #, c-format @@ -1797,8 +1811,9 @@ msgstr "" #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/raspberrypi/common-hal/audiobusio/PDMIn.c +#, fuzzy msgid "Only 8 or 16 bit mono with " -msgstr "" +msgstr "Только 8- или 16-битное моно с " #: ports/espressif/common-hal/wifi/__init__.c msgid "Only IPv4 addresses supported" @@ -1942,7 +1957,7 @@ msgstr "" msgid "Pin interrupt already in use" msgstr "" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "" @@ -2026,6 +2041,10 @@ msgstr "" msgid "RAISE mode is not implemented" msgstr "" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "" @@ -2142,7 +2161,7 @@ msgstr "" msgid "Sample rate too high. It must be less than %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "" @@ -2403,7 +2422,7 @@ msgstr "" msgid "Unable to create lock" msgstr "" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "" @@ -2495,10 +2514,6 @@ msgstr "" msgid "Unsupported operation" msgstr "" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "" - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "" @@ -2668,7 +2683,7 @@ msgstr "" msgid "attributes not supported yet" msgstr "" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "" @@ -2724,11 +2739,11 @@ msgstr "" msgid "branch not in range" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "" @@ -2778,6 +2793,10 @@ msgstr "" msgid "calibration value out of range +/-127" msgstr "" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "" @@ -2816,6 +2835,10 @@ msgstr "" msgid "can't convert '%q' object to %q implicitly" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "" @@ -2910,6 +2933,14 @@ msgstr "" msgid "cannot cast output with casting rule" msgstr "" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "" @@ -3101,6 +3132,10 @@ msgstr "" msgid "divisor must be 4" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "" @@ -3204,7 +3239,7 @@ msgstr "" msgid "first argument must be a function" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "" @@ -3269,6 +3304,10 @@ msgstr "" msgid "function is defined for ndarrays only" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3382,7 +3421,7 @@ msgstr "" msgid "input and output shapes are not compatible" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "" @@ -3390,7 +3429,7 @@ msgstr "" msgid "input array length must be power of 2" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "" @@ -3398,6 +3437,10 @@ msgstr "" msgid "input data must be an iterable" msgstr "" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "" @@ -3407,18 +3450,26 @@ msgstr "" msgid "input matrix is singular" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "" @@ -3789,7 +3840,11 @@ msgstr "" msgid "not enough arguments for format string" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "" @@ -3847,7 +3902,7 @@ msgstr "" msgid "odd-length string" msgstr "" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "" @@ -3855,7 +3910,7 @@ msgstr "" msgid "offset must be >= 0" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "" @@ -3996,18 +4051,26 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4330,7 +4393,7 @@ msgstr "" msgid "too many arguments provided with the given format" msgstr "" -#: extmod/ulab/code/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "" @@ -4514,7 +4577,7 @@ msgstr "" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "" @@ -4531,7 +4594,7 @@ msgstr "" msgid "wrong axis index" msgstr "" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "" @@ -4539,7 +4602,11 @@ msgstr "" msgid "wrong input type" msgstr "" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "" @@ -4576,8 +4643,9 @@ msgid "zi must be an ndarray" msgstr "" #: extmod/ulab/code/scipy/signal/signal.c +#, fuzzy msgid "zi must be of float type" -msgstr "" +msgstr "zi должно быть типа float" #: extmod/ulab/code/scipy/signal/signal.c msgid "zi must be of shape (n_section, 2)" diff --git a/locale/sv.po b/locale/sv.po index 7e6ae3e77c..dcbc7ae8f8 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-11-25 00:02+0000\n" +"PO-Revision-Date: 2022-01-19 23:56+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -14,7 +14,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.10-dev\n" +"X-Generator: Weblate 4.11-dev\n" #: main.c msgid "" @@ -152,6 +152,10 @@ msgstr "%q måste vara mellan %d och %d" msgid "%q must be of type %q" msgstr "%q måste vara av typen %q" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "%q måste vara av typen %q eller None" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "%q måste vara en potens av 2" @@ -584,7 +588,7 @@ msgstr "Båda pinnarna måste stödja maskinvaruavbrott" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Ljusstyrkan måste vara mellan 0 och 1,0" @@ -669,6 +673,10 @@ 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" +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "CIRCUITPY-enheten kunde inte hittas eller skapas." + #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" msgstr "CRC eller checksumma var ogiltig" @@ -1381,6 +1389,10 @@ msgstr "Ogiltig formatsegmentstorlek" msgid "Invalid memory access." msgstr "Ogiltig minnesåtkomst." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" msgstr "Ogiltig MAC-adress för multicast" @@ -1481,7 +1493,7 @@ msgstr "Ogiltig word-/bitlängd" msgid "Key must be 16, 24, or 32 bytes long" msgstr "Nyckeln måste vara 16, 24 eller 32 byte lång" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" msgstr "LED-mappning måste matcha displaystorlek" @@ -1612,7 +1624,7 @@ msgstr "Ingen DMA-kanal hittades" msgid "No DMA pacing timer found" msgstr "Ingen DMA pacing timer hittades" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "Ingen I2C-enhet på adress: %x" @@ -1919,7 +1931,7 @@ msgstr "Pinnen har inte ADC-funktionalitet" msgid "Pin interrupt already in use" msgstr "Pinnavbrott används redan" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "Pinnen är enbart ingång" @@ -2006,6 +2018,10 @@ msgstr "Pull används inte när riktningen är output." msgid "RAISE mode is not implemented" msgstr "RAISE-läge är inte implementerat" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "RISE_AND_FALL är inte tillgängligt på detta chip" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "RNG DeInit-fel" @@ -2122,7 +2138,7 @@ msgstr "Samplingsfrekvensen måste vara positiv" msgid "Sample rate too high. It must be less than %d" msgstr "Samplingsfrekvensen är för hög. Den måste vara mindre än %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" msgstr "Skaldimension måste vara delbar med 3" @@ -2393,7 +2409,7 @@ msgstr "Det går inte att allokera buffert för signerad konvertering" msgid "Unable to create lock" msgstr "Kan inte skapa lås" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "Det gick inte att hitta I2C-display på %x" @@ -2487,10 +2503,6 @@ msgstr "Formatet stöds inte" msgid "Unsupported operation" msgstr "Åtgärd som inte stöds" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Ogiltigt Pull-värde." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "Uppdateringen misslyckades" @@ -2668,7 +2680,7 @@ msgstr "försök att få argmin/argmax för en tom sekvens" msgid "attributes not supported yet" msgstr "attribut stöds inte än" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "axis är utanför gränsen" @@ -2724,11 +2736,11 @@ msgstr "bits_per_sample måste vara 8 eller 16" msgid "branch not in range" msgstr "branch utanför räckvidd" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "bufferten är mindre än begärd storlek" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "buffertstorlek måste vara en multipel av elementstorlek" @@ -2778,6 +2790,10 @@ msgstr "kalibrering är skrivskyddad" msgid "calibration value out of range +/-127" msgstr "kalibreringsvärde utanför intervallet +/- 127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "kan endast registreras med en förälder" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "kan bara ha upp till 4 parametrar för Thumbs assembly" @@ -2816,6 +2832,10 @@ msgstr "kan inte konvertera %s till komplex" msgid "can't convert '%q' object to %q implicitly" msgstr "kan inte konvertera '%q' objekt implicit till %q" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "kan inte konvertera complex till float" + #: py/obj.c msgid "can't convert to %q" msgstr "kan inte konvertera till %q" @@ -2912,6 +2932,14 @@ msgstr "kan inte tilldela en ny form" msgid "cannot cast output with casting rule" msgstr "kan inte casta utdata med regel" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "kan inte konvertera komplex till dtype" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "kan inte konvertera complex typer" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "kan inte skapa instanser av '%q'" @@ -3106,6 +3134,10 @@ msgstr "division med noll" msgid "divisor must be 4" msgstr "divisor måste vara 4" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "dtype måste vara float eller complex" + #: py/objdeque.c msgid "empty" msgstr "tom" @@ -3209,7 +3241,7 @@ msgstr "första argumentet måste vara en callable" msgid "first argument must be a function" msgstr "första argumentet måste vara en funktion" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "första argumentet måste vara en tupel av ndarray" @@ -3274,6 +3306,10 @@ msgstr "funktionen har samma teckenvärden vid slutet av intervall" msgid "function is defined for ndarrays only" msgstr "funktionen är enbart definierad för ndarray" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "funktionen är bara implementerad för ndarrays" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3387,7 +3423,7 @@ msgstr "inline assembler måste vara en funktion" msgid "input and output shapes are not compatible" msgstr "indata- och utdataformer är inte kompatibla" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "indataargument måste vara integer, en tuple eller list" @@ -3395,7 +3431,7 @@ msgstr "indataargument måste vara integer, en tuple eller list" msgid "input array length must be power of 2" msgstr "indataarraylängden måste vara en multipel av 2" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "indatamatriser är inte kompatibla" @@ -3403,6 +3439,10 @@ msgstr "indatamatriser är inte kompatibla" msgid "input data must be an iterable" msgstr "indata måste vara en iterable" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "indatatyp måste vara float eller complex" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "indatamatrisen är asymmetrisk" @@ -3412,18 +3452,26 @@ msgstr "indatamatrisen är asymmetrisk" msgid "input matrix is singular" msgstr "indatamatrisen är singulär" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "indata måste vara en 1D ndarray" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "indata måste vara en dense ndarray" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "indata måste vara en tensor av rank 2" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "indata måste vara en ndarray" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "indata måste vara en ndarray eller en scalar" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "indata måste vara endimensionell" @@ -3797,7 +3845,11 @@ msgstr "inte alla argument omvandlade under strängformatering" msgid "not enough arguments for format string" msgstr "inte tillräckligt med argument för formatsträng" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "inte implementerat för complex dtype" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "antal punkter måste vara minst 2" @@ -3855,7 +3907,7 @@ msgstr "objekt med buffertprotokoll krävs" msgid "odd-length string" msgstr "sträng har udda längd" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "offset är för stor" @@ -3863,7 +3915,7 @@ msgstr "offset är för stor" msgid "offset must be >= 0" msgstr "offset måste vara >= 0" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "offset måste vara icke-negativt och inte längre än buffertlängd" @@ -4005,18 +4057,26 @@ 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/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4341,7 +4401,7 @@ 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/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "för många dimensioner" @@ -4525,7 +4585,7 @@ msgstr "watchdog timeout måste vara större än 0" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "width måste vara mellan 2 och 8, inte %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "width måste vara större än noll" @@ -4542,7 +4602,7 @@ msgstr "window måste vara <= interval" msgid "wrong axis index" msgstr "fel axelindex" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "fel axel angiven" @@ -4550,7 +4610,11 @@ msgstr "fel axel angiven" msgid "wrong input type" msgstr "fel indatatyp" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "fel längd på villkorsmatrisen" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "fel antal argument" @@ -4594,6 +4658,9 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "Unsupported pull value." +#~ msgstr "Ogiltigt Pull-värde." + #~ msgid "Station must be started" #~ msgstr "Stationen måste startas" diff --git a/locale/tr.po b/locale/tr.po new file mode 100644 index 0000000000..d7b6067b80 --- /dev/null +++ b/locale/tr.po @@ -0,0 +1,4614 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"PO-Revision-Date: 2022-01-16 13:56+0000\n" +"Last-Translator: Gökhan Koçmarlı \n" +"Language-Team: none\n" +"Language: tr\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.10.1\n" + +#: main.c +msgid "" +"\n" +"Code done running.\n" +msgstr "" +"\n" +"Program çalıştırıldı.\n" + +#: main.c +msgid "" +"\n" +"Code stopped by auto-reload.\n" +msgstr "" +"\n" +"Program otomatik yeniden yükleme tarafından sonlandırıldı.\n" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" +"\n" +"Lütfen, şu adrese CIRCUITPY sürücünüzün içerikleri ile beraber bir hata/konu " +"kaydı ekleyin\n" +"https://github.com/adafruit/circuitpython/issues\n" + +#: py/obj.c +msgid " File \"%q\"" +msgstr " \"%q\" dosyası" + +#: py/obj.c +msgid " File \"%q\", line %d" +msgstr " \"%q\" dosyası, %d numaralı satır" + +#: py/builtinhelp.c +msgid " is of type %q\n" +msgstr " nesnesi, %q tipindedir\n" + +#: main.c +msgid " not found.\n" +msgstr " bulunamadı.\n" + +#: main.c +msgid " output:\n" +msgstr " çıktı:\n" + +#: py/objstr.c +#, c-format +msgid "%%c requires int or char" +msgstr "%%c int veya char tipine ihtiyaç duyar" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "" +"%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" +msgstr "" +"%d adres pinleri, %d RGB pinleri ve %d döşemeleri %d'nin yüksekliği " +"gösterir, %d'nin değil" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q and %q contain duplicate pins" +msgstr "%q ve %q yinelenen pinler içeriyor" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q contains duplicate pins" +msgstr "%q yinelenen pinler içeriyor" + +#: ports/atmel-samd/common-hal/sdioio/SDCard.c +msgid "%q failure: %d" +msgstr "%q hata: %d" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q in use" +msgstr "%q kullanımda" + +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c +msgid "%q index out of range" +msgstr "%q indeksi aralık dışında" + +#: py/obj.c +msgid "%q indices must be integers, not %s" +msgstr "%q indeksleri integer olmalı, %s değil" + +#: py/argcheck.c +msgid "%q length must be %d-%d" +msgstr "%q boyutları %d-%d olmalıdır" + +#: shared-bindings/usb_hid/Device.c +msgid "%q length must be >= 1" +msgstr "%q boyutu >=1 olmalıdır" + +#: py/argcheck.c +msgid "%q must be %d-%d" +msgstr "%q, %d-%d olmalıdır" + +#: py/argcheck.c shared-bindings/gifio/GifWriter.c +msgid "%q must be <= %d" +msgstr "%q <= %d olmalıdır" + +#: py/argcheck.c +msgid "%q must be >= %d" +msgstr "%q >= %d olmalıdır" + +#: py/argcheck.c shared-bindings/memorymonitor/AllocationAlarm.c +msgid "%q must be >= 0" +msgstr "%q >= 0 olmalıdır" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c +#: shared-bindings/displayio/Shape.c +#: shared-bindings/memorymonitor/AllocationAlarm.c +#: shared-bindings/vectorio/Circle.c shared-bindings/vectorio/Rectangle.c +msgid "%q must be >= 1" +msgstr "%q >= 1 olmalıdır" + +#: py/argcheck.c +msgid "%q must be a string" +msgstr "%q bir string olmalıdır" + +#: shared-module/vectorio/Polygon.c +msgid "%q must be a tuple of length 2" +msgstr "%q, boyutu 2 olan bir tuple olmalıdır" + +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +#: shared-module/vectorio/VectorShape.c +msgid "%q must be between %d and %d" +msgstr "%q, %d ile %d arasında olmalıdır" + +#: py/argcheck.c +msgid "%q must be of type %q" +msgstr "%q, %q türünde olmalıdır" + +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "%q, %q ya da None türünde olmalıdır" + +#: ports/atmel-samd/common-hal/busio/UART.c +msgid "%q must be power of 2" +msgstr "%q, 2'nin kuvveti olmalıdır" + +#: shared-bindings/wifi/Monitor.c +msgid "%q out of bounds" +msgstr "%q sınırların dışında" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#: shared-bindings/canio/Match.c +msgid "%q out of range" +msgstr "%q aralık dışında" + +#: ports/atmel-samd/common-hal/microcontroller/Pin.c +msgid "%q pin invalid" +msgstr "%q pini geçersiz" + +#: shared-bindings/fontio/BuiltinFont.c +msgid "%q should be an int" +msgstr "%q bir int olmalıdır" + +#: shared-bindings/usb_hid/Device.c +msgid "%q with a report ID of 0 must be of length 1" +msgstr "Rapor kimliği 0 olan %q, 1 uzunluğunda olmalıdır" + +#: py/bc.c py/objnamedtuple.c +msgid "%q() takes %d positional arguments but %d were given" +msgstr "%q(), %d konumsal argümanını alır ancak %d verildi" + +#: shared-bindings/usb_hid/Device.c +msgid "%q, %q, and %q must all be the same length" +msgstr "%q, %q ve %q aynı uzunlukta olmalıdır" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +#, c-format +msgid "%s error 0x%x" +msgstr "%s hatası 0x%x" + +#: py/argcheck.c +msgid "'%q' argument required" +msgstr "'%q' argümanı gerekli" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "'%q' nesnesi '%q' öğesini desteklemiyor" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "'%q' nesnesi bir iteratör değildir" + +#: py/objtype.c py/runtime.c shared-module/atexit/__init__.c +msgid "'%q' object is not callable" +msgstr "'%q' nesnesi çağrılabilir değil" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "'%q' nesnesi iterable değildir" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +#, c-format +msgid "'%s' expects a label" +msgstr "'%s' bir etiket bekliyor" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +#, c-format +msgid "'%s' expects a register" +msgstr "'%s' bir yazmaç bekliyor" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects a special register" +msgstr "'%s' özel bir yazmaç bekliyor" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects an FPU register" +msgstr "'%s' bir FPU yazmacı bekliyor" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects an address of the form [a, b]" +msgstr "'%s', [a, b] biçiminde bir adres bekliyor" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +#, c-format +msgid "'%s' expects an integer" +msgstr "'%s' bir integer bekliyor" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects at most r%d" +msgstr "'%s' en fazla r%d bekler" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects {r0, r1, ...}" +msgstr "'%s' {r0, r1, ...} bekliyor" + +#: py/emitinlinextensa.c +#, c-format +msgid "'%s' integer %d isn't within range %d..%d" +msgstr "'%s' integer %d, %d..%d aralığında değil" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' integer 0x%x doesn't fit in mask 0x%x" +msgstr "'%s' integer 0x%x, 0x%x maskesine uymuyor" + +#: py/obj.c +#, c-format +msgid "'%s' object doesn't support item assignment" +msgstr "'%s' nesnesi, öğe atamasını desteklemiyor" + +#: py/obj.c +#, c-format +msgid "'%s' object doesn't support item deletion" +msgstr "'%s' nesnesi, öğe silmeyi desteklemiyor" + +#: py/runtime.c +msgid "'%s' object has no attribute '%q'" +msgstr "'%s' nesnesinin '%q' özelliği yok" + +#: py/obj.c +#, c-format +msgid "'%s' object isn't subscriptable" +msgstr "'%s' nesnesi subscriptable özelliğe sahip değil" + +#: py/objstr.c +#, fuzzy +msgid "'=' alignment not allowed in string format specifier" +msgstr "'=' hizalamasına string biçiminde izin verilmez" + +#: shared-module/struct/__init__.c +msgid "'S' and 'O' are not supported format types" +msgstr "'S' ve 'O' desteklenen biçim türlerinden değildir" + +#: py/compile.c +msgid "'align' requires 1 argument" +msgstr "'align' 1 argümana ihtiyaç duyar" + +#: py/compile.c +msgid "'await' outside function" +msgstr "fonksiyon dışında 'await'" + +#: py/compile.c +msgid "'await', 'async for' or 'async with' outside async function" +msgstr "" +"asenkron fonksiyon dışında kullanılan 'await', 'async for' ya da 'async with'" + +#: py/compile.c +msgid "'break' outside loop" +msgstr "döngü dışında 'break'" + +#: py/compile.c +msgid "'continue' outside loop" +msgstr "döngü dışında 'continue'" + +#: py/objgenerator.c +msgid "'coroutine' object is not an iterator" +msgstr "'coroutine' nesnesi bir iteratör değildir" + +#: py/compile.c +msgid "'data' requires at least 2 arguments" +msgstr "'data' en az 2 argümana ihtiyaç duyar" + +#: py/compile.c +msgid "'data' requires integer arguments" +msgstr "'data' integer tipinde argümanlara ihtiyaç duyar" + +#: py/compile.c +msgid "'label' requires 1 argument" +msgstr "'label' 1 argümana ihtiyaç duyar" + +#: py/compile.c +msgid "'return' outside function" +msgstr "fonksiyon dışında 'return'" + +#: py/compile.c +msgid "'yield from' inside async function" +msgstr "asenkron fonksiyon içinde 'yield from'" + +#: py/compile.c +msgid "'yield' outside function" +msgstr "fonksiyon dışında 'yield'" + +#: shared-module/vectorio/VectorShape.c +msgid "(x,y) integers required" +msgstr "(x, y) integerları gereklidir" + +#: py/compile.c +msgid "*x must be assignment target" +msgstr "" + +#: py/obj.c +msgid ", in %q\n" +msgstr ", içinde %q\n" + +#: py/objcomplex.c +msgid "0.0 to a complex power" +msgstr "0.0'dan bir karmaşık güce" + +#: py/modbuiltins.c +msgid "3-arg pow() not supported" +msgstr "3-argümanlı pow() desteklenmemektedir" + +#: shared-module/msgpack/__init__.c +msgid "64 bit types" +msgstr "64 bit tipler" + +#: ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c +#: 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 "Bir donanım kesme kanalı halihazırda kullanılmaktadır" + +#: ports/espressif/common-hal/analogio/AnalogIn.c +msgid "ADC2 is being used by WiFi" +msgstr "ADC2, WiFi tarafından kullanılmaktadır" + +#: shared-bindings/_bleio/Address.c shared-bindings/ipaddress/IPv4Address.c +#, c-format +msgid "Address must be %d bytes long" +msgstr "Adres %d byte uzunluğunda olmalıdır" + +#: shared-bindings/_bleio/Address.c +msgid "Address type out of range" +msgstr "Adres tipi beklenen aralığın dışında" + +#: ports/espressif/common-hal/canio/CAN.c +msgid "All CAN peripherals are in use" +msgstr "Tüm CAN çevre birimleri kullanımda" + +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/i2cperipheral/I2CPeripheral.c +#: ports/nrf/common-hal/busio/I2C.c +msgid "All I2C peripherals are in use" +msgstr "Tüm I2C çevre birimleri kullanımda" + +#: ports/espressif/common-hal/countio/Counter.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c +msgid "All PCNT units in use" +msgstr "Tüm PCNT birimleri kullanımda" + +#: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c +#: ports/stm/common-hal/canio/Listener.c +msgid "All RX FIFOs in use" +msgstr "Tüm RX FIFO'ları kullanımda" + +#: ports/espressif/common-hal/busio/SPI.c ports/nrf/common-hal/busio/SPI.c +msgid "All SPI peripherals are in use" +msgstr "Tüm SPI çevre birimleri kullanımda" + +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c +msgid "All UART peripherals are in use" +msgstr "Tüm UART çevre birimleri kullanımda" + +#: ports/nrf/common-hal/countio/Counter.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/rotaryio/IncrementalEncoder.c +#: shared-bindings/pwmio/PWMOut.c +msgid "All channels in use" +msgstr "Tüm kanallar kullanımda" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "All event channels in use" +msgstr "Tüm olay kanalları kullanımda" + +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "All state machines in use" +msgstr "Tüm durum makineleri kullanımda" + +#: ports/atmel-samd/audio_dma.c +msgid "All sync event channels in use" +msgstr "Tüm asenkron olay kanalları kullanımda" + +#: shared-bindings/pwmio/PWMOut.c +msgid "All timers for this pin are in use" +msgstr "Bu pin için tüm zamanlayıcılar kullanımda" + +#: ports/atmel-samd/common-hal/_pew/PewPew.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/atmel-samd/common-hal/pulseio/PulseOut.c +#: ports/cxd56/common-hal/pulseio/PulseOut.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/neopixel_write/__init__.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseOut.c +#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/peripherals/timers.c shared-bindings/pwmio/PWMOut.c +msgid "All timers in use" +msgstr "Tüm zamanlayıcılar kullanımda" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Already advertising." +msgstr "Halihazırda duyuruluyor." + +#: ports/atmel-samd/common-hal/canio/Listener.c +msgid "Already have all-matches listener" +msgstr "" + +#: shared-module/memorymonitor/AllocationAlarm.c +#: shared-module/memorymonitor/AllocationSize.c +msgid "Already running" +msgstr "Halihazırda çalışıyor" + +#: ports/espressif/common-hal/wifi/Radio.c +msgid "Already scanning for wifi networks" +msgstr "Halihazırda wifi ağları için tarama yapılıyor" + +#: ports/cxd56/common-hal/analogio/AnalogIn.c +msgid "AnalogIn not supported on given pin" +msgstr "Verilen pin için AnalogIn desteklenmemektedir" + +#: ports/cxd56/common-hal/analogio/AnalogOut.c +#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +#: ports/raspberrypi/common-hal/analogio/AnalogOut.c +msgid "AnalogOut functionality not supported" +msgstr "AnalogOut işlevi desteklenmemektedir" + +#: shared-bindings/analogio/AnalogOut.c +msgid "AnalogOut is only 16 bits. Value must be less than 65536." +msgstr "AnalogOut yalnızca 16 bitlik. Değer 65536'dan küçük olmalıdır." + +#: ports/atmel-samd/common-hal/analogio/AnalogOut.c +msgid "AnalogOut not supported on given pin" +msgstr "Verilen pin için AnalogOut desteklenmemektedir" + +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Another PWMAudioOut is already active" +msgstr "Başka bir PWMAudioOut zaten aktif durumda" + +#: ports/atmel-samd/common-hal/pulseio/PulseOut.c +#: ports/cxd56/common-hal/pulseio/PulseOut.c +msgid "Another send is already active" +msgstr "Başka bir gönderme zaten aktif" + +#: shared-bindings/pulseio/PulseOut.c +msgid "Array must contain halfwords (type 'H')" +msgstr "Dizi yarımsözcüklere sahip olmalıdır (tip 'H')" + +#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c +msgid "Array values should be single bytes." +msgstr "Dizi değerleri tekil bytelar olmalıdır." + +#: shared-bindings/microcontroller/Pin.c +msgid "At most %d %q may be specified (not %d)" +msgstr "" + +#: shared-module/memorymonitor/AllocationAlarm.c +#, c-format +msgid "Attempt to allocate %d blocks" +msgstr "%d bloğun ayrılması girişimi" + +#: supervisor/shared/safe_mode.c +msgid "Attempted heap allocation when VM not running." +msgstr "VM çalışmazken heap'ten alan tahsis edilmeye çalışıldı." + +#: ports/raspberrypi/audio_dma.c +msgid "Audio conversion not implemented" +msgstr "Ses dönüşümü implemente edilmedi" + +#: shared-bindings/wifi/Radio.c +msgid "AuthMode.OPEN is not used with password" +msgstr "AuthMode.OPEN bir şifre ile kullanılmadı" + +#: shared-bindings/wifi/Radio.c +msgid "Authentication failure" +msgstr "Kimlik doğrulama hatası" + +#: main.c +msgid "Auto-reload is off.\n" +msgstr "Otomatik yeniden yükleme devre dışı.\n" + +#: main.c +msgid "" +"Auto-reload is on. Simply save files over USB to run them or enter REPL to " +"disable.\n" +msgstr "" +"Otomatik yeniden yükleme aktif. Dosyaları çalıştırmak için USB aracılığı ile " +"kaydedin ya da deaktif etmek için REPL moda girin.\n" + +#: ports/espressif/common-hal/canio/CAN.c +msgid "Baudrate not supported by peripheral" +msgstr "Baudhızı, çevre birimi tarafından desteklenmiyor" + +#: shared-module/displayio/Display.c +#: shared-module/framebufferio/FramebufferDisplay.c +msgid "Below minimum frame rate" +msgstr "Minimum kare hızından altında" + +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c +msgid "Bit clock and word select must be sequential pins" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +msgid "Bit clock and word select must share a clock unit" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "Bit depth must be from 1 to 6 inclusive, not %d" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Bit depth must be multiple of 8." +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "Bitmap size and bits per value must match" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Boot device must be first device (interface #0)." +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Both RX and TX required for flow control" +msgstr "" + +#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c +msgid "Both pins must support hardware interrupts" +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/is31fl3741/IS31FL3741.c +#: shared-bindings/rgbmatrix/RGBMatrix.c +msgid "Brightness must be 0-1.0" +msgstr "" + +#: shared-bindings/supervisor/__init__.c +msgid "Brightness must be between 0 and 255" +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Brightness not adjustable" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +#, c-format +msgid "Buffer + offset too small %d %d %d" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Buffer elements must be 4 bytes long or less" +msgstr "" + +#: shared-module/usb_hid/Device.c +#, c-format +msgid "Buffer incorrect size. Should be %d bytes." +msgstr "" + +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Buffer is not a bytearray." +msgstr "" + +#: ports/cxd56/common-hal/camera/Camera.c shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Buffer is too small" +msgstr "" + +#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +#, c-format +msgid "Buffer length %d too big. It must be less than %d" +msgstr "" + +#: ports/atmel-samd/common-hal/sdioio/SDCard.c +#: ports/cxd56/common-hal/sdioio/SDCard.c shared-module/sdcardio/SDCard.c +msgid "Buffer length must be a multiple of 512" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "" + +#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c +msgid "Buffer must be at least length 1" +msgstr "" + +#: shared-bindings/_bleio/PacketBuffer.c +#, c-format +msgid "Buffer too short by %d bytes" +msgstr "" + +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +msgid "Buffers must be same size" +msgstr "" + +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +#: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c +#, c-format +msgid "Bus pin %d is already in use" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +msgid "Byte buffer must be 16 bytes." +msgstr "" + +#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c +msgid "Bytes must be between 0 and 255." +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "CBC blocks must be multiples of 16 bytes" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "CRC or checksum was invalid" +msgstr "" + +#: py/objtype.c +msgid "Call super().__init__() before accessing native object." +msgstr "" + +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on RTC IO from deep sleep." +msgstr "" + +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c +msgid "Can only alarm on one low pin while others alarm high from deep sleep." +msgstr "" + +#: ports/espressif/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 "" + +#: shared-bindings/storage/__init__.c shared-bindings/usb_cdc/__init__.c +#: shared-bindings/usb_hid/__init__.c shared-bindings/usb_midi/__init__.c +msgid "Cannot change USB devices now" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot create a new Adapter; use _bleio.adapter;" +msgstr "" + +#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/memorymonitor/AllocationSize.c +#: shared-bindings/pulseio/PulseIn.c +msgid "Cannot delete values" +msgstr "" + +#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c +#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c +#: ports/nrf/common-hal/digitalio/DigitalInOut.c +#: ports/raspberrypi/common-hal/digitalio/DigitalInOut.c +msgid "Cannot get pull while in output mode" +msgstr "" + +#: ports/nrf/common-hal/microcontroller/Processor.c +msgid "Cannot get temperature" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Cannot output both channels on the same pin" +msgstr "" + +#: ports/espressif/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 "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Cannot record to a file" +msgstr "" + +#: shared-module/storage/__init__.c +msgid "Cannot remount '/' when visible via USB." +msgstr "" + +#: ports/atmel-samd/common-hal/microcontroller/__init__.c +#: ports/cxd56/common-hal/microcontroller/__init__.c +#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c +msgid "Cannot reset into bootloader because no bootloader is present." +msgstr "" + +#: ports/espressif/common-hal/socketpool/Socket.c +msgid "Cannot set socket options" +msgstr "" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Cannot set value when direction is input." +msgstr "" + +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Cannot specify RTS or CTS in RS485 mode" +msgstr "" + +#: py/objslice.c +msgid "Cannot subclass slice" +msgstr "" + +#: shared-module/bitbangio/SPI.c +msgid "Cannot transfer without MOSI and MISO pins." +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "Cannot vary frequency on a timer that is already in use" +msgstr "" + +#: ports/espressif/common-hal/alarm/pin/PinAlarm.c +#: ports/nrf/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 "" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +msgid "CharacteristicBuffer writing not provided" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "CircuitPython was unable to allocate the heap." +msgstr "" + +#: shared-module/bitbangio/SPI.c +msgid "Clock pin init failed." +msgstr "" + +#: shared-module/bitbangio/I2C.c +msgid "Clock stretch too long" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +msgid "Clock unit in use" +msgstr "" + +#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c +msgid "Command must be an int between 0 and 255" +msgstr "" + +#: shared-bindings/_bleio/Connection.c +msgid "" +"Connection has been disconnected and can no longer be used. Create a new " +"connection." +msgstr "" + +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "" + +#: ports/cxd56/common-hal/camera/Camera.c +msgid "Could not initialize Camera" +msgstr "" + +#: ports/cxd56/common-hal/gnss/GNSS.c +msgid "Could not initialize GNSS" +msgstr "" + +#: ports/cxd56/common-hal/sdioio/SDCard.c +msgid "Could not initialize SDCard" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c +msgid "Could not initialize UART" +msgstr "" + +#: ports/stm/common-hal/pwmio/PWMOut.c +msgid "Could not re-init channel" +msgstr "" + +#: ports/stm/common-hal/pwmio/PWMOut.c +msgid "Could not re-init timer" +msgstr "" + +#: ports/stm/common-hal/pwmio/PWMOut.c +msgid "Could not restart PWM" +msgstr "" + +#: ports/espressif/common-hal/neopixel_write/__init__.c +msgid "Could not retrieve clock" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Could not set address" +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "Could not start PWM" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "Could not start interrupt, RX busy" +msgstr "" + +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate decoder" +msgstr "" + +#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate first buffer" +msgstr "" + +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate input buffer" +msgstr "" + +#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate second buffer" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Crash into the HardFault_Handler." +msgstr "" + +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "DAC Channel Init Error" +msgstr "" + +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "DAC Device Init Error" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "DAC already in use" +msgstr "" + +#: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c +#: ports/nrf/common-hal/paralleldisplay/ParallelBus.c +msgid "Data 0 pin must be byte aligned" +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Data chunk must follow fmt chunk" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Data not supported with directed advertising" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Data too large for advertisement packet" +msgstr "" + +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Destination capacity is smaller than destination_length." +msgstr "" + +#: ports/nrf/common-hal/audiobusio/I2SOut.c +msgid "Device in use" +msgstr "" + +#: ports/cxd56/common-hal/digitalio/DigitalInOut.c +msgid "DigitalInOut not supported on given pin" +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Display must have a 16 bit colorspace." +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/displayio/EPaperDisplay.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Display rotation must be in 90 degree increments" +msgstr "" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Drive mode not used when direction is input." +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "ECB only operates on 16 bytes at a time" +msgstr "" + +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/canio/CAN.c +msgid "ESP-IDF memory allocation failed" +msgstr "" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/atmel-samd/common-hal/ps2io/Ps2.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +msgid "EXTINT channel already in use" +msgstr "" + +#: shared-module/synthio/MidiTrack.c +#, c-format +msgid "Error in MIDI stream at position %d" +msgstr "" + +#: extmod/modure.c +msgid "Error in regex" +msgstr "" + +#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c +msgid "Error: Failure to bind" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c py/enum.c +#: shared-bindings/_bleio/__init__.c shared-bindings/aesio/aes.c +#: shared-bindings/busio/SPI.c shared-bindings/microcontroller/Pin.c +#: shared-bindings/neopixel_write/__init__.c +msgid "Expected a %q" +msgstr "" + +#: shared-bindings/alarm/__init__.c +msgid "Expected an alarm" +msgstr "" + +#: shared-module/adafruit_pixelbuf/PixelBuf.c +#, c-format +msgid "Expected tuple of length %d, got %d" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Extended advertisements with scan response not supported." +msgstr "" + +#: extmod/ulab/code/numpy/fft/fft_tools.c +msgid "FFT is defined for ndarrays only" +msgstr "" + +#: extmod/ulab/code/numpy/fft/fft_tools.c +msgid "FFT is implemented for linear arrays only" +msgstr "" + +#: ports/espressif/common-hal/ssl/SSLSocket.c +msgid "Failed SSL handshake" +msgstr "" + +#: shared-bindings/ps2io/Ps2.c +msgid "Failed sending command." +msgstr "" + +#: ports/nrf/sd_mutex.c +#, c-format +msgid "Failed to acquire mutex, err 0x%04x" +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c +msgid "Failed to allocate RX buffer" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/espressif/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c +#, c-format +msgid "Failed to allocate RX buffer of %d bytes" +msgstr "" + +#: ports/espressif/common-hal/wifi/__init__.c +msgid "Failed to allocate Wifi memory" +msgstr "" + +#: ports/espressif/common-hal/wifi/ScannedNetworks.c +msgid "Failed to allocate wifi scan memory" +msgstr "" + +#: ports/stm/common-hal/audiopwmio/PWMAudioOut.c +msgid "Failed to buffer the sample" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Failed to connect: internal error" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Failed to connect: timeout" +msgstr "" + +#: ports/espressif/common-hal/wifi/__init__.c +msgid "Failed to init wifi" +msgstr "" + +#: shared-module/audiomp3/MP3Decoder.c +msgid "Failed to parse MP3 file" +msgstr "" + +#: ports/nrf/sd_mutex.c +#, c-format +msgid "Failed to release mutex, err 0x%04x" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Fatal error." +msgstr "" + +#: py/moduerrno.c +msgid "File exists" +msgstr "" + +#: ports/atmel-samd/common-hal/canio/Listener.c +#: ports/espressif/common-hal/canio/Listener.c +#: ports/stm/common-hal/canio/Listener.c +msgid "Filters too complex" +msgstr "" + +#: ports/espressif/common-hal/dualbank/__init__.c +msgid "Firmware image is invalid" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "For L8 colorspace, input bitmap must have 8 bits per pixel" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "For RGB colorspaces, input bitmap must have 16 bits per pixel" +msgstr "" + +#: ports/cxd56/common-hal/camera/Camera.c +msgid "Format not supported" +msgstr "" + +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "Frequency must match existing PWMOut using this timer" +msgstr "" + +#: 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 "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Generic Failure" +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/displayio/EPaperDisplay.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Group already used" +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/canio/CAN.c +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Hardware busy, try alternative pins" +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "Hardware in use, try alternative pins" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "Hostname must be between 1 and 253 characters" +msgstr "" + +#: extmod/vfs_posix_file.c py/objstringio.c +msgid "I/O operation on closed file" +msgstr "" + +#: ports/stm/common-hal/busio/I2C.c +msgid "I2C Init Error" +msgstr "" + +#: ports/raspberrypi/common-hal/busio/I2C.c +msgid "I2C peripheral in use" +msgstr "" + +#: shared-bindings/audiobusio/I2SOut.c +msgid "I2SOut not available" +msgstr "" + +#: shared-bindings/aesio/aes.c +#, c-format +msgid "IV must be %d bytes long" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "In-buffer elements must be <= 4 bytes long" +msgstr "" + +#: py/persistentcode.c +msgid "" +"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" +"mpy-update for more info." +msgstr "" + +#: shared-bindings/_pew/PewPew.c +msgid "Incorrect buffer size" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Init program size invalid" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "Initial set pin direction conflicts with initial out pin direction" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "Initial set pin state conflicts with initial out pin state" +msgstr "" + +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "Initialization failed due to lack of memory" +msgstr "" + +#: shared-bindings/bitops/__init__.c +#, c-format +msgid "Input buffer length (%d) must be a multiple of the strand count (%d)" +msgstr "" + +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +msgid "Input taking too long" +msgstr "" + +#: ports/espressif/common-hal/neopixel_write/__init__.c py/moduerrno.c +msgid "Input/output error" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Instruction %d shifts in more bits than pin count" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Instruction %d shifts out more bits than pin count" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Instruction %d uses extra pin" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Instruction %d waits on input outside of count" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Insufficient authentication" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Insufficient encryption" +msgstr "" + +#: ports/espressif/common-hal/wifi/Radio.c +msgid "Interface must be started" +msgstr "" + +#: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c +msgid "Internal audio buffer too small" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "Internal define error" +msgstr "" + +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c +msgid "Internal error" +msgstr "" + +#: shared-module/rgbmatrix/RGBMatrix.c +#, c-format +msgid "Internal error #%d" +msgstr "" + +#: shared-bindings/sdioio/SDCard.c shared-module/usb_hid/Device.c +msgid "Invalid %q" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Invalid %q pin" +msgstr "" + +#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/canio/CAN.c +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "" + +#: ports/stm/common-hal/analogio/AnalogIn.c +msgid "Invalid ADC Unit value" +msgstr "" + +#: ports/espressif/common-hal/wifi/Radio.c +msgid "Invalid AuthMode" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Invalid BLE parameter" +msgstr "" + +#: shared-module/displayio/OnDiskBitmap.c +msgid "Invalid BMP file" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "Invalid BSSID" +msgstr "" + +#: ports/espressif/common-hal/analogio/AnalogOut.c +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "Invalid DAC pin supplied" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "Invalid MAC address" +msgstr "" + +#: shared-bindings/synthio/__init__.c +msgid "Invalid MIDI file" +msgstr "" + +#: ports/atmel-samd/common-hal/pwmio/PWMOut.c +#: ports/cxd56/common-hal/pwmio/PWMOut.c +#: ports/espressif/common-hal/pwmio/PWMOut.c +#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c +#: ports/nrf/common-hal/pwmio/PWMOut.c +#: ports/raspberrypi/common-hal/pwmio/PWMOut.c shared-bindings/pwmio/PWMOut.c +msgid "Invalid PWM frequency" +msgstr "" + +#: ports/espressif/common-hal/analogio/AnalogIn.c +msgid "Invalid Pin" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/i2cperipheral/I2CPeripheral.c +#: ports/espressif/esp_error.c py/moduerrno.c +#: shared-module/rgbmatrix/RGBMatrix.c +msgid "Invalid argument" +msgstr "" + +#: shared-module/displayio/Bitmap.c +msgid "Invalid bits per value" +msgstr "" + +#: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c +#: ports/stm/common-hal/busio/UART.c +msgid "Invalid buffer size" +msgstr "" + +#: shared-bindings/adafruit_pixelbuf/PixelBuf.c +msgid "Invalid byteorder string" +msgstr "" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/espressif/common-hal/frequencyio/FrequencyIn.c +msgid "Invalid capture period. Valid range: 1 - 500" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Invalid channel count" +msgstr "" + +#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c +#, c-format +msgid "Invalid data_count %d" +msgstr "" + +#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c +#, c-format +msgid "Invalid data_pins[%d]" +msgstr "" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Invalid direction." +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Invalid file" +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Invalid format chunk size" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Invalid memory access." +msgstr "" + +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + +#: ports/espressif/common-hal/wifi/Radio.c +msgid "Invalid multicast MAC address" +msgstr "" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +msgid "Invalid number of bits" +msgstr "" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +#: shared-bindings/displayio/FourWire.c +msgid "Invalid phase" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +#: ports/espressif/common-hal/touchio/TouchIn.c +#: ports/nrf/common-hal/alarm/pin/PinAlarm.c shared-bindings/pwmio/PWMOut.c +#: shared-module/rgbmatrix/RGBMatrix.c +msgid "Invalid pin" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Invalid pin for left channel" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Invalid pin for right channel" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/SPI.c +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c +#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c +#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/SPI.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/espressif/common-hal/canio/CAN.c +#: ports/espressif/common-hal/i2cperipheral/I2CPeripheral.c +#: ports/mimxrt10xx/common-hal/busio/I2C.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/nrf/common-hal/busio/I2C.c +#: ports/raspberrypi/common-hal/busio/I2C.c +#: ports/raspberrypi/common-hal/busio/SPI.c +#: ports/raspberrypi/common-hal/busio/UART.c shared-bindings/busio/SPI.c +#: shared-bindings/busio/UART.c +msgid "Invalid pins" +msgstr "" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +#: shared-bindings/displayio/FourWire.c +msgid "Invalid polarity" +msgstr "" + +#: shared-bindings/_bleio/Characteristic.c +msgid "Invalid properties" +msgstr "" + +#: shared-bindings/microcontroller/__init__.c +msgid "Invalid run mode." +msgstr "" + +#: shared-module/_bleio/Attribute.c +msgid "Invalid security_mode" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Invalid size" +msgstr "" + +#: ports/espressif/common-hal/ssl/SSLContext.c +msgid "Invalid socket for TLS" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Invalid state" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Invalid voice" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Invalid voice count" +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Invalid wave file" +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "Invalid word/bit length" +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "Key must be 16, 24, or 32 bytes long" +msgstr "" + +#: shared-module/is31fl3741/IS31FL3741.c +msgid "LED mappings must match display size" +msgstr "" + +#: py/compile.c +msgid "LHS of keyword arg must be an id" +msgstr "" + +#: shared-module/displayio/Group.c +msgid "Layer already in a group." +msgstr "" + +#: shared-module/displayio/Group.c +msgid "Layer must be a Group or TileGrid subclass." +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "MAC address was invalid" +msgstr "" + +#: shared-module/bitbangio/SPI.c +msgid "MISO pin init failed." +msgstr "" + +#: shared-module/bitbangio/SPI.c +msgid "MOSI pin init failed." +msgstr "" + +#: shared-module/displayio/Shape.c +#, c-format +msgid "Maximum x value when mirrored is %d" +msgstr "" + +#: shared-bindings/canio/Message.c +msgid "Messages limited to 8 bytes" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Microphone startup delay must be in range 0.0 to 1.0" +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c +msgid "Missing MISO or MOSI Pin" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_in_pin. Instruction %d reads pin(s)" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_in_pin. Instruction %d shifts in from pin(s)" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_in_pin. Instruction %d waits based on pin" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_out_pin. Instruction %d shifts out to pin(s)" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_out_pin. Instruction %d writes pin(s)" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing first_set_pin. Instruction %d sets pin(s)" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +#, c-format +msgid "Missing jmp_pin. Instruction %d jumps on pin" +msgstr "" + +#: shared-module/usb_hid/Device.c +#, c-format +msgid "More than %d report ids not supported" +msgstr "" + +#: shared-bindings/busio/UART.c shared-bindings/displayio/Group.c +msgid "Must be a %q subclass." +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c shared-bindings/busio/SPI.c +msgid "Must provide MISO or MOSI pin" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "Must use a multiple of 6 rgb pins, not %d" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "NLR jump failed. Likely memory corruption." +msgstr "" + +#: ports/espressif/common-hal/nvm/ByteArray.c +msgid "NVS Error" +msgstr "" + +#: py/qstr.c +msgid "Name too long" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +msgid "No CCCD for this Characteristic" +msgstr "" + +#: ports/atmel-samd/common-hal/analogio/AnalogOut.c +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "No DAC on chip" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "No DMA channel found" +msgstr "" + +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "No DMA pacing timer found" +msgstr "" + +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c +#, c-format +msgid "No I2C device at address: %x" +msgstr "" + +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c +msgid "No MISO Pin" +msgstr "" + +#: ports/espressif/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c +msgid "No MOSI Pin" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "No RX pin" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "No TX pin" +msgstr "" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +msgid "No available clocks" +msgstr "" + +#: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c +msgid "No capture in progress" +msgstr "" + +#: shared-bindings/_bleio/PacketBuffer.c +msgid "No connection: length cannot be determined" +msgstr "" + +#: shared-bindings/board/__init__.c +msgid "No default %q bus" +msgstr "" + +#: ports/atmel-samd/common-hal/touchio/TouchIn.c +msgid "No free GCLKs" +msgstr "" + +#: shared-bindings/os/__init__.c +msgid "No hardware random available" +msgstr "" + +#: ports/atmel-samd/common-hal/ps2io/Ps2.c +msgid "No hardware support on clk pin" +msgstr "" + +#: ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +msgid "No hardware support on pin" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "No in in program" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "No in or out in program" +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "No key was specified" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "No long integer support" +msgstr "" + +#: shared-module/usb_hid/__init__.c +#, c-format +msgid "No more than %d HID devices allowed" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "No network with that ssid" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "No out in program" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/I2C.c +#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +#: ports/raspberrypi/common-hal/busio/I2C.c +msgid "No pull up found on SDA or SCL; check your wiring" +msgstr "" + +#: shared-module/touchio/TouchIn.c +msgid "No pulldown on pin; 1Mohm recommended" +msgstr "" + +#: py/moduerrno.c +msgid "No space left on device" +msgstr "" + +#: py/moduerrno.c +msgid "No such file/directory" +msgstr "" + +#: shared-module/rgbmatrix/RGBMatrix.c +msgid "No timer available" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Nordic system firmware failure assertion." +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Nordic system firmware out of memory" +msgstr "" + +#: shared-bindings/ipaddress/IPv4Address.c shared-bindings/ipaddress/__init__.c +msgid "Not a valid IP string" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +#: shared-bindings/_bleio/CharacteristicBuffer.c +msgid "Not connected" +msgstr "" + +#: shared-bindings/audiobusio/I2SOut.c shared-bindings/audioio/AudioOut.c +#: shared-bindings/audiopwmio/PWMAudioOut.c +msgid "Not playing" +msgstr "" + +#: shared-bindings/_bleio/__init__.c +msgid "Not settable" +msgstr "" + +#: ports/espressif/common-hal/paralleldisplay/ParallelBus.c +#, c-format +msgid "Number of data_pins must be 8 or 16, not %d" +msgstr "" + +#: shared-bindings/util.c +msgid "" +"Object has been deinitialized and can no longer be used. Create a new object." +msgstr "" + +#: ports/nrf/common-hal/busio/UART.c +msgid "Odd parity is not supported" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c +msgid "Only 8 or 16 bit mono with " +msgstr "" + +#: ports/espressif/common-hal/wifi/__init__.c +msgid "Only IPv4 addresses supported" +msgstr "" + +#: ports/espressif/common-hal/socketpool/SocketPool.c +msgid "Only IPv4 sockets supported" +msgstr "" + +#: shared-module/displayio/OnDiskBitmap.c +#, c-format +msgid "" +"Only Windows format, uncompressed BMP supported: given header size is %d" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Only connectable advertisements can be directed" +msgstr "" + +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + +#: shared-bindings/ipaddress/__init__.c +msgid "Only int or string supported for ip" +msgstr "" + +#: shared-module/displayio/OnDiskBitmap.c +#, c-format +msgid "" +"Only monochrome, indexed 4bpp or 8bpp, and 16bpp or greater BMPs supported: " +"%d bpp given" +msgstr "" + +#: ports/espressif/common-hal/alarm/touch/TouchAlarm.c +msgid "Only one TouchAlarm can be set in deep sleep." +msgstr "" + +#: ports/espressif/common-hal/i2cperipheral/I2CPeripheral.c +msgid "Only one address is allowed" +msgstr "" + +#: ports/atmel-samd/common-hal/alarm/time/TimeAlarm.c +#: ports/espressif/common-hal/alarm/time/TimeAlarm.c +#: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c +msgid "Only one alarm.time alarm can be set." +msgstr "" + +#: shared-module/displayio/ColorConverter.c +msgid "Only one color can be transparent at a time" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Operation or feature not supported" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Operation timed out" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Out of memory" +msgstr "" + +#: ports/espressif/common-hal/socketpool/SocketPool.c +msgid "Out of sockets" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Out-buffer elements must be <= 4 bytes long" +msgstr "" + +#: shared-bindings/bitops/__init__.c +#, c-format +msgid "Output buffer must be at least %d bytes" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +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)" +msgstr "" + +#: shared-bindings/pwmio/PWMOut.c +msgid "" +"PWM frequency not writable when variable_frequency is False on construction." +msgstr "" + +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "PWM slice already in use" +msgstr "" + +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "PWM slice channel A already in use" +msgstr "" + +#: ports/espressif/common-hal/audiobusio/__init__.c +msgid "Peripheral in use" +msgstr "" + +#: py/moduerrno.c +msgid "Permission denied" +msgstr "" + +#: ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Pin count must be at least 1" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "Pin count too large" +msgstr "" + +#: ports/atmel-samd/common-hal/analogio/AnalogIn.c +#: ports/cxd56/common-hal/analogio/AnalogIn.c +#: ports/espressif/common-hal/analogio/AnalogIn.c +#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c +#: ports/nrf/common-hal/analogio/AnalogIn.c +#: ports/raspberrypi/common-hal/analogio/AnalogIn.c +#: ports/stm/common-hal/analogio/AnalogIn.c +msgid "Pin does not have ADC capabilities" +msgstr "" + +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Pin is input only" +msgstr "" + +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "Pin must be on PWM Channel B" +msgstr "" + +#: ports/atmel-samd/common-hal/countio/Counter.c +msgid "Pin must support hardware interrupts" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "" +"Pinout uses %d bytes per element, which consumes more than the ideal %d " +"bytes. If this cannot be avoided, pass allow_inefficient=True to the " +"constructor" +msgstr "" + +#: ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c +msgid "Pins must be sequential" +msgstr "" + +#: ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +msgid "Pins must be sequential GPIO pins" +msgstr "" + +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "Pins must share PWM slice" +msgstr "" + +#: py/builtinhelp.c +msgid "Plus any modules on the filesystem\n" +msgstr "" + +#: shared-module/vectorio/Polygon.c +msgid "Polygon needs at least 3 points" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Prefix buffer must be on the heap" +msgstr "" + +#: main.c +msgid "Press any key to enter the REPL. Use CTRL-D to reload.\n" +msgstr "" +"REPL moda girmek için herhangi bir tuşa basınız. Programı yeniden yüklemek " +"için CTRL+D tuş kombinasyonunu kullanabilirsiniz.\n" + +#: main.c +msgid "Pretending to deep sleep until alarm, CTRL-C or file write.\n" +msgstr "" +"Alarma, CTRL-C'ye veya dosya yazana kadar derin uyku moduna geçiliyor.\n" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "Program does IN without loading ISR" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "Program does OUT without loading OSR" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Program must contain at least one 16-bit instruction." +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Program size invalid" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Program too large" +msgstr "" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Pull not used when direction is output." +msgstr "" + +#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c +#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c +msgid "RAISE mode is not implemented" +msgstr "" + +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "" + +#: ports/stm/common-hal/os/__init__.c +msgid "RNG DeInit Error" +msgstr "" + +#: ports/stm/common-hal/os/__init__.c +msgid "RNG Init Error" +msgstr "" + +#: ports/nrf/common-hal/busio/UART.c ports/raspberrypi/common-hal/busio/UART.c +msgid "RS485 Not yet supported on this device" +msgstr "" + +#: ports/espressif/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "RS485 inversion specified when not in RS485 mode" +msgstr "" + +#: ports/cxd56/common-hal/rtc/RTC.c ports/espressif/common-hal/rtc/RTC.c +#: ports/mimxrt10xx/common-hal/rtc/RTC.c ports/nrf/common-hal/rtc/RTC.c +#: ports/raspberrypi/common-hal/rtc/RTC.c +msgid "RTC calibration is not supported on this board" +msgstr "" + +#: shared-bindings/alarm/time/TimeAlarm.c shared-bindings/time/__init__.c +msgid "RTC is not supported on this board" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c +#: ports/stm/common-hal/busio/UART.c +msgid "RTS/CTS/RS485 Not yet supported on this device" +msgstr "" + +#: ports/stm/common-hal/os/__init__.c +msgid "Random number generation error" +msgstr "" + +#: shared-bindings/memorymonitor/AllocationSize.c +#: shared-bindings/pulseio/PulseIn.c +msgid "Read-only" +msgstr "" + +#: extmod/vfs_fat.c py/moduerrno.c +msgid "Read-only filesystem" +msgstr "" + +#: shared-module/displayio/Bitmap.c +msgid "Read-only object" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Received response was invalid" +msgstr "" + +#: shared-bindings/displayio/EPaperDisplay.c +msgid "Refresh too soon" +msgstr "" + +#: shared-bindings/canio/RemoteTransmissionRequest.c +msgid "RemoteTransmissionRequests limited to 8 bytes" +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "Requested AES mode is unsupported" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Requested resource not found" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Right channel unsupported" +msgstr "" + +#: main.c +msgid "Running in safe mode! Not running saved code.\n" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "SD card CSD format not supported" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "" + +#: ports/stm/common-hal/busio/SPI.c +msgid "SPI Init Error" +msgstr "" + +#: ports/stm/common-hal/busio/SPI.c +msgid "SPI Re-initialization error" +msgstr "" + +#: ports/espressif/common-hal/busio/SPI.c +msgid "SPI configuration failed" +msgstr "" + +#: ports/raspberrypi/common-hal/busio/SPI.c +msgid "SPI peripheral in use" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Sample rate must be positive" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#, c-format +msgid "Sample rate too high. It must be less than %d" +msgstr "" + +#: shared-bindings/is31fl3741/IS31FL3741.c +msgid "Scale dimensions must divide by 3" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Scan already in progess. Stop with stop_scan." +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "Serializer in use" +msgstr "" + +#: shared-bindings/ssl/SSLContext.c +msgid "Server side context cannot have hostname" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Set pin count must be between 1 and 5" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "Side set pin count must be between 1 and 5" +msgstr "" + +#: ports/cxd56/common-hal/camera/Camera.c +msgid "Size not supported" +msgstr "" + +#: ports/atmel-samd/common-hal/alarm/SleepMemory.c +#: ports/raspberrypi/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + +#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c +msgid "Slice and value different lengths." +msgstr "" + +#: shared-bindings/displayio/Bitmap.c shared-bindings/displayio/Group.c +#: shared-bindings/displayio/TileGrid.c +#: shared-bindings/memorymonitor/AllocationSize.c +#: shared-bindings/pulseio/PulseIn.c +msgid "Slices not supported" +msgstr "" + +#: ports/espressif/common-hal/socketpool/SocketPool.c +msgid "SocketPool can only be used with wifi.radio" +msgstr "" + +#: shared-bindings/aesio/aes.c +msgid "Source and destination buffers must be the same length" +msgstr "" + +#: shared-bindings/paralleldisplay/ParallelBus.c +msgid "Specify exactly one of data0 or data_pins" +msgstr "" + +#: extmod/modure.c +msgid "Splitting with sub-captures" +msgstr "" + +#: shared-bindings/supervisor/__init__.c +msgid "Stack size must be at least 256" +msgstr "" + +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "Stereo left must be on PWM channel A" +msgstr "" + +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "Stereo right must be on PWM channel B" +msgstr "" + +#: shared-bindings/multiterminal/__init__.c +msgid "Stream missing readinto() or write() method." +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "Supply at least one UART pin" +msgstr "" + +#: shared-bindings/alarm/time/TimeAlarm.c +msgid "Supply one of monotonic_time or epoch_time" +msgstr "" + +#: shared-bindings/gnss/GNSS.c +msgid "System entry must be gnss.SatelliteSystem" +msgstr "" + +#: ports/stm/common-hal/microcontroller/Processor.c +msgid "Temperature read timed out" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"The CircuitPython heap was corrupted because the stack was too small.\n" +"Increase the stack size if you know how. If not:" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"The `microcontroller` module was used to boot into safe mode. Press reset to " +"exit safe mode." +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"The microcontroller's power dipped. Make sure your power supply provides\n" +"enough power for the whole circuit and press reset (after ejecting " +"CIRCUITPY)." +msgstr "" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's bits_per_sample does not match the mixer's" +msgstr "" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's channel count does not match the mixer's" +msgstr "" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's sample rate does not match the mixer's" +msgstr "" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's signedness does not match the mixer's" +msgstr "" + +#: shared-module/imagecapture/ParallelImageCapture.c +msgid "This microcontroller does not support continuous capture." +msgstr "" + +#: shared-module/paralleldisplay/ParallelBus.c +msgid "" +"This microcontroller only supports data0=, not data_pins=, because it " +"requires contiguous pins." +msgstr "" + +#: shared-bindings/displayio/TileGrid.c +msgid "Tile height must exactly divide bitmap height" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c shared-module/displayio/TileGrid.c +msgid "Tile index out of bounds" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c +msgid "Tile value out of bounds" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c +msgid "Tile width must exactly divide bitmap width" +msgstr "" + +#: shared-bindings/alarm/time/TimeAlarm.c +msgid "Time is in the past." +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +#, c-format +msgid "Timeout is too long: Maximum timeout length is %d seconds" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "To exit, please reset the board without " +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c +msgid "Too many channels in sample." +msgstr "" + +#: shared-module/displayio/__init__.c +msgid "Too many display busses" +msgstr "" + +#: shared-module/displayio/__init__.c +msgid "Too many displays" +msgstr "" + +#: ports/nrf/common-hal/_bleio/PacketBuffer.c +msgid "Total data to write is larger than %q" +msgstr "" + +#: ports/atmel-samd/common-hal/alarm/touch/TouchAlarm.c +#: ports/raspberrypi/common-hal/alarm/touch/TouchAlarm.c +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + +#: py/obj.c +msgid "Traceback (most recent call last):\n" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "Tuple or struct_time argument required" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART Buffer allocation error" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART De-init error" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART Init Error" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART Re-init error" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART write error" +msgstr "" + +#: shared-module/usb_hid/Device.c +msgid "USB busy" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "USB devices need more endpoints than are available." +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "USB devices specify too many interface names." +msgstr "" + +#: shared-module/usb_hid/Device.c +msgid "USB error" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +msgid "UUID integer value must be 0-0xffff" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" +msgstr "" + +#: shared-bindings/_bleio/UUID.c +msgid "UUID value is not str, int or byte buffer" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/raspberrypi/common-hal/audiobusio/I2SOut.c +#: ports/raspberrypi/common-hal/audiopwmio/PWMAudioOut.c +msgid "Unable to allocate buffers for signed conversion" +msgstr "" + +#: ports/espressif/common-hal/busio/I2C.c +msgid "Unable to create lock" +msgstr "" + +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c +#, c-format +msgid "Unable to find I2C Display at %x" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "Unable to find free GCLK" +msgstr "" + +#: py/parse.c +msgid "Unable to init parser" +msgstr "" + +#: shared-module/displayio/OnDiskBitmap.c +msgid "Unable to read color palette data" +msgstr "" + +#: shared-bindings/nvm/ByteArray.c +msgid "Unable to write to nvm." +msgstr "" + +#: shared-bindings/alarm/SleepMemory.c +msgid "Unable to write to sleep_memory." +msgstr "" + +#: ports/nrf/common-hal/_bleio/UUID.c +msgid "Unexpected nrfx uuid type" +msgstr "" + +#: ports/espressif/common-hal/ssl/SSLSocket.c +#, c-format +msgid "Unhandled ESP TLS error %d %d %x %d" +msgstr "" + +#: shared-bindings/wifi/Radio.c +#, c-format +msgid "Unknown failure %d" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +#, c-format +msgid "Unknown gatt error: 0x%04x" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +#, c-format +msgid "Unknown security error: 0x%04x" +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +#, c-format +msgid "Unknown system firmware error: %04x" +msgstr "" + +#: shared-bindings/adafruit_pixelbuf/PixelBuf.c +#, c-format +msgid "Unmatched number of items on RHS (expected %d, got %d)." +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "" +"Unspecified issue. Can be that the pairing prompt on the other device was " +"declined or ignored." +msgstr "" + +#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c +#: ports/espressif/common-hal/busio/UART.c +#: ports/raspberrypi/common-hal/busio/I2C.c ports/stm/common-hal/busio/I2C.c +msgid "Unsupported baudrate" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "Unsupported colorspace" +msgstr "" + +#: shared-module/displayio/display_core.c +msgid "Unsupported display bus type" +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Unsupported format" +msgstr "" + +#: py/moduerrno.c +msgid "Unsupported operation" +msgstr "" + +#: ports/espressif/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" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +#: ports/nrf/common-hal/_bleio/Descriptor.c +msgid "Value length > max_length" +msgstr "" + +#: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c +msgid "Version was invalid" +msgstr "" + +#: ports/stm/common-hal/microcontroller/Processor.c +msgid "Voltage read timed out" +msgstr "" + +#: main.c +msgid "WARNING: Your code filename has two extensions\n" +msgstr "" + +#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c +#: ports/nrf/common-hal/watchdog/WatchDogTimer.c +#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c +msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer is not currently running" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer.timeout must be greater than 0" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Watchdog timer expired." +msgstr "" + +#: py/builtinhelp.c +#, c-format +msgid "" +"Welcome to Adafruit CircuitPython %s!\n" +"\n" +"Visit circuitpython.org for more information.\n" +"\n" +"To list built-in modules type `help(\"modules\")`.\n" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "WiFi password must be between 8 and 63 characters" +msgstr "" + +#: main.c +msgid "Woken up by alarm.\n" +msgstr "" + +#: ports/nrf/common-hal/_bleio/PacketBuffer.c +msgid "Writes not supported on Characteristic" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "You requested starting safe mode by " +msgstr "" + +#: py/objtype.c +msgid "__init__() should return None" +msgstr "" + +#: py/objtype.c +msgid "__init__() should return None, not '%q'" +msgstr "" + +#: py/objobject.c +msgid "__new__ arg must be a user-type" +msgstr "" + +#: extmod/modubinascii.c extmod/moduhashlib.c py/objarray.c +msgid "a bytes-like object is required" +msgstr "" + +#: shared-bindings/i2cperipheral/I2CPeripheral.c +msgid "address out of bounds" +msgstr "" + +#: shared-bindings/i2cperipheral/I2CPeripheral.c +msgid "addresses is empty" +msgstr "" + +#: py/compile.c +msgid "annotation must be an identifier" +msgstr "" + +#: py/modbuiltins.c +msgid "arg is an empty sequence" +msgstr "" + +#: py/objobject.c +msgid "arg must be user-type" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "argsort is not implemented for flattened arrays" +msgstr "" + +#: py/runtime.c shared-bindings/supervisor/__init__.c +msgid "argument has wrong type" +msgstr "" + +#: py/compile.c +msgid "argument name reused" +msgstr "" + +#: py/argcheck.c shared-bindings/_stage/__init__.c +#: shared-bindings/digitalio/DigitalInOut.c +msgid "argument num/types mismatch" +msgstr "" + +#: py/runtime.c +msgid "argument should be a '%q' not a '%q'" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/numpy/transform.c +msgid "arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "array and index length must be equal" +msgstr "" + +#: py/objarray.c shared-bindings/alarm/SleepMemory.c +#: shared-bindings/nvm/ByteArray.c +msgid "array/bytes required on right side" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "attempt to get (arg)min/(arg)max of empty sequence" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "attempt to get argmin/argmax of an empty sequence" +msgstr "" + +#: py/objstr.c +msgid "attributes not supported yet" +msgstr "" + +#: extmod/ulab/code/ulab_tools.c +msgid "axis is out of bounds" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c +msgid "axis must be None, or an integer" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "axis too long" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "background value out of range of target" +msgstr "" + +#: py/builtinevex.c +msgid "bad compile mode" +msgstr "" + +#: py/objstr.c +msgid "bad conversion specifier" +msgstr "" + +#: py/objstr.c +msgid "bad format string" +msgstr "" + +#: py/binary.c py/objarray.c +msgid "bad typecode" +msgstr "" + +#: py/emitnative.c +msgid "binary op %q not implemented" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "bitmap sizes must match" +msgstr "" + +#: extmod/modurandom.c +msgid "bits must be 32 or less" +msgstr "" + +#: shared-bindings/busio/UART.c +msgid "bits must be in range 5 to 9" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "bits_per_sample must be 8 or 16" +msgstr "" + +#: py/emitinlinethumb.c +msgid "branch not in range" +msgstr "" + +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c +msgid "buffer is smaller than requested size" +msgstr "" + +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c +msgid "buffer size must be a multiple of element size" +msgstr "" + +#: shared-module/struct/__init__.c +msgid "buffer size must match format" +msgstr "" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +msgid "buffer slices must be of equal length" +msgstr "" + +#: py/modstruct.c shared-bindings/struct/__init__.c +#: shared-module/struct/__init__.c +msgid "buffer too small" +msgstr "" + +#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c +msgid "buffer too small for requested bytes" +msgstr "" + +#: shared-bindings/adafruit_pixelbuf/PixelBuf.c +msgid "byteorder is not a string" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c +msgid "bytes > 8 bits not supported" +msgstr "" + +#: py/objarray.c +msgid "bytes length not a multiple of item size" +msgstr "" + +#: py/objstr.c +msgid "bytes value out of range" +msgstr "" + +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c +msgid "calibration is out of range" +msgstr "" + +#: ports/atmel-samd/bindings/samd/Clock.c +msgid "calibration is read only" +msgstr "" + +#: ports/atmel-samd/common-hal/rtc/RTC.c +msgid "calibration value out of range +/-127" +msgstr "" + +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "" + +#: py/emitinlinethumb.c +msgid "can only have up to 4 parameters to Thumb assembly" +msgstr "" + +#: py/emitinlinextensa.c +msgid "can only have up to 4 parameters to Xtensa assembly" +msgstr "" + +#: py/objtype.c +msgid "can't add special method to already-subclassed class" +msgstr "" + +#: py/compile.c +msgid "can't assign to expression" +msgstr "" + +#: extmod/moduasyncio.c +msgid "can't cancel self" +msgstr "" + +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +#: shared-module/adafruit_pixelbuf/PixelBuf.c +msgid "can't convert %q to %q" +msgstr "" + +#: py/runtime.c +msgid "can't convert %q to int" +msgstr "" + +#: py/obj.c +#, c-format +msgid "can't convert %s to complex" +msgstr "" + +#: py/objstr.c +msgid "can't convert '%q' object to %q implicitly" +msgstr "" + +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + +#: py/obj.c +msgid "can't convert to %q" +msgstr "" + +#: py/obj.c +msgid "can't convert to complex" +msgstr "" + +#: py/runtime.c +msgid "can't convert to int" +msgstr "" + +#: py/objstr.c +msgid "can't convert to str implicitly" +msgstr "" + +#: py/compile.c +msgid "can't declare nonlocal in outer code" +msgstr "" + +#: py/compile.c +msgid "can't delete expression" +msgstr "" + +#: py/emitnative.c +msgid "can't do binary op between '%q' and '%q'" +msgstr "" + +#: py/objcomplex.c +msgid "can't do truncated division of a complex number" +msgstr "" + +#: py/compile.c +msgid "can't have multiple **x" +msgstr "" + +#: py/compile.c +msgid "can't have multiple *x" +msgstr "" + +#: py/emitnative.c +msgid "can't implicitly convert '%q' to 'bool'" +msgstr "" + +#: py/emitnative.c +msgid "can't load from '%q'" +msgstr "" + +#: py/emitnative.c +msgid "can't load with '%q' index" +msgstr "" + +#: py/objgenerator.c +msgid "can't send non-None value to a just-started generator" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "can't set 512 block size" +msgstr "" + +#: py/objnamedtuple.c +msgid "can't set attribute" +msgstr "" + +#: py/emitnative.c +msgid "can't store '%q'" +msgstr "" + +#: py/emitnative.c +msgid "can't store to '%q'" +msgstr "" + +#: py/emitnative.c +msgid "can't store with '%q' index" +msgstr "" + +#: py/objstr.c +msgid "" +"can't switch from automatic field numbering to manual field specification" +msgstr "" + +#: py/objstr.c +msgid "" +"can't switch from manual field specification to automatic field numbering" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot assign new shape" +msgstr "" + +#: extmod/ulab/code/ndarray_operators.c +msgid "cannot cast output with casting rule" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + +#: py/objtype.c +msgid "cannot create '%q' instances" +msgstr "" + +#: py/objtype.c +msgid "cannot create instance" +msgstr "" + +#: py/runtime.c +msgid "cannot import name %q" +msgstr "" + +#: py/builtinimport.c +msgid "cannot perform relative import" +msgstr "" + +#: extmod/moductypes.c +msgid "cannot unambiguously get sizeof scalar" +msgstr "" + +#: py/emitnative.c +msgid "casting" +msgstr "" + +#: shared-bindings/_stage/Text.c +msgid "chars buffer too small" +msgstr "" + +#: py/modbuiltins.c +msgid "chr() arg not in range(0x110000)" +msgstr "" + +#: py/modbuiltins.c +msgid "chr() arg not in range(256)" +msgstr "" + +#: shared-module/vectorio/Circle.c +msgid "circle can only be registered in one parent" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "clip point must be (x,y) tuple" +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 "" + +#: shared-bindings/displayio/Palette.c +msgid "color buffer must be a buffer, tuple, list, or int" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color buffer must be a bytearray or array of type 'b' or 'B'" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color must be between 0x000000 and 0xffffff" +msgstr "" + +#: shared-bindings/displayio/ColorConverter.c +msgid "color should be an int" +msgstr "" + +#: py/emitnative.c +msgid "comparison of int and uint" +msgstr "" + +#: py/objcomplex.c +msgid "complex division by zero" +msgstr "" + +#: py/objfloat.c py/parsenum.c +msgid "complex values not supported" +msgstr "" + +#: extmod/moduzlib.c +msgid "compression header" +msgstr "" + +#: py/parse.c +msgid "constant must be an integer" +msgstr "" + +#: py/emitnative.c +msgid "conversion to object" +msgstr "" + +#: extmod/ulab/code/numpy/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/numpy/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/numpy/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/numpy/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "couldn't determine SD card version" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "cross is defined for 1D arrays of length 3" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "data must be iterable" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "data must be of equal length" +msgstr "" + +#: ports/atmel-samd/common-hal/imagecapture/ParallelImageCapture.c +#, c-format +msgid "data pin #%d in use" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "data type not understood" +msgstr "" + +#: py/parsenum.c +msgid "decimal numbers not supported" +msgstr "" + +#: py/compile.c +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" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "destination buffer must be an array of type 'H' for bit_depth = 16" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "destination_length must be an int >= 0" +msgstr "" + +#: py/objdict.c +msgid "dict update sequence has wrong length" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "differentiation order out of range" +msgstr "" + +#: extmod/ulab/code/numpy/transform.c +msgid "dimensions do not match" +msgstr "" + +#: py/emitnative.c +msgid "div/mod not implemented for uint" +msgstr "" + +#: py/objfloat.c py/objint_mpz.c +msgid "divide by zero" +msgstr "" + +#: py/modmath.c py/objint_longlong.c py/runtime.c +#: shared-bindings/math/__init__.c +msgid "division by zero" +msgstr "" + +#: ports/espressif/common-hal/rotaryio/IncrementalEncoder.c +msgid "divisor must be 4" +msgstr "" + +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + +#: py/objdeque.c +msgid "empty" +msgstr "" + +#: extmod/moduasyncio.c extmod/moduheapq.c extmod/modutimeq.c +msgid "empty heap" +msgstr "" + +#: py/objstr.c +msgid "empty separator" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "empty sequence" +msgstr "" + +#: py/objstr.c +msgid "end of format while looking for conversion specifier" +msgstr "" + +#: shared-bindings/displayio/Shape.c +msgid "end_x should be an int" +msgstr "" + +#: shared-bindings/alarm/time/TimeAlarm.c +msgid "epoch_time not supported on this board" +msgstr "" + +#: ports/nrf/common-hal/busio/UART.c +#, c-format +msgid "error = 0x%08lX" +msgstr "" + +#: py/runtime.c +msgid "exceptions must derive from BaseException" +msgstr "" + +#: shared-bindings/canio/CAN.c +msgid "expected '%q' but got '%q'" +msgstr "" + +#: shared-bindings/canio/CAN.c +msgid "expected '%q' or '%q' but got '%q'" +msgstr "" + +#: py/objstr.c +msgid "expected ':' after format specifier" +msgstr "" + +#: py/obj.c +msgid "expected tuple/list" +msgstr "" + +#: py/modthread.c +msgid "expecting a dict for keyword args" +msgstr "" + +#: py/compile.c +msgid "expecting an assembler instruction" +msgstr "" + +#: py/compile.c +msgid "expecting just a value for set" +msgstr "" + +#: py/compile.c +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 "" + +#: py/argcheck.c +msgid "extra positional arguments given" +msgstr "" + +#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c +#: shared-bindings/displayio/OnDiskBitmap.c shared-bindings/synthio/__init__.c +#: shared-module/gifio/GifWriter.c +msgid "file must be a file opened in byte mode" +msgstr "" + +#: shared-bindings/traceback/__init__.c +msgid "file write is not available" +msgstr "" + +#: shared-bindings/storage/__init__.c +msgid "filesystem must provide mount method" +msgstr "" + +#: extmod/ulab/code/numpy/vector.c +msgid "first argument must be a callable" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "first argument must be a function" +msgstr "" + +#: extmod/ulab/code/numpy/create.c +msgid "first argument must be a tuple of ndarrays" +msgstr "" + +#: extmod/ulab/code/numpy/vector.c +msgid "first argument must be an ndarray" +msgstr "" + +#: py/objtype.c +msgid "first argument to super() must be type" +msgstr "" + +#: extmod/ulab/code/scipy/linalg/linalg.c +msgid "first two arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "flip argument must be an ndarray" +msgstr "" + +#: py/objint.c +msgid "float too big" +msgstr "" + +#: py/nativeglue.c +msgid "float unsupported" +msgstr "" + +#: shared-bindings/_stage/Text.c +msgid "font must be 2048 bytes long" +msgstr "" + +#: py/objstr.c +msgid "format requires a dict" +msgstr "" + +#: py/objdeque.c +msgid "full" +msgstr "" + +#: py/argcheck.c +msgid "function doesn't take keyword arguments" +msgstr "" + +#: py/argcheck.c +#, c-format +msgid "function expected at most %d arguments, got %d" +msgstr "" + +#: py/bc.c py/objnamedtuple.c +msgid "function got multiple values for argument '%q'" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "function has the same sign at the ends of interval" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "function is defined for ndarrays only" +msgstr "" + +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + +#: py/argcheck.c +#, c-format +msgid "function missing %d required positional arguments" +msgstr "" + +#: py/bc.c +msgid "function missing keyword-only argument" +msgstr "" + +#: py/bc.c +msgid "function missing required keyword argument '%q'" +msgstr "" + +#: py/bc.c +#, c-format +msgid "function missing required positional argument #%d" +msgstr "" + +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c +#, c-format +msgid "function takes %d positional arguments but %d were given" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "function takes exactly 9 arguments" +msgstr "" + +#: py/objgenerator.c +msgid "generator already executing" +msgstr "" + +#: py/objgenerator.c +msgid "generator ignored GeneratorExit" +msgstr "" + +#: py/objgenerator.c py/runtime.c +msgid "generator raised StopIteration" +msgstr "" + +#: shared-bindings/_stage/Layer.c +msgid "graphic must be 2048 bytes long" +msgstr "" + +#: extmod/moduhashlib.c +msgid "hash is final" +msgstr "" + +#: extmod/moduheapq.c +msgid "heap must be a list" +msgstr "" + +#: py/compile.c +msgid "identifier redefined as global" +msgstr "" + +#: py/compile.c +msgid "identifier redefined as nonlocal" +msgstr "" + +#: py/compile.c +msgid "import * not at module level" +msgstr "" + +#: py/persistentcode.c +msgid "incompatible native .mpy architecture" +msgstr "" + +#: py/objstr.c +msgid "incomplete format" +msgstr "" + +#: py/objstr.c +msgid "incomplete format key" +msgstr "" + +#: extmod/modubinascii.c +msgid "incorrect padding" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c extmod/ulab/code/ulab_tools.c +#: ports/espressif/common-hal/pulseio/PulseIn.c py/obj.c +#: shared-bindings/bitmaptools/__init__.c +msgid "index out of range" +msgstr "" + +#: py/obj.c +msgid "indices must be integers" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "initial values must be iterable" +msgstr "" + +#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c +msgid "initial_value length is wrong" +msgstr "" + +#: py/compile.c +msgid "inline assembler must be a function" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "input and output shapes are not compatible" +msgstr "" + +#: extmod/ulab/code/numpy/create.c +msgid "input argument must be an integer, a tuple, or a list" +msgstr "" + +#: extmod/ulab/code/numpy/fft/fft_tools.c +msgid "input array length must be power of 2" +msgstr "" + +#: extmod/ulab/code/numpy/create.c +msgid "input arrays are not compatible" +msgstr "" + +#: extmod/ulab/code/numpy/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "input matrix is asymmetric" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +#: extmod/ulab/code/scipy/linalg/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + +#: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c +msgid "input must be a dense ndarray" +msgstr "" + +#: extmod/ulab/code/numpy/create.c +msgid "input must be a tensor of rank 2" +msgstr "" + +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c +msgid "input must be an ndarray" +msgstr "" + +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "input must be one-dimensional" +msgstr "" + +#: extmod/ulab/code/ulab_tools.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/numpy/poly.c +msgid "input vectors must be of equal length" +msgstr "" + +#: extmod/ulab/code/numpy/poly.c +msgid "inputs are not iterable" +msgstr "" + +#: py/parsenum.c +msgid "int() arg 2 must be >= 2 and <= 36" +msgstr "" + +#: extmod/ulab/code/numpy/approx.c +msgid "interp is defined for 1D iterables of equal length" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +#, c-format +msgid "interval must be in range %s-%s" +msgstr "" + +#: py/compile.c +msgid "invalid architecture" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid bits_per_pixel %d, must be, 1, 2, 4, 8, 16, 24, or 32" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element size %d for bits_per_pixel %d\n" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +#, c-format +msgid "invalid element_size %d, must be, 1, 2, or 4" +msgstr "" + +#: shared-bindings/traceback/__init__.c +msgid "invalid exception" +msgstr "" + +#: extmod/modframebuf.c +msgid "invalid format" +msgstr "" + +#: py/objstr.c +msgid "invalid format specifier" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "invalid hostname" +msgstr "" + +#: py/compile.c +msgid "invalid micropython decorator" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "invalid step" +msgstr "" + +#: py/compile.c py/parse.c +msgid "invalid syntax" +msgstr "" + +#: py/parsenum.c +msgid "invalid syntax for integer" +msgstr "" + +#: py/parsenum.c +#, c-format +msgid "invalid syntax for integer with base %d" +msgstr "" + +#: py/parsenum.c +msgid "invalid syntax for number" +msgstr "" + +#: py/objexcept.c +msgid "invalid traceback" +msgstr "" + +#: py/objtype.c +msgid "issubclass() arg 1 must be a class" +msgstr "" + +#: py/objtype.c +msgid "issubclass() arg 2 must be a class or a tuple of classes" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "iterations did not converge" +msgstr "" + +#: py/objstr.c +msgid "join expects a list of str/bytes objects consistent with self object" +msgstr "" + +#: py/argcheck.c +msgid "keyword argument(s) not yet implemented - use normal args instead" +msgstr "" + +#: py/bc.c +msgid "keywords must be strings" +msgstr "" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +msgid "label '%q' not defined" +msgstr "" + +#: py/compile.c +msgid "label redefined" +msgstr "" + +#: py/stream.c +msgid "length argument not allowed for this type" +msgstr "" + +#: shared-bindings/audiomixer/MixerVoice.c +msgid "level must be between 0 and 1" +msgstr "" + +#: py/objarray.c +msgid "lhs and rhs should be compatible" +msgstr "" + +#: py/emitnative.c +msgid "local '%q' has type '%q' but source is '%q'" +msgstr "" + +#: py/emitnative.c +msgid "local '%q' used before type known" +msgstr "" + +#: py/vm.c +msgid "local variable referenced before assignment" +msgstr "" + +#: py/objint.c +msgid "long int not supported in this build" +msgstr "" + +#: ports/espressif/common-hal/canio/CAN.c +msgid "loopback + silent mode not supported by peripheral" +msgstr "" + +#: py/parse.c +msgid "malformed f-string" +msgstr "" + +#: shared-bindings/_stage/Layer.c +msgid "map buffer too small" +msgstr "" + +#: py/modmath.c shared-bindings/math/__init__.c +msgid "math domain error" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "matrix is not positive definite" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +#: ports/nrf/common-hal/_bleio/Descriptor.c +#, c-format +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 "" + +#: extmod/ulab/code/ndarray.c +msgid "maximum number of dimensions is 4" +msgstr "" + +#: py/runtime.c +msgid "maximum recursion depth exceeded" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "maxiter must be > 0" +msgstr "" + +#: extmod/ulab/code/scipy/optimize/optimize.c +msgid "maxiter should be > 0" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "median argument must be an ndarray" +msgstr "" + +#: py/runtime.c +#, c-format +msgid "memory allocation failed, allocating %u bytes" +msgstr "" + +#: py/runtime.c +msgid "memory allocation failed, heap is locked" +msgstr "" + +#: py/objarray.c +msgid "memoryview: length is not a multiple of itemsize" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "mode must be complete, or reduced" +msgstr "" + +#: py/builtinimport.c +msgid "module not found" +msgstr "" + +#: ports/espressif/common-hal/wifi/Monitor.c +msgid "monitor init failed" +msgstr "" + +#: extmod/ulab/code/numpy/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + +#: py/compile.c +msgid "multiple *x in assignment" +msgstr "" + +#: py/objtype.c +msgid "multiple bases have instance lay-out conflict" +msgstr "" + +#: py/objtype.c +msgid "multiple inheritance not supported" +msgstr "" + +#: py/emitnative.c +msgid "must raise an object" +msgstr "" + +#: py/modbuiltins.c +msgid "must use keyword argument for key function" +msgstr "" + +#: py/runtime.c +msgid "name '%q' is not defined" +msgstr "" + +#: py/runtime.c +msgid "name not defined" +msgstr "" + +#: py/asmthumb.c +msgid "native method too big" +msgstr "" + +#: py/emitnative.c +msgid "native yield" +msgstr "" + +#: py/runtime.c +#, c-format +msgid "need more than %d values to unpack" +msgstr "" + +#: py/modmath.c +msgid "negative factorial" +msgstr "" + +#: py/objint_longlong.c py/objint_mpz.c py/runtime.c +msgid "negative power with no float support" +msgstr "" + +#: py/objint_mpz.c py/runtime.c +msgid "negative shift count" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "no SD card" +msgstr "" + +#: py/vm.c +msgid "no active exception to reraise" +msgstr "" + +#: py/compile.c +msgid "no binding for nonlocal found" +msgstr "" + +#: shared-module/msgpack/__init__.c +msgid "no default packer" +msgstr "" + +#: extmod/modurandom.c +msgid "no default seed" +msgstr "" + +#: py/builtinimport.c +msgid "no module named '%q'" +msgstr "" + +#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/paralleldisplay/ParallelBus.c +msgid "no reset pin available" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "no response from SD card" +msgstr "" + +#: py/objobject.c py/runtime.c +msgid "no such attribute" +msgstr "" + +#: shared-bindings/usb_hid/__init__.c +msgid "non-Device in %q" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Connection.c +msgid "non-UUID found in service_uuids_whitelist" +msgstr "" + +#: py/compile.c +msgid "non-default argument follows default argument" +msgstr "" + +#: extmod/modubinascii.c +msgid "non-hex digit found" +msgstr "" + +#: py/compile.c +msgid "non-keyword arg after */**" +msgstr "" + +#: py/compile.c +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 "" + +#: shared-bindings/_bleio/UUID.c +msgid "not a 128-bit UUID" +msgstr "" + +#: py/objstr.c +msgid "not all arguments converted during string formatting" +msgstr "" + +#: py/objstr.c +msgid "not enough arguments for format string" +msgstr "" + +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c +msgid "number of points must be at least 2" +msgstr "" + +#: py/builtinhelp.c +msgid "object " +msgstr "" + +#: py/obj.c +#, c-format +msgid "object '%s' isn't a tuple or list" +msgstr "" + +#: py/obj.c +msgid "object doesn't support item assignment" +msgstr "" + +#: py/obj.c +msgid "object doesn't support item deletion" +msgstr "" + +#: py/obj.c +msgid "object has no len" +msgstr "" + +#: py/obj.c +msgid "object isn't subscriptable" +msgstr "" + +#: py/runtime.c +msgid "object not an iterator" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "object not callable" +msgstr "" + +#: py/sequence.c shared-bindings/displayio/Group.c +msgid "object not in sequence" +msgstr "" + +#: py/runtime.c +msgid "object not iterable" +msgstr "" + +#: py/obj.c +#, c-format +msgid "object of type '%s' has no len()" +msgstr "" + +#: py/obj.c +msgid "object with buffer protocol required" +msgstr "" + +#: extmod/modubinascii.c +msgid "odd-length string" +msgstr "" + +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c +msgid "offset is too large" +msgstr "" + +#: shared-bindings/dualbank/__init__.c +msgid "offset must be >= 0" +msgstr "" + +#: extmod/ulab/code/numpy/create.c +msgid "offset must be non-negative and no greater than buffer length" +msgstr "" + +#: py/objstr.c py/objstrunicode.c +msgid "offset out of bounds" +msgstr "" + +#: ports/nrf/common-hal/audiobusio/PDMIn.c +msgid "only bit_depth=16 is supported" +msgstr "" + +#: ports/nrf/common-hal/audiobusio/PDMIn.c +msgid "only sample_rate=16000 is supported" +msgstr "" + +#: py/objarray.c py/objstr.c py/objstrunicode.c py/objtuple.c +#: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c +msgid "only slices with step=1 (aka None) are supported" +msgstr "" + +#: py/vm.c +msgid "opcode" +msgstr "" + +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/compare.c +#: extmod/ulab/code/numpy/vector.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "operation is defined for 2D arrays only" +msgstr "" + +#: extmod/ulab/code/numpy/linalg/linalg.c +msgid "operation is defined for ndarrays only" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is implemented for 1D Boolean arrays only" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "" + +#: py/modbuiltins.c +msgid "ord expects a character" +msgstr "" + +#: py/modbuiltins.c +#, c-format +msgid "ord() expected a character, but string of length %d found" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out array is too small" +msgstr "" + +#: extmod/ulab/code/utils/utils.c +msgid "out must be a float dense array" +msgstr "" + +#: shared-bindings/displayio/Bitmap.c +msgid "out of range of source" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +msgid "out of range of target" +msgstr "" + +#: py/objint_mpz.c +msgid "overflow converting long int to machine word" +msgstr "" + +#: py/modstruct.c +#, c-format +msgid "pack expected %d items for packing (got %d)" +msgstr "" + +#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c +msgid "palette must be 32 bytes long" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "palette_index should be an int" +msgstr "" + +#: py/emitinlinextensa.c +msgid "parameters must be registers in sequence a2 to a5" +msgstr "" + +#: py/emitinlinethumb.c +msgid "parameters must be registers in sequence r0 to r3" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +msgid "pixel coordinates out of bounds" +msgstr "" + +#: shared-bindings/displayio/Bitmap.c +msgid "pixel value requires too many bits" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c +msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +msgstr "" + +#: shared-module/vectorio/Polygon.c +msgid "polygon can only be registered in one parent" +msgstr "" + +#: ports/espressif/common-hal/pulseio/PulseIn.c +msgid "pop from an empty PulseIn" +msgstr "" + +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/raspberrypi/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" +msgstr "" + +#: shared-bindings/socketpool/Socket.c shared-bindings/ssl/SSLSocket.c +msgid "port must be >= 0" +msgstr "" + +#: py/objint_mpz.c +msgid "pow() 3rd argument cannot be 0" +msgstr "" + +#: py/objint_mpz.c +msgid "pow() with 3 arguments requires integers" +msgstr "" + +#: ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h +#: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +#: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +#: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +#: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h +#: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h +#: ports/espressif/boards/artisense_rd00/mpconfigboard.h +#: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h +#: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h +#: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h +#: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h +#: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wroom/mpconfigboard.h +#: ports/espressif/boards/espressif_saola_1_wrover/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wroom/mpconfigboard.h +#: ports/espressif/boards/franzininho_wifi_wrover/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_m/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_ms/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_r/mpconfigboard.h +#: ports/espressif/boards/gravitech_cucumber_rs/mpconfigboard.h +#: ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_mini/mpconfigboard.h +#: ports/espressif/boards/lolin_s2_pico/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h +#: ports/espressif/boards/microdev_micro_s2/mpconfigboard.h +#: ports/espressif/boards/morpheans_morphesp-240/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wroom/mpconfigboard.h +#: ports/espressif/boards/muselab_nanoesp32_s2_wrover/mpconfigboard.h +#: ports/espressif/boards/odt_pixelwing_esp32_s2/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wroom/mpconfigboard.h +#: ports/espressif/boards/targett_module_clip_wrover/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_neo/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_feathers2_prerelease/mpconfigboard.h +#: ports/espressif/boards/unexpectedmaker_tinys2/mpconfigboard.h +msgid "pressing boot button at start up.\n" +msgstr "" + +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "pressing both buttons at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "pressing the left button at start up\n" +msgstr "" + +#: ports/raspberrypi/common-hal/rp2pio/StateMachine.c +msgid "pull masks conflict with direction masks" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "pull_threshold must be between 1 and 32" +msgstr "" + +#: ports/raspberrypi/bindings/rp2pio/StateMachine.c +msgid "push_threshold must be between 1 and 32" +msgstr "" + +#: extmod/modutimeq.c +msgid "queue overflow" +msgstr "" + +#: py/parse.c +msgid "raw f-strings are not supported" +msgstr "" + +#: extmod/ulab/code/numpy/fft/fft_tools.c +msgid "real and imaginary parts must be of equal length" +msgstr "" + +#: py/builtinimport.c +msgid "relative import" +msgstr "" + +#: py/obj.c +#, c-format +msgid "requested length %d but object has length %d" +msgstr "" + +#: extmod/ulab/code/ndarray_operators.c +msgid "results cannot be cast to specified type" +msgstr "" + +#: py/compile.c +msgid "return annotation must be an identifier" +msgstr "" + +#: py/emitnative.c +msgid "return expected '%q' but got '%q'" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "rgb_pins[%d] duplicates another pin assignment" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "rgb_pins[%d] is not on the same port as clock" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "roll argument must be an ndarray" +msgstr "" + +#: py/objstr.c +msgid "rsplit(None,n)" +msgstr "" + +#: shared-bindings/audiocore/RawSample.c +msgid "" +"sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " +"'B'" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +#: ports/raspberrypi/common-hal/audiobusio/PDMIn.c +msgid "sampling rate out of range" +msgstr "" + +#: py/modmicropython.c +msgid "schedule queue full" +msgstr "" + +#: py/builtinimport.c +msgid "script compilation not supported" +msgstr "" + +#: py/nativeglue.c +msgid "set unsupported" +msgstr "" + +#: extmod/ulab/code/ndarray.c +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 "" + +#: py/objstr.c +msgid "sign not allowed with integer format specifier 'c'" +msgstr "" + +#: py/objstr.c +msgid "single '}' encountered in format string" +msgstr "" + +#: extmod/ulab/code/ulab_tools.c +msgid "size is defined for ndarrays only" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "sleep length must be non-negative" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "" + +#: py/objslice.c +msgid "slice step cannot be zero" +msgstr "" + +#: py/nativeglue.c +msgid "slice unsupported" +msgstr "" + +#: py/objint.c py/sequence.c +msgid "small int overflow" +msgstr "" + +#: main.c +msgid "soft reboot\n" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "sos array must be of shape (n_section, 6)" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "sos[:, 3] should be all ones" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "sosfilt requires iterable arguments" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c shared-bindings/displayio/Bitmap.c +msgid "source palette too large" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "source_bitmap must have value_count of 2 or 65536" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "source_bitmap must have value_count of 65536" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "source_bitmap must have value_count of 8" +msgstr "" + +#: shared-bindings/wifi/Radio.c +msgid "ssid can't be more than 32 bytes" +msgstr "" + +#: py/objstr.c +msgid "start/end indices" +msgstr "" + +#: shared-bindings/displayio/Shape.c +msgid "start_x should be an int" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "step must be non-zero" +msgstr "" + +#: shared-bindings/busio/UART.c +msgid "stop must be 1 or 2" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "stop not reachable from start" +msgstr "" + +#: py/stream.c shared-bindings/getpass/__init__.c +msgid "stream operation not supported" +msgstr "" + +#: py/objstrunicode.c +msgid "string indices must be integers, not %q" +msgstr "" + +#: py/stream.c +msgid "string not supported; use bytes or bytearray" +msgstr "" + +#: extmod/moductypes.c +msgid "struct: can't index" +msgstr "" + +#: extmod/moductypes.c +msgid "struct: index out of range" +msgstr "" + +#: extmod/moductypes.c +msgid "struct: no fields" +msgstr "" + +#: py/objarray.c py/objstr.c +msgid "substring not found" +msgstr "" + +#: py/compile.c +msgid "super() can't find self" +msgstr "" + +#: extmod/modujson.c +msgid "syntax error in JSON" +msgstr "" + +#: extmod/moductypes.c +msgid "syntax error in uctypes descriptor" +msgstr "" + +#: shared-bindings/touchio/TouchIn.c +msgid "threshold must be in the range 0-65536" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +msgid "tile must be greater than zero" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "time.struct_time() takes a 9-sequence" +msgstr "" + +#: ports/atmel-samd/common-hal/watchdog/WatchDogTimer.c +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +#: ports/nrf/common-hal/watchdog/WatchDogTimer.c +#: ports/raspberrypi/common-hal/watchdog/WatchDogTimer.c +msgid "timeout duration exceeded the maximum supported value" +msgstr "" + +#: shared-bindings/busio/UART.c +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 "" + +#: shared-module/sdcardio/SDCard.c +msgid "timeout waiting for v1 card" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "timeout waiting for v2 card" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "timestamp out of range for platform time_t" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "tobytes can be invoked for dense arrays only" +msgstr "" + +#: shared-module/struct/__init__.c +msgid "too many arguments provided with the given format" +msgstr "" + +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c +msgid "too many dimensions" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "" + +#: py/asmthumb.c +msgid "too many locals for native method" +msgstr "" + +#: py/runtime.c +#, c-format +msgid "too many values to unpack (expected %d)" +msgstr "" + +#: extmod/ulab/code/numpy/approx.c +msgid "trapz is defined for 1D arrays of equal length" +msgstr "" + +#: extmod/ulab/code/numpy/approx.c +msgid "trapz is defined for 1D iterables" +msgstr "" + +#: py/obj.c +msgid "tuple/list has wrong length" +msgstr "" + +#: ports/espressif/common-hal/canio/CAN.c +#, c-format +msgid "twai_driver_install returned esp-idf error #%d" +msgstr "" + +#: ports/espressif/common-hal/canio/CAN.c +#, c-format +msgid "twai_start returned esp-idf error #%d" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/espressif/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: shared-bindings/busio/UART.c shared-bindings/canio/CAN.c +msgid "tx and rx cannot both be None" +msgstr "" + +#: py/objtype.c +msgid "type '%q' is not an acceptable base type" +msgstr "" + +#: py/objtype.c +msgid "type is not an acceptable base type" +msgstr "" + +#: py/runtime.c +msgid "type object '%q' has no attribute '%q'" +msgstr "" + +#: py/objgenerator.c +msgid "type object 'generator' has no attribute '__await__'" +msgstr "" + +#: py/objtype.c +msgid "type takes 1 or 3 arguments" +msgstr "" + +#: py/objint_longlong.c +msgid "ulonglong too large" +msgstr "" + +#: py/emitnative.c +msgid "unary op %q not implemented" +msgstr "" + +#: py/parse.c +msgid "unexpected indent" +msgstr "" + +#: py/bc.c +msgid "unexpected keyword argument" +msgstr "" + +#: py/bc.c py/objnamedtuple.c +msgid "unexpected keyword argument '%q'" +msgstr "" + +#: py/lexer.c +msgid "unicode name escapes" +msgstr "" + +#: py/parse.c +msgid "unindent doesn't match any outer indent level" +msgstr "" + +#: py/objstr.c +#, c-format +msgid "unknown conversion specifier %c" +msgstr "" + +#: py/objstr.c +msgid "unknown format code '%c' for object of type '%q'" +msgstr "" + +#: py/compile.c +msgid "unknown type" +msgstr "" + +#: py/compile.c +msgid "unknown type '%q'" +msgstr "" + +#: py/objstr.c +msgid "unmatched '{' in format" +msgstr "" + +#: py/objtype.c py/runtime.c +msgid "unreadable attribute" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c +#: shared-module/vectorio/Polygon.c shared-module/vectorio/VectorShape.c +msgid "unsupported %q type" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "unsupported Thumb instruction '%s' with %d arguments" +msgstr "" + +#: py/emitinlinextensa.c +#, c-format +msgid "unsupported Xtensa instruction '%s' with %d arguments" +msgstr "" + +#: shared-module/gifio/GifWriter.c +msgid "unsupported colorspace for GifWriter" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "unsupported colorspace for dither" +msgstr "" + +#: py/objstr.c +#, c-format +msgid "unsupported format character '%c' (0x%x) at index %d" +msgstr "" + +#: py/runtime.c +msgid "unsupported type for %q: '%q'" +msgstr "" + +#: py/runtime.c +msgid "unsupported type for operator" +msgstr "" + +#: py/runtime.c +msgid "unsupported types for %q: '%q', '%q'" +msgstr "" + +#: py/objint.c +#, c-format +msgid "value must fit in %d byte(s)" +msgstr "" + +#: shared-bindings/bitmaptools/__init__.c +msgid "value out of range of target" +msgstr "" + +#: shared-bindings/displayio/Bitmap.c +msgid "value_count must be > 0" +msgstr "" + +#: ports/espressif/common-hal/watchdog/WatchDogTimer.c +msgid "watchdog not initialized" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "watchdog timeout must be greater than 0" +msgstr "" + +#: shared-bindings/bitops/__init__.c +#, c-format +msgid "width must be from 2 to 8 (inclusive), not %d" +msgstr "" + +#: shared-bindings/is31fl3741/IS31FL3741.c +#: shared-bindings/rgbmatrix/RGBMatrix.c +msgid "width must be greater than zero" +msgstr "" + +#: ports/espressif/common-hal/wifi/Radio.c +msgid "wifi is not enabled" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "window must be <= interval" +msgstr "" + +#: extmod/ulab/code/numpy/numerical.c +msgid "wrong axis index" +msgstr "" + +#: extmod/ulab/code/numpy/create.c +msgid "wrong axis specified" +msgstr "" + +#: extmod/ulab/code/numpy/compare.c extmod/ulab/code/numpy/vector.c +msgid "wrong input type" +msgstr "" + +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c +msgid "wrong number of arguments" +msgstr "" + +#: py/runtime.c +msgid "wrong number of values to unpack" +msgstr "" + +#: extmod/ulab/code/numpy/vector.c +msgid "wrong output type" +msgstr "" + +#: shared-module/displayio/Shape.c +msgid "x value out of bounds" +msgstr "" + +#: ports/espressif/common-hal/audiobusio/__init__.c +msgid "xTaskCreate failed" +msgstr "" + +#: shared-bindings/displayio/Shape.c +msgid "y should be an int" +msgstr "" + +#: shared-module/displayio/Shape.c +msgid "y value out of bounds" +msgstr "" + +#: py/objrange.c +msgid "zero step" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "zi must be an ndarray" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "zi must be of float type" +msgstr "" + +#: extmod/ulab/code/scipy/signal/signal.c +msgid "zi must be of shape (n_section, 2)" +msgstr "" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 07188c8f99..2547284021 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -7,15 +7,15 @@ msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-11-16 01:34+0000\n" -"Last-Translator: River Wang \n" +"PO-Revision-Date: 2022-01-11 14:56+0000\n" +"Last-Translator: hexthat \n" "Language-Team: Chinese Hanyu Pinyin\n" "Language: zh_Latn_pinyin\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -"X-Generator: Weblate 4.9.1-dev\n" +"X-Generator: Weblate 4.10.1\n" #: main.c msgid "" @@ -69,12 +69,12 @@ msgid "%%c requires int or char" msgstr "%%c xūyào zhěngshù huòzhě zìfú" #: shared-bindings/rgbmatrix/RGBMatrix.c -#, fuzzy, c-format +#, c-format msgid "" "%d address pins, %d rgb pins and %d tiles indicate a height of %d, not %d" msgstr "" -"%d de zhǐ yǐn jiǎo , %d rgb yǐn jiǎo hé %d qiē piàn biǎo shì %d de gāo dù, " -"ér bù shì %d" +"%d de zhǐ yǐn jiǎo, %d rgb yǐn jiǎo hé %d qiē piàn biǎo shì %d de gāo dù, ér " +"bù shì %d" #: shared-bindings/microcontroller/Pin.c msgid "%q and %q contain duplicate pins" @@ -154,6 +154,10 @@ msgstr "%q bì xū zài %d hé %d zhī jiān" msgid "%q must be of type %q" msgstr "%q bì xū shì %q lèi xíng" +#: shared-bindings/digitalio/Pull.c +msgid "%q must be of type %q or None" +msgstr "%q lèi xíng bì xū wéi %q huò wú" + #: ports/atmel-samd/common-hal/busio/UART.c msgid "%q must be power of 2" msgstr "%q bì xū shì 2 de zhěng shù cì fāng" @@ -591,7 +595,7 @@ msgstr "liǎnggè yǐnjiǎo dōu bìxū zhīchí yìngjiàn zhōngduàn" #: shared-bindings/displayio/Display.c #: shared-bindings/framebufferio/FramebufferDisplay.c -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "Brightness must be 0-1.0" msgstr "Liàngdù bìxū wèi 0-1.0" @@ -641,20 +645,20 @@ msgstr "Huǎnchōngqū chángdù bìxū wéi 512 de bèishù" #: ports/stm/common-hal/sdioio/SDCard.c msgid "Buffer must be a multiple of 512 bytes" -msgstr "Huǎn chōng qū bì xū shì 512 zì jié de bèi shù" +msgstr "Huǎnchōngqū bìxū shì 512 zìjié de bèishù" #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" -msgstr "Huǎnchōng qū bìxū zhìshǎo chángdù 1" +msgstr "Huǎnchōng qū bìxū zhìshǎo chángdù wéi 1" #: shared-bindings/_bleio/PacketBuffer.c -#, c-format +#, fuzzy, c-format msgid "Buffer too short by %d bytes" msgstr "Huǎn chōng qū tài duǎn , àn %d zì jié" #: ports/espressif/common-hal/imagecapture/ParallelImageCapture.c msgid "Buffers must be same size" -msgstr "huǎn chōng qì bì xū dà xiǎo xiāng tóng" +msgstr "huǎnchōng qū bìxū dàxiǎo xiāngtóng" #: ports/atmel-samd/common-hal/paralleldisplay/ParallelBus.c #: ports/espressif/common-hal/paralleldisplay/ParallelBus.c @@ -662,39 +666,46 @@ msgstr "huǎn chōng qì bì xū dà xiǎo xiāng tóng" #: ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c #, c-format msgid "Bus pin %d is already in use" -msgstr "Zǒngxiàn yǐn jiǎo %d yǐ zài shǐyòng zhōng" +msgstr "Zǒngxiàn yǐnjiǎo %d yǐjīng zài shǐyòng zhōng" #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." -msgstr "Zì jié huǎnchōng qū bìxū shì 16 zì jié." +msgstr "Zìjié huǎnchōng qū bìxū shì 16 zìjié." #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Bytes must be between 0 and 255." -msgstr "Zì jié bìxū jiè yú 0 dào 255 zhī jiān." +msgstr "Zìjié bìxū jiè yú 0 dào 255 zhījiān." #: shared-bindings/aesio/aes.c msgid "CBC blocks must be multiples of 16 bytes" -msgstr "CBC kuài bì xū shì 16 zì jié de bèi shù" +msgstr "CBC kuài bìxū shì 16 zìjié de bèishù" + +#: supervisor/shared/safe_mode.c +msgid "CIRCUITPY drive could not be found or created." +msgstr "zhǎo bú dào huò chuàng jiàn CIRCUITPY qū dòng qì." #: ports/espressif/bindings/espidf/__init__.c ports/espressif/esp_error.c msgid "CRC or checksum was invalid" -msgstr "CRC huò jiào yàn hé wú xiào" +msgstr "CRC huò jiàoyàn hé wúxiào" #: 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__()." +msgstr "Zài fǎngwèn yuánshēn dùixiàng zhīqián diàoyòng super().__init__()." #: ports/espressif/common-hal/alarm/pin/PinAlarm.c +#, fuzzy msgid "Can only alarm on RTC IO from deep sleep." -msgstr "zhǐ néng zài RTC Io shàng cóng shēn dù shuì mián zhōng bào jǐng." +msgstr "zhǐ néng zài RTC IO shàng cóng shēndù shuìmián zhōng bào jǐng." #: ports/espressif/common-hal/alarm/pin/PinAlarm.c +#, fuzzy msgid "Can only alarm on one low pin while others alarm high from deep sleep." msgstr "" "Zhǐ néng zài yīgè dī diàn píng yǐn jiǎo shàng fāchū jǐngbào, ér qítā yǐn " "jiǎo cóng shēndù shuìmián zhōng fāchū gāo diàn píng jǐngbào." #: ports/espressif/common-hal/alarm/pin/PinAlarm.c +#, fuzzy msgid "Can only alarm on two low pins from deep sleep." msgstr "zhǐ néng cóng shēn dù shuì mián zhōng bào jǐng liǎng gè dī yǐn jiǎo." @@ -705,7 +716,7 @@ msgstr "Wúfǎ jiāng CCCD shèzhì wéi běndì tèzhēng" #: shared-bindings/storage/__init__.c shared-bindings/usb_cdc/__init__.c #: shared-bindings/usb_hid/__init__.c shared-bindings/usb_midi/__init__.c msgid "Cannot change USB devices now" -msgstr "xiàn zài wú fǎ gēng gǎi USB shè bèi" +msgstr "xiànzài wúfǎ gēnggǎi USB shèbèi" #: shared-bindings/_bleio/Adapter.c msgid "Cannot create a new Adapter; use _bleio.adapter;" @@ -715,14 +726,14 @@ msgstr "Wúfǎ chuàngjiàn xīn de shìpèiqì; shǐyòng_bleio.Adapter;" #: shared-bindings/memorymonitor/AllocationSize.c #: shared-bindings/pulseio/PulseIn.c msgid "Cannot delete values" -msgstr "Wúfǎ shānchú zhí" +msgstr "Wúfǎ jiāng zhí shānchú" #: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c #: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c #: ports/nrf/common-hal/digitalio/DigitalInOut.c #: ports/raspberrypi/common-hal/digitalio/DigitalInOut.c msgid "Cannot get pull while in output mode" -msgstr "Zài shūchū móshì xià wúfǎ huòqǔ lādòng" +msgstr "Zài shūchū móshì xià wúfǎ huòqǔ shànglā huò xiàlā zhuàngtài" #: ports/nrf/common-hal/microcontroller/Processor.c msgid "Cannot get temperature" @@ -1254,7 +1265,7 @@ msgstr "Jiāmì bùzú" #: ports/espressif/common-hal/wifi/Radio.c msgid "Interface must be started" -msgstr "" +msgstr "jiē kǒu bì xū qǐ dòng" #: ports/atmel-samd/audio_dma.c ports/raspberrypi/audio_dma.c msgid "Internal audio buffer too small" @@ -1317,7 +1328,7 @@ msgstr "Tí gōng liǎo wúxiào de DAC yǐn jiǎo" #: shared-bindings/wifi/Radio.c msgid "Invalid MAC address" -msgstr "" +msgstr "wú xiào de MAC dì zhǐ" #: shared-bindings/synthio/__init__.c msgid "Invalid MIDI file" @@ -1392,9 +1403,13 @@ msgstr "Géshì kuài dàxiǎo wúxiào" msgid "Invalid memory access." msgstr "Wúxiào de nèicún fǎngwèn." +#: extmod/vfs_fat_file.c +msgid "Invalid mode" +msgstr "" + #: ports/espressif/common-hal/wifi/Radio.c msgid "Invalid multicast MAC address" -msgstr "" +msgstr "wú xiào de duō bō MAC dì zhǐ" #: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c msgid "Invalid number of bits" @@ -1492,9 +1507,9 @@ msgstr "Wúxiào de zì/wèi chángdù" msgid "Key must be 16, 24, or 32 bytes long" msgstr "mì yào bì xū wéi 16, 24 huò 32 zì jié cháng" -#: shared-module/is31fl3741/is31fl3741.c +#: shared-module/is31fl3741/IS31FL3741.c msgid "LED mappings must match display size" -msgstr "" +msgstr "LED yìng shè bì xū yǔ xiǎn shì píng chǐ cùn pǐ pèi" #: py/compile.c msgid "LHS of keyword arg must be an id" @@ -1623,7 +1638,7 @@ msgstr "Wèi zhǎodào DMA píndào" msgid "No DMA pacing timer found" msgstr "wèi zhǎo dào DMA qǐ bó qì" -#: shared-module/adafruit_bus_device/I2CDevice.c +#: shared-module/adafruit_bus_device/i2c_device/I2CDevice.c #, c-format msgid "No I2C device at address: %x" msgstr "dì zhǐ wú I2C shè bèi: %x" @@ -1929,7 +1944,7 @@ msgstr "Pin méiyǒu ADC nénglì" msgid "Pin interrupt already in use" msgstr "yǐn jiǎo zhōng duàn yǐ zài shǐ yòng zhōng" -#: shared-bindings/adafruit_bus_device/SPIDevice.c +#: shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" msgstr "Yǐn jiǎo jǐn shūrù" @@ -2016,6 +2031,10 @@ msgstr "Fāngxiàng shūchū shí Pull méiyǒu shǐyòng." msgid "RAISE mode is not implemented" msgstr "wèi shí xiàn tí shēng mó shì" +#: ports/raspberrypi/common-hal/countio/Counter.c +msgid "RISE_AND_FALL not available on this chip" +msgstr "RISE_AND_FALL zài cǐ xīn piàn shàng bù kě yòng" + #: ports/stm/common-hal/os/__init__.c msgid "RNG DeInit Error" msgstr "RNG qǔxiāo chūshǐhuà cuòwù" @@ -2132,9 +2151,9 @@ msgstr "Cǎiyàng lǜ bìxū wèi zhèng shù" msgid "Sample rate too high. It must be less than %d" msgstr "Cǎiyàng lǜ tài gāo. Tā bìxū xiǎoyú %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c msgid "Scale dimensions must divide by 3" -msgstr "" +msgstr "bǐ lì chǐ cùn bì xū chú yǐ 3" #: ports/nrf/common-hal/_bleio/Adapter.c msgid "Scan already in progess. Stop with stop_scan." @@ -2402,7 +2421,7 @@ msgstr "Wúfǎ fēnpèi huǎnchōng qū yòng yú qiānmíng zhuǎnhuàn" msgid "Unable to create lock" msgstr "Wúfǎ chuàngjiàn suǒ" -#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/is31fl3741.c +#: shared-module/displayio/I2CDisplay.c shared-module/is31fl3741/IS31FL3741.c #, c-format msgid "Unable to find I2C Display at %x" msgstr "Wúfǎ zài%x zhǎodào I2C xiǎnshìqì" @@ -2496,10 +2515,6 @@ msgstr "Bù zhīchí de géshì" msgid "Unsupported operation" msgstr "Bù zhīchí de cāozuò" -#: shared-bindings/digitalio/DigitalInOut.c -msgid "Unsupported pull value." -msgstr "Bù zhīchí de lādòng zhí." - #: ports/espressif/common-hal/dualbank/__init__.c msgid "Update Failed" msgstr "gēng xīn shī bài" @@ -2677,7 +2692,7 @@ msgstr "chángshì huòqǔ kōng xùliè de argmin/ argmax" msgid "attributes not supported yet" msgstr "shǔxìng shàngwèi zhīchí" -#: extmod/ulab/code/numpy/numerical.c +#: extmod/ulab/code/ulab_tools.c msgid "axis is out of bounds" msgstr "zhóu chāo chū biān jiè" @@ -2733,11 +2748,11 @@ msgstr "měi jiàn yàngběn bìxū wèi 8 huò 16" msgid "branch not in range" msgstr "fēnzhī bùzài fànwéi nèi" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer is smaller than requested size" msgstr "huǎn chōng qū xiǎo yú qǐng qiú de dà xiǎo" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "buffer size must be a multiple of element size" msgstr "huǎn chōng qū dà xiǎo bì xū shì yuán sù dà xiǎo de bèi shù" @@ -2787,6 +2802,10 @@ msgstr "jiàozhǔn zhǐ dú dào" msgid "calibration value out of range +/-127" msgstr "jiàozhǔn zhí chāochū fànwéi +/-127" +#: shared-module/vectorio/Rectangle.c +msgid "can only be registered in one parent" +msgstr "zhǐ néng zài yí gè jiā zhǎng zhōng zhù cè" + #: py/emitinlinethumb.c msgid "can only have up to 4 parameters to Thumb assembly" msgstr "zhǐyǒu Thumb zǔjiàn zuìduō 4 cānshù" @@ -2825,6 +2844,10 @@ msgstr "wúfǎ zhuǎnhuàn%s dào fùzá" msgid "can't convert '%q' object to %q implicitly" msgstr "wúfǎ jiāng '%q' duìxiàng zhuǎnhuàn wèi %q yǐn hán" +#: extmod/ulab/code/numpy/vector.c +msgid "can't convert complex to float" +msgstr "" + #: py/obj.c msgid "can't convert to %q" msgstr "wúfǎ zhuǎnhuàn wèi %q" @@ -2920,6 +2943,14 @@ msgid "cannot cast output with casting rule" msgstr "" "wú fǎ shǐ yòng qiáng zhì zhuǎn huàn guī zé qiáng zhì zhuǎn huàn shū chū" +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex to dtype" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot convert complex type" +msgstr "" + #: py/objtype.c msgid "cannot create '%q' instances" msgstr "wúfǎ chuàngjiàn '%q' ' shílì" @@ -3116,6 +3147,10 @@ msgstr "bèi líng chú" msgid "divisor must be 4" msgstr "èr chóng zòu bì xū shì 4" +#: extmod/ulab/code/numpy/vector.c +msgid "dtype must be float, or complex" +msgstr "" + #: py/objdeque.c msgid "empty" msgstr "kòngxián" @@ -3219,7 +3254,7 @@ msgstr "dì yī gè cānshù bìxū shì kě tiáo yòng de" msgid "first argument must be a function" msgstr "dì yīgè cānshù bìxū shì yī gè hánshù" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "first argument must be a tuple of ndarrays" msgstr "dì yī gè cān shù bì xū shì yí gè yuán zǔ ndarrays" @@ -3284,6 +3319,10 @@ msgstr "hánshù zài jiàngé mòwěi jùyǒu xiāngtóng de fúhào" msgid "function is defined for ndarrays only" msgstr "hán shù jǐn wéi ndarrays dìng yì" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "function is implemented for ndarrays only" +msgstr "" + #: py/argcheck.c #, c-format msgid "function missing %d required positional arguments" @@ -3397,7 +3436,7 @@ msgstr "nèi lián jíhé bìxū shì yīgè hánshù" msgid "input and output shapes are not compatible" msgstr "shū rù hé shū chū xíng zhuàng bù jiān róng" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input argument must be an integer, a tuple, or a list" msgstr "shū rù cān shù bì xū shì zhěng shù, yuán zǔ huò liè biǎo" @@ -3405,7 +3444,7 @@ msgstr "shū rù cān shù bì xū shì zhěng shù, yuán zǔ huò liè biǎo" msgid "input array length must be power of 2" msgstr "shūrù shùzǔ de chángdù bìxū shì 2 de mì" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input arrays are not compatible" msgstr "shū rù shù zǔ bù jiān róng" @@ -3413,6 +3452,10 @@ msgstr "shū rù shù zǔ bù jiān róng" msgid "input data must be an iterable" msgstr "shūrù shùjù bìxū shì kě diédài de" +#: extmod/ulab/code/numpy/vector.c +msgid "input dtype must be float or complex" +msgstr "" + #: extmod/ulab/code/numpy/linalg/linalg.c msgid "input matrix is asymmetric" msgstr "shūrù jǔzhèn bù duìchèn" @@ -3422,18 +3465,26 @@ msgstr "shūrù jǔzhèn bù duìchèn" msgid "input matrix is singular" msgstr "shūrù jǔzhèn shì qíyì de" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be a 1D ndarray" +msgstr "" + #: extmod/ulab/code/scipy/linalg/linalg.c extmod/ulab/code/user/user.c msgid "input must be a dense ndarray" msgstr "shū rù bì xū shì mì jí de ndarray" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "input must be a tensor of rank 2" msgstr "shū rù bì xū shì děng jí 2 de zhāng liàng" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/user/user.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/user/user.c msgid "input must be an ndarray" msgstr "shū rù bì xū shì ndarray" +#: extmod/ulab/code/numpy/carray/carray.c +msgid "input must be an ndarray, or a scalar" +msgstr "" + #: extmod/ulab/code/scipy/signal/signal.c msgid "input must be one-dimensional" msgstr "shū rù bì xū shì yì wéi de" @@ -3805,7 +3856,11 @@ msgstr "bùshì zì chuàn géshì huà guòchéng zhōng zhuǎnhuàn de suǒyǒ msgid "not enough arguments for format string" msgstr "géshì zìfú chuàn cān shǔ bùzú" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/carray/carray_tools.c +msgid "not implemented for complex dtype" +msgstr "" + +#: extmod/ulab/code/numpy/create.c msgid "number of points must be at least 2" msgstr "diǎnshù bìxū zhìshǎo wèi 2" @@ -3863,7 +3918,7 @@ msgstr "xūyào huǎnchōng qū xiéyì de duìxiàng" msgid "odd-length string" msgstr "jīshù zìfú chuàn" -#: extmod/ulab/code/ulab_create.c extmod/ulab/code/utils/utils.c +#: extmod/ulab/code/numpy/create.c extmod/ulab/code/utils/utils.c msgid "offset is too large" msgstr "piān yí tài dà" @@ -3871,7 +3926,7 @@ msgstr "piān yí tài dà" msgid "offset must be >= 0" msgstr "piān yí liàng bì xū >= 0" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "offset must be non-negative and no greater than buffer length" msgstr "piān yí liàng bì xū wéi fēi fù shù qiě bù dà yú huǎn chōng qū cháng dù" @@ -4012,18 +4067,26 @@ 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/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h #: ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h #: ports/espressif/boards/adafruit_funhouse/mpconfigboard.h #: ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h #: ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +#: ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp32-c3s/mpconfigboard.h #: ports/espressif/boards/ai_thinker_esp_12k_nodemcu/mpconfigboard.h #: ports/espressif/boards/artisense_rd00/mpconfigboard.h #: ports/espressif/boards/atmegazero_esp32s2/mpconfigboard.h #: ports/espressif/boards/crumpspace_crumps2/mpconfigboard.h #: ports/espressif/boards/electroniccats_bastwifi/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h +#: ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h #: ports/espressif/boards/espressif_hmi_devkit_1/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1.3/mpconfigboard.h #: ports/espressif/boards/espressif_kaluga_1/mpconfigboard.h @@ -4238,7 +4301,7 @@ msgstr "yuán wèi tú (source_bitmap) de zhí de shù mù (value_count) bì xū #: shared-bindings/wifi/Radio.c msgid "ssid can't be more than 32 bytes" -msgstr "" +msgstr "ssid bù néng chāo guò 32 gè zì jié" #: py/objstr.c msgid "start/end indices" @@ -4351,7 +4414,7 @@ msgstr "tobytes zhǐ néng duì mì jí shù zǔ diào yòng" 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/ndarray.c extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/ndarray.c extmod/ulab/code/numpy/create.c msgid "too many dimensions" msgstr "chǐ cùn tài duō" @@ -4535,7 +4598,7 @@ msgstr "kān mén gǒu chāoshí bìxū dàyú 0" msgid "width must be from 2 to 8 (inclusive), not %d" msgstr "kuān dù bì xū cóng 2 dào 8 ( hán ), ér bù shì %d" -#: shared-bindings/is31fl3741/is31fl3741.c +#: shared-bindings/is31fl3741/IS31FL3741.c #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "width must be greater than zero" msgstr "kuāndù bìxū dàyú líng" @@ -4552,7 +4615,7 @@ msgstr "Chuāngkǒu bìxū shì <= jiàngé" msgid "wrong axis index" msgstr "cuò wù de zhóu suǒ yǐn" -#: extmod/ulab/code/ulab_create.c +#: extmod/ulab/code/numpy/create.c msgid "wrong axis specified" msgstr "zhǐ dìng de zhóu cuò wù" @@ -4560,7 +4623,11 @@ msgstr "zhǐ dìng de zhóu cuò wù" msgid "wrong input type" msgstr "shūrù lèixíng cuòwù" -#: extmod/ulab/code/ulab_create.c py/objarray.c py/objstr.c +#: extmod/ulab/code/numpy/transform.c +msgid "wrong length of condition array" +msgstr "" + +#: extmod/ulab/code/numpy/create.c py/objarray.c py/objstr.c msgid "wrong number of arguments" msgstr "cānshù shù cuòwù" @@ -4604,6 +4671,9 @@ 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 "Unsupported pull value." +#~ msgstr "Bù zhīchí de lādòng zhí." + #~ msgid "%q must <= %d" #~ msgstr "%q bì xū <= %d" diff --git a/main.c b/main.c index b1b482f985..b4537b1d69 100644 --- a/main.c +++ b/main.c @@ -56,6 +56,7 @@ #include "supervisor/shared/safe_mode.h" #include "supervisor/shared/stack.h" #include "supervisor/shared/status_leds.h" +#include "supervisor/shared/tick.h" #include "supervisor/shared/traceback.h" #include "supervisor/shared/translate.h" #include "supervisor/shared/workflow.h" @@ -122,7 +123,7 @@ static void reset_devices(void) { #endif } -STATIC void start_mp(supervisor_allocation *heap) { +STATIC void start_mp(supervisor_allocation *heap, bool first_run) { autoreload_stop(); supervisor_workflow_reset(); @@ -170,7 +171,8 @@ 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. - shared_alarm_save_wake_alarm(common_hal_alarm_create_wake_alarm()); + // There is no alarm if this is not the first time code.py or the REPL has been run. + shared_alarm_save_wake_alarm(first_run ? common_hal_alarm_create_wake_alarm() : mp_const_none); // Reset alarm module only after we retrieved the wakeup alarm. alarm_reset(); #endif @@ -288,10 +290,10 @@ STATIC void cleanup_after_vm(supervisor_allocation *heap, mp_obj_t exception) { keypad_reset(); #endif - // reset_board_busses() first because it may release pins from the never_reset state, so that + // reset_board_buses() first because it may release pins from the never_reset state, so that // reset_port() can reset them. #if CIRCUITPY_BOARD - reset_board_busses(); + reset_board_buses(); #endif reset_port(); reset_board(); @@ -308,7 +310,7 @@ STATIC void print_code_py_status_message(safe_mode_t safe_mode) { } } -STATIC bool run_code_py(safe_mode_t safe_mode) { +STATIC bool run_code_py(safe_mode_t safe_mode, bool first_run, bool *simulate_reset) { bool serial_connected_at_start = serial_connected(); bool printed_safe_mode_message = false; #if CIRCUITPY_AUTORELOAD_DELAY_MS > 0 @@ -347,7 +349,7 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { supervisor_allocation *heap = allocate_remaining_memory(); // Prepare the VM state. Includes an alarm check/reset for sleep. - start_mp(heap); + start_mp(heap, first_run); #if CIRCUITPY_USB usb_setup_with_vm(); @@ -630,6 +632,8 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { #if CIRCUITPY_ALARM if (fake_sleeping) { board_init(); + // Pretend that the next run is the first run, as if we were reset. + *simulate_reset = true; } #endif @@ -651,7 +655,9 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) { // Do USB setup even if boot.py is not run. supervisor_allocation *heap = allocate_remaining_memory(); - start_mp(heap); + + // true means this is the first set of VM's after a hard reset. + start_mp(heap, true); #if CIRCUITPY_USB // Set up default USB values after boot.py VM starts but before running boot.py. @@ -728,12 +734,12 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) { #endif } -STATIC int run_repl(void) { +STATIC int run_repl(bool first_run) { int exit_code = PYEXEC_FORCED_EXIT; stack_resize(); filesystem_flush(); supervisor_allocation *heap = allocate_remaining_memory(); - start_mp(heap); + start_mp(heap, first_run); #if CIRCUITPY_USB usb_setup_with_vm(); @@ -805,7 +811,12 @@ int __attribute__((used)) main(void) { // Create a new filesystem only if we're not in a safe mode. // A power brownout here could make it appear as if there's // no SPI flash filesystem, and we might erase the existing one. - filesystem_init(safe_mode == NO_SAFE_MODE, false); + + // Check whether CIRCUITPY is available. No need to reset to get safe mode + // since we haven't run user code yet. + if (!filesystem_init(safe_mode == NO_SAFE_MODE, false)) { + safe_mode = NO_CIRCUITPY; + } // displays init after filesystem, since they could share the flash SPI board_init(); @@ -827,7 +838,7 @@ int __attribute__((used)) main(void) { // By default our internal flash is readonly to local python code and // writable over USB. Set it here so that boot.py can change it. filesystem_set_internal_concurrent_write_protection(true); - filesystem_set_internal_writable_by_usb(true); + filesystem_set_internal_writable_by_usb(CIRCUITPY_USB == 1); run_boot_py(safe_mode); @@ -846,28 +857,34 @@ int __attribute__((used)) main(void) { supervisor_start_bluetooth(); #endif - // Boot script is finished, so now go into REPL/main mode. + // Boot script is finished, so now go into REPL or run code.py. int exit_code = PYEXEC_FORCED_EXIT; bool skip_repl = true; bool first_run = true; + bool simulate_reset; for (;;) { + simulate_reset = false; if (!skip_repl) { - exit_code = run_repl(); + exit_code = run_repl(first_run); supervisor_set_run_reason(RUN_REASON_REPL_RELOAD); } if (exit_code == PYEXEC_FORCED_EXIT) { if (!first_run) { serial_write_compressed(translate("soft reboot\n")); } - first_run = false; if (pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL) { - skip_repl = run_code_py(safe_mode); + skip_repl = run_code_py(safe_mode, first_run, &simulate_reset); } else { skip_repl = false; } } else if (exit_code != 0) { break; } + + // Either the REPL or code.py has run and finished. + // If code.py did a fake deep sleep, pretend that we are running code.py for + // the first time after a hard reset. This will preserve any alarm information. + first_run = simulate_reset; } mp_deinit(); return 0; diff --git a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c index 3a9dbc929c..925c5a525f 100644 --- a/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c +++ b/ports/atmel-samd/boards/bdmicro_vina_d51/pins.c @@ -85,6 +85,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA12) }, { MP_ROM_QSTR(MP_QSTR_I2C1_SDA), MP_ROM_PTR(&pin_PA13) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA13) }, + { MP_ROM_QSTR(MP_QSTR_LED_AUX), MP_ROM_PTR(&pin_PC26) }, { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_LED_STATUS), MP_ROM_PTR(&pin_PA23) }, { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_PB15) }, diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk index fb65d7cd0a..4d749d2134 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.mk @@ -15,6 +15,7 @@ LONGINT_IMPL = NONE CIRCUITPY_BUSDEVICE = 1 CIRCUITPY_DISPLAYIO = 0 CIRCUITPY_KEYPAD = 0 +CIRCUITPY_ONEWIREIO = 0 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground diff --git a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk index dfdde0dbb0..af0129f10f 100644 --- a/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk +++ b/ports/atmel-samd/boards/cp32-m4/mpconfigboard.mk @@ -8,6 +8,7 @@ CHIP_FAMILY = samd51 QSPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICES = "W25Q128JVxM" +LONGINT_IMPL = MPZ # No I2S on SAMD51G. CIRCUITPY_AUDIOBUSIO = 0 diff --git a/ports/atmel-samd/boards/hallowing_m0_express/board.c b/ports/atmel-samd/boards/hallowing_m0_express/board.c index dfa60a5da6..aace060b01 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/board.c +++ b/ports/atmel-samd/boards/hallowing_m0_express/board.c @@ -71,7 +71,7 @@ uint8_t display_init_sequence[] = { void board_init(void) { displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; - busio_spi_obj_t *spi = common_hal_board_create_spi(); + busio_spi_obj_t *spi = common_hal_board_create_spi(0); common_hal_busio_spi_never_reset(spi); common_hal_displayio_fourwire_construct(bus, spi, diff --git a/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk index 8821f4793a..8274c71243 100644 --- a/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk @@ -13,5 +13,6 @@ LONGINT_IMPL = MPZ CIRCUITPY_KEYPAD = 0 CIRCUITPY_ONEWIREIO = 0 +CIRCUITPY_USB_MIDI = 0 CIRCUITPY_BITBANG_APA102 = 1 diff --git a/ports/atmel-samd/boards/ugame10/board.c b/ports/atmel-samd/boards/ugame10/board.c index b732d259db..d75841be54 100644 --- a/ports/atmel-samd/boards/ugame10/board.c +++ b/ports/atmel-samd/boards/ugame10/board.c @@ -72,7 +72,7 @@ uint8_t display_init_sequence[] = { void board_init(void) { displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; - busio_spi_obj_t *spi = common_hal_board_create_spi(); + busio_spi_obj_t *spi = common_hal_board_create_spi(0); common_hal_displayio_fourwire_construct(bus, spi, &pin_PA09, // Command or data diff --git a/ports/atmel-samd/common-hal/audiobusio/PDMIn.c b/ports/atmel-samd/common-hal/audiobusio/PDMIn.c index e6363395a6..e7c00901bf 100644 --- a/ports/atmel-samd/common-hal/audiobusio/PDMIn.c +++ b/ports/atmel-samd/common-hal/audiobusio/PDMIn.c @@ -66,7 +66,7 @@ #endif // Set by interrupt handler when DMA block has finished transferring. -static bool pdmin_dma_block_done; +static volatile bool pdmin_dma_block_done; // Event channel used to trigger interrupt. Set to invalid value EVSYS_SYNCH_NUM when not in use. static uint8_t pdmin_event_channel; @@ -77,6 +77,7 @@ void pdmin_evsys_handler(void) { } void pdmin_reset(void) { + pdmin_dma_block_done = false; pdmin_event_channel = EVSYS_SYNCH_NUM; while (I2S->SYNCBUSY.reg & I2S_SYNCBUSY_ENABLE) {} @@ -409,6 +410,20 @@ uint32_t common_hal_audiobusio_pdmin_record_to_buffer(audiobusio_pdmin_obj_t* se init_event_channel_interrupt(pdmin_event_channel, CORE_GCLK, EVSYS_ID_GEN_DMAC_CH_0 + dma_channel); // Turn on serializer now to get it in sync with DMA. i2s_set_serializer_enable(self->serializer, true); + + #ifdef SAM_D5X_E5X + int irq = pdmin_event_channel < 4 ? EVSYS_0_IRQn + pdmin_event_channel : EVSYS_4_IRQn; + // Only disable and clear on SAMD51 because the SAMD21 shares EVSYS with ticks. + NVIC_DisableIRQ(irq); + NVIC_ClearPendingIRQ(irq); + #endif + + #ifdef SAMD21 + int irq = EVSYS_IRQn; + #endif + + // Don't bother to disable when done. It doesn't hurt to leave it on. + NVIC_EnableIRQ(irq); audio_dma_enable_channel(dma_channel); // Record diff --git a/ports/atmel-samd/common-hal/countio/Counter.c b/ports/atmel-samd/common-hal/countio/Counter.c index e4df55eba6..c68b9e18ef 100644 --- a/ports/atmel-samd/common-hal/countio/Counter.c +++ b/ports/atmel-samd/common-hal/countio/Counter.c @@ -10,14 +10,14 @@ #include "supervisor/shared/translate.h" void common_hal_countio_counter_construct(countio_counter_obj_t *self, - const mcu_pin_obj_t *pin_a) { - if (!pin_a->has_extint) { + const mcu_pin_obj_t *pin, countio_edge_t edge, digitalio_pull_t pull) { + if (!pin->has_extint) { mp_raise_RuntimeError(translate("Pin must support hardware interrupts")); } if (eic_get_enable()) { - if (!eic_channel_free(pin_a->extint_channel)) { + if (!eic_channel_free(pin->extint_channel)) { mp_raise_RuntimeError(translate("A hardware interrupt channel is already in use")); } } else { @@ -25,28 +25,50 @@ void common_hal_countio_counter_construct(countio_counter_obj_t *self, } // These default settings apply when the EIC isn't yet enabled. - self->eic_channel_a = pin_a->extint_channel; + self->eic_channel = pin->extint_channel; - self->pin_a = pin_a->number; + self->pin = pin->number; - gpio_set_pin_function(self->pin_a, GPIO_PIN_FUNCTION_A); - gpio_set_pin_pull_mode(self->pin_a, GPIO_PULL_UP); + gpio_set_pin_function(self->pin, GPIO_PIN_FUNCTION_A); - set_eic_channel_data(self->eic_channel_a, (void *)self); + enum gpio_pull_mode asf_pull = GPIO_PULL_OFF; + switch (pull) { + case PULL_UP: + asf_pull = GPIO_PULL_UP; + break; + case PULL_DOWN: + asf_pull = GPIO_PULL_DOWN; + break; + case PULL_NONE: + default: + break; + } + gpio_set_pin_pull_mode(self->pin, asf_pull); + + set_eic_channel_data(self->eic_channel, (void *)self); self->count = 0; + claim_pin(pin); + set_eic_handler(self->eic_channel, EIC_HANDLER_COUNTER); - claim_pin(pin_a); - - - set_eic_handler(self->eic_channel_a, EIC_HANDLER_COUNTER); - turn_on_eic_channel(self->eic_channel_a, EIC_CONFIG_SENSE0_FALL_Val); - + uint32_t sense_setting = EIC_CONFIG_SENSE0_BOTH_Val; + switch (edge) { + case EDGE_RISE: + sense_setting = EIC_CONFIG_SENSE0_RISE_Val; + break; + case EDGE_FALL: + sense_setting = EIC_CONFIG_SENSE0_FALL_Val; + break; + case EDGE_RISE_AND_FALL: + default: + break; + } + turn_on_eic_channel(self->eic_channel, sense_setting); } bool common_hal_countio_counter_deinited(countio_counter_obj_t *self) { - return self->pin_a == NO_PIN; + return self->pin == NO_PIN; } void common_hal_countio_counter_deinit(countio_counter_obj_t *self) { @@ -54,12 +76,12 @@ void common_hal_countio_counter_deinit(countio_counter_obj_t *self) { return; } - set_eic_handler(self->eic_channel_a, EIC_HANDLER_NO_INTERRUPT); - turn_off_eic_channel(self->eic_channel_a); + set_eic_handler(self->eic_channel, EIC_HANDLER_NO_INTERRUPT); + turn_off_eic_channel(self->eic_channel); - reset_pin_number(self->pin_a); - self->pin_a = NO_PIN; + reset_pin_number(self->pin); + self->pin = NO_PIN; } @@ -72,10 +94,6 @@ void common_hal_countio_counter_set_count(countio_counter_obj_t *self, self->count = new_count; } -void common_hal_countio_counter_reset(countio_counter_obj_t *self) { - self->count = 0; -} - void counter_interrupt_handler(uint8_t channel) { countio_counter_obj_t *self = get_eic_channel_data(channel); diff --git a/ports/atmel-samd/common-hal/countio/Counter.h b/ports/atmel-samd/common-hal/countio/Counter.h index 8af22253f9..a57df9a777 100644 --- a/ports/atmel-samd/common-hal/countio/Counter.h +++ b/ports/atmel-samd/common-hal/countio/Counter.h @@ -8,8 +8,8 @@ typedef struct { mp_obj_base_t base; - uint8_t pin_a; - uint8_t eic_channel_a : 4; + uint8_t pin; + uint8_t eic_channel : 4; mp_int_t count; } countio_counter_obj_t; diff --git a/ports/atmel-samd/common-hal/neopixel_write/__init__.c b/ports/atmel-samd/common-hal/neopixel_write/__init__.c index 754bc97fdf..182b8eee14 100644 --- a/ports/atmel-samd/common-hal/neopixel_write/__init__.c +++ b/ports/atmel-samd/common-hal/neopixel_write/__init__.c @@ -100,7 +100,7 @@ static void neopixel_send_buffer_core(volatile uint32_t *clraddr, uint32_t pinMa ""); } -uint64_t next_start_raw_ticks = 0; +STATIC uint64_t next_start_raw_ticks = 0; void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, uint8_t *pixels, uint32_t numBytes) { // This is adapted directly from the Adafruit NeoPixel library SAMD21G18A code: diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index 223a60d796..9d238834fe 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -2,22 +2,6 @@ # parameters that vary based on chip and/or board. LD_TEMPLATE_FILE = boards/common.template.ld -# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk -# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. -# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. - -ifeq ($(LONGINT_IMPL),NONE) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none -endif - -ifeq ($(LONGINT_IMPL),MPZ) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz -endif - -ifeq ($(LONGINT_IMPL),LONGLONG) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong -endif - INTERNAL_LIBM = 1 # Number of USB endpoint pairs. diff --git a/ports/atmel-samd/supervisor/port.c b/ports/atmel-samd/supervisor/port.c index 3298e691ab..7ffe7f574f 100644 --- a/ports/atmel-samd/supervisor/port.c +++ b/ports/atmel-samd/supervisor/port.c @@ -386,7 +386,7 @@ void reset_port(void) { audioout_reset(); #endif #if CIRCUITPY_AUDIOBUSIO - // pdmin_reset(); + pdmin_reset(); #endif #if CIRCUITPY_AUDIOBUSIO_I2SOUT i2sout_reset(); diff --git a/ports/broadcom/Makefile b/ports/broadcom/Makefile index 16b44f7501..921d26958a 100644 --- a/ports/broadcom/Makefile +++ b/ports/broadcom/Makefile @@ -31,7 +31,20 @@ include $(TOP)/supervisor/supervisor.mk # Include make rules and variables common across CircuitPython builds. include $(TOP)/py/circuitpy_defns.mk -HAL_DIR=hal/$(MCU_SERIES) +ifeq ($(CHIP_VARIANT), "bcm2711") +CFLAGS += -mcpu=cortex-a72 -DBCM_VERSION=2711 +CROSS_COMPILE = aarch64-none-elf- +SUFFIX = 8 +else ifeq ($(CHIP_VARIANT), "bcm2837") +CFLAGS += -mcpu=cortex-a53 -DBCM_VERSION=2837 +CROSS_COMPILE = aarch64-none-elf- +SUFFIX = 8 +else ifeq ($(CHIP_VARIANT), "bcm2835") +CFLAGS += -mcpu=arm1176jzf-s -DBCM_VERSION=2835 +CROSS_COMPILE = arm-none-eabi- +SUFFIX = +# TODO add 32-bit support for Cortex-A7 in 2836 +endif INC += -I. \ -I../.. \ @@ -69,6 +82,7 @@ SRC_C += bindings/videocore/__init__.c \ peripherals/broadcom/mmu.c \ peripherals/broadcom/vcmailbox.c +SRC_S = peripherals/broadcom/boot$(SUFFIX).s SRC_COMMON_HAL_EXPANDED = $(addprefix shared-bindings/, $(SRC_COMMON_HAL)) \ $(addprefix shared-bindings/, $(SRC_BINDINGS_ENUMS)) \ @@ -82,7 +96,6 @@ SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) # because a few modules have files both in common-hal/ and shared-modules/. # Doing a $(sort ...) removes duplicates as part of sorting. SRC_COMMON_HAL_SHARED_MODULE_EXPANDED = $(sort $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED)) -SRC_S = peripherals/broadcom/boot.s OBJ = $(PY_O) $(SUPERVISOR_O) $(addprefix $(BUILD)/, $(SRC_C:.c=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_COMMON_HAL_SHARED_MODULE_EXPANDED:.c=.o)) @@ -96,15 +109,6 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o)) # BCM CLFAGS CFLAGS += -ffreestanding -nostartfiles -DMICROPY_HW_MCU_NAME="\"$(CHIP_VARIANT)\"" -ifeq ($(CHIP_VARIANT), "bcm2711") -CFLAGS += -mcpu=cortex-a72 -DBCM_VERSION=2711 -CROSS_COMPILE = aarch64-none-elf- -else -CFLAGS += -mcpu=cortex-a53 -DBCM_VERSION=2837 -CROSS_COMPILE = aarch64-none-elf- -# TODO add 32-bit support for Cortex-A7 and ARM1176 -endif - OPTIMIZATION_FLAGS ?= -O3 CFLAGS += $(OPTIMIZATION_FLAGS) @@ -134,40 +138,40 @@ CFLAGS += $(INC) -Wall -Werror -std=gnu11 $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) $ SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED) -LDFLAGS += $(CFLAGS) -T peripherals/broadcom/link.ld -Wl,--gc-sections -Wl,-Map=$@.map # -Wl,--cref +LDFLAGS += $(CFLAGS) -T peripherals/broadcom/link$(SUFFIX).ld -Wl,--gc-sections -Wl,-Map=$@.map # -Wl,--cref # Use toolchain libm if we're not using our own. ifndef INTERNAL_LIBM LIBS += -lm endif -all: $(BUILD)/firmware.kernel8.img $(BUILD)/firmware.disk.img.zip +all: $(BUILD)/firmware.kernel$(SUFFIX).img $(BUILD)/firmware.disk.img.zip %.o: %.c $(CC) $(CFLAGS) -c $< -o $@ -$(BUILD)/kernel8.elf: $(OBJ) +$(BUILD)/kernel$(SUFFIX).elf: $(OBJ) $(STEPECHO) "LINK $@" $(Q)echo $(OBJ) > $(BUILD)/firmware.objs $(Q)$(CC) -o $@ $(LDFLAGS) @$(BUILD)/firmware.objs -Wl,--start-group $(LIBS) -Wl,--end-group -$(BUILD)/kernel8.img: $(BUILD)/kernel8.elf +$(BUILD)/kernel$(SUFFIX).img: $(BUILD)/kernel$(SUFFIX).elf $(STEPECHO) "Create $@" - $(OBJCOPY) -O binary $(BUILD)/kernel8.elf $@ + $(OBJCOPY) -O binary $(BUILD)/kernel$(SUFFIX).elf $@ -$(BUILD)/firmware.kernel8.img: $(BUILD)/kernel8.img +$(BUILD)/firmware.kernel$(SUFFIX).img: $(BUILD)/kernel$(SUFFIX).img $(STEPECHO) "Create $@" $(CP) $^ $@ -$(BUILD)/firmware.disk.img.zip: $(BUILD)/kernel8.img +$(BUILD)/firmware.disk.img.zip: $(BUILD)/kernel$(SUFFIX).img $(STEPECHO) "Create $@" $(Q)dd if=/dev/zero of=$(BUILD)/circuitpython-disk.img bs=1 count=0 seek=256M $(Q)parted -s $(BUILD)/circuitpython-disk.img mktable msdos $(Q)parted -s $(BUILD)/circuitpython-disk.img mkpart primary fat32 0% 100% $(Q)mkfs.fat -F 32 -n BOOT --offset=2048 $(BUILD)/circuitpython-disk.img - $(Q)mcopy -i $(BUILD)/circuitpython-disk.img@@1M config.txt firmware/bootcode.bin firmware/fixup* firmware/start* :: - $(Q)mcopy -i $(BUILD)/circuitpython-disk.img@@1M $(BUILD)/kernel8.img :: + $(Q)mcopy -i $(BUILD)/circuitpython-disk.img@@1M config.txt firmware/bootcode.bin firmware/fixup* firmware/start* firmware/*.dtb :: + $(Q)mcopy -i $(BUILD)/circuitpython-disk.img@@1M $(BUILD)/kernel$(SUFFIX).img :: $(Q)zip $@ $(BUILD)/circuitpython-disk.img $(Q)rm $(BUILD)/circuitpython-disk.img diff --git a/ports/broadcom/boards/diodes_delight_piunora/board.c b/ports/broadcom/boards/diodes_delight_piunora/board.c new file mode 100644 index 0000000000..80bea7f8b6 --- /dev/null +++ b/ports/broadcom/boards/diodes_delight_piunora/board.c @@ -0,0 +1,56 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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 "bindings/videocore/Framebuffer.h" +#include "shared-module/displayio/__init__.h" +#include "shared-bindings/framebufferio/FramebufferDisplay.h" + +void board_init(void) { + videocore_framebuffer_obj_t *fb = &allocate_display_bus()->videocore; + fb->base.type = &videocore_framebuffer_type; + common_hal_videocore_framebuffer_construct(fb, 640, 480); + + framebufferio_framebufferdisplay_obj_t *display = &displays[0].framebuffer_display; + display->base.type = &framebufferio_framebufferdisplay_type; + common_hal_framebufferio_framebufferdisplay_construct( + display, + MP_OBJ_FROM_PTR(fb), + 0, + true); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.h b/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.h new file mode 100644 index 0000000000..a3e318bb13 --- /dev/null +++ b/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.h @@ -0,0 +1,6 @@ +#define MICROPY_HW_BOARD_NAME "Diodes Delight Piunora" + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO12) diff --git a/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.mk b/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.mk new file mode 100644 index 0000000000..d05bb16028 --- /dev/null +++ b/ports/broadcom/boards/diodes_delight_piunora/mpconfigboard.mk @@ -0,0 +1,6 @@ +USB_VID = 0x1209 +USB_PID = 0xD10D +USB_PRODUCT = "Piunora" +USB_MANUFACTURER = "Diodes Delight" + +CHIP_VARIANT = "bcm2711" diff --git a/ports/broadcom/boards/diodes_delight_piunora/pins.c b/ports/broadcom/boards/diodes_delight_piunora/pins.c new file mode 100644 index 0000000000..c1098d1412 --- /dev/null +++ b/ports/broadcom/boards/diodes_delight_piunora/pins.c @@ -0,0 +1,71 @@ +#include "shared-bindings/board/__init__.h" + +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_GPIO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO4) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO19) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO20) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_SDA6),MP_ROM_PTR(&pin_GPIO22) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_SCL6),MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_SDA4),MP_ROM_PTR(&pin_GPIO6) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_SCL4),MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_SPI0_CE1),MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_SPI0_CE0),MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_SPI0_MOSI),MP_ROM_PTR(&pin_GPIO10) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_SPI0_MISO),MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_D13),MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_SPI0_SCLK),MP_ROM_PTR(&pin_GPIO11) }, + + { MP_ROM_QSTR(MP_QSTR_SDA),MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_SDA1),MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_SCL),MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_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/broadcom/boards/raspberrypi_cm4/board.c b/ports/broadcom/boards/raspberrypi_cm4/board.c new file mode 100644 index 0000000000..80bea7f8b6 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_cm4/board.c @@ -0,0 +1,56 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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 "bindings/videocore/Framebuffer.h" +#include "shared-module/displayio/__init__.h" +#include "shared-bindings/framebufferio/FramebufferDisplay.h" + +void board_init(void) { + videocore_framebuffer_obj_t *fb = &allocate_display_bus()->videocore; + fb->base.type = &videocore_framebuffer_type; + common_hal_videocore_framebuffer_construct(fb, 640, 480); + + framebufferio_framebufferdisplay_obj_t *display = &displays[0].framebuffer_display; + display->base.type = &framebufferio_framebufferdisplay_type; + common_hal_framebufferio_framebufferdisplay_construct( + display, + MP_OBJ_FROM_PTR(fb), + 0, + true); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/broadcom/boards/raspberrypi_cm4/mpconfigboard.h b/ports/broadcom/boards/raspberrypi_cm4/mpconfigboard.h new file mode 100644 index 0000000000..fbd258577e --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_cm4/mpconfigboard.h @@ -0,0 +1 @@ +#define MICROPY_HW_BOARD_NAME "Raspberry Pi Compute Module 4" diff --git a/ports/broadcom/boards/raspberrypi_cm4/mpconfigboard.mk b/ports/broadcom/boards/raspberrypi_cm4/mpconfigboard.mk new file mode 100644 index 0000000000..ee54efe84b --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_cm4/mpconfigboard.mk @@ -0,0 +1,6 @@ +USB_VID = 0x2E8A +USB_PID = 0x1014 +USB_PRODUCT = "Compute Module 4" +USB_MANUFACTURER = "Raspberry Pi" + +CHIP_VARIANT = "bcm2711" diff --git a/ports/broadcom/boards/raspberrypi_cm4/pins.c b/ports/broadcom/boards/raspberrypi_cm4/pins.c new file mode 100644 index 0000000000..8999066cb3 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_cm4/pins.c @@ -0,0 +1,48 @@ +#include "shared-bindings/board/__init__.h" + +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + // These match the names used in the CM4 datasheet + { MP_ROM_QSTR(MP_QSTR_ID_SD), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_ID_SC), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_GPIO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_GPIO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_GPIO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_GPIO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_GPIO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_GPIO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_GPIO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_GPIO9), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_GPIO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_GPIO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_GPIO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_GPIO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_GPIO15), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_GPIO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_GPIO17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_GPIO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_GPIO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_GPIO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_GPIO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_GPIO22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_GPIO23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_GPIO24), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_GPIO25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_GPIO26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GPIO27), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_LED_nACT), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO42) }, + + { MP_ROM_QSTR(MP_QSTR_SDA0), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_SCL0), MP_ROM_PTR(&pin_GPIO45) }, + + { 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/broadcom/boards/raspberrypi_cm4io/mpconfigboard.h b/ports/broadcom/boards/raspberrypi_cm4io/mpconfigboard.h index 4211568bfa..9acfb32626 100644 --- a/ports/broadcom/boards/raspberrypi_cm4io/mpconfigboard.h +++ b/ports/broadcom/boards/raspberrypi_cm4io/mpconfigboard.h @@ -2,3 +2,5 @@ #define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) + +#define MICROPY_HW_LED_STATUS (&pin_GPIO42) diff --git a/ports/broadcom/boards/raspberrypi_cm4io/mpconfigboard.mk b/ports/broadcom/boards/raspberrypi_cm4io/mpconfigboard.mk index d430579260..d021462bc6 100644 --- a/ports/broadcom/boards/raspberrypi_cm4io/mpconfigboard.mk +++ b/ports/broadcom/boards/raspberrypi_cm4io/mpconfigboard.mk @@ -1,5 +1,5 @@ USB_VID = 0x2E8A -USB_PID = 0xf000 +USB_PID = 0x1012 USB_PRODUCT = "Compute Module 4 IO Board" USB_MANUFACTURER = "Raspberry Pi" diff --git a/ports/broadcom/boards/raspberrypi_cm4io/pins.c b/ports/broadcom/boards/raspberrypi_cm4io/pins.c index 0dfbe4cbd5..db4eb91710 100644 --- a/ports/broadcom/boards/raspberrypi_cm4io/pins.c +++ b/ports/broadcom/boards/raspberrypi_cm4io/pins.c @@ -57,6 +57,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}, }; diff --git a/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.h b/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.h index be77d35ac7..2980b0f9a5 100644 --- a/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.h +++ b/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.h @@ -2,3 +2,5 @@ #define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) + +#define MICROPY_HW_LED_STATUS (&pin_GPIO42) diff --git a/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.mk b/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.mk index 4567e9c15e..2c808931da 100644 --- a/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.mk +++ b/ports/broadcom/boards/raspberrypi_pi4b/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x2E8A -USB_PID = 0xF001 +USB_PID = 0x1013 USB_PRODUCT = "Raspberry Pi 4B" USB_MANUFACTURER = "Raspberry Pi" -CHIP_VARIANT = bcm2711 +CHIP_VARIANT = "bcm2711" diff --git a/ports/broadcom/boards/raspberrypi_pi4b/pins.c b/ports/broadcom/boards/raspberrypi_pi4b/pins.c index 0dfbe4cbd5..db4eb91710 100644 --- a/ports/broadcom/boards/raspberrypi_pi4b/pins.c +++ b/ports/broadcom/boards/raspberrypi_pi4b/pins.c @@ -57,6 +57,8 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)}, }; diff --git a/ports/broadcom/boards/raspberrypi_zero/board.c b/ports/broadcom/boards/raspberrypi_zero/board.c new file mode 100644 index 0000000000..80bea7f8b6 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_zero/board.c @@ -0,0 +1,56 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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 "bindings/videocore/Framebuffer.h" +#include "shared-module/displayio/__init__.h" +#include "shared-bindings/framebufferio/FramebufferDisplay.h" + +void board_init(void) { + videocore_framebuffer_obj_t *fb = &allocate_display_bus()->videocore; + fb->base.type = &videocore_framebuffer_type; + common_hal_videocore_framebuffer_construct(fb, 640, 480); + + framebufferio_framebufferdisplay_obj_t *display = &displays[0].framebuffer_display; + display->base.type = &framebufferio_framebufferdisplay_type; + common_hal_framebufferio_framebufferdisplay_construct( + display, + MP_OBJ_FROM_PTR(fb), + 0, + true); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/broadcom/boards/raspberrypi_zero/mpconfigboard.h b/ports/broadcom/boards/raspberrypi_zero/mpconfigboard.h new file mode 100644 index 0000000000..1141520e06 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_zero/mpconfigboard.h @@ -0,0 +1,6 @@ +#define MICROPY_HW_BOARD_NAME "Raspberry Pi Zero" + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) + +#define MICROPY_HW_LED_STATUS (&pin_GPIO47) diff --git a/ports/broadcom/boards/raspberrypi_zero/mpconfigboard.mk b/ports/broadcom/boards/raspberrypi_zero/mpconfigboard.mk new file mode 100644 index 0000000000..74f8511c2d --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_zero/mpconfigboard.mk @@ -0,0 +1,6 @@ +USB_VID = 0x2E8A +USB_PID = 0x100E +USB_PRODUCT = "Zero" +USB_MANUFACTURER = "Raspberry Pi" + +CHIP_VARIANT = "bcm2835" diff --git a/ports/broadcom/boards/raspberrypi_zero/pins.c b/ports/broadcom/boards/raspberrypi_zero/pins.c new file mode 100644 index 0000000000..bb6632b923 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_zero/pins.c @@ -0,0 +1,62 @@ +#include "shared-bindings/board/__init__.h" + +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + // These match the names used in Blinka + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_D4), 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_D7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_CE1), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_CE0), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_SCLK), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_SCK), 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_D14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_TXD), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_RXD), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_MISO_1), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_MOSI_1), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_SCLK_1), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_SCK_1), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_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/broadcom/boards/raspberrypi_zero2w/mpconfigboard.mk b/ports/broadcom/boards/raspberrypi_zero2w/mpconfigboard.mk index 8ba37dbba7..1479cb3b8c 100644 --- a/ports/broadcom/boards/raspberrypi_zero2w/mpconfigboard.mk +++ b/ports/broadcom/boards/raspberrypi_zero2w/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x2E8A -USB_PID = 0xF002 +USB_PID = 0x1015 USB_PRODUCT = "Raspberry Pi Zero 2W" USB_MANUFACTURER = "Raspberry Pi" -CHIP_VARIANT = rp3a0 +CHIP_VARIANT = "bcm2837" diff --git a/ports/broadcom/boards/raspberrypi_zero_w/board.c b/ports/broadcom/boards/raspberrypi_zero_w/board.c new file mode 100644 index 0000000000..80bea7f8b6 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_zero_w/board.c @@ -0,0 +1,56 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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 "bindings/videocore/Framebuffer.h" +#include "shared-module/displayio/__init__.h" +#include "shared-bindings/framebufferio/FramebufferDisplay.h" + +void board_init(void) { + videocore_framebuffer_obj_t *fb = &allocate_display_bus()->videocore; + fb->base.type = &videocore_framebuffer_type; + common_hal_videocore_framebuffer_construct(fb, 640, 480); + + framebufferio_framebufferdisplay_obj_t *display = &displays[0].framebuffer_display; + display->base.type = &framebufferio_framebufferdisplay_type; + common_hal_framebufferio_framebufferdisplay_construct( + display, + MP_OBJ_FROM_PTR(fb), + 0, + true); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.h b/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.h new file mode 100644 index 0000000000..389868f882 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.h @@ -0,0 +1,6 @@ +#define MICROPY_HW_BOARD_NAME "Raspberry Pi Zero W" + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) + +#define MICROPY_HW_LED_STATUS (&pin_GPIO47) diff --git a/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.mk b/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.mk new file mode 100644 index 0000000000..24d09e0530 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_zero_w/mpconfigboard.mk @@ -0,0 +1,6 @@ +USB_VID = 0x2E8A +USB_PID = 0x101E +USB_PRODUCT = "Zero W" +USB_MANUFACTURER = "Raspberry Pi" + +CHIP_VARIANT = "bcm2835" diff --git a/ports/broadcom/boards/raspberrypi_zero_w/pins.c b/ports/broadcom/boards/raspberrypi_zero_w/pins.c new file mode 100644 index 0000000000..bb6632b923 --- /dev/null +++ b/ports/broadcom/boards/raspberrypi_zero_w/pins.c @@ -0,0 +1,62 @@ +#include "shared-bindings/board/__init__.h" + +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + // These match the names used in Blinka + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_D4), 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_D7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_CE1), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_CE0), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_SCLK), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_SCK), 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_D14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_TXD), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_RXD), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_MISO_1), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_MOSI_1), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_SCLK_1), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_SCK_1), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_D24), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_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/broadcom/common-hal/busio/I2C.c b/ports/broadcom/common-hal/busio/I2C.c index 9726f394d2..8e135ab4d7 100644 --- a/ports/broadcom/common-hal/busio/I2C.c +++ b/ports/broadcom/common-hal/busio/I2C.c @@ -72,7 +72,8 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, uint8_t sda_alt = 0; for (scl_alt = 0; scl_alt < 6; scl_alt++) { if (scl->functions[scl_alt].type != PIN_FUNCTION_I2C || - i2c_in_use[scl->functions[scl_alt].index]) { + i2c_in_use[scl->functions[scl_alt].index] || + scl->functions[scl_alt].function != I2C_FUNCTION_SCL) { continue; } for (sda_alt = 0; sda_alt < 6; sda_alt++) { diff --git a/ports/broadcom/common-hal/busio/SPI.c b/ports/broadcom/common-hal/busio/SPI.c index 230bd487e9..e11d7bab51 100644 --- a/ports/broadcom/common-hal/busio/SPI.c +++ b/ports/broadcom/common-hal/busio/SPI.c @@ -34,28 +34,104 @@ #include "common-hal/microcontroller/Pin.h" #include "shared-bindings/microcontroller/Pin.h" -#define NO_INSTANCE 0xff +#include "peripherals/broadcom/cpu.h" +#include "peripherals/broadcom/defines.h" +#include "peripherals/broadcom/gpio.h" +#include "peripherals/broadcom/pins.h" +#include "peripherals/broadcom/vcmailbox.h" -STATIC bool never_reset_spi[2]; +#if BCM_VERSION == 2711 +#define NUM_SPI (7) +STATIC SPI0_Type *spi[NUM_SPI] = {SPI0, NULL, NULL, SPI3, SPI4, SPI5, SPI6}; +STATIC SPI1_Type *aux_spi[NUM_SPI] = {NULL, SPI1, SPI2, NULL, NULL, NULL, NULL}; +#else +#define NUM_SPI (3) +STATIC SPI0_Type *spi[NUM_SPI] = {SPI0, NULL, NULL}; +STATIC SPI1_Type *aux_spi[NUM_SPI] = {NULL, SPI1, SPI2}; +#endif + +STATIC bool never_reset_spi[NUM_SPI]; +STATIC bool spi_in_use[NUM_SPI]; void reset_spi(void) { - for (size_t i = 0; i < 2; i++) { + for (size_t i = 0; i < NUM_SPI; i++) { if (never_reset_spi[i]) { continue; } - // TODO + if (i == 1 || i == 2) { + if (i == 1) { + AUX->ENABLES_b.SPI_1 = false; + } else { + AUX->ENABLES_b.SPI_2 = false; + } + aux_spi[i]->CNTL0 = 0; + } else { + // Set CS back to default. All 0 except read enable. + spi[i]->CS = SPI0_CS_REN_Msk; + } + + spi_in_use[i] = false; } } void common_hal_busio_spi_construct(busio_spi_obj_t *self, const mcu_pin_obj_t *clock, const mcu_pin_obj_t *mosi, const mcu_pin_obj_t *miso) { + size_t instance_index = NUM_SPI; + BP_Function_Enum clock_alt = 0; + BP_Function_Enum mosi_alt = 0; + BP_Function_Enum miso_alt = 0; + for (size_t i = 0; i < NUM_SPI; i++) { + if (spi_in_use[i]) { + continue; + } + if (!pin_find_alt(clock, PIN_FUNCTION_SPI, i, SPI_FUNCTION_SCLK, &clock_alt)) { + continue; + } + if (mosi != NULL && !pin_find_alt(mosi, PIN_FUNCTION_SPI, i, SPI_FUNCTION_MOSI, &mosi_alt)) { + continue; + } + if (miso != NULL && !pin_find_alt(miso, PIN_FUNCTION_SPI, i, SPI_FUNCTION_MISO, &miso_alt)) { + continue; + } + instance_index = i; + break; + } + if (instance_index == NUM_SPI) { + mp_raise_ValueError(translate("Invalid pins")); + } + self->clock = clock; + self->MOSI = mosi; + self->MISO = miso; + self->index = instance_index; + spi_in_use[instance_index] = true; + + + if (instance_index == 1) { + AUX->ENABLES_b.SPI_1 = true; + } else if (instance_index == 2) { + AUX->ENABLES_b.SPI_2 = true; + } + + common_hal_busio_spi_configure(self, 250000, 0, 0, 8); + + COMPLETE_MEMORY_READS; + gpio_set_pull(clock->number, BP_PULL_NONE); + gpio_set_function(clock->number, clock_alt); + if (mosi != NULL) { + gpio_set_pull(mosi->number, BP_PULL_NONE); + gpio_set_function(mosi->number, mosi_alt); + } + if (miso != NULL) { + gpio_set_pull(miso->number, BP_PULL_NONE); + gpio_set_function(miso->number, miso_alt); + } } void common_hal_busio_spi_never_reset(busio_spi_obj_t *self) { - // never_reset_spi[spi_get_index(self->peripheral)] = true; + never_reset_spi[self->index] = true; common_hal_never_reset_pin(self->clock); common_hal_never_reset_pin(self->MOSI); @@ -70,12 +146,22 @@ void common_hal_busio_spi_deinit(busio_spi_obj_t *self) { if (common_hal_busio_spi_deinited(self)) { return; } - // never_reset_spi[spi_get_index(self->peripheral)] = false; + never_reset_spi[self->index] = false; common_hal_reset_pin(self->clock); common_hal_reset_pin(self->MOSI); common_hal_reset_pin(self->MISO); self->clock = NULL; + + if (self->index == 1 || + self->index == 2) { + aux_spi[self->index]->CNTL0_b.ENABLE = false; + if (self->index == 1) { + AUX->ENABLES_b.SPI_1 = false; + } else if (self->index == 2) { + AUX->ENABLES_b.SPI_2 = false; + } + } } bool common_hal_busio_spi_configure(busio_spi_obj_t *self, @@ -87,13 +173,40 @@ bool common_hal_busio_spi_configure(busio_spi_obj_t *self, return true; } - // TODO + if (self->index == 1 || self->index == 2) { + SPI1_Type *p = aux_spi[self->index]; + uint32_t source_clock = vcmailbox_get_clock_rate_measured(VCMAILBOX_CLOCK_CORE); + uint16_t clock_divider = source_clock / baudrate; + if (source_clock % baudrate > 0) { + clock_divider += 2; + } + + p->CNTL0 = (clock_divider / 2 - 1) << SPI1_CNTL0_SPEED_Pos | + SPI1_CNTL0_ENABLE_Msk | + SPI1_CNTL0_MSB_FIRST_Msk | + (polarity == 1? SPI1_CNTL0_INVERT_CLK_Msk : 0) | + (phase == polarity? SPI1_CNTL0_IN_RISING_Msk : SPI1_CNTL0_OUT_RISING_Msk) | + 8 << SPI1_CNTL0_SHIFT_LENGTH_Pos; + p->CNTL1 = SPI1_CNTL1_MSB_FIRST_Msk; + self->real_frequency = source_clock / clock_divider; + } else { + SPI0_Type *p = spi[self->index]; + p->CS = polarity << SPI0_CS_CPOL_Pos | + phase << SPI0_CS_CPHA_Pos; + uint32_t source_clock = vcmailbox_get_clock_rate_measured(VCMAILBOX_CLOCK_CORE); + uint16_t clock_divider = source_clock / baudrate; + if (source_clock % baudrate > 0) { + clock_divider += 2; + } + + p->CLK = clock_divider; + self->real_frequency = source_clock / clock_divider; + } self->polarity = polarity; self->phase = phase; self->bits = bits; self->target_frequency = baudrate; - self->real_frequency = baudrate; // TODO return true; } @@ -115,18 +228,103 @@ void common_hal_busio_spi_unlock(busio_spi_obj_t *self) { self->has_lock = false; } +STATIC void _spi_transfer(SPI0_Type *p, + const uint8_t *data_out, size_t out_len, + uint8_t *data_in, size_t in_len) { + size_t len = MAX(out_len, in_len); + COMPLETE_MEMORY_READS; + p->DLEN = len; + p->CS |= SPI0_CS_TA_Msk | SPI0_CS_CLEAR_Msk; + size_t in = 0; + size_t out = 0; + while (in < len) { + while (out < len && p->CS_b.TXD == 1) { + if (out_len == 1) { + p->FIFO = data_out[0]; + } else { + p->FIFO = data_out[out]; + } + out++; + } + // Wait for data to read (also means data has been sent.) + while (p->CS_b.RXD == 0) { + RUN_BACKGROUND_TASKS; + } + while (p->CS_b.RXD == 1) { + uint8_t data = p->FIFO; + if (data_in != NULL) { + data_in[in] = data; + } else { + (void)data; + } + in++; + } + } + p->CS_b.TA = false; + COMPLETE_MEMORY_READS; +} + +STATIC void _aux_spi_transfer(SPI1_Type *p, + const uint8_t *data_out, size_t out_len, + uint8_t *data_in, size_t in_len) { + size_t len = MAX(out_len, in_len); + p->CNTL0 |= SPI1_CNTL0_CLEAR_FIFOS_Msk; + p->CNTL0 &= ~SPI1_CNTL0_CLEAR_FIFOS_Msk; + size_t in = 0; + size_t out = 0; + while (in < len) { + while (out < len && p->STAT_b.TX_FULL == 0) { + if (out_len == 1) { + p->TXHOLD0 = data_out[0] << 24; + } else { + p->TXHOLD0 = data_out[out] << 24; + } + out++; + } + // Wait for data to read (also means data has been sent.) + while (p->STAT_b.RX_EMPTY == 1) { + RUN_BACKGROUND_TASKS; + } + while (p->STAT_b.RX_EMPTY == 0) { + uint8_t data = p->TXHOLD0; + if (data_in != NULL) { + data_in[in] = data; + } else { + (void)data; + } + in++; + } + } +} + bool common_hal_busio_spi_write(busio_spi_obj_t *self, const uint8_t *data, size_t len) { - return false; + if (self->index == 1 || self->index == 2) { + _aux_spi_transfer(aux_spi[self->index], data, len, NULL, 0); + } else { + _spi_transfer(spi[self->index], data, len, NULL, 0); + } + return true; } bool common_hal_busio_spi_read(busio_spi_obj_t *self, uint8_t *data, size_t len, uint8_t write_value) { - return false; + if (self->index == 1 || self->index == 2) { + _aux_spi_transfer(aux_spi[self->index], &write_value, 1, data, len); + } else { + _spi_transfer(spi[self->index], &write_value, 1, data, len); + } + return true; } -bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, const uint8_t *data_out, uint8_t *data_in, size_t len) { - return false; +bool common_hal_busio_spi_transfer(busio_spi_obj_t *self, + const uint8_t *data_out, uint8_t *data_in, size_t len) { + if (self->index == 1 || self->index == 2) { + _aux_spi_transfer(aux_spi[self->index], data_out, len, data_in, len); + } else { + _spi_transfer(spi[self->index], data_out, len, data_in, len); + } + return true; } uint32_t common_hal_busio_spi_get_frequency(busio_spi_obj_t *self) { diff --git a/ports/broadcom/common-hal/busio/SPI.h b/ports/broadcom/common-hal/busio/SPI.h index 0bdbf2d8e7..d1d5fbaf69 100644 --- a/ports/broadcom/common-hal/busio/SPI.h +++ b/ports/broadcom/common-hal/busio/SPI.h @@ -42,6 +42,7 @@ typedef struct { uint8_t polarity; uint8_t phase; uint8_t bits; + uint8_t index; } busio_spi_obj_t; void reset_spi(void); diff --git a/ports/broadcom/common-hal/busio/UART.c b/ports/broadcom/common-hal/busio/UART.c index 85dc36e755..ff17d5ff1d 100644 --- a/ports/broadcom/common-hal/busio/UART.c +++ b/ports/broadcom/common-hal/busio/UART.c @@ -41,7 +41,14 @@ #define NO_PIN 0xff -#define UART_INST(uart) (((uart) ? uart1 : uart0)) +// UART1 is a different peripheral than the rest so it is hardcoded below. +#if BCM_VERSION == 2711 +#define NUM_UART (6) +STATIC ARM_UART_PL011_Type *uart[NUM_UART] = {UART0, NULL, UART2, UART3, UART4, UART5}; +#else +#define NUM_UART (2) +STATIC ARM_UART_PL011_Type *uart[NUM_UART] = {UART0, NULL}; +#endif typedef enum { STATUS_FREE = 0, @@ -49,29 +56,62 @@ typedef enum { STATUS_NEVER_RESET } uart_status_t; -// The Broadcom chips have two different types of UARTs. UART1 is the "mini-UART" -// that is most available so we've implemented it first. The ARM PL011 UART -// support will be added later. We set NUM_UARTS to 2 here so that we can match -// the indexing even though UART0 isn't supported yet. We currently use this -// UART for debugging so we don't support user use of UART yet. -#define NUM_UARTS 2 - -static uart_status_t uart_status[NUM_UARTS]; +static uart_status_t uart_status[NUM_UART]; +static busio_uart_obj_t *active_uart[NUM_UART]; void reset_uart(void) { - for (uint8_t num = 0; num < NUM_UARTS; num++) { + bool any_pl011_active = false; + for (uint8_t num = 0; num < NUM_UART; num++) { if (uart_status[num] == STATUS_BUSY) { + if (num == 1) { + UART1->IER_b.DATA_READY = false; + UART1->CNTL = 0; + COMPLETE_MEMORY_READS; + AUX->ENABLES_b.UART_1 = false; + } else { + ARM_UART_PL011_Type *pl011 = uart[num]; + pl011->CR = 0; + } + active_uart[num] = NULL; uart_status[num] = STATUS_FREE; + } else { + any_pl011_active = any_pl011_active || (num != 1 && uart_status[num] == STATUS_NEVER_RESET); + } + } + if (!any_pl011_active) { + BP_DisableIRQ(UART_IRQn); + } + COMPLETE_MEMORY_READS; + if (AUX->ENABLES == 0) { + BP_DisableIRQ(AUX_IRQn); + } +} + +STATIC void fetch_all_from_fifo(busio_uart_obj_t *self) { + if (self->uart_id == 1) { + while (UART1->STAT_b.DATA_READY && ringbuf_num_empty(&self->ringbuf) > 0) { + int c = UART1->IO_b.DATA; + if (self->sigint_enabled && c == mp_interrupt_char) { + mp_sched_keyboard_interrupt(); + continue; + } + ringbuf_put(&self->ringbuf, c); + } + } else { + ARM_UART_PL011_Type *pl011 = uart[self->uart_id]; + while (!pl011->FR_b.RXFE && ringbuf_num_empty(&self->ringbuf) > 0) { + int c = pl011->DR_b.DATA; + if (self->sigint_enabled && c == mp_interrupt_char) { + mp_sched_keyboard_interrupt(); + continue; + } + ringbuf_put(&self->ringbuf, c); } } } -static busio_uart_obj_t *active_uarts[NUM_UARTS]; - void UART1_IRQHandler(void) { - while (UART1->STAT_b.DATA_READY && ringbuf_num_empty(&active_uarts[1]->ringbuf) > 0) { - ringbuf_put(&active_uarts[1]->ringbuf, (uint8_t)UART1->IO_b.DATA); - } + fetch_all_from_fifo(active_uart[1]); // We couldn't read all pending data (overrun) so clear the FIFO so that the interrupt // can finish. if (UART1->STAT_b.DATA_READY) { @@ -79,8 +119,39 @@ void UART1_IRQHandler(void) { } } +void pl011_IRQHandler(uint8_t index) { + fetch_all_from_fifo(active_uart[index]); + // Clear the interrupt in case we weren't able to clear it by emptying the + // FIFO. (This won't clear the FIFO.) + ARM_UART_PL011_Type *pl011 = uart[index]; + pl011->ICR = UART0_ICR_RXIC_Msk; +} + +void UART0_IRQHandler(void) { + pl011_IRQHandler(0); +} + +#if BCM_VERSION == 2711 +void UART2_IRQHandler(void) { + pl011_IRQHandler(2); +} +void UART3_IRQHandler(void) { + pl011_IRQHandler(3); +} +void UART4_IRQHandler(void) { + pl011_IRQHandler(4); +} +void UART5_IRQHandler(void) { + pl011_IRQHandler(5); +} +#endif + void common_hal_busio_uart_never_reset(busio_uart_obj_t *self) { uart_status[self->uart_id] = STATUS_NEVER_RESET; + common_hal_never_reset_pin(self->tx_pin); + common_hal_never_reset_pin(self->rx_pin); + common_hal_never_reset_pin(self->cts_pin); + common_hal_never_reset_pin(self->rts_pin); } void common_hal_busio_uart_construct(busio_uart_obj_t *self, @@ -103,14 +174,43 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, mp_raise_NotImplementedError(translate("RS485 Not yet supported on this device")); } - if (tx == &pin_GPIO14) { - if (rx == &pin_GPIO15) { - self->uart_id = 1; + size_t instance_index = NUM_UART; + BP_Function_Enum tx_alt = 0; + BP_Function_Enum rx_alt = 0; + BP_Function_Enum rts_alt = 0; + BP_Function_Enum cts_alt = 0; + for (size_t i = 0; i < NUM_UART; i++) { + if (uart_status[i] != STATUS_FREE) { + continue; } + if (tx != NULL) { + if (!pin_find_alt(tx, PIN_FUNCTION_UART, i, UART_FUNCTION_TXD, &tx_alt)) { + continue; + } + if (rts != NULL && !pin_find_alt(rts, PIN_FUNCTION_UART, i, UART_FUNCTION_RTS, &rts_alt)) { + continue; + } + } + if (rx != NULL) { + if (!pin_find_alt(rx, PIN_FUNCTION_UART, i, UART_FUNCTION_RXD, &rx_alt)) { + continue; + } + if (cts != NULL && !pin_find_alt(cts, PIN_FUNCTION_UART, i, UART_FUNCTION_CTS, &cts_alt)) { + continue; + } + } + instance_index = i; + break; + } + if (instance_index == NUM_UART) { + mp_raise_ValueError(translate("Invalid pins")); } self->rx_pin = rx; self->tx_pin = tx; + self->rts_pin = rts; + self->cts_pin = cts; + self->sigint_enabled = sigint_enabled; if (rx != NULL) { if (receiver_buffer != NULL) { @@ -129,8 +229,11 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, } } + active_uart[self->uart_id] = self; + + ARM_UART_PL011_Type *pl011 = uart[self->uart_id]; + if (self->uart_id == 1) { - active_uarts[1] = self; AUX->ENABLES_b.UART_1 = true; UART1->IER = 0; @@ -145,22 +248,80 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, // Clear interrupts UART1->IIR = 0xff; - uint32_t source_clock = vcmailbox_get_clock_rate_measured(VCMAILBOX_CLOCK_CORE); - UART1->BAUD = ((source_clock / (baudrate * 8)) - 1); + common_hal_busio_uart_set_baudrate(self, baudrate); if (tx != NULL) { UART1->CNTL |= UART1_CNTL_TX_ENABLE_Msk; - gpio_set_pull(14, BP_PULL_NONE); - gpio_set_function(14, GPIO_GPFSEL1_FSEL14_TXD1); } if (rx != NULL) { UART1->CNTL |= UART1_CNTL_RX_ENABLE_Msk; - gpio_set_pull(15, BP_PULL_NONE); - gpio_set_function(15, GPIO_GPFSEL1_FSEL15_RXD1); } + } else { + // Ensure the UART is disabled as we configure it. + pl011->CR_b.UARTEN = false; + pl011->IMSC = 0; + pl011->ICR = 0x3ff; + + common_hal_busio_uart_set_baudrate(self, baudrate); + + uint32_t line_control = UART0_LCR_H_FEN_Msk; + line_control |= (bits - 5) << UART0_LCR_H_WLEN_Pos; + if (stop == 2) { + line_control |= UART0_LCR_H_STP2_Msk; + } + if (parity != BUSIO_UART_PARITY_NONE) { + line_control |= UART0_LCR_H_PEN_Msk; + } + if (parity == BUSIO_UART_PARITY_EVEN) { + line_control |= UART0_LCR_H_EPS_Msk; + } + pl011->LCR_H = line_control; + + uint32_t control = UART0_CR_UARTEN_Msk; + if (tx != NULL) { + control |= UART0_CR_TXE_Msk; + } + if (rx != NULL) { + control |= UART0_CR_RXE_Msk; + } + if (cts != NULL) { + control |= UART0_CR_CTSEN_Msk; + } + if (rts != NULL) { + control |= UART0_CR_RTSEN_Msk; + } + pl011->CR = control; + } + + // Setup the pins after waiting for UART stuff + COMPLETE_MEMORY_READS; + if (tx != NULL) { + gpio_set_pull(tx->number, BP_PULL_NONE); + gpio_set_function(tx->number, tx_alt); + } + if (rx != NULL) { + gpio_set_pull(rx->number, BP_PULL_NONE); + gpio_set_function(rx->number, rx_alt); + } + if (rts != NULL) { + gpio_set_pull(rts->number, BP_PULL_NONE); + gpio_set_function(rts->number, rts_alt); + } + if (cts != NULL) { + gpio_set_pull(cts->number, BP_PULL_NONE); + gpio_set_function(cts->number, cts_alt); + } + + // Turn on interrupts + COMPLETE_MEMORY_READS; + if (self->uart_id == 1) { UART1->IER_b.DATA_READY = true; // Never disable this in case the SPIs are used. They can each be // disabled at the peripheral itself. BP_EnableIRQ(AUX_IRQn); + } else { + pl011->IMSC_b.RXIM = true; + // Never disable this in case the other PL011 UARTs are used. + BP_EnableIRQ(UART_IRQn); } } @@ -176,8 +337,11 @@ void common_hal_busio_uart_deinit(busio_uart_obj_t *self) { UART1->IER_b.DATA_READY = false; UART1->CNTL = 0; AUX->ENABLES_b.UART_1 = false; - active_uarts[1] = NULL; + } else { + ARM_UART_PL011_Type *pl011 = uart[self->uart_id]; + pl011->CR = 0; } + active_uart[self->uart_id] = NULL; ringbuf_free(&self->ringbuf); uart_status[self->uart_id] = STATUS_FREE; common_hal_reset_pin(self->tx_pin); @@ -196,20 +360,46 @@ size_t common_hal_busio_uart_write(busio_uart_obj_t *self, const uint8_t *data, mp_raise_ValueError(translate("No TX pin")); } - if (self->uart_id == 1) { - COMPLETE_MEMORY_READS; - for (size_t i = 0; i < len; i++) { + COMPLETE_MEMORY_READS; + ARM_UART_PL011_Type *pl011 = uart[self->uart_id]; + for (size_t i = 0; i < len; i++) { + if (self->uart_id == 1) { // Wait for the FIFO to have space. while (!UART1->STAT_b.TX_READY) { RUN_BACKGROUND_TASKS; } UART1->IO = data[i]; + } else { + while (pl011->FR_b.TXFF) { + RUN_BACKGROUND_TASKS; + } + pl011->DR_b.DATA = data[i]; } - COMPLETE_MEMORY_READS; - return len; } + // Wait for the data to be shifted out + if (self->uart_id == 1) { + while (!UART1->STAT_b.TX_DONE) { + RUN_BACKGROUND_TASKS; + } + } else { + while (pl011->FR_b.BUSY) { + RUN_BACKGROUND_TASKS; + } + } + COMPLETE_MEMORY_READS; + return len; +} - return 0; +STATIC void disable_interrupt(busio_uart_obj_t *self) { + if (self->uart_id == 1) { + UART1->IER_b.DATA_READY = false; + } +} + +STATIC void enable_interrupt(busio_uart_obj_t *self) { + if (self->uart_id == 1) { + UART1->IER_b.DATA_READY = true; + } } // Read characters. @@ -225,9 +415,7 @@ size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t COMPLETE_MEMORY_READS; // Prevent conflict with uart irq. - if (self->uart_id == 1) { - UART1->IER_b.DATA_READY = false; - } + disable_interrupt(self); // Copy as much received data as available, up to len bytes. size_t total_read = ringbuf_get_n(&self->ringbuf, data, len); @@ -238,14 +426,11 @@ size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t uint64_t start_ticks = supervisor_ticks_ms64(); // Busy-wait until timeout or until we've read enough chars. while (len > 0 && (supervisor_ticks_ms64() - start_ticks < self->timeout_ms)) { - if (UART1->STAT_b.DATA_READY) { - // Read and advance. - data[total_read] = UART1->IO_b.DATA; - - // Adjust the counters. - len--; - total_read++; - + fetch_all_from_fifo(self); + size_t additional_read = ringbuf_get_n(&self->ringbuf, data + total_read, len); + len -= additional_read; + total_read += additional_read; + if (additional_read > 0) { // Reset the timeout on every character read. start_ticks = supervisor_ticks_ms64(); } @@ -260,14 +445,10 @@ size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t // Now that we've emptied the ringbuf some, fill it up with anything in the // FIFO. This ensures that we'll empty the FIFO as much as possible and // reset the interrupt when we catch up. - while (UART1->STAT_b.DATA_READY && ringbuf_num_empty(&self->ringbuf) > 0) { - ringbuf_put(&self->ringbuf, (uint8_t)UART1->IO_b.DATA); - } + fetch_all_from_fifo(self); // Re-enable irq. - if (self->uart_id == 1) { - UART1->IER_b.DATA_READY = true; - } + enable_interrupt(self); COMPLETE_MEMORY_READS; if (total_read == 0) { @@ -283,6 +464,31 @@ uint32_t common_hal_busio_uart_get_baudrate(busio_uart_obj_t *self) { } void common_hal_busio_uart_set_baudrate(busio_uart_obj_t *self, uint32_t baudrate) { + if (self->uart_id == 1) { + uint32_t source_clock = vcmailbox_get_clock_rate_measured(VCMAILBOX_CLOCK_CORE); + UART1->BAUD = ((source_clock / (baudrate * 8)) - 1); + } else { + ARM_UART_PL011_Type *pl011 = uart[self->uart_id]; + bool reenable = false; + if (pl011->CR_b.UARTEN) { + pl011->CR_b.UARTEN = false; + reenable = true; + } + uint32_t source_clock = vcmailbox_get_clock_rate_measured(VCMAILBOX_CLOCK_UART); + uint32_t divisor = 16 * baudrate; + pl011->IBRD = source_clock / divisor; + // The fractional divisor is 64ths. + uint32_t remainder = source_clock % divisor; + uint32_t per_tick = (divisor / 64) + 1; + uint32_t adjust = 0; + if (remainder % per_tick > 0) { + adjust = 1; + } + pl011->FBRD = remainder / per_tick + adjust; + if (reenable) { + pl011->CR_b.UARTEN = true; + } + } self->baudrate = baudrate; } @@ -295,6 +501,7 @@ void common_hal_busio_uart_set_timeout(busio_uart_obj_t *self, mp_float_t timeou } uint32_t common_hal_busio_uart_rx_characters_available(busio_uart_obj_t *self) { + fetch_all_from_fifo(self); return ringbuf_num_filled(&self->ringbuf); } @@ -309,5 +516,5 @@ bool common_hal_busio_uart_ready_to_tx(busio_uart_obj_t *self) { if (self->uart_id == 1) { return UART1->STAT_b.TX_READY; } - return false; + return !uart[self->uart_id]->FR_b.TXFF; } diff --git a/ports/broadcom/common-hal/busio/UART.h b/ports/broadcom/common-hal/busio/UART.h index 8ef4073f8e..0590bc28b6 100644 --- a/ports/broadcom/common-hal/busio/UART.h +++ b/ports/broadcom/common-hal/busio/UART.h @@ -39,6 +39,7 @@ typedef struct { uint8_t uart_id; uint32_t baudrate; uint32_t timeout_ms; + bool sigint_enabled; ringbuf_t ringbuf; } busio_uart_obj_t; diff --git a/ports/broadcom/common-hal/microcontroller/Pin.c b/ports/broadcom/common-hal/microcontroller/Pin.c index d1e5627bcd..82963f5633 100644 --- a/ports/broadcom/common-hal/microcontroller/Pin.c +++ b/ports/broadcom/common-hal/microcontroller/Pin.c @@ -45,11 +45,16 @@ void never_reset_pin_number(uint8_t pin_number) { } void reset_pin_number(uint8_t pin_number) { - gpio_set_function(pin_number, GPIO_FUNCTION_INPUT); pin_in_use[pin_number] = false; never_reset_pin[pin_number] = false; - // Set the pull to match the datasheet. + // Reset JTAG pins back to JTAG. BP_PULL_Enum pull = BP_PULL_NONE; + if (22 <= pin_number && pin_number <= 27) { + gpio_set_function(pin_number, GPIO_FUNCTION_ALT4); + } else { + gpio_set_function(pin_number, GPIO_FUNCTION_INPUT); + } + // Set the pull to match the datasheet. if (pin_number < 9 || (33 < pin_number && pin_number < 37) || pin_number > 45) { @@ -59,17 +64,23 @@ void reset_pin_number(uint8_t pin_number) { pin_number != 44 && pin_number != 45) { // Most pins are pulled low so we only exclude the four pins that aren't - // pulled at all. + // pulled at all. This will also set the JTAG pins 22-27 pull = BP_PULL_DOWN; } gpio_set_pull(pin_number, pull); } void common_hal_never_reset_pin(const mcu_pin_obj_t *pin) { + if (pin == NULL) { + return; + } never_reset_pin_number(pin->number); } void common_hal_reset_pin(const mcu_pin_obj_t *pin) { + if (pin == NULL) { + return; + } reset_pin_number(pin->number); } diff --git a/ports/broadcom/common-hal/microcontroller/__init__.c b/ports/broadcom/common-hal/microcontroller/__init__.c index e6f7b9c737..a1491d9668 100644 --- a/ports/broadcom/common-hal/microcontroller/__init__.c +++ b/ports/broadcom/common-hal/microcontroller/__init__.c @@ -29,6 +29,7 @@ #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/microcontroller/Processor.h" #include "common-hal/microcontroller/__init__.h" +#include "peripherals/broadcom/defines.h" #include "peripherals/broadcom/interrupts.h" #include "mphalport.h" diff --git a/ports/broadcom/common-hal/neopixel_write/__init__.c b/ports/broadcom/common-hal/neopixel_write/__init__.c new file mode 100644 index 0000000000..0cd76ebca9 --- /dev/null +++ b/ports/broadcom/common-hal/neopixel_write/__init__.c @@ -0,0 +1,160 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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 "shared-bindings/neopixel_write/__init__.h" + +#include "py/runtime.h" + +#include "shared-bindings/microcontroller/__init__.h" +#include "shared-bindings/digitalio/DigitalInOut.h" +#include "shared-bindings/time/__init__.h" + +#include "peripherals/broadcom/cpu.h" + +#include "supervisor/port.h" + +uint64_t next_start_raw_ticks = 0; + +// NeoPixels are 800khz bit streams. Zeroes are 1/3 duty cycle (~416ns) and ones +// are 2/3 duty cycle (~833ns). + +void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, + uint8_t *pixels, uint32_t num_bytes) { + // Wait to make sure we don't append onto the last transmission. This should only be a tick or + // two. + while (port_get_raw_ticks(NULL) < next_start_raw_ticks) { + } + + BP_Function_Enum alt_function = GPIO_FUNCTION_OUTPUT; + uint8_t index = 0; + uint8_t channel = 0; + bool found = false; + for (size_t i = 0; i < NUM_ALT_FUNC; i++) { + const pin_function_t *f = &digitalinout->pin->functions[i]; + if (f->type == PIN_FUNCTION_PWM) { + index = f->index; + channel = f->function; + alt_function = FSEL_VALUES[i]; + found = true; + break; + } + } + if (!found) { + mp_raise_ValueError(translate("NeoPixel not supported on pin")); + return; + } + + // Turn on the PWM clock. The speed is NeoPixel specific. + if (CM_PWM->CS_b.BUSY == 0) { + uint32_t source_clock; + #if BCM_VERSION == 2711 + source_clock = 54000000; + #else + source_clock = 19200000; + #endif + // Three clocks per 800khz bit to get the 1/3 or 2/3 timing. + uint32_t target_clock = 3 * 800000; + uint32_t int_div = source_clock / target_clock; + + CM_PWM->DIV = CM_PCM_DIV_PASSWD_PASSWD << CM_PCM_DIV_PASSWD_Pos | + (int_div) << CM_PCM_DIV_DIVI_Pos; + + CM_PWM->CS = CM_PCM_CS_PASSWD_PASSWD << CM_PCM_CS_PASSWD_Pos | + CM_PCM_CS_SRC_XOSC << CM_PCM_CS_SRC_Pos; + + // Set enable after setting the source to ensure it is stable. + CM_PWM->CS = CM_PCM_CS_PASSWD_PASSWD << CM_PCM_CS_PASSWD_Pos | + CM_PCM_CS_SRC_XOSC << CM_PCM_CS_SRC_Pos | + CM_PCM_CS_ENAB_Msk; + + // Wait for the clock to start up. + COMPLETE_MEMORY_READS; + while (CM_PWM->CS_b.BUSY == 0) { + } + } + + PWM0_Type *pwm = PWM0; + #if BCM_VERSION == 2711 + if (index == 1) { + pwm = PWM1; + } + #else + (void)index; + #endif + + pwm->RNG1 = 24; + pwm->RNG2 = 24; + COMPLETE_MEMORY_READS; + pwm->CTL = PWM0_CTL_CLRF1_Msk; + COMPLETE_MEMORY_READS; + + // Even though we're only transmitting one channel, we enable both. Without + // the second channel enabled, the output is repeated forever. + pwm->CTL = + PWM0_CTL_USEF2_Msk | + PWM0_CTL_MODE2_Msk | + PWM0_CTL_USEF1_Msk | + PWM0_CTL_MODE1_Msk; + + COMPLETE_MEMORY_READS; + pwm->CTL |= PWM0_CTL_PWEN1_Msk | PWM0_CTL_PWEN2_Msk; + + gpio_set_function(digitalinout->pin->number, alt_function); + + for (size_t i = 0; i < num_bytes; i++) { + uint32_t expanded = 0; + for (size_t j = 0; j < 8; j++) { + expanded = expanded >> 3; + if ((pixels[i] & (1 << j)) != 0) { + expanded |= 0xc0000000; + } else { + expanded |= 0x80000000; + } + } + while (pwm->STA_b.FULL1 == 1) { + RUN_BACKGROUND_TASKS; + } + if (channel == 1) { + // Dummy value for the first channel. + pwm->FIF1 = 0x000000; + } + pwm->FIF1 = expanded; + if (channel == 0) { + // Dummy value for the second channel. + pwm->FIF1 = 0x000000; + } + } + // Wait just a little bit so that transmission can start. + common_hal_mcu_delay_us(2); + while (pwm->STA_b.STA1 == 1) { + RUN_BACKGROUND_TASKS; + } + + gpio_set_function(digitalinout->pin->number, GPIO_FUNCTION_OUTPUT); + + // Update the next start. + next_start_raw_ticks = port_get_raw_ticks(NULL) + 1; +} diff --git a/ports/broadcom/common-hal/sdioio/SDCard.c b/ports/broadcom/common-hal/sdioio/SDCard.c index 492d28d6d6..85a84ac213 100644 --- a/ports/broadcom/common-hal/sdioio/SDCard.c +++ b/ports/broadcom/common-hal/sdioio/SDCard.c @@ -37,6 +37,7 @@ #include "supervisor/port.h" #include "supervisor/shared/translate.h" +#include "peripherals/broadcom/cpu.h" #include "peripherals/broadcom/defines.h" #include "peripherals/broadcom/gpio.h" @@ -235,21 +236,29 @@ void common_hal_sdioio_sdcard_construct(sdioio_sdcard_obj_t *self, if (clock != NULL) { gpio_set_function(clock->number, GPIO_GPFSEL4_FSEL48_SD1_CLK); gpio_set_pull(clock->number, BP_PULL_NONE); + self->clock_pin = clock->number; gpio_set_function(command->number, GPIO_GPFSEL4_FSEL49_SD1_CMD); gpio_set_pull(command->number, BP_PULL_UP); + self->command_pin = command->number; gpio_set_function(data[0]->number, GPIO_GPFSEL5_FSEL50_SD1_DAT0); gpio_set_pull(data[0]->number, BP_PULL_UP); + self->data_pins[0] = data[0]->number; gpio_set_function(data[1]->number, GPIO_GPFSEL5_FSEL51_SD1_DAT1); gpio_set_pull(data[1]->number, BP_PULL_UP); + self->data_pins[1] = data[1]->number; gpio_set_function(data[2]->number, GPIO_GPFSEL5_FSEL52_SD1_DAT2); gpio_set_pull(data[2]->number, BP_PULL_UP); + self->data_pins[2] = data[2]->number; gpio_set_function(data[3]->number, GPIO_GPFSEL5_FSEL53_SD1_DAT3); gpio_set_pull(data[3]->number, BP_PULL_UP); + self->data_pins[3] = data[3]->number; } else { // Switch the sdcard to use the old arasan interface. GPIO->EXTRA_MUX_b.SDIO = GPIO_EXTRA_MUX_SDIO_ARASAN; } + COMPLETE_MEMORY_READS; + self->host_info = (sdmmc_host_t) { .flags = SDMMC_HOST_FLAG_1BIT | SDMMC_HOST_FLAG_4BIT | SDMMC_HOST_FLAG_DEINIT_ARG, .slot = 0, @@ -280,9 +289,22 @@ void common_hal_sdioio_sdcard_construct(sdioio_sdcard_obj_t *self, // Start clocking the card. _set_card_clk(0, 400); - sdmmc_card_init(&self->host_info, &self->card_info); + sdmmc_err_t err = SDMMC_ERR_INVALID_RESPONSE; + size_t tries = 3; + while (err == SDMMC_ERR_INVALID_RESPONSE && tries > 0) { + err = sdmmc_card_init(&self->host_info, &self->card_info); + if (err != SDMMC_OK) { + mp_printf(&mp_plat_print, "SD card init failed %d\n", err); + } else if (tries < 3) { + mp_printf(&mp_plat_print, "SD card init success\n"); + } + tries--; + } + + self->init = err == SDMMC_OK; self->capacity = self->card_info.csd.capacity; + COMPLETE_MEMORY_READS; } uint32_t common_hal_sdioio_sdcard_get_count(sdioio_sdcard_obj_t *self) { @@ -297,9 +319,6 @@ uint8_t common_hal_sdioio_sdcard_get_width(sdioio_sdcard_obj_t *self) { return self->num_data; } -STATIC void check_for_deinit(sdioio_sdcard_obj_t *self) { -} - STATIC void check_whole_block(mp_buffer_info_t *bufinfo) { if (bufinfo->len % 512) { mp_raise_ValueError(translate("Buffer length must be a multiple of 512")); @@ -307,14 +326,16 @@ STATIC void check_whole_block(mp_buffer_info_t *bufinfo) { } int common_hal_sdioio_sdcard_writeblocks(sdioio_sdcard_obj_t *self, uint32_t start_block, mp_buffer_info_t *bufinfo) { - check_for_deinit(self); + if (!self->init) { + return -EIO; + } check_whole_block(bufinfo); self->state_programming = true; - // mp_printf(&mp_plat_print, "write %d %d %d %d\n", start_block, bufinfo->len / 512, self->card_info.csd.capacity, self->card_info.csd.sector_size); + COMPLETE_MEMORY_READS; sdmmc_err_t error = sdmmc_write_sectors(&self->card_info, bufinfo->buf, start_block, bufinfo->len / 512); - + COMPLETE_MEMORY_READS; if (error != SDMMC_OK) { mp_printf(&mp_plat_print, "write sectors result %d\n", error); @@ -325,10 +346,14 @@ int common_hal_sdioio_sdcard_writeblocks(sdioio_sdcard_obj_t *self, uint32_t sta } int common_hal_sdioio_sdcard_readblocks(sdioio_sdcard_obj_t *self, uint32_t start_block, mp_buffer_info_t *bufinfo) { - check_for_deinit(self); + if (!self->init) { + return -EIO; + } check_whole_block(bufinfo); + COMPLETE_MEMORY_READS; sdmmc_err_t error = sdmmc_read_sectors(&self->card_info, bufinfo->buf, start_block, bufinfo->len / 512); + COMPLETE_MEMORY_READS; if (error != SDMMC_OK) { mp_printf(&mp_plat_print, "read sectors result %d when reading block %d for %d\n", error, start_block, bufinfo->len / 512); @@ -339,7 +364,9 @@ int common_hal_sdioio_sdcard_readblocks(sdioio_sdcard_obj_t *self, uint32_t star } bool common_hal_sdioio_sdcard_configure(sdioio_sdcard_obj_t *self, uint32_t frequency, uint8_t bits) { - check_for_deinit(self); + if (!self->init) { + return false; + } return true; } @@ -361,7 +388,14 @@ void common_hal_sdioio_sdcard_deinit(sdioio_sdcard_obj_t *self) { self->data_pins[1] = COMMON_HAL_MCU_NO_PIN; self->data_pins[2] = COMMON_HAL_MCU_NO_PIN; self->data_pins[3] = COMMON_HAL_MCU_NO_PIN; + self->init = false; } void common_hal_sdioio_sdcard_never_reset(sdioio_sdcard_obj_t *self) { + never_reset_pin_number(self->command_pin); + never_reset_pin_number(self->clock_pin); + never_reset_pin_number(self->data_pins[0]); + never_reset_pin_number(self->data_pins[1]); + never_reset_pin_number(self->data_pins[2]); + never_reset_pin_number(self->data_pins[3]); } diff --git a/ports/broadcom/common-hal/sdioio/SDCard.h b/ports/broadcom/common-hal/sdioio/SDCard.h index ebd8e13f34..d180bc19a2 100644 --- a/ports/broadcom/common-hal/sdioio/SDCard.h +++ b/ports/broadcom/common-hal/sdioio/SDCard.h @@ -37,6 +37,7 @@ typedef struct { uint8_t num_data; bool state_programming; bool has_lock; + bool init; uint8_t command_pin; uint8_t clock_pin; uint8_t data_pins[4]; diff --git a/ports/broadcom/common-hal/videocore/Framebuffer.c b/ports/broadcom/common-hal/videocore/Framebuffer.c index f5f9654949..18b703b8b6 100644 --- a/ports/broadcom/common-hal/videocore/Framebuffer.c +++ b/ports/broadcom/common-hal/videocore/Framebuffer.c @@ -16,7 +16,13 @@ void common_hal_videocore_framebuffer_construct(videocore_framebuffer_obj_t *sel // TODO: Make the FB twice as tall if double buffering. uint32_t physical_height = height; uint32_t pitch = 0; - self->framebuffer = vcmailbox_get_framebuffer(&virtual_width, &virtual_height, &physical_width, &physical_height, &pitch); + uint32_t bits_per_pixel = 0; + self->framebuffer = vcmailbox_get_framebuffer(&virtual_width, + &virtual_height, + &physical_width, + &physical_height, + &pitch, + &bits_per_pixel); if (self->framebuffer == NULL) { if (gc_alloc_possible()) { mp_raise_ValueError(translate("no fb")); diff --git a/ports/broadcom/firmware b/ports/broadcom/firmware index 6a5207946e..bf96d0eda5 160000 --- a/ports/broadcom/firmware +++ b/ports/broadcom/firmware @@ -1 +1 @@ -Subproject commit 6a5207946edcd45813d1dd1572ca8bd8101b68b6 +Subproject commit bf96d0eda5952595d717fedb797aeb168483e9fa diff --git a/ports/broadcom/mpconfigport.h b/ports/broadcom/mpconfigport.h index dafe432c3c..abd0580999 100644 --- a/ports/broadcom/mpconfigport.h +++ b/ports/broadcom/mpconfigport.h @@ -36,7 +36,11 @@ #define MICROPY_PY_SYS_PLATFORM "BROADCOM" #define MICROPY_PY_BUILTINS_NOTIMPLEMENTED (1) #define MICROPY_PY_FUNCTION_ATTRS (1) +#if BCM_VERSION == 2837 || BCM_VERSION == 2711 #define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_A) +#elif BCM_VERSION == 2835 +#define MICROPY_OBJ_REPR (MICROPY_OBJ_REPR_C) +#endif #define CIRCUITPY_DEFAULT_STACK_SIZE (0x10000) #define CIRCUITPY_DISPLAY_AREA_BUFFER_SIZE (1920) #define CIRCUITPY_PROCESSOR_COUNT (4) diff --git a/ports/broadcom/mpconfigport.mk b/ports/broadcom/mpconfigport.mk index b17eb12f63..7296461d1f 100644 --- a/ports/broadcom/mpconfigport.mk +++ b/ports/broadcom/mpconfigport.mk @@ -1,58 +1,26 @@ -# Typically the first module to create -CIRCUITPY_MICROCONTROLLER = 1 -# Typically the second module to create -CIRCUITPY_DIGITALIO = 1 -# Other modules: +# All broadcom ports have longints. +LONGINT_IMPL = MPZ + +CIRCUITPY_FULL_BUILD = 1 + +# Modules in FULL_BUILD that we don't support. CIRCUITPY_ANALOGIO = 0 -CIRCUITPY_BUSIO = 1 -CIRCUITPY_ONEWIREIO = 0 -CIRCUITPY_PWMIO = 0 -CIRCUITPY_COUNTIO = 0 -CIRCUITPY_NEOPIXEL_WRITE = 0 -CIRCUITPY_PULSEIO = 0 -CIRCUITPY_OS = 1 -CIRCUITPY_NVM = 0 CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_AUDIOIO = 0 -CIRCUITPY_ROTARYIO = 0 -CIRCUITPY_RTC = 0 -CIRCUITPY_SDCARDIO = 0 -CIRCUITPY_SDIOIO = 1 -CIRCUITPY_FRAMEBUFFERIO = 1 +CIRCUITPY_COUNTIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 -# Requires SPI, PulseIO (stub ok): -CIRCUITPY_DISPLAYIO = 1 - -# These modules are implemented in shared-module/ - they can be included in -# any port once their prerequisites in common-hal are complete. -# Requires DigitalIO: -CIRCUITPY_BITBANGIO = 1 -# Requires DigitalIO -CIRCUITPY_GAMEPAD = 0 -# Requires neopixel_write or SPI (dotstar) -CIRCUITPY_PIXELBUF = 0 -# Requires OS -CIRCUITPY_RANDOM = 1 -# Requires OS, filesystem -CIRCUITPY_STORAGE = 1 -# Requires Microcontroller -CIRCUITPY_TOUCHIO = 0 -# Requires USB -CIRCUITPY_USB = 1 -CIRCUITPY_USB_MSC = 1 -CIRCUITPY_USB_HID = 1 -CIRCUITPY_USB_MIDI = 1 -USB_NUM_ENDPOINT_PAIRS = 8 -# Does nothing without I2C -CIRCUITPY_REQUIRE_I2C_PULLUPS = 0 -# No requirements, but takes extra flash -CIRCUITPY_ULAB = 0 +CIRCUITPY_NVM = 0 +CIRCUITPY_PARALLELDISPLAY = 0 +CIRCUITPY_PULSEIO = 0 +CIRCUITPY_PWMIO = 0 +CIRCUITPY_ROTARYIO = 0 +CIRCUITPY_RTC = 0 +CIRCUITPY_SDIOIO = 1 CIRCUITPY_VIDEOCORE = 1 -CIRCUITPY_ERRNO = 0 - -CIRCUITPY_FULL_BUILD = 0 - INTERNAL_FLASH_FILESYSTEM = 1 + +USB_NUM_ENDPOINT_PAIRS = 8 +USB_HIGHSPEED = 1 diff --git a/ports/broadcom/mphalport.c b/ports/broadcom/mphalport.c index f4bfd8653b..fa7dcaac8e 100644 --- a/ports/broadcom/mphalport.c +++ b/ports/broadcom/mphalport.c @@ -6,7 +6,15 @@ #include "shared-bindings/microcontroller/__init__.h" #include "mphalport.h" +#include "peripherals/broadcom/defines.h" + void mp_hal_delay_us(mp_uint_t delay) { + uint32_t end = SYSTMR->CLO + delay; + // Wait if end is before current time because it must have wrapped. + while (end < SYSTMR->CLO) { + } + while (SYSTMR->CLO < end) { + } } void mp_hal_disable_all_interrupts(void) { @@ -19,6 +27,7 @@ void mp_hal_enable_all_interrupts(void) { mp_uint_t cpu_get_regs_and_sp(mp_uint_t *regs) { size_t sp = 0; + #if defined(__ARM_ARCH) && (__ARM_ARCH >= 8) __asm__ ("mov %[out], sp" : [out] "=r" (sp)); __asm__ ("mov %[out], x19" : [out] "=r" (regs[0])); __asm__ ("mov %[out], x20" : [out] "=r" (regs[1])); @@ -30,5 +39,19 @@ mp_uint_t cpu_get_regs_and_sp(mp_uint_t *regs) { __asm__ ("mov %[out], x26" : [out] "=r" (regs[7])); __asm__ ("mov %[out], x27" : [out] "=r" (regs[8])); __asm__ ("mov %[out], x28" : [out] "=r" (regs[9])); + #else + __asm__ ("mov %[out], sp" : [out] "=r" (sp)); + __asm__ ("mov %[out], r4" : [out] "=r" (regs[0])); + __asm__ ("mov %[out], r5" : [out] "=r" (regs[1])); + __asm__ ("mov %[out], r6" : [out] "=r" (regs[2])); + __asm__ ("mov %[out], r7" : [out] "=r" (regs[3])); + __asm__ ("mov %[out], r8" : [out] "=r" (regs[4])); + __asm__ ("mov %[out], r9" : [out] "=r" (regs[5])); + __asm__ ("mov %[out], r10" : [out] "=r" (regs[6])); + __asm__ ("mov %[out], r11" : [out] "=r" (regs[7])); + __asm__ ("mov %[out], r12" : [out] "=r" (regs[8])); + __asm__ ("mov %[out], r13" : [out] "=r" (regs[9])); + #endif + return sp; } diff --git a/ports/broadcom/mphalport.h b/ports/broadcom/mphalport.h index 1efd931974..d67c9f4a50 100644 --- a/ports/broadcom/mphalport.h +++ b/ports/broadcom/mphalport.h @@ -1,26 +1,51 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 Scott Shawcroft + * + * 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_BROADCOM_MPHALPORT_H +#define MICROPY_INCLUDED_BROADCOM_MPHALPORT_H + #include #include "py/obj.h" + +#include "supervisor/shared/tick.h" + void mp_hal_delay_ms(mp_uint_t ms); void mp_hal_delay_us(mp_uint_t us); -mp_uint_t mp_hal_ticks_cpu(void); -mp_uint_t mp_hal_ticks_us(void); -mp_uint_t mp_hal_ticks_ms(void); + +#define mp_hal_ticks_ms() ((mp_uint_t)supervisor_ticks_ms32()) void mp_hal_set_interrupt_char(int c); int mp_hal_stdin_rx_chr(void); void mp_hal_stdout_tx_strn(const char *str, size_t len); -typedef enum std_io_t { - MINI_UART = 0, - UART, - UART_QEMU -} std_io_t; - -void uart_init(std_io_t interface); - #ifdef MICROPY_HW_USBHOST #include "usbkbd.h" void usbkbd_setup(); #endif + +#endif // MICROPY_INCLUDED_BROADCOM_MPHALPORT_H diff --git a/ports/broadcom/peripherals b/ports/broadcom/peripherals index 2e7b56bbe9..0837008608 160000 --- a/ports/broadcom/peripherals +++ b/ports/broadcom/peripherals @@ -1 +1 @@ -Subproject commit 2e7b56bbe941311e54fba66f0b32336bfea4388d +Subproject commit 08370086080759ed54ac1136d62d2ad24c6fa267 diff --git a/ports/broadcom/supervisor/internal_flash.c b/ports/broadcom/supervisor/internal_flash.c index 08c10848a8..806d3fb18b 100644 --- a/ports/broadcom/supervisor/internal_flash.c +++ b/ports/broadcom/supervisor/internal_flash.c @@ -60,6 +60,7 @@ void supervisor_flash_init(void) { NULL, NULL, 0, NULL, 8000000); #endif + common_hal_sdioio_sdcard_never_reset(&sd); uint32_t buffer[512 / sizeof(uint32_t)]; mp_buffer_info_t bufinfo; diff --git a/ports/broadcom/supervisor/port.c b/ports/broadcom/supervisor/port.c index ddd24fe540..e036a76cef 100644 --- a/ports/broadcom/supervisor/port.c +++ b/ports/broadcom/supervisor/port.c @@ -106,7 +106,7 @@ void reset_port(void) { audio_dma_reset(); #endif - // reset_all_pins(); + reset_all_pins(); } void reset_to_bootloader(void) { @@ -116,42 +116,57 @@ void reset_to_bootloader(void) { } void reset_cpu(void) { - + // Don't actually reset because we can't store the safe mode info. + // PM->WDOG = 1 << PM_WDOG_TIME_Pos | PM_WDOG_PASSWD_PASSWD << PM_WDOG_PASSWD_Pos; + // PM->RSTC = PM_RSTC_WRCFG_FULL_RESET << PM_RSTC_WRCFG_Pos | PM_RSTC_PASSWD_PASSWD << PM_RSTC_PASSWD_Pos; while (true) { } } bool port_has_fixed_stack(void) { + #ifdef __aarch64__ return true; -} - -uint32_t *port_stack_get_limit(void) { - return (uint32_t *)0x4; -} - -uint32_t *port_stack_get_top(void) { - return (uint32_t *)0x80000; + #else + return false; + #endif } // From the linker script extern uint32_t __bss_end; +extern uint32_t _ld_ram_end; +uint32_t *port_stack_get_limit(void) { + #ifdef __aarch64__ + return (uint32_t *)0x4; + #else + return &__bss_end; + #endif +} + +uint32_t *port_stack_get_top(void) { + #ifdef __aarch64__ + return (uint32_t *)0x80000; + #else + return &_ld_ram_end; + #endif +} + uint32_t *port_heap_get_bottom(void) { return &__bss_end; } uint32_t *port_heap_get_top(void) { // 32M heap - return (uint32_t *)(((uint64_t)&__bss_end) + 32 * 1024 * 1024); + return (uint32_t *)(((size_t)&__bss_end) + 32 * 1024 * 1024); } void port_set_saved_word(uint32_t value) { // NOTE: This doesn't survive pressing the reset button (aka toggling RUN). - // watchdog_hw->scratch[0] = value; + __bss_end = value; + data_clean_and_invalidate(&__bss_end, sizeof(uint32_t)); } uint32_t port_get_saved_word(void) { - // return watchdog_hw->scratch[0]; - return 0; + return __bss_end; } uint64_t port_get_raw_ticks(uint8_t *subticks) { diff --git a/ports/cxd56/mpconfigport.mk b/ports/cxd56/mpconfigport.mk index 865c170aaa..8787c55bcc 100644 --- a/ports/cxd56/mpconfigport.mk +++ b/ports/cxd56/mpconfigport.mk @@ -3,11 +3,6 @@ USB_HIGHSPEED = 1 # Number of USB endpoint pairs. USB_NUM_ENDPOINT_PAIRS = 6 -# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk -# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. -# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz - # Longints can be implemented as mpz, as longlong, or not LONGINT_IMPL = MPZ diff --git a/ports/espressif/Makefile b/ports/espressif/Makefile index 7a034c9d2a..acc8ec5720 100644 --- a/ports/espressif/Makefile +++ b/ports/espressif/Makefile @@ -59,76 +59,82 @@ include $(TOP)/supervisor/supervisor.mk # Include make rules and variables common across CircuitPython builds. include $(TOP)/py/circuitpy_defns.mk -ifeq ($(IDF_TARGET),esp32s2) -IDF_TARGET_ARCH = xtensa -CROSS_COMPILE = xtensa-$(IDF_TARGET)-elf- -else ifeq ($(IDF_TARGET),esp32c3) +ifeq ($(IDF_TARGET),esp32c3) IDF_TARGET_ARCH = riscv CROSS_COMPILE = riscv32-esp-elf- +else +IDF_TARGET_ARCH = xtensa +CROSS_COMPILE = xtensa-$(IDF_TARGET)-elf- endif ####################################### # CFLAGS ####################################### -INC += -I.\ - -I./boards \ - -I./boards/$(BOARD) \ - -I./peripherals \ - -I../.. \ - -I../../lib/mp-readline \ - -I../../lib/tinyusb/src \ - -I../../supervisor/shared/usb \ - -I$(BUILD) \ - -I$(BUILD)/genhdr \ - -I$(BUILD)/esp-idf/config \ - -isystem esp-idf \ - -isystem esp-idf/components/app_update/include \ - -isystem esp-idf/components/bootloader_support/include \ - -isystem esp-idf/components/driver/include \ - -isystem esp-idf/components/driver/$(IDF_TARGET)/include \ - -isystem esp-idf/components/$(IDF_TARGET)/include \ - -isystem esp-idf/components/esp_adc_cal/include \ - -isystem esp-idf/components/esp_common/include \ - -isystem esp-idf/components/esp_event/include \ - -isystem esp-idf/components/esp_hw_support/include \ - -isystem esp-idf/components/esp_netif/include \ - -isystem esp-idf/components/esp_pm/include \ - -isystem esp-idf/components/esp_ringbuf/include \ - -isystem esp-idf/components/esp_rom/include \ - -isystem esp-idf/components/esp_system/include \ - -isystem esp-idf/components/esp_timer/include \ - -isystem esp-idf/components/esp_wifi/include \ - -isystem esp-idf/components/freertos/include \ - -isystem esp-idf/components/freertos/include/freertos \ - -isystem esp-idf/components/freertos/port/$(IDF_TARGET_ARCH)/include \ - -isystem esp-idf/components/hal/include \ - -isystem esp-idf/components/hal/$(IDF_TARGET)/include \ - -isystem esp-idf/components/hal/platform_port/include \ - -isystem esp-idf/components/heap/include \ - -isystem esp-idf/components/log/include \ - -isystem esp-idf/components/lwip/include \ - -isystem esp-idf/components/lwip/lwip/src/include \ - -isystem esp-idf/components/lwip/port/esp32/include \ - -isystem esp-idf/components/mbedtls/esp_crt_bundle/include \ - -isystem esp-idf/components/mbedtls/mbedtls/include \ - -isystem esp-idf/components/mbedtls/port/include \ - -isystem esp-idf/components/newlib/platform_include \ - -isystem esp-idf/components/nvs_flash/include \ - -isystem esp-idf/components/soc/include \ - -isystem esp-idf/components/soc/$(IDF_TARGET)/include \ - -isystem esp-idf/components/spi_flash/include \ - -isystem esp-idf/components/$(IDF_TARGET_ARCH)/include \ - -isystem esp-idf/components/$(IDF_TARGET_ARCH)/$(IDF_TARGET)/include +INC += \ + -I.\ + -I./boards \ + -I./boards/$(BOARD) \ + -I./peripherals \ + -I../.. \ + -I../../lib/mp-readline \ + -I../../lib/tinyusb/src \ + -I../../supervisor/shared/usb \ + -I$(BUILD) \ + -I$(BUILD)/genhdr \ + -I$(BUILD)/esp-idf/config \ + -isystem esp-idf \ + -isystem esp-idf/components/app_update/include \ + -isystem esp-idf/components/bootloader_support/include \ + -isystem esp-idf/components/driver/include \ + -isystem esp-idf/components/driver/$(IDF_TARGET)/include \ + -isystem esp-idf/components/$(IDF_TARGET)/include \ + -isystem esp-idf/components/esp_adc_cal/include \ + -isystem esp-idf/components/esp_common/include \ + -isystem esp-idf/components/esp_event/include \ + -isystem esp-idf/components/esp_hw_support/include \ + -isystem esp-idf/components/esp_hw_support/include/soc \ + -isystem esp-idf/components/esp_ipc/include \ + -isystem esp-idf/components/esp_netif/include \ + -isystem esp-idf/components/esp_pm/include \ + -isystem esp-idf/components/esp_ringbuf/include \ + -isystem esp-idf/components/esp_rom/include \ + -isystem esp-idf/components/esp_system/include \ + -isystem esp-idf/components/esp_timer/include \ + -isystem esp-idf/components/esp_wifi/include \ + -isystem esp-idf/components/freertos/include \ + -isystem esp-idf/components/freertos/include/freertos \ + -isystem esp-idf/components/freertos/include/esp_additions \ + -isystem esp-idf/components/freertos/include/esp_additions/freertos \ + -isystem esp-idf/components/freertos/port/$(IDF_TARGET_ARCH)/include \ + -isystem esp-idf/components/hal/include \ + -isystem esp-idf/components/hal/$(IDF_TARGET)/include \ + -isystem esp-idf/components/hal/platform_port/include \ + -isystem esp-idf/components/heap/include \ + -isystem esp-idf/components/log/include \ + -isystem esp-idf/components/lwip/include \ + -isystem esp-idf/components/lwip/lwip/src/include \ + -isystem esp-idf/components/lwip/port/esp32/include \ + -isystem esp-idf/components/mbedtls/esp_crt_bundle/include \ + -isystem esp-idf/components/mbedtls/mbedtls/include \ + -isystem esp-idf/components/mbedtls/port/include \ + -isystem esp-idf/components/newlib/platform_include \ + -isystem esp-idf/components/nvs_flash/include \ + -isystem esp-idf/components/soc/include \ + -isystem esp-idf/components/soc/$(IDF_TARGET)/include \ + -isystem esp-idf/components/spi_flash/include \ + -isystem esp-idf/components/$(IDF_TARGET_ARCH)/include \ + -isystem esp-idf/components/$(IDF_TARGET_ARCH)/$(IDF_TARGET)/include # See https://github.com/espressif/esp-idf/issues/6906 ifeq ($(IDF_TARGET),esp32c3) CFLAGS += -include "esp32c3_fix.h" endif -CFLAGS += -DHAVE_CONFIG_H \ - -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" \ - -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX +CFLAGS += \ + -DHAVE_CONFIG_H \ + -DMBEDTLS_CONFIG_FILE=\"mbedtls/esp_config.h\" \ + -DUNITY_INCLUDE_CONFIG_H -DWITH_POSIX # Make our canary value match FreeRTOS's # This define is in FreeRTOS as tskSTACK_FILL_BYTE 0xa5U which we expand out to a full word. @@ -158,33 +164,38 @@ endif LDFLAGS = $(CFLAGS) -Wl,-nostdlib -Wl,-Map=$@.map -Wl,-cref -Wl,--undefined=uxTopUsedPriority -LDFLAGS += -L$(BUILD)/esp-idf/esp-idf/$(IDF_TARGET) \ - -L$(BUILD)/esp-idf/esp-idf/$(IDF_TARGET)/ld \ - -Lesp-idf/components/$(IDF_TARGET)/ld \ - -Lesp-idf/components/esp_rom/$(IDF_TARGET)/ld \ - -T$(IDF_TARGET)_out.ld \ - -T$(IDF_TARGET).project.ld \ - -T$(IDF_TARGET).peripherals.ld \ - -T$(IDF_TARGET).rom.ld \ - -T$(IDF_TARGET).rom.api.ld \ - -T$(IDF_TARGET).rom.libgcc.ld \ - -T$(IDF_TARGET).rom.newlib-nano.ld +LDFLAGS += \ + -L$(BUILD)/esp-idf/esp-idf/esp_system/ld \ + -Lesp-idf/components/esp_rom/$(IDF_TARGET)/ld \ + -Lesp-idf/components/soc/$(IDF_TARGET)/ld \ + -Tmemory.ld \ + -Tsections.ld \ + -T$(IDF_TARGET).peripherals.ld \ + -T$(IDF_TARGET).rom.ld \ + -T$(IDF_TARGET).rom.api.ld \ + -T$(IDF_TARGET).rom.libgcc.ld \ + -T$(IDF_TARGET).rom.newlib-nano.ld \ + -Wl,-Bstatic \ + -Wl,--no-warn-mismatch \ + -Wl,--build-id=none \ + -fno-rtti ifeq ($(IDF_TARGET),esp32c3) -LDFLAGS += -Tesp32c3.rom.newlib.ld \ - -Tesp32c3.rom.version.ld \ - -Tesp32c3.rom.eco3.ld -else -LDFLAGS += -T$(IDF_TARGET).rom.newlib-data.ld \ - -T$(IDF_TARGET).rom.newlib-funcs.ld \ - -T$(IDF_TARGET).rom.spiflash.ld +LDFLAGS += \ + -Tesp32c3.rom.newlib.ld \ + -Tesp32c3.rom.version.ld \ + -Tesp32c3.rom.eco3.ld +else ifeq ($(IDF_TARGET),esp32s2) +LDFLAGS += \ + -T$(IDF_TARGET).rom.newlib-data.ld \ + -T$(IDF_TARGET).rom.newlib-funcs.ld \ + -T$(IDF_TARGET).rom.spiflash.ld +else ifeq ($(IDF_TARGET),esp32s3) +LDFLAGS += \ + -Tesp32s3.rom.newlib.ld \ + -Tesp32s3.rom.version.ld endif -LDFLAGS += -Wl,-Bstatic \ - -Wl,--no-warn-mismatch \ - -Wl,--build-id=none \ - -fno-rtti - LIBS := -lgcc -lc -lstdc++ # Use toolchain libm if we're not using our own. @@ -226,10 +237,13 @@ SRC_C += \ ifneq ($(IDF_TARGET),esp32c3) SRC_C += \ - cam.c \ - i2s_lcd_esp32s2_driver.c \ peripherals/pcnt.c \ peripherals/touch.c +ifeq ($(IDF_TARGET),esp32s2) +SRC_C += \ + cam.c \ + i2s_lcd_esp32s2_driver.c +endif endif $(BUILD)/i2s_lcd_esp32s2_driver.o: CFLAGS += -Wno-sign-compare @@ -238,16 +252,15 @@ ifneq ($(CIRCUITPY_USB),0) SRC_C += lib/tinyusb/src/portable/espressif/esp32sx/dcd_esp32sx.c endif -SRC_S = - -SRC_COMMON_HAL_EXPANDED = $(addprefix shared-bindings/, $(SRC_COMMON_HAL)) \ - $(addprefix shared-bindings/, $(SRC_BINDINGS_ENUMS)) \ - $(addprefix common-hal/, $(SRC_COMMON_HAL)) - -SRC_SHARED_MODULE_EXPANDED = $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) \ - $(addprefix shared-module/, $(SRC_SHARED_MODULE)) \ - $(addprefix shared-module/, $(SRC_SHARED_MODULE_INTERNAL)) +SRC_COMMON_HAL_EXPANDED = \ + $(addprefix shared-bindings/, $(SRC_COMMON_HAL)) \ + $(addprefix shared-bindings/, $(SRC_BINDINGS_ENUMS)) \ + $(addprefix common-hal/, $(SRC_COMMON_HAL)) +SRC_SHARED_MODULE_EXPANDED = \ + $(addprefix shared-bindings/, $(SRC_SHARED_MODULE)) \ + $(addprefix shared-module/, $(SRC_SHARED_MODULE)) \ + $(addprefix shared-module/, $(SRC_SHARED_MODULE_INTERNAL)) ifneq ($(FROZEN_MPY_DIR),) FROZEN_MPY_PY_FILES := $(shell find -L $(FROZEN_MPY_DIR) -type f -name '*.py') @@ -261,7 +274,6 @@ ifeq ($(INTERNAL_LIBM),1) OBJ += $(addprefix $(BUILD)/, $(SRC_LIBM:.c=.o)) endif OBJ += $(addprefix $(BUILD)/, $(SRC_CIRCUITPY_COMMON:.c=.o)) -OBJ += $(addprefix $(BUILD)/, $(SRC_S:.S=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o)) $(BUILD)/$(FATFS_DIR)/ff.o: COPT += -Os @@ -271,8 +283,6 @@ $(BUILD)/lib/protomatter/src/core.o: CFLAGS += -DESP32 # List of sources for qstr extraction SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_MOD) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED) -# Sources that only hold QSTRs after pre-processing. -SRC_QSTR_PREPROCESSOR += # IDF build commands IDF_PATH = $(realpath ./esp-idf) @@ -280,13 +290,15 @@ IDF_PATH = $(realpath ./esp-idf) $(BUILD)/esp-idf: $(Q)$(MKDIR) -p $@ +TARGET_SDKCONFIG = esp-idf-config/sdkconfig-$(IDF_TARGET).defaults FLASH_SDKCONFIG = esp-idf-config/sdkconfig-$(CIRCUITPY_ESP_FLASH_SIZE).defaults ifeq ($(DEBUG), 1) DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-debug.defaults else DEBUG_SDKCONFIG = esp-idf-config/sdkconfig-opt.defaults endif -SDKCONFIGS = esp-idf-config/sdkconfig.defaults;$(DEBUG_SDKCONFIG);$(FLASH_SDKCONFIG);boards/$(BOARD)/sdkconfig + +SDKCONFIGS = esp-idf-config/sdkconfig.defaults;$(DEBUG_SDKCONFIG);$(FLASH_SDKCONFIG);$(TARGET_SDKCONFIG);boards/$(BOARD)/sdkconfig # create the config headers $(BUILD)/esp-idf/config/sdkconfig.h: boards/$(BOARD)/sdkconfig | $(BUILD)/esp-idf @@ -307,40 +319,37 @@ $(BUILD)/esp-idf/partition_table/partition-table.bin: $(BUILD)/esp-idf/config/sd IDF_PATH=$(IDF_PATH) ninja -C $(BUILD)/esp-idf partition_table/partition-table.bin # run menuconfig and then remove standard settings -menuconfig: $(BUILD)/esp-idf/config +menuconfig: $(BUILD)/esp-idf/config $(BUILD)/esp-idf/config/sdkconfig.h $(Q)ninja -C $(BUILD)/esp-idf menuconfig - $(Q)diff --old-line-format= --unchanged-line-format= esp-idf-config/sdkconfig.defaults $(BUILD)/esp-idf/sdkconfig > $(BUILD)/sdkconfig.diff || true - $(Q)grep -Fvxf $(DEBUG_SDKCONFIG) -f $(FLASH_SDKCONFIG) $(BUILD)/sdkconfig.diff > boards/$(BOARD)/sdkconfig + # Newer versions of the idf will have save-defconfig that will only include non-default values. + # We should use that when available. For now, we sort out everything. + python tools/update_sdkconfig.py --board=$(BOARD) --debug=$(DEBUG) # 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 = $(IDF_TARGET) $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc_cal esp_common esp_event esp_hw_support esp_netif esp_pm esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant +BINARY_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a libsmartconfig.a libwapi.a +BINARY_BLOBS = esp-idf/components/esp_phy/lib/$(IDF_TARGET)/libphy.a $(addprefix esp-idf/components/esp_wifi/lib/$(IDF_TARGET)/, $(BINARY_WIFI_BLOBS)) +ESP_IDF_COMPONENTS_LINK = $(IDF_TARGET_ARCH) app_update bootloader_support driver efuse esp_adc_cal esp_common esp_event esp_hw_support esp_ipc esp_netif esp_pm esp_phy esp_ringbuf esp_rom esp_system esp_timer esp-tls esp_wifi freertos hal heap log lwip mbedtls newlib nvs_flash pthread soc spi_flash vfs wpa_supplicant ESP_IDF_COMPONENTS_EXPANDED = $(foreach component, $(ESP_IDF_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/$(component)/lib$(component).a) -ESP_IDF_WIFI_COMPONENTS_EXPANDED = $(foreach component, $(ESP_IDF_WIFI_COMPONENTS_LINK), $(BUILD)/esp-idf/esp-idf/$(component)/lib$(component).a) 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_WIFI_BLOBS = libcoexist.a libcore.a libespnow.a libmesh.a libnet80211.a libpp.a libsmartconfig.a libphy.a -ifneq ($(IDF_TARGET),esp32c3) -BINARY_WIFI_BLOBS += librtc.a -endif -BINARY_BLOBS = $(addprefix esp-idf/components/esp_wifi/lib/$(IDF_TARGET)/, $(BINARY_WIFI_BLOBS)) - ifeq ($(IDF_TARGET_ARCH),xtensa) BINARY_BLOBS += esp-idf/components/xtensa/$(IDF_TARGET)/libxt_hal.a ESP_IDF_COMPONENTS_EXPANDED += esp-idf/components/xtensa/$(IDF_TARGET)/libxt_hal.a endif -ifeq ($(IDF_TARGET), esp32c3) -ESPTOOL_BAUDRATE = 230400 -BOOTLOADER_OFFSET = 0x0000 +ifeq ($(IDF_TARGET),esp32c3) +BOOTLOADER_OFFSET = 0x0 +else ifeq ($(IDF_TARGET),esp32s3) +BOOTLOADER_OFFSET = 0x0 else -ESPTOOL_BAUDRATE = 460800 BOOTLOADER_OFFSET = 0x1000 endif + PARTITION_TABLE_OFFSET = 0x8000 FIRMWARE_OFFSET = 0x10000 @@ -348,7 +357,7 @@ ESP_AUTOGEN_LD = $(BUILD)/esp-idf/esp-idf/$(IDF_TARGET)/$(IDF_TARGET)_out.ld $(B FLASH_FLAGS = --flash_mode $(CIRCUITPY_ESP_FLASH_MODE) --flash_freq $(CIRCUITPY_ESP_FLASH_FREQ) --flash_size $(CIRCUITPY_ESP_FLASH_SIZE) -ESPTOOL_FLAGS ?= -b $(ESPTOOL_BAUDRATE) --before=default_reset --after=no_reset +ESPTOOL_FLAGS ?= --before=default_reset --after=no_reset ifeq ($(IDF_TARGET),esp32c3) all: $(BUILD)/firmware.bin @@ -360,17 +369,18 @@ endif esp-idf-stamp: $(BUILD)/esp-idf/config/sdkconfig.h $(Q)ninja -C $(BUILD)/esp-idf \ bootloader/bootloader.bin \ + esp-idf/esp_system/__ldgen_output_sections.ld \ esp-idf/app_update/libapp_update.a \ esp-idf/bootloader_support/libbootloader_support.a \ esp-idf/driver/libdriver.a \ esp-idf/efuse/libefuse.a \ - esp-idf/$(IDF_TARGET)/lib$(IDF_TARGET).a \ - esp-idf/$(IDF_TARGET)/ld/$(IDF_TARGET).project.ld \ esp-idf/esp_adc_cal/libesp_adc_cal.a \ esp-idf/esp_common/libesp_common.a \ esp-idf/esp_event/libesp_event.a \ esp-idf/esp_hw_support/libesp_hw_support.a \ + esp-idf/esp_ipc/libesp_ipc.a \ esp-idf/esp_netif/libesp_netif.a \ + esp-idf/esp_phy/libesp_phy.a \ esp-idf/esp_pm/libesp_pm.a \ esp-idf/esp_ringbuf/libesp_ringbuf.a \ esp-idf/esp_rom/libesp_rom.a \ @@ -405,9 +415,12 @@ $(BUILD)/circuitpython-firmware.bin: $(BUILD)/firmware.elf | tools/build_memory_ $(BUILD)/firmware.bin: $(BUILD)/circuitpython-firmware.bin | esp-idf-stamp $(Q)$(PYTHON) ../../tools/join_bins.py $@ $(BOOTLOADER_OFFSET) $(BUILD)/esp-idf/bootloader/bootloader.bin $(PARTITION_TABLE_OFFSET) $(BUILD)/esp-idf/partition_table/partition-table.bin $(FIRMWARE_OFFSET) $(BUILD)/circuitpython-firmware.bin +UF2_FAMILY_ID_esp32s2 = 0xbfdd4eee +UF2_FAMILY_ID_esp32s3 = 0xc47e5767 + $(BUILD)/firmware.uf2: $(BUILD)/circuitpython-firmware.bin $(STEPECHO) "Create $@" - $(Q)$(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f 0xbfdd4eee -b 0x0000 -c -o $@ $^ + $(Q)$(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f $(UF2_FAMILY_ID_$(IDF_TARGET)) -b 0x0000 -c -o $@ $^ flash: $(BUILD)/firmware.bin esptool.py --chip $(IDF_TARGET) -p $(PORT) $(ESPTOOL_FLAGS) write_flash $(FLASH_FLAGS) 0x0000 $^ diff --git a/ports/espressif/README.rst b/ports/espressif/README.rst index 165f7a161e..7ef0fc5dc6 100644 --- a/ports/espressif/README.rst +++ b/ports/espressif/README.rst @@ -11,6 +11,7 @@ Support Status: ESP32-C3, "beta" ESP32-S2, "stable" + ESP32-S3, "beta" How this port is organized: --------------------------------------- @@ -31,9 +32,11 @@ Connecting to the ESP32-C3 **USB Connetion:** -On ESP32-C3 REV3 chips, a USB Serial/JTAG Controller is available. Note: The USB connection cannot be used for a ``CIRCUITPY`` drive. +On ESP32-C3 REV3 chips, a USB Serial/JTAG Controller is available. Note: This USB connection cannot be used for a ``CIRCUITPY`` drive. -Depending on the board you have the USB port may or may not be connected to native USB, if it isn't connected to native USB then following connections need to be made to get serial console, REPL interface, flashing CircuitPython and JTAG debugging. +Depending on the board you have, the USB port may or may not be connected to native USB. + +Following connections need to be made if native USB isn't available on USB port: .. csv-table:: :header: GPIO, USB @@ -47,7 +50,9 @@ Connect these pins using a `USB adapter ` **UART Connection:** -A `USB to UART convertor `_ can be used for connecting to ESP32-C3 to get serial console, REPL interface and flashing CircuitPython. Following connections need to be made in this case. +A `USB to UART convertor `_ can be used for connecting to ESP32-C3 to get serial console, REPL interface and flashing CircuitPython. + +Following connections need to be made in this case. .. csv-table:: :header: GPIO, UART @@ -66,7 +71,9 @@ Connecting to the ESP32-S2 **USB Connetion:** -Depending on the board you have the USB port may or may not be connected to native USB, if it isn't connected to native USB then following connections need to be made to get CircuitPython working. +Depending on the board you have, the USB port may or may not be connected to native USB. + +Following connections need to be made if native USB isn't available on USB port: .. csv-table:: :header: GPIO, USB @@ -78,16 +85,79 @@ Depending on the board you have the USB port may or may not be connected to nati Connect these pins using a `USB adapter `_ or `breakout cable `_ to access the CircuitPython drive. +**UART Connection:** + +A `USB to UART convertor `_ can be used for connecting to ESP32-S2 to get serial console and flashing CircuitPython. + +Following connections need to be made in this case: + +.. csv-table:: + :header: GPIO, UART + + 43, "RX" + 44, "TX" + GND, "GND" + 5V, "5V" + +**BLE Connection:** + +This feature isn't available on ESP32-S2. + +Connecting to the ESP32-S3 +--------------------------------------- + +**USB Connetion:** + +Depending on the board you have, the USB port may or may not be connected to native USB. + +Following connections need to be made if native USB isn't available on USB port: + +.. 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. + +**UART Connection:** + +A `USB to UART convertor `_ can be used for connecting to ESP32-S3 to get serial console and flashing CircuitPython. + +Following connections need to be made in this case: + +.. csv-table:: + :header: GPIO, UART + + 43, "RX" + 44, "TX" + GND, "GND" + 5V, "5V" + +**BLE Connection:** + +This feature is not yet available and currently under development. + Building and flashing --------------------------------------- -Before building or flashing the, 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/espressif`` from ``circuitpython/`` to move to the espressif port root, and run: +Before building or flashing the, you must `install the esp-idf `_. + +Note: This must be re-done every time the esp-idf is updated, but not every time you build. + +Run ``cd ports/espressif`` from ``circuitpython/`` to move to the espressif 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**: +After this initial installation, you must add the esp-idf tools to your path. + +Note: This must be re-done every time you open a new bash environment for building or flashing. + +Run ``cd ports/espressif`` from ``circuitpython/`` to move to the espressif port root, and run: .. code-block:: @@ -106,7 +176,7 @@ Building boards is typically done through ``make BOARD=board_id``. The default p Debugging --------------------------------------- -TODO: Add documentation for ESP32-C3 JTAG feature. +TODO: Add documentation for ESP32-C3/S3 JTAG feature. 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. diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/board.c b/ports/espressif/boards/adafruit_esp32s2_camera/board.c new file mode 100644 index 0000000000..e9eef0dcbc --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s2_camera/board.c @@ -0,0 +1,111 @@ +/* + * 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" +#include "shared-bindings/board/__init__.h" + +#include "esp_log.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, 0b10100000, // _MADCTL for rotation 0 + 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) { + busio_spi_obj_t *spi = common_hal_board_create_spi(0); + displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; + bus->base.type = &displayio_fourwire_type; + common_hal_displayio_fourwire_construct(bus, + spi, + &pin_GPIO39, // TFT_DC Command or data + &pin_GPIO40, // TFT_CS Chip select + &pin_GPIO41, // TFT_RESET Reset + 5000000, // Baudrate + 0, // Polarity + 0); // Phase + + // workaround as board_init() is called before reset_port() in main.c + pwmout_reset(); + + 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) + 240, // Height (after rotation) + 80, // 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 + display_init_sequence, + sizeof(display_init_sequence), + &pin_GPIO38, // 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) { + common_hal_displayio_release_displays(); +} diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h b/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h new file mode 100644 index 0000000000..f7f988b861 --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.h @@ -0,0 +1,48 @@ +/* + * 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 "Adafruit Camera" +#define MICROPY_HW_MCU_NAME "ESP32S2" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO21) +#define MICROPY_HW_NEOPIXEL_COUNT (6) + +#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_SDA (&pin_GPIO33) +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO34) + +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) + +#define DOUBLE_TAP_PIN (&pin_GPIO42) diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.mk b/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.mk new file mode 100644 index 0000000000..d99a431599 --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s2_camera/mpconfigboard.mk @@ -0,0 +1,19 @@ +USB_VID = 0x239A +USB_PID = 0x8118 +USB_PRODUCT = "Camera" +USB_MANUFACTURER = "Adafruit" + +IDF_TARGET = esp32s2 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = MPZ + +# The default queue depth of 16 overflows on release builds, +# so increase it to 32. +CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=40m +CIRCUITPY_ESP_FLASH_SIZE=4MB + +CIRCUITPY_MODULE=wrover diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/pins.c b/ports/espressif/boards/adafruit_esp32s2_camera/pins.c new file mode 100644 index 0000000000..63e656d4ed --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s2_camera/pins.c @@ -0,0 +1,67 @@ +#include "py/objtuple.h" +#include "shared-bindings/board/__init__.h" +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_obj_tuple_t camera_data_tuple = { + {&mp_type_tuple}, + 8, + { + MP_ROM_PTR(&pin_GPIO13), + MP_ROM_PTR(&pin_GPIO15), + MP_ROM_PTR(&pin_GPIO16), + MP_ROM_PTR(&pin_GPIO14), + MP_ROM_PTR(&pin_GPIO12), + MP_ROM_PTR(&pin_GPIO10), + MP_ROM_PTR(&pin_GPIO9), + MP_ROM_PTR(&pin_GPIO7), + } +}; + + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_TFT_MOSI), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_TFT_SCK), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO41) }, + + { MP_ROM_QSTR(MP_QSTR_CARD_CS), MP_ROM_PTR(&pin_GPIO4) }, + + { MP_ROM_QSTR(MP_QSTR_IRQ), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO45) }, + + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO34) }, + + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA), MP_ROM_PTR(&camera_data_tuple) }, + + { MP_ROM_QSTR(MP_QSTR_CAMERA_VSYNC), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_HREF), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA9), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_XCLK), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA8), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA7), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_PCLK), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA6), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA2), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA5), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA3), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_CAMERA_DATA4), MP_ROM_PTR(&pin_GPIO16) }, + + { 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_module_globals_table); diff --git a/ports/espressif/boards/adafruit_esp32s2_camera/sdkconfig b/ports/espressif/boards/adafruit_esp32s2_camera/sdkconfig new file mode 100644 index 0000000000..9d8bbde967 --- /dev/null +++ b/ports/espressif/boards/adafruit_esp32s2_camera/sdkconfig @@ -0,0 +1,33 @@ +CONFIG_ESP32S2_SPIRAM_SUPPORT=y + +# +# SPI RAM config +# +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=2097152 + +# +# PSRAM clock and cs IO for ESP32S2 +# +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM clock and cs IO for ESP32S2 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set +CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# end of SPI RAM config diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/board.c b/ports/espressif/boards/adafruit_feather_esp32s2/board.c index 5abd1ce1b3..8918870a8e 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2/board.c @@ -27,11 +27,15 @@ #include "supervisor/board.h" #include "mpconfigboard.h" #include "shared-bindings/microcontroller/Pin.h" +#include "components/driver/include/driver/gpio.h" +#include "components/hal/include/hal/gpio_hal.h" +#include "common-hal/microcontroller/Pin.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); + // Turn on I2C + common_hal_never_reset_pin(&pin_GPIO7); + gpio_set_direction(7, GPIO_MODE_DEF_OUTPUT); + gpio_set_level(7, false); } bool board_requests_safe_mode(void) { @@ -39,7 +43,9 @@ bool board_requests_safe_mode(void) { } void reset_board(void) { - + // Turn on I2C power by default. + gpio_set_direction(7, GPIO_MODE_DEF_OUTPUT); + gpio_set_level(7, false); } void board_deinit(void) { diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h b/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h index fcd4a2cf60..2eb3344029 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_feather_esp32s2/mpconfigboard.h @@ -47,3 +47,5 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO38) #define DEFAULT_UART_BUS_TX (&pin_GPIO39) + +#define DOUBLE_TAP_PIN (&pin_GPIO34) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/pins.c b/ports/espressif/boards/adafruit_feather_esp32s2/pins.c index fff95265b5..5029d82231 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/pins.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2/pins.c @@ -3,6 +3,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_BOOT0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO3) }, @@ -14,8 +16,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { 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_D7), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_I2C_POWER_INVERTED), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO8) }, { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, diff --git a/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c index c6d9b581b3..ce1aa4ae98 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/board.c @@ -31,6 +31,7 @@ #include "shared-bindings/microcontroller/Pin.h" #include "shared-module/displayio/__init__.h" #include "shared-module/displayio/mipi_constants.h" +#include "shared-bindings/board/__init__.h" displayio_fourwire_obj_t board_display_obj; @@ -45,7 +46,7 @@ uint8_t display_init_sequence[] = { // normal display mode on 0x13, 0, // display and color format settings - 0x36, 1, 0x60, + 0x36, 1, 0x68, 0xB6, 2, 0x0A, 0x82, 0x3A, 1 | DELAY, 0x55, 10, // ST7789V frame rate setting @@ -70,22 +71,14 @@ uint8_t display_init_sequence[] = { void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO19); - common_hal_never_reset_pin(&pin_GPIO20); + // I2C/TFT power pin + common_hal_never_reset_pin(&pin_GPIO21); + // Turn on TFT and I2C + gpio_set_direction(21, GPIO_MODE_DEF_OUTPUT); + gpio_set_level(21, true); - busio_spi_obj_t *spi = &displays[0].fourwire_bus.inline_bus; - - common_hal_busio_spi_construct( - spi, - &pin_GPIO36, // CLK - &pin_GPIO35, // MOSI - NULL // MISO not connected - ); - - common_hal_busio_spi_never_reset(spi); - + busio_spi_obj_t *spi = common_hal_board_create_spi(0); displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; bus->base.type = &displayio_fourwire_type; @@ -93,7 +86,7 @@ void board_init(void) { bus, spi, &pin_GPIO39, // DC - &pin_GPIO21, // CS + &pin_GPIO7, // CS &pin_GPIO40, // RST 40000000, // baudrate 0, // polarity @@ -112,7 +105,7 @@ void board_init(void) { 240, // width (after rotation) 135, // height (after rotation) 40, // column start - 52, // row start + 53, // row start 0, // rotation 16, // color depth false, // grayscale diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h b/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h index b850b85e01..a68593a308 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/mpconfigboard.h @@ -47,3 +47,5 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO2) #define DEFAULT_UART_BUS_TX (&pin_GPIO1) + +#define DOUBLE_TAP_PIN (&pin_GPIO38) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c b/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c index 8d888ebfe7..cdb2f79f8e 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/pins.c @@ -5,18 +5,14 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO2) }, { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, - { MP_ROM_QSTR(MP_QSTR_R2), MP_ROM_PTR(&pin_GPIO2) }, { 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) }, @@ -26,44 +22,52 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { 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_A5), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D14), 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_D15), 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_D16), 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_D17), 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_D18), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO33) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO34) }, - { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_I2C_TFT_POWER), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_D35), 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_D36), 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_D37), MP_ROM_PTR(&pin_GPIO37) }, - { MP_ROM_QSTR(MP_QSTR_D41), MP_ROM_PTR(&pin_GPIO41) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_D41), MP_ROM_PTR(&pin_GPIO41) }, - { MP_ROM_QSTR(MP_QSTR_D42), MP_ROM_PTR(&pin_GPIO42) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_D42), MP_ROM_PTR(&pin_GPIO42) }, - { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO39) }, { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO40) }, { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_BOOT0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tft/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c index 943d91feda..71b381616f 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/board.c @@ -50,10 +50,6 @@ uint8_t display_init_sequence[] = { */ 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); diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h index d2cd01a681..9c759ac1ca 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/mpconfigboard.h @@ -44,3 +44,5 @@ #define DEFAULT_SPI_BUS_SCK (&pin_GPIO36) #define DEFAULT_SPI_BUS_MOSI (&pin_GPIO35) #define DEFAULT_SPI_BUS_MISO (&pin_GPIO37) + +#define DOUBLE_TAP_PIN (&pin_GPIO34) diff --git a/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig index e69de29bb2..5b9c86dcc3 100644 --- a/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig +++ b/ports/espressif/boards/adafruit_feather_esp32s2_tftback_nopsram/sdkconfig @@ -0,0 +1,6 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/adafruit_funhouse/board.c b/ports/espressif/boards/adafruit_funhouse/board.c index a4a1d07947..34e74c45f9 100644 --- a/ports/espressif/boards/adafruit_funhouse/board.c +++ b/ports/espressif/boards/adafruit_funhouse/board.c @@ -50,10 +50,6 @@ uint8_t display_init_sequence[] = { }; 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_GPIO37); diff --git a/ports/espressif/boards/adafruit_funhouse/mpconfigboard.h b/ports/espressif/boards/adafruit_funhouse/mpconfigboard.h index 6379147c30..a268020b7c 100644 --- a/ports/espressif/boards/adafruit_funhouse/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_funhouse/mpconfigboard.h @@ -41,3 +41,5 @@ #define DEFAULT_I2C_BUS_SCL (&pin_GPIO33) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO34) + +#define DOUBLE_TAP_PIN (&pin_GPIO38) diff --git a/ports/espressif/boards/adafruit_funhouse/sdkconfig b/ports/espressif/boards/adafruit_funhouse/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/adafruit_funhouse/sdkconfig +++ b/ports/espressif/boards/adafruit_funhouse/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c index 020e6f6a1f..4a8234aa41 100644 --- a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c +++ b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/board.c @@ -110,10 +110,6 @@ const uint8_t display_stop_sequence[] = { }; 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); diff --git a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h index 343bb525f1..ad81cc2ca7 100644 --- a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/mpconfigboard.h @@ -42,3 +42,5 @@ #define DEFAULT_I2C_BUS_SCL (&pin_GPIO34) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO33) + +#define DOUBLE_TAP_PIN (&pin_GPIO38) diff --git a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig +++ b/ports/espressif/boards/adafruit_magtag_2.9_grayscale/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/adafruit_metro_esp32s2/board.c b/ports/espressif/boards/adafruit_metro_esp32s2/board.c index 5abd1ce1b3..6772768da5 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s2/board.c +++ b/ports/espressif/boards/adafruit_metro_esp32s2/board.c @@ -29,9 +29,6 @@ #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); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h b/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h index ec992383aa..51d93224a4 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_metro_esp32s2/mpconfigboard.h @@ -46,3 +46,5 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO5) #define DEFAULT_UART_BUS_TX (&pin_GPIO6) + +#define DOUBLE_TAP_PIN (&pin_GPIO38) diff --git a/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig index 80b9a2cf8e..9ad9e6c3bb 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_metro_esp32s2/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/board.c b/ports/espressif/boards/adafruit_qtpy_esp32s2/board.c index 5abd1ce1b3..6772768da5 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/board.c +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/board.c @@ -29,9 +29,6 @@ #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); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h b/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h index dd8b1a2ac8..62766631c3 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.h @@ -47,3 +47,8 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO16) #define DEFAULT_UART_BUS_TX (&pin_GPIO5) + +#define DOUBLE_TAP_PIN (&pin_GPIO10) + +#define DEBUG_UART_RX DEFAULT_UART_BUS_RX +#define DEBUG_UART_TX DEFAULT_UART_BUS_TX diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk index 38cdd83779..d415e140cb 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/mpconfigboard.mk @@ -18,8 +18,3 @@ 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/espressif/boards/adafruit_qtpy_esp32s2/pins.c b/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c index ac5d2275d0..6ed30e9a73 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/pins.c @@ -3,54 +3,55 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_BOOT0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, - { 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_D18), MP_ROM_PTR(&pin_GPIO18) }, - { 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_D17), MP_ROM_PTR(&pin_GPIO17) }, - { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, - { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, - { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO7) }, - { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO6) }, - { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO6) }, - { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO5) }, - { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_GPIO16) }, - { 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_D35), MP_ROM_PTR(&pin_GPIO35) }, - { MP_ROM_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_GPIO34) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO36) }, - { MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_GPIO33) }, - { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_D37), MP_ROM_PTR(&pin_GPIO37) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO38) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO39) }, - { MP_ROM_QSTR(MP_QSTR_D40), MP_ROM_PTR(&pin_GPIO40) }, { MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_D40), MP_ROM_PTR(&pin_GPIO40) }, - { MP_ROM_QSTR(MP_QSTR_D41), MP_ROM_PTR(&pin_GPIO41) }, { MP_ROM_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_D41), MP_ROM_PTR(&pin_GPIO41) }, { 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/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig +++ b/ports/espressif/boards/adafruit_qtpy_esp32s2/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c new file mode 100644 index 0000000000..ff9418ec86 --- /dev/null +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/board.c @@ -0,0 +1,48 @@ +/* + * 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) { + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h new file mode 100644 index 0000000000..a08fe9e45b --- /dev/null +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.h @@ -0,0 +1,51 @@ +/* + * 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 "Adafruit QT Py ESP32-S3 no psram" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO38) +#define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO37) + +#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_GPIO6) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO7) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO35) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO34) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO36) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO16) +#define DEFAULT_UART_BUS_TX (&pin_GPIO5) + +#define DOUBLE_TAP_PIN (&pin_GPIO10) diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk new file mode 100644 index 0000000000..1156b1b915 --- /dev/null +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/mpconfigboard.mk @@ -0,0 +1,23 @@ +USB_VID = 0x239A +USB_PID = 0x811A + +USB_PRODUCT = "QT Py ESP32S3 no psram" +USB_MANUFACTURER = "Adafruit" + +IDF_TARGET = esp32s3 + +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=80m +CIRCUITPY_ESP_FLASH_SIZE=8MB + +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/espressif/boards/adafruit_qtpy_esp32s3_nopsram/pins.c b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/pins.c new file mode 100644 index 0000000000..be7fb21a3e --- /dev/null +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/pins.c @@ -0,0 +1,59 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, + + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_GPIO34) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, + + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO36) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO38) }, + + { MP_ROM_QSTR(MP_QSTR_SCL1), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_D40), MP_ROM_PTR(&pin_GPIO40) }, + + { MP_ROM_QSTR(MP_QSTR_SDA1), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_D41), MP_ROM_PTR(&pin_GPIO41) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) } +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig new file mode 100644 index 0000000000..a162344cfb --- /dev/null +++ b/ports/espressif/boards/adafruit_qtpy_esp32s3_nopsram/sdkconfig @@ -0,0 +1,8 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=n + +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP + diff --git a/ports/espressif/boards/ai_thinker_esp32-c3s/board.c b/ports/espressif/boards/ai_thinker_esp32-c3s/board.c index 83ef690007..f9cb98aa8f 100644 --- a/ports/espressif/boards/ai_thinker_esp32-c3s/board.c +++ b/ports/espressif/boards/ai_thinker_esp32-c3s/board.c @@ -29,21 +29,11 @@ #include "supervisor/board.h" void board_init(void) { - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO20); common_hal_never_reset_pin(&pin_GPIO21); #endif - - // SPI Flash - common_hal_never_reset_pin(&pin_GPIO11); - common_hal_never_reset_pin(&pin_GPIO12); - common_hal_never_reset_pin(&pin_GPIO13); - common_hal_never_reset_pin(&pin_GPIO14); - common_hal_never_reset_pin(&pin_GPIO15); - common_hal_never_reset_pin(&pin_GPIO16); - common_hal_never_reset_pin(&pin_GPIO17); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c +++ b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig index 1a86435efc..49ee336ed4 100644 --- a/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig +++ b/ports/espressif/boards/ai_thinker_esp_12k_nodemcu/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -7,12 +6,13 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y # CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set CONFIG_SPIRAM_TYPE_ESPPSRAM64=y -CONFIG_SPIRAM_SIZE=4194304 +CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/artisense_rd00/board.c b/ports/espressif/boards/artisense_rd00/board.c index 2b18dd7592..ea363f6b54 100644 --- a/ports/espressif/boards/artisense_rd00/board.c +++ b/ports/espressif/boards/artisense_rd00/board.c @@ -29,10 +29,6 @@ #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); @@ -42,9 +38,6 @@ void board_init(void) { // Crystal common_hal_never_reset_pin(&pin_GPIO15); common_hal_never_reset_pin(&pin_GPIO16); - - // PSRAM - common_hal_never_reset_pin(&pin_GPIO26); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/artisense_rd00/sdkconfig b/ports/espressif/boards/artisense_rd00/sdkconfig index b5bf2411f7..cd57f0d118 100644 --- a/ports/espressif/boards/artisense_rd00/sdkconfig +++ b/ports/espressif/boards/artisense_rd00/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/atmegazero_esp32s2/board.c b/ports/espressif/boards/atmegazero_esp32s2/board.c index a0e399b1ef..0432485111 100644 --- a/ports/espressif/boards/atmegazero_esp32s2/board.c +++ b/ports/espressif/boards/atmegazero_esp32s2/board.c @@ -29,24 +29,11 @@ #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 */ - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/atmegazero_esp32s2/sdkconfig b/ports/espressif/boards/atmegazero_esp32s2/sdkconfig index f42e0784c4..b528b9f343 100644 --- a/ports/espressif/boards/atmegazero_esp32s2/sdkconfig +++ b/ports/espressif/boards/atmegazero_esp32s2/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/crumpspace_crumps2/board.c b/ports/espressif/boards/crumpspace_crumps2/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/crumpspace_crumps2/board.c +++ b/ports/espressif/boards/crumpspace_crumps2/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/crumpspace_crumps2/sdkconfig b/ports/espressif/boards/crumpspace_crumps2/sdkconfig index 04b487625d..94158d85c5 100644 --- a/ports/espressif/boards/crumpspace_crumps2/sdkconfig +++ b/ports/espressif/boards/crumpspace_crumps2/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/electroniccats_bastwifi/board.c b/ports/espressif/boards/electroniccats_bastwifi/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/electroniccats_bastwifi/board.c +++ b/ports/espressif/boards/electroniccats_bastwifi/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/electroniccats_bastwifi/sdkconfig b/ports/espressif/boards/electroniccats_bastwifi/sdkconfig index e69de29bb2..5b9c86dcc3 100644 --- a/ports/espressif/boards/electroniccats_bastwifi/sdkconfig +++ b/ports/espressif/boards/electroniccats_bastwifi/sdkconfig @@ -0,0 +1,6 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c new file mode 100644 index 0000000000..e3b71f4832 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/board.c @@ -0,0 +1,48 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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/microcontroller/Pin.h" +#include "supervisor/board.h" + +void board_init(void) { + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO20); + common_hal_never_reset_pin(&pin_GPIO21); + #endif +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +#if CIRCUITPY_ALARM +void board_deinit(void) { +} +#endif diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h new file mode 100644 index 0000000000..28c2ea11eb --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.h @@ -0,0 +1,47 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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. + */ + +// Board setup +#define MICROPY_HW_BOARD_NAME "ESP32-C3-DevKitM-1" +#define MICROPY_HW_MCU_NAME "ESP32-C3N4" + +// Status LED +#define MICROPY_HW_NEOPIXEL (&pin_GPIO8) +#define MICROPY_HW_NEOPIXEL_COUNT (1) + +// Default bus pins +#define DEFAULT_UART_BUS_RX (&pin_GPIO20) +#define DEFAULT_UART_BUS_TX (&pin_GPIO21) + +// Serial over UART +#define DEBUG_UART_RX DEFAULT_UART_BUS_RX +#define DEBUG_UART_TX DEFAULT_UART_BUS_TX + +// For entering safe mode +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO2) + +// Explanation of how a user got into safe mode +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk new file mode 100644 index 0000000000..b952dacef7 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/mpconfigboard.mk @@ -0,0 +1,10 @@ +CIRCUITPY_CREATOR_ID = 0x000C303A +CIRCUITPY_CREATION_ID = 0x00C30001 + +IDF_TARGET = esp32c3 + +INTERNAL_FLASH_FILESYSTEM = 1 + +CIRCUITPY_ESP_FLASH_MODE=dio +CIRCUITPY_ESP_FLASH_FREQ=80m +CIRCUITPY_ESP_FLASH_SIZE=4MB diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/pins.c b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/pins.c new file mode 100644 index 0000000000..e948ae3fc8 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/pins.c @@ -0,0 +1,61 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_MTMS), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_MTDI), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_MTCK), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_MTDO), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_BUTTON), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO8) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/sdkconfig b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/sdkconfig new file mode 100644 index 0000000000..0e24f8dc77 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32c3_devkitm_1_n4/sdkconfig @@ -0,0 +1,5 @@ +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="ESP32-C3-DevKitM-1" +# end of LWIP diff --git a/ports/espressif/boards/espressif_esp32s3_box/board.c b/ports/espressif/boards/espressif_esp32s3_box/board.c new file mode 100644 index 0000000000..ad76c60ddd --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_box/board.c @@ -0,0 +1,109 @@ +/* + * 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" + +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-module/displayio/__init__.h" +#include "shared-module/displayio/mipi_constants.h" + +uint8_t display_init_sequence[] = { + 0x01, 0x80, 0x96, // _SWRESET and Delay 150ms + 0x11, 0x80, 0xFF, // _SLPOUT and Delay 500ms + 0x3A, 0x81, 0x55, 0x0A, // _COLMOD and Delay 10ms + 0x36, 0x01, 0x08, // _MADCTL + 0x13, 0x80, 0x0A, // _NORON and Delay 10ms + 0x36, 0x01, 0xC0, // _MADCTL + 0x29, 0x80, 0xFF, // _DISPON and Delay 500ms +}; + +void board_init(void) { + busio_spi_obj_t *spi = &displays[0].fourwire_bus.inline_bus; + common_hal_busio_spi_construct(spi, &pin_GPIO7, &pin_GPIO6, 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_GPIO4, // TFT_DC Command or data + &pin_GPIO5, // TFT_CS Chip select + &pin_GPIO48, // TFT_RST Reset + 60000000, // 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, + 320, // Width + 240, // Height + 0, // column start + 0, // row start + 0, // rotation + 16, // Color depth + false, // Grayscale + false, // pixels in a byte share a row. Only valid for depths < 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 + display_init_sequence, + sizeof(display_init_sequence), + &pin_GPIO45, // 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); // SH1107_addressing + + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h new file mode 100644 index 0000000000..b8a2207f93 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.h @@ -0,0 +1,36 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "ESP32-S3-Box-2.5" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 diff --git a/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk new file mode 100644 index 0000000000..6664ba8c98 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x303A +USB_PID = 0x7005 +USB_PRODUCT = "ESP32-S3-Box-2.5" +USB_MANUFACTURER = "Espressif" + +IDF_TARGET = esp32s3 + +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=80m +CIRCUITPY_ESP_FLASH_SIZE=16MB diff --git a/ports/espressif/boards/espressif_esp32s3_box/pins.c b/ports/espressif/boards/espressif_esp32s3_box/pins.c new file mode 100644 index 0000000000..73ef15697c --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_box/pins.c @@ -0,0 +1,67 @@ +#include "shared-bindings/board/__init__.h" +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + // First PMOD connector + { MP_ROM_QSTR(MP_QSTR_G9), MP_ROM_PTR(&pin_GPIO9) }, + + { MP_ROM_QSTR(MP_QSTR_U0TXD), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_G43), MP_ROM_PTR(&pin_GPIO43) }, + + { MP_ROM_QSTR(MP_QSTR_U0RXD), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_G44), MP_ROM_PTR(&pin_GPIO44) }, + + { MP_ROM_QSTR(MP_QSTR_CS), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_G10), MP_ROM_PTR(&pin_GPIO10) }, + + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_G11), MP_ROM_PTR(&pin_GPIO11) }, + + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_G13), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_CLK), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_G12), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_G14), MP_ROM_PTR(&pin_GPIO14) }, + + // Second PMOD connector + { MP_ROM_QSTR(MP_QSTR_G38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_G39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_SCL2), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_G40), MP_ROM_PTR(&pin_GPIO40) }, + { MP_ROM_QSTR(MP_QSTR_SDA2), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_G41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_G42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_G21), MP_ROM_PTR(&pin_GPIO21) }, + + // LCD & touchscreen + { MP_ROM_QSTR(MP_QSTR_LCD_DC), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_LCD_CS), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_LCD_MOSI), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_LCD_SCK), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_LCD_RST), MP_ROM_PTR(&pin_GPIO48) }, + { MP_ROM_QSTR(MP_QSTR_LCD_CTRL), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_CTP_INT), MP_ROM_PTR(&pin_GPIO3) }, + + // Audio + { MP_ROM_QSTR(MP_QSTR_I2S_ADC_SDOUT), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_I2S_MCLK), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_I2S_SCLK), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_I2S_LRCK), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_I2S_CODEC_DSDIN), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_PA_CTRL), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_MUTE_STATUS), MP_ROM_PTR(&pin_GPIO1) }, + + // Internal I2C bus + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO18) }, + + // boot button, also usable as a software button + { MP_ROM_QSTR(MP_QSTR_BOOT), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32s3_box/sdkconfig b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig new file mode 100644 index 0000000000..7fcf8ef297 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig @@ -0,0 +1,37 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=y +# +# SPI RAM config +# +# CONFIG_SPIRAM_MODE_QUAD is not set +CONFIG_SPIRAM_MODE_OCT=y +CONFIG_SPIRAM_TYPE_AUTO=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=-1 +# end of SPI RAM config + +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +# +# PSRAM Clock and CS IO for ESP32S3 +# +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM Clock and CS IO for ESP32S3 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_40M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +# CONFIG_SPIRAM_USE_MEMMAP is not set +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +CONFIG_SPIRAM_USE_MALLOC=y +CONFIG_SPIRAM_MEMTEST=y +CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384 +# CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP is not set +CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768 +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c new file mode 100644 index 0000000000..ff9418ec86 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/board.c @@ -0,0 +1,48 @@ +/* + * 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) { + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h new file mode 100644 index 0000000000..4c584e96cd --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.h @@ -0,0 +1,41 @@ +/* + * 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 "ESP32-S3-DevKitC-1-N8" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO48) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.mk new file mode 100644 index 0000000000..b6ead37eee --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x303A +USB_PID = 0x7003 +USB_PRODUCT = "ESP32-S3-DevKitC-1-N8" +USB_MANUFACTURER = "Espressif" + +IDF_TARGET = esp32s3 + +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=80m +CIRCUITPY_ESP_FLASH_SIZE=8MB diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/pins.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/pins.c new file mode 100644 index 0000000000..21b445f393 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/pins.c @@ -0,0 +1,48 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_IO47), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_IO48), MP_ROM_PTR(&pin_GPIO48) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO48) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig new file mode 100644 index 0000000000..a0a61d8392 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8/sdkconfig @@ -0,0 +1,6 @@ +# CONFIG_ESP32S3_SPIRAM_SUPPORT is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c new file mode 100644 index 0000000000..ff9418ec86 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/board.c @@ -0,0 +1,48 @@ +/* + * 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) { + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h new file mode 100644 index 0000000000..eb6cae949f --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.h @@ -0,0 +1,41 @@ +/* + * 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 "ESP32-S3-DevKitC-1-N8R2" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO48) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk new file mode 100644 index 0000000000..7fff66f5d8 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x303A +USB_PID = 0x7003 +USB_PRODUCT = "ESP32-S3-DevKitC-1-N8R2" +USB_MANUFACTURER = "Espressif" + +IDF_TARGET = esp32s3 + +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=80m +CIRCUITPY_ESP_FLASH_SIZE=8MB diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/pins.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/pins.c new file mode 100644 index 0000000000..21b445f393 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/pins.c @@ -0,0 +1,48 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_IO47), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_IO48), MP_ROM_PTR(&pin_GPIO48) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO48) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig new file mode 100644 index 0000000000..e3a4d6ce68 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r2/sdkconfig @@ -0,0 +1,37 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=y +# +# SPI RAM config +# +CONFIG_SPIRAM_MODE_QUAD=y +# CONFIG_SPIRAM_MODE_OCT is not set +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM16=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config + +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +# +# PSRAM Clock and CS IO for ESP32S3 +# +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM Clock and CS IO for ESP32S3 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_120M is not set +CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_40M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c new file mode 100644 index 0000000000..ff9418ec86 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/board.c @@ -0,0 +1,48 @@ +/* + * 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) { + // Debug UART + #ifdef DEBUG + common_hal_never_reset_pin(&pin_GPIO43); + common_hal_never_reset_pin(&pin_GPIO44); + #endif +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h new file mode 100644 index 0000000000..f3a2941655 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.h @@ -0,0 +1,41 @@ +/* + * 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 "ESP32-S3-DevKitC-1-N8R8" +#define MICROPY_HW_MCU_NAME "ESP32S3" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO48) + +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO44) +#define DEFAULT_UART_BUS_TX (&pin_GPIO43) + +#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") + +#define AUTORESET_DELAY_MS 500 diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk new file mode 100644 index 0000000000..4e65fc940d --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/mpconfigboard.mk @@ -0,0 +1,17 @@ +USB_VID = 0x303A +USB_PID = 0x7003 +USB_PRODUCT = "ESP32-S3-DevKitC-1-N8R8" +USB_MANUFACTURER = "Espressif" + +IDF_TARGET = esp32s3 + +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=80m +CIRCUITPY_ESP_FLASH_SIZE=8MB diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/pins.c b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/pins.c new file mode 100644 index 0000000000..21b445f393 --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/pins.c @@ -0,0 +1,48 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_IO0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_IO1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_IO2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_IO3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_IO4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_IO5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_IO6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_IO7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_IO8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_IO9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_IO10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_IO11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_IO12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_IO13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_IO14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_IO15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_IO16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_IO17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_IO19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_IO20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_IO35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_IO36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_IO37), MP_ROM_PTR(&pin_GPIO37) }, + { MP_ROM_QSTR(MP_QSTR_IO38), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_IO39), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_IO41), MP_ROM_PTR(&pin_GPIO41) }, + { MP_ROM_QSTR(MP_QSTR_IO42), MP_ROM_PTR(&pin_GPIO42) }, + { MP_ROM_QSTR(MP_QSTR_IO43), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_IO44), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_IO47), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_IO48), MP_ROM_PTR(&pin_GPIO48) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO48) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO43) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig new file mode 100644 index 0000000000..f508f4a67c --- /dev/null +++ b/ports/espressif/boards/espressif_esp32s3_devkitc_1_n8r8/sdkconfig @@ -0,0 +1,34 @@ +CONFIG_ESP32S3_SPIRAM_SUPPORT=y +# +# SPI RAM config +# +# CONFIG_SPIRAM_MODE_QUAD is not set +CONFIG_SPIRAM_MODE_OCT=y +# CONFIG_SPIRAM_TYPE_AUTO is not set +CONFIG_SPIRAM_TYPE_ESPPSRAM64=y +CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config + +CONFIG_DEFAULT_PSRAM_CLK_IO=30 +# +# PSRAM Clock and CS IO for ESP32S3 +# +CONFIG_DEFAULT_PSRAM_CS_IO=26 +# end of PSRAM Clock and CS IO for ESP32S3 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_40M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif-esp32s3" +# end of LWIP diff --git a/ports/espressif/boards/espressif_hmi_devkit_1/board.c b/ports/espressif/boards/espressif_hmi_devkit_1/board.c index ff5d9cfb6c..93aa1c0436 100644 --- a/ports/espressif/boards/espressif_hmi_devkit_1/board.c +++ b/ports/espressif/boards/espressif_hmi_devkit_1/board.c @@ -29,10 +29,6 @@ #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 common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); diff --git a/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig b/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig +++ b/ports/espressif/boards/espressif_hmi_devkit_1/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/espressif_kaluga_1.3/board.c b/ports/espressif/boards/espressif_kaluga_1.3/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/espressif_kaluga_1.3/board.c +++ b/ports/espressif/boards/espressif_kaluga_1.3/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig b/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig +++ b/ports/espressif/boards/espressif_kaluga_1.3/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/espressif_kaluga_1/board.c b/ports/espressif/boards/espressif_kaluga_1/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/espressif_kaluga_1/board.c +++ b/ports/espressif/boards/espressif_kaluga_1/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/espressif_kaluga_1/sdkconfig b/ports/espressif/boards/espressif_kaluga_1/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/espressif_kaluga_1/sdkconfig +++ b/ports/espressif/boards/espressif_kaluga_1/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/espressif_saola_1_wroom/board.c b/ports/espressif/boards/espressif_saola_1_wroom/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/espressif_saola_1_wroom/board.c +++ b/ports/espressif/boards/espressif_saola_1_wroom/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig b/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig index e69de29bb2..5b9c86dcc3 100644 --- a/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig +++ b/ports/espressif/boards/espressif_saola_1_wroom/sdkconfig @@ -0,0 +1,6 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/espressif_saola_1_wrover/board.c b/ports/espressif/boards/espressif_saola_1_wrover/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/espressif_saola_1_wrover/board.c +++ b/ports/espressif/boards/espressif_saola_1_wrover/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig b/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig +++ b/ports/espressif/boards/espressif_saola_1_wrover/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/franzininho_wifi_wroom/board.c b/ports/espressif/boards/franzininho_wifi_wroom/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/franzininho_wifi_wroom/board.c +++ b/ports/espressif/boards/franzininho_wifi_wroom/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig b/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig index e69de29bb2..5b9c86dcc3 100644 --- a/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig +++ b/ports/espressif/boards/franzininho_wifi_wroom/sdkconfig @@ -0,0 +1,6 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/franzininho_wifi_wrover/board.c b/ports/espressif/boards/franzininho_wifi_wrover/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/franzininho_wifi_wrover/board.c +++ b/ports/espressif/boards/franzininho_wifi_wrover/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig b/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig +++ b/ports/espressif/boards/franzininho_wifi_wrover/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/gravitech_cucumber_m/board.c b/ports/espressif/boards/gravitech_cucumber_m/board.c index ec84d3209c..16a6af0742 100644 --- a/ports/espressif/boards/gravitech_cucumber_m/board.c +++ b/ports/espressif/boards/gravitech_cucumber_m/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/gravitech_cucumber_m/sdkconfig b/ports/espressif/boards/gravitech_cucumber_m/sdkconfig index af73f6d885..7b07033d7b 100644 --- a/ports/espressif/boards/gravitech_cucumber_m/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_m/sdkconfig @@ -1,3 +1,4 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/gravitech_cucumber_ms/board.c b/ports/espressif/boards/gravitech_cucumber_ms/board.c index ec84d3209c..16a6af0742 100644 --- a/ports/espressif/boards/gravitech_cucumber_ms/board.c +++ b/ports/espressif/boards/gravitech_cucumber_ms/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig b/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig index cbdd787aa7..b31dd447e1 100644 --- a/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_ms/sdkconfig @@ -1,3 +1,4 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # diff --git a/ports/espressif/boards/gravitech_cucumber_r/board.c b/ports/espressif/boards/gravitech_cucumber_r/board.c index ec84d3209c..16a6af0742 100644 --- a/ports/espressif/boards/gravitech_cucumber_r/board.c +++ b/ports/espressif/boards/gravitech_cucumber_r/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/gravitech_cucumber_r/sdkconfig b/ports/espressif/boards/gravitech_cucumber_r/sdkconfig index 3862b27003..fe0857c4fb 100644 --- a/ports/espressif/boards/gravitech_cucumber_r/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_r/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/gravitech_cucumber_rs/board.c b/ports/espressif/boards/gravitech_cucumber_rs/board.c index ec84d3209c..16a6af0742 100644 --- a/ports/espressif/boards/gravitech_cucumber_rs/board.c +++ b/ports/espressif/boards/gravitech_cucumber_rs/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig b/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig index bc8328d1f1..23b3eea78d 100644 --- a/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig +++ b/ports/espressif/boards/gravitech_cucumber_rs/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c index b00a1ed8ed..38fba815e5 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/board.c @@ -131,10 +131,6 @@ static void display_init(void) { } 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); diff --git a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig index 5d52cbff44..8c401a6ff3 100644 --- a/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig +++ b/ports/espressif/boards/lilygo_ttgo_t8_s2_st7789/sdkconfig @@ -1,29 +1,37 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # +# CONFIG_SPIRAM_TYPE_AUTO is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +# CONFIG_SPIRAM_SPEED_80M is not set CONFIG_SPIRAM_SPEED_40M=y +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set CONFIG_SPIRAM=y CONFIG_SPIRAM_BOOT_INIT=y -CONFIG_SPIRAM_USE_MALLOC=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y -# end of SPI RAM config - +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="TTGO-T8-ESP32-S2" -CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y # end of LWIP diff --git a/ports/espressif/boards/lolin_s2_mini/board.c b/ports/espressif/boards/lolin_s2_mini/board.c index a0e399b1ef..0432485111 100644 --- a/ports/espressif/boards/lolin_s2_mini/board.c +++ b/ports/espressif/boards/lolin_s2_mini/board.c @@ -29,24 +29,11 @@ #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 */ - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/lolin_s2_mini/sdkconfig b/ports/espressif/boards/lolin_s2_mini/sdkconfig index 126ae31312..deb0dadcb9 100644 --- a/ports/espressif/boards/lolin_s2_mini/sdkconfig +++ b/ports/espressif/boards/lolin_s2_mini/sdkconfig @@ -1,24 +1,24 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # -# CONFIG_SPIRAM_TYPE_AUTO=y +# CONFIG_SPIRAM_TYPE_AUTO is not set CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set # CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_80M is not set CONFIG_SPIRAM_SPEED_40M=y # CONFIG_SPIRAM_SPEED_26M is not set # CONFIG_SPIRAM_SPEED_20M is not set @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/lolin_s2_pico/board.c b/ports/espressif/boards/lolin_s2_pico/board.c index a0e399b1ef..0432485111 100644 --- a/ports/espressif/boards/lolin_s2_pico/board.c +++ b/ports/espressif/boards/lolin_s2_pico/board.c @@ -29,24 +29,11 @@ #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 */ - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/lolin_s2_pico/sdkconfig b/ports/espressif/boards/lolin_s2_pico/sdkconfig index 36e83d7fb5..5ce352a98d 100644 --- a/ports/espressif/boards/lolin_s2_pico/sdkconfig +++ b/ports/espressif/boards/lolin_s2_pico/sdkconfig @@ -1,24 +1,24 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # -# CONFIG_SPIRAM_TYPE_AUTO=y +# CONFIG_SPIRAM_TYPE_AUTO is not set CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set # CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_80M is not set CONFIG_SPIRAM_SPEED_40M=y # CONFIG_SPIRAM_SPEED_26M is not set # CONFIG_SPIRAM_SPEED_20M is not set @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/microdev_micro_c3/board.c b/ports/espressif/boards/microdev_micro_c3/board.c index 7ffd406cfe..e3b71f4832 100644 --- a/ports/espressif/boards/microdev_micro_c3/board.c +++ b/ports/espressif/boards/microdev_micro_c3/board.c @@ -28,24 +28,11 @@ #include "supervisor/board.h" void board_init(void) { - // USB - common_hal_never_reset_pin(&pin_GPIO18); - common_hal_never_reset_pin(&pin_GPIO19); - // Debug UART #ifdef DEBUG common_hal_never_reset_pin(&pin_GPIO20); common_hal_never_reset_pin(&pin_GPIO21); #endif - - // SPI Flash - common_hal_never_reset_pin(&pin_GPIO11); - common_hal_never_reset_pin(&pin_GPIO12); - common_hal_never_reset_pin(&pin_GPIO13); - common_hal_never_reset_pin(&pin_GPIO14); - common_hal_never_reset_pin(&pin_GPIO15); - common_hal_never_reset_pin(&pin_GPIO16); - common_hal_never_reset_pin(&pin_GPIO17); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/microdev_micro_s2/board.c b/ports/espressif/boards/microdev_micro_s2/board.c index 52d640618c..6ba5d975d7 100644 --- a/ports/espressif/boards/microdev_micro_s2/board.c +++ b/ports/espressif/boards/microdev_micro_s2/board.c @@ -29,24 +29,11 @@ #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 - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/microdev_micro_s2/sdkconfig b/ports/espressif/boards/microdev_micro_s2/sdkconfig index b3c5219972..4b617fee71 100644 --- a/ports/espressif/boards/microdev_micro_s2/sdkconfig +++ b/ports/espressif/boards/microdev_micro_s2/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/morpheans_morphesp-240/board.c b/ports/espressif/boards/morpheans_morphesp-240/board.c index aad2f0257a..ace1778766 100644 --- a/ports/espressif/boards/morpheans_morphesp-240/board.c +++ b/ports/espressif/boards/morpheans_morphesp-240/board.c @@ -139,10 +139,6 @@ uint8_t display_init_sequence[] = { 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_GPIO6); diff --git a/ports/espressif/boards/morpheans_morphesp-240/sdkconfig b/ports/espressif/boards/morpheans_morphesp-240/sdkconfig index 36ada0b0c7..6de15d1556 100644 --- a/ports/espressif/boards/morpheans_morphesp-240/sdkconfig +++ b/ports/espressif/boards/morpheans_morphesp-240/sdkconfig @@ -1,6 +1,6 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set # # LWIP # CONFIG_LWIP_LOCAL_HOSTNAME="MORPHESP-240" -CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y -# end of LWIP \ No newline at end of file +# end of LWIP diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig index e69de29bb2..5b9c86dcc3 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wroom/sdkconfig @@ -0,0 +1,6 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c index e40b6335bc..0432485111 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig index e69de29bb2..5b9c86dcc3 100644 --- a/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig +++ b/ports/espressif/boards/muselab_nanoesp32_s2_wrover/sdkconfig @@ -0,0 +1,6 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/odt_pixelwing_esp32_s2/board.c b/ports/espressif/boards/odt_pixelwing_esp32_s2/board.c index 5abd1ce1b3..6772768da5 100644 --- a/ports/espressif/boards/odt_pixelwing_esp32_s2/board.c +++ b/ports/espressif/boards/odt_pixelwing_esp32_s2/board.c @@ -29,9 +29,6 @@ #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); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig b/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig index f67a257854..17c1995cd3 100644 --- a/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig +++ b/ports/espressif/boards/odt_pixelwing_esp32_s2/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/targett_module_clip_wroom/board.c b/ports/espressif/boards/targett_module_clip_wroom/board.c index 00b94a0259..66aea4bdd5 100644 --- a/ports/espressif/boards/targett_module_clip_wroom/board.c +++ b/ports/espressif/boards/targett_module_clip_wroom/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/targett_module_clip_wroom/sdkconfig b/ports/espressif/boards/targett_module_clip_wroom/sdkconfig index e69de29bb2..5b9c86dcc3 100644 --- a/ports/espressif/boards/targett_module_clip_wroom/sdkconfig +++ b/ports/espressif/boards/targett_module_clip_wroom/sdkconfig @@ -0,0 +1,6 @@ +# CONFIG_ESP32S2_SPIRAM_SUPPORT is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/targett_module_clip_wrover/board.c b/ports/espressif/boards/targett_module_clip_wrover/board.c index 00b94a0259..66aea4bdd5 100644 --- a/ports/espressif/boards/targett_module_clip_wrover/board.c +++ b/ports/espressif/boards/targett_module_clip_wrover/board.c @@ -29,10 +29,6 @@ #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); diff --git a/ports/espressif/boards/targett_module_clip_wrover/sdkconfig b/ports/espressif/boards/targett_module_clip_wrover/sdkconfig index 9d8bbde967..f19afafa3d 100644 --- a/ports/espressif/boards/targett_module_clip_wrover/sdkconfig +++ b/ports/espressif/boards/targett_module_clip_wrover/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set # CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,4 +30,8 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="espressif" +# end of LWIP diff --git a/ports/espressif/boards/unexpectedmaker_feathers2/board.c b/ports/espressif/boards/unexpectedmaker_feathers2/board.c index a0e399b1ef..0432485111 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2/board.c +++ b/ports/espressif/boards/unexpectedmaker_feathers2/board.c @@ -29,24 +29,11 @@ #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 */ - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig index c9d44460c5..8d785a6004 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,11 +7,12 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c b/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c index a0e399b1ef..0432485111 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c +++ b/ports/espressif/boards/unexpectedmaker_feathers2_neo/board.c @@ -29,24 +29,11 @@ #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 */ - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig index 453aeb1d2d..4a5990b91d 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2_neo/sdkconfig @@ -1,18 +1,18 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # -# CONFIG_SPIRAM_TYPE_AUTO=y +# CONFIG_SPIRAM_TYPE_AUTO is not set CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c index a0e399b1ef..0432485111 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c +++ b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/board.c @@ -29,24 +29,11 @@ #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 */ - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig index 00e0bb2566..8d785a6004 100644 --- a/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_feathers2_prerelease/sdkconfig @@ -1,5 +1,4 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # @@ -8,18 +7,17 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set CONFIG_SPIRAM_TYPE_ESPPSRAM64=y CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 -CONFIG_SPIRAM_SPIWP_SD3_PIN=28 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set # CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_USE_AHB_DBUS3 is not set # CONFIG_SPIRAM_SPEED_80M is not set CONFIG_SPIRAM_SPEED_40M=y # CONFIG_SPIRAM_SPEED_26M is not set @@ -32,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/boards/unexpectedmaker_tinys2/board.c b/ports/espressif/boards/unexpectedmaker_tinys2/board.c index a0e399b1ef..0432485111 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys2/board.c +++ b/ports/espressif/boards/unexpectedmaker_tinys2/board.c @@ -29,24 +29,11 @@ #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 */ - - // SPI Flash and RAM - common_hal_never_reset_pin(&pin_GPIO26); - common_hal_never_reset_pin(&pin_GPIO27); - common_hal_never_reset_pin(&pin_GPIO28); - common_hal_never_reset_pin(&pin_GPIO29); - common_hal_never_reset_pin(&pin_GPIO30); - common_hal_never_reset_pin(&pin_GPIO31); - common_hal_never_reset_pin(&pin_GPIO32); } bool board_requests_safe_mode(void) { diff --git a/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig b/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig index 91447cdc2a..8539cb7519 100644 --- a/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig +++ b/ports/espressif/boards/unexpectedmaker_tinys2/sdkconfig @@ -1,24 +1,24 @@ CONFIG_ESP32S2_SPIRAM_SUPPORT=y - # # SPI RAM config # -# CONFIG_SPIRAM_TYPE_AUTO=y +# CONFIG_SPIRAM_TYPE_AUTO is not set CONFIG_SPIRAM_TYPE_ESPPSRAM16=y # CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set -# CONFIG_SPIRAM_TYPE_ESPPSRAM64=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set CONFIG_SPIRAM_SIZE=2097152 +# end of SPI RAM config +CONFIG_DEFAULT_PSRAM_CLK_IO=30 # # PSRAM clock and cs IO for ESP32S2 # -CONFIG_DEFAULT_PSRAM_CLK_IO=30 CONFIG_DEFAULT_PSRAM_CS_IO=26 # end of PSRAM clock and cs IO for ESP32S2 # CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set # CONFIG_SPIRAM_RODATA is not set -# CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_80M is not set CONFIG_SPIRAM_SPEED_40M=y # CONFIG_SPIRAM_SPEED_26M is not set # CONFIG_SPIRAM_SPEED_20M is not set @@ -30,8 +30,6 @@ CONFIG_SPIRAM_USE_MEMMAP=y # CONFIG_SPIRAM_USE_MALLOC is not set CONFIG_SPIRAM_MEMTEST=y # CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set -# end of SPI RAM config - # # LWIP # diff --git a/ports/espressif/cam.c b/ports/espressif/cam.c index 146df43a41..ea50785cd9 100644 --- a/ports/espressif/cam.c +++ b/ports/espressif/cam.c @@ -21,8 +21,13 @@ #include "esp_log.h" #include "soc/i2s_struct.h" #include "soc/apb_ctrl_reg.h" +#ifdef CONFIG_IDF_TARGET_ESP32S2 #include "esp32s2/rom/lldesc.h" #include "esp32s2/rom/cache.h" +#elif defined(CONFIG_IDF_TARGET_ESP32S3) +#include "esp32s3/rom/lldesc.h" +#include "esp32s3/rom/cache.h" +#endif #include "soc/dport_access.h" #include "soc/dport_reg.h" #include "driver/ledc.h" diff --git a/ports/espressif/common-hal/alarm/__init__.c b/ports/espressif/common-hal/alarm/__init__.c index 8d12cb1b09..b24a91a03e 100644 --- a/ports/espressif/common-hal/alarm/__init__.c +++ b/ports/espressif/common-hal/alarm/__init__.c @@ -62,11 +62,6 @@ void alarm_reset(void) { esp_sleep_disable_wakeup_source(ESP_SLEEP_WAKEUP_ALL); } -// This will be reset to false by full resets when bss is cleared. Otherwise, the -// reload is due to CircuitPython and the ESP wakeup cause will be stale. This -// can happen if USB is connected after a deep sleep. -STATIC bool soft_wakeup = false; - STATIC esp_sleep_wakeup_cause_t _get_wakeup_cause(void) { // First check if the modules remember what last woke up if (alarm_pin_pinalarm_woke_this_cycle()) { @@ -80,11 +75,7 @@ STATIC esp_sleep_wakeup_cause_t _get_wakeup_cause(void) { } // If waking from true deep sleep, modules will have lost their state, // so check the deep wakeup cause manually - if (!soft_wakeup) { - soft_wakeup = true; - return esp_sleep_get_wakeup_cause(); - } - return ESP_SLEEP_WAKEUP_UNDEFINED; + return esp_sleep_get_wakeup_cause(); } bool common_hal_alarm_woken_from_sleep(void) { diff --git a/ports/espressif/common-hal/alarm/pin/PinAlarm.c b/ports/espressif/common-hal/alarm/pin/PinAlarm.c index 754902f678..6318cc2cca 100644 --- a/ports/espressif/common-hal/alarm/pin/PinAlarm.c +++ b/ports/espressif/common-hal/alarm/pin/PinAlarm.c @@ -32,11 +32,11 @@ #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/microcontroller/__init__.h" +#include "esp_sleep.h" #include "hal/gpio_ll.h" #include "esp_debug_helpers.h" #include "components/driver/include/driver/rtc_io.h" -#include "components/esp_system/include/esp_sleep.h" #include "components/freertos/include/freertos/FreeRTOS.h" void common_hal_alarm_pin_pinalarm_construct(alarm_pin_pinalarm_obj_t *self, const mcu_pin_obj_t *pin, bool value, bool edge, bool pull) { diff --git a/ports/espressif/common-hal/analogio/AnalogIn.c b/ports/espressif/common-hal/analogio/AnalogIn.c index df39b30c63..ba85d42735 100644 --- a/ports/espressif/common-hal/analogio/AnalogIn.c +++ b/ports/espressif/common-hal/analogio/AnalogIn.c @@ -40,7 +40,13 @@ #define DEFAULT_VREF 1100 #define NO_OF_SAMPLES 2 #define ATTENUATION ADC_ATTEN_DB_11 +#ifdef CONFIG_IDF_TARGET_ESP32C3 +#define DATA_WIDTH ADC_WIDTH_BIT_12 +#elif defined(CONFIG_IDF_TARGET_ESP32S2) #define DATA_WIDTH ADC_WIDTH_BIT_13 +#elif defined(CONFIG_IDF_TARGET_ESP32S3) +#define DATA_WIDTH ADC_WIDTH_BIT_12 +#endif void common_hal_analogio_analogin_construct(analogio_analogin_obj_t *self, const mcu_pin_obj_t *pin) { diff --git a/ports/espressif/common-hal/analogio/AnalogOut.c b/ports/espressif/common-hal/analogio/AnalogOut.c index 589c477a78..2b5f9d0b35 100644 --- a/ports/espressif/common-hal/analogio/AnalogOut.c +++ b/ports/espressif/common-hal/analogio/AnalogOut.c @@ -35,12 +35,15 @@ #include "shared-bindings/microcontroller/Pin.h" #include "supervisor/shared/translate.h" +#ifdef CONFIG_IDF_TARGET_ESP32S2 #include "components/driver/include/driver/dac_common.h" +#endif #include "common-hal/microcontroller/Pin.h" void common_hal_analogio_analogout_construct(analogio_analogout_obj_t *self, const mcu_pin_obj_t *pin) { + #ifdef CONFIG_IDF_TARGET_ESP32S2 if (pin == &pin_GPIO17) { self->channel = DAC_CHANNEL_1; } else if (pin == &pin_GPIO18) { @@ -49,25 +52,38 @@ void common_hal_analogio_analogout_construct(analogio_analogout_obj_t *self, mp_raise_ValueError(translate("Invalid DAC pin supplied")); } dac_output_enable(self->channel); + #else + mp_raise_NotImplementedError(NULL); + #endif } bool common_hal_analogio_analogout_deinited(analogio_analogout_obj_t *self) { + #ifdef CONFIG_IDF_TARGET_ESP32S2 return self->channel == DAC_CHANNEL_MAX; + #else + return false; + #endif } void common_hal_analogio_analogout_deinit(analogio_analogout_obj_t *self) { + #ifdef CONFIG_IDF_TARGET_ESP32S2 dac_output_disable(self->channel); self->channel = DAC_CHANNEL_MAX; + #endif } void common_hal_analogio_analogout_set_value(analogio_analogout_obj_t *self, uint16_t value) { + #ifdef CONFIG_IDF_TARGET_ESP32S2 uint8_t dac_value = (value * 255) / 65535; dac_output_enable(self->channel); dac_output_voltage(self->channel, dac_value); + #endif } void analogout_reset(void) { + #ifdef CONFIG_IDF_TARGET_ESP32S2 dac_output_disable(DAC_CHANNEL_1); dac_output_disable(DAC_CHANNEL_2); + #endif } diff --git a/ports/espressif/common-hal/busio/SPI.c b/ports/espressif/common-hal/busio/SPI.c index fee533e755..09c29084ac 100644 --- a/ports/espressif/common-hal/busio/SPI.c +++ b/ports/espressif/common-hal/busio/SPI.c @@ -93,7 +93,7 @@ void common_hal_busio_spi_construct(busio_spi_obj_t *self, mp_raise_ValueError(translate("All SPI peripherals are in use")); } - esp_err_t result = spi_bus_initialize(self->host_id, &bus_config, self->host_id /* dma channel */); + esp_err_t result = spi_bus_initialize(self->host_id, &bus_config, SPI_DMA_CH_AUTO); if (result == ESP_ERR_NO_MEM) { mp_raise_msg(&mp_type_MemoryError, translate("ESP-IDF memory allocation failed")); } else if (result == ESP_ERR_INVALID_ARG) { diff --git a/ports/espressif/common-hal/countio/Counter.c b/ports/espressif/common-hal/countio/Counter.c index 418a8ae4d4..d18196051f 100644 --- a/ports/espressif/common-hal/countio/Counter.c +++ b/ports/espressif/common-hal/countio/Counter.c @@ -32,7 +32,7 @@ #include "supervisor/shared/translate.h" void common_hal_countio_counter_construct(countio_counter_obj_t *self, - const mcu_pin_obj_t *pin) { + const mcu_pin_obj_t *pin, countio_edge_t edge, digitalio_pull_t pull) { claim_pin(pin); // Prepare configuration for the PCNT unit @@ -41,9 +41,10 @@ void common_hal_countio_counter_construct(countio_counter_obj_t *self, .pulse_gpio_num = pin->number, .ctrl_gpio_num = PCNT_PIN_NOT_USED, .channel = PCNT_CHANNEL_0, - // What to do on the positive / negative edge of pulse input? - .pos_mode = PCNT_COUNT_INC, // Count up on the positive edge - .neg_mode = PCNT_COUNT_DIS, // Keep the counter value on the negative edge + // What to do on the rising / falling edge of pulse input? + // If EDGE_RISE_AND_FALL, both modeswill do PCNT_COUNT_INC. + .pos_mode = (edge == EDGE_FALL) ? PCNT_COUNT_DIS : PCNT_COUNT_INC, // Count up unless only fall + .neg_mode = (edge == EDGE_RISE) ? PCNT_COUNT_DIS : PCNT_COUNT_INC, // Count up unless only rise }; // Initialize PCNT unit @@ -53,6 +54,15 @@ void common_hal_countio_counter_construct(countio_counter_obj_t *self, } self->pin = pin->number; + + gpio_pullup_dis(pin->number); + gpio_pulldown_dis(pin->number); + if (pull == PULL_UP) { + gpio_pullup_en(pin->number); + } else if (pull == PULL_DOWN) { + gpio_pulldown_en(pin->number); + } + self->unit = (pcnt_unit_t)unit; } @@ -79,7 +89,3 @@ void common_hal_countio_counter_set_count(countio_counter_obj_t *self, self->count = new_count; pcnt_counter_clear(self->unit); } - -void common_hal_countio_counter_reset(countio_counter_obj_t *self) { - common_hal_countio_counter_set_count(self, 0); -} diff --git a/ports/espressif/common-hal/digitalio/DigitalInOut.c b/ports/espressif/common-hal/digitalio/DigitalInOut.c index 24c5d5110d..bf52965d28 100644 --- a/ports/espressif/common-hal/digitalio/DigitalInOut.c +++ b/ports/espressif/common-hal/digitalio/DigitalInOut.c @@ -71,7 +71,7 @@ void common_hal_digitalio_digitalinout_deinit(digitalio_digitalinout_obj_t *self void common_hal_digitalio_digitalinout_switch_to_input( digitalio_digitalinout_obj_t *self, digitalio_pull_t pull) { common_hal_digitalio_digitalinout_set_pull(self, pull); - gpio_set_direction(self->pin->number, GPIO_MODE_DEF_INPUT); + gpio_set_direction(self->pin->number, GPIO_MODE_INPUT); } digitalinout_result_t common_hal_digitalio_digitalinout_switch_to_output( @@ -108,11 +108,9 @@ digitalinout_result_t common_hal_digitalio_digitalinout_set_drive_mode( digitalio_digitalinout_obj_t *self, digitalio_drive_mode_t drive_mode) { gpio_num_t number = self->pin->number; - gpio_mode_t mode; + gpio_mode_t mode = GPIO_MODE_OUTPUT; if (drive_mode == DRIVE_MODE_OPEN_DRAIN) { - mode = GPIO_MODE_DEF_OD; - } else { - mode = GPIO_MODE_DEF_OUTPUT; + mode |= GPIO_MODE_OUTPUT_OD; } esp_err_t result = gpio_set_direction(number, mode); if (result != ESP_OK) { diff --git a/ports/espressif/common-hal/frequencyio/FrequencyIn.c b/ports/espressif/common-hal/frequencyio/FrequencyIn.c index cd13cddc66..e4d65c95bd 100644 --- a/ports/espressif/common-hal/frequencyio/FrequencyIn.c +++ b/ports/espressif/common-hal/frequencyio/FrequencyIn.c @@ -56,11 +56,15 @@ static void IRAM_ATTR timer_interrupt_handler(void *self_in) { // reset interrupt timg_dev_t *device = self->timer.group ? &(TIMERG1) : &(TIMERG0); if (self->timer.idx) { - device->int_clr.t1 = 1; + device->int_clr_timers.t1_int_clr = 1; } else { - device->int_clr.t0 = 1; + device->int_clr_timers.t0_int_clr = 1; } - device->hw_timer[self->timer.idx].config.alarm_en = 1; + #ifdef CONFIG_IDF_TARGET_ESP32S2 + device->hw_timer[self->timer.idx].config.tx_alarm_en = 1; + #elif defined(CONFIG_IDF_TARGET_ESP32S3) + device->hw_timer[self->timer.idx].config.tn_alarm_en = 1; + #endif } static void init_pcnt(frequencyio_frequencyin_obj_t *self) { diff --git a/ports/espressif/common-hal/microcontroller/Pin.c b/ports/espressif/common-hal/microcontroller/Pin.c index 462fef3ca1..1683ea6acc 100644 --- a/ports/espressif/common-hal/microcontroller/Pin.c +++ b/ports/espressif/common-hal/microcontroller/Pin.c @@ -36,20 +36,6 @@ STATIC uint32_t never_reset_pins[2]; STATIC uint32_t in_use[2]; -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. - gpio_config_t cfg = { - .pin_bit_mask = BIT64(pin_number), - .mode = GPIO_MODE_DISABLE, - .pull_up_en = false, - .pull_down_en = false, - .intr_type = GPIO_INTR_DISABLE, - }; - gpio_config(&cfg); - PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[pin_number], 0); -} - void never_reset_pin_number(gpio_num_t pin_number) { if (pin_number == NO_PIN) { return; @@ -64,6 +50,43 @@ void common_hal_never_reset_pin(const mcu_pin_obj_t *pin) { never_reset_pin_number(pin->number); } +STATIC void _reset_pin(gpio_num_t pin_number) { + #if defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) + // Never ever reset pins used for flash and RAM. + if (26 <= pin_number && pin_number <= 32) { + return; + } + #ifdef CONFIG_SPIRAM_MODE_OCT + // Octal DQ4-DQ7 and DQS/DM + if (33 <= pin_number && pin_number <= 37) { + return; + } + #endif + + #if CIRCUITPY_USB + // Never reset USB pins. + if (pin_number == 19 || pin_number == 20) { + return; + } + #endif + #elif defined(CONFIG_IDF_TARGET_ESP32C3) + // Never ever reset pins used for flash and RAM. + if (11 <= pin_number && pin_number <= 17) { + return; + } + #endif + + gpio_reset_pin(pin_number); + + #ifdef DOUBLE_TAP_PIN + // Pull the double tap pin down so that resets come back to CircuitPython. + if (pin_number == DOUBLE_TAP_PIN->number) { + gpio_pullup_dis(pin_number); + gpio_pulldown_en(pin_number); + } + #endif +} + // Mark pin as free and return it to a quiescent state. void reset_pin_number(gpio_num_t pin_number) { if (pin_number == NO_PIN) { @@ -72,7 +95,7 @@ void reset_pin_number(gpio_num_t pin_number) { never_reset_pins[pin_number / 32] &= ~(1 << pin_number % 32); in_use[pin_number / 32] &= ~(1 << pin_number % 32); - floating_gpio_reset(pin_number); + _reset_pin(pin_number); } void common_hal_mcu_pin_reset_number(uint8_t i) { @@ -93,10 +116,10 @@ void reset_all_pins(void) { (never_reset_pins[i / 32] & (1 << i % 32)) != 0) { continue; } - floating_gpio_reset(i); + _reset_pin(i); } - in_use[0] = 0; - in_use[1] = 0; + in_use[0] = never_reset_pins[0]; + in_use[1] = never_reset_pins[1]; } void claim_pin_number(gpio_num_t pin_number) { diff --git a/ports/espressif/common-hal/microcontroller/Processor.c b/ports/espressif/common-hal/microcontroller/Processor.c index c50c6fbf7a..500d1f6d3e 100644 --- a/ports/espressif/common-hal/microcontroller/Processor.c +++ b/ports/espressif/common-hal/microcontroller/Processor.c @@ -43,11 +43,15 @@ float common_hal_mcu_processor_get_temperature(void) { float tsens_out; + #ifdef CONFIG_IDF_TARGET_ESP32S3 + mp_raise_NotImplementedError(NULL); + #else temp_sensor_config_t temp_sensor = TSENS_CONFIG_DEFAULT(); // DEFAULT: range:-10℃ ~ 80℃, error < 1℃. temp_sensor_set_config(temp_sensor); temp_sensor_start(); temp_sensor_read_celsius(&tsens_out); temp_sensor_stop(); + #endif return tsens_out; } diff --git a/ports/espressif/common-hal/microcontroller/__init__.c b/ports/espressif/common-hal/microcontroller/__init__.c index 909ce19b00..3cf41ba7f0 100644 --- a/ports/espressif/common-hal/microcontroller/__init__.c +++ b/ports/espressif/common-hal/microcontroller/__init__.c @@ -47,13 +47,16 @@ #ifdef CONFIG_IDF_TARGET_ESP32C3 #include "esp32c3/rom/rtc.h" -#elif CONFIG_IDF_TARGET_ESP32S2 +#elif defined(CONFIG_IDF_TARGET_ESP32S2) #include "esp32s2/rom/rtc.h" #include "esp32s2/rom/usb/usb_persist.h" #include "esp32s2/rom/usb/chip_usb_dw_wrapper.h" +#elif defined(CONFIG_IDF_TARGET_ESP32S3) +#include "esp32s3/rom/rtc.h" +#include "esp32s3/rom/usb/usb_persist.h" +#include "esp32s3/rom/usb/chip_usb_dw_wrapper.h" #endif - void common_hal_mcu_delay_us(uint32_t delay) { mp_hal_delay_us(delay); } diff --git a/ports/espressif/common-hal/neopixel_write/__init__.c b/ports/espressif/common-hal/neopixel_write/__init__.c index b63390f155..a5040725e7 100644 --- a/ports/espressif/common-hal/neopixel_write/__init__.c +++ b/ports/espressif/common-hal/neopixel_write/__init__.c @@ -43,20 +43,23 @@ #include "py/mphal.h" #include "py/runtime.h" #include "shared-bindings/neopixel_write/__init__.h" +#include "supervisor/port.h" #include "components/driver/include/driver/rmt.h" #include "peripherals/rmt.h" -#define WS2812_T0H_NS (350) -#define WS2812_T0L_NS (1000) -#define WS2812_T1H_NS (1000) -#define WS2812_T1L_NS (350) -#define WS2812_RESET_US (280) +// 416 ns is 1/3 of the 1250ns period of a 800khz signal. +#define WS2812_T0H_NS (416) +#define WS2812_T0L_NS (416 * 2) +#define WS2812_T1H_NS (416 * 2) +#define WS2812_T1L_NS (416) static uint32_t ws2812_t0h_ticks = 0; static uint32_t ws2812_t1h_ticks = 0; static uint32_t ws2812_t0l_ticks = 0; static uint32_t ws2812_t1l_ticks = 0; +static uint64_t next_start_raw_ticks = 0; + static void IRAM_ATTR ws2812_rmt_adapter(const void *src, rmt_item32_t *dest, size_t src_size, size_t wanted_num, size_t *translated_size, size_t *item_num) { if (src == NULL || dest == NULL) { @@ -107,21 +110,29 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, if (rmt_get_counter_clock(config.channel, &counter_clk_hz) != ESP_OK) { mp_raise_RuntimeError(translate("Could not retrieve clock")); } - float ratio = (float)counter_clk_hz / 1e9; - ws2812_t0h_ticks = (uint32_t)(ratio * WS2812_T0H_NS); - ws2812_t0l_ticks = (uint32_t)(ratio * WS2812_T0L_NS); - ws2812_t1h_ticks = (uint32_t)(ratio * WS2812_T1H_NS); - ws2812_t1l_ticks = (uint32_t)(ratio * WS2812_T1L_NS); + size_t ns_per_tick = 1e9 / counter_clk_hz; + ws2812_t0h_ticks = WS2812_T0H_NS / ns_per_tick; + ws2812_t0l_ticks = WS2812_T0L_NS / ns_per_tick; + ws2812_t1h_ticks = WS2812_T1H_NS / ns_per_tick; + ws2812_t1l_ticks = WS2812_T1L_NS / ns_per_tick; // Initialize automatic timing translator rmt_translator_init(config.channel, ws2812_rmt_adapter); + // Wait to make sure we don't append onto the last transmission. This should only be a tick or + // two. + while (port_get_raw_ticks(NULL) < next_start_raw_ticks) { + } + // Write and wait to finish if (rmt_write_sample(config.channel, pixels, (size_t)numBytes, true) != ESP_OK) { mp_raise_RuntimeError(translate("Input/output error")); } rmt_wait_tx_done(config.channel, pdMS_TO_TICKS(100)); + // Update the next start to +2 ticks. It ensures that we've gone 300+ us. + next_start_raw_ticks = port_get_raw_ticks(NULL) + 2; + // Free channel again peripherals_free_rmt(config.channel); // Swap pin back to GPIO mode diff --git a/ports/espressif/common-hal/pwmio/PWMOut.c b/ports/espressif/common-hal/pwmio/PWMOut.c index 71cf5c19d0..9ca39c223b 100644 --- a/ports/espressif/common-hal/pwmio/PWMOut.c +++ b/ports/espressif/common-hal/pwmio/PWMOut.c @@ -32,10 +32,9 @@ #define INDEX_EMPTY 0xFF -STATIC bool not_first_reset = false; STATIC uint32_t reserved_timer_freq[LEDC_TIMER_MAX]; STATIC bool varfreq_timers[LEDC_TIMER_MAX]; -STATIC uint8_t reserved_channels[LEDC_CHANNEL_MAX]; +STATIC uint8_t reserved_channels[LEDC_CHANNEL_MAX] = { [0 ... LEDC_CHANNEL_MAX - 1] = INDEX_EMPTY}; STATIC bool never_reset_tim[LEDC_TIMER_MAX]; STATIC bool never_reset_chan[LEDC_CHANNEL_MAX]; @@ -56,7 +55,7 @@ STATIC uint32_t calculate_duty_cycle(uint32_t frequency) { void pwmout_reset(void) { for (size_t i = 0; i < LEDC_CHANNEL_MAX; i++) { - if (reserved_channels[i] != INDEX_EMPTY && not_first_reset) { + if (reserved_channels[i] != INDEX_EMPTY) { ledc_stop(LEDC_LOW_SPEED_MODE, i, 0); } if (!never_reset_chan[i]) { @@ -72,7 +71,6 @@ void pwmout_reset(void) { varfreq_timers[i] = false; } } - not_first_reset = true; } pwmout_result_t common_hal_pwmio_pwmout_construct(pwmio_pwmout_obj_t *self, diff --git a/ports/espressif/common-hal/ssl/SSLContext.c b/ports/espressif/common-hal/ssl/SSLContext.c index a94c1df1eb..866024bf00 100644 --- a/ports/espressif/common-hal/ssl/SSLContext.c +++ b/ports/espressif/common-hal/ssl/SSLContext.c @@ -29,6 +29,8 @@ #include "bindings/espidf/__init__.h" +#include "components/mbedtls/esp_crt_bundle/include/esp_crt_bundle.h" + #include "py/runtime.h" void common_hal_ssl_sslcontext_construct(ssl_sslcontext_obj_t *self) { @@ -47,6 +49,11 @@ ssl_sslsocket_obj_t *common_hal_ssl_sslcontext_wrap_socket(ssl_sslcontext_obj_t sock->ssl_context = self; sock->sock = socket; + // Create a copy of the ESP-TLS config object and store the server hostname + // Note that ESP-TLS will use common_name for both SNI and verification + memcpy(&sock->ssl_config, &self->ssl_config, sizeof(self->ssl_config)); + sock->ssl_config.common_name = server_hostname; + esp_tls_t *tls_handle = esp_tls_init(); if (tls_handle == NULL) { mp_raise_espidf_MemoryError(); @@ -55,6 +62,28 @@ ssl_sslsocket_obj_t *common_hal_ssl_sslcontext_wrap_socket(ssl_sslcontext_obj_t // TODO: do something with the original socket? Don't call a close on the internal LWIP. - // Should we store server hostname on the socket in case connect is called with an ip? return sock; } + +void common_hal_ssl_sslcontext_load_verify_locations(ssl_sslcontext_obj_t *self, + const char *cadata) { + self->ssl_config.crt_bundle_attach = NULL; + self->ssl_config.use_global_ca_store = false; + self->ssl_config.cacert_buf = (const unsigned char *)cadata; + self->ssl_config.cacert_bytes = strlen(cadata) + 1; +} + +void common_hal_ssl_sslcontext_set_default_verify_paths(ssl_sslcontext_obj_t *self) { + self->ssl_config.crt_bundle_attach = esp_crt_bundle_attach; + self->ssl_config.use_global_ca_store = true; + self->ssl_config.cacert_buf = NULL; + self->ssl_config.cacert_bytes = 0; +} + +bool common_hal_ssl_sslcontext_get_check_hostname(ssl_sslcontext_obj_t *self) { + return !self->ssl_config.skip_common_name; +} + +void common_hal_ssl_sslcontext_set_check_hostname(ssl_sslcontext_obj_t *self, bool value) { + self->ssl_config.skip_common_name = !value; +} diff --git a/ports/espressif/common-hal/ssl/SSLSocket.c b/ports/espressif/common-hal/ssl/SSLSocket.c index f9e13029cc..281e356d77 100644 --- a/ports/espressif/common-hal/ssl/SSLSocket.c +++ b/ports/espressif/common-hal/ssl/SSLSocket.c @@ -55,9 +55,7 @@ void common_hal_ssl_sslsocket_close(ssl_sslsocket_obj_t *self) { void common_hal_ssl_sslsocket_connect(ssl_sslsocket_obj_t *self, const char *host, size_t hostlen, uint32_t port) { - esp_tls_cfg_t *tls_config = NULL; - tls_config = &self->ssl_context->ssl_config; - int result = esp_tls_conn_new_sync(host, hostlen, port, tls_config, self->tls); + int result = esp_tls_conn_new_sync(host, hostlen, port, &self->ssl_config, self->tls); self->sock->connected = result >= 0; if (result < 0) { int esp_tls_code; @@ -66,7 +64,7 @@ void common_hal_ssl_sslsocket_connect(ssl_sslsocket_obj_t *self, if (err == ESP_ERR_MBEDTLS_SSL_SETUP_FAILED) { mp_raise_espidf_MemoryError(); - } else if (ESP_ERR_MBEDTLS_SSL_HANDSHAKE_FAILED) { + } else if (err == ESP_ERR_MBEDTLS_SSL_HANDSHAKE_FAILED) { mp_raise_OSError_msg_varg(translate("Failed SSL handshake")); } else { mp_raise_OSError_msg_varg(translate("Unhandled ESP TLS error %d %d %x %d"), esp_tls_code, flags, err, result); diff --git a/ports/espressif/common-hal/ssl/SSLSocket.h b/ports/espressif/common-hal/ssl/SSLSocket.h index dd1dcda4ac..097f19857b 100644 --- a/ports/espressif/common-hal/ssl/SSLSocket.h +++ b/ports/espressif/common-hal/ssl/SSLSocket.h @@ -39,6 +39,7 @@ typedef struct { socketpool_socket_obj_t *sock; esp_tls_t *tls; ssl_sslcontext_obj_t *ssl_context; + esp_tls_cfg_t ssl_config; } ssl_sslsocket_obj_t; #endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_SSL_SSLSOCKET_H diff --git a/ports/espressif/esp-idf b/ports/espressif/esp-idf index e493a4c30e..6db2ebd789 160000 --- a/ports/espressif/esp-idf +++ b/ports/espressif/esp-idf @@ -1 +1 @@ -Subproject commit e493a4c30e1b2f7c54a376327388b9e12262cbbf +Subproject commit 6db2ebd7897be544ad0f169871db4b13b4c0941e diff --git a/ports/espressif/esp-idf-config/sdkconfig-16MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-16MB.defaults index 2299feccd8..fac8ba1cad 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-16MB.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-16MB.defaults @@ -1,9 +1,18 @@ -# No newlines in this file so they are preserved in the board sdkconfig. +# +# Serial flasher config +# # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set CONFIG_ESPTOOLPY_FLASHSIZE_16MB=y CONFIG_ESPTOOLPY_FLASHSIZE="16MB" +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +# end of Serial flasher config + CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-16MB.csv" -CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-16MB.csv" \ No newline at end of file +# +# Partition Table +# +CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-16MB.csv" +# end of Partition Table diff --git a/ports/espressif/esp-idf-config/sdkconfig-4MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-4MB.defaults index 4da90d1bcd..69f15ebe7b 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-4MB.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-4MB.defaults @@ -1,9 +1,18 @@ -# No newlines in this file so they are preserved in the board sdkconfig. +# +# Serial flasher config +# # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_8MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="4MB" +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +# end of Serial flasher config + CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-4MB.csv" -CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-4MB.csv" \ No newline at end of file +# +# Partition Table +# +CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-4MB.csv" +# end of Partition Table diff --git a/ports/espressif/esp-idf-config/sdkconfig-8MB.defaults b/ports/espressif/esp-idf-config/sdkconfig-8MB.defaults index af681c5ea8..b1506206df 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-8MB.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-8MB.defaults @@ -1,9 +1,18 @@ -# No newlines in this file so they are preserved in the board sdkconfig. +# +# Serial flasher config +# # CONFIG_ESPTOOLPY_FLASHSIZE_1MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_2MB is not set # CONFIG_ESPTOOLPY_FLASHSIZE_4MB is not set CONFIG_ESPTOOLPY_FLASHSIZE_8MB=y # CONFIG_ESPTOOLPY_FLASHSIZE_16MB is not set CONFIG_ESPTOOLPY_FLASHSIZE="8MB" +CONFIG_ESPTOOLPY_FLASHSIZE_DETECT=y +# end of Serial flasher config + CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="esp-idf-config/partitions-8MB.csv" -CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-8MB.csv" \ No newline at end of file +# +# Partition Table +# +CONFIG_PARTITION_TABLE_FILENAME="esp-idf-config/partitions-8MB.csv" +# end of Partition Table diff --git a/ports/espressif/esp-idf-config/sdkconfig-debug.defaults b/ports/espressif/esp-idf-config/sdkconfig-debug.defaults index b108532aa2..9d02c62445 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-debug.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-debug.defaults @@ -1,16 +1,78 @@ -# No newlines in this file so they are preserved in the board sdkconfig. +# +# Bootloader config +# +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set +# end of Bootloader config + +# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set +# +# Compiler options +# +CONFIG_COMPILER_OPTIMIZATION_SIZE=y +# CONFIG_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_COMPILER_OPTIMIZATION_NONE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT is not set +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=2 +# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set +# end of Compiler options + CONFIG_ESP_ERR_TO_NAME_LOOKUP=y +# +# ESP System Settings +# +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 +# end of ESP System Settings + CONFIG_ESP_CONSOLE_UART_DEFAULT=y # CONFIG_ESP_CONSOLE_USB_CDC is not set # CONFIG_ESP_CONSOLE_UART_CUSTOM is not set # CONFIG_ESP_CONSOLE_NONE is not set CONFIG_ESP_CONSOLE_UART=y +CONFIG_ESP_CONSOLE_MULTIPLE_UART=y CONFIG_ESP_CONSOLE_UART_NUM=0 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 -CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG=y -CONFIG_COMPILER_OPTIMIZATION_DEFAULT=y -CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE=y \ No newline at end of file +# +# FreeRTOS +# +CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y +CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y +# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set +# CONFIG_FREERTOS_ASSERT_DISABLE is not set +CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER=y +CONFIG_FREERTOS_DEBUG_OCDAWARE=y +# end of FreeRTOS + +CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y +# +# Hardware Abstraction Layer (HAL) and Low Level (LL) +# +# CONFIG_HAL_ASSERTION_DISABLE is not set +# CONFIG_HAL_ASSERTION_SILIENT is not set +# CONFIG_HAL_ASSERTION_ENABLE is not set +CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=2 +# end of Hardware Abstraction Layer (HAL) and Low Level (LL) + +CONFIG_LWIP_ESP_LWIP_ASSERT=y +# +# Deprecated options for backward compatibility +# +CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG=y +# CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE is not set +CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED=y +# CONFIG_OPTIMIZATION_ASSERTIONS_SILENT is not set +# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set +CONFIG_OPTIMIZATION_ASSERTION_LEVEL=2 +CONFIG_CONSOLE_UART_DEFAULT=y +# CONFIG_CONSOLE_UART_CUSTOM is not set +# CONFIG_ESP_CONSOLE_UART_NONE is not set +CONFIG_CONSOLE_UART_NUM=0 +CONFIG_CONSOLE_UART_BAUDRATE=115200 +# end of Deprecated options for backward compatibility diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults new file mode 100644 index 0000000000..a39afeb505 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32c3.defaults @@ -0,0 +1,139 @@ +# +# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# +CONFIG_IDF_TARGET_ARCH_RISCV=y +CONFIG_IDF_TARGET="esp32c3" +CONFIG_IDF_TARGET_ESP32C3=y +CONFIG_IDF_FIRMWARE_CHIP_ID=0x0005 +# end of Espressif IoT Development Framework (ESP-IDF) Project Configuration + +CONFIG_SDK_TOOLPREFIX="riscv32-esp-elf-" +# +# Bootloader config +# +CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x0 +# end of Bootloader config + +# CONFIG_ESP32C3_DEFAULT_CPU_FREQ_80 is not set +# +# ESP32C3-Specific +# +CONFIG_ESP32C3_DEFAULT_CPU_FREQ_160=y +CONFIG_ESP32C3_DEFAULT_CPU_FREQ_MHZ=160 +# CONFIG_ESP32C3_REV_MIN_0 is not set +# CONFIG_ESP32C3_REV_MIN_1 is not set +# CONFIG_ESP32C3_REV_MIN_2 is not set +CONFIG_ESP32C3_REV_MIN_3=y +CONFIG_ESP32C3_REV_MIN=3 +CONFIG_ESP32C3_DEBUG_OCDAWARE=y +# CONFIG_ESP32C3_DEBUG_STUBS_ENABLE is not set +CONFIG_ESP32C3_BROWNOUT_DET=y +CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_7=y +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_6 is not set +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_5 is not set +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_4 is not set +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_3 is not set +# CONFIG_ESP32C3_BROWNOUT_DET_LVL_SEL_2 is not set +CONFIG_ESP32C3_BROWNOUT_DET_LVL=7 +CONFIG_ESP32C3_TIME_SYSCALL_USE_RTC_SYSTIMER=y +# CONFIG_ESP32C3_TIME_SYSCALL_USE_RTC is not set +# CONFIG_ESP32C3_TIME_SYSCALL_USE_SYSTIMER is not set +# CONFIG_ESP32C3_TIME_SYSCALL_USE_NONE is not set +CONFIG_ESP32C3_RTC_CLK_SRC_INT_RC=y +# CONFIG_ESP32C3_RTC_CLK_SRC_EXT_CRYS is not set +# CONFIG_ESP32C3_RTC_CLK_SRC_EXT_OSC is not set +# CONFIG_ESP32C3_RTC_CLK_SRC_INT_8MD256 is not set +CONFIG_ESP32C3_RTC_CLK_CAL_CYCLES=1024 +# CONFIG_ESP32C3_NO_BLOBS is not set +# end of ESP32C3-Specific + +# CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES_TWO is not set +# +# MAC Config +# +CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES_FOUR=y +CONFIG_ESP32C3_UNIVERSAL_MAC_ADDRESSES=4 +# end of MAC Config + +CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y +# +# Sleep Config +# +CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND=y +# end of Sleep Config + +CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE=y +# +# Memory protection +# +CONFIG_ESP_SYSTEM_MEMPROT_DEPCHECK=y +CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=y +CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=y +CONFIG_ESP_SYSTEM_MEMPROT_CPU_PREFETCH_PAD_SIZE=16 +CONFIG_ESP_SYSTEM_MEMPROT_MEM_ALIGN_SIZE=512 +# end of Memory protection + +CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y +# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 +# +# Wi-Fi +# +CONFIG_ESP32_WIFI_ENABLED=y +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 +# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y +CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 +# CONFIG_ESP32_WIFI_CSI_ENABLED is not set +CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y +CONFIG_ESP32_WIFI_TX_BA_WIN=6 +CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y +CONFIG_ESP32_WIFI_RX_BA_WIN=6 +# CONFIG_ESP32_WIFI_NVS_ENABLED is not set +CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 +CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 +CONFIG_ESP32_WIFI_IRAM_OPT=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT=y +# CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE is not set +# CONFIG_ESP_WIFI_EXTERNAL_COEXIST_ENABLE is not set +# end of Wi-Fi + +CONFIG_FREERTOS_UNICORE=y +# +# FreeRTOS +# +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +# end of FreeRTOS + +CONFIG_TOOLPREFIX="riscv32-esp-elf-" +# +# Deprecated options for backward compatibility +# +# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set +CONFIG_ESP32_APPTRACE_DEST_NONE=y +CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y +CONFIG_ESP_SYSTEM_PD_FLASH=y +CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND=y +CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y +# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP32_PHY_MAX_TX_POWER=20 +# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set +# CONFIG_ESP32S2_PANIC_PRINT_REBOOT is not set +CONFIG_ESP32S2_PANIC_SILENT_REBOOT=y +# CONFIG_ESP32S2_PANIC_GDBSTUB is not set +CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y +CONFIG_ESP32H2_MEMPROT_FEATURE=y +CONFIG_ESP32H2_MEMPROT_FEATURE_LOCK=y +# CONFIG_EXTERNAL_COEX_ENABLE is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set +CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_ESP32_PTHREAD_STACK_MIN=768 +CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" +# end of Deprecated options for backward compatibility diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults new file mode 100644 index 0000000000..ac3e909dfc --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s2.defaults @@ -0,0 +1,166 @@ +# +# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# +CONFIG_IDF_TARGET_ARCH_XTENSA=y +CONFIG_IDF_TARGET="esp32s2" +CONFIG_IDF_TARGET_ESP32S2=y +CONFIG_IDF_FIRMWARE_CHIP_ID=0x0002 +# end of Espressif IoT Development Framework (ESP-IDF) Project Configuration + +CONFIG_SDK_TOOLPREFIX="xtensa-esp32s2-elf-" +# +# Bootloader config +# +CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x1000 +# end of Bootloader config + +# CONFIG_ESP32S2_DEFAULT_CPU_FREQ_80 is not set +# +# ESP32S2-specific +# +# CONFIG_ESP32S2_DEFAULT_CPU_FREQ_160 is not set +CONFIG_ESP32S2_DEFAULT_CPU_FREQ_240=y +CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ=240 +# end of ESP32S2-specific + +# CONFIG_ESP32S2_INSTRUCTION_CACHE_8KB is not set +# +# Cache config +# +CONFIG_ESP32S2_INSTRUCTION_CACHE_16KB=y +# CONFIG_ESP32S2_INSTRUCTION_CACHE_LINE_16B is not set +CONFIG_ESP32S2_INSTRUCTION_CACHE_LINE_32B=y +# CONFIG_ESP32S2_DATA_CACHE_0KB is not set +# CONFIG_ESP32S2_DATA_CACHE_8KB is not set +CONFIG_ESP32S2_DATA_CACHE_16KB=y +# CONFIG_ESP32S2_DATA_CACHE_LINE_16B is not set +CONFIG_ESP32S2_DATA_CACHE_LINE_32B=y +# CONFIG_ESP32S2_INSTRUCTION_CACHE_WRAP is not set +# CONFIG_ESP32S2_DATA_CACHE_WRAP is not set +# end of Cache config + +# CONFIG_ESP32S2_TRAX is not set +CONFIG_ESP32S2_TRACEMEM_RESERVE_DRAM=0x0 +# CONFIG_ESP32S2_ULP_COPROC_ENABLED is not set +CONFIG_ESP32S2_ULP_COPROC_RESERVE_MEM=0 +CONFIG_ESP32S2_DEBUG_OCDAWARE=y +# CONFIG_ESP32S2_DEBUG_STUBS_ENABLE is not set +CONFIG_ESP32S2_BROWNOUT_DET=y +CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_7=y +# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_6 is not set +# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_5 is not set +# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_4 is not set +# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_3 is not set +# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_2 is not set +# CONFIG_ESP32S2_BROWNOUT_DET_LVL_SEL_1 is not set +CONFIG_ESP32S2_BROWNOUT_DET_LVL=7 +CONFIG_ESP32S2_TIME_SYSCALL_USE_RTC_FRC1=y +# CONFIG_ESP32S2_TIME_SYSCALL_USE_RTC is not set +# CONFIG_ESP32S2_TIME_SYSCALL_USE_FRC1 is not set +# CONFIG_ESP32S2_TIME_SYSCALL_USE_NONE is not set +CONFIG_ESP32S2_RTC_CLK_SRC_INT_RC=y +# CONFIG_ESP32S2_RTC_CLK_SRC_EXT_CRYS is not set +# CONFIG_ESP32S2_RTC_CLK_SRC_EXT_OSC is not set +# CONFIG_ESP32S2_RTC_CLK_SRC_INT_8MD256 is not set +CONFIG_ESP32S2_RTC_CLK_CAL_CYCLES=576 +# CONFIG_ESP32S2_NO_BLOBS is not set +# CONFIG_ESP32S2_KEEP_USB_ALIVE is not set +# CONFIG_ESP32S2_RTCDATA_IN_FAST_MEM is not set +# CONFIG_ESP32S2_USE_FIXED_STATIC_RAM_SIZE is not set +# +# MAC Config +# +# CONFIG_ESP32S2_UNIVERSAL_MAC_ADDRESSES_ONE is not set +CONFIG_ESP32S2_UNIVERSAL_MAC_ADDRESSES_TWO=y +CONFIG_ESP32S2_UNIVERSAL_MAC_ADDRESSES=2 +# end of MAC Config + +CONFIG_ESP_SLEEP_POWER_DOWN_FLASH=y +# +# Sleep Config +# +# CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND is not set +# end of Sleep Config + +# +# PHY +# +# CONFIG_ESP_PHY_ENABLE_USB is not set +# end of PHY + +CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE=y +# +# Memory protection +# +CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=y +CONFIG_ESP_SYSTEM_MEMPROT_FEATURE_LOCK=y +CONFIG_ESP_SYSTEM_MEMPROT_CPU_PREFETCH_PAD_SIZE=16 +CONFIG_ESP_SYSTEM_MEMPROT_MEM_ALIGN_SIZE=4 +# end of Memory protection + +CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0=y +# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_ESP_MAIN_TASK_AFFINITY=0x0 +# +# Wi-Fi +# +CONFIG_ESP32_WIFI_ENABLED=y +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 +# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y +CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 +CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 +# CONFIG_ESP32_WIFI_CSI_ENABLED is not set +CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y +CONFIG_ESP32_WIFI_TX_BA_WIN=6 +CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y +CONFIG_ESP32_WIFI_RX_BA_WIN=6 +# CONFIG_ESP32_WIFI_NVS_ENABLED is not set +CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 +CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 +CONFIG_ESP32_WIFI_IRAM_OPT=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT=y +# CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE is not set +# CONFIG_ESP_WIFI_EXTERNAL_COEXIST_ENABLE is not set +# end of Wi-Fi + +CONFIG_FREERTOS_UNICORE=y +# +# FreeRTOS +# +CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER=y +CONFIG_FREERTOS_CORETIMER_0=y +# CONFIG_FREERTOS_CORETIMER_1 is not set +CONFIG_FREERTOS_SYSTICK_USES_CCOUNT=y +CONFIG_FREERTOS_OPTIMIZED_SCHEDULER=y +# end of FreeRTOS + +CONFIG_MBEDTLS_HARDWARE_GCM=y +# +# Deprecated options for backward compatibility +# +CONFIG_TOOLPREFIX="xtensa-esp32s2-elf-" +# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set +CONFIG_ESP32_APPTRACE_DEST_NONE=y +CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y +CONFIG_ESP_SYSTEM_PD_FLASH=y +# CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND is not set +CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y +# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP32_PHY_MAX_TX_POWER=20 +CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y +CONFIG_ESP32H2_MEMPROT_FEATURE=y +CONFIG_ESP32H2_MEMPROT_FEATURE_LOCK=y +# CONFIG_EXTERNAL_COEX_ENABLE is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set +CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_ESP32_PTHREAD_STACK_MIN=768 +CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" +# end of Deprecated options for backward compatibility diff --git a/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults new file mode 100644 index 0000000000..e655f4ceb1 --- /dev/null +++ b/ports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults @@ -0,0 +1,147 @@ +# +# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# +CONFIG_IDF_TARGET_ARCH_XTENSA=y +CONFIG_IDF_TARGET="esp32s3" +CONFIG_IDF_TARGET_ESP32S3=y +CONFIG_IDF_FIRMWARE_CHIP_ID=0x0009 +# end of Espressif IoT Development Framework (ESP-IDF) Project Configuration + +CONFIG_SDK_TOOLPREFIX="xtensa-esp32s3-elf-" +# +# Bootloader config +# +CONFIG_BOOTLOADER_OFFSET_IN_FLASH=0x0 +# end of Bootloader config + +# CONFIG_ESP32S3_DEFAULT_CPU_FREQ_80 is not set +# +# ESP32S3-Specific +# +# CONFIG_ESP32S3_DEFAULT_CPU_FREQ_160 is not set +CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240=y +CONFIG_ESP32S3_DEFAULT_CPU_FREQ_MHZ=240 +# end of ESP32S3-Specific + +CONFIG_ESP32S3_INSTRUCTION_CACHE_16KB=y +# +# Cache config +# +# CONFIG_ESP32S3_INSTRUCTION_CACHE_32KB is not set +CONFIG_ESP32S3_INSTRUCTION_CACHE_SIZE=0x4000 +# CONFIG_ESP32S3_INSTRUCTION_CACHE_4WAYS is not set +CONFIG_ESP32S3_INSTRUCTION_CACHE_8WAYS=y +CONFIG_ESP32S3_ICACHE_ASSOCIATED_WAYS=8 +# CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_16B is not set +CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_32B=y +CONFIG_ESP32S3_INSTRUCTION_CACHE_LINE_SIZE=32 +# CONFIG_ESP32S3_INSTRUCTION_CACHE_WRAP is not set +# CONFIG_ESP32S3_DATA_CACHE_16KB is not set +CONFIG_ESP32S3_DATA_CACHE_32KB=y +# CONFIG_ESP32S3_DATA_CACHE_64KB is not set +CONFIG_ESP32S3_DATA_CACHE_SIZE=0x8000 +# CONFIG_ESP32S3_DATA_CACHE_4WAYS is not set +CONFIG_ESP32S3_DATA_CACHE_8WAYS=y +CONFIG_ESP32S3_DCACHE_ASSOCIATED_WAYS=8 +# CONFIG_ESP32S3_DATA_CACHE_LINE_16B is not set +CONFIG_ESP32S3_DATA_CACHE_LINE_32B=y +# CONFIG_ESP32S3_DATA_CACHE_LINE_64B is not set +CONFIG_ESP32S3_DATA_CACHE_LINE_SIZE=32 +# CONFIG_ESP32S3_DATA_CACHE_WRAP is not set +# end of Cache config + +# CONFIG_ESP32S3_TRAX is not set +CONFIG_ESP32S3_TRACEMEM_RESERVE_DRAM=0x0 +# CONFIG_ESP32S3_ULP_COPROC_ENABLED is not set +CONFIG_ESP32S3_ULP_COPROC_RESERVE_MEM=0 +# CONFIG_ESP32S3_DEBUG_STUBS_ENABLE is not set +CONFIG_ESP32S3_BROWNOUT_DET=y +CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_7=y +# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_6 is not set +# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_5 is not set +# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_4 is not set +# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_3 is not set +# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_2 is not set +# CONFIG_ESP32S3_BROWNOUT_DET_LVL_SEL_1 is not set +CONFIG_ESP32S3_BROWNOUT_DET_LVL=7 +CONFIG_ESP32S3_TIME_SYSCALL_USE_RTC_FRC1=y +# CONFIG_ESP32S3_TIME_SYSCALL_USE_RTC is not set +# CONFIG_ESP32S3_TIME_SYSCALL_USE_FRC1 is not set +# CONFIG_ESP32S3_TIME_SYSCALL_USE_NONE is not set +CONFIG_ESP32S3_RTC_CLK_SRC_INT_RC=y +# CONFIG_ESP32S3_RTC_CLK_SRC_EXT_CRYS is not set +# CONFIG_ESP32S3_RTC_CLK_SRC_EXT_OSC is not set +# CONFIG_ESP32S3_RTC_CLK_SRC_INT_8MD256 is not set +CONFIG_ESP32S3_RTC_CLK_CAL_CYCLES=1024 +CONFIG_ESP32S3_DEEP_SLEEP_WAKEUP_DELAY=2000 +# CONFIG_ESP32S3_NO_BLOBS is not set +# CONFIG_ESP32S3_RTCDATA_IN_FAST_MEM is not set +# CONFIG_ESP32S3_USE_FIXED_STATIC_RAM_SIZE is not set +# +# MAC Config +# +# CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_TWO is not set +CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES_FOUR=y +CONFIG_ESP32S3_UNIVERSAL_MAC_ADDRESSES=4 +# end of MAC Config + +CONFIG_ESP_SLEEP_GPIO_RESET_WORKAROUND=y + +CONFIG_ESP_PHY_ENABLE_USB=y +# CONFIG_ESP_MAIN_TASK_AFFINITY_CPU0 is not set +CONFIG_ESP_MAIN_TASK_AFFINITY_CPU1=y +# CONFIG_ESP_MAIN_TASK_AFFINITY_NO_AFFINITY is not set +CONFIG_ESP_MAIN_TASK_AFFINITY=0x1 +# +# Wi-Fi +# +CONFIG_ESP32_WIFI_ENABLED=y +CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 +CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 +# CONFIG_ESP32_WIFI_STATIC_TX_BUFFER is not set +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER=y +CONFIG_ESP32_WIFI_TX_BUFFER_TYPE=1 +CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 +CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 +# CONFIG_ESP32_WIFI_CSI_ENABLED is not set +CONFIG_ESP32_WIFI_AMPDU_TX_ENABLED=y +CONFIG_ESP32_WIFI_TX_BA_WIN=6 +CONFIG_ESP32_WIFI_AMPDU_RX_ENABLED=y +CONFIG_ESP32_WIFI_RX_BA_WIN=6 +# CONFIG_ESP32_WIFI_AMSDU_TX_ENABLED is not set +# CONFIG_ESP32_WIFI_NVS_ENABLED is not set +CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_0=y +# CONFIG_ESP32_WIFI_TASK_PINNED_TO_CORE_1 is not set +CONFIG_ESP32_WIFI_SOFTAP_BEACON_MAX_LEN=752 +CONFIG_ESP32_WIFI_MGMT_SBUF_NUM=32 +CONFIG_ESP32_WIFI_IRAM_OPT=y +CONFIG_ESP32_WIFI_RX_IRAM_OPT=y +# CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE is not set +# end of Wi-Fi + +# CONFIG_FREERTOS_UNICORE is not set +# +# Deprecated options for backward compatibility +# +CONFIG_TOOLPREFIX="xtensa-esp32s3-elf-" +# CONFIG_ESP32_APPTRACE_DEST_TRAX is not set +CONFIG_ESP32_APPTRACE_DEST_NONE=y +CONFIG_ESP32_APPTRACE_LOCK_ENABLE=y +CONFIG_ESP32C3_LIGHTSLEEP_GPIO_RESET_WORKAROUND=y +CONFIG_ESP32_PHY_CALIBRATION_AND_DATA_STORAGE=y +# CONFIG_ESP32_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP32_PHY_MAX_TX_POWER=20 +CONFIG_ESP32S2_ALLOW_RTC_FAST_MEM_AS_HEAP=y +# CONFIG_ESP32_ENABLE_COREDUMP_TO_FLASH is not set +# CONFIG_ESP32_ENABLE_COREDUMP_TO_UART is not set +CONFIG_ESP32_ENABLE_COREDUMP_TO_NONE=y +CONFIG_ESP32_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_ESP32_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_ESP32_PTHREAD_STACK_MIN=768 +CONFIG_ESP32_DEFAULT_PTHREAD_CORE_NO_AFFINITY=y +# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_0 is not set +# CONFIG_ESP32_DEFAULT_PTHREAD_CORE_1 is not set +CONFIG_ESP32_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_ESP32_PTHREAD_TASK_NAME_DEFAULT="pthread" +# end of Deprecated options for backward compatibility diff --git a/ports/espressif/esp-idf-config/sdkconfig-opt.defaults b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults index b24996c0f7..273303446e 100644 --- a/ports/espressif/esp-idf-config/sdkconfig-opt.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig-opt.defaults @@ -1,10 +1,86 @@ -# No newlines in this file so they are preserved in the board sdkconfig. +# +# Bootloader config +# +CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_SIZE=y +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_DEBUG is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_BOOTLOADER_COMPILER_OPTIMIZATION_NONE is not set +# end of Bootloader config + +# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set +# +# Compiler options +# +CONFIG_COMPILER_OPTIMIZATION_SIZE=y +# CONFIG_COMPILER_OPTIMIZATION_PERF is not set +# CONFIG_COMPILER_OPTIMIZATION_NONE is not set +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y +# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_DISABLE is not set +CONFIG_COMPILER_OPTIMIZATION_ASSERTION_LEVEL=1 +# CONFIG_COMPILER_OPTIMIZATION_CHECKS_SILENT is not set +# end of Compiler options + +CONFIG_ESP32S3_DEBUG_OCDAWARE=y +# +# Common ESP-related +# # CONFIG_ESP_ERR_TO_NAME_LOOKUP is not set -# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set -# CONFIG_CONSOLE_UART_DEFAULT is not set -CONFIG_ESP_CONSOLE_UART_NONE=y -CONFIG_ESP_CONSOLE_NONE=y -CONFIG_ESP_CONSOLE_UART_NUM=-1 -CONFIG_CONSOLE_UART_NUM=-1 +# end of Common ESP-related + # CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT is not set -CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT=y \ No newline at end of file +# +# ESP System Settings +# +# CONFIG_ESP_SYSTEM_PANIC_PRINT_REBOOT is not set +CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT=y +# CONFIG_ESP_SYSTEM_PANIC_GDBSTUB is not set +# end of ESP System Settings + +# CONFIG_ESP_CONSOLE_UART_DEFAULT is not set +# CONFIG_ESP_CONSOLE_USB_CDC is not set +# CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG is not set +# CONFIG_ESP_CONSOLE_UART_CUSTOM is not set +CONFIG_ESP_CONSOLE_NONE=y +# CONFIG_ESP_CONSOLE_SECONDARY_NONE is not set +CONFIG_ESP_CONSOLE_SECONDARY_USB_SERIAL_JTAG=y +CONFIG_ESP_CONSOLE_MULTIPLE_UART=y +CONFIG_ESP_CONSOLE_UART_NUM=-1 +# +# FreeRTOS +# +CONFIG_FREERTOS_ASSERT_ON_UNTESTED_FUNCTION=y +CONFIG_FREERTOS_ASSERT_FAIL_ABORT=y +# CONFIG_FREERTOS_ASSERT_FAIL_PRINT_CONTINUE is not set +# CONFIG_FREERTOS_ASSERT_DISABLE is not set +CONFIG_FREERTOS_DEBUG_OCDAWARE=y +# end of FreeRTOS + +CONFIG_HAL_ASSERTION_EQUALS_SYSTEM=y +# +# Hardware Abstraction Layer (HAL) and Low Level (LL) +# +# CONFIG_HAL_ASSERTION_DISABLE is not set +# CONFIG_HAL_ASSERTION_SILIENT is not set +CONFIG_HAL_DEFAULT_ASSERTION_LEVEL=1 +# end of Hardware Abstraction Layer (HAL) and Low Level (LL) + +CONFIG_LWIP_ESP_LWIP_ASSERT=y +# +# Deprecated options for backward compatibility +# +# CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG is not set +CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y +# CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED is not set +CONFIG_OPTIMIZATION_ASSERTIONS_SILENT=y +# CONFIG_OPTIMIZATION_ASSERTIONS_DISABLED is not set +CONFIG_OPTIMIZATION_ASSERTION_LEVEL=1 +# CONFIG_ESP32S2_PANIC_PRINT_HALT is not set +# CONFIG_ESP32S2_PANIC_PRINT_REBOOT is not set +CONFIG_ESP32S2_PANIC_SILENT_REBOOT=y +# CONFIG_ESP32S2_PANIC_GDBSTUB is not set +# CONFIG_CONSOLE_UART_DEFAULT is not set +# CONFIG_CONSOLE_UART_CUSTOM is not set +CONFIG_ESP_CONSOLE_UART_NONE=y +CONFIG_CONSOLE_UART_NUM=-1 +# end of Deprecated options for backward compatibility diff --git a/ports/espressif/esp-idf-config/sdkconfig.defaults b/ports/espressif/esp-idf-config/sdkconfig.defaults index 25e2f103d5..f4efac4063 100644 --- a/ports/espressif/esp-idf-config/sdkconfig.defaults +++ b/ports/espressif/esp-idf-config/sdkconfig.defaults @@ -1,125 +1,549 @@ # +# Espressif IoT Development Framework (ESP-IDF) Project Configuration +# +CONFIG_IDF_CMAKE=y +# end of Espressif IoT Development Framework (ESP-IDF) Project Configuration + +# CONFIG_SDK_TOOLCHAIN_SUPPORTS_TIME_WIDE_64_BITS is not set +# +# Build type +# +CONFIG_APP_BUILD_TYPE_APP_2NDBOOT=y +# CONFIG_APP_BUILD_TYPE_ELF_RAM is not set +CONFIG_APP_BUILD_GENERATE_BINARIES=y +CONFIG_APP_BUILD_BOOTLOADER=y +CONFIG_APP_BUILD_USE_FLASH_SECTIONS=y +# end of Build type + +CONFIG_APP_COMPILE_TIME_DATE=y +# +# Application manager +# +# CONFIG_APP_EXCLUDE_PROJECT_VER_VAR is not set +# CONFIG_APP_EXCLUDE_PROJECT_NAME_VAR is not set +# CONFIG_APP_PROJECT_VER_FROM_CONFIG is not set +CONFIG_APP_RETRIEVE_LEN_ELF_SHA=16 +# end of Application manager + +# CONFIG_BOOTLOADER_LOG_LEVEL_NONE is not set +# # Bootloader config # +# CONFIG_BOOTLOADER_LOG_LEVEL_ERROR is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_WARN is not set +CONFIG_BOOTLOADER_LOG_LEVEL_INFO=y +# CONFIG_BOOTLOADER_LOG_LEVEL_DEBUG is not set +# CONFIG_BOOTLOADER_LOG_LEVEL_VERBOSE is not set +CONFIG_BOOTLOADER_LOG_LEVEL=3 # CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_8V is not set +CONFIG_BOOTLOADER_VDDSDIO_BOOST_1_9V=y +# CONFIG_BOOTLOADER_FACTORY_RESET is not set +# CONFIG_BOOTLOADER_APP_TEST is not set +CONFIG_BOOTLOADER_WDT_ENABLE=y +# CONFIG_BOOTLOADER_WDT_DISABLE_IN_USER_CODE is not set +CONFIG_BOOTLOADER_WDT_TIME_MS=9000 +# CONFIG_BOOTLOADER_APP_ROLLBACK_ENABLE is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_IN_DEEP_SLEEP is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_ON_POWER_ON is not set +# CONFIG_BOOTLOADER_SKIP_VALIDATE_ALWAYS is not set +CONFIG_BOOTLOADER_RESERVE_RTC_SIZE=0 +# CONFIG_BOOTLOADER_CUSTOM_RESERVE_RTC is not set +CONFIG_BOOTLOADER_FLASH_XMC_SUPPORT=y # end of Bootloader config +CONFIG_SECURE_BOOT_SUPPORTS_RSA=y +# +# Security features +# +CONFIG_SECURE_TARGET_HAS_SECURE_ROM_DL_MODE=y +# CONFIG_SECURE_SIGNED_APPS_NO_SECURE_BOOT is not set +# CONFIG_SECURE_BOOT is not set +# CONFIG_SECURE_FLASH_ENC_ENABLED is not set +# end of Security features + +CONFIG_BOOT_ROM_LOG_ALWAYS_ON=y +# +# Boot ROM Behavior +# +# CONFIG_BOOT_ROM_LOG_ALWAYS_OFF is not set +# CONFIG_BOOT_ROM_LOG_ON_GPIO_HIGH is not set +# CONFIG_BOOT_ROM_LOG_ON_GPIO_LOW is not set +# end of Boot ROM Behavior + +CONFIG_ESPTOOLPY_BAUD_OTHER_VAL=115200 # # Serial flasher config # +# CONFIG_ESPTOOLPY_NO_STUB is not set +# CONFIG_ESPTOOLPY_OCT_FLASH is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QIO is not set +# CONFIG_ESPTOOLPY_FLASHMODE_QOUT is not set +CONFIG_ESPTOOLPY_FLASHMODE_DIO=y +# CONFIG_ESPTOOLPY_FLASHMODE_DOUT is not set +CONFIG_ESPTOOLPY_FLASH_SAMPLE_MODE_STR=y +CONFIG_ESPTOOLPY_FLASHMODE="dio" +# CONFIG_ESPTOOLPY_FLASHFREQ_120M is not set # CONFIG_ESPTOOLPY_FLASHFREQ_80M is not set CONFIG_ESPTOOLPY_FLASHFREQ_40M=y +# CONFIG_ESPTOOLPY_FLASHFREQ_20M is not set CONFIG_ESPTOOLPY_FLASHFREQ="40m" +CONFIG_ESPTOOLPY_BEFORE_RESET=y +# CONFIG_ESPTOOLPY_BEFORE_NORESET is not set +CONFIG_ESPTOOLPY_BEFORE="default_reset" +CONFIG_ESPTOOLPY_AFTER_RESET=y +# CONFIG_ESPTOOLPY_AFTER_NORESET is not set +CONFIG_ESPTOOLPY_AFTER="hard_reset" +# CONFIG_ESPTOOLPY_MONITOR_BAUD_CONSOLE is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_9600B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_57600B is not set +CONFIG_ESPTOOLPY_MONITOR_BAUD_115200B=y +# CONFIG_ESPTOOLPY_MONITOR_BAUD_230400B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_921600B is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_2MB is not set +# CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER is not set +CONFIG_ESPTOOLPY_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_ESPTOOLPY_MONITOR_BAUD=115200 # end of Serial flasher config +# CONFIG_PARTITION_TABLE_SINGLE_APP is not set # # Partition Table # -# CONFIG_PARTITION_TABLE_SINGLE_APP is not set +# CONFIG_PARTITION_TABLE_SINGLE_APP_LARGE is not set +# CONFIG_PARTITION_TABLE_TWO_OTA is not set CONFIG_PARTITION_TABLE_CUSTOM=y +CONFIG_PARTITION_TABLE_OFFSET=0x8000 +CONFIG_PARTITION_TABLE_MD5=y # end of Partition Table +CONFIG_COMPILER_HIDE_PATHS_MACROS=y # # Compiler options # -# CONFIG_COMPILER_OPTIMIZATION_DEFAULT is not set -CONFIG_COMPILER_OPTIMIZATION_SIZE=y -# CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_ENABLE is not set -CONFIG_COMPILER_OPTIMIZATION_ASSERTIONS_SILENT=y +# CONFIG_COMPILER_CXX_EXCEPTIONS is not set +# CONFIG_COMPILER_CXX_RTTI is not set +CONFIG_COMPILER_STACK_CHECK_MODE_NONE=y +# CONFIG_COMPILER_STACK_CHECK_MODE_NORM is not set +# CONFIG_COMPILER_STACK_CHECK_MODE_STRONG is not set +# CONFIG_COMPILER_STACK_CHECK_MODE_ALL is not set +# CONFIG_COMPILER_WARN_WRITE_STRINGS is not set +# CONFIG_COMPILER_DISABLE_GCC8_WARNINGS is not set +# CONFIG_COMPILER_DUMP_RTL_FILES is not set # end of Compiler options +# CONFIG_APPTRACE_DEST_JTAG is not set +# +# Application Level Tracing +# +CONFIG_APPTRACE_DEST_NONE=y +CONFIG_APPTRACE_LOCK_ENABLE=y +# end of Application Level Tracing + +# CONFIG_ADC_FORCE_XPD_FSM is not set +# +# ADC configuration +# +CONFIG_ADC_DISABLE_DAC=y +# end of ADC configuration + +# CONFIG_MCPWM_ISR_IN_IRAM is not set +# +# SPI configuration +# +# CONFIG_SPI_MASTER_IN_IRAM is not set +CONFIG_SPI_MASTER_ISR_IN_IRAM=y +# CONFIG_SPI_SLAVE_IN_IRAM is not set +CONFIG_SPI_SLAVE_ISR_IN_IRAM=y +# end of SPI configuration + +# CONFIG_TWAI_ISR_IN_IRAM is not set +# +# UART configuration +# +# CONFIG_UART_ISR_IN_IRAM is not set +# end of UART configuration + +# CONFIG_GDMA_CTRL_FUNC_IN_IRAM is not set +# +# GDMA Configuration +# +# CONFIG_GDMA_ISR_IRAM_SAFE is not set +# end of GDMA Configuration + +# CONFIG_EFUSE_CUSTOM_TABLE is not set +# +# eFuse Bit Manager +# +# CONFIG_EFUSE_VIRTUAL is not set +CONFIG_EFUSE_MAX_BLK_LEN=256 +# end of eFuse Bit Manager + +CONFIG_ESP_TLS_USING_MBEDTLS=y # # ESP-TLS # +CONFIG_ESP_TLS_USE_DS_PERIPHERAL=y CONFIG_ESP_TLS_SERVER=y +# CONFIG_ESP_TLS_CLIENT_SESSION_TICKETS is not set +# CONFIG_ESP_TLS_SERVER_SESSION_TICKETS is not set +# CONFIG_ESP_TLS_PSK_VERIFICATION is not set +# CONFIG_ESP_TLS_INSECURE is not set # end of ESP-TLS -# -# ESP32S2-specific -# -# CONFIG_ESP32S2_DEFAULT_CPU_FREQ_160 is not set -CONFIG_ESP32S2_DEFAULT_CPU_FREQ_240=y -CONFIG_ESP32S2_DEFAULT_CPU_FREQ_MHZ=240 -# -# Cache config -# -# CONFIG_ESP32S2_INSTRUCTION_CACHE_8KB is not set -CONFIG_ESP32S2_INSTRUCTION_CACHE_16KB=y -# CONFIG_ESP32S2_DATA_CACHE_8KB is not set -CONFIG_ESP32S2_DATA_CACHE_16KB=y -# end of Cache config -# end of ESP32S2-specific - -# -# Common ESP-related -# -CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192 -# CONFIG_ESP_TASK_WDT is not set -# end of Common ESP-related - +# CONFIG_ETH_USE_SPI_ETHERNET is not set # # Ethernet # -# CONFIG_ETH_USE_SPI_ETHERNET is not set +# CONFIG_ETH_USE_OPENETH is not set # end of Ethernet +# CONFIG_ESP_EVENT_LOOP_PROFILING is not set +# +# Event Loop Library +# +CONFIG_ESP_EVENT_POST_FROM_ISR=y +CONFIG_ESP_EVENT_POST_FROM_IRAM_ISR=y +# end of Event Loop Library + +CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_STA=y +# +# MAC Config +# +CONFIG_ESP_MAC_ADDR_UNIVERSE_WIFI_AP=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_BT=y +CONFIG_ESP_MAC_ADDR_UNIVERSE_ETH=y +# end of MAC Config + +CONFIG_ESP_SLEEP_RTC_BUS_ISO_WORKAROUND=y +# +# Sleep Config +# +# CONFIG_ESP_SLEEP_PSRAM_LEAKAGE_WORKAROUND is not set +# CONFIG_ESP_SLEEP_FLASH_LEAKAGE_WORKAROUND is not set +# end of Sleep Config + +CONFIG_ESP_IPC_TASK_STACK_SIZE=1536 +# +# IPC (Inter-Processor Call) +# +CONFIG_ESP_IPC_USES_CALLERS_PRIORITY=y +CONFIG_ESP_IPC_ISR_ENABLE=y +# end of IPC (Inter-Processor Call) + +CONFIG_ESP_NETIF_IP_LOST_TIMER_INTERVAL=120 # # ESP NETIF Adapter # +CONFIG_ESP_NETIF_TCPIP_LWIP=y +# CONFIG_ESP_NETIF_LOOPBACK is not set # CONFIG_ESP_NETIF_TCPIP_ADAPTER_COMPATIBLE_LAYER is not set # end of ESP NETIF Adapter +CONFIG_ESP_PHY_CALIBRATION_AND_DATA_STORAGE=y +# +# PHY +# +# CONFIG_ESP_PHY_INIT_DATA_IN_PARTITION is not set +CONFIG_ESP_PHY_MAX_WIFI_TX_POWER=20 +CONFIG_ESP_PHY_MAX_TX_POWER=20 +# end of PHY + +# CONFIG_PM_ENABLE is not set +# +# Power Management +# +CONFIG_PM_POWER_DOWN_CPU_IN_LIGHT_SLEEP=y +CONFIG_PM_POWER_DOWN_TAGMEM_IN_LIGHT_SLEEP=y +# end of Power Management + +# CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME is not set +# +# ESP System Settings +# +CONFIG_ESP_SYSTEM_RTC_FAST_MEM_AS_HEAP_DEPCHECK=y +CONFIG_ESP_SYSTEM_ALLOW_RTC_FAST_MEM_AS_HEAP=y +# end of ESP System Settings + +CONFIG_ESP_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_ESP_SYSTEM_EVENT_TASK_STACK_SIZE=2304 +CONFIG_ESP_MAIN_TASK_STACK_SIZE=8192 +CONFIG_ESP_MINIMAL_SHARED_STACK_SIZE=2048 +CONFIG_ESP_INT_WDT=y +CONFIG_ESP_INT_WDT_TIMEOUT_MS=300 +CONFIG_ESP_INT_WDT_CHECK_CPU1=y +# CONFIG_ESP_TASK_WDT is not set +# CONFIG_ESP_PANIC_HANDLER_IRAM is not set +CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_4=y +# +# High resolution timer (esp_timer) +# +# CONFIG_ESP_TIMER_PROFILING is not set +CONFIG_ESP_TIME_FUNCS_USE_RTC_TIMER=y +CONFIG_ESP_TIME_FUNCS_USE_ESP_TIMER=y +CONFIG_ESP_TIMER_TASK_STACK_SIZE=3584 +CONFIG_ESP_TIMER_INTERRUPT_LEVEL=1 +# CONFIG_ESP_TIMER_SUPPORTS_ISR_DISPATCH_METHOD is not set +CONFIG_ESP_TIMER_IMPL_SYSTIMER=y +# end of High resolution timer (esp_timer) + +# CONFIG_ESP_WIFI_SLP_IRAM_OPT is not set # # Wi-Fi # -CONFIG_ESP32_WIFI_STATIC_RX_BUFFER_NUM=4 -CONFIG_ESP32_WIFI_DYNAMIC_RX_BUFFER_NUM=8 -CONFIG_ESP32_WIFI_CACHE_TX_BUFFER_NUM=16 -CONFIG_ESP32_WIFI_DYNAMIC_TX_BUFFER_NUM=16 -# CONFIG_ESP32_WIFI_NVS_ENABLED is not set -# CONFIG_ESP32_WIFI_ENABLE_WPA3_SAE is not set +# CONFIG_ESP_WIFI_FTM_ENABLE is not set +# CONFIG_ESP_WIFI_STA_DISCONNECTED_PM_ENABLE is not set +# CONFIG_ESP_WIFI_GCMP_SUPPORT is not set +# CONFIG_ESP_WIFI_GMAC_SUPPORT is not set +CONFIG_ESP_WIFI_SOFTAP_SUPPORT=y # end of Wi-Fi +# CONFIG_ESP_COREDUMP_ENABLE_TO_FLASH is not set +# +# Core dump +# +# CONFIG_ESP_COREDUMP_ENABLE_TO_UART is not set +CONFIG_ESP_COREDUMP_ENABLE_TO_NONE=y +# end of Core dump + +CONFIG_FREERTOS_NO_AFFINITY=0x7FFFFFFF # # FreeRTOS # +CONFIG_FREERTOS_TICK_SUPPORT_SYSTIMER=y +CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL1=y +# CONFIG_FREERTOS_CORETIMER_SYSTIMER_LVL3 is not set +CONFIG_FREERTOS_SYSTICK_USES_SYSTIMER=y +CONFIG_FREERTOS_HZ=100 +# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_NONE is not set +# CONFIG_FREERTOS_CHECK_STACKOVERFLOW_PTRVAL is not set +CONFIG_FREERTOS_CHECK_STACKOVERFLOW_CANARY=y +# CONFIG_FREERTOS_WATCHPOINT_END_OF_STACK is not set +CONFIG_FREERTOS_INTERRUPT_BACKTRACE=y +CONFIG_FREERTOS_THREAD_LOCAL_STORAGE_POINTERS=1 CONFIG_FREERTOS_IDLE_TASK_STACKSIZE=1536 +CONFIG_FREERTOS_ISR_STACKSIZE=1536 +# CONFIG_FREERTOS_LEGACY_HOOKS is not set +CONFIG_FREERTOS_MAX_TASK_NAME_LEN=16 +CONFIG_FREERTOS_SUPPORT_STATIC_ALLOCATION=y +# CONFIG_FREERTOS_ENABLE_STATIC_TASK_CLEAN_UP is not set +CONFIG_FREERTOS_TIMER_TASK_PRIORITY=1 +CONFIG_FREERTOS_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_FREERTOS_TIMER_QUEUE_LENGTH=10 +CONFIG_FREERTOS_QUEUE_REGISTRY_SIZE=0 +# CONFIG_FREERTOS_USE_TRACE_FACILITY is not set +# CONFIG_FREERTOS_GENERATE_RUN_TIME_STATS is not set +CONFIG_FREERTOS_CHECK_MUTEX_GIVEN_BY_OWNER=y +# CONFIG_FREERTOS_CHECK_PORT_CRITICAL_COMPLIANCE is not set +# CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH is not set +CONFIG_FREERTOS_ENABLE_TASK_SNAPSHOT=y +# CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH is not set # end of FreeRTOS +CONFIG_HEAP_POISONING_DISABLED=y +# +# Heap memory debugging +# +# CONFIG_HEAP_POISONING_LIGHT is not set +# CONFIG_HEAP_POISONING_COMPREHENSIVE is not set +CONFIG_HEAP_TRACING_OFF=y +# CONFIG_HEAP_TRACING_STANDALONE is not set +# CONFIG_HEAP_TRACING_TOHOST is not set +# CONFIG_HEAP_ABORT_WHEN_ALLOCATION_FAILS is not set +# end of Heap memory debugging + +# CONFIG_LOG_DEFAULT_LEVEL_NONE is not set +# +# Log output +# +# CONFIG_LOG_DEFAULT_LEVEL_ERROR is not set +# CONFIG_LOG_DEFAULT_LEVEL_WARN is not set +CONFIG_LOG_DEFAULT_LEVEL_INFO=y +# CONFIG_LOG_DEFAULT_LEVEL_DEBUG is not set +# CONFIG_LOG_DEFAULT_LEVEL_VERBOSE is not set +CONFIG_LOG_DEFAULT_LEVEL=3 +CONFIG_LOG_MAXIMUM_EQUALS_DEFAULT=y +# CONFIG_LOG_MAXIMUM_LEVEL_DEBUG is not set +# CONFIG_LOG_MAXIMUM_LEVEL_VERBOSE is not set +CONFIG_LOG_MAXIMUM_LEVEL=3 +CONFIG_LOG_COLORS=y +CONFIG_LOG_TIMESTAMP_SOURCE_RTOS=y +# CONFIG_LOG_TIMESTAMP_SOURCE_SYSTEM is not set +# end of Log output + +# CONFIG_LWIP_NETIF_API is not set # # LWIP # +# CONFIG_LWIP_TCPIP_CORE_LOCKING is not set +CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y +# CONFIG_LWIP_L2_TO_L3_COPY is not set +# CONFIG_LWIP_IRAM_OPTIMIZATION is not set +CONFIG_LWIP_TIMERS_ONDEMAND=y CONFIG_LWIP_MAX_SOCKETS=4 +# CONFIG_LWIP_USE_ONLY_LWIP_SELECT is not set +# CONFIG_LWIP_SO_LINGER is not set +CONFIG_LWIP_SO_REUSE=y +CONFIG_LWIP_SO_REUSE_RXTOALL=y CONFIG_LWIP_SO_RCVBUF=y +# CONFIG_LWIP_NETBUF_RECVINFO is not set +CONFIG_LWIP_IP4_FRAG=y +CONFIG_LWIP_IP6_FRAG=y +# CONFIG_LWIP_IP4_REASSEMBLY is not set +# CONFIG_LWIP_IP6_REASSEMBLY is not set +# CONFIG_LWIP_IP_FORWARD is not set +# CONFIG_LWIP_STATS is not set +# CONFIG_LWIP_ETHARP_TRUST_IP_MAC is not set +CONFIG_LWIP_ESP_GRATUITOUS_ARP=y +CONFIG_LWIP_GARP_TMR_INTERVAL=60 +CONFIG_LWIP_TCPIP_RECVMBOX_SIZE=32 +CONFIG_LWIP_DHCP_DOES_ARP_CHECK=y +# CONFIG_LWIP_DHCP_DISABLE_CLIENT_ID is not set +CONFIG_LWIP_DHCP_DISABLE_VENDOR_CLASS_ID=y +# CONFIG_LWIP_DHCP_RESTORE_LAST_IP is not set +CONFIG_LWIP_DHCP_OPTIONS_LEN=68 +# end of LWIP + +CONFIG_LWIP_DHCPS=y +# +# DHCP server +# +CONFIG_LWIP_DHCPS_LEASE_UNIT=60 +CONFIG_LWIP_DHCPS_MAX_STATION_NUM=8 +# end of DHCP server + +# CONFIG_LWIP_AUTOIP is not set +CONFIG_LWIP_IPV6=y +# CONFIG_LWIP_IPV6_AUTOCONFIG is not set +CONFIG_LWIP_IPV6_NUM_ADDRESSES=3 +# CONFIG_LWIP_IPV6_FORWARD is not set +# CONFIG_LWIP_NETIF_STATUS_CALLBACK is not set +CONFIG_LWIP_NETIF_LOOPBACK=y +CONFIG_LWIP_LOOPBACK_MAX_PBUFS=8 # # TCP # CONFIG_LWIP_MAX_ACTIVE_TCP=4 CONFIG_LWIP_MAX_LISTENING_TCP=4 +CONFIG_LWIP_TCP_HIGH_SPEED_RETRANSMISSION=y +CONFIG_LWIP_TCP_MAXRTX=12 CONFIG_LWIP_TCP_SYNMAXRTX=6 +CONFIG_LWIP_TCP_MSS=1440 +CONFIG_LWIP_TCP_TMR_INTERVAL=250 +CONFIG_LWIP_TCP_MSL=60000 CONFIG_LWIP_TCP_SND_BUF_DEFAULT=2880 CONFIG_LWIP_TCP_WND_DEFAULT=2880 +CONFIG_LWIP_TCP_RECVMBOX_SIZE=6 +CONFIG_LWIP_TCP_QUEUE_OOSEQ=y +# CONFIG_LWIP_TCP_SACK_OUT is not set +# CONFIG_LWIP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set +CONFIG_LWIP_TCP_OVERSIZE_MSS=y +# CONFIG_LWIP_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_LWIP_TCP_OVERSIZE_DISABLE is not set CONFIG_LWIP_TCP_RTO_TIME=3000 # end of TCP -# end of LWIP +CONFIG_LWIP_MAX_UDP_PCBS=16 +# +# UDP +# +CONFIG_LWIP_UDP_RECVMBOX_SIZE=6 +# end of UDP + +# CONFIG_LWIP_CHECKSUM_CHECK_IP is not set +# +# Checksums +# +# CONFIG_LWIP_CHECKSUM_CHECK_UDP is not set +CONFIG_LWIP_CHECKSUM_CHECK_ICMP=y +# end of Checksums + +CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=3072 +CONFIG_LWIP_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU0 is not set +# CONFIG_LWIP_TCPIP_TASK_AFFINITY_CPU1 is not set +CONFIG_LWIP_TCPIP_TASK_AFFINITY=0x7FFFFFFF +# CONFIG_LWIP_PPP_SUPPORT is not set +CONFIG_LWIP_IPV6_MEMP_NUM_ND6_QUEUE=3 +CONFIG_LWIP_IPV6_ND6_NUM_NEIGHBORS=5 +# CONFIG_LWIP_SLIP_SUPPORT is not set +# +# ICMP +# +CONFIG_LWIP_ICMP=y +# CONFIG_LWIP_MULTICAST_PING is not set +# CONFIG_LWIP_BROADCAST_PING is not set +# end of ICMP + +CONFIG_LWIP_MAX_RAW_PCBS=16 +# +# SNTP +# +CONFIG_LWIP_SNTP_MAX_SERVERS=1 +# CONFIG_LWIP_DHCP_GET_NTP_SRV is not set +CONFIG_LWIP_SNTP_UPDATE_DELAY=3600000 +# end of SNTP + +# CONFIG_LWIP_HOOK_TCP_ISN_NONE is not set +# +# Hooks +# +CONFIG_LWIP_HOOK_TCP_ISN_DEFAULT=y +# CONFIG_LWIP_HOOK_TCP_ISN_CUSTOM is not set +CONFIG_LWIP_HOOK_IP6_ROUTE_NONE=y +# CONFIG_LWIP_HOOK_IP6_ROUTE_DEFAULT is not set +# CONFIG_LWIP_HOOK_IP6_ROUTE_CUSTOM is not set +CONFIG_LWIP_HOOK_ND6_GET_GW_NONE=y +# CONFIG_LWIP_HOOK_ND6_GET_GW_DEFAULT is not set +# CONFIG_LWIP_HOOK_ND6_GET_GW_CUSTOM is not set +CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_NONE=y +# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_DEFAULT is not set +# CONFIG_LWIP_HOOK_NETCONN_EXT_RESOLVE_CUSTOM is not set +# end of Hooks + +# CONFIG_LWIP_DEBUG is not set # # mbedTLS # +CONFIG_MBEDTLS_INTERNAL_MEM_ALLOC=y +# CONFIG_MBEDTLS_DEFAULT_MEM_ALLOC is not set +# CONFIG_MBEDTLS_CUSTOM_MEM_ALLOC is not set +CONFIG_MBEDTLS_ASYMMETRIC_CONTENT_LEN=y +CONFIG_MBEDTLS_SSL_IN_CONTENT_LEN=16384 CONFIG_MBEDTLS_SSL_OUT_CONTENT_LEN=2048 -CONFIG_MBEDTLS_DYNAMIC_BUFFER=y -CONFIG_MBEDTLS_DYNAMIC_FREE_PEER_CERT=y -CONFIG_MBEDTLS_DYNAMIC_FREE_CONFIG_DATA=y -CONFIG_MBEDTLS_DYNAMIC_FREE_CA_CERT=y +# CONFIG_MBEDTLS_DEBUG is not set +# end of mbedTLS + +CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y # # Certificate Bundle # -CONFIG_MBEDTLS_CERTIFICATE_BUNDLE=y # CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_FULL is not set +# CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_CMN is not set CONFIG_MBEDTLS_CERTIFICATE_BUNDLE_DEFAULT_NONE=y CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE=y CONFIG_MBEDTLS_CUSTOM_CERTIFICATE_BUNDLE_PATH="certificates/nina-fw/data/roots.pem" # end of Certificate Bundle + +# CONFIG_MBEDTLS_ECP_RESTARTABLE is not set +# CONFIG_MBEDTLS_CMAC_C is not set +CONFIG_MBEDTLS_HARDWARE_AES=y +CONFIG_MBEDTLS_AES_USE_INTERRUPT=y +CONFIG_MBEDTLS_HARDWARE_MPI=y +CONFIG_MBEDTLS_HARDWARE_SHA=y +CONFIG_MBEDTLS_ROM_MD5=y +# CONFIG_MBEDTLS_ATCA_HW_ECDSA_SIGN is not set +# CONFIG_MBEDTLS_ATCA_HW_ECDSA_VERIFY is not set +CONFIG_MBEDTLS_HAVE_TIME=y +# CONFIG_MBEDTLS_HAVE_TIME_DATE is not set +CONFIG_MBEDTLS_ECDSA_DETERMINISTIC=y +CONFIG_MBEDTLS_SHA512_C=y +CONFIG_MBEDTLS_TLS_SERVER_AND_CLIENT=y +# CONFIG_MBEDTLS_TLS_SERVER_ONLY is not set +# CONFIG_MBEDTLS_TLS_CLIENT_ONLY is not set +# CONFIG_MBEDTLS_TLS_DISABLED is not set +CONFIG_MBEDTLS_TLS_SERVER=y +CONFIG_MBEDTLS_TLS_CLIENT=y +CONFIG_MBEDTLS_TLS_ENABLED=y # # TLS Key Exchange Methods # @@ -128,30 +552,243 @@ CONFIG_MBEDTLS_KEY_EXCHANGE_PSK=y CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_PSK=y CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_PSK=y CONFIG_MBEDTLS_KEY_EXCHANGE_RSA_PSK=y +CONFIG_MBEDTLS_KEY_EXCHANGE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_DHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ELLIPTIC_CURVE=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_RSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDHE_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_ECDSA=y +CONFIG_MBEDTLS_KEY_EXCHANGE_ECDH_RSA=y # end of TLS Key Exchange Methods + +CONFIG_MBEDTLS_SSL_RENEGOTIATION=y +# CONFIG_MBEDTLS_SSL_PROTO_SSL3 is not set # CONFIG_MBEDTLS_SSL_PROTO_TLS1 is not set # CONFIG_MBEDTLS_SSL_PROTO_TLS1_1 is not set +CONFIG_MBEDTLS_SSL_PROTO_TLS1_2=y +# CONFIG_MBEDTLS_SSL_PROTO_GMTSSL1_1 is not set CONFIG_MBEDTLS_SSL_PROTO_DTLS=y -# CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI is not set -# end of mbedTLS +CONFIG_MBEDTLS_SSL_ALPN=y +CONFIG_MBEDTLS_CLIENT_SSL_SESSION_TICKETS=y +CONFIG_MBEDTLS_X509_CHECK_KEY_USAGE=y +CONFIG_MBEDTLS_X509_CHECK_EXTENDED_KEY_USAGE=y +CONFIG_MBEDTLS_SERVER_SSL_SESSION_TICKETS=y +# +# Symmetric Ciphers +# +CONFIG_MBEDTLS_AES_C=y +# CONFIG_MBEDTLS_CAMELLIA_C is not set +# CONFIG_MBEDTLS_DES_C is not set +CONFIG_MBEDTLS_RC4_DISABLED=y +# CONFIG_MBEDTLS_RC4_ENABLED_NO_DEFAULT is not set +# CONFIG_MBEDTLS_RC4_ENABLED is not set +# CONFIG_MBEDTLS_BLOWFISH_C is not set +# CONFIG_MBEDTLS_XTEA_C is not set +CONFIG_MBEDTLS_CCM_C=y +CONFIG_MBEDTLS_GCM_C=y +# CONFIG_MBEDTLS_NIST_KW_C is not set +# end of Symmetric Ciphers +# CONFIG_MBEDTLS_RIPEMD160_C is not set +# +# Certificates +# +CONFIG_MBEDTLS_PEM_PARSE_C=y +CONFIG_MBEDTLS_PEM_WRITE_C=y +CONFIG_MBEDTLS_X509_CRL_PARSE_C=y +CONFIG_MBEDTLS_X509_CSR_PARSE_C=y +# end of Certificates + +CONFIG_MBEDTLS_ECP_C=y +CONFIG_MBEDTLS_ECDH_C=y +CONFIG_MBEDTLS_ECDSA_C=y +# CONFIG_MBEDTLS_ECJPAKE_C is not set +CONFIG_MBEDTLS_ECP_DP_SECP192R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP521R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP192K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP224K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_SECP256K1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP256R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP384R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_BP512R1_ENABLED=y +CONFIG_MBEDTLS_ECP_DP_CURVE25519_ENABLED=y +CONFIG_MBEDTLS_ECP_NIST_OPTIM=y +# CONFIG_MBEDTLS_POLY1305_C is not set +# CONFIG_MBEDTLS_CHACHA20_C is not set +# CONFIG_MBEDTLS_HKDF_C is not set +# CONFIG_MBEDTLS_THREADING_C is not set +# CONFIG_MBEDTLS_LARGE_KEY_SOFTWARE_MPI is not set +# CONFIG_MBEDTLS_SECURITY_RISKS is not set +# +# Newlib +# +CONFIG_NEWLIB_STDOUT_LINE_ENDING_CRLF=y +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF is not set +# CONFIG_NEWLIB_STDOUT_LINE_ENDING_CR is not set +# CONFIG_NEWLIB_STDIN_LINE_ENDING_CRLF is not set +# CONFIG_NEWLIB_STDIN_LINE_ENDING_LF is not set +CONFIG_NEWLIB_STDIN_LINE_ENDING_CR=y +# CONFIG_NEWLIB_NANO_FORMAT is not set +# end of Newlib + +# CONFIG_OPENTHREAD_ENABLED is not set +# +# PThreads +# +CONFIG_PTHREAD_TASK_PRIO_DEFAULT=5 +CONFIG_PTHREAD_TASK_STACK_SIZE_DEFAULT=3072 +CONFIG_PTHREAD_STACK_MIN=768 +CONFIG_PTHREAD_DEFAULT_CORE_NO_AFFINITY=y +# CONFIG_PTHREAD_DEFAULT_CORE_0 is not set +# CONFIG_PTHREAD_DEFAULT_CORE_1 is not set +CONFIG_PTHREAD_TASK_CORE_DEFAULT=-1 +CONFIG_PTHREAD_TASK_NAME_DEFAULT="pthread" +# end of PThreads + +# CONFIG_SPI_FLASH_VERIFY_WRITE is not set # # SPI Flash driver # +# CONFIG_SPI_FLASH_ENABLE_COUNTERS is not set +CONFIG_SPI_FLASH_ROM_DRIVER_PATCH=y +# CONFIG_SPI_FLASH_ROM_IMPL is not set +CONFIG_SPI_FLASH_DANGEROUS_WRITE_ABORTS=y +# CONFIG_SPI_FLASH_DANGEROUS_WRITE_FAILS is not set +# CONFIG_SPI_FLASH_DANGEROUS_WRITE_ALLOWED is not set +# CONFIG_SPI_FLASH_USE_LEGACY_IMPL is not set +# CONFIG_SPI_FLASH_SHARE_SPI1_BUS is not set +# CONFIG_SPI_FLASH_BYPASS_BLOCK_ERASE is not set # CONFIG_SPI_FLASH_YIELD_DURING_ERASE is not set CONFIG_SPI_FLASH_WRITE_CHUNK_SIZE=4096 +# CONFIG_SPI_FLASH_SIZE_OVERRIDE is not set +# CONFIG_SPI_FLASH_CHECK_ERASE_TIMEOUT_DISABLED is not set +# CONFIG_SPI_FLASH_OVERRIDE_CHIP_DRIVER_LIST is not set # end of SPI Flash driver +CONFIG_SPI_FLASH_SUPPORT_ISSI_CHIP=y +# +# Auto-detect flash chips +# +CONFIG_SPI_FLASH_SUPPORT_MXIC_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_GD_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_WINBOND_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_BOYA_CHIP=y +CONFIG_SPI_FLASH_SUPPORT_MXIC_OPI_CHIP=y +# end of Auto-detect flash chips + +CONFIG_SPI_FLASH_ENABLE_ENCRYPTED_READ_WRITE=y +# +# Virtual file system +# +CONFIG_VFS_SUPPORT_IO=y +CONFIG_VFS_SUPPORT_DIR=y +CONFIG_VFS_SUPPORT_SELECT=y +CONFIG_VFS_SUPPRESS_SELECT_DEBUG_OUTPUT=y +CONFIG_VFS_SUPPORT_TERMIOS=y +# end of Virtual file system + +CONFIG_VFS_SEMIHOSTFS_MAX_MOUNT_POINTS=1 +# +# Host File System I/O (Semihosting) +# +CONFIG_VFS_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 +# end of Host File System I/O (Semihosting) + +CONFIG_WPA_MBEDTLS_CRYPTO=y +# +# Supplicant +# +# CONFIG_WPA_WAPI_PSK is not set +# CONFIG_WPA_SUITE_B_192 is not set +# CONFIG_WPA_DEBUG_PRINT is not set +# CONFIG_WPA_TESTING_OPTIONS is not set +# CONFIG_WPA_WPS_STRICT is not set +# CONFIG_WPA_11KV_SUPPORT is not set +# end of Supplicant + +# CONFIG_LEGACY_INCLUDE_COMMON_HEADERS is not set # # Deprecated options for backward compatibility # -# CONFIG_COMPILER_OPTIMIZATION_LEVEL_DEBUG is not set -CONFIG_COMPILER_OPTIMIZATION_LEVEL_RELEASE=y -# CONFIG_OPTIMIZATION_ASSERTIONS_ENABLED is not set -CONFIG_OPTIMIZATION_ASSERTIONS_SILENT=y +# CONFIG_LOG_BOOTLOADER_LEVEL_NONE is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_ERROR is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_WARN is not set +CONFIG_LOG_BOOTLOADER_LEVEL_INFO=y +# CONFIG_LOG_BOOTLOADER_LEVEL_DEBUG is not set +# CONFIG_LOG_BOOTLOADER_LEVEL_VERBOSE is not set +CONFIG_LOG_BOOTLOADER_LEVEL=3 +# CONFIG_APP_ROLLBACK_ENABLE is not set +# CONFIG_FLASH_ENCRYPTION_ENABLED is not set +# CONFIG_FLASHMODE_QIO is not set +# CONFIG_FLASHMODE_QOUT is not set +CONFIG_FLASHMODE_DIO=y +# CONFIG_FLASHMODE_DOUT is not set +# CONFIG_MONITOR_BAUD_9600B is not set +# CONFIG_MONITOR_BAUD_57600B is not set +CONFIG_MONITOR_BAUD_115200B=y +# CONFIG_MONITOR_BAUD_230400B is not set +# CONFIG_MONITOR_BAUD_921600B is not set +# CONFIG_MONITOR_BAUD_2MB is not set +# CONFIG_MONITOR_BAUD_OTHER is not set +CONFIG_MONITOR_BAUD_OTHER_VAL=115200 +CONFIG_MONITOR_BAUD=115200 +# CONFIG_CXX_EXCEPTIONS is not set +CONFIG_STACK_CHECK_NONE=y +# CONFIG_STACK_CHECK_NORM is not set +# CONFIG_STACK_CHECK_STRONG is not set +# CONFIG_STACK_CHECK_ALL is not set +# CONFIG_WARN_WRITE_STRINGS is not set +# CONFIG_DISABLE_GCC8_WARNINGS is not set +CONFIG_ADC2_DISABLE_DAC=y +# CONFIG_EVENT_LOOP_PROFILING is not set +CONFIG_POST_EVENTS_FROM_ISR=y +CONFIG_POST_EVENTS_FROM_IRAM_ISR=y +CONFIG_IPC_TASK_STACK_SIZE=1536 +CONFIG_ESP_SYSTEM_PM_POWER_DOWN_CPU=y +CONFIG_SYSTEM_EVENT_QUEUE_SIZE=32 +CONFIG_SYSTEM_EVENT_TASK_STACK_SIZE=2304 CONFIG_MAIN_TASK_STACK_SIZE=8192 +CONFIG_INT_WDT=y +CONFIG_INT_WDT_TIMEOUT_MS=300 +CONFIG_INT_WDT_CHECK_CPU1=y # CONFIG_TASK_WDT is not set +CONFIG_TIMER_TASK_STACK_SIZE=3584 +# CONFIG_ENABLE_STATIC_TASK_CLEAN_UP_HOOK is not set +CONFIG_TIMER_TASK_PRIORITY=1 +CONFIG_TIMER_TASK_STACK_DEPTH=2048 +CONFIG_TIMER_QUEUE_LENGTH=10 +# CONFIG_L2_TO_L3_COPY is not set +# CONFIG_USE_ONLY_LWIP_SELECT is not set +CONFIG_ESP_GRATUITOUS_ARP=y +CONFIG_GARP_TMR_INTERVAL=60 +CONFIG_TCPIP_RECVMBOX_SIZE=32 +CONFIG_TCP_MAXRTX=12 CONFIG_TCP_SYNMAXRTX=6 +CONFIG_TCP_MSS=1440 +CONFIG_TCP_MSL=60000 CONFIG_TCP_SND_BUF_DEFAULT=2880 CONFIG_TCP_WND_DEFAULT=2880 -# End of deprecated options +CONFIG_TCP_RECVMBOX_SIZE=6 +CONFIG_TCP_QUEUE_OOSEQ=y +# CONFIG_ESP_TCP_KEEP_CONNECTION_WHEN_IP_CHANGES is not set +CONFIG_TCP_OVERSIZE_MSS=y +# CONFIG_TCP_OVERSIZE_QUARTER_MSS is not set +# CONFIG_TCP_OVERSIZE_DISABLE is not set +CONFIG_UDP_RECVMBOX_SIZE=6 +CONFIG_TCPIP_TASK_STACK_SIZE=3072 +CONFIG_TCPIP_TASK_AFFINITY_NO_AFFINITY=y +# CONFIG_TCPIP_TASK_AFFINITY_CPU0 is not set +# CONFIG_TCPIP_TASK_AFFINITY_CPU1 is not set +CONFIG_TCPIP_TASK_AFFINITY=0x7FFFFFFF +# CONFIG_PPP_SUPPORT is not set +CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ABORTS=y +# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_FAILS is not set +# CONFIG_SPI_FLASH_WRITING_DANGEROUS_REGIONS_ALLOWED is not set +CONFIG_SUPPRESS_SELECT_DEBUG_OUTPUT=y +CONFIG_SUPPORT_TERMIOS=y +CONFIG_SEMIHOSTFS_MAX_MOUNT_POINTS=1 +CONFIG_SEMIHOSTFS_HOST_PATH_MAX_LEN=128 +# end of Deprecated options for backward compatibility diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index a7b69e0933..0f297b9989 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -1,8 +1,3 @@ -# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk -# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. -# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz - # Internal math library is substantially smaller than toolchain one INTERNAL_LIBM = 1 @@ -43,17 +38,18 @@ CIRCUITPY_USB = 0 CIRCUITPY_ALARM = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_ROTARYIO = 0 -CIRCUITPY_ANALOGIO = 0 -CIRCUITPY_RGBMATRIX = 0 CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_IMAGECAPTURE = 0 CIRCUITPY_PARALLELDISPLAY = 0 CIRCUITPY_TOUCHIO ?= 1 CIRCUITPY_TOUCHIO_USE_NATIVE = 0 +else ifeq ($(IDF_TARGET),esp32s3) +CIRCUITPY_IMAGECAPTURE = 0 +CIRCUITPY_PARALLELDISPLAY = 0 endif -# From the ESP32-S2 datasheet: +# From ESP32-S2/S3 Technical Reference Manual: # # Endpoint number 0 always present (bi-directional, consisting of EP0 IN and EP0 OUT) # Six additional endpoints (endpoint numbers 1 to 6), configurable as IN or OUT diff --git a/ports/espressif/mphalport.c b/ports/espressif/mphalport.c index f22856f0a4..39b080fba3 100644 --- a/ports/espressif/mphalport.c +++ b/ports/espressif/mphalport.c @@ -25,22 +25,17 @@ * THE SOFTWARE. */ -#include - #include "py/mphal.h" -#include "py/mpstate.h" -#include "py/gc.h" - -#include "esp_debug_helpers.h" +#include "supervisor/cpu.h" #ifdef CONFIG_IDF_TARGET_ESP32C3 #include "components/esp_rom/include/esp32c3/rom/ets_sys.h" -#elif CONFIG_IDF_TARGET_ESP32S2 +#elif defined(CONFIG_IDF_TARGET_ESP32S2) #include "components/esp_rom/include/esp32s2/rom/ets_sys.h" +#elif defined(CONFIG_IDF_TARGET_ESP32S3) +#include "components/esp_rom/include/esp32s3/rom/ets_sys.h" #endif -#include "supervisor/cpu.h" - void mp_hal_delay_us(mp_uint_t delay) { ets_delay_us(delay); } diff --git a/ports/espressif/peripherals/esp32s3/pins.c b/ports/espressif/peripherals/esp32s3/pins.c new file mode 100644 index 0000000000..891cc398ae --- /dev/null +++ b/ports/espressif/peripherals/esp32s3/pins.c @@ -0,0 +1,73 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 microDev + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "peripherals/pins.h" + +const mcu_pin_obj_t pin_GPIO0 = PIN(0, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO1 = PIN(1, ADC_UNIT_1, ADC_CHANNEL_0, TOUCH_PAD_NUM1); +const mcu_pin_obj_t pin_GPIO2 = PIN(2, ADC_UNIT_1, ADC_CHANNEL_1, TOUCH_PAD_NUM2); +const mcu_pin_obj_t pin_GPIO3 = PIN(3, ADC_UNIT_1, ADC_CHANNEL_2, TOUCH_PAD_NUM3); +const mcu_pin_obj_t pin_GPIO4 = PIN(4, ADC_UNIT_1, ADC_CHANNEL_3, TOUCH_PAD_NUM4); +const mcu_pin_obj_t pin_GPIO5 = PIN(5, ADC_UNIT_1, ADC_CHANNEL_4, TOUCH_PAD_NUM5); +const mcu_pin_obj_t pin_GPIO6 = PIN(6, ADC_UNIT_1, ADC_CHANNEL_5, TOUCH_PAD_NUM6); +const mcu_pin_obj_t pin_GPIO7 = PIN(7, ADC_UNIT_1, ADC_CHANNEL_6, TOUCH_PAD_NUM7); +const mcu_pin_obj_t pin_GPIO8 = PIN(8, ADC_UNIT_1, ADC_CHANNEL_7, TOUCH_PAD_NUM8); +const mcu_pin_obj_t pin_GPIO9 = PIN(9, ADC_UNIT_1, ADC_CHANNEL_8, TOUCH_PAD_NUM9); +const mcu_pin_obj_t pin_GPIO10 = PIN(10, ADC_UNIT_1, ADC_CHANNEL_9, TOUCH_PAD_NUM10); +const mcu_pin_obj_t pin_GPIO11 = PIN(11, ADC_UNIT_2, ADC_CHANNEL_0, TOUCH_PAD_NUM11); +const mcu_pin_obj_t pin_GPIO12 = PIN(12, ADC_UNIT_2, ADC_CHANNEL_1, TOUCH_PAD_NUM12); +const mcu_pin_obj_t pin_GPIO13 = PIN(13, ADC_UNIT_2, ADC_CHANNEL_2, TOUCH_PAD_NUM13); +const mcu_pin_obj_t pin_GPIO14 = PIN(14, ADC_UNIT_2, ADC_CHANNEL_3, TOUCH_PAD_NUM14); +const mcu_pin_obj_t pin_GPIO15 = PIN(15, ADC_UNIT_2, ADC_CHANNEL_4, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO16 = PIN(16, ADC_UNIT_2, ADC_CHANNEL_5, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO17 = PIN(17, ADC_UNIT_2, ADC_CHANNEL_6, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO18 = PIN(18, ADC_UNIT_2, ADC_CHANNEL_7, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO19 = PIN(19, ADC_UNIT_2, ADC_CHANNEL_8, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO20 = PIN(20, ADC_UNIT_2, ADC_CHANNEL_9, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO21 = PIN(21, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO26 = PIN(26, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO27 = PIN(27, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO28 = PIN(28, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO29 = PIN(29, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO30 = PIN(30, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO31 = PIN(31, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO32 = PIN(32, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO33 = PIN(33, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO34 = PIN(34, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO35 = PIN(35, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO36 = PIN(36, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO37 = PIN(37, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO38 = PIN(38, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO39 = PIN(39, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO40 = PIN(40, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO41 = PIN(41, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO42 = PIN(42, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO43 = PIN(43, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO44 = PIN(44, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO45 = PIN(45, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO46 = PIN(46, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO47 = PIN(47, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); +const mcu_pin_obj_t pin_GPIO48 = PIN(48, NO_ADC, NO_ADC_CHANNEL, NO_TOUCH_CHANNEL); diff --git a/ports/espressif/peripherals/esp32s3/pins.h b/ports/espressif/peripherals/esp32s3/pins.h new file mode 100644 index 0000000000..c2a932f572 --- /dev/null +++ b/ports/espressif/peripherals/esp32s3/pins.h @@ -0,0 +1,80 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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. + */ + +// DO NOT include this file directly. +// Use shared-bindings/microcontroller/Pin.h instead. +// This ensures that all necessary includes are already included. + +#ifndef MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_ESP32S3_PINS_H +#define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_ESP32S3_PINS_H + +extern const mcu_pin_obj_t pin_GPIO0; +extern const mcu_pin_obj_t pin_GPIO1; +extern const mcu_pin_obj_t pin_GPIO2; +extern const mcu_pin_obj_t pin_GPIO3; +extern const mcu_pin_obj_t pin_GPIO4; +extern const mcu_pin_obj_t pin_GPIO5; +extern const mcu_pin_obj_t pin_GPIO6; +extern const mcu_pin_obj_t pin_GPIO7; +extern const mcu_pin_obj_t pin_GPIO8; +extern const mcu_pin_obj_t pin_GPIO9; +extern const mcu_pin_obj_t pin_GPIO10; +extern const mcu_pin_obj_t pin_GPIO11; +extern const mcu_pin_obj_t pin_GPIO12; +extern const mcu_pin_obj_t pin_GPIO13; +extern const mcu_pin_obj_t pin_GPIO14; +extern const mcu_pin_obj_t pin_GPIO15; +extern const mcu_pin_obj_t pin_GPIO16; +extern const mcu_pin_obj_t pin_GPIO17; +extern const mcu_pin_obj_t pin_GPIO18; +extern const mcu_pin_obj_t pin_GPIO19; +extern const mcu_pin_obj_t pin_GPIO20; +extern const mcu_pin_obj_t pin_GPIO21; +extern const mcu_pin_obj_t pin_GPIO26; +extern const mcu_pin_obj_t pin_GPIO27; +extern const mcu_pin_obj_t pin_GPIO28; +extern const mcu_pin_obj_t pin_GPIO29; +extern const mcu_pin_obj_t pin_GPIO30; +extern const mcu_pin_obj_t pin_GPIO31; +extern const mcu_pin_obj_t pin_GPIO32; +extern const mcu_pin_obj_t pin_GPIO33; +extern const mcu_pin_obj_t pin_GPIO34; +extern const mcu_pin_obj_t pin_GPIO35; +extern const mcu_pin_obj_t pin_GPIO36; +extern const mcu_pin_obj_t pin_GPIO37; +extern const mcu_pin_obj_t pin_GPIO38; +extern const mcu_pin_obj_t pin_GPIO39; +extern const mcu_pin_obj_t pin_GPIO40; +extern const mcu_pin_obj_t pin_GPIO41; +extern const mcu_pin_obj_t pin_GPIO42; +extern const mcu_pin_obj_t pin_GPIO43; +extern const mcu_pin_obj_t pin_GPIO44; +extern const mcu_pin_obj_t pin_GPIO45; +extern const mcu_pin_obj_t pin_GPIO46; +extern const mcu_pin_obj_t pin_GPIO47; +extern const mcu_pin_obj_t pin_GPIO48; + +#endif // MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_ESP32S3_PINS_H diff --git a/ports/espressif/peripherals/pcnt.h b/ports/espressif/peripherals/pcnt.h index 86a90b4444..b2bae7b371 100644 --- a/ports/espressif/peripherals/pcnt.h +++ b/ports/espressif/peripherals/pcnt.h @@ -28,6 +28,7 @@ #define MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_PCNT_HANDLER_H #include "driver/pcnt.h" +#include "soc/pcnt_struct.h" extern int peripherals_pcnt_init(pcnt_config_t pcnt_config); extern void peripherals_pcnt_deinit(pcnt_unit_t *unit); diff --git a/ports/espressif/peripherals/pins.h b/ports/espressif/peripherals/pins.h index 3bd66d49ac..4958c46410 100644 --- a/ports/espressif/peripherals/pins.h +++ b/ports/espressif/peripherals/pins.h @@ -67,8 +67,10 @@ extern const mp_obj_type_t mcu_pin_type; // Choose based on chip #ifdef CONFIG_IDF_TARGET_ESP32C3 #include "esp32c3/pins.h" -#elif CONFIG_IDF_TARGET_ESP32S2 +#elif defined(CONFIG_IDF_TARGET_ESP32S2) #include "esp32s2/pins.h" +#elif defined(CONFIG_IDF_TARGET_ESP32S3) +#include "esp32s3/pins.h" #endif #endif // MICROPY_INCLUDED_ESPRESSIF_PERIPHERALS_PINS_H diff --git a/ports/espressif/supervisor/port.c b/ports/espressif/supervisor/port.c index 30106075e7..5567f83c0c 100644 --- a/ports/espressif/supervisor/port.c +++ b/ports/espressif/supervisor/port.c @@ -51,6 +51,8 @@ #include "supervisor/background_callback.h" #include "supervisor/memory.h" #include "supervisor/shared/tick.h" +#include "shared-bindings/microcontroller/__init__.h" +#include "shared-bindings/microcontroller/RunMode.h" #include "shared-bindings/rtc/__init__.h" #include "peripherals/rmt.h" @@ -58,6 +60,9 @@ #if CIRCUITPY_COUNTIO || CIRCUITPY_ROTARYIO || CIRCUITPY_FREQUENCYIO #include "peripherals/pcnt.h" +#endif + +#if CIRCUITPY_TOUCHIO_USE_NATIVE #include "peripherals/touch.h" #endif @@ -69,19 +74,28 @@ #include "cam.h" #endif -#include "esp_heap_caps.h" -#include "esp_debug_helpers.h" - #include "soc/cache_memory.h" #include "soc/rtc_cntl_reg.h" -#ifdef CONFIG_IDF_TARGET_ESP32C3 -#include "components/esp_rom/include/esp32c3/rom/ets_sys.h" -#elif CONFIG_IDF_TARGET_ESP32S2 -#include "components/esp_rom/include/esp32s2/rom/ets_sys.h" +#include "esp_debug_helpers.h" + +#include "esp_ipc.h" + +#ifdef CONFIG_SPIRAM +#include "esp32/spiram.h" #endif +// Heap sizes for when there is no external RAM for CircuitPython to use +// exclusively. +#ifdef CONFIG_IDF_TARGET_ESP32S2 #define HEAP_SIZE (48 * 1024) +#endif +#ifdef CONFIG_IDF_TARGET_ESP32S3 +#define HEAP_SIZE (176 * 1024) +#endif +#ifdef CONFIG_IDF_TARGET_ESP32C3 +#define HEAP_SIZE (88 * 1024) +#endif uint32_t *heap; uint32_t heap_size; @@ -93,7 +107,7 @@ TaskHandle_t circuitpython_task = NULL; extern void esp_restart(void) NORETURN; -STATIC void tick_timer_cb(void *arg) { +STATIC void tick_on_cp_core(void *arg) { supervisor_tick(); // CircuitPython's VM is run in a separate FreeRTOS task from timer callbacks. So, we have to @@ -101,6 +115,18 @@ STATIC void tick_timer_cb(void *arg) { xTaskNotifyGive(circuitpython_task); } +// This function may happen on the PRO core when CP is on the APP core. So, make +// sure we run on the CP core. +STATIC void tick_timer_cb(void *arg) { + #if defined(CONFIG_FREERTOS_UNICORE) && CONFIG_FREERTOS_UNICORE + tick_on_cp_core(arg); + #else + // This only blocks until the start of the function. That's ok since the PRO + // core shouldn't care what we do. + esp_ipc_call(CONFIG_ESP_MAIN_TASK_AFFINITY, tick_on_cp_core, NULL); + #endif +} + void sleep_timer_cb(void *arg); safe_mode_t port_init(void) { @@ -136,7 +162,7 @@ safe_mode_t port_init(void) { #ifdef CONFIG_IDF_TARGET_ESP32C3 common_hal_never_reset_pin(&pin_GPIO20); common_hal_never_reset_pin(&pin_GPIO21); - #elif CONFIG_IDF_TARGET_ESP32S2 + #elif defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) common_hal_never_reset_pin(&pin_GPIO43); common_hal_never_reset_pin(&pin_GPIO44); #endif @@ -153,7 +179,7 @@ safe_mode_t port_init(void) { common_hal_never_reset_pin(&pin_GPIO5); common_hal_never_reset_pin(&pin_GPIO6); common_hal_never_reset_pin(&pin_GPIO7); - #elif CONFIG_IDF_TARGET_ESP32S2 + #elif defined(CONFIG_IDF_TARGET_ESP32S2) || defined(CONFIG_IDF_TARGET_ESP32S3) common_hal_never_reset_pin(&pin_GPIO39); common_hal_never_reset_pin(&pin_GPIO40); common_hal_never_reset_pin(&pin_GPIO41); @@ -162,8 +188,11 @@ safe_mode_t port_init(void) { #endif #ifdef CONFIG_SPIRAM - heap = (uint32_t *)(DRAM0_CACHE_ADDRESS_HIGH - CONFIG_SPIRAM_SIZE); - heap_size = CONFIG_SPIRAM_SIZE / sizeof(uint32_t); + if (esp_spiram_is_initialized()) { + size_t spiram_size = esp_spiram_get_size(); + heap = (uint32_t *)(SOC_EXTRAM_DATA_HIGH - spiram_size); + heap_size = spiram_size / sizeof(uint32_t); + } #endif if (heap == NULL) { @@ -260,6 +289,7 @@ void reset_port(void) { } void reset_to_bootloader(void) { + common_hal_mcu_on_next_reset(RUNMODE_BOOTLOADER); esp_restart(); } diff --git a/ports/espressif/supervisor/usb.c b/ports/espressif/supervisor/usb.c index 2137a7b0a4..30f9be82a3 100644 --- a/ports/espressif/supervisor/usb.c +++ b/ports/espressif/supervisor/usb.c @@ -33,6 +33,7 @@ #include "shared/readline/readline.h" #include "hal/gpio_ll.h" +#include "hal/usb_hal.h" #include "soc/usb_periph.h" #include "components/driver/include/driver/gpio.h" @@ -40,15 +41,15 @@ #ifdef CONFIG_IDF_TARGET_ESP32C3 #include "components/esp_rom/include/esp32c3/rom/gpio.h" -#elif CONFIG_IDF_TARGET_ESP32S2 +#elif defined(CONFIG_IDF_TARGET_ESP32S2) #include "components/esp_rom/include/esp32s2/rom/gpio.h" +#elif defined(CONFIG_IDF_TARGET_ESP32S3) +#include "components/esp_rom/include/esp32s3/rom/gpio.h" #endif #include "freertos/FreeRTOS.h" #include "freertos/task.h" -#include "hal/usb_hal.h" - #include "tusb.h" #ifdef CFG_TUSB_DEBUG @@ -108,13 +109,16 @@ void init_usb_hardware(void) { usb_hal_init(&hal); configure_pins(&hal); - (void)xTaskCreateStatic(usb_device_task, + // Pin the USB task to the same core as CircuitPython. This way we leave + // the other core for networking. + (void)xTaskCreateStaticPinnedToCore(usb_device_task, "usbd", USBD_STACK_SIZE, NULL, 5, usb_device_stack, - &usb_device_taskdef); + &usb_device_taskdef, + xPortGetCoreID()); } /** diff --git a/ports/espressif/tools/generate_all_sdkconfig.py b/ports/espressif/tools/generate_all_sdkconfig.py new file mode 100644 index 0000000000..a3589c34bb --- /dev/null +++ b/ports/espressif/tools/generate_all_sdkconfig.py @@ -0,0 +1,25 @@ +import pathlib +import sys +import shlex +import shutil +import subprocess + +output_dir = pathlib.Path(sys.argv[-1]) +output_dir.mkdir(parents=True, exist_ok=True) + + +def run(cmd): + subprocess.run(shlex.split(cmd), capture_output=True) + + +for board in pathlib.Path("boards/").glob("*/"): + board = board.name + print(board) + run(f"make BOARD={board} DEBUG=1 build-{board}/esp-idf/config/sdkconfig.h") + shutil.copyfile(f"build-{board}/esp-idf/sdkconfig", output_dir / (board + "-debug.sdkconfig")) + # run(f"python tools/update_sdkconfig.py --board={board} --update_all --debug=1") + run(f"make BOARD={board} DEBUG=1 clean") + run(f"make BOARD={board} build-{board}/esp-idf/config/sdkconfig.h") + shutil.copyfile(f"build-{board}/esp-idf/sdkconfig", output_dir / (board + "-opt.sdkconfig")) + # run(f"python tools/update_sdkconfig.py --board={board} --update_all") + run(f"make BOARD={board} clean") diff --git a/ports/espressif/tools/update_sdkconfig.py b/ports/espressif/tools/update_sdkconfig.py new file mode 100644 index 0000000000..ce174fd12a --- /dev/null +++ b/ports/espressif/tools/update_sdkconfig.py @@ -0,0 +1,181 @@ +"""This script updates the sdkconfigs based on the menuconfig results in a given + build.""" + +import pathlib +import click + +OPT_SETTINGS = [ + "CONFIG_ESP_ERR_TO_NAME_LOOKUP", + "CONFIG_ESP_CONSOLE_", + "CONFIG_CONSOLE_UART_", + "CONFIG_ESP_SYSTEM_PANIC_", + "CONFIG_ESP32S2_PANIC_", + "COMPILER_OPTIMIZATION_", + "CONFIG_ESP32S3_DEBUG_OCDAWARE", + "CONFIG_FREERTOS_ASSERT_", + "CONFIG_FREERTOS_DEBUG_OCDAWARE", + "CONFIG_FREERTOS_TASK_FUNCTION_WRAPPER", + "CONFIG_HAL_ASSERTION_", + "CONFIG_LWIP_ESP_LWIP_ASSERT", + "CONFIG_OPTIMIZATION_ASSERTION_LEVEL", + "CONFIG_OPTIMIZATION_ASSERTIONS_", + "CONFIG_HAL_DEFAULT_ASSERTION_LEVEL", +] + +TARGET_SETTINGS = [ + "CONFIG_IDF_TARGET", + "CONFIG_IDF_FIRMWARE_CHIP_ID", + "CONFIG_BOOTLOADER_OFFSET_IN_FLASH", + "CONFIG_ESP32_", + "CONFIG_ESP32C3_", + "CONFIG_ESP32S2_", + "CONFIG_ESP32S3_", + "CONFIG_ESP32H2_", + "CONFIG_ESP_SLEEP_POWER_DOWN_FLASH", + "CONFIG_ESP_SYSTEM_SINGLE_CORE_MODE", + "CONFIG_ESP_SYSTEM_MEMPROT_", + "CONFIG_ESP_MAIN_TASK_AFFINITY", + "CONFIG_ESP_WIFI_EXTERNAL_COEXIST_ENABLE", + "CONFIG_FREERTOS_UNICORE", + "CONFIG_FREERTOS_TICK_SUPPORT_CORETIMER", + "CONFIG_FREERTOS_CORETIMER_0", + "CONFIG_FREERTOS_CORETIMER_1", + "CONFIG_FREERTOS_SYSTICK_USES_CCOUNT", + "CONFIG_FREERTOS_OPTIMIZED_SCHEDULER", + "CONFIG_MBEDTLS_HARDWARE_GCM", + "CONFIG_ESP_SYSTEM_PD_FLASH", + "CONFIG_EXTERNAL_COEX_ENABLE", + "CONFIG_SDK_TOOLPREFIX", + "CONFIG_TOOLPREFIX", + "ESP_SLEEP_GPIO_RESET_WORKAROUND", + "CONFIG_ESP_PHY_ENABLE_USB", +] + +BOARD_SETTINGS = [ + "PSRAM clock and cs IO for ESP32S3", + "CONFIG_SPIRAM", + "CONFIG_DEFAULT_PSRAM_", + "_SPIRAM_SUPPORT", + "CONFIG_LWIP_LOCAL_HOSTNAME", +] + +FLASH_SETTINGS = [ + "CONFIG_ESPTOOLPY_FLASHSIZE", + "CONFIG_PARTITION_TABLE_CUSTOM_FILENAME", + "CONFIG_PARTITION_TABLE_FILENAME", +] + +# boards/lilygo_ttgo_t8_s2_st7789/sdkconfig +# CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y + +# boards/morpheans_morphesp-240/sdkconfig +# CONFIG_LWIP_DNS_SUPPORT_MDNS_QUERIES=y + + +def matches_group(line, group): + for setting in group: + if setting in line: + return True + return False + + +def add_group(lines, last_group, current_group): + if last_group != current_group: + if last_group: + lines.append("# end of " + last_group) + lines.append("") + return None + if current_group: + lines.append("#") + lines.append("# " + current_group) + lines.append("#") + return current_group + return last_group + + +@click.command() +@click.option("--debug") +@click.option("--board") +@click.option( + "--update_all", + is_flag=True, + default=False, + help="Updates the sdkconfigs outside of the board directory.", +) +def update(debug, board, update_all): + """Simple program that greets NAME for a total of COUNT times.""" + + board_make = pathlib.Path(f"boards/{board}/mpconfigboard.mk") + for line in board_make.read_text().split("\n"): + if line.startswith("IDF_TARGET"): + target = line.split("=")[1].strip() + elif line.startswith("CIRCUITPY_ESP_FLASH_SIZE"): + flash = line.split("=")[1].strip() + + input_config = pathlib.Path(f"build-{board}/esp-idf/sdkconfig") + default_config = pathlib.Path("esp-idf-config/sdkconfig.defaults") + if debug: + opt_config = pathlib.Path("esp-idf-config/sdkconfig-debug.defaults") + else: + opt_config = pathlib.Path("esp-idf-config/sdkconfig-opt.defaults") + flash_config = pathlib.Path(f"esp-idf-config/sdkconfig-{flash}.defaults") + target_config = pathlib.Path(f"esp-idf-config/sdkconfig-{target}.defaults") + board_config = pathlib.Path(f"boards/{board}/sdkconfig") + + defaults = default_config.read_text().split("\n") + defaults.extend(opt_config.read_text().split("\n")) + defaults.extend(flash_config.read_text().split("\n")) + defaults.extend(target_config.read_text().split("\n")) + + board_settings = [] + last_board_group = None + flash_settings = [] + last_flash_group = None + opt_settings = [] + last_opt_group = None + target_settings = [] + last_target_group = None + default_settings = [] + last_default_group = None + current_group = None + for line in input_config.read_text().split("\n"): + if line.startswith("# ") and "CONFIG_" not in line and len(line) > 3: + if line.startswith("# end of"): + current_group = None + else: + current_group = line[2:] + elif (not update_all and line not in defaults) or ( + update_all and matches_group(line, BOARD_SETTINGS) + ): + last_board_group = add_group(board_settings, last_board_group, current_group) + board_settings.append(line) + elif update_all: + if matches_group(line, OPT_SETTINGS): + last_opt_group = add_group(opt_settings, last_opt_group, current_group) + opt_settings.append(line) + elif matches_group(line, FLASH_SETTINGS): + last_flash_group = add_group(flash_settings, last_flash_group, current_group) + flash_settings.append(line) + elif matches_group(line, TARGET_SETTINGS): + last_target_group = add_group(target_settings, last_target_group, current_group) + target_settings.append(line) + elif "CONFIG_" in line: + last_default_group = add_group(default_settings, last_default_group, current_group) + default_settings.append(line) + + add_group(board_settings, last_board_group, current_group) + add_group(opt_settings, last_opt_group, current_group) + add_group(flash_settings, last_flash_group, current_group) + add_group(target_settings, last_target_group, current_group) + add_group(default_settings, last_default_group, current_group) + + board_config.write_text("\n".join(board_settings)) + if update_all: + flash_config.write_text("\n".join(flash_settings)) + opt_config.write_text("\n".join(opt_settings)) + default_config.write_text("\n".join(default_settings)) + target_config.write_text("\n".join(target_settings)) + + +if __name__ == "__main__": + update() diff --git a/ports/litex/mpconfigport.mk b/ports/litex/mpconfigport.mk index ce6ed08841..57f5113b69 100644 --- a/ports/litex/mpconfigport.mk +++ b/ports/litex/mpconfigport.mk @@ -1,8 +1,3 @@ -# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk -# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. -# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz - # Internal math library is substantially smaller than toolchain one INTERNAL_LIBM = 1 diff --git a/ports/mimxrt10xx/Makefile b/ports/mimxrt10xx/Makefile index dd691a12e9..0ac74579a7 100644 --- a/ports/mimxrt10xx/Makefile +++ b/ports/mimxrt10xx/Makefile @@ -156,7 +156,7 @@ SRC_C += \ boards/$(BOARD)/flash_config.c \ boards/$(BOARD)/pins.c \ fatfs_port.c \ - lib/tinyusb/src/portable/nxp/transdimension/dcd_transdimension.c \ + lib/tinyusb/src/portable/chipidea/ci_hs/dcd_ci_hs.c \ mphalport.c \ peripherals/mimxrt10xx/$(CHIP_FAMILY)/clocks.c \ peripherals/mimxrt10xx/$(CHIP_FAMILY)/periph.c \ diff --git a/ports/mimxrt10xx/mpconfigport.mk b/ports/mimxrt10xx/mpconfigport.mk index ed9446d0e7..e7e7abe141 100644 --- a/ports/mimxrt10xx/mpconfigport.mk +++ b/ports/mimxrt10xx/mpconfigport.mk @@ -1,17 +1,5 @@ LD_FILE = $(FLASH).ld $(CHIP_FAMILY).ld imxrt10xx.ld -ifeq ($(LONGINT_IMPL),NONE) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none -endif - -ifeq ($(LONGINT_IMPL),MPZ) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz -endif - -ifeq ($(LONGINT_IMPL),LONGLONG) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong -endif - INTERNAL_LIBM = 1 USB_HIGHSPEED = 1 diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index 04a648a4e2..6db2b547c5 100755 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -239,6 +239,9 @@ SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_MOD) $(SRC_COMMON_HAL_EXPANDED) $(S # Sources that only hold QSTRs after pre-processing. SRC_QSTR_PREPROCESSOR += +UF2_FAMILY_ID_nrf52840 = 0xADA52840 +UF2_FAMILY_ID_nrf52833 = 0x621E937A + all: $(BUILD)/firmware.bin $(BUILD)/firmware.uf2 $(BUILD)/firmware.combined.hex @@ -264,7 +267,7 @@ $(BUILD)/firmware.combined.hex: $(BUILD)/firmware.hex $(SOFTDEV_HEX) $(BUILD)/firmware.uf2: $(BUILD)/firmware.hex $(ECHO) "Create $@" - $(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f 0xADA52840 -c -o "$(BUILD)/firmware.uf2" $^ + $(PYTHON) $(TOP)/tools/uf2/utils/uf2conv.py -f $(UF2_FAMILY_ID_$(MCU_CHIP)) -c -o "$(BUILD)/firmware.uf2" $^ diff --git a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/board.c b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/board.c new file mode 100644 index 0000000000..b4070e72dc --- /dev/null +++ b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/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" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} + +void board_deinit(void) { +} diff --git a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.h b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.h new file mode 100644 index 0000000000..8b3dd9ebb8 --- /dev/null +++ b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.h @@ -0,0 +1,54 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Glenn Ruben Bakke + * Copyright (c) 2018 Dan Halbert 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 "nrfx/hal/nrf_gpio.h" + +#define MICROPY_HW_BOARD_NAME "Seeed XIAO nRF52840 Sense" +#define MICROPY_HW_MCU_NAME "nRF52840" + +#define MICROPY_HW_LED_STATUS (&pin_P0_26) + +#if QSPI_FLASH_FILESYSTEM +#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 20) +#define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(0, 24) +#define MICROPY_QSPI_DATA2 NRF_GPIO_PIN_MAP(0, 22) +#define MICROPY_QSPI_DATA3 NRF_GPIO_PIN_MAP(0, 23) +#define MICROPY_QSPI_SCK NRF_GPIO_PIN_MAP(0, 21) +#define MICROPY_QSPI_CS NRF_GPIO_PIN_MAP(0, 25) +#endif + +#define BOARD_HAS_CRYSTAL 1 + +#define DEFAULT_I2C_BUS_SCL (&pin_P0_05) +#define DEFAULT_I2C_BUS_SDA (&pin_P0_04) + +#define DEFAULT_SPI_BUS_SCK (&pin_P1_13) +#define DEFAULT_SPI_BUS_MOSI (&pin_P1_15) +#define DEFAULT_SPI_BUS_MISO (&pin_P1_14) + +#define DEFAULT_UART_BUS_RX (&pin_P1_12) +#define DEFAULT_UART_BUS_TX (&pin_P1_11) diff --git a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk new file mode 100644 index 0000000000..228c5698f0 --- /dev/null +++ b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/mpconfigboard.mk @@ -0,0 +1,10 @@ +USB_VID = 0x2886 +USB_PID = 0x0045 +USB_PRODUCT = "Seeed XIAO nRF52840 Sense" +SOFTDEV_VERSION=7.0.1 +USB_MANUFACTURER = "Seeed" + +MCU_CHIP = nrf52840 + +QSPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = "P25Q16H" diff --git a/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c new file mode 100644 index 0000000000..5d2e9226ca --- /dev/null +++ b/ports/nrf/boards/Seeed_XIAO_nRF52840_Sense/pins.c @@ -0,0 +1,59 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_05) }, + + { MP_ROM_QSTR(MP_QSTR_NFC1), MP_ROM_PTR(&pin_P0_09) }, + { MP_ROM_QSTR(MP_QSTR_NFC2), MP_ROM_PTR(&pin_P0_10) }, + + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_P1_12) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_P1_14) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_P1_15) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P1_13) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P1_15) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P1_14) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P1_11) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P1_12) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_04) }, + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_LED_RED), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_LED_BLUE), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_LED_GREEN), MP_ROM_PTR(&pin_P0_30) }, + + { MP_ROM_QSTR(MP_QSTR_IMU_PWR), MP_ROM_PTR(&pin_P1_08) }, + { MP_ROM_QSTR(MP_QSTR_IMU_SCL), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_IMU_SDA), MP_ROM_PTR(&pin_P0_07) }, + { MP_ROM_QSTR(MP_QSTR_IMU_INT1), MP_ROM_PTR(&pin_P0_11) }, + + { MP_ROM_QSTR(MP_QSTR_MIC_PWR), MP_ROM_PTR(&pin_P1_10) }, + { MP_ROM_QSTR(MP_QSTR_PDM_CLK), MP_ROM_PTR(&pin_P1_00) }, + { MP_ROM_QSTR(MP_QSTR_PDM_DATA), MP_ROM_PTR(&pin_P0_16) }, + + {MP_ROM_QSTR(MP_QSTR_READ_BATT_ENABLE),MP_ROM_PTR(&pin_P0_14)}, + {MP_ROM_QSTR(MP_QSTR_VBATT),MP_ROM_PTR(&pin_P0_31)}, + {MP_ROM_QSTR(MP_QSTR_CHARGE_STATUS),MP_ROM_PTR(&pin_P0_17)}, + + { 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/bluemicro833/board.c b/ports/nrf/boards/bluemicro833/board.c new file mode 100644 index 0000000000..104cea6274 --- /dev/null +++ b/ports/nrf/boards/bluemicro833/board.c @@ -0,0 +1,65 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2018 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 "py/obj.h" +#include "peripherals/nrf/pins.h" +#include "supervisor/shared/board.h" + +#include "nrf_gpio.h" + +void board_init(void) { + // "never_reset" the pin here because CircuitPython will try to reset pins after a VM run otherwise. + never_reset_pin_number(POWER_SWITCH_PIN->number); + // Turn on power to sensors and neopixels. + nrf_gpio_cfg(POWER_SWITCH_PIN->number, + NRF_GPIO_PIN_DIR_OUTPUT, + NRF_GPIO_PIN_INPUT_DISCONNECT, + NRF_GPIO_PIN_NOPULL, + NRF_GPIO_PIN_S0S1, + NRF_GPIO_PIN_NOSENSE); + nrf_gpio_pin_write(POWER_SWITCH_PIN->number, true); +} + +void board_deinit(void) { + // Turn off power to sensors and neopixels. + nrf_gpio_cfg(POWER_SWITCH_PIN->number, + NRF_GPIO_PIN_DIR_OUTPUT, + NRF_GPIO_PIN_INPUT_DISCONNECT, + NRF_GPIO_PIN_NOPULL, + NRF_GPIO_PIN_S0S1, + NRF_GPIO_PIN_NOSENSE); + nrf_gpio_pin_write(POWER_SWITCH_PIN->number, false); +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + +} diff --git a/ports/nrf/boards/bluemicro833/mpconfigboard.h b/ports/nrf/boards/bluemicro833/mpconfigboard.h new file mode 100644 index 0000000000..2340cdc988 --- /dev/null +++ b/ports/nrf/boards/bluemicro833/mpconfigboard.h @@ -0,0 +1,60 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2016 Glenn Ruben Bakke + * Copyright (c) 2018 Dan Halbert 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 "nrfx/hal/nrf_gpio.h" + +#define MICROPY_HW_BOARD_NAME "BlueMicro833" +#define MICROPY_HW_MCU_NAME "nRF52833" + +#define MICROPY_HW_NEOPIXEL (&pin_P0_07) +#define MICROPY_HW_LED_STATUS (&pin_P0_25) +#define MICROPY_HW_NEOPIXEL_COUNT (1) + + +#define CIRCUITPY_INTERNAL_NVM_SIZE 0 +#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (60 * 1024) + +#define CIRCUITPY_BLE_CONFIG_SIZE (12 * 1024) + +#define BOARD_HAS_CRYSTAL 1 + +// Take 1k RAM to save 1k flash. +#define CIRCUITPY_PRECOMPUTE_QSTR_ATTR (0) + +// Reduce nRF SoftRadio memory usage +#define BLEIO_VS_UUID_COUNT 10 +#define BLEIO_HVN_TX_QUEUE_SIZE 2 +#define BLEIO_CENTRAL_ROLE_COUNT 2 +#define BLEIO_PERIPH_ROLE_COUNT 2 +#define BLEIO_TOTAL_CONNECTION_COUNT 2 +#define BLEIO_ATTR_TAB_SIZE (BLE_GATTS_ATTR_TAB_SIZE_DEFAULT * 2) + +#define SOFTDEVICE_RAM_SIZE (32 * 1024) + +#define MICROPY_FATFS_EXFAT 0 + +#define POWER_SWITCH_PIN (&pin_P0_12) diff --git a/ports/nrf/boards/bluemicro833/mpconfigboard.mk b/ports/nrf/boards/bluemicro833/mpconfigboard.mk new file mode 100644 index 0000000000..71ae39ee80 --- /dev/null +++ b/ports/nrf/boards/bluemicro833/mpconfigboard.mk @@ -0,0 +1,51 @@ +USB_VID = 0x1D50 +USB_PID = 0x6152 +USB_PRODUCT = "BlueMicro833" +USB_MANUFACTURER = "nrf52.jpconstantineau.com" + +MCU_CHIP = nrf52833 + +INTERNAL_FLASH_FILESYSTEM = 1 + +CIRCUITPY_AESIO = 0 +CIRCUITPY_ALARM = 0 +CIRCUITPY_AUDIOBUSIO = 0 +#CIRCUITPY_AUDIOCORE = 0 +#CIRCUITPY_AUDIOIO = 0 +CIRCUITPY_AUDIOMIXER = 0 +CIRCUITPY_AUDIOMP3 = 0 +CIRCUITPY_BINASCII = 0 +CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_BITMAPTOOLS = 0 +CIRCUITPY_BUILTINS_POW3=0 +CIRCUITPY_BUSDEVICE = 0 +CIRCUITPY_COUNTIO = 0 +CIRCUITPY_DISPLAYIO = 0 +CIRCUITPY_FRAMEBUFFERIO = 0 +CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_IS31FL3741 = 0 +CIRCUITPY_JSON = 0 +CIRCUITPY_KEYPAD = 1 +CIRCUITPY_MSGPACK = 0 +#CIRCUITPY_NEOPIXEL_WRITE = 1 +CIRCUITPY_ONEWIREIO = 0 +CIRCUITPY_NVM = 0 +CIRCUITPY_PIXELBUF = 1 +CIRCUITPY_PULSEIO = 1 +CIRCUITPY_RE = 0 +CIRCUITPY_RGBMATRIX = 0 +CIRCUITPY_SDCARDIO = 0 +CIRCUITPY_SYNTHIO = 0 +CIRCUITPY_TOUCHIO = 0 +CIRCUITPY_ULAB = 0 +CIRCUITPY_USB_MIDI = 0 +CIRCUITPY_VECTORIO = 0 + +MICROPY_PY_ASYNC_AWAIT = 0 + +SUPEROPT_GC = 0 +SUPEROPT_VM = 0 + +# Override optimization to keep binary small +OPTIMIZATION_FLAGS = -Os diff --git a/ports/nrf/boards/bluemicro833/pins.c b/ports/nrf/boards/bluemicro833/pins.c new file mode 100644 index 0000000000..e8c8cdcec5 --- /dev/null +++ b/ports/nrf/boards/bluemicro833/pins.c @@ -0,0 +1,70 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + { MP_ROM_QSTR(MP_QSTR_P0_02), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_P0_03), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_P0_04), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_P0_05), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_P0_06), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_P0_07), MP_ROM_PTR(&pin_P0_07) }, + { MP_ROM_QSTR(MP_QSTR_P0_08), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_P0_09), MP_ROM_PTR(&pin_P0_09) }, + { MP_ROM_QSTR(MP_QSTR_P0_10), MP_ROM_PTR(&pin_P0_10) }, + { MP_ROM_QSTR(MP_QSTR_P0_11), MP_ROM_PTR(&pin_P0_11) }, + { MP_ROM_QSTR(MP_QSTR_P0_12), MP_ROM_PTR(&pin_P0_12) }, + { MP_ROM_QSTR(MP_QSTR_P0_13), MP_ROM_PTR(&pin_P0_13) }, + { MP_ROM_QSTR(MP_QSTR_P0_14), MP_ROM_PTR(&pin_P0_14) }, + { MP_ROM_QSTR(MP_QSTR_P0_15), MP_ROM_PTR(&pin_P0_15) }, + { MP_ROM_QSTR(MP_QSTR_P0_16), MP_ROM_PTR(&pin_P0_16) }, + { MP_ROM_QSTR(MP_QSTR_P0_17), MP_ROM_PTR(&pin_P0_17) }, + { MP_ROM_QSTR(MP_QSTR_P0_19), MP_ROM_PTR(&pin_P0_19) }, + { MP_ROM_QSTR(MP_QSTR_P0_20), MP_ROM_PTR(&pin_P0_20) }, + { MP_ROM_QSTR(MP_QSTR_P0_21), MP_ROM_PTR(&pin_P0_21) }, + { MP_ROM_QSTR(MP_QSTR_P0_22), MP_ROM_PTR(&pin_P0_22) }, + { MP_ROM_QSTR(MP_QSTR_P0_23), MP_ROM_PTR(&pin_P0_23) }, + { MP_ROM_QSTR(MP_QSTR_P0_24), MP_ROM_PTR(&pin_P0_24) }, + { MP_ROM_QSTR(MP_QSTR_P0_25), MP_ROM_PTR(&pin_P0_25) }, + { MP_ROM_QSTR(MP_QSTR_P0_26), MP_ROM_PTR(&pin_P0_26) }, + { MP_ROM_QSTR(MP_QSTR_P0_27), MP_ROM_PTR(&pin_P0_27) }, + { MP_ROM_QSTR(MP_QSTR_P0_28), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_P0_29), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_P0_30), MP_ROM_PTR(&pin_P0_30) }, + { MP_ROM_QSTR(MP_QSTR_P0_31), MP_ROM_PTR(&pin_P0_31) }, + { MP_ROM_QSTR(MP_QSTR_P1_00), MP_ROM_PTR(&pin_P1_00) }, + { MP_ROM_QSTR(MP_QSTR_P1_01), MP_ROM_PTR(&pin_P1_01) }, + { MP_ROM_QSTR(MP_QSTR_P1_02), MP_ROM_PTR(&pin_P1_02) }, + { MP_ROM_QSTR(MP_QSTR_P1_03), MP_ROM_PTR(&pin_P1_03) }, + { MP_ROM_QSTR(MP_QSTR_P1_04), MP_ROM_PTR(&pin_P1_04) }, + { MP_ROM_QSTR(MP_QSTR_P1_05), MP_ROM_PTR(&pin_P1_05) }, + { MP_ROM_QSTR(MP_QSTR_P1_06), MP_ROM_PTR(&pin_P1_06) }, + { MP_ROM_QSTR(MP_QSTR_P1_07), MP_ROM_PTR(&pin_P1_07) }, + { MP_ROM_QSTR(MP_QSTR_P1_08), MP_ROM_PTR(&pin_P1_08) }, + { MP_ROM_QSTR(MP_QSTR_P1_09), MP_ROM_PTR(&pin_P1_09) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_P0_02) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_P0_04) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_P0_05) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_P0_29) }, + { MP_ROM_QSTR(MP_QSTR_A6), MP_ROM_PTR(&pin_P0_30) }, + { MP_ROM_QSTR(MP_QSTR_A7), MP_ROM_PTR(&pin_P0_31) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_P0_15) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_P0_17) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_P0_08) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_P0_06) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_P0_03) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_P0_28) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P1_05) }, + { MP_ROM_QSTR(MP_QSTR_LED1), MP_ROM_PTR(&pin_P1_04) }, + { MP_ROM_QSTR(MP_QSTR_LED2), MP_ROM_PTR(&pin_P0_25) }, + { MP_ROM_QSTR(MP_QSTR_RED_LED), MP_ROM_PTR(&pin_P1_04) }, + { MP_ROM_QSTR(MP_QSTR_BLUE_LED), MP_ROM_PTR(&pin_P0_25) }, + { MP_ROM_QSTR(MP_QSTR_VCC_ON), MP_ROM_PTR(&pin_P0_12) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_P0_07) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + { 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_module_globals_table); diff --git a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c index da09d86648..4068689377 100644 --- a/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c +++ b/ports/nrf/boards/makerdiary_nrf52840_mdk_usb_dongle/pins.c @@ -25,6 +25,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_P10), MP_ROM_PTR(&pin_P0_10) }, { MP_ROM_QSTR(MP_QSTR_P18), MP_ROM_PTR(&pin_P0_18) }, // !Reset button. { MP_ROM_QSTR(MP_QSTR_P19), MP_ROM_PTR(&pin_P0_19) }, + { MP_ROM_QSTR(MP_QSTR_P20), MP_ROM_PTR(&pin_P0_20) }, + { MP_ROM_QSTR(MP_QSTR_P21), MP_ROM_PTR(&pin_P0_21) }, { MP_ROM_QSTR(MP_QSTR_P22), MP_ROM_PTR(&pin_P0_22) }, // green led, low is on. { MP_ROM_QSTR(MP_QSTR_P23), MP_ROM_PTR(&pin_P0_23) }, // red led, low is on. { MP_ROM_QSTR(MP_QSTR_P24), MP_ROM_PTR(&pin_P0_24) }, // blue led, low is on. diff --git a/ports/nrf/common-hal/countio/Counter.c b/ports/nrf/common-hal/countio/Counter.c index b2296a7dcc..32dc6af74b 100644 --- a/ports/nrf/common-hal/countio/Counter.c +++ b/ports/nrf/common-hal/countio/Counter.c @@ -18,45 +18,70 @@ static void _intr_handler(nrfx_gpiote_pin_t pin, nrf_gpiote_polarity_t action) { } void common_hal_countio_counter_construct(countio_counter_obj_t *self, - const mcu_pin_obj_t *pin_a) { + const mcu_pin_obj_t *pin, countio_edge_t edge, digitalio_pull_t pull) { - self->pin_a = pin_a->number; - _countio_objs[self->pin_a] = self; + self->pin = pin->number; + _countio_objs[self->pin] = self; self->count = 0; + nrf_gpiote_polarity_t polarity = NRF_GPIOTE_POLARITY_TOGGLE; + switch (edge) { + case EDGE_RISE: + polarity = NRF_GPIOTE_POLARITY_LOTOHI; + break; + case EDGE_FALL: + polarity = NRF_GPIOTE_POLARITY_HITOLO; + break; + case EDGE_RISE_AND_FALL: + default: + break; + } + + nrf_gpio_pin_pull_t hal_pull = NRF_GPIO_PIN_NOPULL; + switch (pull) { + case PULL_UP: + hal_pull = NRF_GPIO_PIN_PULLUP; + break; + case PULL_DOWN: + hal_pull = NRF_GPIO_PIN_PULLDOWN; + break; + case PULL_NONE: + default: + break; + } + nrfx_gpiote_in_config_t cfg = { - .sense = NRF_GPIOTE_POLARITY_HITOLO, - .pull = NRF_GPIO_PIN_PULLUP, + .sense = polarity, + .pull = hal_pull, .is_watcher = false, .hi_accuracy = true, - .skip_gpio_setup = false + .skip_gpio_setup = false, }; - - nrfx_err_t err = nrfx_gpiote_in_init(self->pin_a, &cfg, _intr_handler); + nrfx_err_t err = nrfx_gpiote_in_init(self->pin, &cfg, _intr_handler); if (err != NRFX_SUCCESS) { mp_raise_RuntimeError(translate("All channels in use")); } - nrfx_gpiote_in_event_enable(self->pin_a, true); + nrfx_gpiote_in_event_enable(self->pin, true); - claim_pin(pin_a); + claim_pin(pin); } bool common_hal_countio_counter_deinited(countio_counter_obj_t *self) { - return self->pin_a == NO_PIN; + return self->pin == NO_PIN; } void common_hal_countio_counter_deinit(countio_counter_obj_t *self) { if (common_hal_countio_counter_deinited(self)) { return; } - _countio_objs[self->pin_a] = NULL; + _countio_objs[self->pin] = NULL; - nrfx_gpiote_in_event_disable(self->pin_a); - nrfx_gpiote_in_uninit(self->pin_a); - reset_pin_number(self->pin_a); - self->pin_a = NO_PIN; + nrfx_gpiote_in_event_disable(self->pin); + nrfx_gpiote_in_uninit(self->pin); + reset_pin_number(self->pin); + self->pin = NO_PIN; } mp_int_t common_hal_countio_counter_get_count(countio_counter_obj_t *self) { @@ -67,7 +92,3 @@ void common_hal_countio_counter_set_count(countio_counter_obj_t *self, mp_int_t new_count) { self->count = new_count; } - -void common_hal_countio_counter_reset(countio_counter_obj_t *self) { - self->count = 0; -} diff --git a/ports/nrf/common-hal/countio/Counter.h b/ports/nrf/common-hal/countio/Counter.h index cf40a63a02..a90bea70d6 100644 --- a/ports/nrf/common-hal/countio/Counter.h +++ b/ports/nrf/common-hal/countio/Counter.h @@ -8,7 +8,7 @@ typedef struct { mp_obj_base_t base; - uint8_t pin_a; + uint8_t pin; mp_int_t count; } countio_counter_obj_t; diff --git a/ports/nrf/mpconfigport.mk b/ports/nrf/mpconfigport.mk index 55ade5562f..6f432c55ae 100644 --- a/ports/nrf/mpconfigport.mk +++ b/ports/nrf/mpconfigport.mk @@ -2,11 +2,6 @@ # parameters that vary based on chip and/or board. LD_TEMPLATE_FILE = boards/common.template.ld -# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk -# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. -# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz - INTERNAL_LIBM = 1 # Number of USB endpoint pairs. diff --git a/ports/raspberrypi/bindings/rp2pio/StateMachine.c b/ports/raspberrypi/bindings/rp2pio/StateMachine.c index 0815112c3d..3dcc6e927b 100644 --- a/ports/raspberrypi/bindings/rp2pio/StateMachine.c +++ b/ports/raspberrypi/bindings/rp2pio/StateMachine.c @@ -78,6 +78,7 @@ //| sideset_pin_count: int = 1, //| initial_sideset_pin_state: int = 0, //| initial_sideset_pin_direction: int = 0x1f, +//| sideset_enable: bool = False, //| exclusive_pin_use: bool = True, //| auto_pull: bool = False, //| pull_threshold: int = 32, @@ -107,9 +108,10 @@ //| :param int initial_set_pin_state: the initial output value for set pins starting at first_set_pin //| :param int initial_set_pin_direction: the initial output direction for set pins starting at first_set_pin //| :param ~microcontroller.Pin first_sideset_pin: the first pin to use with a side set -//| :param int sideset_pin_count: the count of consecutive pins to use with a side set starting at first_sideset_pin +//| :param int sideset_pin_count: the count of consecutive pins to use with a side set starting at first_sideset_pin. Does not include sideset enable //| :param int initial_sideset_pin_state: the initial output value for sideset pins starting at first_sideset_pin //| :param int initial_sideset_pin_direction: the initial output direction for sideset pins starting at first_sideset_pin +//| :param bool sideset_enable: True when the top sideset bit is to enable. This should be used with the ".side_set # opt" directive //| :param ~microcontroller.Pin jmp_pin: the pin which determines the branch taken by JMP PIN instructions //| :param bool exclusive_pin_use: When True, do not share any pins with other state machines. Pins are never shared with other peripherals //| :param bool auto_pull: When True, automatically load data from the tx FIFO into the @@ -147,6 +149,7 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n ARG_pull_in_pin_up, ARG_pull_in_pin_down, ARG_first_set_pin, ARG_set_pin_count, ARG_initial_set_pin_state, ARG_initial_set_pin_direction, ARG_first_sideset_pin, ARG_sideset_pin_count, ARG_initial_sideset_pin_state, ARG_initial_sideset_pin_direction, + ARG_sideset_enable, ARG_jmp_pin, ARG_exclusive_pin_use, ARG_auto_pull, ARG_pull_threshold, ARG_out_shift_right, @@ -178,6 +181,8 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n { MP_QSTR_initial_sideset_pin_state, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} }, { MP_QSTR_initial_sideset_pin_direction, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0x1f} }, + { MP_QSTR_sideset_enable, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} }, + { MP_QSTR_jmp_pin, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, { MP_QSTR_exclusive_pin_use, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = true} }, @@ -257,6 +262,7 @@ STATIC mp_obj_t rp2pio_statemachine_make_new(const mp_obj_type_t *type, size_t n first_in_pin, args[ARG_in_pin_count].u_int, args[ARG_pull_in_pin_up].u_int, args[ARG_pull_in_pin_down].u_int, first_set_pin, args[ARG_set_pin_count].u_int, args[ARG_initial_set_pin_state].u_int, args[ARG_initial_set_pin_direction].u_int, first_sideset_pin, args[ARG_sideset_pin_count].u_int, args[ARG_initial_sideset_pin_state].u_int, args[ARG_initial_sideset_pin_direction].u_int, + args[ARG_sideset_enable].u_bool, jmp_pin, 0, args[ARG_exclusive_pin_use].u_bool, @@ -354,7 +360,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(rp2pio_statemachine_stop_obj, rp2pio_statemachine_stop //| def write(self, buffer: ReadableBuffer, *, start: int = 0, end: Optional[int] = None) -> None: //| """Write the data contained in ``buffer`` to the state machine. If the buffer is empty, nothing happens. //| -//| :param ~_typing.ReadableBuffer buffer: Write out the data in this buffer +//| :param ~circuitpython_typing.ReadableBuffer buffer: Write out the data in this buffer //| :param int start: Start of the slice of ``buffer`` to write out: ``buffer[start:end]`` //| :param int end: End of the slice; this index is not included. Defaults to ``len(buffer)``""" //| ... @@ -400,9 +406,9 @@ MP_DEFINE_CONST_FUN_OBJ_KW(rp2pio_statemachine_write_obj, 2, rp2pio_statemachine //| def readinto(self, buffer: WriteableBuffer, *, start: int = 0, end: Optional[int] = None) -> None: //| """Read into ``buffer``. If the number of bytes to read is 0, nothing happens. The buffer -//| include any data added to the fifo even if it was added before this was called. +//| includes any data added to the fifo even if it was added before this was called. //| -//| :param ~_typing.WriteableBuffer buffer: Read data into this buffer +//| :param ~circuitpython_typing.WriteableBuffer buffer: Read data into this buffer //| :param int start: Start of the slice of ``buffer`` to read into: ``buffer[start:end]`` //| :param int end: End of the slice; this index is not included. Defaults to ``len(buffer)``""" //| ... @@ -450,8 +456,8 @@ MP_DEFINE_CONST_FUN_OBJ_KW(rp2pio_statemachine_readinto_obj, 2, rp2pio_statemach //| may be different. The function will return once both are filled. //| If buffer slice lengths are both 0, nothing happens. //| -//| :param ~_typing.ReadableBuffer buffer_out: Write out the data in this buffer -//| :param ~_typing.WriteableBuffer buffer_in: Read data into this buffer +//| :param ~circuitpython_typing.ReadableBuffer buffer_out: Write out the data in this buffer +//| :param ~circuitpython_typing.WriteableBuffer buffer_in: Read data into this buffer //| :param int out_start: Start of the slice of buffer_out to write out: ``buffer_out[out_start:out_end]`` //| :param int out_end: End of the slice; this index is not included. Defaults to ``len(buffer_out)`` //| :param int in_start: Start of the slice of ``buffer_in`` to read into: ``buffer_in[in_start:in_end]`` diff --git a/ports/raspberrypi/bindings/rp2pio/StateMachine.h b/ports/raspberrypi/bindings/rp2pio/StateMachine.h index effa9c9ce3..3f3b8cf7d8 100644 --- a/ports/raspberrypi/bindings/rp2pio/StateMachine.h +++ b/ports/raspberrypi/bindings/rp2pio/StateMachine.h @@ -44,6 +44,7 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, const mcu_pin_obj_t *first_in_pin, uint8_t in_pin_count, uint32_t pull_pin_up, uint32_t pull_pin_down, const mcu_pin_obj_t *first_set_pin, uint8_t set_pin_count, uint32_t initial_set_pin_state, uint32_t initial_set_pin_direction, const mcu_pin_obj_t *first_sideset_pin, uint8_t sideset_pin_count, uint32_t initial_sideset_pin_state, uint32_t initial_sideset_pin_direction, + bool sideset_enable, const mcu_pin_obj_t *jmp_pin, uint32_t wait_gpio_mask, bool exclusive_pin_use, diff --git a/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.mk index 84c4adabb7..c77d2d2c13 100644 --- a/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/adafruit_feather_rp2040/mpconfigboard.mk @@ -6,4 +6,4 @@ USB_MANUFACTURER = "Adafruit" CHIP_VARIANT = RP2040 CHIP_FAMILY = rp2 -EXTERNAL_FLASH_DEVICES = "GD25Q64C" +EXTERNAL_FLASH_DEVICES = "GD25Q64C,W25Q64JVxQ" diff --git a/ports/raspberrypi/boards/adafruit_kb2040/mpconfigboard.h b/ports/raspberrypi/boards/adafruit_kb2040/mpconfigboard.h index c01f713e48..e1bfbb01e7 100644 --- a/ports/raspberrypi/boards/adafruit_kb2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/adafruit_kb2040/mpconfigboard.h @@ -8,3 +8,7 @@ #define DEFAULT_UART_BUS_TX (&pin_GPIO0) #define DEFAULT_UART_BUS_RX (&pin_GPIO1) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO18) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO19) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO20) diff --git a/ports/raspberrypi/boards/adafruit_kb2040/pins.c b/ports/raspberrypi/boards/adafruit_kb2040/pins.c index e36346a0dd..34e13fb6c7 100644 --- a/ports/raspberrypi/boards/adafruit_kb2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_kb2040/pins.c @@ -8,6 +8,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_CLK), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO19) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO20) }, diff --git a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.h index 5d3795dd5d..f606ab22c4 100644 --- a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/mpconfigboard.h @@ -4,12 +4,12 @@ #define MICROPY_HW_NEOPIXEL (&pin_GPIO12) #define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO11) -#define DEFAULT_I2C_BUS_SCL (&pin_GPIO25) -#define DEFAULT_I2C_BUS_SDA (&pin_GPIO24) +#define CIRCUITPY_BOARD_I2C (2) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO25, .sda = &pin_GPIO24}, \ + {.scl = &pin_GPIO23, .sda = &pin_GPIO22}} -#define DEFAULT_SPI_BUS_SCK (&pin_GPIO6) -#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO3) -#define DEFAULT_SPI_BUS_MISO (&pin_GPIO4) +#define CIRCUITPY_BOARD_SPI (1) +#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO6, .mosi = &pin_GPIO3, .miso = &pin_GPIO4}} -#define DEFAULT_UART_BUS_RX (&pin_GPIO5) -#define DEFAULT_UART_BUS_TX (&pin_GPIO20) +#define CIRCUITPY_BOARD_UART (1) +#define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO20, .rx = &pin_GPIO5}} diff --git a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c index 0d6835f48b..082807f577 100644 --- a/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_qtpy_rp2040/pins.c @@ -1,5 +1,7 @@ #include "shared-bindings/board/__init__.h" +CIRCUITPY_BOARD_BUS_SINGLETON(stemma_i2c, i2c, 1) + STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS @@ -47,5 +49,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + + { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_stemma_i2c_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/challenger_rp2040_lte/pins.c b/ports/raspberrypi/boards/challenger_rp2040_lte/pins.c index 6d1cfbc568..dd2b4d9bda 100644 --- a/ports/raspberrypi/boards/challenger_rp2040_lte/pins.c +++ b/ports/raspberrypi/boards/challenger_rp2040_lte/pins.c @@ -24,6 +24,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_GP6), MP_ROM_PTR(&pin_GPIO6) }, { MP_ROM_QSTR(MP_QSTR_SARA_RTS), MP_ROM_PTR(&pin_GPIO7) }, { MP_ROM_QSTR(MP_QSTR_GP7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_SARA_PWR), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_GP15), MP_ROM_PTR(&pin_GPIO15) }, // GPIO { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO12) }, diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey18/board.c b/ports/raspberrypi/boards/jpconstantineau_pykey18/board.c new file mode 100644 index 0000000000..e4e5a8bc57 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey18/board.c @@ -0,0 +1,45 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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 "shared-bindings/microcontroller/Pin.h" +#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" +#include "supervisor/shared/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + // turn off any left over LED + board_reset_user_neopixels(&pin_GPIO29, 62); +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey18/mpconfigboard.h b/ports/raspberrypi/boards/jpconstantineau_pykey18/mpconfigboard.h new file mode 100644 index 0000000000..3394a34a23 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey18/mpconfigboard.h @@ -0,0 +1,4 @@ +#define MICROPY_HW_BOARD_NAME "PyKey 18 Numpad" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO29) diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey18/mpconfigboard.mk b/ports/raspberrypi/boards/jpconstantineau_pykey18/mpconfigboard.mk new file mode 100644 index 0000000000..fbfe913e06 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey18/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x1d50 +USB_PID = 0x6153 +USB_PRODUCT = "PyKey18" +USB_MANUFACTURER = "JPConstantineau" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey18/pico-sdk-configboard.h b/ports/raspberrypi/boards/jpconstantineau_pykey18/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey18/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c new file mode 100644 index 0000000000..3cd5d5843e --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey18/pins.c @@ -0,0 +1,23 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + { MP_ROM_QSTR(MP_QSTR_COL1), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_COL2), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_COL3), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_COL4), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_ROW1), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_ROW2), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_ROW3), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_ROW4), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_ROW5), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_ENCA), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_ENCB), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO23) }, + { 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/raspberrypi/boards/jpconstantineau_pykey44/board.c b/ports/raspberrypi/boards/jpconstantineau_pykey44/board.c new file mode 100644 index 0000000000..e4e5a8bc57 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey44/board.c @@ -0,0 +1,45 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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 "shared-bindings/microcontroller/Pin.h" +#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" +#include "supervisor/shared/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + // turn off any left over LED + board_reset_user_neopixels(&pin_GPIO29, 62); +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey44/mpconfigboard.h b/ports/raspberrypi/boards/jpconstantineau_pykey44/mpconfigboard.h new file mode 100644 index 0000000000..15f70ae58a --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey44/mpconfigboard.h @@ -0,0 +1,4 @@ +#define MICROPY_HW_BOARD_NAME "PyKey 44 Ergo" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO29) diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey44/mpconfigboard.mk b/ports/raspberrypi/boards/jpconstantineau_pykey44/mpconfigboard.mk new file mode 100644 index 0000000000..0e19d10274 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey44/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x1d50 +USB_PID = 0x6153 +USB_PRODUCT = "PyKey44" +USB_MANUFACTURER = "JPConstantineau" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey44/pico-sdk-configboard.h b/ports/raspberrypi/boards/jpconstantineau_pykey44/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey44/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c new file mode 100644 index 0000000000..b735aad9f7 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey44/pins.c @@ -0,0 +1,24 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + { MP_ROM_QSTR(MP_QSTR_COL1), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_COL2), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_COL3), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_COL4), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_COL5), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_COL6), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_COL7), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_COL8), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_COL9), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_COL10), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_COL11), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_ROW1), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_ROW2), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_ROW3), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_ROW4), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.h b/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.h index f96edba2f8..4fc2d4bc14 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.h +++ b/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.h @@ -1,4 +1,4 @@ -#define MICROPY_HW_BOARD_NAME "PyKey60" +#define MICROPY_HW_BOARD_NAME "PyKey 60" #define MICROPY_HW_MCU_NAME "rp2040" #define MICROPY_HW_NEOPIXEL (&pin_GPIO29) diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.mk b/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.mk index 263f7ad3b2..b789e70f01 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.mk +++ b/ports/raspberrypi/boards/jpconstantineau_pykey60/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x1d50 USB_PID = 0x6153 -USB_PRODUCT = "Pykey60" +USB_PRODUCT = "PyKey60" USB_MANUFACTURER = "JPConstantineau" CHIP_VARIANT = RP2040 diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c index b33373c9a0..033c68034d 100644 --- a/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c +++ b/ports/raspberrypi/boards/jpconstantineau_pykey60/pins.c @@ -2,7 +2,6 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS - { MP_ROM_QSTR(MP_QSTR_COL1), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_COL2), MP_ROM_PTR(&pin_GPIO1) }, { MP_ROM_QSTR(MP_QSTR_COL3), MP_ROM_PTR(&pin_GPIO2) }, @@ -22,28 +21,15 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_ROW3), MP_ROM_PTR(&pin_GPIO16) }, { MP_ROM_QSTR(MP_QSTR_ROW4), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_ROW5), MP_ROM_PTR(&pin_GPIO18) }, - { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, - { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, - { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, - { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, - { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, - { MP_ROM_QSTR(MP_QSTR_GP25), MP_ROM_PTR(&pin_GPIO25) }, - { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, - { MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) }, - { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, - { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO23) }, - { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO26) }, { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO27) }, - { 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_module_globals_table); diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey87/board.c b/ports/raspberrypi/boards/jpconstantineau_pykey87/board.c new file mode 100644 index 0000000000..e4e5a8bc57 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey87/board.c @@ -0,0 +1,45 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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 "shared-bindings/microcontroller/Pin.h" +#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" +#include "supervisor/shared/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { + // turn off any left over LED + board_reset_user_neopixels(&pin_GPIO29, 62); +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey87/mpconfigboard.h b/ports/raspberrypi/boards/jpconstantineau_pykey87/mpconfigboard.h new file mode 100644 index 0000000000..aee9ed27e3 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey87/mpconfigboard.h @@ -0,0 +1,4 @@ +#define MICROPY_HW_BOARD_NAME "PyKey 87 TKL" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO29) diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey87/mpconfigboard.mk b/ports/raspberrypi/boards/jpconstantineau_pykey87/mpconfigboard.mk new file mode 100644 index 0000000000..83dcb3df52 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey87/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x1d50 +USB_PID = 0x6153 +USB_PRODUCT = "PyKey87" +USB_MANUFACTURER = "JPConstantineau" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey87/pico-sdk-configboard.h b/ports/raspberrypi/boards/jpconstantineau_pykey87/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey87/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c b/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c new file mode 100644 index 0000000000..cd5612f45b --- /dev/null +++ b/ports/raspberrypi/boards/jpconstantineau_pykey87/pins.c @@ -0,0 +1,36 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_COL1), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_COL2), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_COL3), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_COL4), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_COL5), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_COL6), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_COL7), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_COL8), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_COL9), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_COL10), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_COL11), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_COL12), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_COL13), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_COL14), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_ROW1), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_ROW2), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_ROW3), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_ROW4), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_ROW5), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_COL15), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_COL16), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_COL17), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_ROW0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO23) }, + { 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/raspberrypi/boards/odt_cast_away_rp2040/board.c b/ports/raspberrypi/boards/odt_cast_away_rp2040/board.c new file mode 100644 index 0000000000..de6e424ed9 --- /dev/null +++ b/ports/raspberrypi/boards/odt_cast_away_rp2040/board.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/odt_cast_away_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/odt_cast_away_rp2040/mpconfigboard.h new file mode 100644 index 0000000000..db2b871bb0 --- /dev/null +++ b/ports/raspberrypi/boards/odt_cast_away_rp2040/mpconfigboard.h @@ -0,0 +1,14 @@ +#define MICROPY_HW_BOARD_NAME "Oak Dev Tech Cast-Away RP2040" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO1) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO0) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO2) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO3) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO4) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO14) +#define DEFAULT_UART_BUS_TX (&pin_GPIO15) diff --git a/ports/raspberrypi/boards/odt_cast_away_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/odt_cast_away_rp2040/mpconfigboard.mk new file mode 100644 index 0000000000..40f3582005 --- /dev/null +++ b/ports/raspberrypi/boards/odt_cast_away_rp2040/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x1209 +USB_PID = 0x4DF2 +USB_PRODUCT = "CAST AWAY RP2040" +USB_MANUFACTURER = "Oak Dev Tech" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/odt_cast_away_rp2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/odt_cast_away_rp2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..7d1b96b85a --- /dev/null +++ b/ports/raspberrypi/boards/odt_cast_away_rp2040/pico-sdk-configboard.h @@ -0,0 +1,3 @@ +// Put board-specific pico-sdk definitions here. This file must exist. +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/odt_cast_away_rp2040/pins.c b/ports/raspberrypi/boards/odt_cast_away_rp2040/pins.c new file mode 100644 index 0000000000..8686f7ae0b --- /dev/null +++ b/ports/raspberrypi/boards/odt_cast_away_rp2040/pins.c @@ -0,0 +1,41 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + + { 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_D14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_D28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h index 4184f35a7a..8059472780 100644 --- a/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h +++ b/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.h @@ -1,4 +1,4 @@ -#define MICROPY_HW_BOARD_NAME "Pimoroni Tiny 2040" +#define MICROPY_HW_BOARD_NAME "Pimoroni Tiny 2040 (8MB)" #define MICROPY_HW_MCU_NAME "rp2040" #define CIRCUITPY_RGB_STATUS_INVERTED_PWM diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk index 7487782237..e63e53ea55 100644 --- a/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk +++ b/ports/raspberrypi/boards/pimoroni_tiny2040/mpconfigboard.mk @@ -1,6 +1,6 @@ USB_VID = 0x16D0 USB_PID = 0x08C7 -USB_PRODUCT = "Tiny 2040" +USB_PRODUCT = "Tiny 2040 (8MB)" USB_MANUFACTURER = "Pimoroni" CHIP_VARIANT = RP2040 diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/board.c b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/board.c new file mode 100644 index 0000000000..de6e424ed9 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/board.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.h b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.h new file mode 100644 index 0000000000..9f9219fc60 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.h @@ -0,0 +1,7 @@ +#define MICROPY_HW_BOARD_NAME "Pimoroni Tiny 2040 (2MB)" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define CIRCUITPY_RGB_STATUS_INVERTED_PWM +#define CIRCUITPY_RGB_STATUS_R (&pin_GPIO18) +#define CIRCUITPY_RGB_STATUS_G (&pin_GPIO19) +#define CIRCUITPY_RGB_STATUS_B (&pin_GPIO20) diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.mk b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.mk new file mode 100644 index 0000000000..b92946c130 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x2E8A +USB_PID = 0x1016 +USB_PRODUCT = "Tiny 2040 (2MB)" +USB_MANUFACTURER = "Pimoroni" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/pico-sdk-configboard.h b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/pins.c b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/pins.c new file mode 100644 index 0000000000..6dd90a90bb --- /dev/null +++ b/ports/raspberrypi/boards/pimoroni_tiny2040_2mb/pins.c @@ -0,0 +1,37 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_GP4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_GP5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_GP6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_GP7), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_LED_R), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_LED_G), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_LED_B), MP_ROM_PTR(&pin_GPIO20) }, + + { MP_ROM_QSTR(MP_QSTR_USER_SW), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP27_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_GP29_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_GP29), MP_ROM_PTR(&pin_GPIO29) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/board.c b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/board.c new file mode 100644 index 0000000000..de6e424ed9 --- /dev/null +++ b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/board.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.h new file mode 100644 index 0000000000..a0ea3c51a0 --- /dev/null +++ b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.h @@ -0,0 +1,15 @@ +#define MICROPY_HW_BOARD_NAME "Seeeduino XIAO RP2040" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO12) +#define CIRCUITPY_STATUS_LED_POWER (&pin_GPIO11) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO7) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO6) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO2) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO3) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO4) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO1) +#define DEFAULT_UART_BUS_TX (&pin_GPIO0) diff --git a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk new file mode 100644 index 0000000000..1540642cd5 --- /dev/null +++ b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/mpconfigboard.mk @@ -0,0 +1,9 @@ +USB_VID = 0x2886 +USB_PID = 0x0042 +USB_PRODUCT = "Seeeduino XIAO RP2040" +USB_MANUFACTURER = "Seeed" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "P25Q16H" diff --git a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pico-sdk-configboard.h b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pico-sdk-configboard.h new file mode 100644 index 0000000000..a41131dd22 --- /dev/null +++ b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pico-sdk-configboard.h @@ -0,0 +1,4 @@ +// Put board-specific pico-sdk definitions here. This file must exist. + +// Allow extra time for xosc to start. +#define PICO_XOSC_STARTUP_DELAY_MULTIPLIER 64 diff --git a/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c new file mode 100644 index 0000000000..a53cb3f11a --- /dev/null +++ b/ports/raspberrypi/boards/seeeduino_xiao_rp2040/pins.c @@ -0,0 +1,51 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO6) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO7) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO4) }, + + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_LED_GREEN), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_LED_RED), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_LED_BLUE), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL_POWER), MP_ROM_PTR(&pin_GPIO11) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/waveshare_rp2040_zero/board.c b/ports/raspberrypi/boards/waveshare_rp2040_zero/board.c new file mode 100644 index 0000000000..de6e424ed9 --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_zero/board.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 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" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} + +void board_deinit(void) { +} diff --git a/ports/raspberrypi/boards/waveshare_rp2040_zero/mpconfigboard.h b/ports/raspberrypi/boards/waveshare_rp2040_zero/mpconfigboard.h new file mode 100644 index 0000000000..9979e6dcb6 --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_zero/mpconfigboard.h @@ -0,0 +1,7 @@ +#define MICROPY_HW_BOARD_NAME "Waveshare RP2040-Zero" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define DEFAULT_UART_BUS_TX (&pin_GPIO0) +#define DEFAULT_UART_BUS_RX (&pin_GPIO1) + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO16) diff --git a/ports/raspberrypi/boards/waveshare_rp2040_zero/mpconfigboard.mk b/ports/raspberrypi/boards/waveshare_rp2040_zero/mpconfigboard.mk new file mode 100644 index 0000000000..9222a7be7c --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_zero/mpconfigboard.mk @@ -0,0 +1,11 @@ +USB_VID = 0x2E8A +USB_PID = 0x101F +USB_PRODUCT = "RP2040-Zero" +USB_MANUFACTURER = "Waveshare Electronics" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q16JVxQ" + +CIRCUITPY__EVE = 1 diff --git a/ports/raspberrypi/boards/waveshare_rp2040_zero/pico-sdk-configboard.h b/ports/raspberrypi/boards/waveshare_rp2040_zero/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_zero/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/waveshare_rp2040_zero/pins.c b/ports/raspberrypi/boards/waveshare_rp2040_zero/pins.c new file mode 100644 index 0000000000..6de9ad478f --- /dev/null +++ b/ports/raspberrypi/boards/waveshare_rp2040_zero/pins.c @@ -0,0 +1,56 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_GP0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_GP1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_GP2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_GP3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_GP4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_GP5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_GP6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_GP7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_GP8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_GP9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_GP10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_GP11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_GP12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_GP13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_GP14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_GP15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_GP16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_GP17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_GP18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_GP19), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_GP20), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_GP21), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_GP22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_GP23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_GP24), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_GP25), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_GP26_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_GP26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_GP27_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_GP27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_GP29_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_GP29), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/common-hal/audiobusio/I2SOut.c b/ports/raspberrypi/common-hal/audiobusio/I2SOut.c index da50e17f42..4296014e50 100644 --- a/ports/raspberrypi/common-hal/audiobusio/I2SOut.c +++ b/ports/raspberrypi/common-hal/audiobusio/I2SOut.c @@ -133,7 +133,8 @@ void common_hal_audiobusio_i2sout_construct(audiobusio_i2sout_obj_t *self, false, 32, false, // shift out left to start with MSB false, // Wait for txstall false, 32, false, // in settings - false); // Not user-interruptible. + false, // Not user-interruptible. + false); // No sideset enable self->playing = false; audio_dma_init(&self->dma); diff --git a/ports/raspberrypi/common-hal/audiobusio/PDMIn.c b/ports/raspberrypi/common-hal/audiobusio/PDMIn.c index f2775c2543..859e82eb11 100644 --- a/ports/raspberrypi/common-hal/audiobusio/PDMIn.c +++ b/ports/raspberrypi/common-hal/audiobusio/PDMIn.c @@ -77,7 +77,8 @@ void common_hal_audiobusio_pdmin_construct(audiobusio_pdmin_obj_t *self, false, 32, false, // out settings false, // Wait for txstall false, 32, true, // in settings - false); // Not user-interruptible + false, // Not user-interruptible. + false); // No sideset enable uint32_t actual_frequency = common_hal_rp2pio_statemachine_get_frequency(&self->state_machine); if (actual_frequency < MIN_MIC_CLOCK) { diff --git a/ports/raspberrypi/common-hal/busio/UART.c b/ports/raspberrypi/common-hal/busio/UART.c index 14935f4046..0e25c57297 100644 --- a/ports/raspberrypi/common-hal/busio/UART.c +++ b/ports/raspberrypi/common-hal/busio/UART.c @@ -120,14 +120,14 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self, if (uart_status[uart_id] != STATUS_FREE) { mp_raise_RuntimeError(translate("All UART peripherals are in use")); - } else { - uart_status[uart_id] = STATUS_BUSY; } - + // These may raise exceptions if pins are already in use. self->tx_pin = pin_init(uart_id, tx, 0); self->rx_pin = pin_init(uart_id, rx, 1); self->cts_pin = pin_init(uart_id, cts, 2); self->rts_pin = pin_init(uart_id, rts, 3); + uart_status[uart_id] = STATUS_BUSY; + self->uart = UART_INST(uart_id); self->uart_id = uart_id; diff --git a/ports/raspberrypi/common-hal/countio/Counter.c b/ports/raspberrypi/common-hal/countio/Counter.c index fe7dd545f8..0ae773bdf3 100644 --- a/ports/raspberrypi/common-hal/countio/Counter.c +++ b/ports/raspberrypi/common-hal/countio/Counter.c @@ -4,6 +4,8 @@ #include "py/mpstate.h" #include "supervisor/shared/translate.h" +#include "shared-bindings/countio/Edge.h" +#include "shared-bindings/digitalio/Pull.h" #include "common-hal/pwmio/PWMOut.h" #include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" @@ -12,20 +14,24 @@ void common_hal_countio_counter_construct(countio_counter_obj_t *self, - const mcu_pin_obj_t *pin_a) { + const mcu_pin_obj_t *pin, countio_edge_t edge, digitalio_pull_t pull) { - if (pwm_gpio_to_channel(pin_a->number) != PWM_CHAN_B) { + if (pwm_gpio_to_channel(pin->number) != PWM_CHAN_B) { mp_raise_RuntimeError(translate("Pin must be on PWM Channel B")); } - self->pin_a = pin_a->number; - self->slice_num = pwm_gpio_to_slice_num(self->pin_a); + if (edge == EDGE_RISE_AND_FALL) { + mp_raise_NotImplementedError(translate("RISE_AND_FALL not available on this chip")); + } + + self->pin = pin->number; + self->slice_num = pwm_gpio_to_slice_num(self->pin); if (MP_STATE_PORT(counting)[self->slice_num] != NULL) { mp_raise_RuntimeError(translate("PWM slice already in use")); } - uint8_t ab_channel = pwm_gpio_to_channel(self->pin_a); + uint8_t ab_channel = pwm_gpio_to_channel(self->pin); if (!pwmio_claim_slice_ab_channels(self->slice_num)) { mp_raise_RuntimeError(translate("PWM slice channel A already in use")); } @@ -36,11 +42,12 @@ void common_hal_countio_counter_construct(countio_counter_obj_t *self, irq_set_enabled(PWM_IRQ_WRAP, true); pwm_config cfg = pwm_get_default_config(); - pwm_config_set_clkdiv_mode(&cfg, PWM_DIV_B_RISING); + pwm_config_set_clkdiv_mode(&cfg, edge == EDGE_RISE ? PWM_DIV_B_RISING : PWM_DIV_B_FALLING); pwm_init(self->slice_num, &cfg, false); - gpio_set_function(self->pin_a, GPIO_FUNC_PWM); + gpio_set_function(self->pin, GPIO_FUNC_PWM); + gpio_set_pulls(self->pin, pull == PULL_UP, pull == PULL_DOWN); - claim_pin(pin_a); + claim_pin(pin); MP_STATE_PORT(counting)[self->slice_num] = self; @@ -58,7 +65,7 @@ void reset_countio(void) { } bool common_hal_countio_counter_deinited(countio_counter_obj_t *self) { - return self->pin_a == 0; + return self->pin == 0; } void common_hal_countio_counter_deinit(countio_counter_obj_t *self) { @@ -71,10 +78,10 @@ void common_hal_countio_counter_deinit(countio_counter_obj_t *self) { pwmio_release_slice_ab_channels(self->slice_num); - reset_pin_number(self->pin_a); + reset_pin_number(self->pin); MP_STATE_PORT(counting)[self->slice_num] = NULL; - self->pin_a = 0; + self->pin = 0; self->slice_num = 0; } @@ -90,11 +97,6 @@ void common_hal_countio_counter_set_count(countio_counter_obj_t *self, self->count = new_count; } -void common_hal_countio_counter_reset(countio_counter_obj_t *self) { - pwm_set_counter(self->slice_num, 0); - self->count = 0; -} - void counter_interrupt_handler(void) { uint32_t mask = pwm_get_irq_status_mask(); diff --git a/ports/raspberrypi/common-hal/countio/Counter.h b/ports/raspberrypi/common-hal/countio/Counter.h index 7469dd2d00..3355036eed 100644 --- a/ports/raspberrypi/common-hal/countio/Counter.h +++ b/ports/raspberrypi/common-hal/countio/Counter.h @@ -8,7 +8,7 @@ typedef struct { mp_obj_base_t base; - uint8_t pin_a; + uint8_t pin; uint8_t slice_num; mp_int_t count; } countio_counter_obj_t; diff --git a/ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c b/ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c index 9eabc9f967..45a3766897 100644 --- a/ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c +++ b/ports/raspberrypi/common-hal/imagecapture/ParallelImageCapture.c @@ -111,6 +111,7 @@ void common_hal_imagecapture_parallelimagecapture_construct(imagecapture_paralle #else NULL, 0, 0, 0, // sideset pins #endif + false, // No sideset enable NULL, // jump pin (1 << vertical_sync->number) | (1 << horizontal_reference->number) | (1 << data_clock->number), // wait gpio pins true, // exclusive pin use diff --git a/ports/raspberrypi/common-hal/neopixel_write/__init__.c b/ports/raspberrypi/common-hal/neopixel_write/__init__.c index b3d704453c..09388af481 100644 --- a/ports/raspberrypi/common-hal/neopixel_write/__init__.c +++ b/ports/raspberrypi/common-hal/neopixel_write/__init__.c @@ -77,7 +77,8 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, true, // Wait for txstall. If we don't, then we'll deinit too quickly. false, 32, true, // RX setting we don't use false, // claim pins - false); // Not user-interruptible. + false, // Not user-interruptible. + false); // No sideset enable if (!ok) { // Do nothing. Maybe bitbang? return; @@ -97,6 +98,6 @@ void common_hal_neopixel_write(const digitalio_digitalinout_obj_t *digitalinout, gpio_init(digitalinout->pin->number); common_hal_digitalio_digitalinout_switch_to_output((digitalio_digitalinout_obj_t *)digitalinout, false, DRIVE_MODE_PUSH_PULL); - // Update the next start. - next_start_raw_ticks = port_get_raw_ticks(NULL) + 1; + // Update the next start to +2 ticks. This ensures we give it at least 300us. + next_start_raw_ticks = port_get_raw_ticks(NULL) + 2; } diff --git a/ports/raspberrypi/common-hal/nvm/ByteArray.c b/ports/raspberrypi/common-hal/nvm/ByteArray.c index a6c8a5ad6a..cc52c88f38 100644 --- a/ports/raspberrypi/common-hal/nvm/ByteArray.c +++ b/ports/raspberrypi/common-hal/nvm/ByteArray.c @@ -65,7 +65,15 @@ static void erase_and_write_sector(uint32_t address, uint32_t len, uint8_t *byte // Write a whole sector to flash, buffering it first and then erasing and rewriting it // since we can only erase a whole sector at a time. uint8_t buffer[FLASH_SECTOR_SIZE]; + #pragma GCC diagnostic push + #if __GNUC__ >= 11 + // TODO: Update this to a better workaround for GCC 11 when one is provided. + // See: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578#c20 + #pragma GCC diagnostic ignored "-Warray-bounds" + #pragma GCC diagnostic ignored "-Wstringop-overread" + #endif memcpy(buffer, (uint8_t *)CIRCUITPY_INTERNAL_NVM_START_ADDR, FLASH_SECTOR_SIZE); + #pragma GCC diagnostic pop memcpy(buffer + address, bytes, len); // disable interrupts to prevent core hang on rp2040 common_hal_mcu_disable_interrupts(); diff --git a/ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c b/ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c index 9971474042..2e0ae4def2 100644 --- a/ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c +++ b/ports/raspberrypi/common-hal/paralleldisplay/ParallelBus.c @@ -99,6 +99,7 @@ void common_hal_paralleldisplay_parallelbus_construct(paralleldisplay_parallelbu NULL, 0, 0, 0, // first in pin, # in pins NULL, 0, 0, 0, // first set pin write, 1, 0, 1, // first sideset pin + false, // No sideset enable NULL, // jump pin 0, // wait gpio pins true, // exclusive pin usage diff --git a/ports/raspberrypi/common-hal/pulseio/PulseIn.c b/ports/raspberrypi/common-hal/pulseio/PulseIn.c index 9d3f614987..e507cd16e8 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseIn.c +++ b/ports/raspberrypi/common-hal/pulseio/PulseIn.c @@ -73,7 +73,8 @@ void common_hal_pulseio_pulsein_construct(pulseio_pulsein_obj_t *self, false, true, 32, true, // RX auto-push every 32 bits false, // claim pins - false); // Not user-interruptible. + false, // Not user-interruptible. + false); // No sideset enable if (!ok) { mp_raise_RuntimeError(translate("All state machines in use")); diff --git a/ports/raspberrypi/common-hal/rgbmatrix/RGBMatrix.c b/ports/raspberrypi/common-hal/rgbmatrix/RGBMatrix.c index f150422e3c..d580b4cc6a 100644 --- a/ports/raspberrypi/common-hal/rgbmatrix/RGBMatrix.c +++ b/ports/raspberrypi/common-hal/rgbmatrix/RGBMatrix.c @@ -33,6 +33,7 @@ #include "shared-module/rgbmatrix/RGBMatrix.h" #include "src/rp2_common/hardware_pwm/include/hardware/pwm.h" +#include "src/rp2_common/hardware_irq/include/hardware/irq.h" void *common_hal_rgbmatrix_timer_allocate(rgbmatrix_rgbmatrix_obj_t *self) { // Choose a PWM channel based on the first RGB pin @@ -58,6 +59,8 @@ void common_hal_rgbmatrix_timer_enable(void *ptr) { void common_hal_rgbmatrix_timer_disable(void *ptr) { int8_t slice = ((intptr_t)ptr) & 0xff; pwm_set_enabled(slice, false); + irq_set_enabled(PWM_IRQ_WRAP, false); + pwm_clear_irq(slice); } void common_hal_rgbmatrix_timer_free(void *ptr) { @@ -65,6 +68,8 @@ void common_hal_rgbmatrix_timer_free(void *ptr) { uint8_t slice = value & 0xff; uint8_t channel = value >> 8; pwm_set_enabled(slice, false); + irq_set_enabled(PWM_IRQ_WRAP, false); + pwm_clear_irq(slice); pwmout_free(slice, channel); return; } diff --git a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c index 1105d357c5..1f15b010f7 100644 --- a/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c +++ b/ports/raspberrypi/common-hal/rotaryio/IncrementalEncoder.c @@ -85,6 +85,7 @@ void common_hal_rotaryio_incrementalencoder_construct(rotaryio_incrementalencode 3, 0, // in pulls NULL, 0, 0, 0x1f, // set pins NULL, 0, 0, 0x1f, // sideset pins + false, // No sideset enable NULL, // jump pin 0, // wait gpio pins true, // exclusive pin use diff --git a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c index 4479006d4e..ac5a41652a 100644 --- a/ports/raspberrypi/common-hal/rp2pio/StateMachine.c +++ b/ports/raspberrypi/common-hal/rp2pio/StateMachine.c @@ -164,7 +164,8 @@ bool rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, bool wait_for_txstall, bool auto_push, uint8_t push_threshold, bool in_shift_right, bool claim_pins, - bool user_interruptible + bool user_interruptible, + bool sideset_enable ) { // Create a program id that isn't the pointer so we can store it without storing the original object. uint32_t program_id = ~((uint32_t)program); @@ -278,7 +279,11 @@ bool rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, sm_config_set_set_pins(&c, first_set_pin->number, set_pin_count); } if (first_sideset_pin != NULL) { - sm_config_set_sideset(&c, sideset_pin_count, false /* optional */, false /* pin direction */); + size_t total_sideset_bits = sideset_pin_count; + if (sideset_enable) { + total_sideset_bits += 1; + } + sm_config_set_sideset(&c, total_sideset_bits, sideset_enable, false /* pin direction */); sm_config_set_sideset_pins(&c, first_sideset_pin->number); } if (jmp_pin != NULL) { @@ -336,6 +341,7 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, uint32_t pull_pin_up, uint32_t pull_pin_down, const mcu_pin_obj_t *first_set_pin, uint8_t set_pin_count, uint32_t initial_set_pin_state, uint32_t initial_set_pin_direction, const mcu_pin_obj_t *first_sideset_pin, uint8_t sideset_pin_count, uint32_t initial_sideset_pin_state, uint32_t initial_sideset_pin_direction, + bool sideset_enable, const mcu_pin_obj_t *jmp_pin, uint32_t wait_gpio_mask, bool exclusive_pin_use, @@ -503,7 +509,8 @@ void common_hal_rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, wait_for_txstall, auto_push, push_threshold, in_shift_right, true /* claim pins */, - user_interruptible); + user_interruptible, + sideset_enable); if (!ok) { mp_raise_RuntimeError(translate("All state machines in use")); } @@ -513,7 +520,7 @@ void common_hal_rp2pio_statemachine_restart(rp2pio_statemachine_obj_t *self) { common_hal_rp2pio_statemachine_stop(self); // Reset program counter to the original offset. A JMP is 0x0000 plus // the desired offset, so we can just use self->offset. - pio_sm_exec(self->pio, self->state_machine,self->offset); + pio_sm_exec(self->pio, self->state_machine, self->offset); pio_sm_restart(self->pio, self->state_machine); uint8_t pio_index = pio_get_index(self->pio); uint32_t pins_we_use = _current_sm_pins[pio_index][self->state_machine]; diff --git a/ports/raspberrypi/common-hal/rp2pio/StateMachine.h b/ports/raspberrypi/common-hal/rp2pio/StateMachine.h index f877bdb152..125e0fa68b 100644 --- a/ports/raspberrypi/common-hal/rp2pio/StateMachine.h +++ b/ports/raspberrypi/common-hal/rp2pio/StateMachine.h @@ -75,7 +75,8 @@ bool rp2pio_statemachine_construct(rp2pio_statemachine_obj_t *self, bool wait_for_txstall, bool auto_push, uint8_t push_threshold, bool in_shift_right, bool claim_pins, - bool interruptible); + bool interruptible, + bool sideset_enable); uint8_t rp2pio_statemachine_program_offset(rp2pio_statemachine_obj_t *self); void rp2pio_statemachine_set_wrap(rp2pio_statemachine_obj_t *self, uint wrap_target, uint wrap); diff --git a/ports/raspberrypi/mpconfigport.mk b/ports/raspberrypi/mpconfigport.mk index bc8a26de7b..1dfb345f5d 100644 --- a/ports/raspberrypi/mpconfigport.mk +++ b/ports/raspberrypi/mpconfigport.mk @@ -1,19 +1,3 @@ -# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk -# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. -# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. - -ifeq ($(LONGINT_IMPL),NONE) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none -endif - -ifeq ($(LONGINT_IMPL),MPZ) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz -endif - -ifeq ($(LONGINT_IMPL),LONGLONG) -MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong -endif - # All raspberrypi ports have longints. LONGINT_IMPL = MPZ diff --git a/ports/stm/boards/sparkfun_stm32_thing_plus/board.c b/ports/stm/boards/sparkfun_stm32_thing_plus/board.c new file mode 100644 index 0000000000..5fca974e9e --- /dev/null +++ b/ports/stm/boards/sparkfun_stm32_thing_plus/board.c @@ -0,0 +1,38 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" +#include "mpconfigboard.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.h b/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.h new file mode 100644 index 0000000000..b1412d9186 --- /dev/null +++ b/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.h @@ -0,0 +1,58 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2019 Lucian Copeland for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "SparkFun Thing Plus - STM32" +#define MICROPY_HW_MCU_NAME "STM32F405RG" + +#define FLASH_SIZE (0x100000) +#define FLASH_PAGE_SIZE (0x4000) + +#define HSE_VALUE ((uint32_t)12000000U) +#define LSE_VALUE ((uint32_t)32768) +#define BOARD_HAS_LOW_SPEED_CRYSTAL (1) + +// On-board flash +#define SPI_FLASH_MOSI_PIN (&pin_PB05) +#define SPI_FLASH_MISO_PIN (&pin_PB04) +#define SPI_FLASH_SCK_PIN (&pin_PB03) +#define SPI_FLASH_CS_PIN (&pin_PA15) + +// Bootloader only +#ifdef UF2_BOOTLOADER_ENABLED + #define BOARD_VTOR_DEFER (1) // Leave VTOR relocation to bootloader +#endif + +#define DEFAULT_I2C_BUS_SCL (&pin_PB06) +#define DEFAULT_I2C_BUS_SDA (&pin_PB07) + +#define DEFAULT_SPI_BUS_SCK (&pin_PB13) +#define DEFAULT_SPI_BUS_MOSI (&pin_PB15) +#define DEFAULT_SPI_BUS_MISO (&pin_PB14) + +#define DEFAULT_UART_BUS_RX (&pin_PB11) +#define DEFAULT_UART_BUS_TX (&pin_PB10) diff --git a/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk b/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk new file mode 100644 index 0000000000..62d0136be5 --- /dev/null +++ b/ports/stm/boards/sparkfun_stm32_thing_plus/mpconfigboard.mk @@ -0,0 +1,21 @@ +USB_VID = 0X1B4F +USB_PID = 0x0028 + +USB_PRODUCT = "Thing Plus - STM32" +USB_MANUFACTURER = "SparkFun Electronics" + +SPI_FLASH_FILESYSTEM = 1 +EXTERNAL_FLASH_DEVICES = W25Q128JVxM + +MCU_SERIES = F4 +MCU_VARIANT = STM32F405xx +MCU_PACKAGE = LQFP64 + +LD_COMMON = boards/common_default.ld +LD_DEFAULT = boards/STM32F405_default.ld + +# UF2 boot option +LD_BOOT = boards/STM32F405_boot.ld +UF2_OFFSET = 0x8010000 + +CIRCUITPY_RGBMATRIX ?= 1 diff --git a/ports/stm/boards/sparkfun_stm32_thing_plus/pins.c b/ports/stm/boards/sparkfun_stm32_thing_plus/pins.c new file mode 100644 index 0000000000..3c1d41b42a --- /dev/null +++ b/ports/stm/boards/sparkfun_stm32_thing_plus/pins.c @@ -0,0 +1,60 @@ +#include "py/objtuple.h" +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_obj_tuple_t sdio_data_tuple = { + {&mp_type_tuple}, + 4, + { + MP_ROM_PTR(&pin_PC08), + MP_ROM_PTR(&pin_PC09), + MP_ROM_PTR(&pin_PC10), + MP_ROM_PTR(&pin_PC11), + } +}; + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PC04) }, + { MP_ROM_QSTR(MP_QSTR_A5), MP_ROM_PTR(&pin_PC05) }, + + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_PC07) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PC06) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PB09) }, + { MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PC03) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PC02) }, + + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_PC01) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PC01) }, + + { 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_SCK), MP_ROM_PTR(&pin_PB13) }, + { MP_ROM_QSTR(MP_QSTR_CIPO), MP_ROM_PTR(&pin_PB14) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PB14) }, + { MP_ROM_QSTR(MP_QSTR_COPI), MP_ROM_PTR(&pin_PB15) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB15) }, + + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PB10) }, + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PB10) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PB11) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PB11) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + + { MP_ROM_QSTR(MP_QSTR_SDIO_CLOCK), MP_ROM_PTR(&pin_PC12) }, + { MP_ROM_QSTR(MP_QSTR_SDIO_COMMAND), MP_ROM_PTR(&pin_PD02) }, + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA), MP_ROM_PTR(&sdio_data_tuple) }, + + { MP_ROM_QSTR(MP_QSTR_CAN_RX), MP_ROM_PTR(&pin_PB08) }, + { MP_ROM_QSTR(MP_QSTR_CAN_TX), MP_ROM_PTR(&pin_PB09) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/stm/mpconfigport.mk b/ports/stm/mpconfigport.mk index 6729a747b5..ba383d41d2 100644 --- a/ports/stm/mpconfigport.mk +++ b/ports/stm/mpconfigport.mk @@ -1,4 +1,3 @@ -MPY_TOOL_LONGINT_IMPL ?= -mlongint-impl=mpz LONGINT_IMPL ?= MPZ INTERNAL_LIBM ?= 1 diff --git a/ports/unix/coverage.c b/ports/unix/coverage.c index cdab9b8ef4..16287fdc01 100644 --- a/ports/unix/coverage.c +++ b/ports/unix/coverage.c @@ -527,7 +527,8 @@ STATIC mp_obj_t extra_coverage(void) { // ringbuf { byte buf[100]; - ringbuf_t ringbuf = {buf, sizeof(buf), 0, 0}; + ringbuf_t ringbuf; + ringbuf_init(&ringbuf, &buf[0], sizeof(buf)); mp_printf(&mp_plat_print, "# ringbuf\n"); diff --git a/py/circuitpy_defns.mk b/py/circuitpy_defns.mk index ab654aac64..15828f6616 100644 --- a/py/circuitpy_defns.mk +++ b/py/circuitpy_defns.mk @@ -85,23 +85,6 @@ CFLAGS += -DMICROPY_QSTR_EXTRA_POOL=mp_qstr_frozen_const_pool CFLAGS += -DMICROPY_MODULE_FROZEN_MPY endif - -### -# Propagate longint choice from .mk to C. There's no easy string comparison -# in cpp conditionals, so we #define separate names for each. -ifeq ($(LONGINT_IMPL),NONE) -CFLAGS += -DLONGINT_IMPL_NONE -endif - -ifeq ($(LONGINT_IMPL),MPZ) -CFLAGS += -DLONGINT_IMPL_MPZ -endif - -ifeq ($(LONGINT_IMPL),LONGLONG) -CFLAGS += -DLONGINT_IMPL_LONGLONG -endif - - ### # Select which builtin modules to compile and include. @@ -470,8 +453,7 @@ $(filter $(SRC_PATTERNS), \ _eve/__init__.c \ camera/ImageFormat.c \ canio/Match.c \ - qrio/PixelPolicy.c \ - qrio/QRInfo.c \ + countio/Edge.c \ digitalio/Direction.c \ digitalio/DriveMode.c \ digitalio/Pull.c \ @@ -485,6 +467,8 @@ $(filter $(SRC_PATTERNS), \ msgpack/ExtType.c \ paralleldisplay/__init__.c \ paralleldisplay/ParallelBus.c \ + qrio/PixelPolicy.c \ + qrio/QRInfo.c \ supervisor/RunReason.c \ wifi/AuthMode.c \ wifi/Packet.c \ @@ -524,8 +508,8 @@ SRC_SHARED_MODULE_ALL = \ bitops/__init__.c \ board/__init__.c \ adafruit_bus_device/__init__.c \ - adafruit_bus_device/I2CDevice.c \ - adafruit_bus_device/SPIDevice.c \ + adafruit_bus_device/i2c_device/I2CDevice.c \ + adafruit_bus_device/spi_device/SPIDevice.c \ canio/Match.c \ canio/Message.c \ canio/RemoteTransmissionRequest.c \ diff --git a/py/circuitpy_mpconfig.h b/py/circuitpy_mpconfig.h index 6efc341fce..2893df46ec 100644 --- a/py/circuitpy_mpconfig.h +++ b/py/circuitpy_mpconfig.h @@ -259,23 +259,42 @@ typedef long mp_off_t; #error No *_FLASH_FILESYSTEM set! #endif +// Default board buses. + +#ifndef CIRCUITPY_BOARD_I2C +#if defined(DEFAULT_I2C_BUS_SCL) && defined(DEFAULT_I2C_BUS_SDA) +#define CIRCUITPY_BOARD_I2C (1) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = DEFAULT_I2C_BUS_SCL, .sda = DEFAULT_I2C_BUS_SDA}} +#else +#define CIRCUITPY_BOARD_I2C (0) +#endif +#endif + +#ifndef CIRCUITPY_BOARD_SPI +#if defined(DEFAULT_SPI_BUS_SCK) && defined(DEFAULT_SPI_BUS_MOSI) && defined(DEFAULT_SPI_BUS_MISO) +#define CIRCUITPY_BOARD_SPI (1) +#define CIRCUITPY_BOARD_SPI_PIN {{.clock = DEFAULT_SPI_BUS_SCK, .mosi = DEFAULT_SPI_BUS_MOSI, .miso = DEFAULT_SPI_BUS_MISO}} +#else +#define CIRCUITPY_BOARD_SPI (0) +#endif +#endif + +#ifndef CIRCUITPY_BOARD_UART +#if defined(DEFAULT_UART_BUS_TX) && defined(DEFAULT_UART_BUS_RX) +#define CIRCUITPY_BOARD_UART (1) +#define CIRCUITPY_BOARD_UART_PIN {{.tx = DEFAULT_UART_BUS_TX, .rx = DEFAULT_UART_BUS_RX}} +#define BOARD_UART_ROOT_POINTER mp_obj_t board_uart_bus; +#else +#define CIRCUITPY_BOARD_UART (0) +#define BOARD_UART_ROOT_POINTER +#endif +#else +#define BOARD_UART_ROOT_POINTER mp_obj_t board_uart_bus; +#endif + // These CIRCUITPY_xxx values should all be defined in the *.mk files as being on or off. // So if any are not defined in *.mk, they'll throw an error here. -#if CIRCUITPY_BOARD -#define BOARD_I2C (defined(DEFAULT_I2C_BUS_SDA) && defined(DEFAULT_I2C_BUS_SCL)) -#define BOARD_SPI (defined(DEFAULT_SPI_BUS_SCK) && defined(DEFAULT_SPI_BUS_MISO) && defined(DEFAULT_SPI_BUS_MOSI)) -#define BOARD_UART (defined(DEFAULT_UART_BUS_RX) && defined(DEFAULT_UART_BUS_TX)) -// I2C and SPI are always allocated off the heap. -#if BOARD_UART -#define BOARD_UART_ROOT_POINTER mp_obj_t shared_uart_bus; -#else -#define BOARD_UART_ROOT_POINTER -#endif -#else -#define BOARD_UART_ROOT_POINTER -#endif - #if CIRCUITPY_DISPLAYIO #ifndef CIRCUITPY_DISPLAY_LIMIT #define CIRCUITPY_DISPLAY_LIMIT (1) @@ -337,6 +356,10 @@ extern const struct _mp_obj_module_t nvm_module; #endif #endif +#ifndef ULAB_SUPPORTS_COMPLEX +#define ULAB_SUPPORTS_COMPLEX (0) +#endif + #if CIRCUITPY_ULAB // ulab requires reverse special methods #if defined(MICROPY_PY_REVERSE_SPECIAL_METHODS) && !MICROPY_PY_REVERSE_SPECIAL_METHODS diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 7f0721264b..14852580e5 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -462,3 +462,38 @@ CFLAGS += -DCIRCUITPY_WATCHDOG=$(CIRCUITPY_WATCHDOG) CIRCUITPY_WIFI ?= 0 CFLAGS += -DCIRCUITPY_WIFI=$(CIRCUITPY_WIFI) + +# tinyusb port tailored configuration +CIRCUITPY_TUSB_MEM_ALIGN ?= 4 +CFLAGS += -DCIRCUITPY_TUSB_MEM_ALIGN=$(CIRCUITPY_TUSB_MEM_ALIGN) + +CIRCUITPY_TUSB_ATTR_USBRAM ?= ".bss.usbram" +CFLAGS += -DCIRCUITPY_TUSB_ATTR_USBRAM=$(CIRCUITPY_TUSB_ATTR_USBRAM) + +# Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk +# $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. +# This should correspond to the MICROPY_LONGINT_IMPL definition in mpconfigport.h. +# +# Also propagate longint choice from .mk to C. There's no easy string comparison +# in cpp conditionals, so we #define separate names for each. + +ifeq ($(LONGINT_IMPL),NONE) +MPY_TOOL_LONGINT_IMPL = -mlongint-impl=none +CFLAGS += -DLONGINT_IMPL_NONE +else ifeq ($(LONGINT_IMPL),MPZ) +MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz +CFLAGS += -DLONGINT_IMPL_MPZ +else ifeq ($(LONGINT_IMPL),LONGLONG) +MPY_TOOL_LONGINT_IMPL = -mlongint-impl=longlong +CFLAGS += -DLONGINT_IMPL_LONGLONG +else +$(error LONGINT_IMPL set to surprising value: "$(LONGINT_IMPL)") +endif + +### +ifeq ($(LONGINT_IMPL),NONE) +else ifeq ($(LONGINT_IMPL),MPZ) +else ifeq ($(LONGINT_IMPL),LONGLONG) +else +$(error LONGINT_IMPL set to surprising value: "$(LONGINT_IMPL)") +endif diff --git a/py/modio.c b/py/modio.c index 18918cf3ce..23374578cf 100644 --- a/py/modio.c +++ b/py/modio.c @@ -257,7 +257,11 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(resource_stream_obj, resource_stream); #endif STATIC const mp_rom_map_elem_t mp_module_io_globals_table[] = { + #if CIRCUITPY + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_io) }, + #else { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_uio) }, + #endif // Note: mp_builtin_open_obj should be defined by port, it's not // part of the core. { MP_ROM_QSTR(MP_QSTR_open), MP_ROM_PTR(&mp_builtin_open_obj) }, diff --git a/py/objexcept.c b/py/objexcept.c index 90a54236d5..fc0787631f 100644 --- a/py/objexcept.c +++ b/py/objexcept.c @@ -104,7 +104,7 @@ mp_obj_t mp_alloc_emergency_exception_buf(mp_obj_t size_in) { #endif #endif // MICROPY_ENABLE_EMERGENCY_EXCEPTION_BUF -STATIC mp_obj_exception_t *get_native_exception(mp_obj_t self_in) { +mp_obj_exception_t *mp_obj_exception_get_native(mp_obj_t self_in) { assert(mp_obj_is_exception_instance(self_in)); if (mp_obj_is_native_exception_instance(self_in)) { return MP_OBJ_TO_PTR(self_in); @@ -206,7 +206,7 @@ mp_obj_t mp_obj_exception_make_new(const mp_obj_type_t *type, size_t n_args, siz // Get exception "value" - that is, first argument, or None mp_obj_t mp_obj_exception_get_value(mp_obj_t self_in) { - mp_obj_exception_t *self = get_native_exception(self_in); + mp_obj_exception_t *self = mp_obj_exception_get_native(self_in); if (self->args->len == 0) { return mp_const_none; } else { @@ -543,14 +543,14 @@ bool mp_obj_exception_match(mp_obj_t exc, mp_const_obj_t exc_type) { // traceback handling functions void mp_obj_exception_clear_traceback(mp_obj_t self_in) { - mp_obj_exception_t *self = get_native_exception(self_in); + mp_obj_exception_t *self = mp_obj_exception_get_native(self_in); // just set the traceback to the empty traceback object // we don't want to call any memory management functions here self->traceback = (mp_obj_traceback_t *)&mp_const_empty_traceback_obj; } void mp_obj_exception_add_traceback(mp_obj_t self_in, qstr file, size_t line, qstr block) { - mp_obj_exception_t *self = get_native_exception(self_in); + mp_obj_exception_t *self = mp_obj_exception_get_native(self_in); // Try to allocate memory for the traceback, with fallback to emergency traceback object if (self->traceback == NULL || self->traceback == (mp_obj_traceback_t *)&mp_const_empty_traceback_obj) { @@ -612,7 +612,7 @@ void mp_obj_exception_add_traceback(mp_obj_t self_in, qstr file, size_t line, qs } void mp_obj_exception_get_traceback(mp_obj_t self_in, size_t *n, size_t **values) { - mp_obj_exception_t *self = get_native_exception(self_in); + mp_obj_exception_t *self = mp_obj_exception_get_native(self_in); if (self->traceback == NULL) { *n = 0; diff --git a/py/objexcept.h b/py/objexcept.h index 261885e54d..f28f50f5dc 100644 --- a/py/objexcept.h +++ b/py/objexcept.h @@ -38,6 +38,7 @@ typedef struct _mp_obj_exception_t { void mp_obj_exception_print(const mp_print_t *print, mp_obj_t o_in, mp_print_kind_t kind); void mp_obj_exception_attr(mp_obj_t self_in, qstr attr, mp_obj_t *dest); +mp_obj_exception_t *mp_obj_exception_get_native(mp_obj_t self_in); #define MP_DEFINE_EXCEPTION(exc_name, base_name) \ const mp_obj_type_t mp_type_##exc_name = { \ diff --git a/py/ringbuf.c b/py/ringbuf.c index a904a37413..2003cc97d5 100644 --- a/py/ringbuf.c +++ b/py/ringbuf.c @@ -27,11 +27,20 @@ #include "ringbuf.h" +bool ringbuf_init(ringbuf_t *r, uint8_t *buf, size_t capacity) { + r->heap = false; + r->buf = buf; + r->size = capacity; + r->iget = r->iput = 0; + return r->buf != NULL; +} + // Dynamic initialization. This should be accessible from a root pointer. // capacity is the number of bytes the ring buffer can hold. The actual // size of the buffer is one greater than that, due to how the buffer // handles empty and full statuses. bool ringbuf_alloc(ringbuf_t *r, size_t capacity, bool long_lived) { + r->heap = true; r->buf = gc_alloc(capacity + 1, false, long_lived); r->size = capacity + 1; r->iget = r->iput = 0; @@ -39,7 +48,10 @@ bool ringbuf_alloc(ringbuf_t *r, size_t capacity, bool long_lived) { } void ringbuf_free(ringbuf_t *r) { - gc_free(r->buf); + if (r->heap) { + gc_free(r->buf); + } + r->buf = (uint8_t *)NULL; r->size = 0; ringbuf_clear(r); } diff --git a/py/ringbuf.h b/py/ringbuf.h index 35550d7750..6ed72dcf1a 100644 --- a/py/ringbuf.h +++ b/py/ringbuf.h @@ -37,14 +37,13 @@ typedef struct _ringbuf_t { uint32_t size; uint32_t iget; uint32_t iput; + bool heap; } ringbuf_t; // Note that the capacity of the buffer is N-1! -// Static initialization: -// byte buf_array[N]; -// ringbuf_t buf = {buf_array, sizeof(buf_array)}; - +// For static initialization use ringbuf_init() +bool ringbuf_init(ringbuf_t *r, uint8_t *buf, size_t capacity); bool ringbuf_alloc(ringbuf_t *r, size_t capacity, bool long_lived); void ringbuf_free(ringbuf_t *r); size_t ringbuf_capacity(ringbuf_t *r); diff --git a/requirements-doc.txt b/requirements-doc.txt index cefd7dc51d..ed5bc4c98e 100644 --- a/requirements-doc.txt +++ b/requirements-doc.txt @@ -6,9 +6,10 @@ twine wheel astroid setuptools +setuptools_scm # For sphinx -Sphinx<4 +sphinx>=4.0.0 sphinx-autoapi sphinx-rtd-theme sphinxcontrib-svg2pdfconverter diff --git a/shared-bindings/_bleio/Adapter.c b/shared-bindings/_bleio/Adapter.c index d985b0aecd..baff277b69 100644 --- a/shared-bindings/_bleio/Adapter.c +++ b/shared-bindings/_bleio/Adapter.c @@ -196,8 +196,8 @@ const mp_obj_property_t bleio_adapter_name_obj = { //| .. note:: If you set ``anonymous=True``, then a timeout must be specified. If no timeout is //| specified, then the maximum allowed timeout will be selected automatically. //| -//| :param ~_typing.ReadableBuffer data: advertising data packet bytes -//| :param ~_typing.ReadableBuffer scan_response: scan response data packet bytes. ``None`` if no scan response is needed. +//| :param ~circuitpython_typing.ReadableBuffer data: advertising data packet bytes +//| :param ~circuitpython_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. Zero means no timeout. @@ -282,7 +282,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_stop_advertising_obj, bleio_adapt //| """Starts a BLE scan and returns an iterator of results. Advertisements and scan responses are //| filtered and returned separately. //| -//| :param ~_typing.ReadableBuffer prefixes: Sequence of byte string prefixes to filter advertising packets +//| :param ~circuitpython_typing.ReadableBuffer prefixes: Sequence of byte string prefixes to filter advertising packets //| with. A packet without an advertising structure that matches one of the prefixes is //| 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. diff --git a/shared-bindings/_bleio/Address.c b/shared-bindings/_bleio/Address.c index 93345d95b0..97322bbb79 100644 --- a/shared-bindings/_bleio/Address.c +++ b/shared-bindings/_bleio/Address.c @@ -42,7 +42,7 @@ //| """Create a new Address object encapsulating the address value. //| The value itself can be one of: //| -//| :param ~_typing.ReadableBuffer address: The address value to encapsulate. A buffer object (bytearray, bytes) of 6 bytes. +//| :param ~circuitpython_typing.ReadableBuffer address: The address value to encapsulate. A buffer object (bytearray, bytes) of 6 bytes. //| :param int address_type: one of the integer values: `PUBLIC`, `RANDOM_STATIC`, //| `RANDOM_PRIVATE_RESOLVABLE`, or `RANDOM_PRIVATE_NON_RESOLVABLE`.""" //| ... diff --git a/shared-bindings/_bleio/Characteristic.c b/shared-bindings/_bleio/Characteristic.c index 3744c610c7..f4c77405d1 100644 --- a/shared-bindings/_bleio/Characteristic.c +++ b/shared-bindings/_bleio/Characteristic.c @@ -67,7 +67,7 @@ //| is 512, or possibly 510 if ``fixed_length`` is False. The default, 20, is the maximum //| number of data bytes that fit in a single BLE 4.x ATT packet. //| :param bool fixed_length: True if the characteristic value is of fixed length. -//| :param ~_typing.ReadableBuffer initial_value: The initial value for this characteristic. If not given, will be +//| :param ~circuitpython_typing.ReadableBuffer initial_value: The initial value for this characteristic. If not given, will be //| filled with zeros. //| :param str user_description: User friendly description of the characteristic //| diff --git a/shared-bindings/_bleio/Descriptor.c b/shared-bindings/_bleio/Descriptor.c index 5a29575ba0..d4dd9372f3 100644 --- a/shared-bindings/_bleio/Descriptor.c +++ b/shared-bindings/_bleio/Descriptor.c @@ -61,7 +61,7 @@ //| is 512, or possibly 510 if ``fixed_length`` is False. The default, 20, is the maximum //| number of data bytes that fit in a single BLE 4.x ATT packet. //| :param bool fixed_length: True if the descriptor value is of fixed length. -//| :param ~_typing.ReadableBuffer initial_value: The initial value for this descriptor. +//| :param ~circuitpython_typing.ReadableBuffer initial_value: The initial value for this descriptor. //| //| :return: the new Descriptor.""" //| ... diff --git a/shared-bindings/_bleio/UUID.c b/shared-bindings/_bleio/UUID.c index 028d21d9d5..4e3154eb03 100644 --- a/shared-bindings/_bleio/UUID.c +++ b/shared-bindings/_bleio/UUID.c @@ -48,7 +48,7 @@ //| temporary 16-bit UUID that can be used in place of the full 128-bit UUID. //| //| :param value: The uuid value to encapsulate -//| :type value: int, ~_typing.ReadableBuffer or str""" +//| :type value: int, ~circuitpython_typing.ReadableBuffer or str""" //| ... //| STATIC mp_obj_t bleio_uuid_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { diff --git a/shared-bindings/_eve/__init__.c b/shared-bindings/_eve/__init__.c index 69300e47e4..13e51cb882 100644 --- a/shared-bindings/_eve/__init__.c +++ b/shared-bindings/_eve/__init__.c @@ -79,7 +79,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(flush_obj, _flush); //| def cc(self, b: ReadableBuffer) -> None: //| """Append bytes to the command FIFO. //| -//| :param ~_typing.ReadableBuffer b: The bytes to add""" +//| :param ~circuitpython_typing.ReadableBuffer b: The bytes to add""" //| ... //| STATIC mp_obj_t _cc(mp_obj_t self, mp_obj_t b) { diff --git a/shared-bindings/_stage/Layer.c b/shared-bindings/_stage/Layer.c index a040ee9ab0..c3c0aa1801 100644 --- a/shared-bindings/_stage/Layer.c +++ b/shared-bindings/_stage/Layer.c @@ -40,9 +40,9 @@ //| //| :param int width: The width of the grid in tiles, or 1 for sprites. //| :param int height: The height of the grid in tiles, or 1 for sprites. -//| :param ~_typing.ReadableBuffer graphic: The graphic data of the tiles. -//| :param ~_typing.ReadableBuffer palette: The color palette to be used. -//| :param ~_typing.ReadableBuffer grid: The contents of the grid map. +//| :param ~circuitpython_typing.ReadableBuffer graphic: The graphic data of the tiles. +//| :param ~circuitpython_typing.ReadableBuffer palette: The color palette to be used. +//| :param ~circuitpython_typing.ReadableBuffer grid: The contents of the grid map. //| //| This class is intended for internal use in the ``stage`` library and //| it shouldn't be used on its own.""" diff --git a/shared-bindings/_stage/Text.c b/shared-bindings/_stage/Text.c index b57f4f0b6a..d6b22171d6 100644 --- a/shared-bindings/_stage/Text.c +++ b/shared-bindings/_stage/Text.c @@ -40,9 +40,9 @@ //| //| :param int width: The width of the grid in tiles, or 1 for sprites. //| :param int height: The height of the grid in tiles, or 1 for sprites. -//| :param ~_typing.ReadableBuffer font: The font data of the characters. -//| :param ~_typing.ReadableBuffer palette: The color palette to be used. -//| :param ~_typing.ReadableBuffer chars: The contents of the character grid. +//| :param ~circuitpython_typing.ReadableBuffer font: The font data of the characters. +//| :param ~circuitpython_typing.ReadableBuffer palette: The color palette to be used. +//| :param ~circuitpython_typing.ReadableBuffer chars: The contents of the character grid. //| //| This class is intended for internal use in the ``stage`` library and //| it shouldn't be used on its own.""" diff --git a/shared-bindings/_stage/__init__.c b/shared-bindings/_stage/__init__.c index 4dfcc796e7..ebaa06898e 100644 --- a/shared-bindings/_stage/__init__.c +++ b/shared-bindings/_stage/__init__.c @@ -48,7 +48,7 @@ //| :param int y1: Bottom edge of the fragment. //| :param layers: A list of the :py:class:`~_stage.Layer` objects. //| :type layers: list[Layer] -//| :param ~_typing.WriteableBuffer buffer: A buffer to use for rendering. +//| :param ~circuitpython_typing.WriteableBuffer buffer: A buffer to use for rendering. //| :param ~displayio.Display display: The display to use. //| :param int scale: How many times should the image be scaled up. //| :param int background: What color to display when nothing is there. diff --git a/shared-bindings/adafruit_bus_device/__init__.c b/shared-bindings/adafruit_bus_device/__init__.c index f25a882557..742cfc3480 100644 --- a/shared-bindings/adafruit_bus_device/__init__.c +++ b/shared-bindings/adafruit_bus_device/__init__.c @@ -32,8 +32,8 @@ #include "py/objproperty.h" #include "shared-bindings/adafruit_bus_device/__init__.h" -#include "shared-bindings/adafruit_bus_device/I2CDevice.h" -#include "shared-bindings/adafruit_bus_device/SPIDevice.h" +#include "shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.h" +#include "shared-bindings/adafruit_bus_device/spi_device/SPIDevice.h" STATIC const mp_rom_map_elem_t adafruit_bus_device_i2c_device_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_i2c_device) }, diff --git a/shared-bindings/adafruit_bus_device/I2CDevice.c b/shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.c similarity index 98% rename from shared-bindings/adafruit_bus_device/I2CDevice.c rename to shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.c index 98f2640483..327e8e72b4 100644 --- a/shared-bindings/adafruit_bus_device/I2CDevice.c +++ b/shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.c @@ -28,9 +28,9 @@ // busio.I2C class. #include "shared-bindings/microcontroller/Pin.h" -#include "shared-bindings/adafruit_bus_device/I2CDevice.h" +#include "shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.h" #include "shared-bindings/util.h" -#include "shared-module/adafruit_bus_device/I2CDevice.h" +#include "shared-module/adafruit_bus_device/i2c_device/I2CDevice.h" #include "shared/runtime/buffer_helper.h" #include "shared/runtime/context_manager_helpers.h" diff --git a/shared-bindings/adafruit_bus_device/I2CDevice.h b/shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.h similarity index 97% rename from shared-bindings/adafruit_bus_device/I2CDevice.h rename to shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.h index 36a95b6a24..71c169a868 100644 --- a/shared-bindings/adafruit_bus_device/I2CDevice.h +++ b/shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.h @@ -36,7 +36,7 @@ #include "py/obj.h" -#include "shared-module/adafruit_bus_device/I2CDevice.h" +#include "shared-module/adafruit_bus_device/i2c_device/I2CDevice.h" // #include "shared-bindings/busio/I2C.h" // Type object used in Python. Should be shared between ports. diff --git a/shared-bindings/adafruit_bus_device/SPIDevice.c b/shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c similarity index 97% rename from shared-bindings/adafruit_bus_device/SPIDevice.c rename to shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c index aee8882940..2c5708b831 100644 --- a/shared-bindings/adafruit_bus_device/SPIDevice.c +++ b/shared-bindings/adafruit_bus_device/spi_device/SPIDevice.c @@ -25,9 +25,9 @@ */ #include "shared-bindings/microcontroller/Pin.h" -#include "shared-bindings/adafruit_bus_device/SPIDevice.h" +#include "shared-bindings/adafruit_bus_device/spi_device/SPIDevice.h" #include "shared-bindings/util.h" -#include "shared-module/adafruit_bus_device/SPIDevice.h" +#include "shared-module/adafruit_bus_device/spi_device/SPIDevice.h" #include "common-hal/digitalio/DigitalInOut.h" #include "shared-bindings/digitalio/DigitalInOut.h" diff --git a/shared-bindings/adafruit_bus_device/SPIDevice.h b/shared-bindings/adafruit_bus_device/spi_device/SPIDevice.h similarity index 97% rename from shared-bindings/adafruit_bus_device/SPIDevice.h rename to shared-bindings/adafruit_bus_device/spi_device/SPIDevice.h index 43b9377f97..b92a5ebfae 100644 --- a/shared-bindings/adafruit_bus_device/SPIDevice.h +++ b/shared-bindings/adafruit_bus_device/spi_device/SPIDevice.h @@ -36,7 +36,7 @@ #include "py/obj.h" -#include "shared-module/adafruit_bus_device/SPIDevice.h" +#include "shared-module/adafruit_bus_device/spi_device/SPIDevice.h" // Type object used in Python. Should be shared between ports. extern const mp_obj_type_t adafruit_bus_device_spidevice_type; diff --git a/shared-bindings/adafruit_pixelbuf/PixelBuf.c b/shared-bindings/adafruit_pixelbuf/PixelBuf.c index db9f1c01a8..7be059fa6b 100644 --- a/shared-bindings/adafruit_pixelbuf/PixelBuf.c +++ b/shared-bindings/adafruit_pixelbuf/PixelBuf.c @@ -64,8 +64,8 @@ static void parse_byteorder(mp_obj_t byteorder_obj, pixelbuf_byteorder_details_t //| :param str byteorder: Byte order string (such as "RGB", "RGBW" or "PBGR") //| :param float brightness: Brightness (0 to 1.0, default 1.0) //| :param bool auto_write: Whether to automatically write pixels (Default False) -//| :param ~_typing.ReadableBuffer header: Sequence of bytes to always send before pixel values. -//| :param ~_typing.ReadableBuffer trailer: Sequence of bytes to always send after pixel values.""" +//| :param ~circuitpython_typing.ReadableBuffer header: Sequence of bytes to always send before pixel values. +//| :param ~circuitpython_typing.ReadableBuffer trailer: Sequence of bytes to always send after pixel values.""" //| ... //| STATIC mp_obj_t pixelbuf_pixelbuf_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { diff --git a/shared-bindings/aesio/aes.c b/shared-bindings/aesio/aes.c index 232f4bede8..4acadc5ab6 100644 --- a/shared-bindings/aesio/aes.c +++ b/shared-bindings/aesio/aes.c @@ -19,10 +19,10 @@ //| def __init__(self, key: ReadableBuffer, mode: int = 0, iv: Optional[ReadableBuffer] = None, segment_size: int = 8) -> None: //| """Create a new AES state with the given key. //| -//| :param ~_typing.ReadableBuffer key: A 16-, 24-, or 32-byte key +//| :param ~circuitpython_typing.ReadableBuffer key: A 16-, 24-, or 32-byte key //| :param int mode: AES mode to use. One of: `MODE_ECB`, `MODE_CBC`, or //| `MODE_CTR` -//| :param ~_typing.ReadableBuffer iv: Initialization vector to use for CBC or CTR mode +//| :param ~circuitpython_typing.ReadableBuffer iv: Initialization vector to use for CBC or CTR mode //| //| Additional arguments are supported for legacy reasons. //| diff --git a/shared-bindings/alarm/__init__.c b/shared-bindings/alarm/__init__.c index 4160f6a334..9f9e01885a 100644 --- a/shared-bindings/alarm/__init__.c +++ b/shared-bindings/alarm/__init__.c @@ -64,8 +64,10 @@ //| This object is the sole instance of `alarm.SleepMemory`.""" //| -//| wake_alarm: Alarm -//| """The most recently triggered alarm. If CircuitPython was sleeping, the alarm the woke it from sleep.""" +//| wake_alarm: Optional[Alarm] +//| """The most recently triggered alarm. If CircuitPython was sleeping, the alarm that woke it from sleep. +//| If no alarm occured since the last hard reset or soft restart, value is ``None``. +//| """ //| // wake_alarm is implemented as a dictionary entry, so there's no code here. @@ -103,7 +105,9 @@ STATIC mp_obj_t alarm_light_sleep_until_alarms(size_t n_args, const mp_obj_t *ar validate_objs_are_alarms(n_args, args); - return common_hal_alarm_light_sleep_until_alarms(n_args, args); + mp_obj_t alarm = common_hal_alarm_light_sleep_until_alarms(n_args, args); + shared_alarm_save_wake_alarm(alarm); + return alarm; } MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(alarm_light_sleep_until_alarms_obj, 1, MP_OBJ_FUN_ARGS_MAX, alarm_light_sleep_until_alarms); diff --git a/shared-bindings/audiobusio/I2SOut.c b/shared-bindings/audiobusio/I2SOut.c index c343df242c..c9910427f3 100644 --- a/shared-bindings/audiobusio/I2SOut.c +++ b/shared-bindings/audiobusio/I2SOut.c @@ -155,7 +155,7 @@ STATIC mp_obj_t audiobusio_i2sout_obj___exit__(size_t n_args, const mp_obj_t *ar STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audiobusio_i2sout___exit___obj, 4, 4, audiobusio_i2sout_obj___exit__); -//| def play(self, sample: _typing.AudioSample, *, loop: bool = False) -> None: +//| def play(self, sample: circuitpython_typing.AudioSample, *, loop: bool = False) -> None: //| """Plays the sample once when loop=False and continuously when loop=True. //| Does not block. Use `playing` to block. //| diff --git a/shared-bindings/audiocore/RawSample.c b/shared-bindings/audiocore/RawSample.c index c3af2f30f0..05c5b14b5e 100644 --- a/shared-bindings/audiocore/RawSample.c +++ b/shared-bindings/audiocore/RawSample.c @@ -43,7 +43,7 @@ //| first sample will be for channel 1, the second sample will be for channel two, the third for //| channel 1 and so on. //| -//| :param ~_typing.ReadableBuffer buffer: A buffer with samples +//| :param ~circuitpython_typing.ReadableBuffer buffer: A buffer with samples //| :param int channel_count: The number of channels in the buffer //| :param int sample_rate: The desired playback sample rate //| diff --git a/shared-bindings/audiocore/WaveFile.c b/shared-bindings/audiocore/WaveFile.c index 74ea9fda9f..1a8b5cae11 100644 --- a/shared-bindings/audiocore/WaveFile.c +++ b/shared-bindings/audiocore/WaveFile.c @@ -44,7 +44,7 @@ //| """Load a .wav file for playback with `audioio.AudioOut` or `audiobusio.I2SOut`. //| //| :param typing.BinaryIO file: Already opened wave file -//| :param ~_typing.WriteableBuffer buffer: Optional pre-allocated buffer, +//| :param ~circuitpython_typing.WriteableBuffer buffer: Optional pre-allocated buffer, //| that will be split in half and used for double-buffering of the data. //| The buffer must be 8 to 1024 bytes long. //| If not provided, two 256 byte buffers are initially allocated internally. diff --git a/shared-bindings/audioio/AudioOut.c b/shared-bindings/audioio/AudioOut.c index 80072e9128..2fd4c0c452 100644 --- a/shared-bindings/audioio/AudioOut.c +++ b/shared-bindings/audioio/AudioOut.c @@ -146,7 +146,7 @@ STATIC mp_obj_t audioio_audioout_obj___exit__(size_t n_args, const mp_obj_t *arg STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audioio_audioout___exit___obj, 4, 4, audioio_audioout_obj___exit__); -//| def play(self, sample: _typing.AudioSample, *, loop: bool = False) -> None: +//| def play(self, sample: circuitpython_typing.AudioSample, *, loop: bool = False) -> None: //| """Plays the sample once when loop=False and continuously when loop=True. //| Does not block. Use `playing` to block. //| diff --git a/shared-bindings/audiomixer/Mixer.c b/shared-bindings/audiomixer/Mixer.c index 619e2c095c..3248e649c9 100644 --- a/shared-bindings/audiomixer/Mixer.c +++ b/shared-bindings/audiomixer/Mixer.c @@ -211,7 +211,7 @@ const mp_obj_property_t audiomixer_mixer_voice_obj = { MP_ROM_NONE}, }; -//| def play(self, sample: _typing.AudioSample, *, voice: int = 0, loop: bool = False) -> None: +//| def play(self, sample: circuitpython_typing.AudioSample, *, voice: int = 0, loop: bool = False) -> None: //| """Plays the sample once when loop=False and continuously when loop=True. //| Does not block. Use `playing` to block. //| diff --git a/shared-bindings/audiomixer/MixerVoice.c b/shared-bindings/audiomixer/MixerVoice.c index d3bac8c3de..82b6972864 100644 --- a/shared-bindings/audiomixer/MixerVoice.c +++ b/shared-bindings/audiomixer/MixerVoice.c @@ -57,7 +57,7 @@ STATIC mp_obj_t audiomixer_mixervoice_make_new(const mp_obj_type_t *type, size_t return MP_OBJ_FROM_PTR(self); } -//| def play(self, sample: _typing.AudioSample, *, loop: bool = False) -> None: +//| def play(self, sample: circuitpython_typing.AudioSample, *, loop: bool = False) -> None: //| """Plays the sample once when ``loop=False``, and continuously when ``loop=True``. //| Does not block. Use `playing` to block. //| diff --git a/shared-bindings/audiomp3/MP3Decoder.c b/shared-bindings/audiomp3/MP3Decoder.c index 589751821d..4761feacd8 100644 --- a/shared-bindings/audiomp3/MP3Decoder.c +++ b/shared-bindings/audiomp3/MP3Decoder.c @@ -42,7 +42,7 @@ //| """Load a .mp3 file for playback with `audioio.AudioOut` or `audiobusio.I2SOut`. //| //| :param typing.BinaryIO file: Already opened mp3 file -//| :param ~_typing.WriteableBuffer buffer: Optional pre-allocated buffer, that will be split in half and used for double-buffering of the data. If not provided, two buffers are allocated internally. The specific buffer size required depends on the mp3 file. +//| :param ~circuitpython_typing.WriteableBuffer buffer: Optional pre-allocated buffer, that will be split in half and used for double-buffering of the data. If not provided, two buffers are allocated internally. The specific buffer size required depends on the mp3 file. //| //| //| Playing a mp3 file from flash:: @@ -232,6 +232,22 @@ const mp_obj_property_t audiomp3_mp3file_rms_level_obj = { MP_ROM_NONE}, }; +//| samples_decoded: int +//| """The number of audio samples decoded from the current file. (read only)""" +//| +STATIC mp_obj_t audiomp3_mp3file_obj_get_samples_decoded(mp_obj_t self_in) { + audiomp3_mp3file_obj_t *self = MP_OBJ_TO_PTR(self_in); + check_for_deinit(self); + return MP_OBJ_NEW_SMALL_INT(common_hal_audiomp3_mp3file_get_samples_decoded(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(audiomp3_mp3file_get_samples_decoded_obj, audiomp3_mp3file_obj_get_samples_decoded); + +const mp_obj_property_t audiomp3_mp3file_samples_decoded_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&audiomp3_mp3file_get_samples_decoded_obj, + MP_ROM_NONE, + MP_ROM_NONE}, +}; STATIC const mp_rom_map_elem_t audiomp3_mp3file_locals_dict_table[] = { // Methods @@ -245,6 +261,7 @@ STATIC const mp_rom_map_elem_t audiomp3_mp3file_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_bits_per_sample), MP_ROM_PTR(&audiomp3_mp3file_bits_per_sample_obj) }, { MP_ROM_QSTR(MP_QSTR_channel_count), MP_ROM_PTR(&audiomp3_mp3file_channel_count_obj) }, { MP_ROM_QSTR(MP_QSTR_rms_level), MP_ROM_PTR(&audiomp3_mp3file_rms_level_obj) }, + { MP_ROM_QSTR(MP_QSTR_samples_decoded), MP_ROM_PTR(&audiomp3_mp3file_samples_decoded_obj) }, }; STATIC MP_DEFINE_CONST_DICT(audiomp3_mp3file_locals_dict, audiomp3_mp3file_locals_dict_table); diff --git a/shared-bindings/audiomp3/MP3Decoder.h b/shared-bindings/audiomp3/MP3Decoder.h index 2428cedf16..e1f4fcff4a 100644 --- a/shared-bindings/audiomp3/MP3Decoder.h +++ b/shared-bindings/audiomp3/MP3Decoder.h @@ -46,5 +46,6 @@ void common_hal_audiomp3_mp3file_set_sample_rate(audiomp3_mp3file_obj_t *self, u uint8_t common_hal_audiomp3_mp3file_get_bits_per_sample(audiomp3_mp3file_obj_t *self); uint8_t common_hal_audiomp3_mp3file_get_channel_count(audiomp3_mp3file_obj_t *self); float common_hal_audiomp3_mp3file_get_rms_level(audiomp3_mp3file_obj_t *self); +uint32_t common_hal_audiomp3_mp3file_get_samples_decoded(audiomp3_mp3file_obj_t *self); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_AUDIOIO_MP3FILE_H diff --git a/shared-bindings/audiopwmio/PWMAudioOut.c b/shared-bindings/audiopwmio/PWMAudioOut.c index cded4a634f..85332d0fac 100644 --- a/shared-bindings/audiopwmio/PWMAudioOut.c +++ b/shared-bindings/audiopwmio/PWMAudioOut.c @@ -148,7 +148,7 @@ STATIC mp_obj_t audiopwmio_pwmaudioout_obj___exit__(size_t n_args, const mp_obj_ STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audiopwmio_pwmaudioout___exit___obj, 4, 4, audiopwmio_pwmaudioout_obj___exit__); -//| def play(self, sample: _typing.AudioSample, *, loop: bool = False) -> None: +//| def play(self, sample: circuitpython_typing.AudioSample, *, loop: bool = False) -> None: //| """Plays the sample once when loop=False and continuously when loop=True. //| Does not block. Use `playing` to block. //| diff --git a/shared-bindings/bitbangio/I2C.c b/shared-bindings/bitbangio/I2C.c index b47ace149f..c65b184ca0 100644 --- a/shared-bindings/bitbangio/I2C.c +++ b/shared-bindings/bitbangio/I2C.c @@ -292,8 +292,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bitbangio_i2c_writeto_obj, 1, bitbangio_i2c_wr //| The number of bytes read will be the length of ``out_buffer[in_start:in_end]``. //| :param int address: 7-bit device address -//| :param ~_typing.ReadableBuffer out_buffer: buffer containing the bytes to write -//| :param ~_typing.WriteableBuffer in_buffer: buffer to write into +//| :param ~circuitpython_typing.ReadableBuffer out_buffer: buffer containing the bytes to write +//| :param ~circuitpython_typing.WriteableBuffer in_buffer: buffer to write into //| :param int out_start: beginning of ``out_buffer`` slice //| :param int out_end: end of ``out_buffer`` slice; if not specified, use ``len(out_buffer)`` //| :param int in_start: beginning of ``in_buffer`` slice diff --git a/shared-bindings/bitmaptools/__init__.c b/shared-bindings/bitmaptools/__init__.c index ec26eab98e..df6292afec 100644 --- a/shared-bindings/bitmaptools/__init__.c +++ b/shared-bindings/bitmaptools/__init__.c @@ -255,7 +255,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(bitmaptools_rotozoom_obj, 0, bitmaptools_obj_rotozoom // requires at least 2 arguments (destination bitmap and source bitmap) //| -//| def alphablend(dest_bitmap, source_bitmap_1, source_bitmap_2, colorspace: displayio.Colorspace, factor1: float=.5, factor2: float=None): +//| def alphablend(dest_bitmap: displayio.Bitmap , source_bitmap_1: displayio.Bitmap, source_bitmap_2: displayio.Bitmap, colorspace: displayio.Colorspace, factor1: float=.5, factor2: float=None) -> None: //| """Alpha blend the two source bitmaps into the destination. //| //| It is permitted for the destination bitmap to be one of the two diff --git a/shared-bindings/board/__init__.c b/shared-bindings/board/__init__.c index bb273c61a9..8b2738a248 100644 --- a/shared-bindings/board/__init__.c +++ b/shared-bindings/board/__init__.c @@ -28,12 +28,15 @@ #include "py/runtime.h" #include "shared-bindings/board/__init__.h" -#if BOARD_I2C +#if CIRCUITPY_BOARD_I2C #include "shared-bindings/busio/I2C.h" #endif -#if BOARD_SPI +#if CIRCUITPY_BOARD_SPI #include "shared-bindings/busio/SPI.h" #endif +#if CIRCUITPY_BOARD_UART +#include "shared-bindings/busio/UART.h" +#endif //| """Board specific pin names //| @@ -47,84 +50,57 @@ //| """Board ID string. The unique identifier for the board model in //| circuitpython, as well as on circuitpython.org. //| Example: "hallowing_m0_express".""" -//| //| def I2C() -> busio.I2C: -//| """Returns the `busio.I2C` object for the board designated SDA and SCL pins. It is a singleton.""" +//| """Returns the `busio.I2C` object for the board's designated I2C bus(es). +//| The object created is a singleton, and uses the default parameter values for `busio.I2C`.""" //| ... //| - -#if BOARD_I2C -mp_obj_t board_i2c(void) { - mp_obj_t singleton = common_hal_board_get_i2c(); - if (singleton != NULL && !common_hal_busio_i2c_deinited(singleton)) { - return singleton; - } - assert_pin_free(DEFAULT_I2C_BUS_SDA); - assert_pin_free(DEFAULT_I2C_BUS_SCL); - return common_hal_board_create_i2c(); +#if CIRCUITPY_BOARD_I2C +STATIC mp_obj_t board_i2c_0(void) { + return common_hal_board_create_i2c(0); } #else -mp_obj_t board_i2c(void) { +STATIC mp_obj_t board_i2c_0(void) { mp_raise_NotImplementedError_varg(translate("No default %q bus"), MP_QSTR_I2C); return MP_ROM_NONE; } #endif -MP_DEFINE_CONST_FUN_OBJ_0(board_i2c_obj, board_i2c); - +MP_DEFINE_CONST_FUN_OBJ_0(board_i2c_obj, board_i2c_0); //| def SPI() -> busio.SPI: -//| """Returns the `busio.SPI` object for the board designated SCK, MOSI and MISO pins. It is a -//| singleton.""" +//| """Returns the `busio.SPI` object for the board's designated SPI bus(es). +//| The object created is a singleton, and uses the default parameter values for `busio.SPI`.""" //| ... //| -#if BOARD_SPI -mp_obj_t board_spi(void) { - mp_obj_t singleton = common_hal_board_get_spi(); - if (singleton != NULL && !common_hal_busio_spi_deinited(singleton)) { - return singleton; - } - assert_pin_free(DEFAULT_SPI_BUS_SCK); - assert_pin_free(DEFAULT_SPI_BUS_MOSI); - assert_pin_free(DEFAULT_SPI_BUS_MISO); - return common_hal_board_create_spi(); +#if CIRCUITPY_BOARD_SPI +STATIC mp_obj_t board_spi_0(void) { + return common_hal_board_create_spi(0); } #else -mp_obj_t board_spi(void) { +STATIC mp_obj_t board_spi_0(void) { mp_raise_NotImplementedError_varg(translate("No default %q bus"), MP_QSTR_SPI); return MP_ROM_NONE; } #endif -MP_DEFINE_CONST_FUN_OBJ_0(board_spi_obj, board_spi); +MP_DEFINE_CONST_FUN_OBJ_0(board_spi_obj, board_spi_0); //| def UART() -> busio.UART: -//| """Returns the `busio.UART` object for the board designated TX and RX pins. It is a singleton. -//| -//| The object created uses the default parameter values for `busio.UART`. If you need to set -//| parameters that are not changeable after creation, such as ``receiver_buffer_size``, -//| do not use `board.UART()`; instead create a `busio.UART` object explicitly with the -//| desired parameters.""" +//| """Returns the `busio.UART` object for the board's designated UART bus(es). +//| The object created is a singleton, and uses the default parameter values for `busio.UART`.""" //| ... //| -#if BOARD_UART -mp_obj_t board_uart(void) { - mp_obj_t singleton = common_hal_board_get_uart(); - if (singleton != NULL) { - return singleton; - } - - assert_pin_free(DEFAULT_UART_BUS_RX); - assert_pin_free(DEFAULT_UART_BUS_TX); - - return common_hal_board_create_uart(); +#if CIRCUITPY_BOARD_UART +STATIC mp_obj_t board_uart_0(void) { + return common_hal_board_create_uart(0); } #else -mp_obj_t board_uart(void) { +STATIC mp_obj_t board_uart_0(void) { mp_raise_NotImplementedError_varg(translate("No default %q bus"), MP_QSTR_UART); return MP_ROM_NONE; } #endif -MP_DEFINE_CONST_FUN_OBJ_0(board_uart_obj, board_uart); +MP_DEFINE_CONST_FUN_OBJ_0(board_uart_obj, board_uart_0); const mp_obj_module_t board_module = { .base = { &mp_type_module }, diff --git a/shared-bindings/board/__init__.h b/shared-bindings/board/__init__.h index bc4d7df61f..b668e0a04b 100644 --- a/shared-bindings/board/__init__.h +++ b/shared-bindings/board/__init__.h @@ -35,21 +35,29 @@ extern const mp_obj_dict_t board_module_globals; STATIC const MP_DEFINE_STR_OBJ(board_module_id_obj, CIRCUITPY_BOARD_ID); -mp_obj_t common_hal_board_get_i2c(void); -mp_obj_t common_hal_board_create_i2c(void); +bool common_hal_board_is_i2c(mp_obj_t obj); +mp_obj_t common_hal_board_get_i2c(const mp_int_t instance); +mp_obj_t common_hal_board_create_i2c(const mp_int_t instance); +mp_obj_t board_i2c(size_t n_args, const mp_obj_t *args); MP_DECLARE_CONST_FUN_OBJ_0(board_i2c_obj); -mp_obj_t common_hal_board_get_spi(void); -mp_obj_t common_hal_board_create_spi(void); +bool common_hal_board_is_spi(mp_obj_t obj); +mp_obj_t common_hal_board_get_spi(const mp_int_t instance); +mp_obj_t common_hal_board_create_spi(const mp_int_t instance); +mp_obj_t board_spi(size_t n_args, const mp_obj_t *args); MP_DECLARE_CONST_FUN_OBJ_0(board_spi_obj); -mp_obj_t common_hal_board_get_uart(void); -mp_obj_t common_hal_board_create_uart(void); +bool common_hal_board_is_uart(mp_obj_t obj); +mp_obj_t common_hal_board_get_uart(const mp_int_t instance); +mp_obj_t common_hal_board_create_uart(const mp_int_t instance); +mp_obj_t board_uart(size_t n_args, const mp_obj_t *args); MP_DECLARE_CONST_FUN_OBJ_0(board_uart_obj); -mp_obj_t board_i2c(void); -mp_obj_t board_spi(void); -mp_obj_t board_uart(void); +#define CIRCUITPY_BOARD_BUS_SINGLETON(name, bus, instance) \ + STATIC mp_obj_t board_##name(void) { \ + return common_hal_board_create_##bus(instance); \ + } \ + MP_DEFINE_CONST_FUN_OBJ_0(board_##name##_obj, board_##name); #define CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS \ { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_board) }, \ diff --git a/shared-bindings/busio/I2C.c b/shared-bindings/busio/I2C.c index 4aea62a8a5..19b205e4ca 100644 --- a/shared-bindings/busio/I2C.c +++ b/shared-bindings/busio/I2C.c @@ -299,8 +299,8 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(busio_i2c_writeto_obj, 1, busio_i2c_writeto); //| The number of bytes read will be the length of ``out_buffer[in_start:in_end]``. //| :param int address: 7-bit device address -//| :param ~_typing.ReadableBuffer out_buffer: buffer containing the bytes to write -//| :param ~_typing.WriteableBuffer in_buffer: buffer to write into +//| :param ~circuitpython_typing.ReadableBuffer out_buffer: buffer containing the bytes to write +//| :param ~circuitpython_typing.WriteableBuffer in_buffer: buffer to write into //| :param int out_start: beginning of ``out_buffer`` slice //| :param int out_end: end of ``out_buffer`` slice; if not specified, use ``len(out_buffer)`` //| :param int in_start: beginning of ``in_buffer`` slice diff --git a/shared-bindings/_typing/__init__.pyi b/shared-bindings/circuitpython_typing/__init__.pyi similarity index 100% rename from shared-bindings/_typing/__init__.pyi rename to shared-bindings/circuitpython_typing/__init__.pyi diff --git a/shared-bindings/countio/Counter.c b/shared-bindings/countio/Counter.c index 873da912a6..8582f4497e 100644 --- a/shared-bindings/countio/Counter.c +++ b/shared-bindings/countio/Counter.c @@ -7,47 +7,56 @@ #include "py/runtime0.h" #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/countio/Counter.h" +#include "shared-bindings/countio/Edge.h" #include "shared-bindings/util.h" //| class Counter: -//| """Counter will keep track of the number of falling edge transistions (pulses) on a -//| given pin""" +//| """Count the number of rising- and/or falling-edge transitions on a given pin. +//| """ //| -//| def __init__(self, pin_a: microcontroller.Pin) -> None: -//| """Create a Counter object associated with the given pin. It tracks the number of -//| falling pulses relative when the object is constructed. +//| def __init__(self, pin: microcontroller.Pin, *, edge: Edge = Edge.FALL, pull: Optional[digitalio.Pull]) -> None: +//| """Create a Counter object associated with the given pin that counts +//| rising- and/or falling-edge transitions. At least one of ``rise`` and ``fall`` must be True. +//| The default is to count only falling edges, and is for historical backward compatibility. //| -//| :param ~microcontroller.Pin pin_a: Pin to read pulses from. +//| :param ~microcontroller.Pin pin: pin to monitor +//| :param Edge: which edge transitions to count +//| :param digitalio.Pull: enable a pull-up or pull-down if not None //| //| -//| For example:: +//| For example:: //| -//| import board -//| import countio +//| import board +//| import countio //| -//| pin_counter = countio.Counter(board.D1) -//| #reset the count after 100 counts -//| while True: -//| if pin_counter.count == 100: -//| pin_counter.reset() -//| print(pin_counter.count)""" +//| # Count rising edges only. +//| pin_counter = countio.Counter(board.D1, edge=Edge.RISE) +//| # Reset the count after 100 counts. +//| while True: +//| if pin_counter.count >= 100: +//| pin_counter.reset() +//| print(pin_counter.count) +//| """ +//| ... //| STATIC mp_obj_t countio_counter_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { - enum { ARG_pin_a }; + enum { ARG_pin, ARG_edge, ARG_pull }; static const mp_arg_t allowed_args[] = { - { MP_QSTR_pin_a, MP_ARG_REQUIRED | MP_ARG_OBJ } - + { MP_QSTR_pin, MP_ARG_REQUIRED | MP_ARG_OBJ }, + { MP_QSTR_edge, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_FROM_PTR(&edge_FALL_obj) } }, + { MP_QSTR_pull, 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_kw_array(n_args, n_kw, all_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - const mcu_pin_obj_t *pin_a = validate_obj_is_free_pin(args[ARG_pin_a].u_obj); - + const mcu_pin_obj_t *pin = validate_obj_is_free_pin(args[ARG_pin].u_obj); + const countio_edge_t edge = validate_edge(args[ARG_edge].u_obj, MP_QSTR_edge); + const digitalio_pull_t pull = validate_pull(args[ARG_pull].u_obj, MP_QSTR_pull); countio_counter_obj_t *self = m_new_obj(countio_counter_obj_t); self->base.type = &countio_counter_type; - common_hal_countio_counter_construct(self, pin_a); + common_hal_countio_counter_construct(self, pin, edge, pull); return MP_OBJ_FROM_PTR(self); } @@ -118,8 +127,7 @@ const mp_obj_property_t countio_counter_count_obj = { STATIC mp_obj_t countio_counter_reset(mp_obj_t self_in) { countio_counter_obj_t *self = MP_OBJ_TO_PTR(self_in); check_for_deinit(self); - // set the position to zero for reset - common_hal_countio_counter_reset(self); + common_hal_countio_counter_set_count(self, 0); return mp_const_none; } diff --git a/shared-bindings/countio/Counter.h b/shared-bindings/countio/Counter.h index a9eced41a3..d660cc8f49 100644 --- a/shared-bindings/countio/Counter.h +++ b/shared-bindings/countio/Counter.h @@ -3,16 +3,17 @@ #include "common-hal/microcontroller/Pin.h" #include "common-hal/countio/Counter.h" +#include "shared-bindings/countio/Edge.h" +#include "shared-bindings/digitalio/Pull.h" extern const mp_obj_type_t countio_counter_type; extern void common_hal_countio_counter_construct(countio_counter_obj_t *self, - const mcu_pin_obj_t *pin_a); + const mcu_pin_obj_t *pin, countio_edge_t edge, digitalio_pull_t pull); extern void common_hal_countio_counter_deinit(countio_counter_obj_t *self); extern bool common_hal_countio_counter_deinited(countio_counter_obj_t *self); extern mp_int_t common_hal_countio_counter_get_count(countio_counter_obj_t *self); extern void common_hal_countio_counter_set_count(countio_counter_obj_t *self, mp_int_t new_count); -extern void common_hal_countio_counter_reset(countio_counter_obj_t *self); #endif // MICROPY_INCLUDED_SHARED_BINDINGS_COUNTIO_COUNTER_H diff --git a/shared-bindings/countio/Edge.c b/shared-bindings/countio/Edge.c new file mode 100644 index 0000000000..980b3a3705 --- /dev/null +++ b/shared-bindings/countio/Edge.c @@ -0,0 +1,67 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Dan Halbert 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 "py/obj.h" +#include "py/enum.h" +#include "py/runtime.h" + +#include "shared-bindings/countio/Edge.h" + +MAKE_ENUM_VALUE(countio_edge_type, edge, RISE, EDGE_RISE); +MAKE_ENUM_VALUE(countio_edge_type, edge, FALL, EDGE_FALL); +MAKE_ENUM_VALUE(countio_edge_type, edge, RISE_AND_FALL, EDGE_RISE_AND_FALL); + +//| class Edge: +//| """Enumerates which signal transitions can be counted.""" +//| +//| def __init__(self) -> None: +//| """Enum-like class to define which signal transitions to count.""" +//| ... +//| +//| RISE: Edge +//| """Count the rising edges.""" +//| +//| FALL: Edge +//| """Count the falling edges.""" +//| +//| RISE_AND_FALL: Edge +//| """Count the rising and falling edges.""" +//| +MAKE_ENUM_MAP(countio_edge) { + MAKE_ENUM_MAP_ENTRY(edge, RISE), + MAKE_ENUM_MAP_ENTRY(edge, FALL), + MAKE_ENUM_MAP_ENTRY(edge, RISE_AND_FALL), +}; + +STATIC MP_DEFINE_CONST_DICT(countio_edge_locals_dict, countio_edge_locals_table); + +MAKE_PRINTER(countio, countio_edge); + +MAKE_ENUM_TYPE(countio, Edge, countio_edge); + +countio_edge_t validate_edge(mp_obj_t obj, qstr arg_name) { + return cp_enum_value(&countio_edge_type, mp_arg_validate_type(obj, &countio_edge_type, arg_name)); +} diff --git a/shared-bindings/countio/Edge.h b/shared-bindings/countio/Edge.h new file mode 100644 index 0000000000..ca4cddbef3 --- /dev/null +++ b/shared-bindings/countio/Edge.h @@ -0,0 +1,44 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 an Halbertfor 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_COUNTIO_EDGE_H +#define MICROPY_INCLUDED_SHARED_BINDINGS_COUNTIO_EDGE_H + +#include "py/enum.h" +#include "py/obj.h" + +typedef enum _countio_edge_t { + EDGE_RISE, + EDGE_FALL, + EDGE_RISE_AND_FALL, +} countio_edge_t; + +extern const mp_obj_type_t countio_edge_type; +extern const cp_enum_obj_t edge_FALL_obj; + +countio_edge_t validate_edge(mp_obj_t obj, qstr arg_name); + +#endif // MICROPY_INCLUDED_SHARED_BINDINGS_COUNTIO_EDGE_H diff --git a/shared-bindings/countio/__init__.c b/shared-bindings/countio/__init__.c index faa23da9b0..d72ed9fd25 100644 --- a/shared-bindings/countio/__init__.c +++ b/shared-bindings/countio/__init__.c @@ -7,16 +7,12 @@ #include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/countio/__init__.h" #include "shared-bindings/countio/Counter.h" +#include "shared-bindings/countio/Edge.h" //| """Support for edge counting //| //| The `countio` module contains logic to read and count edge transistions //| - -//| .. warning:: This module is not available in some SAMD21 (aka M0) builds. See the -//| :ref:`module-support-matrix` for more info. -//| - //| All classes change hardware state and should be deinitialized when they //| are no longer needed if the program continues after use. To do so, either //| call :py:meth:`!deinit` or use a context manager. See @@ -25,7 +21,8 @@ STATIC const mp_rom_map_elem_t countio_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_countio) }, - { MP_ROM_QSTR(MP_QSTR_Counter), MP_ROM_PTR(&countio_counter_type) }, + { MP_ROM_QSTR(MP_QSTR_Counter), MP_ROM_PTR(&countio_counter_type) }, + { MP_ROM_QSTR(MP_QSTR_Edge), MP_ROM_PTR(&countio_edge_type) }, }; STATIC MP_DEFINE_CONST_DICT(countio_module_globals, countio_module_globals_table); diff --git a/shared-bindings/digitalio/DigitalInOut.c b/shared-bindings/digitalio/DigitalInOut.c index cabf500d53..af7defd911 100644 --- a/shared-bindings/digitalio/DigitalInOut.c +++ b/shared-bindings/digitalio/DigitalInOut.c @@ -166,15 +166,7 @@ STATIC mp_obj_t digitalio_digitalinout_switch_to_input(size_t n_args, const mp_o mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); - - digitalio_pull_t pull = PULL_NONE; - if (args[ARG_pull].u_rom_obj == MP_ROM_PTR(&digitalio_pull_up_obj)) { - pull = PULL_UP; - } else if (args[ARG_pull].u_rom_obj == MP_ROM_PTR(&digitalio_pull_down_obj)) { - pull = PULL_DOWN; - } - // do the transfer - common_hal_digitalio_digitalinout_switch_to_input(self, pull); + common_hal_digitalio_digitalinout_switch_to_input(self, validate_pull(args[ARG_pull].u_rom_obj, MP_QSTR_pull)); return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_KW(digitalio_digitalinout_switch_to_input_obj, 1, digitalio_digitalinout_switch_to_input); @@ -320,9 +312,9 @@ STATIC mp_obj_t digitalio_digitalinout_obj_get_pull(mp_obj_t self_in) { } digitalio_pull_t pull = common_hal_digitalio_digitalinout_get_pull(self); if (pull == PULL_UP) { - return (mp_obj_t)&digitalio_pull_up_obj; + return MP_OBJ_FROM_PTR(&digitalio_pull_up_obj); } else if (pull == PULL_DOWN) { - return (mp_obj_t)&digitalio_pull_down_obj; + return MP_OBJ_FROM_PTR(&digitalio_pull_down_obj); } return mp_const_none; } @@ -335,15 +327,8 @@ STATIC mp_obj_t digitalio_digitalinout_obj_set_pull(mp_obj_t self_in, mp_obj_t p mp_raise_AttributeError(translate("Pull not used when direction is output.")); return mp_const_none; } - digitalio_pull_t pull = PULL_NONE; - if (pull_obj == MP_ROM_PTR(&digitalio_pull_up_obj)) { - pull = PULL_UP; - } else if (pull_obj == MP_ROM_PTR(&digitalio_pull_down_obj)) { - pull = PULL_DOWN; - } else if (pull_obj != mp_const_none) { - mp_raise_ValueError(translate("Unsupported pull value.")); - } - common_hal_digitalio_digitalinout_set_pull(self, pull); + + common_hal_digitalio_digitalinout_set_pull(self, validate_pull(pull_obj, MP_QSTR_pull)); return mp_const_none; } MP_DEFINE_CONST_FUN_OBJ_2(digitalio_digitalinout_set_pull_obj, digitalio_digitalinout_obj_set_pull); diff --git a/shared-bindings/digitalio/Pull.c b/shared-bindings/digitalio/Pull.c index 8ded64fb47..4db68dda10 100644 --- a/shared-bindings/digitalio/Pull.c +++ b/shared-bindings/digitalio/Pull.c @@ -24,6 +24,7 @@ * THE SOFTWARE. */ +#include "py/runtime.h" #include "shared-bindings/digitalio/Pull.h" //| class Pull: @@ -72,3 +73,15 @@ const mp_obj_type_t digitalio_pull_type = { .print = digitalio_pull_print, .locals_dict = (mp_obj_dict_t *)&digitalio_pull_locals_dict, }; + +digitalio_pull_t validate_pull(mp_rom_obj_t obj, qstr arg_name) { + if (obj == MP_ROM_PTR(&digitalio_pull_up_obj)) { + return PULL_UP; + } else if (obj == MP_ROM_PTR(&digitalio_pull_down_obj)) { + return PULL_DOWN; + } + if (obj == MP_ROM_NONE) { + return PULL_NONE; + } + mp_raise_TypeError_varg(translate("%q must be of type %q or None"), arg_name, MP_QSTR_Pull); +} diff --git a/shared-bindings/digitalio/Pull.h b/shared-bindings/digitalio/Pull.h index b97e8fb255..f4f6c42690 100644 --- a/shared-bindings/digitalio/Pull.h +++ b/shared-bindings/digitalio/Pull.h @@ -43,4 +43,6 @@ typedef struct { extern const digitalio_pull_obj_t digitalio_pull_up_obj; extern const digitalio_pull_obj_t digitalio_pull_down_obj; +digitalio_pull_t validate_pull(mp_rom_obj_t obj, qstr arg_name); + #endif // MICROPY_INCLUDED_SHARED_BINDINGS_DIGITALIO_PULL_H diff --git a/shared-bindings/displayio/Display.c b/shared-bindings/displayio/Display.c index ca98f9339c..1b750eb934 100644 --- a/shared-bindings/displayio/Display.c +++ b/shared-bindings/displayio/Display.c @@ -84,7 +84,7 @@ //| //| :param display_bus: The bus that the display is connected to //| :type _DisplayBus: FourWire, ParallelBus or I2CDisplay -//| :param ~_typing.ReadableBuffer init_sequence: Byte-packed initialization sequence. +//| :param ~circuitpython_typing.ReadableBuffer init_sequence: Byte-packed initialization sequence. //| :param int width: Width in pixels //| :param int height: Height in pixels //| :param int colstart: The index if the first visible column @@ -449,7 +449,7 @@ const mp_obj_property_t displayio_display_bus_obj = { //| """Extract the pixels from a single row //| //| :param int y: The top edge of the area -//| :param ~_typing.WriteableBuffer buffer: The buffer in which to place the pixel data""" +//| :param ~circuitpython_typing.WriteableBuffer buffer: The buffer in which to place the pixel data""" //| ... //| STATIC mp_obj_t displayio_display_obj_fill_row(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { diff --git a/shared-bindings/displayio/EPaperDisplay.c b/shared-bindings/displayio/EPaperDisplay.c index 06245c90ae..64f7031f4d 100644 --- a/shared-bindings/displayio/EPaperDisplay.c +++ b/shared-bindings/displayio/EPaperDisplay.c @@ -76,8 +76,8 @@ //| //| :param display_bus: The bus that the display is connected to //| :type _DisplayBus: displayio.FourWire or paralleldisplay.ParallelBus -//| :param ~_typing.ReadableBuffer start_sequence: Byte-packed initialization sequence. -//| :param ~_typing.ReadableBuffer stop_sequence: Byte-packed initialization sequence. +//| :param ~circuitpython_typing.ReadableBuffer start_sequence: Byte-packed initialization sequence. +//| :param ~circuitpython_typing.ReadableBuffer stop_sequence: Byte-packed initialization sequence. //| :param int width: Width in pixels //| :param int height: Height in pixels //| :param int ram_width: RAM width in pixels diff --git a/shared-bindings/displayio/OnDiskBitmap.c b/shared-bindings/displayio/OnDiskBitmap.c index b68fbef992..0564b48fe8 100644 --- a/shared-bindings/displayio/OnDiskBitmap.c +++ b/shared-bindings/displayio/OnDiskBitmap.c @@ -138,8 +138,8 @@ const mp_obj_property_t displayio_ondiskbitmap_height_obj = { //| pixel_shader: Union[ColorConverter, Palette] //| """The image's pixel_shader. The type depends on the underlying -//| bitmap's structure. The pixel shadder can be modified (e.g., to set the -//| transparent pixel or, for paletted images, to update the palette""" +//| bitmap's structure. The pixel shader can be modified (e.g., to set the +//| transparent pixel or, for palette shaded images, to update the palette.)""" //| STATIC mp_obj_t displayio_ondiskbitmap_obj_get_pixel_shader(mp_obj_t self_in) { displayio_ondiskbitmap_t *self = MP_OBJ_TO_PTR(self_in); diff --git a/shared-bindings/displayio/TileGrid.c b/shared-bindings/displayio/TileGrid.c index f031842e3b..4cecd0f0f1 100644 --- a/shared-bindings/displayio/TileGrid.c +++ b/shared-bindings/displayio/TileGrid.c @@ -215,6 +215,66 @@ const mp_obj_property_t displayio_tilegrid_y_obj = { MP_ROM_NONE}, }; +//| width: int +//| """Width of the tilegrid in tiles.""" +//| +STATIC mp_obj_t displayio_tilegrid_obj_get_width(mp_obj_t self_in) { + displayio_tilegrid_t *self = native_tilegrid(self_in); + return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_tilegrid_get_width(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_width_obj, displayio_tilegrid_obj_get_width); + +const mp_obj_property_t displayio_tilegrid_width_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&displayio_tilegrid_get_width_obj, + MP_ROM_NONE}, +}; + +//| height: int +//| """Height of the tilegrid in tiles.""" +//| +STATIC mp_obj_t displayio_tilegrid_obj_get_height(mp_obj_t self_in) { + displayio_tilegrid_t *self = native_tilegrid(self_in); + return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_tilegrid_get_height(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_height_obj, displayio_tilegrid_obj_get_height); + +const mp_obj_property_t displayio_tilegrid_height_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&displayio_tilegrid_get_height_obj, + MP_ROM_NONE}, +}; + +//| tile_width: int +//| """Width of a single tile in pixels.""" +//| +STATIC mp_obj_t displayio_tilegrid_obj_get_tile_width(mp_obj_t self_in) { + displayio_tilegrid_t *self = native_tilegrid(self_in); + return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_tilegrid_get_tile_width(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_tile_width_obj, displayio_tilegrid_obj_get_tile_width); + +const mp_obj_property_t displayio_tilegrid_tile_width_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&displayio_tilegrid_get_tile_width_obj, + MP_ROM_NONE}, +}; + +//| tile_height: int +//| """Height of a single tile in pixels.""" +//| +STATIC mp_obj_t displayio_tilegrid_obj_get_tile_height(mp_obj_t self_in) { + displayio_tilegrid_t *self = native_tilegrid(self_in); + return MP_OBJ_NEW_SMALL_INT(common_hal_displayio_tilegrid_get_tile_height(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(displayio_tilegrid_get_tile_height_obj, displayio_tilegrid_obj_get_tile_height); + +const mp_obj_property_t displayio_tilegrid_tile_height_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&displayio_tilegrid_get_tile_height_obj, + MP_ROM_NONE}, +}; + //| flip_x: bool //| """If true, the left edge rendered will be the right edge of the right-most tile.""" //| @@ -385,6 +445,10 @@ STATIC const mp_rom_map_elem_t displayio_tilegrid_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_hidden), MP_ROM_PTR(&displayio_tilegrid_hidden_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&displayio_tilegrid_x_obj) }, { MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&displayio_tilegrid_y_obj) }, + { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&displayio_tilegrid_width_obj) }, + { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&displayio_tilegrid_height_obj) }, + { MP_ROM_QSTR(MP_QSTR_tile_width), MP_ROM_PTR(&displayio_tilegrid_tile_width_obj) }, + { MP_ROM_QSTR(MP_QSTR_tile_height), MP_ROM_PTR(&displayio_tilegrid_tile_height_obj) }, { MP_ROM_QSTR(MP_QSTR_flip_x), MP_ROM_PTR(&displayio_tilegrid_flip_x_obj) }, { MP_ROM_QSTR(MP_QSTR_flip_y), MP_ROM_PTR(&displayio_tilegrid_flip_y_obj) }, { MP_ROM_QSTR(MP_QSTR_transpose_xy), MP_ROM_PTR(&displayio_tilegrid_transpose_xy_obj) }, diff --git a/shared-bindings/displayio/TileGrid.h b/shared-bindings/displayio/TileGrid.h index 7c8d8a605e..2cf0be501c 100644 --- a/shared-bindings/displayio/TileGrid.h +++ b/shared-bindings/displayio/TileGrid.h @@ -56,6 +56,9 @@ void common_hal_displayio_tilegrid_set_transpose_xy(displayio_tilegrid_t *self, uint16_t common_hal_displayio_tilegrid_get_width(displayio_tilegrid_t *self); uint16_t common_hal_displayio_tilegrid_get_height(displayio_tilegrid_t *self); +uint16_t common_hal_displayio_tilegrid_get_tile_width(displayio_tilegrid_t *self); +uint16_t common_hal_displayio_tilegrid_get_tile_height(displayio_tilegrid_t *self); + uint8_t common_hal_displayio_tilegrid_get_tile(displayio_tilegrid_t *self, uint16_t x, uint16_t y); void common_hal_displayio_tilegrid_set_tile(displayio_tilegrid_t *self, uint16_t x, uint16_t y, uint8_t tile_index); diff --git a/shared-bindings/fontio/BuiltinFont.c b/shared-bindings/fontio/BuiltinFont.c index 171a50dab3..fcbde4e80d 100644 --- a/shared-bindings/fontio/BuiltinFont.c +++ b/shared-bindings/fontio/BuiltinFont.c @@ -36,6 +36,25 @@ #include "shared-bindings/util.h" #include "supervisor/shared/translate.h" +//| from typing_extensions import Protocol # for compat with python < 3.8 +//| +//| class FontProtocol(Protocol): +//| """A protocol shared by `BuiltinFont` and classes in ``adafruit_bitmap_font``""" +//| def get_bounding_box(self) -> Union[Tuple[int, int], Tuple[int, int, int, int]]: +//| """Retrieve the maximum bounding box of any glyph in the font. +//| +//| The four element version is ``(width, height, x_offset, y_offset)``. +//| The two element version is ``(width, height)``, in which +//| ``x_offset`` and ``y_offset`` are assumed to be zero.""" +//| pass +//| +//| def get_glyph(self, codepoint: int) -> Optional[Glyph]: +//| """Retrieve the Glyph for a given code point +//| +//| If the code point is not present in the font, `None` is returned.""" +//| pass +//| + //| class BuiltinFont: //| """A font built into CircuitPython""" //| diff --git a/shared-bindings/framebufferio/FramebufferDisplay.c b/shared-bindings/framebufferio/FramebufferDisplay.c index 683e512b3e..acc50d7561 100644 --- a/shared-bindings/framebufferio/FramebufferDisplay.c +++ b/shared-bindings/framebufferio/FramebufferDisplay.c @@ -47,10 +47,10 @@ //| objects in CircuitPython, Display objects live until `displayio.release_displays()` //| is called. This is done so that CircuitPython can use the display itself.""" //| -//| def __init__(self, framebuffer: _typing.FrameBuffer, *, rotation: int = 0, auto_refresh: bool = True) -> None: +//| def __init__(self, framebuffer: circuitpython_typing.FrameBuffer, *, rotation: int = 0, auto_refresh: bool = True) -> None: //| """Create a Display object with the given framebuffer (a buffer, array, ulab.array, etc) //| -//| :param ~_typing.FrameBuffer framebuffer: The framebuffer that the display is connected to +//| :param ~circuitpython_typing.FrameBuffer framebuffer: The framebuffer that the display is connected to //| :param bool auto_refresh: Automatically refresh the screen //| :param int rotation: The rotation of the display in degrees clockwise. Must be in 90 degree increments (0, 90, 180, 270)""" //| ... @@ -298,7 +298,7 @@ const mp_obj_property_t framebufferio_framebufferdisplay_rotation_obj = { MP_ROM_NONE}, }; -//| framebuffer: _typing.FrameBuffer +//| framebuffer: circuitpython_typing.FrameBuffer //| """The framebuffer being used by the display""" //| //| @@ -320,7 +320,7 @@ const mp_obj_property_t framebufferio_framebufferframebuffer_obj = { //| """Extract the pixels from a single row //| //| :param int y: The top edge of the area -//| :param ~_typing.WriteableBuffer buffer: The buffer in which to place the pixel data""" +//| :param ~circuitpython_typing.WriteableBuffer buffer: The buffer in which to place the pixel data""" //| ... //| STATIC mp_obj_t framebufferio_framebufferdisplay_obj_fill_row(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { diff --git a/shared-bindings/i2cperipheral/I2CPeripheral.c b/shared-bindings/i2cperipheral/I2CPeripheral.c index f697646146..b63e8a891b 100644 --- a/shared-bindings/i2cperipheral/I2CPeripheral.c +++ b/shared-bindings/i2cperipheral/I2CPeripheral.c @@ -353,7 +353,7 @@ MP_DEFINE_CONST_FUN_OBJ_KW(i2cperipheral_i2c_peripheral_request_read_obj, 1, i2c //| def write(self, buffer: ReadableBuffer) -> int: //| """Write the data contained in buffer. //| -//| :param ~_typing.ReadableBuffer buffer: Write out the data in this buffer +//| :param ~circuitpython_typing.ReadableBuffer buffer: Write out the data in this buffer //| :return: Number of bytes written""" //| ... //| diff --git a/shared-bindings/msgpack/__init__.c b/shared-bindings/msgpack/__init__.c index d71ab9a6b9..149f0343a0 100644 --- a/shared-bindings/msgpack/__init__.c +++ b/shared-bindings/msgpack/__init__.c @@ -87,8 +87,8 @@ //| """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: +//| :param ~circuitpython_typing.WriteableBuffer buffer: buffer to write into +//| :param Optional[~circuitpython_typing.Callable[[object], None]] default: //| function called for python objects that do not have //| a representation in msgpack format. //| """ @@ -118,8 +118,8 @@ MP_DEFINE_CONST_FUN_OBJ_KW(mod_msgpack_pack_obj, 0, 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 +//| :param ~circuitpython_typing.ReadableBuffer buffer: buffer to read from +//| :param Optional[~circuitpython_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). //| diff --git a/shared-bindings/neopixel_write/__init__.c b/shared-bindings/neopixel_write/__init__.c index ae30518bd1..6895813db5 100644 --- a/shared-bindings/neopixel_write/__init__.c +++ b/shared-bindings/neopixel_write/__init__.c @@ -54,7 +54,7 @@ //| """Write buf out on the given DigitalInOut. //| //| :param ~digitalio.DigitalInOut digitalinout: the DigitalInOut to output with -//| :param ~_typing.ReadableBuffer buf: The bytes to clock out. No assumption is made about color order""" +//| :param ~circuitpython_typing.ReadableBuffer buf: The bytes to clock out. No assumption is made about color order""" //| ... STATIC mp_obj_t neopixel_write_neopixel_write_(mp_obj_t digitalinout_obj, mp_obj_t buf) { if (!mp_obj_is_type(digitalinout_obj, &digitalio_digitalinout_type)) { diff --git a/shared-bindings/pulseio/PulseOut.c b/shared-bindings/pulseio/PulseOut.c index bf2aaf54ff..ac568231b9 100644 --- a/shared-bindings/pulseio/PulseOut.c +++ b/shared-bindings/pulseio/PulseOut.c @@ -59,7 +59,7 @@ //| import board //| //| # 50% duty cycle at 38kHz. -//| pwm = pulseio.PulseOut(board.LED, frequency=38000, duty_cycle=32768) +//| pulse = pulseio.PulseOut(board.LED, frequency=38000, duty_cycle=32768) //| # on off on off on //| pulses = array.array('H', [65000, 1000, 65000, 65000, 1000]) //| pulse.send(pulses) diff --git a/shared-bindings/sdcardio/SDCard.c b/shared-bindings/sdcardio/SDCard.c index fe487ae7fb..5afca798f6 100644 --- a/shared-bindings/sdcardio/SDCard.c +++ b/shared-bindings/sdcardio/SDCard.c @@ -130,7 +130,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(sdcardio_sdcard_deinit_obj, sdcardio_sdcard_deinit); //| """Read one or more blocks from the card //| //| :param int start_block: The block to start reading from -//| :param ~_typing.WriteableBuffer buf: The buffer to write into. Length must be multiple of 512. +//| :param ~circuitpython_typing.WriteableBuffer buf: The buffer to write into. Length must be multiple of 512. //| //| :return: None""" //| @@ -171,7 +171,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(sdcardio_sdcard_sync_obj, sdcardio_sdcard_sync); //| """Write one or more blocks to the card //| //| :param int start_block: The block to start writing from -//| :param ~_typing.ReadableBuffer buf: The buffer to read from. Length must be multiple of 512. +//| :param ~circuitpython_typing.ReadableBuffer buf: The buffer to read from. Length must be multiple of 512. //| //| :return: None""" //| diff --git a/shared-bindings/sdioio/SDCard.c b/shared-bindings/sdioio/SDCard.c index 6fd38ce24c..c4b23ea594 100644 --- a/shared-bindings/sdioio/SDCard.c +++ b/shared-bindings/sdioio/SDCard.c @@ -165,7 +165,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(sdioio_sdcard_count_obj, sdioio_sdcard_count); //| """Read one or more blocks from the card //| //| :param int start_block: The block to start reading from -//| :param ~_typing.WriteableBuffer buf: The buffer to write into. Length must be multiple of 512. +//| :param ~circuitpython_typing.WriteableBuffer buf: The buffer to write into. Length must be multiple of 512. //| //| :return: None""" STATIC mp_obj_t sdioio_sdcard_readblocks(mp_obj_t self_in, mp_obj_t start_block_in, mp_obj_t buf_in) { @@ -187,7 +187,7 @@ MP_DEFINE_CONST_FUN_OBJ_3(sdioio_sdcard_readblocks_obj, sdioio_sdcard_readblocks //| """Write one or more blocks to the card //| //| :param int start_block: The block to start writing from -//| :param ~_typing.ReadableBuffer buf: The buffer to read from. Length must be multiple of 512. +//| :param ~circuitpython_typing.ReadableBuffer buf: The buffer to read from. Length must be multiple of 512. //| //| :return: None""" //| diff --git a/shared-bindings/ssl/SSLContext.c b/shared-bindings/ssl/SSLContext.c index 885a156edd..2b38768f6a 100644 --- a/shared-bindings/ssl/SSLContext.c +++ b/shared-bindings/ssl/SSLContext.c @@ -29,6 +29,7 @@ #include "py/objtuple.h" #include "py/objlist.h" +#include "py/objproperty.h" #include "py/runtime.h" #include "py/mperrno.h" @@ -51,10 +52,69 @@ STATIC mp_obj_t ssl_sslcontext_make_new(const mp_obj_type_t *type, size_t n_args return MP_OBJ_FROM_PTR(s); } -//| def wrap_socket(sock: socketpool.Socket, *, server_side: bool = False, server_hostname: Optional[str] = None) -> ssl.SSLSocket: -//| """Wraps the socket into a socket-compatible class that handles SSL negotiation. -//| The socket must be of type SOCK_STREAM.""" -//| ... +//| def load_verify_locations(self, cadata: Optional[str] = None) -> None: +//| """Load a set of certification authority (CA) certificates used to validate +//| other peers' certificates.""" +//| + +STATIC mp_obj_t ssl_sslcontext_load_verify_locations(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_cadata }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_cadata, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, + }; + ssl_sslcontext_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); + + 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); + + const char *cadata = mp_obj_str_get_str(args[ARG_cadata].u_obj); + + common_hal_ssl_sslcontext_load_verify_locations(self, cadata); + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_KW(ssl_sslcontext_load_verify_locations_obj, 1, ssl_sslcontext_load_verify_locations); + +//| def set_default_verify_paths(self) -> None: +//| """Load a set of default certification authority (CA) certificates.""" +//| + +STATIC mp_obj_t ssl_sslcontext_set_default_verify_paths(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + ssl_sslcontext_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); + + common_hal_ssl_sslcontext_set_default_verify_paths(self); + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_KW(ssl_sslcontext_set_default_verify_paths_obj, 1, ssl_sslcontext_set_default_verify_paths); + +//| check_hostname: bool +//| """Whether to match the peer certificate's hostname.""" +//| + +STATIC mp_obj_t ssl_sslcontext_get_check_hostname(mp_obj_t self_in) { + ssl_sslcontext_obj_t *self = MP_OBJ_TO_PTR(self_in); + + return mp_obj_new_bool(common_hal_ssl_sslcontext_get_check_hostname(self)); +} +STATIC MP_DEFINE_CONST_FUN_OBJ_1(ssl_sslcontext_get_check_hostname_obj, ssl_sslcontext_get_check_hostname); + +STATIC mp_obj_t ssl_sslcontext_set_check_hostname(mp_obj_t self_in, mp_obj_t value) { + ssl_sslcontext_obj_t *self = MP_OBJ_TO_PTR(self_in); + + common_hal_ssl_sslcontext_set_check_hostname(self, mp_obj_is_true(value)); + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_2(ssl_sslcontext_set_check_hostname_obj, ssl_sslcontext_set_check_hostname); + +const mp_obj_property_t ssl_sslcontext_check_hostname_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&ssl_sslcontext_get_check_hostname_obj, + (mp_obj_t)&ssl_sslcontext_set_check_hostname_obj, + MP_ROM_NONE}, +}; + +//| def wrap_socket(self, sock: socketpool.Socket, *, server_side: bool = False, server_hostname: Optional[str] = None) -> ssl.SSLSocket: +//| """Wraps the socket into a socket-compatible class that handles SSL negotiation. +//| The socket must be of type SOCK_STREAM.""" //| STATIC mp_obj_t ssl_sslcontext_wrap_socket(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { @@ -69,7 +129,10 @@ STATIC mp_obj_t ssl_sslcontext_wrap_socket(size_t n_args, const mp_obj_t *pos_ar 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); - const char *server_hostname = mp_obj_str_get_str(args[ARG_server_hostname].u_obj); + const char *server_hostname = NULL; + if (args[ARG_server_hostname].u_obj != mp_const_none) { + server_hostname = mp_obj_str_get_str(args[ARG_server_hostname].u_obj); + } bool server_side = args[ARG_server_side].u_bool; if (server_side && server_hostname != NULL) { mp_raise_ValueError(translate("Server side context cannot have hostname")); @@ -83,6 +146,9 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(ssl_sslcontext_wrap_socket_obj, 1, ssl_sslcont STATIC const mp_rom_map_elem_t ssl_sslcontext_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_wrap_socket), MP_ROM_PTR(&ssl_sslcontext_wrap_socket_obj) }, + { MP_ROM_QSTR(MP_QSTR_load_verify_locations), MP_ROM_PTR(&ssl_sslcontext_load_verify_locations_obj) }, + { MP_ROM_QSTR(MP_QSTR_set_default_verify_paths), MP_ROM_PTR(&ssl_sslcontext_set_default_verify_paths_obj) }, + { MP_ROM_QSTR(MP_QSTR_check_hostname), MP_ROM_PTR(&ssl_sslcontext_check_hostname_obj) }, }; STATIC MP_DEFINE_CONST_DICT(ssl_sslcontext_locals_dict, ssl_sslcontext_locals_dict_table); diff --git a/shared-bindings/ssl/SSLContext.h b/shared-bindings/ssl/SSLContext.h index 1e1986a48d..ef04f25d43 100644 --- a/shared-bindings/ssl/SSLContext.h +++ b/shared-bindings/ssl/SSLContext.h @@ -39,4 +39,12 @@ void common_hal_ssl_sslcontext_construct(ssl_sslcontext_obj_t *self); ssl_sslsocket_obj_t *common_hal_ssl_sslcontext_wrap_socket(ssl_sslcontext_obj_t *self, socketpool_socket_obj_t *sock, bool server_side, const char *server_hostname); +void common_hal_ssl_sslcontext_load_verify_locations(ssl_sslcontext_obj_t *self, + const char *cadata); + +void common_hal_ssl_sslcontext_set_default_verify_paths(ssl_sslcontext_obj_t *self); + +bool common_hal_ssl_sslcontext_get_check_hostname(ssl_sslcontext_obj_t *self); +void common_hal_ssl_sslcontext_set_check_hostname(ssl_sslcontext_obj_t *self, bool value); + #endif // MICROPY_INCLUDED_SHARED_BINDINGS_SSL_SSLCONTEXT_H diff --git a/shared-bindings/synthio/MidiTrack.c b/shared-bindings/synthio/MidiTrack.c index 6ffefd4713..1fb3fdbec1 100644 --- a/shared-bindings/synthio/MidiTrack.c +++ b/shared-bindings/synthio/MidiTrack.c @@ -42,7 +42,7 @@ //| are supported; channel numbers and key velocities are ignored. Up to two notes may be on at the //| same time. //| -//| :param ~_typing.ReadableBuffer buffer: Stream of MIDI events, as stored in a MIDI file track chunk +//| :param ~circuitpython_typing.ReadableBuffer buffer: Stream of MIDI events, as stored in a MIDI file track chunk //| :param int tempo: Tempo of the streamed events, in MIDI ticks per second //| :param int sample_rate: The desired playback sample rate; higher sample rate requires more memory //| diff --git a/shared-bindings/traceback/__init__.c b/shared-bindings/traceback/__init__.c index 6fdb060439..aa21210494 100644 --- a/shared-bindings/traceback/__init__.c +++ b/shared-bindings/traceback/__init__.c @@ -42,7 +42,6 @@ STATIC void traceback_exception_common(mp_print_t *print, mp_obj_t value, mp_obj if (!mp_obj_is_exception_instance(value)) { mp_raise_TypeError(translate("invalid exception")); } - mp_obj_exception_t exc = *(mp_obj_exception_t *)MP_OBJ_TO_PTR(value); mp_int_t limit = 0; bool print_tb = true; @@ -51,13 +50,17 @@ STATIC void traceback_exception_common(mp_print_t *print, mp_obj_t value, mp_obj print_tb = (limit != 0); } + mp_obj_exception_t *exc = mp_obj_exception_get_native(value); + mp_obj_traceback_t *trace_backup = exc->traceback; + if (tb_obj != mp_const_none && print_tb) { - exc.traceback = mp_arg_validate_type(tb_obj, &mp_type_traceback, MP_QSTR_tb); + exc->traceback = mp_arg_validate_type(tb_obj, &mp_type_traceback, MP_QSTR_tb); } else { - exc.traceback = (mp_obj_traceback_t *)&mp_const_empty_traceback_obj; + exc->traceback = (mp_obj_traceback_t *)&mp_const_empty_traceback_obj; } - shared_module_traceback_print_exception(&exc, print, limit); + shared_module_traceback_print_exception(MP_OBJ_TO_PTR(value), print, limit); + exc->traceback = trace_backup; } //| def format_exception(etype: Type[BaseException], value: BaseException, tb: TracebackType, diff --git a/shared-bindings/vectorio/Circle.c b/shared-bindings/vectorio/Circle.c index 43845937c4..9711c53e0d 100644 --- a/shared-bindings/vectorio/Circle.c +++ b/shared-bindings/vectorio/Circle.c @@ -97,6 +97,8 @@ const mp_obj_property_t vectorio_circle_radius_obj = { //| STATIC const mp_rom_map_elem_t vectorio_circle_locals_dict_table[] = { + // Functions + { MP_ROM_QSTR(MP_QSTR_contains), MP_ROM_PTR(&vectorio_vector_shape_contains_obj) }, // Properties { MP_ROM_QSTR(MP_QSTR_radius), MP_ROM_PTR(&vectorio_circle_radius_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, diff --git a/shared-bindings/vectorio/Polygon.c b/shared-bindings/vectorio/Polygon.c index d1078b2d2d..dfe50ffd01 100644 --- a/shared-bindings/vectorio/Polygon.c +++ b/shared-bindings/vectorio/Polygon.c @@ -103,6 +103,8 @@ const mp_obj_property_t vectorio_polygon_points_obj = { //| STATIC const mp_rom_map_elem_t vectorio_polygon_locals_dict_table[] = { + // Functions + { MP_ROM_QSTR(MP_QSTR_contains), MP_ROM_PTR(&vectorio_vector_shape_contains_obj) }, // Properties { MP_ROM_QSTR(MP_QSTR_points), MP_ROM_PTR(&vectorio_polygon_points_obj) }, { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, diff --git a/shared-bindings/vectorio/Rectangle.c b/shared-bindings/vectorio/Rectangle.c index 287ae9d408..67367eb538 100644 --- a/shared-bindings/vectorio/Rectangle.c +++ b/shared-bindings/vectorio/Rectangle.c @@ -60,6 +60,51 @@ STATIC const vectorio_draw_protocol_t rectangle_draw_protocol = { .draw_protocol_impl = &vectorio_vector_shape_draw_protocol_impl }; +//| width : int +//| """The width of the rectangle in pixels.""" +//| +STATIC mp_obj_t vectorio_rectangle_obj_get_width(mp_obj_t self_in) { + vectorio_rectangle_t *self = MP_OBJ_TO_PTR(self_in); + return mp_obj_new_int(common_hal_vectorio_rectangle_get_width(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(vectorio_rectangle_get_width_obj, vectorio_rectangle_obj_get_width); + +STATIC mp_obj_t vectorio_rectangle_obj_set_width(mp_obj_t self_in, mp_obj_t width) { + vectorio_rectangle_t *self = MP_OBJ_TO_PTR(self_in); + common_hal_vectorio_rectangle_set_width(self, mp_obj_get_int(width)); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_2(vectorio_rectangle_set_width_obj, vectorio_rectangle_obj_set_width); + +const mp_obj_property_t vectorio_rectangle_width_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&vectorio_rectangle_get_width_obj, + (mp_obj_t)&vectorio_rectangle_set_width_obj, + MP_ROM_NONE}, +}; + +//| height : int +//| """The height of the rectangle in pixels.""" +//| +STATIC mp_obj_t vectorio_rectangle_obj_get_height(mp_obj_t self_in) { + vectorio_rectangle_t *self = MP_OBJ_TO_PTR(self_in); + return mp_obj_new_int(common_hal_vectorio_rectangle_get_height(self)); +} +MP_DEFINE_CONST_FUN_OBJ_1(vectorio_rectangle_get_height_obj, vectorio_rectangle_obj_get_height); + +STATIC mp_obj_t vectorio_rectangle_obj_set_height(mp_obj_t self_in, mp_obj_t height) { + vectorio_rectangle_t *self = MP_OBJ_TO_PTR(self_in); + common_hal_vectorio_rectangle_set_height(self, mp_obj_get_int(height)); + return mp_const_none; +} +MP_DEFINE_CONST_FUN_OBJ_2(vectorio_rectangle_set_height_obj, vectorio_rectangle_obj_set_height); + +const mp_obj_property_t vectorio_rectangle_height_obj = { + .base.type = &mp_type_property, + .proxy = {(mp_obj_t)&vectorio_rectangle_get_height_obj, + (mp_obj_t)&vectorio_rectangle_set_height_obj, + MP_ROM_NONE}, +}; // Documentation for properties inherited from VectorShape. @@ -77,9 +122,13 @@ STATIC const vectorio_draw_protocol_t rectangle_draw_protocol = { //| STATIC const mp_rom_map_elem_t vectorio_rectangle_locals_dict_table[] = { + // Functions + { MP_ROM_QSTR(MP_QSTR_contains), MP_ROM_PTR(&vectorio_vector_shape_contains_obj) }, // Properties { MP_ROM_QSTR(MP_QSTR_x), MP_ROM_PTR(&vectorio_vector_shape_x_obj) }, { MP_ROM_QSTR(MP_QSTR_y), MP_ROM_PTR(&vectorio_vector_shape_y_obj) }, + { MP_ROM_QSTR(MP_QSTR_width), MP_ROM_PTR(&vectorio_rectangle_width_obj) }, + { MP_ROM_QSTR(MP_QSTR_height), MP_ROM_PTR(&vectorio_rectangle_height_obj) }, { MP_ROM_QSTR(MP_QSTR_location), MP_ROM_PTR(&vectorio_vector_shape_location_obj) }, { MP_ROM_QSTR(MP_QSTR_pixel_shader), MP_ROM_PTR(&vectorio_vector_shape_pixel_shader_obj) }, }; diff --git a/shared-bindings/vectorio/Rectangle.h b/shared-bindings/vectorio/Rectangle.h index 24b103c26e..d50b811624 100644 --- a/shared-bindings/vectorio/Rectangle.h +++ b/shared-bindings/vectorio/Rectangle.h @@ -3,10 +3,12 @@ #include "shared-module/vectorio/Rectangle.h" #include "shared-module/displayio/area.h" +#include "shared-module/vectorio/__init__.h" extern const mp_obj_type_t vectorio_rectangle_type; void common_hal_vectorio_rectangle_construct(vectorio_rectangle_t *self, uint32_t width, uint32_t height); +void common_hal_vectorio_rectangle_set_on_dirty(vectorio_rectangle_t *self, vectorio_event_t on_dirty); uint32_t common_hal_vectorio_rectangle_get_pixel(void *rectangle, int16_t x, int16_t y); @@ -14,4 +16,10 @@ void common_hal_vectorio_rectangle_get_area(void *rectangle, displayio_area_t *o mp_obj_t common_hal_vectorio_rectangle_get_draw_protocol(void *rectangle); +int16_t common_hal_vectorio_rectangle_get_width(void *obj); +void common_hal_vectorio_rectangle_set_width(void *obj, int16_t width); + +int16_t common_hal_vectorio_rectangle_get_height(void *obj); +void common_hal_vectorio_rectangle_set_height(void *obj, int16_t height); + #endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_RECTANGLE_H diff --git a/shared-bindings/vectorio/VectorShape.c b/shared-bindings/vectorio/VectorShape.c index d5d12ec1cd..3293466cc4 100644 --- a/shared-bindings/vectorio/VectorShape.c +++ b/shared-bindings/vectorio/VectorShape.c @@ -62,6 +62,7 @@ mp_obj_t vectorio_vector_shape_make_new(const mp_obj_t shape, const mp_obj_t pix if (mp_obj_is_type(shape, &vectorio_polygon_type)) { common_hal_vectorio_polygon_set_on_dirty(self->ishape.shape, on_dirty); } else if (mp_obj_is_type(shape, &vectorio_rectangle_type)) { + common_hal_vectorio_rectangle_set_on_dirty(self->ishape.shape, on_dirty); } else if (mp_obj_is_type(shape, &vectorio_circle_type)) { common_hal_vectorio_circle_set_on_dirty(self->ishape.shape, on_dirty); } else { @@ -79,6 +80,21 @@ vectorio_draw_protocol_impl_t vectorio_vector_shape_draw_protocol_impl = { .draw_get_refresh_areas = (draw_get_refresh_areas_fun)vectorio_vector_shape_get_refresh_areas, }; +// Stub checker does not approve of these shared properties. +// x: int +// y: int +// """true if x,y lies inside the shape.""" +// +STATIC mp_obj_t vectorio_vector_shape_obj_contains(mp_obj_t wrapper_shape, mp_obj_t x_obj, mp_obj_t y_obj) { + // Relies on the fact that only vector_shape impl gets matched with a VectorShape. + const vectorio_draw_protocol_t *draw_protocol = mp_proto_get(MP_QSTR_protocol_draw, wrapper_shape); + vectorio_vector_shape_t *self = MP_OBJ_TO_PTR(draw_protocol->draw_get_protocol_self(wrapper_shape)); + + mp_int_t x = mp_obj_get_int(x_obj); + mp_int_t y = mp_obj_get_int(y_obj); + return mp_obj_new_bool(common_hal_vectorio_vector_shape_contains(self, x, y)); +} +MP_DEFINE_CONST_FUN_OBJ_3(vectorio_vector_shape_contains_obj, vectorio_vector_shape_obj_contains); // Stub checker does not approve of these shared properties. // x: int diff --git a/shared-bindings/vectorio/VectorShape.h b/shared-bindings/vectorio/VectorShape.h index 12c7e628ad..959a38dff0 100644 --- a/shared-bindings/vectorio/VectorShape.h +++ b/shared-bindings/vectorio/VectorShape.h @@ -18,6 +18,8 @@ void common_hal_vectorio_vector_shape_construct(vectorio_vector_shape_t *self, vectorio_ishape_t ishape, mp_obj_t pixel_shader, int32_t x, int32_t y); +bool common_hal_vectorio_vector_shape_contains(vectorio_vector_shape_t *self, mp_int_t x, mp_int_t y); + void common_hal_vectorio_vector_shape_set_dirty(void *self); mp_int_t common_hal_vectorio_vector_shape_get_x(vectorio_vector_shape_t *self); @@ -40,5 +42,6 @@ extern const mp_obj_property_t vectorio_vector_shape_x_obj; extern const mp_obj_property_t vectorio_vector_shape_y_obj; extern const mp_obj_property_t vectorio_vector_shape_location_obj; extern const mp_obj_property_t vectorio_vector_shape_pixel_shader_obj; +extern const mp_obj_fun_builtin_fixed_t vectorio_vector_shape_contains_obj; #endif // MICROPY_INCLUDED_SHARED_BINDINGS_VECTORIO_SHAPE_H diff --git a/shared-module/adafruit_bus_device/I2CDevice.c b/shared-module/adafruit_bus_device/i2c_device/I2CDevice.c similarity index 98% rename from shared-module/adafruit_bus_device/I2CDevice.c rename to shared-module/adafruit_bus_device/i2c_device/I2CDevice.c index 942b132c3e..0b430d1ea2 100644 --- a/shared-module/adafruit_bus_device/I2CDevice.c +++ b/shared-module/adafruit_bus_device/i2c_device/I2CDevice.c @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "shared-bindings/adafruit_bus_device/I2CDevice.h" +#include "shared-bindings/adafruit_bus_device/i2c_device/I2CDevice.h" #include "shared-bindings/busio/I2C.h" #include "py/mperrno.h" #include "py/nlr.h" diff --git a/shared-module/adafruit_bus_device/I2CDevice.h b/shared-module/adafruit_bus_device/i2c_device/I2CDevice.h similarity index 100% rename from shared-module/adafruit_bus_device/I2CDevice.h rename to shared-module/adafruit_bus_device/i2c_device/I2CDevice.h diff --git a/shared-module/adafruit_bus_device/SPIDevice.c b/shared-module/adafruit_bus_device/spi_device/SPIDevice.c similarity index 98% rename from shared-module/adafruit_bus_device/SPIDevice.c rename to shared-module/adafruit_bus_device/spi_device/SPIDevice.c index 20e4e76297..2f4ab4dddf 100644 --- a/shared-module/adafruit_bus_device/SPIDevice.c +++ b/shared-module/adafruit_bus_device/spi_device/SPIDevice.c @@ -24,7 +24,7 @@ * THE SOFTWARE. */ -#include "shared-bindings/adafruit_bus_device/SPIDevice.h" +#include "shared-bindings/adafruit_bus_device/spi_device/SPIDevice.h" #include "shared-bindings/busio/SPI.h" #include "shared-bindings/digitalio/DigitalInOut.h" #include "py/mperrno.h" diff --git a/shared-module/adafruit_bus_device/SPIDevice.h b/shared-module/adafruit_bus_device/spi_device/SPIDevice.h similarity index 100% rename from shared-module/adafruit_bus_device/SPIDevice.h rename to shared-module/adafruit_bus_device/spi_device/SPIDevice.h diff --git a/shared-module/adafruit_pixelbuf/PixelBuf.c b/shared-module/adafruit_pixelbuf/PixelBuf.c index bfeab4ae04..99980c705e 100644 --- a/shared-module/adafruit_pixelbuf/PixelBuf.c +++ b/shared-module/adafruit_pixelbuf/PixelBuf.c @@ -163,7 +163,7 @@ STATIC void _pixelbuf_parse_color(pixelbuf_pixelbuf_obj_t *self, mp_obj_t color, } if (mp_obj_is_int(color) || mp_obj_is_float(color)) { - mp_int_t value = mp_obj_is_int(color) ? mp_obj_get_int_truncated(color) : mp_obj_get_float(color); + mp_int_t value = mp_obj_is_int(color) ? mp_obj_get_int_truncated(color) : (mp_int_t)mp_obj_get_float(color); *r = value >> 16 & 0xff; *g = (value >> 8) & 0xff; *b = value & 0xff; diff --git a/shared-module/audiomp3/MP3Decoder.c b/shared-module/audiomp3/MP3Decoder.c index 5e1bce5924..2d45313814 100644 --- a/shared-module/audiomp3/MP3Decoder.c +++ b/shared-module/audiomp3/MP3Decoder.c @@ -258,6 +258,7 @@ void common_hal_audiomp3_mp3file_set_file(audiomp3_mp3file_obj_t *self, pyb_file self->channel_count = fi.nChans; self->frame_buffer_size = fi.outputSamps * sizeof(int16_t); self->len = 2 * self->frame_buffer_size; + self->samples_decoded = 0; } void common_hal_audiomp3_mp3file_deinit(audiomp3_mp3file_obj_t *self) { @@ -267,6 +268,7 @@ void common_hal_audiomp3_mp3file_deinit(audiomp3_mp3file_obj_t *self) { self->buffers[0] = NULL; self->buffers[1] = NULL; self->file = NULL; + self->samples_decoded = 0; } bool common_hal_audiomp3_mp3file_deinited(audiomp3_mp3file_obj_t *self) { @@ -302,6 +304,7 @@ void audiomp3_mp3file_reset_buffer(audiomp3_mp3file_obj_t *self, f_lseek(&self->file->fp, 0); self->inbuf_offset = self->inbuf_length; self->eof = 0; + self->samples_decoded = 0; self->other_channel = -1; mp3file_update_inbuf_half(self); mp3file_skip_id3v2(self); @@ -327,6 +330,7 @@ audioio_get_buffer_result_t audiomp3_mp3file_get_buffer(audiomp3_mp3file_obj_t * if (channel == self->other_channel) { *bufptr = (uint8_t *)(self->buffers[self->other_buffer_index] + channel); self->other_channel = -1; + self->samples_decoded += *buffer_length / sizeof(int16_t); return GET_BUFFER_MORE_DATA; } @@ -359,6 +363,7 @@ audioio_get_buffer_result_t audiomp3_mp3file_get_buffer(audiomp3_mp3file_obj_t * self); } + self->samples_decoded += *buffer_length / sizeof(int16_t); return GET_BUFFER_MORE_DATA; } @@ -384,3 +389,7 @@ float common_hal_audiomp3_mp3file_get_rms_level(audiomp3_mp3file_obj_t *self) { } return sqrtf(sumsq) / (self->frame_buffer_size / sizeof(int16_t)); } + +uint32_t common_hal_audiomp3_mp3file_get_samples_decoded(audiomp3_mp3file_obj_t *self) { + return self->samples_decoded; +} diff --git a/shared-module/audiomp3/MP3Decoder.h b/shared-module/audiomp3/MP3Decoder.h index 0f2256a417..17616d4a28 100644 --- a/shared-module/audiomp3/MP3Decoder.h +++ b/shared-module/audiomp3/MP3Decoder.h @@ -54,6 +54,8 @@ typedef struct { int8_t other_channel; int8_t other_buffer_index; + + uint32_t samples_decoded; } audiomp3_mp3file_obj_t; // These are not available from Python because it may be called in an interrupt. @@ -71,4 +73,6 @@ void audiomp3_mp3file_get_buffer_structure(audiomp3_mp3file_obj_t *self, bool si float audiomp3_mp3file_get_rms_level(audiomp3_mp3file_obj_t *self); +uint32_t common_hal_audiomp3_mp3file_get_samples_decoded(audiomp3_mp3file_obj_t *self); + #endif // MICROPY_INCLUDED_SHARED_MODULE_AUDIOIO_MP3FILE_H diff --git a/shared-module/board/__init__.c b/shared-module/board/__init__.c index 19d9e7ece0..cd599e7448 100644 --- a/shared-module/board/__init__.c +++ b/shared-module/board/__init__.c @@ -46,141 +46,189 @@ #include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" #endif -#if BOARD_I2C +#if CIRCUITPY_BOARD_I2C // Statically allocate the I2C object so it can live past the end of the heap and into the next VM. // That way it can be used by built-in I2CDisplay displays and be accessible through board.I2C(). -STATIC busio_i2c_obj_t i2c_obj; -STATIC mp_obj_t i2c_singleton = NULL; -mp_obj_t common_hal_board_get_i2c(void) { - return i2c_singleton; +typedef struct { + const mcu_pin_obj_t *scl; + const mcu_pin_obj_t *sda; +} board_i2c_pin_t; + +static const board_i2c_pin_t i2c_pin[CIRCUITPY_BOARD_I2C] = CIRCUITPY_BOARD_I2C_PIN; +static busio_i2c_obj_t i2c_obj[CIRCUITPY_BOARD_I2C]; + +bool common_hal_board_is_i2c(mp_obj_t obj) { + for (uint8_t instance = 0; instance < CIRCUITPY_BOARD_I2C; instance++) { + if (obj == &i2c_obj[instance]) { + return true; + } + } + return false; } -mp_obj_t common_hal_board_create_i2c(void) { - // All callers have either already verified this or come so early that it can't be otherwise. - assert(i2c_singleton == NULL || common_hal_busio_i2c_deinited(i2c_singleton)); - busio_i2c_obj_t *self = &i2c_obj; +mp_obj_t common_hal_board_get_i2c(const mp_int_t instance) { + return &i2c_obj[instance]; +} + +mp_obj_t common_hal_board_create_i2c(const mp_int_t instance) { + const mp_obj_t singleton = common_hal_board_get_i2c(instance); + if (singleton != NULL && !common_hal_busio_i2c_deinited(singleton)) { + return singleton; + } + + busio_i2c_obj_t *self = &i2c_obj[instance]; self->base.type = &busio_i2c_type; - common_hal_busio_i2c_construct(self, DEFAULT_I2C_BUS_SCL, DEFAULT_I2C_BUS_SDA, 100000, 255); - i2c_singleton = (mp_obj_t)self; - return i2c_singleton; + assert_pin_free(i2c_pin[instance].scl); + assert_pin_free(i2c_pin[instance].sda); + + common_hal_busio_i2c_construct(self, i2c_pin[instance].scl, i2c_pin[instance].sda, 100000, 255); + + return &i2c_obj[instance]; } #endif - -#if BOARD_SPI +#if CIRCUITPY_BOARD_SPI // Statically allocate the SPI object so it can live past the end of the heap and into the next VM. // That way it can be used by built-in FourWire displays and be accessible through board.SPI(). -STATIC busio_spi_obj_t spi_obj; -STATIC mp_obj_t spi_singleton = NULL; -mp_obj_t common_hal_board_get_spi(void) { - return spi_singleton; +typedef struct { + const mcu_pin_obj_t *clock; + const mcu_pin_obj_t *mosi; + const mcu_pin_obj_t *miso; +} board_spi_pin_t; + +static const board_spi_pin_t spi_pin[CIRCUITPY_BOARD_SPI] = CIRCUITPY_BOARD_SPI_PIN; +static busio_spi_obj_t spi_obj[CIRCUITPY_BOARD_SPI]; + +bool common_hal_board_is_spi(mp_obj_t obj) { + for (uint8_t instance = 0; instance < CIRCUITPY_BOARD_SPI; instance++) { + if (obj == &spi_obj[instance]) { + return true; + } + } + return false; } -mp_obj_t common_hal_board_create_spi(void) { - // All callers have either already verified this or come so early that it can't be otherwise. - assert(spi_singleton == NULL || common_hal_busio_spi_deinited(spi_singleton)); - busio_spi_obj_t *self = &spi_obj; +mp_obj_t common_hal_board_get_spi(const mp_int_t instance) { + return &spi_obj[instance]; +} + +mp_obj_t common_hal_board_create_spi(const mp_int_t instance) { + const mp_obj_t singleton = common_hal_board_get_spi(instance); + if (singleton != NULL && !common_hal_busio_spi_deinited(singleton)) { + return singleton; + } + + busio_spi_obj_t *self = &spi_obj[instance]; self->base.type = &busio_spi_type; - const mcu_pin_obj_t *clock = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_SCK); - const mcu_pin_obj_t *mosi = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_MOSI); - const mcu_pin_obj_t *miso = MP_OBJ_TO_PTR(DEFAULT_SPI_BUS_MISO); - common_hal_busio_spi_construct(self, clock, mosi, miso); - spi_singleton = (mp_obj_t)self; - return spi_singleton; + assert_pin_free(spi_pin[instance].clock); + assert_pin_free(spi_pin[instance].mosi); + assert_pin_free(spi_pin[instance].miso); + + common_hal_busio_spi_construct(self, spi_pin[instance].clock, spi_pin[instance].mosi, spi_pin[instance].miso); + + return &spi_obj[instance]; } #endif -#if BOARD_UART -mp_obj_t common_hal_board_get_uart(void) { - return MP_STATE_VM(shared_uart_bus); +#if CIRCUITPY_BOARD_UART + +typedef struct { + const mcu_pin_obj_t *tx; + const mcu_pin_obj_t *rx; +} board_uart_pin_t; + +static const board_uart_pin_t uart_pin[CIRCUITPY_BOARD_UART] = CIRCUITPY_BOARD_UART_PIN; +static busio_uart_obj_t uart_obj[CIRCUITPY_BOARD_UART]; + +bool common_hal_board_is_uart(mp_obj_t obj) { + for (uint8_t instance = 0; instance < CIRCUITPY_BOARD_UART; instance++) { + if (obj == &uart_obj[instance]) { + return true; + } + } + return false; } -mp_obj_t common_hal_board_create_uart(void) { - busio_uart_obj_t *self = m_new_ll_obj(busio_uart_obj_t); +mp_obj_t common_hal_board_get_uart(const mp_int_t instance) { + return &uart_obj[instance]; +} + +mp_obj_t common_hal_board_create_uart(const mp_int_t instance) { + const mp_obj_t singleton = common_hal_board_get_uart(instance); + if (singleton != NULL && !common_hal_busio_uart_deinited(singleton)) { + return singleton; + } + + busio_uart_obj_t *self = &uart_obj[instance]; self->base.type = &busio_uart_type; - const mcu_pin_obj_t *rx = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_RX); - const mcu_pin_obj_t *tx = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_TX); - #ifdef DEFAULT_UART_BUS_RTS - const mcu_pin_obj_t *rts = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_RTS); - #else - const mcu_pin_obj_t *rts = NULL; - #endif - #ifdef DEFAULT_UART_BUS_CTS - const mcu_pin_obj_t *cts = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_CTS); - #else - const mcu_pin_obj_t *cts = NULL; - #endif - #ifdef DEFAULT_UART_IS_RS485 - const mcu_pin_obj_t *rs485_dir = MP_OBJ_TO_PTR(DEFAULT_UART_BUS_RS485DIR); - #ifdef DEFAULT_UART_RS485_INVERT - const bool rs485_invert = true; - #else - const bool rs485_invert = false; - #endif - #else - const mcu_pin_obj_t *rs485_dir = NULL; - const bool rs485_invert = false; - #endif + MP_STATE_VM(board_uart_bus) = &uart_obj; - common_hal_busio_uart_construct(self, tx, rx, rts, cts, rs485_dir, rs485_invert, - 9600, 8, BUSIO_UART_PARITY_NONE, 1, 1.0f, 64, NULL, false); - MP_STATE_VM(shared_uart_bus) = MP_OBJ_FROM_PTR(self); - return MP_STATE_VM(shared_uart_bus); + assert_pin_free(uart_pin[instance].tx); + assert_pin_free(uart_pin[instance].rx); + + common_hal_busio_uart_construct(self, uart_pin[instance].tx, uart_pin[instance].rx, + NULL, NULL, NULL, false, 9600, 8, BUSIO_UART_PARITY_NONE, 1, 1.0f, 64, NULL, false); + + return &uart_obj[instance]; } #endif -void reset_board_busses(void) { - #if BOARD_I2C - bool display_using_i2c = false; - #if CIRCUITPY_DISPLAYIO - for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - if (displays[i].bus_base.type == &displayio_i2cdisplay_type && displays[i].i2cdisplay_bus.bus == i2c_singleton) { - display_using_i2c = true; - break; - } - } - #endif - // make sure I2C lock is not held over a soft reset - if (i2c_singleton != NULL) { - common_hal_busio_i2c_unlock(i2c_singleton); - if (!display_using_i2c) { - common_hal_busio_i2c_deinit(i2c_singleton); - i2c_singleton = NULL; - } - } - #endif - #if BOARD_SPI - bool display_using_spi = false; - #if CIRCUITPY_DISPLAYIO - for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - mp_const_obj_t bus_type = displays[i].bus_base.type; - if (bus_type == &displayio_fourwire_type && displays[i].fourwire_bus.bus == spi_singleton) { - display_using_spi = true; - break; - } - #if CIRCUITPY_SHARPDISPLAY - if (displays[i].bus_base.type == &sharpdisplay_framebuffer_type && displays[i].sharpdisplay.bus == spi_singleton) { - display_using_spi = true; - break; +void reset_board_buses(void) { + #if CIRCUITPY_BOARD_I2C + for (uint8_t instance = 0; instance < CIRCUITPY_BOARD_I2C; instance++) { + bool display_using_i2c = false; + #if CIRCUITPY_DISPLAYIO + for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { + if (displays[i].bus_base.type == &displayio_i2cdisplay_type && displays[i].i2cdisplay_bus.bus == &i2c_obj[instance]) { + display_using_i2c = true; + break; + } } #endif - } - #endif - // make sure SPI lock is not held over a soft reset - if (spi_singleton != NULL) { - common_hal_busio_spi_unlock(spi_singleton); - if (!display_using_spi) { - common_hal_busio_spi_deinit(spi_singleton); - spi_singleton = NULL; + if (!common_hal_busio_i2c_deinited(&i2c_obj[instance])) { + // make sure I2C lock is not held over a soft reset + common_hal_busio_i2c_unlock(&i2c_obj[instance]); + if (!display_using_i2c) { + common_hal_busio_i2c_deinit(&i2c_obj[instance]); + } } } #endif - #if BOARD_UART - MP_STATE_VM(shared_uart_bus) = NULL; + #if CIRCUITPY_BOARD_SPI + for (uint8_t instance = 0; instance < CIRCUITPY_BOARD_SPI; instance++) { + bool display_using_spi = false; + #if CIRCUITPY_DISPLAYIO + for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { + mp_const_obj_t bus_type = displays[i].bus_base.type; + if (bus_type == &displayio_fourwire_type && displays[i].fourwire_bus.bus == &spi_obj[instance]) { + display_using_spi = true; + break; + } + #if CIRCUITPY_SHARPDISPLAY + if (displays[i].bus_base.type == &sharpdisplay_framebuffer_type && displays[i].sharpdisplay.bus == &spi_obj[instance]) { + display_using_spi = true; + break; + } + #endif + } + #endif + if (!common_hal_busio_spi_deinited(&spi_obj[instance])) { + // make sure SPI lock is not held over a soft reset + common_hal_busio_spi_unlock(&spi_obj[instance]); + if (!display_using_spi) { + common_hal_busio_spi_deinit(&spi_obj[instance]); + } + } + } + #endif + #if CIRCUITPY_BOARD_UART + for (uint8_t instance = 0; instance < CIRCUITPY_BOARD_UART; instance++) { + common_hal_busio_uart_deinit(&uart_obj[instance]); + } #endif } diff --git a/shared-module/board/__init__.h b/shared-module/board/__init__.h index f7eecd4170..8b3723bdda 100644 --- a/shared-module/board/__init__.h +++ b/shared-module/board/__init__.h @@ -27,6 +27,6 @@ #ifndef MICROPY_INCLUDED_SHARED_MODULE_BOARD__INIT__H #define MICROPY_INCLUDED_SHARED_MODULE_BOARD__INIT__H -void reset_board_busses(void); +void reset_board_buses(void); #endif // MICROPY_INCLUDED_SHARED_MODULE_BOARD__INIT__H diff --git a/shared-module/displayio/TileGrid.c b/shared-module/displayio/TileGrid.c index dbf2ce545b..fd0547c426 100644 --- a/shared-module/displayio/TileGrid.c +++ b/shared-module/displayio/TileGrid.c @@ -229,6 +229,14 @@ uint16_t common_hal_displayio_tilegrid_get_height(displayio_tilegrid_t *self) { return self->height_in_tiles; } +uint16_t common_hal_displayio_tilegrid_get_tile_width(displayio_tilegrid_t *self) { + return self->tile_width; +} + +uint16_t common_hal_displayio_tilegrid_get_tile_height(displayio_tilegrid_t *self) { + return self->tile_height; +} + uint8_t common_hal_displayio_tilegrid_get_tile(displayio_tilegrid_t *self, uint16_t x, uint16_t y) { uint8_t *tiles = self->tiles; if (self->inline_tiles) { diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index f7c35ac3bd..947614a278 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -24,7 +24,6 @@ * THE SOFTWARE. */ - #include #include "shared-module/displayio/__init__.h" @@ -169,11 +168,11 @@ void reset_displays(void) { if (((size_t)fourwire->bus) < ((size_t)&displays) || ((size_t)fourwire->bus) > ((size_t)&displays + CIRCUITPY_DISPLAY_LIMIT)) { busio_spi_obj_t *original_spi = fourwire->bus; - #if BOARD_SPI - // We don't need to move original_spi if it is the board.SPI object because it is + #if CIRCUITPY_BOARD_SPI + // We don't need to move original_spi if it is a board.SPI object because it is // statically allocated already. (Doing so would also make it impossible to reference in // a subsequent VM run.) - if (original_spi == common_hal_board_get_spi()) { + if (common_hal_board_is_spi(original_spi)) { continue; } #endif @@ -197,11 +196,11 @@ void reset_displays(void) { if (((size_t)i2c->bus) < ((size_t)&displays) || ((size_t)i2c->bus) > ((size_t)&displays + CIRCUITPY_DISPLAY_LIMIT)) { busio_i2c_obj_t *original_i2c = i2c->bus; - #if BOARD_I2C - // We don't need to move original_i2c if it is the board.I2C object because it is + #if CIRCUITPY_BOARD_I2C + // We don't need to move original_i2c if it is a board.I2C object because it is // statically allocated already. (Doing so would also make it impossible to reference in // a subsequent VM run.) - if (original_i2c == common_hal_board_get_i2c()) { + if (common_hal_board_is_i2c(original_i2c)) { continue; } #endif diff --git a/shared-module/sharpdisplay/SharpMemoryFramebuffer.c b/shared-module/sharpdisplay/SharpMemoryFramebuffer.c index ba0e0f2d69..285abb1dbe 100644 --- a/shared-module/sharpdisplay/SharpMemoryFramebuffer.c +++ b/shared-module/sharpdisplay/SharpMemoryFramebuffer.c @@ -71,8 +71,8 @@ STATIC bool common_hal_sharpdisplay_framebuffer_get_pixels_in_byte_share_row(sha void common_hal_sharpdisplay_framebuffer_reset(sharpdisplay_framebuffer_obj_t *self) { if (self->bus != &self->inline_bus - #if BOARD_SPI - && self->bus != common_hal_board_get_spi() + #if CIRCUITPY_BOARD_SPI + && !common_hal_board_is_spi(self->bus) #endif ) { memcpy(&self->inline_bus, self->bus, sizeof(busio_spi_obj_t)); diff --git a/shared-module/storage/__init__.c b/shared-module/storage/__init__.c index 620e536ba4..e36d3ec21e 100644 --- a/shared-module/storage/__init__.c +++ b/shared-module/storage/__init__.c @@ -271,7 +271,7 @@ void common_hal_storage_erase_filesystem(void) { usb_disconnect(); #endif mp_hal_delay_ms(1000); - filesystem_init(false, true); // Force a re-format. + (void)filesystem_init(false, true); // Force a re-format. Ignore failure. common_hal_mcu_reset(); // We won't actually get here, since we're resetting. } diff --git a/shared-module/vectorio/Rectangle.c b/shared-module/vectorio/Rectangle.c index bcaa0092f8..9092a2e078 100644 --- a/shared-module/vectorio/Rectangle.c +++ b/shared-module/vectorio/Rectangle.c @@ -1,7 +1,9 @@ +#include "shared-module/vectorio/__init__.h" #include "shared-bindings/vectorio/Rectangle.h" #include "shared-module/displayio/area.h" #include "py/runtime.h" +#include "stdlib.h" void common_hal_vectorio_rectangle_construct(vectorio_rectangle_t *self, uint32_t width, uint32_t height) { @@ -9,6 +11,12 @@ void common_hal_vectorio_rectangle_construct(vectorio_rectangle_t *self, uint32_ self->height = height; } +void common_hal_vectorio_rectangle_set_on_dirty(vectorio_rectangle_t *self, vectorio_event_t on_dirty) { + if (self->on_dirty.obj != NULL) { + mp_raise_TypeError(translate("can only be registered in one parent")); + } + self->on_dirty = on_dirty; +} uint32_t common_hal_vectorio_rectangle_get_pixel(void *obj, int16_t x, int16_t y) { vectorio_rectangle_t *self = obj; @@ -32,3 +40,29 @@ mp_obj_t common_hal_vectorio_rectangle_get_draw_protocol(void *rectangle) { vectorio_rectangle_t *self = rectangle; return self->draw_protocol_instance; } + +int16_t common_hal_vectorio_rectangle_get_width(void *obj) { + vectorio_rectangle_t *self = obj; + return self->width; +} + +void common_hal_vectorio_rectangle_set_width(void *obj, int16_t width) { + vectorio_rectangle_t *self = obj; + self->width = abs(width); + if (self->on_dirty.obj != NULL) { + self->on_dirty.event(self->on_dirty.obj); + } +} + +int16_t common_hal_vectorio_rectangle_get_height(void *obj) { + vectorio_rectangle_t *self = obj; + return self->height; +} + +void common_hal_vectorio_rectangle_set_height(void *obj, int16_t height) { + vectorio_rectangle_t *self = obj; + self->height = abs(height); + if (self->on_dirty.obj != NULL) { + self->on_dirty.event(self->on_dirty.obj); + } +} diff --git a/shared-module/vectorio/Rectangle.h b/shared-module/vectorio/Rectangle.h index e3cfbb2676..ec6d2107be 100644 --- a/shared-module/vectorio/Rectangle.h +++ b/shared-module/vectorio/Rectangle.h @@ -4,11 +4,13 @@ #include #include "py/obj.h" +#include "shared-module/vectorio/__init__.h" typedef struct { mp_obj_base_t base; uint16_t width; uint16_t height; + vectorio_event_t on_dirty; mp_obj_t draw_protocol_instance; } vectorio_rectangle_t; diff --git a/shared-module/vectorio/VectorShape.c b/shared-module/vectorio/VectorShape.c index 7899e2710c..52d3354946 100644 --- a/shared-module/vectorio/VectorShape.c +++ b/shared-module/vectorio/VectorShape.c @@ -72,6 +72,12 @@ static uint32_t min(uint32_t a, uint32_t b) { return a < b ? a : b; } +static void short_bound_check(mp_int_t i, qstr name) { + if (i < SHRT_MIN || i > SHRT_MAX) { + mp_raise_ValueError_varg(translate("%q must be between %d and %d"), name, SHRT_MIN, SHRT_MAX); + } +} + inline __attribute__((always_inline)) static void area_transpose(displayio_area_t *to_transpose) { int16_t swap = to_transpose->y1; @@ -124,21 +130,50 @@ static void _get_screen_area(vectorio_vector_shape_t *self, displayio_area_t *ou VECTORIO_SHAPE_DEBUG(" out:{(%5d,%5d), (%5d,%5d)}\n", out_area->x1, out_area->y1, out_area->x2, out_area->y2); } +// Get the target pixel based on the shape's coordinate space +static void screen_to_shape_coordinates(vectorio_vector_shape_t *self, uint16_t x, uint16_t y, int16_t *out_shape_x, int16_t *out_shape_y) { + if (self->absolute_transform->transpose_xy) { + *out_shape_x = y - self->absolute_transform->y - self->absolute_transform->dy * self->x; + *out_shape_y = x - self->absolute_transform->x - self->absolute_transform->dx * self->y; -STATIC -void check_bounds_and_set_x(vectorio_vector_shape_t *self, mp_int_t x) { - if (x < SHRT_MIN || x > SHRT_MAX) { - mp_raise_ValueError_varg(translate("%q must be between %d and %d"), MP_QSTR_x, SHRT_MIN, SHRT_MAX); + VECTORIO_SHAPE_PIXEL_DEBUG(" a(%3d, %3d)", *out_shape_x, *out_shape_y); + if (self->absolute_transform->dx < 1) { + *out_shape_y *= -1; + } + if (self->absolute_transform->dy < 1) { + *out_shape_x *= -1; + } + VECTORIO_SHAPE_PIXEL_DEBUG(" b(%3d, %3d)", *out_shape_x, *out_shape_y); + } else { + *out_shape_x = x - self->absolute_transform->x - self->absolute_transform->dx * self->x; + *out_shape_y = y - self->absolute_transform->y - self->absolute_transform->dy * self->y; + + VECTORIO_SHAPE_PIXEL_DEBUG(" a(%3d, %3d)", *out_shape_x, *out_shape_y); + if (self->absolute_transform->dx < 1) { + *out_shape_x *= -1; + } + if (self->absolute_transform->dy < 1) { + *out_shape_y *= -1; + } + VECTORIO_SHAPE_PIXEL_DEBUG(" b(%3d, %3d)", *out_shape_x, *out_shape_y); + + // It's mirrored via dx. Maybe we need to add support for also separately mirroring? + // if (self->absolute_transform->mirror_x) { + // pixel_to_get_x = (shape_area.x2 - shape_area.x1) - (pixel_to_get_x - shape_area.x1) + shape_area.x1 - 1; + // } + // if (self->absolute_transform->mirror_y) { + // pixel_to_get_y = (shape_area.y2 - shape_area.y1) - (pixel_to_get_y - shape_area.y1) + +shape_area.y1 - 1; + // } } +} + +static void check_bounds_and_set_x(vectorio_vector_shape_t *self, mp_int_t x) { + short_bound_check(x, MP_QSTR_x); self->x = x; } - -STATIC -void check_bounds_and_set_y(vectorio_vector_shape_t *self, mp_int_t y) { - if (y < SHRT_MIN || y > SHRT_MAX) { - mp_raise_ValueError_varg(translate("%q must be between %d and %d"), MP_QSTR_y, SHRT_MIN, SHRT_MAX); - } +static void check_bounds_and_set_y(vectorio_vector_shape_t *self, mp_int_t y) { + short_bound_check(y, MP_QSTR_y); self->y = y; } @@ -195,6 +230,17 @@ void common_hal_vectorio_vector_shape_construct(vectorio_vector_shape_t *self, _get_screen_area(self, &self->current_area); } +bool common_hal_vectorio_vector_shape_contains(vectorio_vector_shape_t *self, mp_int_t x, mp_int_t y) { + VECTORIO_SHAPE_DEBUG("%p contains(%d, %d)", self); + short_bound_check(x, MP_QSTR_x); + short_bound_check(y, MP_QSTR_y); + int16_t shape_x; + int16_t shape_y; + screen_to_shape_coordinates(self, x, y, &shape_x, &shape_y); + bool shape_contains_coordinates = 0 != self->ishape.get_pixel(self->ishape.shape, shape_x, shape_y); + return shape_contains_coordinates; +} + mp_int_t common_hal_vectorio_vector_shape_get_x(vectorio_vector_shape_t *self) { VECTORIO_SHAPE_DEBUG("%p get_x\n", self); @@ -277,7 +323,6 @@ void common_hal_vectorio_vector_shape_set_pixel_shader(vectorio_vector_shape_t * common_hal_vectorio_vector_shape_set_dirty(self); } - bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displayio_colorspace_t *colorspace, const displayio_area_t *area, uint32_t *mask, uint32_t *buffer) { // Shape areas are relative to 0,0. This will allow rotation about a known axis. // The consequence is that the area reported by the shape itself is _relative_ to 0,0. @@ -335,42 +380,10 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ } output_pixel.pixel = 0; - // Get the target pixel based on the shape's coordinate space + // Cast input screen coordinates to shape coordinates to pick the pixel to draw int16_t pixel_to_get_x; int16_t pixel_to_get_y; - if (self->absolute_transform->transpose_xy) { - pixel_to_get_x = input_pixel.y - self->absolute_transform->y - self->absolute_transform->dy * self->x; - pixel_to_get_y = input_pixel.x - self->absolute_transform->x - self->absolute_transform->dx * self->y; - - VECTORIO_SHAPE_PIXEL_DEBUG(" a(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); - if (self->absolute_transform->dx < 1) { - pixel_to_get_y *= -1; - } - if (self->absolute_transform->dy < 1) { - pixel_to_get_x *= -1; - } - VECTORIO_SHAPE_PIXEL_DEBUG(" b(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); - } else { - pixel_to_get_x = input_pixel.x - self->absolute_transform->x - self->absolute_transform->dx * self->x; - pixel_to_get_y = input_pixel.y - self->absolute_transform->y - self->absolute_transform->dy * self->y; - - VECTORIO_SHAPE_PIXEL_DEBUG(" a(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); - if (self->absolute_transform->dx < 1) { - pixel_to_get_x *= -1; - } - if (self->absolute_transform->dy < 1) { - pixel_to_get_y *= -1; - } - VECTORIO_SHAPE_PIXEL_DEBUG(" b(%3d, %3d)", pixel_to_get_x, pixel_to_get_y); - - // It's mirrored via dx. Maybe we need to add support for also separately mirroring? - // if (self->absolute_transform->mirror_x) { - // pixel_to_get_x = (shape_area.x2 - shape_area.x1) - (pixel_to_get_x - shape_area.x1) + shape_area.x1 - 1; - // } - // if (self->absolute_transform->mirror_y) { - // pixel_to_get_y = (shape_area.y2 - shape_area.y1) - (pixel_to_get_y - shape_area.y1) + +shape_area.y1 - 1; - // } - } + screen_to_shape_coordinates(self, input_pixel.x, input_pixel.y, &pixel_to_get_x, &pixel_to_get_y); VECTORIO_SHAPE_PIXEL_DEBUG(" get_pixel %p (%3d, %3d) -> ( %3d, %3d )", self->ishape.shape, input_pixel.x, input_pixel.y, pixel_to_get_x, pixel_to_get_y); #ifdef VECTORIO_PERF @@ -411,6 +424,9 @@ bool vectorio_vector_shape_fill_area(vectorio_vector_shape_t *self, const _displ if (colorspace->depth == 16) { VECTORIO_SHAPE_PIXEL_DEBUG(" buffer = %04x 16", output_pixel.pixel); *(((uint16_t *)buffer) + pixel_index) = output_pixel.pixel; + } else if (colorspace->depth == 32) { + VECTORIO_SHAPE_PIXEL_DEBUG(" buffer = %04x 32", output_pixel.pixel); + *(((uint32_t *)buffer) + pixel_index) = output_pixel.pixel; } else if (colorspace->depth == 8) { VECTORIO_SHAPE_PIXEL_DEBUG(" buffer = %02x 8", output_pixel.pixel); *(((uint8_t *)buffer) + pixel_index) = output_pixel.pixel; diff --git a/supervisor/filesystem.h b/supervisor/filesystem.h index c7c951a5e6..6f4faf0b82 100644 --- a/supervisor/filesystem.h +++ b/supervisor/filesystem.h @@ -35,7 +35,7 @@ extern volatile bool filesystem_flush_requested; void filesystem_background(void); void filesystem_tick(void); -void filesystem_init(bool create_allowed, bool force_create); +bool filesystem_init(bool create_allowed, bool force_create); void filesystem_flush(void); bool filesystem_present(void); void filesystem_set_internal_writable_by_usb(bool usb_writable); diff --git a/supervisor/shared/filesystem.c b/supervisor/shared/filesystem.c index 2ab64e5dbd..820dbe9783 100644 --- a/supervisor/shared/filesystem.c +++ b/supervisor/shared/filesystem.c @@ -86,7 +86,7 @@ static void make_sample_code_file(FATFS *fatfs) { // we don't make this function static because it needs a lot of stack and we // want it to be executed without using stack within main() function -void filesystem_init(bool create_allowed, bool force_create) { +bool filesystem_init(bool create_allowed, bool force_create) { // init the vfs object fs_user_mount_t *vfs_fat = &_internal_vfs; vfs_fat->blockdev.flags = 0; @@ -102,11 +102,11 @@ void filesystem_init(bool create_allowed, bool force_create) { formats |= FM_EXFAT | FM_FAT32; #endif res = f_mkfs(&vfs_fat->fatfs, formats, 0, working_buf, sizeof(working_buf)); + if (res != FR_OK) { + return false; + } // Flush the new file system to make sure it's repaired immediately. supervisor_flash_flush(); - if (res != FR_OK) { - return; - } // set label #ifdef CIRCUITPY_DRIVE_LABEL @@ -115,13 +115,13 @@ void filesystem_init(bool create_allowed, bool force_create) { res = f_setlabel(&vfs_fat->fatfs, "CIRCUITPY"); #endif if (res != FR_OK) { - return; + return false; } // inhibit file indexing on MacOS res = f_mkdir(&vfs_fat->fatfs, "/.fseventsd"); if (res != FR_OK) { - return; + return false; } make_empty_file(&vfs_fat->fatfs, "/.metadata_never_index"); make_empty_file(&vfs_fat->fatfs, "/.Trashes"); @@ -132,13 +132,13 @@ void filesystem_init(bool create_allowed, bool force_create) { // create empty lib directory res = f_mkdir(&vfs_fat->fatfs, "/lib"); if (res != FR_OK) { - return; + return false; } // and ensure everything is flushed supervisor_flash_flush(); } else if (res != FR_OK) { - return; + return false; } mp_vfs_mount_t *vfs = &_mp_vfs; vfs->str = "/"; @@ -150,6 +150,8 @@ void filesystem_init(bool create_allowed, bool force_create) { // The current directory is used as the boot up directory. // It is set to the internal flash filesystem by default. MP_STATE_PORT(vfs_cur) = vfs; + + return true; } void filesystem_flush(void) { diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index 59b5ab838d..4cb9d7ad61 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -175,6 +175,9 @@ void print_safe_mode_message(safe_mode_t reason) { case WATCHDOG_RESET: message = translate("Watchdog timer expired."); break; + case NO_CIRCUITPY: + message = translate("CIRCUITPY drive could not be found or created."); + break; default: break; } diff --git a/supervisor/shared/safe_mode.h b/supervisor/shared/safe_mode.h index 600abd7672..0c8d018bfe 100644 --- a/supervisor/shared/safe_mode.h +++ b/supervisor/shared/safe_mode.h @@ -48,6 +48,7 @@ typedef enum { USB_TOO_MANY_INTERFACE_NAMES, USB_BOOT_DEVICE_NOT_INTERFACE_ZERO, NO_HEAP, + NO_CIRCUITPY, } safe_mode_t; safe_mode_t wait_for_safe_mode_reset(void); diff --git a/supervisor/shared/status_leds.c b/supervisor/shared/status_leds.c index 0c433271fc..6c7cde28cc 100644 --- a/supervisor/shared/status_leds.c +++ b/supervisor/shared/status_leds.c @@ -48,6 +48,7 @@ uint8_t rgb_status_brightness = 63; #define MICROPY_HW_NEOPIXEL_COUNT (1) #endif +static uint64_t next_start_raw_ticks; static uint8_t status_neopixel_color[3 * MICROPY_HW_NEOPIXEL_COUNT]; static digitalio_digitalinout_obj_t status_neopixel; @@ -218,6 +219,10 @@ void status_led_init() { void status_led_deinit() { #ifdef MICROPY_HW_NEOPIXEL + // Make sure the pin stays low for the reset period. The pin reset may pull + // it up and stop the reset period. + while (port_get_raw_ticks(NULL) < next_start_raw_ticks) { + } common_hal_reset_pin(MICROPY_HW_NEOPIXEL); #elif defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK) @@ -265,7 +270,7 @@ void new_status_color(uint32_t rgb) { status_neopixel_color[3 * i + 2] = rgb_adjusted & 0xff; } common_hal_neopixel_write(&status_neopixel, status_neopixel_color, 3 * MICROPY_HW_NEOPIXEL_COUNT); - + next_start_raw_ticks = port_get_raw_ticks(NULL) + 2; #elif defined(MICROPY_HW_APA102_MOSI) && defined(MICROPY_HW_APA102_SCK) for (size_t i = 0; i < MICROPY_HW_APA102_COUNT; i++) { // Skip 4 + offset to skip the header bytes too. diff --git a/supervisor/shared/usb/tusb_config.h b/supervisor/shared/usb/tusb_config.h index e75a653244..15d539c450 100644 --- a/supervisor/shared/usb/tusb_config.h +++ b/supervisor/shared/usb/tusb_config.h @@ -96,8 +96,18 @@ extern "C" { // --------------------------------------------------------------------+ // USB RAM PLACEMENT // --------------------------------------------------------------------+ -#define CFG_TUSB_ATTR_USBRAM -#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(4))) +#if !defined(CIRCUITPY_TUSB_ATTR_USBRAM) +#define CIRCUITPY_TUSB_ATTR_USBRAM ".bss.usbram" +#endif + +#define CFG_TUSB_ATTR_USBRAM __attribute__((section(CIRCUITPY_TUSB_ATTR_USBRAM))) + + +#if !defined(CIRCUITPY_TUSB_MEM_ALIGN) +#define CIRCUITPY_TUSB_MEM_ALIGN 4 +#endif + +#define CFG_TUSB_MEM_ALIGN __attribute__ ((aligned(CIRCUITPY_TUSB_MEM_ALIGN))) #ifdef __cplusplus diff --git a/supervisor/stub/filesystem.c b/supervisor/stub/filesystem.c index 2b518f4142..650f4d8346 100644 --- a/supervisor/stub/filesystem.c +++ b/supervisor/stub/filesystem.c @@ -26,19 +26,51 @@ #include "supervisor/filesystem.h" -void filesystem_init(bool create_allowed, bool force_create) { + +void filesystem_background(void) { + return; +} + +bool filesystem_init(bool create_allowed, bool force_create) { (void)create_allowed; (void)force_create; + return true; } void filesystem_flush(void) { } +void filesystem_set_internal_writable_by_usb(bool writable) { + (void)writable; + return; +} + +void filesystem_set_writable_by_usb(fs_user_mount_t *vfs, bool usb_writable) { + (void)vfs; + (void)usb_writable; + return; +} + bool filesystem_is_writable_by_python(fs_user_mount_t *vfs) { (void)vfs; return true; } +bool filesystem_is_writable_by_usb(fs_user_mount_t *vfs) { + return true; +} + +void filesystem_set_internal_concurrent_write_protection(bool concurrent_write_protection) { + (void)concurrent_write_protection; + return; +} + +void filesystem_set_concurrent_write_protection(fs_user_mount_t *vfs, bool concurrent_write_protection) { + (void)vfs; + (void)concurrent_write_protection; + return; +} + bool filesystem_present(void) { return false; } diff --git a/supervisor/stub/internal_flash.c b/supervisor/stub/internal_flash.c index 3a4ba935de..23e843c923 100644 --- a/supervisor/stub/internal_flash.c +++ b/supervisor/stub/internal_flash.c @@ -46,7 +46,8 @@ uint32_t supervisor_flash_get_block_count(void) { return 0; } -void supervisor_flash_flush(void) { +void port_internal_flash_flush(void) { + return; } mp_uint_t supervisor_flash_read_blocks(uint8_t *dest, uint32_t block, uint32_t num_blocks) { diff --git a/supervisor/supervisor.mk b/supervisor/supervisor.mk index 3270f76ed1..eed9f4dc47 100644 --- a/supervisor/supervisor.mk +++ b/supervisor/supervisor.mk @@ -5,7 +5,6 @@ SRC_SUPERVISOR = \ supervisor/shared/background_callback.c \ supervisor/shared/board.c \ supervisor/shared/cpu.c \ - supervisor/shared/filesystem.c \ supervisor/shared/flash.c \ supervisor/shared/lock.c \ supervisor/shared/memory.c \ @@ -17,6 +16,12 @@ SRC_SUPERVISOR = \ supervisor/shared/traceback.c \ supervisor/shared/translate.c +ifeq ($(DISABLE_FILESYSTEM),1) +SRC_SUPERVISOR += supervisor/stub/filesystem.c +else +SRC_SUPERVISOR += supervisor/shared/filesystem.c +endif + NO_USB ?= $(wildcard supervisor/usb.c) INTERNAL_FLASH_FILESYSTEM ?= 0 diff --git a/tests/circuitpython/traceback_test.py b/tests/circuitpython/traceback_test.py index cb7bf4b2aa..6ae73db6ae 100644 --- a/tests/circuitpython/traceback_test.py +++ b/tests/circuitpython/traceback_test.py @@ -22,4 +22,15 @@ except Exception as exc: traceback.print_exception(None, exc, exc.__traceback__, limit=0) print("\nLimit=-1 Trace:") traceback.print_exception(None, exc, exc.__traceback__, limit=-1) + + +class NonNativeException(Exception): + pass + + +try: + raise NonNativeException("test") +except Exception as e: + print("\nNonNative Trace:") + traceback.print_exception(None, e, e.__traceback__) print("") diff --git a/tests/circuitpython/traceback_test.py.exp b/tests/circuitpython/traceback_test.py.exp index be887f2421..9d5adff172 100644 --- a/tests/circuitpython/traceback_test.py.exp +++ b/tests/circuitpython/traceback_test.py.exp @@ -21,3 +21,8 @@ Traceback (most recent call last): File "circuitpython/traceback_test.py", line 9, in fun Exception: test +NonNative Trace: +Traceback (most recent call last): + File "circuitpython/traceback_test.py", line 32, in +NonNativeException: test + diff --git a/tests/pyboard.py b/tests/pyboard.py index 582a1f894f..616773a313 120000 --- a/tests/pyboard.py +++ b/tests/pyboard.py @@ -1 +1 @@ -../tools/cpboard.py +../tools/cpboard.py \ No newline at end of file diff --git a/tools/build_board_info.py b/tools/build_board_info.py old mode 100644 new mode 100755 index 3ebd799b11..9058c733ab --- a/tools/build_board_info.py +++ b/tools/build_board_info.py @@ -32,6 +32,7 @@ DFU = ("dfu",) BIN_DFU = ("bin", "dfu") COMBINED_HEX = ("combined.hex",) KERNEL8_IMG = ("disk.img.zip", "kernel8.img") +KERNEL_IMG = ("disk.img.zip", "kernel.img") # Default extensions extension_by_port = { @@ -69,7 +70,11 @@ extension_by_board = { "meowbit_v121": UF2, # esp32c3 "ai_thinker_esp32-c3s": BIN, + "espressif_esp32c3_devkitm_1_n4": BIN, "microdev_micro_c3": BIN, + # broadcom + "raspberrypi_zero": KERNEL_IMG, + "raspberrypi_zero_w": KERNEL_IMG, } language_allow_list = set( @@ -89,6 +94,7 @@ language_allow_list = set( "pt_BR", "ru", "sv", + "tr", "zh_Latn_pinyin", ] ) diff --git a/tools/build_memory_info.py b/tools/build_memory_info.py old mode 100644 new mode 100755 diff --git a/tools/ci_check_duplicate_usb_vid_pid.py b/tools/ci_check_duplicate_usb_vid_pid.py index 6f15a28c46..dbd29ad872 100644 --- a/tools/ci_check_duplicate_usb_vid_pid.py +++ b/tools/ci_check_duplicate_usb_vid_pid.py @@ -51,6 +51,13 @@ DEFAULT_IGNORELIST = [ "unexpectedmaker_feathers2_prerelease", "espressif_kaluga_1", "espressif_kaluga_1.3", + "espressif_esp32s3_devkitc_1_n8", + "espressif_esp32s3_devkitc_1_n8r2", + "espressif_esp32s3_devkitc_1_n8r8", + "jpconstantineau_pykey18", + "jpconstantineau_pykey44", + "jpconstantineau_pykey60", + "jpconstantineau_pykey87", ] cli_parser = argparse.ArgumentParser(description="USB VID/PID Duplicate Checker") diff --git a/tools/ci_fetch_deps.py b/tools/ci_fetch_deps.py index b85d199b7c..60557c3952 100644 --- a/tools/ci_fetch_deps.py +++ b/tools/ci_fetch_deps.py @@ -22,7 +22,7 @@ port_deps = { "lib/tinyusb/", "data/nvm.toml/", ], - "broadcom": ["lib/tinyusb/"], + "broadcom": ["extmod/ulab/", "lib/tinyusb/"], "cxd56": ["extmod/ulab/", "lib/tinyusb/"], "espressif": ["extmod/ulab/", "lib/tinyusb/", "lib/protomatter/", "lib/quirc/"], "litex": ["extmod/ulab/", "lib/tinyusb/"], diff --git a/tools/ci_set_matrix.py b/tools/ci_set_matrix.py index b25d81ac95..efb4427e7e 100644 --- a/tools/ci_set_matrix.py +++ b/tools/ci_set_matrix.py @@ -68,8 +68,8 @@ def set_boards_to_build(build_all): if not build_all: boards_to_build = set() - board_pattern = re.compile(r"^ports\/[^/]+\/boards\/([^/]+)\/") - port_pattern = re.compile(r"^ports\/([^/]+)\/") + board_pattern = re.compile(r"^ports/[^/]+/boards/([^/]+)/") + port_pattern = re.compile(r"^ports/([^/]+)/") for p in changed_files: # See if it is board specific board_matches = board_pattern.search(p) @@ -120,7 +120,7 @@ def set_docs_to_build(build_all): doc_match = build_all if not build_all: doc_pattern = re.compile( - r"^(?:docs|(?:(?:extmod\/ulab|ports\/\w+\/bindings|shared-bindings)\S+\.c|conf\.py|tools\/extract_pyi\.py|requirements-doc\.txt)$)|(?:-stubs|\.(?:md|MD|rst|RST))$" + r"^(?:docs|extmod/ulab|(?:(?:ports/\w+/bindings|shared-bindings)\S+\.c|conf\.py|tools/extract_pyi\.py|requirements-doc\.txt)$)|(?:-stubs|\.(?:md|MD|rst|RST))$" ) for p in changed_files: if doc_pattern.search(p): diff --git a/tools/extract_pyi.py b/tools/extract_pyi.py index 1bd51ca7a8..d35e09a2e0 100644 --- a/tools/extract_pyi.py +++ b/tools/extract_pyi.py @@ -244,7 +244,7 @@ def convert_folder(top_level, stub_directory): if imports["typing"]: import_lines.append("from typing import " + ", ".join(imports["typing"])) if imports["cpy_typing"]: - import_lines.append("from _typing import " + ", ".join(imports["cpy_typing"])) + import_lines.append("from circuitpython_typing import " + ", ".join(imports["cpy_typing"])) import_lines.extend(f"import {m}" for m in imports["modules"]) import_body = "\n".join(import_lines) m = re.match(r'(\s*""".*?""")', stub_contents, flags=re.DOTALL) diff --git a/tools/preprocess_frozen_modules.py b/tools/preprocess_frozen_modules.py index 294df317bc..30263d2e02 100755 --- a/tools/preprocess_frozen_modules.py +++ b/tools/preprocess_frozen_modules.py @@ -49,7 +49,12 @@ def copy_and_process(in_dir, out_dir): # Skip library examples directory and subfolders. relative_path_parts = Path(root).relative_to(in_dir).parts - if relative_path_parts and relative_path_parts[0] in ["examples", "docs", "tests"]: + if relative_path_parts and relative_path_parts[0] in [ + "examples", + "docs", + "tests", + "utils", + ]: del subdirs[:] continue diff --git a/tools/uf2 b/tools/uf2 index adbb8c7260..1421ca7fe7 160000 --- a/tools/uf2 +++ b/tools/uf2 @@ -1 +1 @@ -Subproject commit adbb8c7260f938e810eb37f2287f8e1a055ff402 +Subproject commit 1421ca7fe72a2b173b08be05f9042b79409e783a diff --git a/tools/uf2conv.py b/tools/uf2conv.py deleted file mode 100755 index d67a55224c..0000000000 --- a/tools/uf2conv.py +++ /dev/null @@ -1,369 +0,0 @@ -#!/usr/bin/env python3 - -# Microsoft UF2 -# -# The MIT License (MIT) -# -# Copyright (c) Microsoft Corporation -# -# All rights reserved. -# -# 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. - -import sys -import struct -import subprocess -import re -import os -import os.path -import argparse - - -UF2_MAGIC_START0 = 0x0A324655 # "UF2\n" -UF2_MAGIC_START1 = 0x9E5D5157 # Randomly selected -UF2_MAGIC_END = 0x0AB16F30 # Ditto - -families = { - "SAMD21": 0x68ED2B88, - "SAMD51": 0x55114460, - "NRF52": 0x1B57745F, - "STM32F1": 0x5EE21072, - "STM32F4": 0x57755A57, - "ATMEGA32": 0x16573617, -} - -INFO_FILE = "/INFO_UF2.TXT" - -appstartaddr = 0x2000 -familyid = 0x0 - - -def is_uf2(buf): - w = struct.unpack(" 476: - assert False, "Invalid UF2 data size at " + ptr - newaddr = hd[3] - if curraddr == None: - appstartaddr = newaddr - curraddr = newaddr - padding = newaddr - curraddr - if padding < 0: - assert False, "Block out of order at " + ptr - if padding > 10 * 1024 * 1024: - assert False, "More than 10M of padding needed at " + ptr - if padding % 4 != 0: - assert False, "Non-word padding size at " + ptr - while padding > 0: - padding -= 4 - outp += b"\x00\x00\x00\x00" - outp += block[32 : 32 + datalen] - curraddr = newaddr + datalen - return outp - - -def convert_to_carray(file_content): - outp = "const unsigned char bindata[] __attribute__((aligned(16))) = {" - for i in range(len(file_content)): - if i % 16 == 0: - outp += "\n" - outp += "0x%02x, " % ord(file_content[i]) - outp += "\n};\n" - return outp - - -def convert_to_uf2(file_content): - global familyid - datapadding = b"" - while len(datapadding) < 512 - 256 - 32 - 4: - datapadding += b"\x00\x00\x00\x00" - numblocks = (len(file_content) + 255) // 256 - outp = b"" - for blockno in range(numblocks): - ptr = 256 * blockno - chunk = file_content[ptr : ptr + 256] - flags = 0x0 - if familyid: - flags |= 0x2000 - hd = struct.pack( - b"= 3 and words[1] == "2" and words[2] == "FAT": - drives.append(words[0]) - else: - rootpath = "/media" - if sys.platform == "darwin": - rootpath = "/Volumes" - elif sys.platform == "linux": - tmp = rootpath + "/" + os.environ["USER"] - if os.path.isdir(tmp): - rootpath = tmp - for d in os.listdir(rootpath): - drives.append(os.path.join(rootpath, d)) - - def has_info(d): - try: - return os.path.isfile(d + INFO_FILE) - except: - return False - - return list(filter(has_info, drives)) - - -def board_id(path): - with open(path + INFO_FILE, mode="r") as file: - file_content = file.read() - return re.search("Board-ID: ([^\r\n]*)", file_content).group(1) - - -def list_drives(): - for d in get_drives(): - print(d, board_id(d)) - - -def write_file(name, buf): - with open(name, "wb") as f: - f.write(buf) - print("Wrote %d bytes to %s." % (len(buf), name)) - - -def main(): - global appstartaddr, familyid - - def error(msg): - print(msg) - sys.exit(1) - - parser = argparse.ArgumentParser(description="Convert to UF2 or flash directly.") - parser.add_argument( - "input", metavar="INPUT", type=str, nargs="?", help="input file (HEX, BIN or UF2)" - ) - parser.add_argument( - "-b", - "--base", - dest="base", - type=str, - default="0x2000", - help="set base address of application for BIN format (default: 0x2000)", - ) - parser.add_argument( - "-o", - "--output", - metavar="FILE", - dest="output", - type=str, - help='write output to named file; defaults to "flash.uf2" or "flash.bin" where sensible', - ) - parser.add_argument("-d", "--device", dest="device_path", help="select a device path to flash") - parser.add_argument("-l", "--list", action="store_true", help="list connected devices") - parser.add_argument("-c", "--convert", action="store_true", help="do not flash, just convert") - parser.add_argument( - "-f", - "--family", - dest="family", - type=str, - default="0x0", - help="specify familyID - number or name (default: 0x0)", - ) - parser.add_argument( - "-C", "--carray", action="store_true", help="convert binary file to a C array, not UF2" - ) - args = parser.parse_args() - appstartaddr = int(args.base, 0) - - if args.family.upper() in families: - familyid = families[args.family.upper()] - else: - try: - familyid = int(args.family, 0) - except ValueError: - error("Family ID needs to be a number or one of: " + ", ".join(families.keys())) - - if args.list: - list_drives() - else: - if not args.input: - error("Need input file") - with open(args.input, mode="rb") as f: - inpbuf = f.read() - from_uf2 = is_uf2(inpbuf) - ext = "uf2" - if from_uf2: - outbuf = convert_from_uf2(inpbuf) - ext = "bin" - elif is_hex(inpbuf): - outbuf = convert_from_hex_to_uf2(inpbuf.decode("utf-8")) - elif args.carray: - outbuf = convert_to_carray(inpbuf) - ext = "h" - else: - outbuf = convert_to_uf2(inpbuf) - print( - "Converting to %s, output size: %d, start address: 0x%x" - % (ext, len(outbuf), appstartaddr) - ) - if args.convert: - drives = [] - if args.output == None: - args.output = "flash." + ext - else: - drives = get_drives() - - if args.output: - write_file(args.output, outbuf) - else: - if len(drives) == 0: - error("No drive to deploy.") - for d in drives: - print("Flashing %s (%s)" % (d, board_id(d))) - write_file(d + "/NEW.UF2", outbuf) - - -if __name__ == "__main__": - main()