summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Moore <nick@zoic.org>2018-10-11 14:19:10 +1100
committerNick Moore <nick@zoic.org>2018-10-11 14:19:10 +1100
commitaab28748bb3884d2939e4f972c112679724648b4 (patch)
tree9f92043a80f2ffe599f2544ecc6b2387bbec947f
parent09e6127435e5afb5c9caa9298d68176679cc51ce (diff)
parent852cbca9d48a35bb19dce69bab8632d0801b3e42 (diff)
Merge remote-tracking branch 'origin/master' into circuitpython/nickzoic/703-wiznet-5500-native
-rwxr-xr-x.travis.yml80
m---------lib/tinyusb0
-rw-r--r--locale/circuitpython.pot140
-rw-r--r--locale/de_DE.po145
-rw-r--r--locale/en_US.po140
-rw-r--r--locale/es.po211
-rw-r--r--locale/fil.po151
-rw-r--r--locale/fr.po160
-rw-r--r--locale/it_IT.po2511
-rw-r--r--locale/pt_BR.po298
-rw-r--r--ports/atmel-samd/Makefile2
-rw-r--r--ports/atmel-samd/audio_dma.c76
-rwxr-xr-xports/atmel-samd/common-hal/supervisor/Runtime.c4
-rw-r--r--ports/atmel-samd/mpconfigport.h2
-rw-r--r--ports/esp8266/README.md8
-rw-r--r--ports/nrf/common-hal/busio/SPI.c2
-rw-r--r--ports/nrf/common-hal/pulseio/PWMOut.c312
-rw-r--r--ports/nrf/common-hal/pulseio/PWMOut.h14
-rwxr-xr-xports/nrf/common-hal/supervisor/Runtime.c4
m---------ports/nrf/nrfx0
-rw-r--r--ports/nrf/supervisor/filesystem.c4
-rw-r--r--py/emitinlinethumb.c34
-rw-r--r--shared-bindings/audioio/Mixer.c249
-rw-r--r--shared-bindings/audioio/Mixer.h52
-rw-r--r--shared-bindings/audioio/__init__.c4
-rw-r--r--shared-bindings/pulseio/PWMOut.c2
-rwxr-xr-xshared-bindings/supervisor/Runtime.c26
-rwxr-xr-xshared-bindings/supervisor/Runtime.h2
-rw-r--r--shared-module/audioio/Mixer.c341
-rw-r--r--shared-module/audioio/Mixer.h75
-rw-r--r--shared-module/audioio/WaveFile.c18
-rw-r--r--shared-module/audioio/__init__.c125
-rw-r--r--shared-module/audioio/__init__.h17
-rw-r--r--shared-module/displayio/Sprite.c2
-rwxr-xr-xtools/preprocess_frozen_modules.py2
35 files changed, 4606 insertions, 607 deletions
diff --git a/.travis.yml b/.travis.yml
index 1237a6a6b..78fc863aa 100755
--- a/.travis.yml
+++ b/.travis.yml
@@ -9,36 +9,15 @@ git:
# Put a representative board from each port or sub-port near the top
# to determine more quickly whether that port is going to build or not.
env:
- - TRAVIS_TEST=unix
- - TRAVIS_TEST=docs
- - TRAVIS_TEST=translations
- - TRAVIS_BOARD=feather_huzzah
- - TRAVIS_BOARD=circuitplayground_express
- - TRAVIS_BOARD=pca10056
- # The rest of the boards, in alphabetical order.
- - TRAVIS_BOARD=trinket_m0
- - TRAVIS_BOARD=feather_m4_express
- - TRAVIS_BOARD=grandcentral_m4_express
- - TRAVIS_BOARD=arduino_zero
- - TRAVIS_BOARD=circuitplayground_express_crickit
- - TRAVIS_BOARD=feather_m0_adalogger
- - TRAVIS_BOARD=feather_m0_basic
- - TRAVIS_BOARD=feather_m0_express
- - TRAVIS_BOARD=feather_m0_express_crickit
- - TRAVIS_BOARD=feather_m0_rfm69
- - TRAVIS_BOARD=feather_m0_rfm9x
- - TRAVIS_BOARD=feather_nrf52832
- - TRAVIS_BOARD=feather_nrf52840_express
- - TRAVIS_BOARD=feather_radiofruit_zigbee
- - TRAVIS_BOARD=gemma_m0
- - TRAVIS_BOARD=hallowing_m0_express
- - TRAVIS_BOARD=itsybitsy_m0_express
- - TRAVIS_BOARD=itsybitsy_m4_express
- - TRAVIS_BOARD=metro_m0_express
- - TRAVIS_BOARD=metro_m4_express
- - TRAVIS_BOARD=pca10059
- - TRAVIS_BOARD=pirkey_m0
- - TRAVIS_BOARD=trellis_m4_express
+ - TRAVIS_TESTS="unix docs translations"
+ - TRAVIS_BOARDS="feather_huzzah circuitplayground_express pca10056" TRAVIS_SDK=arm:nrf:esp8266
+ # Group nrf builds together..
+ - TRAVIS_BOARDS="pca10056 pca10059 feather_nrf52832 feather_nrf52840_express" TRAVIS_SDK=arm:nrf
+ # The rest of the M0/M4 boards, in arbitrary order.
+ - TRAVIS_BOARDS="metro_m0_express metro_m4_express pirkey_m0 trellis_m4_express trinket_m0" TRAVIS_SDK=arm
+ - TRAVIS_BOARDS="feather_radiofruit_zigbee gemma_m0 hallowing_m0_express itsybitsy_m0_express itsybitsy_m4_express" TRAVIS_SDK=arm
+ - TRAVIS_BOARDS="feather_m0_express_crickit feather_m0_rfm69 feather_m0_rfm9x feather_m4_express arduino_zero" TRAVIS_SDK=arm
+ - TRAVIS_BOARDS="circuitplayground_express_crickit feather_m0_adalogger feather_m0_basic feather_m0_express" TRAVIS_SDK=arm
addons:
artifacts:
@@ -57,21 +36,28 @@ notifications:
on_error: always
before_script:
+ - function var_search () { case "$1" in *$2*) true;; *) false;; esac; }
- sudo dpkg --add-architecture i386
- - ([[ -z "$TRAVIS_BOARD" || $TRAVIS_BOARD = "feather_huzzah" ]] || (wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~trusty1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb))
+ - (! var_search "${TRAVIS_SDK-}" arm || (wget https://s3.amazonaws.com/adafruit-circuit-python/gcc-arm-embedded_7-2018q2-1~trusty1_amd64.deb && sudo dpkg -i gcc-arm-embedded*_amd64.deb))
# For nrf builds
- - ([[ $TRAVIS_BOARD != "feather_nrf52832" && $TRAVIS_BOARD != "feather_nrf52840_express" && $TRAVIS_BOARD != "pca10056" && $TRAVIS_BOARD != "pca10059" ]] || sudo ports/nrf/drivers/bluetooth/download_ble_stack.sh)
+ - (! var_search "${TRAVIS_SDK-}" nrf || sudo ports/nrf/drivers/bluetooth/download_ble_stack.sh)
+
# For huzzah builds
- - if [[ $TRAVIS_BOARD = "feather_huzzah" ]]; then wget https://github.com/jepler/esp-open-sdk/releases/download/2018-06-10/xtensa-lx106-elf-standalone.tar.gz && tar xavf xtensa-lx106-elf-standalone.tar.gz; PATH=$(readlink -f xtensa-lx106-elf/bin):$PATH; fi
+ - (! var_search "${TRAVIS_SDK-}" esp8266 || (wget https://github.com/jepler/esp-open-sdk/releases/download/2018-06-10/xtensa-lx106-elf-standalone.tar.gz && tar xavf xtensa-lx106-elf-standalone.tar.gz))
+ - if var_search "${TRAVIS_SDK-}" esp8266 ; then PATH=$(readlink -f xtensa-lx106-elf/bin):$PATH; fi
+
# For coverage testing (upgrade is used to get latest urllib3 version)
- - ([[ -z "$TRAVIS_TEST" ]] || sudo apt-get install -y python3-pip)
- - ([[ -z "$TRAVIS_TEST" ]] || sudo pip install --upgrade cpp-coveralls)
- - ([[ $TRAVIS_TEST != "docs" ]] || sudo pip install 'Sphinx<1.8.0' sphinx-rtd-theme recommonmark)
- - ([[ $TRAVIS_TEST != "translations" ]] || sudo pip3 install polib)
+ - ([[ -z "$TRAVIS_TESTS" ]] || sudo apt-get install -y python3-pip)
+ - ([[ -z "$TRAVIS_TESTS" ]] || sudo pip install --upgrade cpp-coveralls)
+ - (! var_search "${TRAVIS_TESTS-}" docs || sudo pip install 'Sphinx<1.8.0' sphinx-rtd-theme recommonmark)
+ - (! var_search "${TRAVIS_TESTS-}" translations || sudo pip3 install polib)
+
+ # report some good version numbers to the buil
- gcc --version
- - ([[ -z "$TRAVIS_BOARD" || $TRAVIS_BOARD = "feather_huzzah" ]] || arm-none-eabi-gcc --version)
+ - (! var_search "${TRAVIS_SDK-}" elf || arm-none-eabi-gcc --version)
+ - (! var_search "${TRAVIS_SDK-}" esp8266 || xtensa-lx106-elf-gcc --version)
- python3 --version
script:
@@ -81,13 +67,11 @@ script:
- echo -en 'travis_fold:end:mpy-cross\\r'
- echo 'Building Adafruit binaries' && echo -en 'travis_fold:start:adafruit-bins\\r'
- - ([[ -z "$TRAVIS_BOARD" ]] || tools/build_adafruit_bins.sh)
+ - (for board in $TRAVIS_BOARDS; do TRAVIS_BOARD=$board tools/build_adafruit_bins.sh || exit $?; done)
- echo -en 'travis_fold:end:adafruit-bins\\r'
- echo 'Building unix' && echo -en 'travis_fold:start:unix\\r'
- - ([[ $TRAVIS_TEST != "unix" ]] || make -C ports/unix deplibs -j2)
- - ([[ $TRAVIS_TEST != "unix" ]] || make -C ports/unix -j2)
- - ([[ $TRAVIS_TEST != "unix" ]] || make -C ports/unix coverage -j2)
+ - (! var_search "${TRAVIS_TESTS-}" unix || (make -C ports/unix deplibs -j2 && make -C ports/unix -j2 && make -C ports/unix coverage -j2))
- echo -en 'travis_fold:end:unix\\r'
# run tests without coverage info
@@ -96,27 +80,27 @@ script:
# run tests with coverage info
- echo 'Test all' && echo -en 'travis_fold:start:test_all\\r'
- - ([[ $TRAVIS_TEST != "unix" ]] || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1))
+ - (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1))
- echo -en 'travis_fold:end:test_all\\r'
- echo 'Test threads' && echo -en 'travis_fold:start:test_threads\\r'
- - ([[ $TRAVIS_TEST != "unix" ]] || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread))
+ - (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 -d thread))
- echo -en 'travis_fold:end:test_threads\\r'
- echo 'Testing with native' && echo -en 'travis_fold:start:test_native\\r'
- - ([[ $TRAVIS_TEST != "unix" ]] || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native))
+ - (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --emit native))
- echo -en 'travis_fold:end:test_native\\r'
- (echo 'Testing with mpy' && echo -en 'travis_fold:start:test_mpy\\r')
- - ([[ $TRAVIS_TEST != "unix" ]] || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float))
+ - (! var_search "${TRAVIS_TESTS-}" unix || (cd tests && MICROPY_CPYTHON3=python3.4 MICROPY_MICROPYTHON=../ports/unix/micropython_coverage ./run-tests -j1 --via-mpy -d basics float))
- echo -en 'travis_fold:end:test_mpy\\r'
- (echo 'Building docs' && echo -en 'travis_fold:start:build_docs\\r')
- - ([[ $TRAVIS_TEST != "docs" ]] || sphinx-build -E -W -b html . _build/html)
+ - (! var_search "${TRAVIS_TESTS-}" docs || sphinx-build -E -W -b html . _build/html)
- echo -en 'travis_fold:end:build_docs\\r'
- (echo 'Building translations' && echo -en 'travis_fold:start:build_translations\\r')
- - ([[ $TRAVIS_TEST != "translations" ]] || make check-translate)
+ - (! var_search "${TRAVIS_TESTS-}" translations || make check-translate)
- echo -en 'travis_fold:end:build_translations\\r'
# run coveralls coverage analysis (try to, even if some builds/tests failed)
diff --git a/lib/tinyusb b/lib/tinyusb
-Subproject a660fb0cfc8641d5645d1cdea76027266b27838
+Subproject 33c61bfda2c3aada3cb06d36e12d7cf57da0203
diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot
index c47f57cf3..fb6fa9ba1 100644
--- a/locale/circuitpython.pot
+++ b/locale/circuitpython.pot
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-10-09 23:01+1100\n"
+"POT-Creation-Date: 2018-10-11 14:17+1100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
@@ -218,7 +218,7 @@ msgstr ""
msgid "soft reboot\n"
msgstr ""
-#: ports/atmel-samd/audio_dma.c:285
+#: ports/atmel-samd/audio_dma.c:209
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:361
msgid "All sync event channels in use"
msgstr ""
@@ -413,7 +413,8 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:120
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:369
-#: ports/nrf/common-hal/pulseio/PWMOut.c:227
+#: ports/nrf/common-hal/pulseio/PWMOut.c:120
+#: ports/nrf/common-hal/pulseio/PWMOut.c:233
msgid "Invalid PWM frequency"
msgstr ""
@@ -728,6 +729,10 @@ msgstr ""
msgid "Can not get temperature. status: 0x%02x"
msgstr ""
+#: ports/nrf/common-hal/pulseio/PWMOut.c:162
+msgid "All PWM peripherals are in use"
+msgstr ""
+
#: ports/nrf/drivers/bluetooth/ble_drv.c:199
msgid "Cannot apply GAP parameters."
msgstr ""
@@ -1091,38 +1096,85 @@ msgstr ""
msgid "'data' requires integer arguments"
msgstr ""
-#: py/emitinlinextensa.c:86
-msgid "can only have up to 4 parameters to Xtensa assembly"
+#: py/emitinlinethumb.c:102
+msgid "can only have up to 4 parameters to Thumb assembly"
msgstr ""
-#: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96
-msgid "parameters must be registers in sequence a2 to a5"
+#: py/emitinlinethumb.c:107 py/emitinlinethumb.c:112
+msgid "parameters must be registers in sequence r0 to r3"
msgstr ""
-#: py/emitinlinextensa.c:162
+#: py/emitinlinethumb.c:188 py/emitinlinethumb.c:230
+#, c-format
+msgid "'%s' expects at most r%d"
+msgstr ""
+
+#: py/emitinlinethumb.c:197 py/emitinlinextensa.c:162
#, c-format
msgid "'%s' expects a register"
msgstr ""
-#: py/emitinlinextensa.c:169
+#: py/emitinlinethumb.c:211
+#, c-format
+msgid "'%s' expects a special register"
+msgstr ""
+
+#: py/emitinlinethumb.c:239
+#, c-format
+msgid "'%s' expects an FPU register"
+msgstr ""
+
+#: py/emitinlinethumb.c:292
+#, c-format
+msgid "'%s' expects {r0, r1, ...}"
+msgstr ""
+
+#: py/emitinlinethumb.c:299 py/emitinlinextensa.c:169
#, c-format
msgid "'%s' expects an integer"
msgstr ""
-#: py/emitinlinextensa.c:174
+#: py/emitinlinethumb.c:304
#, c-format
-msgid "'%s' integer %d is not within range %d..%d"
+msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr ""
-#: py/emitinlinextensa.c:182
+#: py/emitinlinethumb.c:328
+#, c-format
+msgid "'%s' expects an address of the form [a, b]"
+msgstr ""
+
+#: py/emitinlinethumb.c:334 py/emitinlinextensa.c:182
#, c-format
msgid "'%s' expects a label"
msgstr ""
-#: py/emitinlinextensa.c:193
+#: py/emitinlinethumb.c:345 py/emitinlinextensa.c:193
msgid "label '%q' not defined"
msgstr ""
+#: py/emitinlinethumb.c:806
+#, c-format
+msgid "unsupported Thumb instruction '%s' with %d arguments"
+msgstr ""
+
+#: py/emitinlinethumb.c:810
+msgid "branch not in range"
+msgstr ""
+
+#: py/emitinlinextensa.c:86
+msgid "can only have up to 4 parameters to Xtensa assembly"
+msgstr ""
+
+#: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96
+msgid "parameters must be registers in sequence a2 to a5"
+msgstr ""
+
+#: py/emitinlinextensa.c:174
+#, c-format
+msgid "'%s' integer %d is not within range %d..%d"
+msgstr ""
+
#: py/emitinlinextensa.c:327
#, c-format
msgid "unsupported Xtensa instruction '%s' with %d arguments"
@@ -1979,6 +2031,22 @@ msgid ""
"destination buffer must be a bytearray or array of type 'B' for bit_depth = 8"
msgstr ""
+#: shared-bindings/audioio/Mixer.c:94
+msgid "Invalid voice count"
+msgstr ""
+
+#: shared-bindings/audioio/Mixer.c:99
+msgid "Invalid channel count"
+msgstr ""
+
+#: shared-bindings/audioio/Mixer.c:103
+msgid "Sample rate must be positive"
+msgstr ""
+
+#: shared-bindings/audioio/Mixer.c:107
+msgid "bits_per_sample must be 8 or 16"
+msgstr ""
+
#: shared-bindings/audioio/RawSample.c:98
msgid ""
"sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or "
@@ -2149,10 +2217,6 @@ msgstr ""
msgid "Stream missing readinto() or write() method."
msgstr ""
-#: shared-bindings/network/__init__.c:79 shared-bindings/socket/__init__.c:428
-msgid "no available NIC"
-msgstr ""
-
#: shared-bindings/nvm/ByteArray.c:99
msgid "Slice and value different lengths."
msgstr ""
@@ -2180,7 +2244,7 @@ msgstr ""
#: shared-bindings/pulseio/PWMOut.c:195
msgid ""
-"PWM frequency not writeable when variable_frequency is False on construction."
+"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
#: shared-bindings/pulseio/PulseIn.c:275
@@ -2228,6 +2292,10 @@ msgstr ""
msgid "RTC calibration is not supported on this board"
msgstr ""
+#: shared-bindings/socket/__init__.c:428 shared-module/network/__init__.c:64
+msgid "no available NIC"
+msgstr ""
+
#: shared-bindings/storage/__init__.c:77
msgid "filesystem must provide mount method"
msgstr ""
@@ -2273,6 +2341,34 @@ msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
msgstr ""
+#: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117
+msgid "Couldn't allocate first buffer"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:53 shared-module/audioio/WaveFile.c:123
+msgid "Couldn't allocate second buffer"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:82
+msgid "Voice index too high"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:85
+msgid "The sample's sample rate does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:88
+msgid "The sample's channel count does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:91
+msgid "The sample's bits_per_sample does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:100
+msgid "The sample's signedness does not match the mixer's"
+msgstr ""
+
#: shared-module/audioio/WaveFile.c:61
msgid "Invalid wave file"
msgstr ""
@@ -2293,14 +2389,6 @@ msgstr ""
msgid "Invalid file"
msgstr ""
-#: shared-module/audioio/WaveFile.c:117
-msgid "Couldn't allocate first buffer"
-msgstr ""
-
-#: shared-module/audioio/WaveFile.c:123
-msgid "Couldn't allocate second buffer"
-msgstr ""
-
#: shared-module/bitbangio/I2C.c:58
msgid "Clock stretch too long"
msgstr ""
diff --git a/locale/de_DE.po b/locale/de_DE.po
index 2f4cf7cef..1672ef178 100644
--- a/locale/de_DE.po
+++ b/locale/de_DE.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-10-09 23:01+1100\n"
+"POT-Creation-Date: 2018-10-11 14:16+1100\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: Sebastian Plamauer\n"
"Language-Team: \n"
@@ -227,7 +227,7 @@ msgstr ""
msgid "soft reboot\n"
msgstr "weicher reboot\n"
-#: ports/atmel-samd/audio_dma.c:285
+#: ports/atmel-samd/audio_dma.c:209
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:361
msgid "All sync event channels in use"
msgstr "Alle sync event Kanäle werden benutzt"
@@ -422,7 +422,8 @@ msgstr "Reset zum bootloader nicht möglich da bootloader nicht vorhanden"
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:120
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:369
-#: ports/nrf/common-hal/pulseio/PWMOut.c:227
+#: ports/nrf/common-hal/pulseio/PWMOut.c:120
+#: ports/nrf/common-hal/pulseio/PWMOut.c:233
msgid "Invalid PWM frequency"
msgstr "Ungültige PWM Frequenz"
@@ -741,6 +742,11 @@ msgstr ""
msgid "Can not get temperature. status: 0x%02x"
msgstr ""
+#: ports/nrf/common-hal/pulseio/PWMOut.c:162
+#, fuzzy
+msgid "All PWM peripherals are in use"
+msgstr "Alle timer werden benutzt"
+
#: ports/nrf/drivers/bluetooth/ble_drv.c:199
msgid "Cannot apply GAP parameters."
msgstr ""
@@ -1104,38 +1110,86 @@ msgstr ""
msgid "'data' requires integer arguments"
msgstr ""
-#: py/emitinlinextensa.c:86
-msgid "can only have up to 4 parameters to Xtensa assembly"
+#: py/emitinlinethumb.c:102
+msgid "can only have up to 4 parameters to Thumb assembly"
msgstr ""
-#: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96
-msgid "parameters must be registers in sequence a2 to a5"
+#: py/emitinlinethumb.c:107 py/emitinlinethumb.c:112
+msgid "parameters must be registers in sequence r0 to r3"
msgstr ""
-#: py/emitinlinextensa.c:162
+#: py/emitinlinethumb.c:188 py/emitinlinethumb.c:230
+#, c-format
+msgid "'%s' expects at most r%d"
+msgstr ""
+
+#: py/emitinlinethumb.c:197 py/emitinlinextensa.c:162
#, c-format
msgid "'%s' expects a register"
msgstr ""
-#: py/emitinlinextensa.c:169
+#: py/emitinlinethumb.c:211
+#, c-format
+msgid "'%s' expects a special register"
+msgstr ""
+
+#: py/emitinlinethumb.c:239
+#, c-format
+msgid "'%s' expects an FPU register"
+msgstr ""
+
+#: py/emitinlinethumb.c:292
+#, c-format
+msgid "'%s' expects {r0, r1, ...}"
+msgstr ""
+
+#: py/emitinlinethumb.c:299 py/emitinlinextensa.c:169
#, c-format
msgid "'%s' expects an integer"
msgstr ""
-#: py/emitinlinextensa.c:174
+#: py/emitinlinethumb.c:304
#, c-format
-msgid "'%s' integer %d is not within range %d..%d"
+msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr ""
-#: py/emitinlinextensa.c:182
+#: py/emitinlinethumb.c:328
+#, c-format
+msgid "'%s' expects an address of the form [a, b]"
+msgstr ""
+
+#: py/emitinlinethumb.c:334 py/emitinlinextensa.c:182
#, c-format
msgid "'%s' expects a label"
msgstr ""
-#: py/emitinlinextensa.c:193
+#: py/emitinlinethumb.c:345 py/emitinlinextensa.c:193
msgid "label '%q' not defined"
msgstr ""
+#: py/emitinlinethumb.c:806
+#, c-format
+msgid "unsupported Thumb instruction '%s' with %d arguments"
+msgstr ""
+
+#: py/emitinlinethumb.c:810
+#, fuzzy
+msgid "branch not in range"
+msgstr "Kalibrierung ist außerhalb der Reichweite"
+
+#: py/emitinlinextensa.c:86
+msgid "can only have up to 4 parameters to Xtensa assembly"
+msgstr ""
+
+#: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96
+msgid "parameters must be registers in sequence a2 to a5"
+msgstr ""
+
+#: py/emitinlinextensa.c:174
+#, c-format
+msgid "'%s' integer %d is not within range %d..%d"
+msgstr ""
+
#: py/emitinlinextensa.c:327
#, c-format
msgid "unsupported Xtensa instruction '%s' with %d arguments"
@@ -1992,6 +2046,25 @@ msgid ""
"destination buffer must be a bytearray or array of type 'B' for bit_depth = 8"
msgstr ""
+#: shared-bindings/audioio/Mixer.c:94
+#, fuzzy
+msgid "Invalid voice count"
+msgstr "Ungültiger clock pin"
+
+#: shared-bindings/audioio/Mixer.c:99
+#, fuzzy
+msgid "Invalid channel count"
+msgstr "Ungültiger clock pin"
+
+#: shared-bindings/audioio/Mixer.c:103
+msgid "Sample rate must be positive"
+msgstr ""
+
+#: shared-bindings/audioio/Mixer.c:107
+#, fuzzy
+msgid "bits_per_sample must be 8 or 16"
+msgstr "bits müssen 8 sein"
+
#: shared-bindings/audioio/RawSample.c:98
msgid ""
"sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or "
@@ -2163,10 +2236,6 @@ msgstr ""
msgid "Stream missing readinto() or write() method."
msgstr ""
-#: shared-bindings/network/__init__.c:79 shared-bindings/socket/__init__.c:428
-msgid "no available NIC"
-msgstr ""
-
#: shared-bindings/nvm/ByteArray.c:99
msgid "Slice and value different lengths."
msgstr ""
@@ -2194,7 +2263,7 @@ msgstr ""
#: shared-bindings/pulseio/PWMOut.c:195
msgid ""
-"PWM frequency not writeable when variable_frequency is False on construction."
+"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
#: shared-bindings/pulseio/PulseIn.c:275
@@ -2242,6 +2311,10 @@ msgstr ""
msgid "RTC calibration is not supported on this board"
msgstr ""
+#: shared-bindings/socket/__init__.c:428 shared-module/network/__init__.c:64
+msgid "no available NIC"
+msgstr ""
+
#: shared-bindings/storage/__init__.c:77
msgid "filesystem must provide mount method"
msgstr ""
@@ -2287,6 +2360,34 @@ msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
msgstr ""
+#: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117
+msgid "Couldn't allocate first buffer"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:53 shared-module/audioio/WaveFile.c:123
+msgid "Couldn't allocate second buffer"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:82
+msgid "Voice index too high"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:85
+msgid "The sample's sample rate does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:88
+msgid "The sample's channel count does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:91
+msgid "The sample's bits_per_sample does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:100
+msgid "The sample's signedness does not match the mixer's"
+msgstr ""
+
#: shared-module/audioio/WaveFile.c:61
msgid "Invalid wave file"
msgstr ""
@@ -2307,14 +2408,6 @@ msgstr ""
msgid "Invalid file"
msgstr ""
-#: shared-module/audioio/WaveFile.c:117
-msgid "Couldn't allocate first buffer"
-msgstr ""
-
-#: shared-module/audioio/WaveFile.c:123
-msgid "Couldn't allocate second buffer"
-msgstr ""
-
#: shared-module/bitbangio/I2C.c:58
msgid "Clock stretch too long"
msgstr ""
diff --git a/locale/en_US.po b/locale/en_US.po
index 41449daa7..d26568310 100644
--- a/locale/en_US.po
+++ b/locale/en_US.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-10-09 23:01+1100\n"
+"POT-Creation-Date: 2018-10-11 14:16+1100\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -218,7 +218,7 @@ msgstr ""
msgid "soft reboot\n"
msgstr ""
-#: ports/atmel-samd/audio_dma.c:285
+#: ports/atmel-samd/audio_dma.c:209
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:361
msgid "All sync event channels in use"
msgstr ""
@@ -413,7 +413,8 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:120
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:369
-#: ports/nrf/common-hal/pulseio/PWMOut.c:227
+#: ports/nrf/common-hal/pulseio/PWMOut.c:120
+#: ports/nrf/common-hal/pulseio/PWMOut.c:233
msgid "Invalid PWM frequency"
msgstr ""
@@ -728,6 +729,10 @@ msgstr ""
msgid "Can not get temperature. status: 0x%02x"
msgstr ""
+#: ports/nrf/common-hal/pulseio/PWMOut.c:162
+msgid "All PWM peripherals are in use"
+msgstr ""
+
#: ports/nrf/drivers/bluetooth/ble_drv.c:199
msgid "Cannot apply GAP parameters."
msgstr ""
@@ -1091,38 +1096,85 @@ msgstr ""
msgid "'data' requires integer arguments"
msgstr ""
-#: py/emitinlinextensa.c:86
-msgid "can only have up to 4 parameters to Xtensa assembly"
+#: py/emitinlinethumb.c:102
+msgid "can only have up to 4 parameters to Thumb assembly"
msgstr ""
-#: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96
-msgid "parameters must be registers in sequence a2 to a5"
+#: py/emitinlinethumb.c:107 py/emitinlinethumb.c:112
+msgid "parameters must be registers in sequence r0 to r3"
msgstr ""
-#: py/emitinlinextensa.c:162
+#: py/emitinlinethumb.c:188 py/emitinlinethumb.c:230
+#, c-format
+msgid "'%s' expects at most r%d"
+msgstr ""
+
+#: py/emitinlinethumb.c:197 py/emitinlinextensa.c:162
#, c-format
msgid "'%s' expects a register"
msgstr ""
-#: py/emitinlinextensa.c:169
+#: py/emitinlinethumb.c:211
+#, c-format
+msgid "'%s' expects a special register"
+msgstr ""
+
+#: py/emitinlinethumb.c:239
+#, c-format
+msgid "'%s' expects an FPU register"
+msgstr ""
+
+#: py/emitinlinethumb.c:292
+#, c-format
+msgid "'%s' expects {r0, r1, ...}"
+msgstr ""
+
+#: py/emitinlinethumb.c:299 py/emitinlinextensa.c:169
#, c-format
msgid "'%s' expects an integer"
msgstr ""
-#: py/emitinlinextensa.c:174
+#: py/emitinlinethumb.c:304
#, c-format
-msgid "'%s' integer %d is not within range %d..%d"
+msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr ""
-#: py/emitinlinextensa.c:182
+#: py/emitinlinethumb.c:328
+#, c-format
+msgid "'%s' expects an address of the form [a, b]"
+msgstr ""
+
+#: py/emitinlinethumb.c:334 py/emitinlinextensa.c:182
#, c-format
msgid "'%s' expects a label"
msgstr ""
-#: py/emitinlinextensa.c:193
+#: py/emitinlinethumb.c:345 py/emitinlinextensa.c:193
msgid "label '%q' not defined"
msgstr ""
+#: py/emitinlinethumb.c:806
+#, c-format
+msgid "unsupported Thumb instruction '%s' with %d arguments"
+msgstr ""
+
+#: py/emitinlinethumb.c:810
+msgid "branch not in range"
+msgstr ""
+
+#: py/emitinlinextensa.c:86
+msgid "can only have up to 4 parameters to Xtensa assembly"
+msgstr ""
+
+#: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96
+msgid "parameters must be registers in sequence a2 to a5"
+msgstr ""
+
+#: py/emitinlinextensa.c:174
+#, c-format
+msgid "'%s' integer %d is not within range %d..%d"
+msgstr ""
+
#: py/emitinlinextensa.c:327
#, c-format
msgid "unsupported Xtensa instruction '%s' with %d arguments"
@@ -1979,6 +2031,22 @@ msgid ""
"destination buffer must be a bytearray or array of type 'B' for bit_depth = 8"
msgstr ""
+#: shared-bindings/audioio/Mixer.c:94
+msgid "Invalid voice count"
+msgstr ""
+
+#: shared-bindings/audioio/Mixer.c:99
+msgid "Invalid channel count"
+msgstr ""
+
+#: shared-bindings/audioio/Mixer.c:103
+msgid "Sample rate must be positive"
+msgstr ""
+
+#: shared-bindings/audioio/Mixer.c:107
+msgid "bits_per_sample must be 8 or 16"
+msgstr ""
+
#: shared-bindings/audioio/RawSample.c:98
msgid ""
"sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or "
@@ -2149,10 +2217,6 @@ msgstr ""
msgid "Stream missing readinto() or write() method."
msgstr ""
-#: shared-bindings/network/__init__.c:79 shared-bindings/socket/__init__.c:428
-msgid "no available NIC"
-msgstr ""
-
#: shared-bindings/nvm/ByteArray.c:99
msgid "Slice and value different lengths."
msgstr ""
@@ -2180,7 +2244,7 @@ msgstr ""
#: shared-bindings/pulseio/PWMOut.c:195
msgid ""
-"PWM frequency not writeable when variable_frequency is False on construction."
+"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
#: shared-bindings/pulseio/PulseIn.c:275
@@ -2228,6 +2292,10 @@ msgstr ""
msgid "RTC calibration is not supported on this board"
msgstr ""
+#: shared-bindings/socket/__init__.c:428 shared-module/network/__init__.c:64
+msgid "no available NIC"
+msgstr ""
+
#: shared-bindings/storage/__init__.c:77
msgid "filesystem must provide mount method"
msgstr ""
@@ -2273,6 +2341,34 @@ msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
msgstr ""
+#: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117
+msgid "Couldn't allocate first buffer"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:53 shared-module/audioio/WaveFile.c:123
+msgid "Couldn't allocate second buffer"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:82
+msgid "Voice index too high"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:85
+msgid "The sample's sample rate does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:88
+msgid "The sample's channel count does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:91
+msgid "The sample's bits_per_sample does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:100
+msgid "The sample's signedness does not match the mixer's"
+msgstr ""
+
#: shared-module/audioio/WaveFile.c:61
msgid "Invalid wave file"
msgstr ""
@@ -2293,14 +2389,6 @@ msgstr ""
msgid "Invalid file"
msgstr ""
-#: shared-module/audioio/WaveFile.c:117
-msgid "Couldn't allocate first buffer"
-msgstr ""
-
-#: shared-module/audioio/WaveFile.c:123
-msgid "Couldn't allocate second buffer"
-msgstr ""
-
#: shared-module/bitbangio/I2C.c:58
msgid "Clock stretch too long"
msgstr ""
diff --git a/locale/es.po b/locale/es.po
index 2ce851769..df8803425 100644
--- a/locale/es.po
+++ b/locale/es.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-10-09 23:01+1100\n"
+"POT-Creation-Date: 2018-10-11 14:16+1100\n"
"PO-Revision-Date: 2018-08-24 22:56-0500\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -233,7 +233,7 @@ msgstr ""
msgid "soft reboot\n"
msgstr "reinicio suave\n"
-#: ports/atmel-samd/audio_dma.c:285
+#: ports/atmel-samd/audio_dma.c:209
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:361
msgid "All sync event channels in use"
msgstr "Todos los sync event channels están siendo utilizados"
@@ -428,7 +428,8 @@ msgstr "No se puede reiniciar en bootloader porque no hay bootloader presente."
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:120
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:369
-#: ports/nrf/common-hal/pulseio/PWMOut.c:227
+#: ports/nrf/common-hal/pulseio/PWMOut.c:120
+#: ports/nrf/common-hal/pulseio/PWMOut.c:233
msgid "Invalid PWM frequency"
msgstr "Frecuencia PWM inválida"
@@ -709,7 +710,7 @@ msgstr "parámetro config desconocido"
#: ports/nrf/common-hal/analogio/AnalogOut.c:37
msgid "AnalogOut functionality not supported"
-msgstr ""
+msgstr "Funcionalidad AnalogOut no soportada"
#: ports/nrf/common-hal/busio/I2C.c:95
msgid "All I2C peripherals are in use"
@@ -722,17 +723,15 @@ msgstr "Todos los timers están siendo utilizados"
#: ports/nrf/common-hal/busio/UART.c:48
#, c-format
msgid "error = 0x%08lX"
-msgstr ""
+msgstr "error = 0x%08lx"
#: ports/nrf/common-hal/busio/UART.c:86
-#, fuzzy
msgid "Invalid buffer size"
-msgstr "index dupterm inválido"
+msgstr "Tamaño de buffer inválido"
#: ports/nrf/common-hal/busio/UART.c:90
-#, fuzzy
msgid "Odd parity is not supported"
-msgstr "bytes > 8 bits no son soportados"
+msgstr "Paridad impar no soportada"
#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326
#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336
@@ -740,113 +739,118 @@ msgstr "bytes > 8 bits no son soportados"
#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356
#: ports/nrf/common-hal/busio/UART.c:364
msgid "busio.UART not available"
-msgstr ""
+msgstr "busio.UART no disponible"
#: ports/nrf/common-hal/microcontroller/Processor.c:49
#, c-format
msgid "Can not get temperature. status: 0x%02x"
-msgstr ""
+msgstr "No se puede obtener la temperatura. status: 0x%02x"
+
+#: ports/nrf/common-hal/pulseio/PWMOut.c:162
+#, fuzzy
+msgid "All PWM peripherals are in use"
+msgstr "Todos los timers están siendo utilizados"
#: ports/nrf/drivers/bluetooth/ble_drv.c:199
msgid "Cannot apply GAP parameters."
-msgstr ""
+msgstr "No se pueden aplicar los parámetros GAP."
#: ports/nrf/drivers/bluetooth/ble_drv.c:213
msgid "Cannot set PPCP parameters."
-msgstr ""
+msgstr "No se pueden establecer los parámetros PPCP."
#: ports/nrf/drivers/bluetooth/ble_drv.c:245
msgid "Can not query for the device address."
-msgstr ""
+msgstr "No se puede consultar la dirección del dispositivo."
#: ports/nrf/drivers/bluetooth/ble_drv.c:264
msgid "Can not add Vendor Specific 128-bit UUID."
-msgstr ""
+msgstr "No se puede agregar el UUID de 128-bits Especifico del Vendedor."
#: ports/nrf/drivers/bluetooth/ble_drv.c:284
#: ports/nrf/drivers/bluetooth/ble_drv.c:298
msgid "Can not add Service."
-msgstr ""
+msgstr "No se puede agregar el Servicio"
#: ports/nrf/drivers/bluetooth/ble_drv.c:373
msgid "Can not add Characteristic."
-msgstr ""
+msgstr "No se puede agregar la Característica"
#: ports/nrf/drivers/bluetooth/ble_drv.c:400
msgid "Can not apply device name in the stack."
-msgstr ""
+msgstr "No se puede aplicar el nombre del dispositivo en el stack."
#: ports/nrf/drivers/bluetooth/ble_drv.c:464
#: ports/nrf/drivers/bluetooth/ble_drv.c:514
msgid "Can not encode UUID, to check length."
-msgstr ""
+msgstr "No se puede codificar el UUID, para revisar la longitud."
#: ports/nrf/drivers/bluetooth/ble_drv.c:470
#: ports/nrf/drivers/bluetooth/ble_drv.c:520
msgid "Can encode UUID into the advertisement packet."
-msgstr ""
+msgstr "Se puede codificar el UUID en el paquete de anuncio."
#: ports/nrf/drivers/bluetooth/ble_drv.c:545
msgid "Can not fit data into the advertisement packet."
-msgstr ""
+msgstr "Los datos no caben en el paquete de anuncio."
#: ports/nrf/drivers/bluetooth/ble_drv.c:558
#: ports/nrf/drivers/bluetooth/ble_drv.c:604
#, c-format
msgid "Can not apply advertisement data. status: 0x%02x"
-msgstr ""
+msgstr "No se puede aplicar los datos de anuncio. status: 0x%02x"
#: ports/nrf/drivers/bluetooth/ble_drv.c:614
#, c-format
msgid "Can not start advertisement. status: 0x%02x"
-msgstr ""
+msgstr "No se puede inicar el anuncio. status: 0x%02x"
#: ports/nrf/drivers/bluetooth/ble_drv.c:631
#, c-format
msgid "Can not stop advertisement. status: 0x%02x"
-msgstr ""
+msgstr "No se puede detener el anuncio. status: 0x%02x"
#: ports/nrf/drivers/bluetooth/ble_drv.c:650
#: ports/nrf/drivers/bluetooth/ble_drv.c:726
#, c-format
msgid "Can not read attribute value. status: 0x%02x"
-msgstr ""
+msgstr "No se puede leer el valor del atributo. status 0x%02x"
#: ports/nrf/drivers/bluetooth/ble_drv.c:667
#: ports/nrf/drivers/bluetooth/ble_drv.c:756
#, c-format
msgid "Can not write attribute value. status: 0x%02x"
-msgstr ""
+msgstr "No se puede escribir el valor del atributo. status: 0x%02x"
#: ports/nrf/drivers/bluetooth/ble_drv.c:691
#, c-format
msgid "Can not notify attribute value. status: 0x%02x"
-msgstr ""
+msgstr "No se puede notificar el valor del anuncio. status: 0x%02x"
#: ports/nrf/drivers/bluetooth/ble_drv.c:784
#, c-format
msgid "Can not start scanning. status: 0x%02x"
-msgstr ""
+msgstr "No se puede iniciar el escaneo. status: 0x%02x"
#: ports/nrf/drivers/bluetooth/ble_drv.c:829
#, c-format
msgid "Can not connect. status: 0x%02x"
-msgstr ""
+msgstr "No se puede conectar. status: 0x%02x"
#: ports/nrf/modules/ubluepy/ubluepy_characteristic.c:68
#: ports/nrf/modules/ubluepy/ubluepy_service.c:80
#: ports/nrf/modules/ubluepy/ubluepy_service.c:132
#: ports/nrf/modules/ubluepy/ubluepy_uuid.c:137
msgid "Invalid UUID parameter"
-msgstr ""
+msgstr "Parámetro UUID inválido"
#: ports/nrf/modules/ubluepy/ubluepy_service.c:73
msgid "Invalid Service type"
-msgstr ""
+msgstr "Tipo de Servicio inválido"
#: ports/nrf/modules/ubluepy/ubluepy_uuid.c:127
msgid "Invalid UUID string length"
-msgstr ""
+msgstr "Longitud de string UUID inválida"
#: ports/unix/modffi.c:138
msgid "Unknown type"
@@ -1111,38 +1115,86 @@ msgstr ""
msgid "'data' requires integer arguments"
msgstr ""
-#: py/emitinlinextensa.c:86
-msgid "can only have up to 4 parameters to Xtensa assembly"
+#: py/emitinlinethumb.c:102
+msgid "can only have up to 4 parameters to Thumb assembly"
msgstr ""
-#: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96
-msgid "parameters must be registers in sequence a2 to a5"
+#: py/emitinlinethumb.c:107 py/emitinlinethumb.c:112
+msgid "parameters must be registers in sequence r0 to r3"
msgstr ""
-#: py/emitinlinextensa.c:162
+#: py/emitinlinethumb.c:188 py/emitinlinethumb.c:230
+#, c-format
+msgid "'%s' expects at most r%d"
+msgstr ""
+
+#: py/emitinlinethumb.c:197 py/emitinlinextensa.c:162
#, c-format
msgid "'%s' expects a register"
msgstr ""
-#: py/emitinlinextensa.c:169
+#: py/emitinlinethumb.c:211
+#, fuzzy, c-format
+msgid "'%s' expects a special register"
+msgstr "ord espera un carácter"
+
+#: py/emitinlinethumb.c:239
+#, c-format
+msgid "'%s' expects an FPU register"
+msgstr ""
+
+#: py/emitinlinethumb.c:292
+#, c-format
+msgid "'%s' expects {r0, r1, ...}"
+msgstr ""
+
+#: py/emitinlinethumb.c:299 py/emitinlinextensa.c:169
#, c-format
msgid "'%s' expects an integer"
msgstr ""
-#: py/emitinlinextensa.c:174
+#: py/emitinlinethumb.c:304
#, c-format
-msgid "'%s' integer %d is not within range %d..%d"
+msgid "'%s' integer 0x%x does not fit in mask 0x%x"
+msgstr ""
+
+#: py/emitinlinethumb.c:328
+#, c-format
+msgid "'%s' expects an address of the form [a, b]"
msgstr ""
-#: py/emitinlinextensa.c:182
+#: py/emitinlinethumb.c:334 py/emitinlinextensa.c:182
#, c-format
msgid "'%s' expects a label"
msgstr ""
-#: py/emitinlinextensa.c:193
+#: py/emitinlinethumb.c:345 py/emitinlinextensa.c:193
msgid "label '%q' not defined"
msgstr ""
+#: py/emitinlinethumb.c:806
+#, c-format
+msgid "unsupported Thumb instruction '%s' with %d arguments"
+msgstr ""
+
+#: py/emitinlinethumb.c:810
+#, fuzzy
+msgid "branch not in range"
+msgstr "El argumento de chr() no esta en el rango(256)"
+
+#: py/emitinlinextensa.c:86
+msgid "can only have up to 4 parameters to Xtensa assembly"
+msgstr ""
+
+#: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96
+msgid "parameters must be registers in sequence a2 to a5"
+msgstr ""
+
+#: py/emitinlinextensa.c:174
+#, c-format
+msgid "'%s' integer %d is not within range %d..%d"
+msgstr ""
+
#: py/emitinlinextensa.c:327
#, c-format
msgid "unsupported Xtensa instruction '%s' with %d arguments"
@@ -1636,7 +1688,7 @@ msgstr "struct: index fuera de rango"
#: py/objstr.c:1071
#, fuzzy
msgid "attributes not supported yet"
-msgstr "bytes > 8 bits no son soportados"
+msgstr "bytes > 8 bits no soportados"
#: py/objstr.c:1079
msgid ""
@@ -1818,7 +1870,6 @@ msgid "int() arg 2 must be >= 2 and <= 36"
msgstr ""
#: py/parsenum.c:151
-#, fuzzy
msgid "invalid syntax for integer"
msgstr "formato inválido"
@@ -1828,12 +1879,10 @@ msgid "invalid syntax for integer with base %d"
msgstr ""
#: py/parsenum.c:339
-#, fuzzy
msgid "invalid syntax for number"
msgstr "argumentos inválidos"
#: py/parsenum.c:342
-#, fuzzy
msgid "decimal numbers not supported"
msgstr "bytes > 8 bits no son soportados"
@@ -1848,7 +1897,6 @@ msgid "can only save bytecode"
msgstr ""
#: py/runtime.c:206
-#, fuzzy
msgid "name not defined"
msgstr "módulo no encontrado"
@@ -2025,6 +2073,26 @@ msgid ""
"destination buffer must be a bytearray or array of type 'B' for bit_depth = 8"
msgstr ""
+#: shared-bindings/audioio/Mixer.c:94
+#, fuzzy
+msgid "Invalid voice count"
+msgstr "Dirección inválida."
+
+#: shared-bindings/audioio/Mixer.c:99
+#, fuzzy
+msgid "Invalid channel count"
+msgstr "argumentos inválidos"
+
+#: shared-bindings/audioio/Mixer.c:103
+#, fuzzy
+msgid "Sample rate must be positive"
+msgstr "STA debe estar activo"
+
+#: shared-bindings/audioio/Mixer.c:107
+#, fuzzy
+msgid "bits_per_sample must be 8 or 16"
+msgstr "bits debe ser 8"
+
#: shared-bindings/audioio/RawSample.c:98
msgid ""
"sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or "
@@ -2196,10 +2264,6 @@ msgstr ""
msgid "Stream missing readinto() or write() method."
msgstr ""
-#: shared-bindings/network/__init__.c:79 shared-bindings/socket/__init__.c:428
-msgid "no available NIC"
-msgstr ""
-
#: shared-bindings/nvm/ByteArray.c:99
msgid "Slice and value different lengths."
msgstr ""
@@ -2227,7 +2291,7 @@ msgstr ""
#: shared-bindings/pulseio/PWMOut.c:195
msgid ""
-"PWM frequency not writeable when variable_frequency is False on construction."
+"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
#: shared-bindings/pulseio/PulseIn.c:275
@@ -2276,6 +2340,10 @@ msgstr ""
msgid "RTC calibration is not supported on this board"
msgstr ""
+#: shared-bindings/socket/__init__.c:428 shared-module/network/__init__.c:64
+msgid "no available NIC"
+msgstr ""
+
#: shared-bindings/storage/__init__.c:77
msgid "filesystem must provide mount method"
msgstr ""
@@ -2321,6 +2389,34 @@ msgid ""
"Object has been deinitialized and can no longer be used. Create a new object."
msgstr ""
+#: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117
+msgid "Couldn't allocate first buffer"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:53 shared-module/audioio/WaveFile.c:123
+msgid "Couldn't allocate second buffer"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:82
+msgid "Voice index too high"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:85
+msgid "The sample's sample rate does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:88
+msgid "The sample's channel count does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:91
+msgid "The sample's bits_per_sample does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:100
+msgid "The sample's signedness does not match the mixer's"
+msgstr ""
+
#: shared-module/audioio/WaveFile.c:61
msgid "Invalid wave file"
msgstr ""
@@ -2341,14 +2437,6 @@ msgstr ""
msgid "Invalid file"
msgstr ""
-#: shared-module/audioio/WaveFile.c:117
-msgid "Couldn't allocate first buffer"
-msgstr ""
-
-#: shared-module/audioio/WaveFile.c:123
-msgid "Couldn't allocate second buffer"
-msgstr ""
-
#: shared-module/bitbangio/I2C.c:58
msgid "Clock stretch too long"
msgstr ""
@@ -2416,3 +2504,6 @@ msgstr ""
#: shared-module/struct/__init__.c:83
msgid "too many arguments provided with the given format"
msgstr ""
+
+#~ msgid "Baud rate too high for this SPI peripheral"
+#~ msgstr "Baud rate demasiado alto para este periférico SPI"
diff --git a/locale/fil.po b/locale/fil.po
index 20a820445..6fe9adfe6 100644
--- a/locale/fil.po
+++ b/locale/fil.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-10-09 23:01+1100\n"
+"POT-Creation-Date: 2018-10-11 14:16+1100\n"
"PO-Revision-Date: 2018-08-30 23:04-0700\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\n"
"Language-Team: fil\n"
@@ -230,7 +230,7 @@ msgstr ""
msgid "soft reboot\n"
msgstr "malambot na reboot\n"
-#: ports/atmel-samd/audio_dma.c:285
+#: ports/atmel-samd/audio_dma.c:209
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:361
msgid "All sync event channels in use"
msgstr "Lahat ng sync event channels ay ginagamit"
@@ -425,7 +425,8 @@ msgstr "Hindi ma-reset sa bootloader dahil walang bootloader."
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:120
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:369
-#: ports/nrf/common-hal/pulseio/PWMOut.c:227
+#: ports/nrf/common-hal/pulseio/PWMOut.c:120
+#: ports/nrf/common-hal/pulseio/PWMOut.c:233
msgid "Invalid PWM frequency"
msgstr "Mali ang PWM frequency"
@@ -747,6 +748,11 @@ msgstr ""
msgid "Can not get temperature. status: 0x%02x"
msgstr "Hindi makuha ang temperatura. status 0x%02x"
+#: ports/nrf/common-hal/pulseio/PWMOut.c:162
+#, fuzzy
+msgid "All PWM peripherals are in use"
+msgstr "Lahat ng timer ginagamit"
+
#: ports/nrf/drivers/bluetooth/ble_drv.c:199
msgid "Cannot apply GAP parameters."
msgstr "Hindi ma-apply ang GAP parameters."
@@ -1114,38 +1120,88 @@ msgstr "'data' kailangan ng hindi bababa sa 2 argument"
msgid "'data' requires integer arguments"
msgstr "'data' kailangan ng integer arguments"
-#: py/emitinlinextensa.c:86
-msgid "can only have up to 4 parameters to Xtensa assembly"
+#: py/emitinlinethumb.c:102
+#, fuzzy
+msgid "can only have up to 4 parameters to Thumb assembly"
msgstr "maaari lamang magkaroon ng hanggang 4 na parameter sa Xtensa assembly"
-#: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96
-msgid "parameters must be registers in sequence a2 to a5"
+#: py/emitinlinethumb.c:107 py/emitinlinethumb.c:112
+#, fuzzy
+msgid "parameters must be registers in sequence r0 to r3"
msgstr "ang mga parameter ay dapat na nagrerehistro sa sequence a2 hanggang a5"
-#: py/emitinlinextensa.c:162
+#: py/emitinlinethumb.c:188 py/emitinlinethumb.c:230
+#, fuzzy, c-format
+msgid "'%s' expects at most r%d"
+msgstr "Inaasahan ng '%s' ang isang rehistro"
+
+#: py/emitinlinethumb.c:197 py/emitinlinextensa.c:162
#, c-format
msgid "'%s' expects a register"
msgstr "Inaasahan ng '%s' ang isang rehistro"
-#: py/emitinlinextensa.c:169
+#: py/emitinlinethumb.c:211
+#, fuzzy, c-format
+msgid "'%s' expects a special register"
+msgstr "Inaasahan ng '%s' ang isang rehistro"
+
+#: py/emitinlinethumb.c:239
+#, fuzzy, c-format
+msgid "'%s' expects an FPU register"
+msgstr "Inaasahan ng '%s' ang isang rehistro"
+
+#: py/emitinlinethumb.c:292
+#, fuzzy, c-format
+msgid "'%s' expects {r0, r1, ...}"
+msgstr "Inaasahan ng '%s' ang isang rehistro"
+
+#: py/emitinlinethumb.c:299 py/emitinlinextensa.c:169
#, c-format
msgid "'%s' expects an integer"
msgstr "Inaasahan ng '%s' ang isang integer"
-#: py/emitinlinextensa.c:174
-#, c-format
-msgid "'%s' integer %d is not within range %d..%d"
+#: py/emitinlinethumb.c:304
+#, fuzzy, c-format
+msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "'%s' integer %d ay wala sa sakop ng %d..%d"
-#: py/emitinlinextensa.c:182
+#: py/emitinlinethumb.c:328
+#, fuzzy, c-format
+msgid "'%s' expects an address of the form [a, b]"
+msgstr "Inaasahan ng '%s' ang isang rehistro"
+
+#: py/emitinlinethumb.c:334 py/emitinlinextensa.c:182
#, c-format
msgid "'%s' expects a label"
msgstr "'%s' umaasa ng label"
-#: py/emitinlinextensa.c:193
+#: py/emitinlinethumb.c:345 py/emitinlinextensa.c:193
msgid "label '%q' not defined"
msgstr "label '%d' kailangan na i-define"
+#: py/emitinlinethumb.c:806
+#, fuzzy, c-format
+msgid "unsupported Thumb instruction '%s' with %d arguments"
+msgstr "hindi sinusuportahan ang instruction ng Xtensa '%s' sa %d argumento"
+
+#: py/emitinlinethumb.c:810
+#, fuzzy
+msgid "branch not in range"
+msgstr "chr() arg wala sa sakop ng range(256)"
+
+#: py/emitinlinextensa.c:86
+msgid "can only have up to 4 parameters to Xtensa assembly"
+msgstr "maaari lamang magkaroon ng hanggang 4 na parameter sa Xtensa assembly"
+
+#: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96
+msgid "parameters must be registers in sequence a2 to a5"
+msgstr "ang mga parameter ay dapat na nagrerehistro sa sequence a2 hanggang a5"
+
+#: py/emitinlinextensa.c:174
+#, c-format
+msgid "'%s' integer %d is not within range %d..%d"
+msgstr "'%s' integer %d ay wala sa sakop ng %d..%d"
+
#: py/emitinlinextensa.c:327
#, c-format
msgid "unsupported Xtensa instruction '%s' with %d arguments"
@@ -2019,6 +2075,26 @@ msgstr ""
"ang destination buffer ay dapat na isang bytearray o array ng uri na 'B' "
"para sa bit_depth = 8"
+#: shared-bindings/audioio/Mixer.c:94
+#, fuzzy
+msgid "Invalid voice count"
+msgstr "Mali ang tipo ng serbisyo"
+
+#: shared-bindings/audioio/Mixer.c:99
+#, fuzzy
+msgid "Invalid channel count"
+msgstr "Maling argumento"
+
+#: shared-bindings/audioio/Mixer.c:103
+#, fuzzy
+msgid "Sample rate must be positive"
+msgstr "Dapat aktibo ang STA"
+
+#: shared-bindings/audioio/Mixer.c:107
+#, fuzzy
+msgid "bits_per_sample must be 8 or 16"
+msgstr "bits ay dapat 7, 8 o 9"
+
#: shared-bindings/audioio/RawSample.c:98
msgid ""
"sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or "
@@ -2205,10 +2281,6 @@ msgstr "Mali ang run mode."
msgid "Stream missing readinto() or write() method."
msgstr "Stream kulang ng readinto() o write() method."
-#: shared-bindings/network/__init__.c:79 shared-bindings/socket/__init__.c:428
-msgid "no available NIC"
-msgstr ""
-
#: shared-bindings/nvm/ByteArray.c:99
msgid "Slice and value different lengths."
msgstr "Slice at value iba't ibang haba."
@@ -2235,8 +2307,9 @@ msgid ""
msgstr "PWM duty_cycle ay dapat sa loob ng 0 at 65535 (16 bit resolution)"
#: shared-bindings/pulseio/PWMOut.c:195
+#, fuzzy
msgid ""
-"PWM frequency not writeable when variable_frequency is False on construction."
+"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
"PWM frequency hindi maisulat kapag variable_frequency ay False sa pag buo."
@@ -2285,6 +2358,10 @@ msgstr "Hindi supportado ang RTC sa board na ito"
msgid "RTC calibration is not supported on this board"
msgstr "RTC calibration ay hindi supportado ng board na ito"
+#: shared-bindings/socket/__init__.c:428 shared-module/network/__init__.c:64
+msgid "no available NIC"
+msgstr ""
+
#: shared-bindings/storage/__init__.c:77
msgid "filesystem must provide mount method"
msgstr "ang filesystem dapat mag bigay ng mount method"
@@ -2332,6 +2409,34 @@ msgstr ""
"Object ay deinitialized at hindi na magagamit. Lumikha ng isang bagong "
"Object."
+#: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117
+msgid "Couldn't allocate first buffer"
+msgstr "Hindi ma-iallocate ang first buffer"
+
+#: shared-module/audioio/Mixer.c:53 shared-module/audioio/WaveFile.c:123
+msgid "Couldn't allocate second buffer"
+msgstr "Hindi ma-iallocate ang second buffer"
+
+#: shared-module/audioio/Mixer.c:82
+msgid "Voice index too high"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:85
+msgid "The sample's sample rate does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:88
+msgid "The sample's channel count does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:91
+msgid "The sample's bits_per_sample does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:100
+msgid "The sample's signedness does not match the mixer's"
+msgstr ""
+
#: shared-module/audioio/WaveFile.c:61
msgid "Invalid wave file"
msgstr "May hindi tama sa wave file"
@@ -2352,14 +2457,6 @@ msgstr "Dapat sunurin ng Data chunk ang fmt chunk"
msgid "Invalid file"
msgstr "Mali ang file"
-#: shared-module/audioio/WaveFile.c:117
-msgid "Couldn't allocate first buffer"
-msgstr "Hindi ma-iallocate ang first buffer"
-
-#: shared-module/audioio/WaveFile.c:123
-msgid "Couldn't allocate second buffer"
-msgstr "Hindi ma-iallocate ang second buffer"
-
#: shared-module/bitbangio/I2C.c:58
msgid "Clock stretch too long"
msgstr "Masyadong mahaba ang Clock stretch"
diff --git a/locale/fr.po b/locale/fr.po
index f92a98200..a7b779ddb 100644
--- a/locale/fr.po
+++ b/locale/fr.po
@@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-10-09 23:01+1100\n"
+"POT-Creation-Date: 2018-10-11 14:17+1100\n"
"PO-Revision-Date: 2018-08-14 11:01+0200\n"
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n"
"Language-Team: fr\n"
@@ -225,7 +225,7 @@ msgstr "Appuyez sur une touche pour entrer sur REPL ou CTRL-D pour recharger."
msgid "soft reboot\n"
msgstr "redémarrage logiciel\n"
-#: ports/atmel-samd/audio_dma.c:285
+#: ports/atmel-samd/audio_dma.c:209
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:361
msgid "All sync event channels in use"
msgstr "Tous les canaux d'événements de synchro sont utilisés"
@@ -421,7 +421,8 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:120
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:369
-#: ports/nrf/common-hal/pulseio/PWMOut.c:227
+#: ports/nrf/common-hal/pulseio/PWMOut.c:120
+#: ports/nrf/common-hal/pulseio/PWMOut.c:233
msgid "Invalid PWM frequency"
msgstr "Fréquence de PWM invalide"
@@ -744,6 +745,11 @@ msgstr "busio.UART n'est pas disponible"
msgid "Can not get temperature. status: 0x%02x"
msgstr "Impossible de lire la température. status: 0x%02x"
+#: ports/nrf/common-hal/pulseio/PWMOut.c:162
+#, fuzzy
+msgid "All PWM peripherals are in use"
+msgstr "Tous les timers sont utilisés"
+
#: ports/nrf/drivers/bluetooth/ble_drv.c:199
msgid "Cannot apply GAP parameters."
msgstr "Impossible d'appliquer les paramètres GAP"
@@ -1108,38 +1114,87 @@ msgstr "'data' nécessite au moins 2 arguments"
msgid "'data' requires integer arguments"
msgstr "'data' nécessite des arguments entiers"
-#: py/emitinlinextensa.c:86
-msgid "can only have up to 4 parameters to Xtensa assembly"
+#: py/emitinlinethumb.c:102
+msgid "can only have up to 4 parameters to Thumb assembly"
msgstr ""
-#: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96
-msgid "parameters must be registers in sequence a2 to a5"
+#: py/emitinlinethumb.c:107 py/emitinlinethumb.c:112
+#, fuzzy
+msgid "parameters must be registers in sequence r0 to r3"
msgstr "les paramètres doivent être des registres dans la séquence a2 à a5"
-#: py/emitinlinextensa.c:162
+#: py/emitinlinethumb.c:188 py/emitinlinethumb.c:230
+#, fuzzy, c-format
+msgid "'%s' expects at most r%d"
+msgstr "'%s' attend un registre"
+
+#: py/emitinlinethumb.c:197 py/emitinlinextensa.c:162
#, c-format
msgid "'%s' expects a register"
msgstr "'%s' attend un registre"
-#: py/emitinlinextensa.c:169
+#: py/emitinlinethumb.c:211
+#, fuzzy, c-format
+msgid "'%s' expects a special register"
+msgstr "'%s' attend un registre"
+
+#: py/emitinlinethumb.c:239
+#, fuzzy, c-format
+msgid "'%s' expects an FPU register"
+msgstr "'%s' attend un registre"
+
+#: py/emitinlinethumb.c:292
+#, fuzzy, c-format
+msgid "'%s' expects {r0, r1, ...}"
+msgstr "'%s' attend un registre"
+
+#: py/emitinlinethumb.c:299 py/emitinlinextensa.c:169
#, c-format
msgid "'%s' expects an integer"
msgstr "'%s' attend un entier"
-#: py/emitinlinextensa.c:174
-#, c-format
-msgid "'%s' integer %d is not within range %d..%d"
+#: py/emitinlinethumb.c:304
+#, fuzzy, c-format
+msgid "'%s' integer 0x%x does not fit in mask 0x%x"
msgstr "'%s' l'entier %d n'est pas dans la gamme %d..%d"
-#: py/emitinlinextensa.c:182
+#: py/emitinlinethumb.c:328
+#, fuzzy, c-format
+msgid "'%s' expects an address of the form [a, b]"
+msgstr "'%s' attend un registre"
+
+#: py/emitinlinethumb.c:334 py/emitinlinextensa.c:182
#, c-format
msgid "'%s' expects a label"
msgstr "'%s' attend un label"
-#: py/emitinlinextensa.c:193
+#: py/emitinlinethumb.c:345 py/emitinlinextensa.c:193
msgid "label '%q' not defined"
msgstr "label '%q' non supporté"
+#: py/emitinlinethumb.c:806
+#, fuzzy, c-format
+msgid "unsupported Thumb instruction '%s' with %d arguments"
+msgstr "instruction Xtensa '%s' non supportée avec %d arguments"
+
+#: py/emitinlinethumb.c:810
+#, fuzzy
+msgid "branch not in range"
+msgstr "argument de chr() hors de la gamme range(256)"
+
+#: py/emitinlinextensa.c:86
+msgid "can only have up to 4 parameters to Xtensa assembly"
+msgstr ""
+
+#: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96
+msgid "parameters must be registers in sequence a2 to a5"
+msgstr "les paramètres doivent être des registres dans la séquence a2 à a5"
+
+#: py/emitinlinextensa.c:174
+#, c-format
+msgid "'%s' integer %d is not within range %d..%d"
+msgstr "'%s' l'entier %d n'est pas dans la gamme %d..%d"
+
#: py/emitinlinextensa.c:327
#, c-format
msgid "unsupported Xtensa instruction '%s' with %d arguments"
@@ -2011,6 +2066,26 @@ msgid ""
msgstr ""
"le tampon de destination doit être un tableau de type 'B' pour bit_depth = 8"
+#: shared-bindings/audioio/Mixer.c:94
+#, fuzzy
+msgid "Invalid voice count"
+msgstr "Type de service invalide"
+
+#: shared-bindings/audioio/Mixer.c:99
+#, fuzzy
+msgid "Invalid channel count"
+msgstr "Argument invalide"
+
+#: shared-bindings/audioio/Mixer.c:103
+#, fuzzy
+msgid "Sample rate must be positive"
+msgstr "'STA' doit être actif"
+
+#: shared-bindings/audioio/Mixer.c:107
+#, fuzzy
+msgid "bits_per_sample must be 8 or 16"
+msgstr "bits doivent être 7, 8 ou 9"
+
#: shared-bindings/audioio/RawSample.c:98
msgid ""
"sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or "
@@ -2199,11 +2274,6 @@ msgstr "Mode de lancement invalide"
msgid "Stream missing readinto() or write() method."
msgstr "Il manque une méthode readinto() ou write() au flux."
-#: shared-bindings/network/__init__.c:79 shared-bindings/socket/__init__.c:428
-#, fuzzy
-msgid "no available NIC"
-msgstr "busio.UART n'est pas disponible"
-
#: shared-bindings/nvm/ByteArray.c:99
msgid "Slice and value different lengths."
msgstr "Slice et valeur de tailles différentes"
@@ -2232,8 +2302,9 @@ msgstr ""
"bits)"
#: shared-bindings/pulseio/PWMOut.c:195
+#, fuzzy
msgid ""
-"PWM frequency not writeable when variable_frequency is False on construction."
+"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
"La fréquence de PWM n'est pas modifiable quand variable_frequency est False "
"à laconstruction."
@@ -2283,6 +2354,11 @@ msgstr "RTC non supportée sur cette carte"
msgid "RTC calibration is not supported on this board"
msgstr "calibration de la RTC non supportée sur cette carte"
+#: shared-bindings/socket/__init__.c:428 shared-module/network/__init__.c:64
+#, fuzzy
+msgid "no available NIC"
+msgstr "busio.UART n'est pas disponible"
+
#: shared-bindings/storage/__init__.c:77
msgid "filesystem must provide mount method"
msgstr "le system de fichier doit fournir une méthode 'mount'"
@@ -2330,6 +2406,34 @@ msgstr ""
"L'objet a été désinitialisé et ne peut plus être utilisé. Créez un nouvel "
"objet."
+#: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117
+msgid "Couldn't allocate first buffer"
+msgstr "Impossible d'allouer le 1er tampon"
+
+#: shared-module/audioio/Mixer.c:53 shared-module/audioio/WaveFile.c:123
+msgid "Couldn't allocate second buffer"
+msgstr "Impossible d'allouer le 2e tampon"
+
+#: shared-module/audioio/Mixer.c:82
+msgid "Voice index too high"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:85
+msgid "The sample's sample rate does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:88
+msgid "The sample's channel count does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:91
+msgid "The sample's bits_per_sample does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:100
+msgid "The sample's signedness does not match the mixer's"
+msgstr ""
+
#: shared-module/audioio/WaveFile.c:61
msgid "Invalid wave file"
msgstr "Fichier WAVE invalide"
@@ -2350,14 +2454,6 @@ msgstr "Un bloc de données doit suivre un bloc de format"
msgid "Invalid file"
msgstr "Fichier invalide"
-#: shared-module/audioio/WaveFile.c:117
-msgid "Couldn't allocate first buffer"
-msgstr "Impossible d'allouer le 1er tampon"
-
-#: shared-module/audioio/WaveFile.c:123
-msgid "Couldn't allocate second buffer"
-msgstr "Impossible d'allouer le 2e tampon"
-
#: shared-module/bitbangio/I2C.c:58
msgid "Clock stretch too long"
msgstr "Période de l'horloge trop longue"
@@ -2427,9 +2523,9 @@ msgid "too many arguments provided with the given format"
msgstr "trop d'arguments fournis avec ce format"
#, fuzzy
-#~ msgid "value_size must be power of two"
-#~ msgstr "'len' doit être un multiple de 4"
-
-#, fuzzy
#~ msgid "palette must be displayio.Palette"
#~ msgstr "la palette doit être longue de 32 octets"
+
+#, fuzzy
+#~ msgid "value_size must be power of two"
+#~ msgstr "'len' doit être un multiple de 4"
diff --git a/locale/it_IT.po b/locale/it_IT.po
new file mode 100644
index 000000000..907e9f8d1
--- /dev/null
+++ b/locale/it_IT.po
@@ -0,0 +1,2511 @@
+# Italian translation.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# Enrico Paganin <enrico.paganin@mail.com>, 2018
+#
+#, fuzzy
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2018-10-11 14:15+1100\n"
+"PO-Revision-Date: 2018-10-02 16:27+0200\n"
+"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
+"Language-Team: \n"
+"Language: it_IT\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: extmod/machine_i2c.c:299
+msgid "invalid I2C peripheral"
+msgstr "periferica I2C invalida"
+
+#: extmod/machine_i2c.c:340 extmod/machine_i2c.c:354 extmod/machine_i2c.c:368
+#: extmod/machine_i2c.c:392
+msgid "I2C operation not supported"
+msgstr "operazione I2C non supportata"
+
+#: extmod/machine_mem.c:45 ports/unix/modmachine.c:53
+#, c-format
+msgid "address %08x is not aligned to %d bytes"
+msgstr "l'indirizzo %08x non è allineato a %d bytes"
+
+#: extmod/machine_spi.c:57
+msgid "invalid SPI peripheral"
+msgstr "periferica SPI invalida"
+
+#: extmod/machine_spi.c:124
+msgid "buffers must be the same length"
+msgstr "i buffer devono essere della stessa lunghezza"
+
+#: extmod/machine_spi.c:207
+msgid "bits must be 8"
+msgstr "i bit devono essere 8"
+
+#: extmod/machine_spi.c:210
+msgid "firstbit must be MSB"
+msgstr "il primo bit deve essere il più significativo (MSB)"
+
+#: extmod/machine_spi.c:215
+msgid "must specify all of sck/mosi/miso"
+msgstr "è necessario specificare tutte le sck/mosi/miso"
+
+#: extmod/modframebuf.c:299
+msgid "invalid format"
+msgstr "formato non valido"
+
+#: extmod/modubinascii.c:38 extmod/moduhashlib.c:102
+msgid "a bytes-like object is required"
+msgstr "un oggetto byte-like è richiesto"
+
+#: extmod/modubinascii.c:90
+msgid "odd-length string"
+msgstr "stringa di lunghezza dispari"
+
+#: extmod/modubinascii.c:101
+msgid "non-hex digit found"
+msgstr "trovata cifra non esadecimale"
+
+#: extmod/modubinascii.c:169
+msgid "incorrect padding"
+msgstr "padding incorretto"
+
+#: extmod/moductypes.c:122
+msgid "syntax error in uctypes descriptor"
+msgstr "errore di sintassi nel descrittore uctypes"
+
+#: extmod/moductypes.c:219
+msgid "Cannot unambiguously get sizeof scalar"
+msgstr "Impossibile ricavare la grandezza scalare di sizeof inequivocabilmente"
+
+#: extmod/moductypes.c:397
+msgid "struct: no fields"
+msgstr "struct: nessun campo"
+
+#: extmod/moductypes.c:530
+msgid "struct: cannot index"
+msgstr "struct: impossibile indicizzare"
+
+#: extmod/moductypes.c:544
+msgid "struct: index out of range"
+msgstr "struct: indice fuori intervallo"
+
+#: extmod/moduheapq.c:38
+msgid "heap must be a list"
+msgstr "l'heap deve essere una lista"
+
+#: extmod/moduheapq.c:86 extmod/modutimeq.c:147 extmod/modutimeq.c:172
+msgid "empty heap"
+msgstr "heap vuoto"
+
+#: extmod/modujson.c:281
+msgid "syntax error in JSON"
+msgstr "errore di sintassi nel JSON"
+
+#: extmod/modure.c:161
+msgid "Splitting with sub-captures"
+msgstr "Suddivisione con sotto-catture"
+
+#: extmod/modure.c:207
+msgid "Error in regex"
+msgstr "Errore nella regex"
+
+#: extmod/modussl_axtls.c:81
+msgid "invalid key"
+msgstr "chiave non valida"
+
+#: extmod/modussl_axtls.c:87
+msgid "invalid cert"
+msgstr "certificato non valido"
+
+#: extmod/modutimeq.c:131
+msgid "queue overflow"
+msgstr "overflow della coda"
+
+#: extmod/moduzlib.c:98
+msgid "compression header"
+msgstr "compressione dell'header"
+
+#: extmod/uos_dupterm.c:120
+msgid "invalid dupterm index"
+msgstr "indice dupterm non valido"
+
+#: extmod/vfs_fat.c:426 py/moduerrno.c:150
+msgid "Read-only filesystem"
+msgstr "Filesystem in sola lettura"
+
+#: extmod/vfs_posix_file.c:48 ports/unix/file.c:50 py/objstringio.c:43
+msgid "I/O operation on closed file"
+msgstr "operazione I/O su file chiuso"
+
+#: lib/embed/abort_.c:8
+msgid "abort() called"
+msgstr "abort() chiamato"
+
+#: lib/netutils/netutils.c:83
+msgid "invalid arguments"
+msgstr "argomenti non validi"
+
+#: lib/utils/pyexec.c:97 py/builtinimport.c:253
+msgid "script compilation not supported"
+msgstr "compilazione dello scrip non suportata"
+
+#: main.c:153
+msgid " output:\n"
+msgstr " output:\n"
+
+#: main.c:167 main.c:240
+msgid ""
+"Auto-reload is on. Simply save files over USB to run them or enter REPL to "
+"disable.\n"
+msgstr ""
+"L'auto-reload è attivo. Salva i file su USB per eseguirli o entra nel REPL "
+"per disabilitarlo.\n"
+
+#: main.c:169
+msgid "Running in safe mode! Auto-reload is off.\n"
+msgstr "Modalità sicura in esecuzione! Auto-reload disattivato.\n"
+
+#: main.c:171 main.c:242
+msgid "Auto-reload is off.\n"
+msgstr "Auto-reload disattivato.\n"
+
+#: main.c:185
+msgid "Running in safe mode! Not running saved code.\n"
+msgstr "Modalità sicura in esecuzione! Codice salvato non in esecuzione.\n"
+
+#: main.c:201
+msgid "WARNING: Your code filename has two extensions\n"
+msgstr "ATTENZIONE: Il nome del sorgente ha due estensioni\n"
+
+#: main.c:249
+msgid "You requested starting safe mode by "
+msgstr "È stato richiesto l'avvio in modalità sicura da "
+
+#: main.c:252
+msgid "To exit, please reset the board without "
+msgstr "Per uscire resettare la scheda senza "
+
+#: main.c:259
+msgid ""
+"You are running in safe mode which means something really bad happened.\n"
+msgstr ""
+"Sei nella modalità sicura che significa che qualcosa di molto brutto è "
+"successo.\n"
+
+#: main.c:261
+msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
+msgstr ""
+"Sembra che il codice del core di CircuitPython sia crashato malamente. "
+"Whoops!\n"
+
+#: main.c:262
+msgid "Please file an issue here with the contents of your CIRCUITPY drive:\n"
+msgstr ""
+"Ti preghiamo di compilare una issue con il contenuto del tuo drie "
+"CIRCUITPY:\n"
+
+#: main.c:265
+msgid ""
+"The microcontroller's power dipped. Please make sure your power supply "
+"provides\n"
+msgstr ""
+"La potenza del microcontrollore è calata. Assicurati che l'alimentazione sia "
+"attaccata correttamente\n"
+
+#: main.c:266
+msgid ""
+"enough power for the whole circuit and press reset (after ejecting "
+"CIRCUITPY).\n"
+msgstr ""
+"abbastanza potenza per l'intero circuito e premere reset (dopo aver espulso "
+"CIRCUITPY).\n"
+
+#: main.c:270
+msgid "Press any key to enter the REPL. Use CTRL-D to reload."
+msgstr ""
+"Premi un qualunque tasto per entrare nel REPL. Usa CTRL-D per ricaricare."
+
+#: main.c:426
+msgid "soft reboot\n"
+msgstr "soft reboot\n"
+
+#: ports/atmel-samd/audio_dma.c:209
+#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:361
+msgid "All sync event channels in use"
+msgstr "Tutti i canali di eventi sincronizzati in uso"
+
+#: ports/atmel-samd/bindings/samd/Clock.c:135
+msgid "calibration is read only"
+msgstr "la calibrazione è in sola lettura"
+
+#: ports/atmel-samd/bindings/samd/Clock.c:137
+msgid "calibration is out of range"
+msgstr "la calibrazione è fuori intervallo"
+
+#: ports/atmel-samd/board_busses.c:59 ports/nrf/board_busses.c:39
+msgid "No default I2C bus"
+msgstr "Nessun bus I2C predefinito"
+
+#: ports/atmel-samd/board_busses.c:85 ports/nrf/board_busses.c:64
+msgid "No default SPI bus"
+msgstr "Nessun bus SPI predefinito"
+
+#: ports/atmel-samd/board_busses.c:112 ports/nrf/board_busses.c:91
+msgid "No default UART bus"
+msgstr "Nessun bus UART predefinito"
+
+#: ports/atmel-samd/common-hal/analogio/AnalogIn.c:63
+#: ports/nrf/common-hal/analogio/AnalogIn.c:39
+msgid "Pin does not have ADC capabilities"
+msgstr "Il pin non ha capacità di ADC"
+
+#: ports/atmel-samd/common-hal/analogio/AnalogOut.c:49
+msgid "No DAC on chip"
+msgstr "Nessun DAC sul chip"
+
+#: ports/atmel-samd/common-hal/analogio/AnalogOut.c:56
+msgid "AnalogOut not supported on given pin"
+msgstr "AnalogOut non supportato sul pin scelto"
+
+#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:147
+#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:150
+msgid "Invalid bit clock pin"
+msgstr "Pin del clock di bit non valido"
+
+#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:153
+msgid "Bit clock and word select must share a clock unit"
+msgstr ""
+"Clock di bit e selezione parola devono condividere la stessa unità di clock"
+
+#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:156
+#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:130
+msgid "Invalid data pin"
+msgstr "Pin dati non valido"
+
+#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:169
+#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:174
+#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:145
+#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:150
+msgid "Serializer in use"
+msgstr "Serializer in uso"
+
+#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:230
+msgid "Clock unit in use"
+msgstr "Unità di clock in uso"
+
+#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:240
+#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:172
+msgid "Unable to find free GCLK"
+msgstr "Impossibile trovare un GCLK libero"
+
+#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:254
+msgid "Too many channels in sample."
+msgstr ""
+
+#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:305
+#: ports/atmel-samd/common-hal/audioio/AudioOut.c:339
+msgid "No DMA channel found"
+msgstr "Nessun canale DMA trovato"
+
+#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c:308
+#: ports/atmel-samd/common-hal/audioio/AudioOut.c:341
+msgid "Unable to allocate buffers for signed conversion"
+msgstr "Ipossibilitato ad allocare buffer per la conversione con segno"
+
+#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:109
+msgid "Invalid clock pin"
+msgstr "Pin di clock non valido"
+
+#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:134
+msgid "Only 8 or 16 bit mono with "
+msgstr ""
+
+#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:167
+msgid "sampling rate out of range"
+msgstr "frequenza di campionamento fuori intervallo"
+
+#: ports/atmel-samd/common-hal/audioio/AudioOut.c:69
+msgid "DAC already in use"
+msgstr "DAC già in uso"
+
+#: ports/atmel-samd/common-hal/audioio/AudioOut.c:73
+msgid "Right channel unsupported"
+msgstr "Canale destro non supportato"
+
+#: ports/atmel-samd/common-hal/audioio/AudioOut.c:76
+#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:116
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c:65
+msgid "Invalid pin"
+msgstr "Pin non valido"
+
+#: ports/atmel-samd/common-hal/audioio/AudioOut.c:84
+msgid "Invalid pin for left channel"
+msgstr "Pin non valido per il canale sinistro"
+
+#: ports/atmel-samd/common-hal/audioio/AudioOut.c:88
+msgid "Invalid pin for right channel"
+msgstr "Pin non valido per il canale destro"
+
+#: ports/atmel-samd/common-hal/audioio/AudioOut.c:91
+msgid "Cannot output both channels on the same pin"
+msgstr "Impossibile dare in output entrambi i canal sullo stesso pin"
+
+#: ports/atmel-samd/common-hal/audioio/AudioOut.c:176
+#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:189
+#: ports/atmel-samd/common-hal/pulseio/PulseOut.c:110
+msgid "All timers in use"
+msgstr "Tutti i timer utilizzati"
+
+#: ports/atmel-samd/common-hal/audioio/AudioOut.c:218
+msgid "All event channels in use"
+msgstr "Tutti i canali eventi utilizati"
+
+#: ports/atmel-samd/common-hal/audioio/AudioOut.c:297
+#, c-format
+msgid "Sample rate too high. It must be less than %d"
+msgstr ""
+"Frequenza di campionamento troppo alta. Il valore deve essere inferiore a %d"
+
+#: ports/atmel-samd/common-hal/busio/I2C.c:71
+msgid "Not enough pins available"
+msgstr "Non sono presenti abbastanza pin"
+
+#: ports/atmel-samd/common-hal/busio/I2C.c:78
+#: ports/atmel-samd/common-hal/busio/SPI.c:132
+#: ports/atmel-samd/common-hal/busio/UART.c:119
+#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45
+#: ports/nrf/common-hal/busio/I2C.c:81
+msgid "Invalid pins"
+msgstr "Pin non validi"
+
+#: ports/atmel-samd/common-hal/busio/I2C.c:101
+msgid "SDA or SCL needs a pull up"
+msgstr "SDA o SCL necessitano un pull-up"
+
+#: ports/atmel-samd/common-hal/busio/I2C.c:121
+msgid "Unsupported baudrate"
+msgstr "baudrate non supportato"
+
+#: ports/atmel-samd/common-hal/busio/UART.c:66
+msgid "bytes > 8 bits not supported"
+msgstr "byte > 8 bit non supportati"
+
+#: ports/atmel-samd/common-hal/busio/UART.c:72
+#: ports/nrf/common-hal/busio/UART.c:82
+msgid "tx and rx cannot both be None"
+msgstr "tx e rx non possono essere entrambi None"
+
+#: ports/atmel-samd/common-hal/busio/UART.c:145
+#: ports/nrf/common-hal/busio/UART.c:115
+msgid "Failed to allocate RX buffer"
+msgstr "Impossibile allocare buffer RX"
+
+#: ports/atmel-samd/common-hal/busio/UART.c:153
+msgid "Could not initialize UART"
+msgstr "Impossibile inizializzare l'UART"
+
+#: ports/atmel-samd/common-hal/busio/UART.c:240
+#: ports/nrf/common-hal/busio/UART.c:149
+msgid "No RX pin"
+msgstr "Nessun pin RX"
+
+#: ports/atmel-samd/common-hal/busio/UART.c:294
+#: ports/nrf/common-hal/busio/UART.c:195
+msgid "No TX pin"
+msgstr "Nessun pin TX"
+
+#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c:170
+#: ports/nrf/common-hal/digitalio/DigitalInOut.c:142
+msgid "Cannot get pull while in output mode"
+msgstr ""
+
+#: ports/atmel-samd/common-hal/microcontroller/__init__.c:74
+#: ports/esp8266/common-hal/microcontroller/__init__.c:64
+msgid "Cannot reset into bootloader because no bootloader is present."
+msgstr ""
+"Impossibile resettare nel bootloader poiché nessun bootloader è presente."
+
+#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:120
+#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:369
+#: ports/nrf/common-hal/pulseio/PWMOut.c:120
+#: ports/nrf/common-hal/pulseio/PWMOut.c:233
+msgid "Invalid PWM frequency"
+msgstr "Frequenza PWM non valida"
+
+#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:187
+msgid "All timers for this pin are in use"
+msgstr "Tutti i timer per questo pin sono in uso"
+
+#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:110
+msgid "No hardware support on pin"
+msgstr "Nessun supporto hardware sul pin"
+
+#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:113
+msgid "EXTINT channel already in use"
+msgstr "Canale EXTINT già in uso"
+
+#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:118
+#: ports/esp8266/common-hal/pulseio/PulseIn.c:86
+#, c-format
+msgid "Failed to allocate RX buffer of %d bytes"
+msgstr "Fallita allocazione del buffer RX di %d byte"
+
+#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:205
+#: ports/esp8266/common-hal/pulseio/PulseIn.c:151
+msgid "pop from an empty PulseIn"
+msgstr "pop sun un PulseIn vuoto"
+
+#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237
+#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:420
+msgid "index out of range"
+msgstr "indice fuori intervallo"
+
+#: ports/atmel-samd/common-hal/pulseio/PulseOut.c:178
+msgid "Another send is already active"
+msgstr ""
+
+#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c:38
+msgid "Both pins must support hardware interrupts"
+msgstr "Entrambi i pin devono supportare gli interrupt hardware"
+
+#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c:46
+msgid "A hardware interrupt channel is already in use"
+msgstr "Un canale di interrupt hardware è già in uso"
+
+#: ports/atmel-samd/common-hal/rtc/RTC.c:101
+msgid "calibration value out of range +/-127"
+msgstr "valore di calibrazione fuori intervallo +/-127"
+
+#: ports/atmel-samd/common-hal/storage/__init__.c:48
+msgid "Cannot remount '/' when USB is active."
+msgstr "Non è possibile rimontare '/' mentre l'USB è attiva."
+
+#: ports/atmel-samd/common-hal/touchio/TouchIn.c:75
+msgid "No free GCLKs"
+msgstr "Nessun GCLK libero"
+
+#: ports/atmel-samd/common-hal/usb_hid/Device.c:78
+#: ports/nrf/common-hal/usb_hid/Device.c:45
+#, c-format
+msgid "Buffer incorrect size. Should be %d bytes."
+msgstr "Buffer di lunghezza non valida. Dovrebbe essere di %d bytes."
+
+#: ports/atmel-samd/common-hal/usb_hid/Device.c:82
+#: ports/nrf/common-hal/usb_hid/Device.c:53
+msgid "USB Busy"
+msgstr "USB occupata"
+
+#: ports/atmel-samd/common-hal/usb_hid/Device.c:82
+#: ports/nrf/common-hal/usb_hid/Device.c:59
+msgid "USB Error"
+msgstr "Errore USB"
+
+#: ports/esp8266/common-hal/analogio/AnalogIn.c:43
+msgid "Pin %q does not have ADC capabilities"
+msgstr "Il pin %q non ha capacità ADC"
+
+#: ports/esp8266/common-hal/analogio/AnalogOut.c:39
+msgid "No hardware support for analog out."
+msgstr "Nessun supporto hardware per l'uscita analogica."
+
+#: ports/esp8266/common-hal/busio/SPI.c:72
+msgid "Pins not valid for SPI"
+msgstr "Pin non validi per SPI"
+
+#: ports/esp8266/common-hal/busio/UART.c:45
+msgid "Only tx supported on UART1 (GPIO2)."
+msgstr "Solo tx supportato su UART1 (GPIO2)."
+
+#: ports/esp8266/common-hal/busio/UART.c:67 ports/esp8266/machine_uart.c:108
+msgid "invalid data bits"
+msgstr "bit dati invalidi"
+
+#: ports/esp8266/common-hal/busio/UART.c:91 ports/esp8266/machine_uart.c:144
+msgid "invalid stop bits"
+msgstr "bit di stop invalidi"
+
+#: ports/esp8266/common-hal/digitalio/DigitalInOut.c:200
+msgid "ESP8266 does not support pull down."
+msgstr "ESP8266 non supporta pull-down"
+
+#: ports/esp8266/common-hal/digitalio/DigitalInOut.c:210
+msgid "GPIO16 does not support pull up."
+msgstr "GPIO16 non supporta pull-up"
+
+#: ports/esp8266/common-hal/microcontroller/__init__.c:66
+msgid "ESP8226 does not support safe mode."
+msgstr "ESP8266 non supporta la modalità sicura."
+
+#: ports/esp8266/common-hal/pulseio/PWMOut.c:54
+#: ports/esp8266/common-hal/pulseio/PWMOut.c:113
+#, c-format
+msgid "Maximum PWM frequency is %dhz."
+msgstr "Frequenza massima su PWM è %dhz"
+
+#: ports/esp8266/common-hal/pulseio/PWMOut.c:57
+#: ports/esp8266/common-hal/pulseio/PWMOut.c:116
+msgid "Minimum PWM frequency is 1hz."
+msgstr "Frequenza minima su PWM è 1hz"
+
+#: ports/esp8266/common-hal/pulseio/PWMOut.c:68
+#, c-format
+msgid "Multiple PWM frequencies not supported. PWM already set to %dhz."
+msgstr "Frequenze PWM multiple non supportate. PWM già impostato a %shz."
+
+#: ports/esp8266/common-hal/pulseio/PWMOut.c:77 ports/esp8266/machine_pwm.c:70
+#, c-format
+msgid "PWM not supported on pin %d"
+msgstr "PWM non è supportato sul pin %d"
+
+#: ports/esp8266/common-hal/pulseio/PulseIn.c:78
+msgid "No PulseIn support for %q"
+msgstr "Nessun supporto per PulseIn per %q"
+
+#: ports/esp8266/common-hal/storage/__init__.c:34
+msgid "Unable to remount filesystem"
+msgstr "Imposssibile rimontare il filesystem"
+
+#: ports/esp8266/common-hal/storage/__init__.c:38
+msgid "Use esptool to erase flash and re-upload Python instead"
+msgstr "Usa esptool per cancellare la flash e ricaricare Python invece"
+
+#: ports/esp8266/esp_mphal.c:154
+msgid "C-level assert"
+msgstr "assert a livello C"
+
+#: ports/esp8266/machine_adc.c:57
+#, c-format
+msgid "not a valid ADC Channel: %d"
+msgstr "canale ADC non valido: %d"
+
+#: ports/esp8266/machine_hspi.c:131 ports/esp8266/machine_hspi.c:137
+msgid "impossible baudrate"
+msgstr "baudrate impossibile"
+
+#: ports/esp8266/machine_pin.c:129
+msgid "expecting a pin"
+msgstr "pin atteso"
+
+#: ports/esp8266/machine_pin.c:284
+msgid "Pin(16) doesn't support pull"
+msgstr "Pin(16) non supporta pull"
+
+#: ports/esp8266/machine_pin.c:323
+msgid "invalid pin"
+msgstr "pin non valido"
+
+#: ports/esp8266/machine_pin.c:389
+msgid "pin does not have IRQ capabilities"
+msgstr "il pin non implementa IRQ"
+
+#: ports/esp8266/machine_rtc.c:185
+msgid "buffer too long"
+msgstr "buffer troppo lungo"
+
+#: ports/esp8266/machine_rtc.c:209 ports/esp8266/machine_rtc.c:223
+#: ports/esp8266/machine_rtc.c:246
+msgid "invalid alarm"
+msgstr "alarm non valido"
+
+#: ports/esp8266/machine_uart.c:169
+#, c-format
+msgid "UART(%d) does not exist"
+msgstr "UART(%d) non esistente"
+
+#: ports/esp8266/machine_uart.c:219
+msgid "UART(1) can't read"
+msgstr "UART(1) non leggibile"
+
+#: ports/esp8266/modesp.c:119
+msgid "len must be multiple of 4"
+msgstr "len deve essere multiplo di 4"
+
+#: ports/esp8266/modesp.c:274
+#, c-format
+msgid "memory allocation failed, allocating %u bytes for native code"
+msgstr ""
+"allocazione di memoria fallita, allocazione di %d byte per codice nativo"
+
+#: ports/esp8266/modesp.c:317
+msgid "flash location must be below 1MByte"
+msgstr "Locazione della flash deve essere inferiore a 1mb"
+
+#: ports/esp8266/modmachine.c:63
+msgid "frequency can only be either 80Mhz or 160MHz"
+msgstr "la frequenza può essere o 80Mhz o 160Mhz"
+
+#: ports/esp8266/modnetwork.c:61
+msgid "AP required"
+msgstr "AP richiesto"
+
+#: ports/esp8266/modnetwork.c:61
+msgid "STA required"
+msgstr "STA richiesta"
+
+#: ports/esp8266/modnetwork.c:87
+msgid "Cannot update i/f status"
+msgstr "Impossibile aggiornare status di i/f"
+
+#: ports/esp8266/modnetwork.c:142
+msgid "Cannot set STA config"
+msgstr "Impossibile impostare la configurazione della STA"
+
+#: ports/esp8266/modnetwork.c:144
+msgid "Cannot connect to AP"
+msgstr "Impossible connettersi all'AP"
+
+#: ports/esp8266/modnetwork.c:152
+msgid "Cannot disconnect from AP"
+msgstr "Impossible disconnettersi all'AP"
+
+#: ports/esp8266/modnetwork.c:173
+msgid "unknown status param"
+msgstr "prametro di stato sconosciuto"
+
+#: ports/esp8266/modnetwork.c:222
+msgid "STA must be active"
+msgstr "STA deve essere attiva"
+
+#: ports/esp8266/modnetwork.c:239
+msgid "scan failed"
+msgstr "scansione fallita"
+
+#: ports/esp8266/modnetwork.c:306
+msgid "wifi_set_ip_info() failed"
+msgstr "wifi_set_ip_info() faillito"
+
+#: ports/esp8266/modnetwork.c:319
+msgid "either pos or kw args are allowed"
+msgstr "sono permesse solo gli argomenti pos o kw"
+
+#: ports/esp8266/modnetwork.c:329
+msgid "can't get STA config"
+msgstr "impossibile recuperare la configurazione della STA"
+
+#: ports/esp8266/modnetwork.c:331
+msgid "can't get AP config"
+msgstr "impossibile recuperare le configurazioni dell'AP"
+
+#: ports/esp8266/modnetwork.c:346
+msgid "invalid buffer length"
+msgstr "lunghezza del buffer non valida"
+
+#: ports/esp8266/modnetwork.c:405
+msgid "can't set STA config"
+msgstr "impossibile impostare le configurazioni della STA"
+
+#: ports/esp8266/modnetwork.c:407
+msgid "can't set AP config"
+msgstr "impossibile impostare le configurazioni dell'AP"
+
+#: ports/esp8266/modnetwork.c:416
+msgid "can query only one param"
+msgstr "è possibile interrogare solo un parametro"
+
+#: ports/esp8266/modnetwork.c:469
+msgid "unknown config param"
+msgstr "parametro di configurazione sconosciuto"
+
+#: ports/nrf/common-hal/analogio/AnalogOut.c:37
+msgid "AnalogOut functionality not supported"
+msgstr "funzionalità AnalogOut non supportata"
+
+#: ports/nrf/common-hal/busio/I2C.c:95
+msgid "All I2C peripherals are in use"
+msgstr "Tutte le periferiche I2C sono in uso"
+
+#: ports/nrf/common-hal/busio/SPI.c:115
+msgid "All SPI peripherals are in use"
+msgstr "Tutte le periferiche SPI sono in uso"
+
+#: ports/nrf/common-hal/busio/UART.c:48
+#, c-format
+msgid "error = 0x%08lX"
+msgstr ""
+
+#: ports/nrf/common-hal/busio/UART.c:86
+#, fuzzy
+msgid "Invalid buffer size"
+msgstr "lunghezza del buffer non valida"
+
+#: ports/nrf/common-hal/busio/UART.c:90
+#, fuzzy
+msgid "Odd parity is not supported"
+msgstr "operazione I2C non supportata"
+
+#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326
+#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336
+#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347
+#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356
+#: ports/nrf/common-hal/busio/UART.c:364
+#, fuzzy
+msgid "busio.UART not available"
+msgstr "busio.UART non ancora implementato"
+
+#: ports/nrf/common-hal/microcontroller/Processor.c:49
+#, c-format
+msgid "Can not get temperature. status: 0x%02x"
+msgstr "Impossibile leggere la temperatura. status: 0x%02x"
+
+#: ports/nrf/common-hal/pulseio/PWMOut.c:162
+#, fuzzy
+msgid "All PWM peripherals are in use"
+msgstr "Tutte le periferiche SPI sono in uso"
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:199
+msgid "Cannot apply GAP parameters."
+msgstr "Impossibile applicare i parametri GAP."
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:213
+msgid "Cannot set PPCP parameters."
+msgstr "Impossibile impostare i parametri PPCP."
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:245
+msgid "Can not query for the device address."
+msgstr "Non è possibile trovare l'indirizzo del dispositivo."
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:264
+msgid "Can not add Vendor Specific 128-bit UUID."
+msgstr "Non è possibile aggiungere l'UUID del vendor specifico da 128-bit"
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:284
+#: ports/nrf/drivers/bluetooth/ble_drv.c:298
+msgid "Can not add Service."
+msgstr "Non è possibile aggiungere Service."
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:373
+msgid "Can not add Characteristic."
+msgstr "Non è possibile aggiungere Characteristic."
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:400
+msgid "Can not apply device name in the stack."
+msgstr "Non è possibile inserire il nome del dipositivo nella lista."
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:464
+#: ports/nrf/drivers/bluetooth/ble_drv.c:514
+msgid "Can not encode UUID, to check length."
+msgstr "Non è possibile codificare l'UUID, lunghezza da controllare."
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:470
+#: ports/nrf/drivers/bluetooth/ble_drv.c:520
+msgid "Can encode UUID into the advertisement packet."
+msgstr "È possibile codificare l'UUID nel pacchetto di advertisement."
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:545
+msgid "Can not fit data into the advertisement packet."
+msgstr "Impossibile inserire dati nel pacchetto di advertisement."
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:558
+#: ports/nrf/drivers/bluetooth/ble_drv.c:604
+#, c-format
+msgid "Can not apply advertisement data. status: 0x%02x"
+msgstr "Impossible inserire dati advertisement. status: 0x%02x"
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:614
+#, c-format
+msgid "Can not start advertisement. status: 0x%02x"
+msgstr "Impossibile avviare advertisement. status: 0x%02x"
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:631
+#, c-format
+msgid "Can not stop advertisement. status: 0x%02x"
+msgstr "Impossibile fermare advertisement. status: 0x%02x"
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:650
+#: ports/nrf/drivers/bluetooth/ble_drv.c:726
+#, c-format
+msgid "Can not read attribute value. status: 0x%02x"
+msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:667
+#: ports/nrf/drivers/bluetooth/ble_drv.c:756
+#, c-format
+msgid "Can not write attribute value. status: 0x%02x"
+msgstr "Impossibile scrivere valore dell'attributo. status: 0x%02x"
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:691
+#, c-format
+msgid "Can not notify attribute value. status: 0x%02x"
+msgstr "Impossibile notificare valore dell'attributo. status: 0x%02x"
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:784
+#, c-format
+msgid "Can not start scanning. status: 0x%02x"
+msgstr "Impossible iniziare la scansione. status: 0x%02x"
+
+#: ports/nrf/drivers/bluetooth/ble_drv.c:829
+#, c-format
+msgid "Can not connect. status: 0x%02x"
+msgstr "Impossibile connettersi. status: 0x%02x"
+
+#: ports/nrf/modules/ubluepy/ubluepy_characteristic.c:68
+#: ports/nrf/modules/ubluepy/ubluepy_service.c:80
+#: ports/nrf/modules/ubluepy/ubluepy_service.c:132
+#: ports/nrf/modules/ubluepy/ubluepy_uuid.c:137
+msgid "Invalid UUID parameter"
+msgstr "Parametro UUID non valido"
+
+#: ports/nrf/modules/ubluepy/ubluepy_service.c:73
+msgid "Invalid Service type"
+msgstr "Tipo di servizio non valido"
+
+#: ports/nrf/modules/ubluepy/ubluepy_uuid.c:127
+msgid "Invalid UUID string length"
+msgstr "Lunghezza della stringa UUID non valida"
+
+#: ports/unix/modffi.c:138
+msgid "Unknown type"
+msgstr "Tipo sconosciuto"
+
+#: ports/unix/modffi.c:207 ports/unix/modffi.c:265
+msgid "Error in ffi_prep_cif"
+msgstr "Errore in ffi_prep_cif"
+
+#: ports/unix/modffi.c:270
+msgid "ffi_prep_closure_loc"
+msgstr "ffi_prep_closure_loc"
+
+#: ports/unix/modffi.c:413
+msgid "Don't know how to pass object to native function"
+msgstr "Non so come passare l'oggetto alla funzione nativa"
+
+#: ports/unix/modusocket.c:474
+#, c-format
+msgid "[addrinfo error %d]"
+msgstr "[errore addrinfo %d]"
+
+#: py/argcheck.c:44
+msgid "function does not take keyword arguments"
+msgstr "la funzione non prende argomenti nominati"
+
+#: py/argcheck.c:54 py/bc.c:85 py/objnamedtuple.c:104
+#, c-format
+msgid "function takes %d positional arguments but %d were given"
+msgstr ""
+"la funzione prende %d argomenti posizionali ma ne sono stati forniti %d"
+
+#: py/argcheck.c:64
+#, c-format
+msgid "function missing %d required positional arguments"
+msgstr "mancano %d argomenti posizionali obbligatori alla funzione"
+
+#: py/argcheck.c:72
+#, c-format
+msgid "function expected at most %d arguments, got %d"
+msgstr "la funzione prevede al massimo %d argmoneti, ma ne ha ricevuti %d"
+
+#: py/argcheck.c:97
+msgid "'%q' argument required"
+msgstr "'%q' argomento richiesto"
+
+#: py/argcheck.c:122
+msgid "extra positional arguments given"
+msgstr "argomenti posizonali extra dati"
+
+#: py/argcheck.c:130
+msgid "extra keyword arguments given"
+msgstr "argomento nominato aggiuntivo fornito"
+
+#: py/argcheck.c:142
+msgid "argument num/types mismatch"
+msgstr "discrepanza di numero/tipo di argomenti"
+
+#: py/argcheck.c:147
+msgid "keyword argument(s) not yet implemented - use normal args instead"
+msgstr ""
+"argomento(i) nominati non ancora implementati - usare invece argomenti "
+"normali"
+
+#: py/bc.c:88 py/objnamedtuple.c:108
+msgid "%q() takes %d positional arguments but %d were given"
+msgstr "%q() prende %d argomenti posizionali ma ne sono stati forniti %d"
+
+#: py/bc.c:197 py/bc.c:215
+msgid "unexpected keyword argument"
+msgstr "argomento nominato inaspettato"
+
+#: py/bc.c:199
+msgid "keywords must be strings"
+msgstr "argomenti nominati devono essere stringhe"
+
+#: py/bc.c:206 py/objnamedtuple.c:138
+msgid "function got multiple values for argument '%q'"
+msgstr "la funzione ha ricevuto valori multipli per l'argomento '%q'"
+
+#: py/bc.c:218 py/objnamedtuple.c:130
+msgid "unexpected keyword argument '%q'"
+msgstr "argomento nominato '%q' inaspettato"
+
+#: py/bc.c:244
+#, c-format
+msgid "function missing required positional argument #%d"
+msgstr "mancante il #%d argomento posizonale obbligatorio della funzione"
+
+#: py/bc.c:260
+msgid "function missing required keyword argument '%q'"
+msgstr "argomento nominato '%q' mancante alla funzione"
+
+#: py/bc.c:269
+msgid "function missing keyword-only argument"
+msgstr "argomento nominato mancante alla funzione"
+
+#: py/binary.c:112
+msgid "bad typecode"
+msgstr ""
+
+#: py/builtinevex.c:99
+msgid "bad compile mode"
+msgstr ""
+
+#: py/builtinimport.c:338
+msgid "cannot perform relative import"
+msgstr "impossibile effettuare l'importazione relativa"
+
+#: py/builtinimport.c:422 py/builtinimport.c:534
+msgid "module not found"
+msgstr "modulo non trovato"
+
+#: py/builtinimport.c:425 py/builtinimport.c:537
+msgid "no module named '%q'"
+msgstr "nessun modulo chiamato '%q'"
+
+#: py/builtinimport.c:512
+msgid "relative import"
+msgstr "importazione relativa"
+
+#: py/compile.c:397 py/compile.c:542
+msgid "can't assign to expression"
+msgstr "impossibile assegnare all'espressione"
+
+#: py/compile.c:416
+msgid "multiple *x in assignment"
+msgstr "*x multipli nell'assegnamento"
+
+#: py/compile.c:642
+msgid "non-default argument follows default argument"
+msgstr "argomento non predefinito segue argmoento predfinito"
+
+#: py/compile.c:771 py/compile.c:789
+msgid "invalid micropython decorator"
+msgstr "decoratore non valido in micropython"
+
+#: py/compile.c:943
+msgid "can't delete expression"
+msgstr "impossibile cancellare l'espessione"
+
+#: py/compile.c:955
+msgid "'break' outside loop"
+msgstr "'break' al di fuori del ciclo"
+
+#: py/compile.c:958
+msgid "'continue' outside loop"
+msgstr "'continue' al di fuori del ciclo"
+
+#: py/compile.c:969
+msgid "'return' outside function"
+msgstr "'return' al di fuori della funzione"
+
+#: py/compile.c:1169
+msgid "identifier redefined as global"
+msgstr "identificatore ridefinito come globale"
+
+#: py/compile.c:1185
+msgid "no binding for nonlocal found"
+msgstr "nessun binding per nonlocal trovato"
+
+#: py/compile.c:1188
+msgid "identifier redefined as nonlocal"
+msgstr "identificatore ridefinito come nonlocal"
+
+#: py/compile.c:1197
+msgid "can't declare nonlocal in outer code"
+msgstr "impossibile dichiarare nonlocal nel codice esterno"
+
+#: py/compile.c:1542
+msgid "default 'except' must be last"
+msgstr "'except' predefinito deve essere ultimo"
+
+#: py/compile.c:2095
+msgid "*x must be assignment target"
+msgstr ""
+
+#: py/compile.c:2193
+msgid "super() can't find self"
+msgstr ""
+
+#: py/compile.c:2256
+msgid "can't have multiple *x"
+msgstr "impossibile usare *x multipli"
+
+#: py/compile.c:2263
+msgid "can't have multiple **x"
+msgstr "impossibile usare **x multipli"
+
+#: py/compile.c:2271
+msgid "LHS of keyword arg must be an id"
+msgstr ""
+
+#: py/compile.c:2287
+msgid "non-keyword arg after */**"
+msgstr "argomento non nominato dopo */**"
+
+#: py/compile.c:2291
+msgid "non-keyword arg after keyword arg"
+msgstr "argomento non nominato seguito da argomento nominato"
+
+#: py/compile.c:2463 py/compile.c:2473 py/compile.c:2712 py/compile.c:2742
+#: py/parse.c:1176
+msgid "invalid syntax"
+msgstr "sintassi non valida"
+
+#: py/compile.c:2465
+msgid "expecting key:value for dict"
+msgstr "chiave:valore atteso per dict"
+
+#: py/compile.c:2475
+msgid "expecting just a value for set"
+msgstr "un solo valore atteso per set"
+
+#: py/compile.c:2600
+msgid "'yield' outside function"
+msgstr "'yield' al di fuori della funzione"
+
+#: py/compile.c:2619
+msgid "'await' outside function"
+msgstr "'await' al di fuori della funzione"
+
+#: py/compile.c:2774
+msgid "name reused for argument"
+msgstr "nome riutilizzato come argomento"
+
+#: py/compile.c:2827
+msgid "parameter annotation must be an identifier"
+msgstr ""
+
+#: py/compile.c:2969 py/compile.c:3137
+msgid "return annotation must be an identifier"
+msgstr ""
+
+#: py/compile.c:3097
+msgid "inline assembler must be a function"
+msgstr "inline assembler deve essere una funzione"
+
+#: py/compile.c:3134
+msgid "unknown type"
+msgstr "tipo sconosciuto"
+
+#: py/compile.c:3154
+msgid "expecting an assembler instruction"
+msgstr "istruzione assembler attesa"
+
+#: py/compile.c:3184
+msgid "'label' requires 1 argument"
+msgstr "'label' richiede 1 argomento"
+
+#: py/compile.c:3190
+msgid "label redefined"
+msgstr "etichetta ridefinita"
+
+#: py/compile.c:3196
+msgid "'align' requires 1 argument"
+msgstr "'align' richiede 1 argomento"
+
+#: py/compile.c:3205
+msgid "'data' requires at least 2 arguments"
+msgstr "'data' richiede almeno 2 argomento"
+
+#: py/compile.c:3212
+msgid "'data' requires integer arguments"
+msgstr "'data' richiede argomenti interi"
+
+#: py/emitinlinethumb.c:102
+#, fuzzy
+msgid "can only have up to 4 parameters to Thumb assembly"
+msgstr "sono disponibili fino a 4 parametri per il Xtensa assembly"
+
+#: py/emitinlinethumb.c:107 py/emitinlinethumb.c:112
+#, fuzzy
+msgid "parameters must be registers in sequence r0 to r3"
+msgstr "parametri devono essere i registri in sequenza da a2 a a5"
+
+#: py/emitinlinethumb.c:188 py/emitinlinethumb.c:230
+#, fuzzy, c-format
+msgid "'%s' expects at most r%d"
+msgstr "'%s' aspetta un registro"
+
+#: py/emitinlinethumb.c:197 py/emitinlinextensa.c:162
+#, c-format
+msgid "'%s' expects a register"
+msgstr "'%s' aspetta un registro"
+
+#: py/emitinlinethumb.c:211
+#, fuzzy, c-format
+msgid "'%s' expects a special register"
+msgstr "'%s' aspetta un registro"
+
+#: py/emitinlinethumb.c:239
+#, fuzzy, c-format
+msgid "'%s' expects an FPU register"
+msgstr "'%s' aspetta un registro"
+
+#: py/emitinlinethumb.c:292
+#, fuzzy, c-format
+msgid "'%s' expects {r0, r1, ...}"
+msgstr "'%s' aspetta un registro"
+
+#: py/emitinlinethumb.c:299 py/emitinlinextensa.c:169
+#, c-format
+msgid "'%s' expects an integer"
+msgstr "'%s' aspetta un intero"
+
+#: py/emitinlinethumb.c:304
+#, fuzzy, c-format
+msgid "'%s' integer 0x%x does not fit in mask 0x%x"
+msgstr "intero '%s' non è nell'intervallo %d..%d"
+
+#: py/emitinlinethumb.c:328
+#, fuzzy, c-format
+msgid "'%s' expects an address of the form [a, b]"
+msgstr "'%s' aspetta un registro"
+
+#: py/emitinlinethumb.c:334 py/emitinlinextensa.c:182
+#, c-format
+msgid "'%s' expects a label"
+msgstr "'%s' aspetta una etichetta"
+
+#: py/emitinlinethumb.c:345 py/emitinlinextensa.c:193
+msgid "label '%q' not defined"
+msgstr "etichetta '%q' non definita"
+
+#: py/emitinlinethumb.c:806
+#, fuzzy, c-format
+msgid "unsupported Thumb instruction '%s' with %d arguments"
+msgstr "istruzione '%s' Xtensa non supportata con %d argomenti"
+
+#: py/emitinlinethumb.c:810
+#, fuzzy
+msgid "branch not in range"
+msgstr "argomento di chr() non è in range(256)"
+
+#: py/emitinlinextensa.c:86
+msgid "can only have up to 4 parameters to Xtensa assembly"
+msgstr "sono disponibili fino a 4 parametri per il Xtensa assembly"
+
+#: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96
+msgid "parameters must be registers in sequence a2 to a5"
+msgstr "parametri devono essere i registri in sequenza da a2 a a5"
+
+#: py/emitinlinextensa.c:174
+#, c-format
+msgid "'%s' integer %d is not within range %d..%d"
+msgstr "intero '%s' non è nell'intervallo %d..%d"
+
+#: py/emitinlinextensa.c:327
+#, c-format
+msgid "unsupported Xtensa instruction '%s' with %d arguments"
+msgstr "istruzione '%s' Xtensa non supportata con %d argomenti"
+
+#: py/emitnative.c:183
+msgid "unknown type '%q'"
+msgstr "tipo '%q' sconosciuto"
+
+#: py/emitnative.c:260
+msgid "Viper functions don't currently support more than 4 arguments"
+msgstr "Le funzioni Viper non supportano più di 4 argomenti al momento"
+
+#: py/emitnative.c:742
+msgid "conversion to object"
+msgstr "conversione in oggetto"
+
+#: py/emitnative.c:921
+msgid "local '%q' used before type known"
+msgstr "locla '%q' utilizzato prima che il tipo fosse noto"
+
+#: py/emitnative.c:1118 py/emitnative.c:1156
+msgid "can't load from '%q'"
+msgstr "impossibile caricare da '%q'"
+
+#: py/emitnative.c:1128
+msgid "can't load with '%q' index"
+msgstr "impossibile caricare con indice '%q'"
+
+#: py/emitnative.c:1188
+msgid "local '%q' has type '%q' but source is '%q'"
+msgstr "local '%q' ha tipo '%q' ma sorgente è '%q'"
+
+#: py/emitnative.c:1289 py/emitnative.c:1379
+msgid "can't store '%q'"
+msgstr "impossibile memorizzare '%q'"
+
+#: py/emitnative.c:1358 py/emitnative.c:1419
+msgid "can't store to '%q'"
+msgstr "impossibile memorizzare in '%q'"
+
+#: py/emitnative.c:1369
+msgid "can't store with '%q' index"
+msgstr "impossibile memorizzare con indice '%q'"
+
+#: py/emitnative.c:1540
+msgid "can't implicitly convert '%q' to 'bool'"
+msgstr "non è possibile convertire implicitamente '%q' in 'bool'"
+
+#: py/emitnative.c:1774
+msgid "unary op %q not implemented"
+msgstr "operazione unaria %q non implementata"
+
+#: py/emitnative.c:1930
+msgid "binary op %q not implemented"
+msgstr "operazione binaria %q non implementata"
+
+#: py/emitnative.c:1951
+msgid "can't do binary op between '%q' and '%q'"
+msgstr "impossibile eseguire operazione binaria tra '%q' e '%q'"
+
+#: py/emitnative.c:2126
+msgid "casting"
+msgstr "casting"
+
+#: py/emitnative.c:2173
+msgid "return expected '%q' but got '%q'"
+msgstr "return aspettava '%q' ma ha ottenuto '%q'"
+
+#: py/emitnative.c:2191
+msgid "must raise an object"
+msgstr "deve lanciare un oggetto"
+
+#: py/emitnative.c:2201
+msgid "native yield"
+msgstr "yield nativo"
+
+#: py/lexer.c:345
+msgid "unicode name escapes"
+msgstr ""
+
+#: py/modbuiltins.c:162
+msgid "chr() arg not in range(0x110000)"
+msgstr "argomento di chr() non è in range(0x110000)"
+
+#: py/modbuiltins.c:171
+msgid "chr() arg not in range(256)"
+msgstr "argomento di chr() non è in range(256)"
+
+#: py/modbuiltins.c:285
+msgid "arg is an empty sequence"
+msgstr "l'argomento è una sequenza vuota"
+
+#: py/modbuiltins.c:350
+msgid "ord expects a character"
+msgstr "ord() aspetta un carattere"
+
+#: py/modbuiltins.c:353
+#, c-format
+msgid "ord() expected a character, but string of length %d found"
+msgstr ""
+"ord() aspettava un carattere, ma ha ricevuto una stringa di lunghezza %d"
+
+#: py/modbuiltins.c:363
+msgid "3-arg pow() not supported"
+msgstr "pow() con tre argmomenti non supportata"
+
+#: py/modbuiltins.c:517
+msgid "must use keyword argument for key function"
+msgstr ""
+
+#: py/modmath.c:41 shared-bindings/math/__init__.c:53
+msgid "math domain error"
+msgstr "errore di dominio matematico"
+
+#: py/modmath.c:196 py/objfloat.c:270 py/objint_longlong.c:222
+#: py/objint_mpz.c:230 py/runtime.c:619 shared-bindings/math/__init__.c:346
+msgid "division by zero"
+msgstr "divisione per zero"
+
+#: py/modmicropython.c:155
+msgid "schedule stack full"
+msgstr ""
+
+#: py/modstruct.c:145 py/modstruct.c:153 py/modstruct.c:234 py/modstruct.c:244
+#: shared-bindings/struct/__init__.c:103 shared-bindings/struct/__init__.c:145
+#: shared-module/struct/__init__.c:91 shared-module/struct/__init__.c:175
+msgid "buffer too small"
+msgstr "buffer troppo piccolo"
+
+#: py/modthread.c:240
+msgid "expecting a dict for keyword args"
+msgstr "argomenti nominati necessitano un dizionario"
+
+#: py/moduerrno.c:143 py/moduerrno.c:146
+msgid "Permission denied"
+msgstr "Permesso negato"
+
+#: py/moduerrno.c:144
+msgid "No such file/directory"
+msgstr "Nessun file/directory esistente"
+
+#: py/moduerrno.c:145
+msgid "Input/output error"
+msgstr "Errore input/output"
+
+#: py/moduerrno.c:147
+msgid "File exists"
+msgstr "File esistente"
+
+#: py/moduerrno.c:148
+msgid "Unsupported operation"
+msgstr "Operazione non supportata"
+
+#: py/moduerrno.c:149
+msgid "Invalid argument"
+msgstr "Argomento non valido"
+
+#: py/obj.c:90
+msgid "Traceback (most recent call last):\n"
+msgstr "Traceback (chiamata più recente per ultima):\n"
+
+#: py/obj.c:94
+msgid " File \"%q\", line %d"
+msgstr " File \"%q\", riga %d"
+
+#: py/obj.c:96
+msgid " File \"%q\""
+msgstr " File \"%q\""
+
+#: py/obj.c:100
+msgid ", in %q\n"
+msgstr ", in %q\n"
+
+#: py/obj.c:257
+msgid "can't convert to int"
+msgstr "non è possibile convertire a int"
+
+#: py/obj.c:260
+#, c-format
+msgid "can't convert %s to int"
+msgstr "non è possibile convertire %s a int"
+
+#: py/obj.c:320
+msgid "can't convert to float"
+msgstr "non è possibile convertire a float"
+
+#: py/obj.c:323
+#, c-format
+msgid "can't convert %s to float"
+msgstr "non è possibile convertire %s a float"
+
+#: py/obj.c:353
+msgid "can't convert to complex"
+msgstr "non è possibile convertire a complex"
+
+#: py/obj.c:356
+#, c-format
+msgid "can't convert %s to complex"
+msgstr "non è possibile convertire a complex"
+
+#: py/obj.c:371
+msgid "expected tuple/list"
+msgstr "lista/tupla prevista"
+
+#: py/obj.c:374
+#, c-format
+msgid "object '%s' is not a tuple or list"
+msgstr "oggetto '%s' non è una tupla o una lista"
+
+#: py/obj.c:385
+msgid "tuple/list has wrong length"
+msgstr "tupla/lista ha la lunghezza sbagliata"
+
+#: py/obj.c:387
+#, c-format
+msgid "requested length %d but object has length %d"
+msgstr "lunghezza %d richiesta ma l'oggetto ha lunghezza %d"
+
+#: py/obj.c:400
+msgid "indices must be integers"
+msgstr "gli indici devono essere interi"
+
+#: py/obj.c:403
+msgid "%q indices must be integers, not %s"
+msgstr "gli indici %q devono essere interi, non %s"
+
+#: py/obj.c:423
+msgid "%q index out of range"
+msgstr "indice %q fuori intervallo"
+
+#: py/obj.c:455
+msgid "object has no len"
+msgstr "l'oggetto non ha lunghezza"
+
+#: py/obj.c:458
+#, c-format
+msgid "object of type '%s' has no len()"
+msgstr "l'oggetto di tipo '%s' non implementa len()"
+
+#: py/obj.c:496
+msgid "object does not support item deletion"
+msgstr ""
+
+#: py/obj.c:499
+#, c-format
+msgid "'%s' object does not support item deletion"
+msgstr ""
+
+#: py/obj.c:503
+msgid "object is not subscriptable"
+msgstr ""
+
+#: py/obj.c:506
+#, c-format
+msgid "'%s' object is not subscriptable"
+msgstr ""
+
+#: py/obj.c:510
+msgid "object does not support item assignment"
+msgstr ""
+
+#: py/obj.c:513
+#, c-format
+msgid "'%s' object does not support item assignment"
+msgstr ""
+
+#: py/obj.c:544
+msgid "object with buffer protocol required"
+msgstr ""
+
+#: py/objarray.c:413 py/objstr.c:427 py/objstrunicode.c:191 py/objtuple.c:187
+#: shared-bindings/nvm/ByteArray.c:85
+msgid "only slices with step=1 (aka None) are supported"
+msgstr "solo slice con step=1 (aka None) sono supportate"
+
+#: py/objarray.c:426
+msgid "lhs and rhs should be compatible"
+msgstr "lhs e rhs devono essere compatibili"
+
+#: py/objarray.c:444 shared-bindings/nvm/ByteArray.c:107
+msgid "array/bytes required on right side"
+msgstr ""
+
+#: py/objcomplex.c:203
+msgid "can't do truncated division of a complex number"
+msgstr "impossibile fare il modulo di un numero complesso"
+
+#: py/objcomplex.c:209
+msgid "complex division by zero"
+msgstr "complex divisione per zero"
+
+#: py/objcomplex.c:237
+msgid "0.0 to a complex power"
+msgstr "0.0 elevato alla potenza di un numero complesso"
+
+#: py/objdeque.c:107
+msgid "full"
+msgstr "pieno"
+
+#: py/objdeque.c:127
+msgid "empty"
+msgstr "vuoto"
+
+#: py/objdict.c:314
+msgid "popitem(): dictionary is empty"
+msgstr "popitem(): il dizionario è vuoto"
+
+#: py/objdict.c:357
+msgid "dict update sequence has wrong length"
+msgstr "sequanza di aggiornamento del dizionario ha la lunghezza errata"
+
+#: py/objfloat.c:308 py/parsenum.c:331
+msgid "complex values not supported"
+msgstr "valori complessi non supportai"
+
+#: py/objgenerator.c:108
+msgid "can't send non-None value to a just-started generator"
+msgstr ""
+
+#: py/objgenerator.c:126
+msgid "generator already executing"
+msgstr ""
+
+#: py/objgenerator.c:229
+msgid "generator ignored GeneratorExit"
+msgstr ""
+
+#: py/objgenerator.c:251
+msgid "can't pend throw to just-started generator"
+msgstr ""
+
+#: py/objint.c:144
+msgid "can't convert inf to int"
+msgstr "impossibile convertire inf in int"
+
+#: py/objint.c:146
+msgid "can't convert NaN to int"
+msgstr "impossibile convertire NaN in int"
+
+#: py/objint.c:163
+msgid "float too big"
+msgstr "float troppo grande"
+
+#: py/objint.c:328
+msgid "long int not supported in this build"
+msgstr "long int non supportata in questa build"
+
+#: py/objint.c:334 py/objint.c:340 py/objint.c:350 py/objint.c:358
+msgid "small int overflow"
+msgstr "small int overflow"
+
+#: py/objint_longlong.c:189 py/objint_mpz.c:283 py/runtime.c:486
+msgid "negative power with no float support"
+msgstr "potenza negativa senza supporto per float"
+
+#: py/objint_longlong.c:251
+msgid "ulonglong too large"
+msgstr "ulonglong troppo grande"
+
+#: py/objint_mpz.c:267 py/runtime.c:396 py/runtime.c:411
+msgid "negative shift count"
+msgstr ""
+
+#: py/objint_mpz.c:336
+msgid "pow() with 3 arguments requires integers"
+msgstr "pow() con 3 argomenti richiede interi"
+
+#: py/objint_mpz.c:347
+msgid "pow() 3rd argument cannot be 0"
+msgstr "il terzo argomento di pow() non può essere 0"
+
+#: py/objint_mpz.c:415
+msgid "overflow converting long int to machine word"
+msgstr "overflow convertendo long int in parola"
+
+#: py/objlist.c:273
+msgid "pop from empty list"
+msgstr "pop da una lista vuota"
+
+#: py/objnamedtuple.c:92
+msgid "can't set attribute"
+msgstr "impossibile impostare attributo"
+
+#: py/objobject.c:55
+msgid "__new__ arg must be a user-type"
+msgstr ""
+
+#: py/objrange.c:110
+msgid "zero step"
+msgstr "zero step"
+
+#: py/objset.c:371
+msgid "pop from an empty set"
+msgstr "pop da un set vuoto"
+
+#: py/objslice.c:66
+msgid "Length must be an int"
+msgstr "Length deve essere un intero"
+
+#: py/objslice.c:71
+msgid "Length must be non-negative"
+msgstr "Length deve essere non negativo"
+
+#: py/objslice.c:86 py/sequence.c:57
+msgid "slice step cannot be zero"
+msgstr "la step della slice non può essere zero"
+
+#: py/objslice.c:159
+msgid "Cannot subclass slice"
+msgstr "Impossibile subclasare slice"
+
+#: py/objstr.c:261
+msgid "bytes value out of range"
+msgstr "valore byte fuori intervallo"
+
+#: py/objstr.c:270
+msgid "wrong number of arguments"
+msgstr "numero di argomenti errato"
+
+#: py/objstr.c:467
+msgid "join expects a list of str/bytes objects consistent with self object"
+msgstr ""
+"join prende una lista di oggetti str/byte consistenti con l'oggetto stesso"
+
+#: py/objstr.c:542 py/objstr.c:647 py/objstr.c:1744
+msgid "empty separator"
+msgstr "separatore vuoto"
+
+#: py/objstr.c:641
+msgid "rsplit(None,n)"
+msgstr ""
+
+#: py/objstr.c:713
+msgid "substring not found"
+msgstr "sottostringa non trovata"
+
+#: py/objstr.c:770
+msgid "start/end indices"
+msgstr ""
+
+#: py/objstr.c:931
+msgid "bad format string"
+msgstr "stringa di formattazione scorretta"
+
+#: py/objstr.c:953
+msgid "single '}' encountered in format string"
+msgstr "'}' singolo presente nella stringa di formattazione"
+
+#: py/objstr.c:992
+msgid "bad conversion specifier"
+msgstr "specificatore di conversione scorretto"
+
+#: py/objstr.c:996
+msgid "end of format while looking for conversion specifier"
+msgstr ""
+
+#: py/objstr.c:998
+#, c-format
+msgid "unknown conversion specifier %c"
+msgstr "specificatore di conversione %s sconosciuto"
+
+#: py/objstr.c:1029
+msgid "unmatched '{' in format"
+msgstr "'{' spaiato nella stringa di formattazione"
+
+#: py/objstr.c:1036
+msgid "expected ':' after format specifier"
+msgstr "':' atteso dopo lo specificatore di formato"
+
+#: py/objstr.c:1050
+msgid ""
+"can't switch from automatic field numbering to manual field specification"
+msgstr ""
+
+#: py/objstr.c:1055 py/objstr.c:1083
+msgid "tuple index out of range"
+msgstr "indice della tupla fuori intervallo"
+
+#: py/objstr.c:1071
+msgid "attributes not supported yet"
+msgstr "attributi non ancora supportati"
+
+#: py/objstr.c:1079
+msgid ""
+"can't switch from manual field specification to automatic field numbering"
+msgstr ""
+
+#: py/objstr.c:1171
+msgid "invalid format specifier"
+msgstr "specificatore di formato non valido"
+
+#: py/objstr.c:1192
+msgid "sign not allowed in string format specifier"
+msgstr "segno non permesso nello spcificatore di formato della stringa"
+
+#: py/objstr.c:1200
+msgid "sign not allowed with integer format specifier 'c'"
+msgstr "segno non permesso nello spcificatore di formato 'c' della stringa"
+
+#: py/objstr.c:1259
+#, c-format
+msgid "unknown format code '%c' for object of type '%s'"
+msgstr "codice di formattaione '%c' sconosciuto per oggetto di tipo '%s'"
+
+#: py/objstr.c:1331
+#, c-format
+msgid "unknown format code '%c' for object of type 'float'"
+msgstr "codice di formattazione '%c' sconosciuto per oggetto di tipo 'float'"
+
+#: py/objstr.c:1343
+msgid "'=' alignment not allowed in string format specifier"
+msgstr ""
+
+#: py/objstr.c:1367
+#, c-format
+msgid "unknown format code '%c' for object of type 'str'"
+msgstr "codice di formattazione '%c' sconosciuto per oggetto di tipo 'str'"
+
+#: py/objstr.c:1415
+msgid "format requires a dict"
+msgstr "la formattazione richiede un dict"
+
+#: py/objstr.c:1424
+msgid "incomplete format key"
+msgstr ""
+
+#: py/objstr.c:1482
+msgid "incomplete format"
+msgstr "formato incompleto"
+
+#: py/objstr.c:1490
+msgid "not enough arguments for format string"
+msgstr "argomenti non sufficienti per la stringa di formattazione"
+
+#: py/objstr.c:1500
+#, c-format
+msgid "%%c requires int or char"
+msgstr "%%c necessita di int o char"
+
+#: py/objstr.c:1507
+msgid "integer required"
+msgstr "intero richiesto"
+
+#: py/objstr.c:1570
+#, c-format
+msgid "unsupported format character '%c' (0x%x) at index %d"
+msgstr "carattere di formattazione '%c' (0x%x) non supportato all indice %d"
+
+#: py/objstr.c:1577
+msgid "not all arguments converted during string formatting"
+msgstr ""
+"non tutti gli argomenti sono stati convertiti durante la formatazione in "
+"stringhe"
+
+#: py/objstr.c:2102
+msgid "can't convert to str implicitly"
+msgstr "impossibile convertire a stringa implicitamente"
+
+#: py/objstr.c:2106
+msgid "can't convert '%q' object to %q implicitly"
+msgstr "impossibile convertire l'oggetto '%q' implicitamente in %q"
+
+#: py/objstrunicode.c:134
+#, c-format
+msgid "string indices must be integers, not %s"
+msgstr "indici della stringa devono essere interi, non %s"
+
+#: py/objstrunicode.c:145 py/objstrunicode.c:164
+msgid "string index out of range"
+msgstr "indice della stringa fuori intervallo"
+
+#: py/objtype.c:358
+msgid "__init__() should return None"
+msgstr "__init__() deve ritornare None"
+
+#: py/objtype.c:360
+#, c-format
+msgid "__init__() should return None, not '%s'"
+msgstr "__init__() deve ritornare None, non '%s'"
+
+#: py/objtype.c:623 py/objtype.c:1275 py/runtime.c:1065
+msgid "unreadable attribute"
+msgstr "attributo non leggibile"
+
+#: py/objtype.c:868 py/runtime.c:653
+msgid "object not callable"
+msgstr ""
+
+#: py/objtype.c:870 py/runtime.c:655
+#, c-format
+msgid "'%s' object is not callable"
+msgstr ""
+
+#: py/objtype.c:978
+msgid "type takes 1 or 3 arguments"
+msgstr "tipo prende 1 o 3 argomenti"
+
+#: py/objtype.c:989
+msgid "cannot create instance"
+msgstr "impossibile creare un istanza"
+
+#: py/objtype.c:991
+msgid "cannot create '%q' instances"
+msgstr "creare '%q' istanze"
+
+#: py/objtype.c:1047
+msgid "can't add special method to already-subclassed class"
+msgstr ""
+
+#: py/objtype.c:1091 py/objtype.c:1097
+msgid "type is not an acceptable base type"
+msgstr "il tipo non è un tipo di base accettabile"
+
+#: py/objtype.c:1100
+msgid "type '%q' is not an acceptable base type"
+msgstr "il tipo '%q' non è un tipo di base accettabile"
+
+#: py/objtype.c:1137
+msgid "multiple inheritance not supported"
+msgstr "ereditarietà multipla non supportata"
+
+#: py/objtype.c:1164
+msgid "multiple bases have instance lay-out conflict"
+msgstr ""
+
+#: py/objtype.c:1205
+msgid "first argument to super() must be type"
+msgstr ""
+
+#: py/objtype.c:1370
+msgid "issubclass() arg 2 must be a class or a tuple of classes"
+msgstr ""
+"il secondo argomento di issubclass() deve essere una classe o una tupla di "
+"classi"
+
+#: py/objtype.c:1384
+msgid "issubclass() arg 1 must be a class"
+msgstr "il primo argomento di issubclass() deve essere una classe"
+
+#: py/parse.c:726
+msgid "constant must be an integer"
+msgstr "la costante deve essere un intero"
+
+#: py/parse.c:868
+msgid "Unable to init parser"
+msgstr "Inizilizzazione del parser non possibile"
+
+#: py/parse.c:1170
+msgid "unexpected indent"
+msgstr "indentazione inaspettata"
+
+#: py/parse.c:1173
+msgid "unindent does not match any outer indentation level"
+msgstr ""
+
+#: py/parsenum.c:60
+msgid "int() arg 2 must be >= 2 and <= 36"
+msgstr "il secondo argomanto di int() deve essere >= 2 e <= 36"
+
+#: py/parsenum.c:151
+msgid "invalid syntax for integer"
+msgstr "sintassi invalida per l'intero"
+
+#: py/parsenum.c:155
+#, c-format
+msgid "invalid syntax for integer with base %d"
+msgstr "sintassi invalida per l'intero con base %d"
+
+#: py/parsenum.c:339
+msgid "invalid syntax for number"
+msgstr "sintassi invalida per il numero"
+
+#: py/parsenum.c:342
+msgid "decimal numbers not supported"
+msgstr "numeri decimali non supportati"
+
+#: py/persistentcode.c:223
+msgid ""
+"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
+"mpy-update for more info."
+msgstr ""
+"File .mpy incompatibile. Aggiorna tutti i file .mpy. Vedi http://adafru.it/"
+"mpy-update per più informazioni."
+
+#: py/persistentcode.c:326
+msgid "can only save bytecode"
+msgstr "È possibile salvare solo bytecode"
+
+#: py/runtime.c:206
+msgid "name not defined"
+msgstr "nome non definito"
+
+#: py/runtime.c:209
+msgid "name '%q' is not defined"
+msgstr "nome '%q'non definito"
+
+#: py/runtime.c:304 py/runtime.c:611
+msgid "unsupported type for operator"
+msgstr "tipo non supportato per l'operando"
+
+#: py/runtime.c:307
+msgid "unsupported type for %q: '%s'"
+msgstr "tipo non supportato per %q: '%s'"
+
+#: py/runtime.c:614
+msgid "unsupported types for %q: '%s', '%s'"
+msgstr "tipi non supportati per %q: '%s', '%s'"
+
+#: py/runtime.c:881 py/runtime.c:888 py/runtime.c:945
+msgid "wrong number of values to unpack"
+msgstr "numero di valori da scompattare non corretto"
+
+#: py/runtime.c:883 py/runtime.c:947
+#, c-format
+msgid "need more than %d values to unpack"
+msgstr "necessari più di %d valori da scompattare"
+
+#: py/runtime.c:890
+#, c-format
+msgid "too many values to unpack (expected %d)"
+msgstr "troppi valori da scompattare (%d attesi)"
+
+#: py/runtime.c:984
+msgid "argument has wrong type"
+msgstr "il tipo dell'argomento è errato"
+
+#: py/runtime.c:986
+msgid "argument should be a '%q' not a '%q'"
+msgstr "l'argomento dovrebbe essere un '%q' e non un '%q'"
+
+#: py/runtime.c:1123 py/runtime.c:1197
+msgid "no such attribute"
+msgstr "attributo inesistente"
+
+#: py/runtime.c:1128
+msgid "type object '%q' has no attribute '%q'"
+msgstr "l'oggetto di tipo '%q' non ha l'attributo '%q'"
+
+#: py/runtime.c:1132 py/runtime.c:1200
+msgid "'%s' object has no attribute '%q'"
+msgstr "l'oggetto '%s' non ha l'attributo '%q'"
+
+#: py/runtime.c:1238
+msgid "object not iterable"
+msgstr "oggetto non iterabile"
+
+#: py/runtime.c:1241
+#, c-format
+msgid "'%s' object is not iterable"
+msgstr "l'oggetto '%s' non è iterabile"
+
+#: py/runtime.c:1260 py/runtime.c:1296
+msgid "object not an iterator"
+msgstr "l'oggetto non è un iteratore"
+
+#: py/runtime.c:1262 py/runtime.c:1298
+#, c-format
+msgid "'%s' object is not an iterator"
+msgstr "l'oggetto '%s' non è un iteratore"
+
+#: py/runtime.c:1401
+msgid "exceptions must derive from BaseException"
+msgstr "le eccezioni devono derivare da BaseException"
+
+#: py/runtime.c:1430
+msgid "cannot import name %q"
+msgstr "impossibile imporate il nome %q"
+
+#: py/runtime.c:1535
+msgid "memory allocation failed, heap is locked"
+msgstr "allocazione di memoria fallita, l'heap è bloccato"
+
+#: py/runtime.c:1539
+#, c-format
+msgid "memory allocation failed, allocating %u bytes"
+msgstr "allocazione di memoria fallita, allocando %u byte"
+
+#: py/runtime.c:1609
+msgid "maximum recursion depth exceeded"
+msgstr "profondità massima di ricorsione superata"
+
+#: py/sequence.c:264
+msgid "object not in sequence"
+msgstr "oggetto non in sequenza"
+
+#: py/stream.c:96
+msgid "stream operation not supported"
+msgstr "operazione di stream non supportata"
+
+#: py/vm.c:255
+msgid "local variable referenced before assignment"
+msgstr "variabile locale richiamata prima di un assegnamento"
+
+#: py/vm.c:1142
+msgid "no active exception to reraise"
+msgstr "nessuna eccezione attiva da rilanciare"
+
+#: py/vm.c:1284
+msgid "byte code not implemented"
+msgstr "byte code non implementato"
+
+#: shared-bindings/_stage/Layer.c:71
+msgid "graphic must be 2048 bytes long"
+msgstr "graphic deve essere lunga 2048 byte"
+
+#: shared-bindings/_stage/Layer.c:77 shared-bindings/_stage/Text.c:75
+msgid "palette must be 32 bytes long"
+msgstr "la palette deve essere lunga 32 byte"
+
+#: shared-bindings/_stage/Layer.c:84
+msgid "map buffer too small"
+msgstr "map buffer troppo piccolo"
+
+#: shared-bindings/_stage/Text.c:69
+msgid "font must be 2048 bytes long"
+msgstr "il font deve essere lungo 2048 byte"
+
+#: shared-bindings/_stage/Text.c:81
+msgid "chars buffer too small"
+msgstr "buffer dei caratteri troppo piccolo"
+
+#: shared-bindings/analogio/AnalogOut.c:118
+msgid "AnalogOut is only 16 bits. Value must be less than 65536."
+msgstr "AnalogOut ha solo 16 bit. Il valore deve essere meno di 65536."
+
+#: shared-bindings/audiobusio/I2SOut.c:225
+#: shared-bindings/audioio/AudioOut.c:223
+msgid "Not playing"
+msgstr "In pausa"
+
+#: shared-bindings/audiobusio/PDMIn.c:124
+msgid "Bit depth must be multiple of 8."
+msgstr "La profondità di bit deve essere multipla di 8."
+
+#: shared-bindings/audiobusio/PDMIn.c:128
+msgid "Oversample must be multiple of 8."
+msgstr "L'oversampling deve essere multiplo di 8."
+
+#: shared-bindings/audiobusio/PDMIn.c:136
+msgid "Microphone startup delay must be in range 0.0 to 1.0"
+msgstr ""
+"Il ritardo di avvio del microfono deve essere nell'intervallo tra 0.0 e 1.0"
+
+#: shared-bindings/audiobusio/PDMIn.c:193
+msgid "destination_length must be an int >= 0"
+msgstr "destination_length deve essere un int >= 0"
+
+#: shared-bindings/audiobusio/PDMIn.c:199
+msgid "Cannot record to a file"
+msgstr "Impossibile registrare in un file"
+
+#: shared-bindings/audiobusio/PDMIn.c:202
+msgid "Destination capacity is smaller than destination_length."
+msgstr "La capacità di destinazione è più piccola di destination_length."
+
+#: shared-bindings/audiobusio/PDMIn.c:206
+msgid "destination buffer must be an array of type 'H' for bit_depth = 16"
+msgstr ""
+"il buffer di destinazione deve essere un array di tipo 'H' con bit_depth = 16"
+
+#: shared-bindings/audiobusio/PDMIn.c:208
+msgid ""
+"destination buffer must be a bytearray or array of type 'B' for bit_depth = 8"
+msgstr ""
+"il buffer di destinazione deve essere un bytearray o un array di tipo 'B' "
+"con bit_depth = 8"
+
+#: shared-bindings/audioio/Mixer.c:94
+#, fuzzy
+msgid "Invalid voice count"
+msgstr "Tipo di servizio non valido"
+
+#: shared-bindings/audioio/Mixer.c:99
+#, fuzzy
+msgid "Invalid channel count"
+msgstr "Argomento non valido"
+
+#: shared-bindings/audioio/Mixer.c:103
+#, fuzzy
+msgid "Sample rate must be positive"
+msgstr "STA deve essere attiva"
+
+#: shared-bindings/audioio/Mixer.c:107
+#, fuzzy
+msgid "bits_per_sample must be 8 or 16"
+msgstr "i bit devono essere 7, 8 o 9"
+
+#: shared-bindings/audioio/RawSample.c:98
+msgid ""
+"sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or "
+"'B'"
+msgstr ""
+"il buffer sample_source deve essere un bytearray o un array di tipo 'h', "
+"'H', 'b' o 'B'"
+
+#: shared-bindings/audioio/RawSample.c:104
+msgid "buffer must be a bytes-like object"
+msgstr ""
+
+#: shared-bindings/audioio/WaveFile.c:78
+#: shared-bindings/displayio/OnDiskBitmap.c:85
+msgid "file must be a file opened in byte mode"
+msgstr ""
+
+#: shared-bindings/bitbangio/I2C.c:111 shared-bindings/bitbangio/SPI.c:121
+#: shared-bindings/busio/SPI.c:133
+msgid "Function requires lock"
+msgstr ""
+
+#: shared-bindings/bitbangio/I2C.c:195 shared-bindings/busio/I2C.c:210
+msgid "Buffer must be at least length 1"
+msgstr "Il buffer deve essere lungo almeno 1"
+
+#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175
+msgid "Invalid polarity"
+msgstr "Polarità non valida"
+
+#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179
+msgid "Invalid phase"
+msgstr "Fase non valida"
+
+#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183
+msgid "Invalid number of bits"
+msgstr "Numero di bit non valido"
+
+#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348
+msgid "buffer slices must be of equal length"
+msgstr "slice del buffer devono essere della stessa lunghezza"
+
+#: shared-bindings/busio/I2C.c:120
+msgid "Function requires lock."
+msgstr ""
+
+#: shared-bindings/busio/UART.c:102
+msgid "bits must be 7, 8 or 9"
+msgstr "i bit devono essere 7, 8 o 9"
+
+#: shared-bindings/busio/UART.c:114
+msgid "stop must be 1 or 2"
+msgstr ""
+
+#: shared-bindings/digitalio/DigitalInOut.c:211
+msgid "Invalid direction."
+msgstr "Direzione non valida."
+
+#: shared-bindings/digitalio/DigitalInOut.c:240
+msgid "Cannot set value when direction is input."
+msgstr ""
+
+#: shared-bindings/digitalio/DigitalInOut.c:266
+#: shared-bindings/digitalio/DigitalInOut.c:281
+msgid "Drive mode not used when direction is input."
+msgstr ""
+
+#: shared-bindings/digitalio/DigitalInOut.c:314
+#: shared-bindings/digitalio/DigitalInOut.c:331
+msgid "Pull not used when direction is output."
+msgstr ""
+
+#: shared-bindings/digitalio/DigitalInOut.c:340
+msgid "Unsupported pull value."
+msgstr "Valore di pull non supportato."
+
+#: shared-bindings/displayio/Bitmap.c:84
+msgid "y should be an int"
+msgstr "y dovrebbe essere un int"
+
+#: shared-bindings/displayio/Bitmap.c:89
+msgid "row buffer must be a bytearray or array of type 'b' or 'B'"
+msgstr "buffer di riga deve essere un bytearray o un array di tipo 'b' o 'B'"
+
+#: shared-bindings/displayio/Bitmap.c:94
+msgid "row data must be a buffer"
+msgstr "valori della riga devono essere un buffer"
+
+#: shared-bindings/displayio/ColorConverter.c:72
+msgid "color should be an int"
+msgstr "il colore deve essere un int"
+
+#: shared-bindings/displayio/FourWire.c:55
+#: shared-bindings/displayio/FourWire.c:64
+msgid "displayio is a work in progress"
+msgstr ""
+
+#: shared-bindings/displayio/Group.c:65
+msgid "Group must have size at least 1"
+msgstr "Il gruppo deve avere dimensione almeno 1"
+
+#: shared-bindings/displayio/Palette.c:96
+msgid "color buffer must be a bytearray or array of type 'b' or 'B'"
+msgstr ""
+"buffer del colore deve essere un bytearray o un array di tipo 'b' o 'B'"
+
+#: shared-bindings/displayio/Palette.c:102
+msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)"
+msgstr ""
+"il buffer del colore deve esseer di 3 byte (RGB) o 4 byte (RGB + pad byte)"
+
+#: shared-bindings/displayio/Palette.c:106
+msgid "color must be between 0x000000 and 0xffffff"
+msgstr "il colore deve essere compreso tra 0x000000 e 0xffffff"
+
+#: shared-bindings/displayio/Palette.c:110
+msgid "color buffer must be a buffer or int"
+msgstr "il buffer del colore deve essere un buffer o un int"
+
+#: shared-bindings/displayio/Palette.c:123
+#: shared-bindings/displayio/Palette.c:137
+msgid "palette_index should be an int"
+msgstr "palette_index deve essere un int"
+
+#: shared-bindings/displayio/Sprite.c:48
+msgid "position must be 2-tuple"
+msgstr "position deve essere una 2-tuple"
+
+#: shared-bindings/displayio/Sprite.c:97
+msgid "unsupported bitmap type"
+msgstr "tipo di bitmap non supportato"
+
+#: shared-bindings/displayio/Sprite.c:162
+msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter"
+msgstr "pixel_shader deve essere displayio.Palette o displayio.ColorConverter"
+
+#: shared-bindings/gamepad/GamePad.c:100
+msgid "too many arguments"
+msgstr "troppi argomenti"
+
+#: shared-bindings/gamepad/GamePad.c:104
+msgid "expected a DigitalInOut"
+msgstr "DigitalInOut atteso"
+
+#: shared-bindings/i2cslave/I2CSlave.c:98
+msgid "can't convert address to int"
+msgstr "impossible convertire indirizzo in int"
+
+#: shared-bindings/i2cslave/I2CSlave.c:101
+msgid "address out of bounds"
+msgstr "indirizzo fuori limite"
+
+#: shared-bindings/i2cslave/I2CSlave.c:107
+msgid "addresses is empty"
+msgstr "gli indirizzi sono vuoti"
+
+#: shared-bindings/microcontroller/Pin.c:89
+#: shared-bindings/neopixel_write/__init__.c:67
+#: shared-bindings/pulseio/PulseOut.c:75
+msgid "Expected a %q"
+msgstr "Atteso un %q"
+
+#: shared-bindings/microcontroller/Pin.c:100
+msgid "%q in use"
+msgstr "%q in uso"
+
+#: shared-bindings/microcontroller/__init__.c:126
+msgid "Invalid run mode."
+msgstr "Modalità di esecuzione non valida."
+
+#: shared-bindings/multiterminal/__init__.c:68
+msgid "Stream missing readinto() or write() method."
+msgstr "Metodi mancanti readinto() o write() allo stream."
+
+#: shared-bindings/nvm/ByteArray.c:99
+msgid "Slice and value different lengths."
+msgstr ""
+
+#: shared-bindings/nvm/ByteArray.c:104
+msgid "Array values should be single bytes."
+msgstr ""
+
+#: shared-bindings/nvm/ByteArray.c:111 shared-bindings/nvm/ByteArray.c:141
+msgid "Unable to write to nvm."
+msgstr "Imposibile scrivere su nvm."
+
+#: shared-bindings/nvm/ByteArray.c:137
+msgid "Bytes must be between 0 and 255."
+msgstr "I byte devono essere compresi tra 0 e 255"
+
+#: shared-bindings/os/__init__.c:200
+msgid "No hardware random available"
+msgstr "Nessun generatore hardware di numeri casuali disponibile"
+
+#: shared-bindings/pulseio/PWMOut.c:164
+msgid ""
+"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)"
+msgstr ""
+"duty_cycle del PWM deve essere compresa tra 0 e 65535 inclusiva (risoluzione "
+"a 16 bit)"
+
+#: shared-bindings/pulseio/PWMOut.c:195
+#, fuzzy
+msgid ""
+"PWM frequency not writable when variable_frequency is False on construction."
+msgstr ""
+"frequenza PWM frequency non è scrivibile quando variable_frequency è "
+"impostato nel costruttore a False."
+
+#: shared-bindings/pulseio/PulseIn.c:275
+msgid "Cannot delete values"
+msgstr "Impossibile cancellare valori"
+
+#: shared-bindings/pulseio/PulseIn.c:281
+msgid "Slices not supported"
+msgstr "Slice non supportate"
+
+#: shared-bindings/pulseio/PulseIn.c:287
+msgid "index must be int"
+msgstr "l'indice deve essere int"
+
+#: shared-bindings/pulseio/PulseIn.c:293
+msgid "Read-only"
+msgstr "Sola lettura"
+
+#: shared-bindings/pulseio/PulseOut.c:134
+msgid "Array must contain halfwords (type 'H')"
+msgstr ""
+
+#: shared-bindings/random/__init__.c:92 shared-bindings/random/__init__.c:100
+msgid "stop not reachable from start"
+msgstr "stop non raggiungibile dall'inizio"
+
+#: shared-bindings/random/__init__.c:111
+msgid "step must be non-zero"
+msgstr "step deve essere non zero"
+
+#: shared-bindings/random/__init__.c:114
+msgid "invalid step"
+msgstr "step non valida"
+
+#: shared-bindings/random/__init__.c:146
+msgid "empty sequence"
+msgstr "sequenza vuota"
+
+#: shared-bindings/rtc/RTC.c:40 shared-bindings/rtc/RTC.c:44
+#: shared-bindings/time/__init__.c:190
+msgid "RTC is not supported on this board"
+msgstr "RTC non supportato su questa scheda"
+
+#: shared-bindings/rtc/RTC.c:52
+msgid "RTC calibration is not supported on this board"
+msgstr "calibrazione RTC non supportata su questa scheda"
+
+#: shared-bindings/socket/__init__.c:428 shared-module/network/__init__.c:64
+#, fuzzy
+msgid "no available NIC"
+msgstr "busio.UART non ancora implementato"
+
+#: shared-bindings/storage/__init__.c:77
+msgid "filesystem must provide mount method"
+msgstr "il filesystem deve fornire un metodo di mount"
+
+#: shared-bindings/supervisor/__init__.c:93
+msgid "Brightness must be between 0 and 255"
+msgstr "La luminosità deve essere compreso tra 0 e 255"
+
+#: shared-bindings/supervisor/__init__.c:119
+msgid "Stack size must be at least 256"
+msgstr "La dimensione dello stack deve essere almeno 256"
+
+#: shared-bindings/time/__init__.c:78
+msgid "sleep length must be non-negative"
+msgstr "la lunghezza di sleed deve essere non negativa"
+
+#: shared-bindings/time/__init__.c:88
+msgid "time.struct_time() takes exactly 1 argument"
+msgstr "time.struct_time() prende esattamente un argomento"
+
+#: shared-bindings/time/__init__.c:91
+msgid "time.struct_time() takes a 9-sequence"
+msgstr ""
+
+#: shared-bindings/time/__init__.c:169 shared-bindings/time/__init__.c:250
+msgid "Tuple or struct_time argument required"
+msgstr "Tupla o struct_time richiesto come argomento"
+
+#: shared-bindings/time/__init__.c:174 shared-bindings/time/__init__.c:255
+msgid "function takes exactly 9 arguments"
+msgstr "la funzione prende esattamente 9 argomenti"
+
+#: shared-bindings/time/__init__.c:226 shared-bindings/time/__init__.c:259
+msgid "timestamp out of range for platform time_t"
+msgstr "timestamp è fuori intervallo per il time_t della piattaforma"
+
+#: shared-bindings/touchio/TouchIn.c:173
+msgid "threshold must be in the range 0-65536"
+msgstr "la soglia deve essere nell'intervallo 0-65536"
+
+#: shared-bindings/util.c:38
+msgid ""
+"Object has been deinitialized and can no longer be used. Create a new object."
+msgstr ""
+"L'oggetto è stato deinizializzato e non può essere più usato. Crea un nuovo "
+"oggetto."
+
+#: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117
+msgid "Couldn't allocate first buffer"
+msgstr "Impossibile allocare il primo buffer"
+
+#: shared-module/audioio/Mixer.c:53 shared-module/audioio/WaveFile.c:123
+msgid "Couldn't allocate second buffer"
+msgstr "Impossibile allocare il secondo buffer"
+
+#: shared-module/audioio/Mixer.c:82
+msgid "Voice index too high"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:85
+msgid "The sample's sample rate does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:88
+msgid "The sample's channel count does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:91
+msgid "The sample's bits_per_sample does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:100
+msgid "The sample's signedness does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/WaveFile.c:61
+msgid "Invalid wave file"
+msgstr "File wave non valido"
+
+#: shared-module/audioio/WaveFile.c:69
+msgid "Invalid format chunk size"
+msgstr ""
+
+#: shared-module/audioio/WaveFile.c:83
+msgid "Unsupported format"
+msgstr "Formato non supportato"
+
+#: shared-module/audioio/WaveFile.c:99
+msgid "Data chunk must follow fmt chunk"
+msgstr ""
+
+#: shared-module/audioio/WaveFile.c:107
+msgid "Invalid file"
+msgstr "File non valido"
+
+#: shared-module/bitbangio/I2C.c:58
+msgid "Clock stretch too long"
+msgstr ""
+
+#: shared-module/bitbangio/SPI.c:45
+msgid "Clock pin init failed."
+msgstr "Inizializzazione del pin di clock fallita."
+
+#: shared-module/bitbangio/SPI.c:51
+msgid "MOSI pin init failed."
+msgstr "inizializzazione del pin MOSI fallita."
+
+#: shared-module/bitbangio/SPI.c:62
+msgid "MISO pin init failed."
+msgstr "inizializzazione del pin MISO fallita."
+
+#: shared-module/bitbangio/SPI.c:122
+msgid "Cannot write without MOSI pin."
+msgstr "Impossibile scrivere senza pin MOSI."
+
+#: shared-module/bitbangio/SPI.c:177
+msgid "Cannot read without MISO pin."
+msgstr "Impossibile leggere senza pin MISO."
+
+#: shared-module/bitbangio/SPI.c:241
+msgid "Cannot transfer without MOSI and MISO pins."
+msgstr "Impossibile trasferire senza i pin MOSI e MISO."
+
+#: shared-module/displayio/Bitmap.c:49
+msgid "Only bit maps of 8 bit color or less are supported"
+msgstr "Sono supportate solo bitmap con colori a 8 bit o meno"
+
+#: shared-module/displayio/Bitmap.c:69
+msgid "row must be packed and word aligned"
+msgstr "la riga deve essere compattata e allineata alla parola"
+
+#: shared-module/displayio/Group.c:39
+msgid "Group full"
+msgstr "Gruppo pieno"
+
+#: shared-module/displayio/Group.c:48
+msgid "Group empty"
+msgstr "Gruppo vuoto"
+
+#: shared-module/displayio/OnDiskBitmap.c:49
+msgid "Invalid BMP file"
+msgstr "File BMP non valido"
+
+#: shared-module/displayio/OnDiskBitmap.c:59
+#, c-format
+msgid "Only Windows format, uncompressed BMP supported %d"
+msgstr "Formato solo di Windows, BMP non compresso supportato %d"
+
+#: shared-module/displayio/OnDiskBitmap.c:64
+#, c-format
+msgid "Only true color (24 bpp or higher) BMP supported %x"
+msgstr "Solo BMP true color (24 bpp o superiore) sono supportati %x"
+
+#: shared-module/struct/__init__.c:39
+msgid "'S' and 'O' are not supported format types"
+msgstr "'S' e 'O' non sono formati supportati"
+
+#: shared-module/struct/__init__.c:83
+msgid "too many arguments provided with the given format"
+msgstr "troppi argomenti forniti con il formato specificato"
diff --git a/locale/pt_BR.po b/locale/pt_BR.po
index 3245f5aa0..e499821e1 100644
--- a/locale/pt_BR.po
+++ b/locale/pt_BR.po
@@ -8,7 +8,7 @@ msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2018-10-09 23:01+1100\n"
+"POT-Creation-Date: 2018-10-11 14:17+1100\n"
"PO-Revision-Date: 2018-10-02 21:14-0000\n"
"Last-Translator: \n"
"Language-Team: \n"
@@ -218,7 +218,7 @@ msgstr ""
msgid "soft reboot\n"
msgstr ""
-#: ports/atmel-samd/audio_dma.c:285
+#: ports/atmel-samd/audio_dma.c:209
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c:361
msgid "All sync event channels in use"
msgstr ""
@@ -413,7 +413,8 @@ msgstr ""
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:120
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:369
-#: ports/nrf/common-hal/pulseio/PWMOut.c:227
+#: ports/nrf/common-hal/pulseio/PWMOut.c:120
+#: ports/nrf/common-hal/pulseio/PWMOut.c:233
msgid "Invalid PWM frequency"
msgstr "Frequência PWM inválida"
@@ -511,48 +512,48 @@ msgstr "Bits de parada inválidos"
#: ports/esp8266/common-hal/digitalio/DigitalInOut.c:200
msgid "ESP8266 does not support pull down."
-msgstr ""
+msgstr "ESP8266 não suporta pull down."
#: ports/esp8266/common-hal/digitalio/DigitalInOut.c:210
msgid "GPIO16 does not support pull up."
-msgstr ""
+msgstr "GPIO16 não suporta pull up."
#: ports/esp8266/common-hal/microcontroller/__init__.c:66
msgid "ESP8226 does not support safe mode."
-msgstr ""
+msgstr "O ESP8226 não suporta o modo de segurança."
#: ports/esp8266/common-hal/pulseio/PWMOut.c:54
#: ports/esp8266/common-hal/pulseio/PWMOut.c:113
#, c-format
msgid "Maximum PWM frequency is %dhz."
-msgstr ""
+msgstr "A frequência máxima PWM é de %dhz."
#: ports/esp8266/common-hal/pulseio/PWMOut.c:57
#: ports/esp8266/common-hal/pulseio/PWMOut.c:116
msgid "Minimum PWM frequency is 1hz."
-msgstr ""
+msgstr "A frequência mínima PWM é de 1hz"
#: ports/esp8266/common-hal/pulseio/PWMOut.c:68
#, c-format
msgid "Multiple PWM frequencies not supported. PWM already set to %dhz."
-msgstr ""
+msgstr "Múltiplas frequências PWM não suportadas. PWM já definido para %dhz."
#: ports/esp8266/common-hal/pulseio/PWMOut.c:77 ports/esp8266/machine_pwm.c:70
#, c-format
msgid "PWM not supported on pin %d"
-msgstr ""
+msgstr "PWM não suportado no pino %d"
#: ports/esp8266/common-hal/pulseio/PulseIn.c:78
msgid "No PulseIn support for %q"
-msgstr ""
+msgstr "Não há suporte para PulseIn no pino %q"
#: ports/esp8266/common-hal/storage/__init__.c:34
msgid "Unable to remount filesystem"
-msgstr ""
+msgstr "Não é possível remontar o sistema de arquivos"
#: ports/esp8266/common-hal/storage/__init__.c:38
msgid "Use esptool to erase flash and re-upload Python instead"
-msgstr ""
+msgstr "Use o esptool para apagar o flash e recarregar o Python"
#: ports/esp8266/esp_mphal.c:154
msgid "C-level assert"
@@ -561,151 +562,151 @@ msgstr ""
#: ports/esp8266/machine_adc.c:57
#, c-format
msgid "not a valid ADC Channel: %d"
-msgstr ""
+msgstr "não é um canal ADC válido: %d"
#: ports/esp8266/machine_hspi.c:131 ports/esp8266/machine_hspi.c:137
msgid "impossible baudrate"
-msgstr ""
+msgstr "taxa de transmissão impossível"
#: ports/esp8266/machine_pin.c:129
msgid "expecting a pin"
-msgstr ""
+msgstr "esperando um pino"
#: ports/esp8266/machine_pin.c:284
msgid "Pin(16) doesn't support pull"
-msgstr ""
+msgstr "Pino (16) não suporta pull"
#: ports/esp8266/machine_pin.c:323
msgid "invalid pin"
-msgstr ""
+msgstr "Pino inválido"
#: ports/esp8266/machine_pin.c:389
msgid "pin does not have IRQ capabilities"
-msgstr ""
+msgstr "Pino não tem recursos de IRQ"
#: ports/esp8266/machine_rtc.c:185
msgid "buffer too long"
-msgstr ""
+msgstr "buffer muito longo"
#: ports/esp8266/machine_rtc.c:209 ports/esp8266/machine_rtc.c:223
#: ports/esp8266/machine_rtc.c:246
msgid "invalid alarm"
-msgstr ""
+msgstr "Alarme inválido"
#: ports/esp8266/machine_uart.c:169
#, c-format
msgid "UART(%d) does not exist"
-msgstr ""
+msgstr "UART(%d) não existe"
#: ports/esp8266/machine_uart.c:219
msgid "UART(1) can't read"
-msgstr ""
+msgstr "UART(1) não pode ler"
#: ports/esp8266/modesp.c:119
msgid "len must be multiple of 4"
-msgstr ""
+msgstr "len deve ser múltiplo de 4"
#: ports/esp8266/modesp.c:274
#, c-format
msgid "memory allocation failed, allocating %u bytes for native code"
-msgstr ""
+msgstr "alocação de memória falhou, alocando %u bytes para código nativo"
#: ports/esp8266/modesp.c:317
msgid "flash location must be below 1MByte"
-msgstr ""
+msgstr "o local do flash deve estar abaixo de 1 MByte"
#: ports/esp8266/modmachine.c:63
msgid "frequency can only be either 80Mhz or 160MHz"
-msgstr ""
+msgstr "A frequência só pode ser 80Mhz ou 160MHz"
#: ports/esp8266/modnetwork.c:61
msgid "AP required"
-msgstr ""
+msgstr "AP requerido"
#: ports/esp8266/modnetwork.c:61
msgid "STA required"
-msgstr ""
+msgstr "STA requerido"
#: ports/esp8266/modnetwork.c:87
msgid "Cannot update i/f status"
-msgstr ""
+msgstr "Não é possível atualizar o status i/f"
#: ports/esp8266/modnetwork.c:142
msgid "Cannot set STA config"
-msgstr ""
+msgstr "Não é possível definir a configuração STA"
#: ports/esp8266/modnetwork.c:144
msgid "Cannot connect to AP"
-msgstr ""
+msgstr "Não é possível conectar-se ao AP"
#: ports/esp8266/modnetwork.c:152
msgid "Cannot disconnect from AP"
-msgstr ""
+msgstr "Não é possível desconectar do AP"
#: ports/esp8266/modnetwork.c:173
msgid "unknown status param"
-msgstr ""
+msgstr "parâmetro de status desconhecido"
#: ports/esp8266/modnetwork.c:222
msgid "STA must be active"
-msgstr ""
+msgstr "STA deve estar ativo"
#: ports/esp8266/modnetwork.c:239
msgid "scan failed"
-msgstr ""
+msgstr "varredura falhou"
#: ports/esp8266/modnetwork.c:306
msgid "wifi_set_ip_info() failed"
-msgstr ""
+msgstr "wifi_set_ip_info() falhou"
#: ports/esp8266/modnetwork.c:319
msgid "either pos or kw args are allowed"
-msgstr ""
+msgstr "pos ou kw args são permitidos"
#: ports/esp8266/modnetwork.c:329
msgid "can't get STA config"
-msgstr ""
+msgstr "não pode obter a configuração STA"
#: ports/esp8266/modnetwork.c:331
msgid "can't get AP config"
-msgstr ""
+msgstr "não pode obter configuração de AP"
#: ports/esp8266/modnetwork.c:346
msgid "invalid buffer length"
-msgstr ""
+msgstr "comprimento de buffer inválido"
#: ports/esp8266/modnetwork.c:405
msgid "can't set STA config"
-msgstr ""
+msgstr "não é possível definir a configuração STA"
#: ports/esp8266/modnetwork.c:407
msgid "can't set AP config"
-msgstr ""
+msgstr "não é possível definir a configuração do AP"
#: ports/esp8266/modnetwork.c:416
msgid "can query only one param"
-msgstr ""
+msgstr "pode consultar apenas um parâmetro"
#: ports/esp8266/modnetwork.c:469
msgid "unknown config param"
-msgstr ""
+msgstr "parâmetro configuração desconhecido"
#: ports/nrf/common-hal/analogio/AnalogOut.c:37
msgid "AnalogOut functionality not supported"
-msgstr ""
+msgstr "Funcionalidade AnalogOut não suportada"
#: ports/nrf/common-hal/busio/I2C.c:95
msgid "All I2C peripherals are in use"
-msgstr ""
+msgstr "Todos os periféricos I2C estão em uso"
#: ports/nrf/common-hal/busio/SPI.c:115
msgid "All SPI peripherals are in use"
-msgstr ""
+msgstr "Todos os periféricos SPI estão em uso"
#: ports/nrf/common-hal/busio/UART.c:48
#, c-format
msgid "error = 0x%08lX"
-msgstr ""
+msgstr "erro = 0x%08lX"
#: ports/nrf/common-hal/busio/UART.c:86
#, fuzzy
@@ -723,41 +724,46 @@ msgstr "I2C operação não suportada"
#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356
#: ports/nrf/common-hal/busio/UART.c:364
msgid "busio.UART not available"
-msgstr ""
+msgstr "busio.UART não disponível"
#: ports/nrf/common-hal/microcontroller/Processor.c:49
#, c-format
msgid "Can not get temperature. status: 0x%02x"
-msgstr ""
+msgstr "Não pode obter a temperatura. status: 0x%02x"
+
+#: ports/nrf/common-hal/pulseio/PWMOut.c:162
+#, fuzzy
+msgid "All PWM peripherals are in use"
+msgstr "Todos os temporizadores em uso"
#: ports/nrf/drivers/bluetooth/ble_drv.c:199
msgid "Cannot apply GAP parameters."
-msgstr ""
+msgstr "Não é possível aplicar parâmetros GAP."
#: ports/nrf/drivers/bluetooth/ble_drv.c:213
msgid "Cannot set PPCP parameters."
-msgstr ""
+msgstr "Não é possível definir parâmetros PPCP."
#: ports/nrf/drivers/bluetooth/ble_drv.c:245
msgid "Can not query for the device address."
-msgstr ""
+msgstr "Não é possível consultar o endereço do dispositivo."
#: ports/nrf/drivers/bluetooth/ble_drv.c:264
msgid "Can not add Vendor Specific 128-bit UUID."
-msgstr ""
+msgstr "Não é possível adicionar o UUID de 128 bits específico do fornecedor."
#: ports/nrf/drivers/bluetooth/ble_drv.c:284
#: ports/nrf/drivers/bluetooth/ble_drv.c:298
msgid "Can not add Service."
-msgstr ""
+msgstr "Não é possível adicionar o serviço."
#: ports/nrf/drivers/bluetooth/ble_drv.c:373
msgid "Can not add Characteristic."
-msgstr ""
+msgstr "Não é possível adicionar Característica."
#: ports/nrf/drivers/bluetooth/ble_drv.c:400
msgid "Can not apply device name in the stack."
-msgstr ""
+msgstr "Não é possível aplicar o nome do dispositivo na pilha."
#: ports/nrf/drivers/bluetooth/ble_drv.c:464
#: ports/nrf/drivers/bluetooth/ble_drv.c:514
@@ -767,39 +773,39 @@ msgstr ""
#: ports/nrf/drivers/bluetooth/ble_drv.c:470
#: ports/nrf/drivers/bluetooth/ble_drv.c:520
msgid "Can encode UUID into the advertisement packet."
-msgstr ""
+msgstr "Pode codificar o UUID no pacote de anúncios."
#: ports/nrf/drivers/bluetooth/ble_drv.c:545
msgid "Can not fit data into the advertisement packet."
-msgstr ""
+msgstr "Não é possível ajustar dados no pacote de anúncios."
#: ports/nrf/drivers/bluetooth/ble_drv.c:558
#: ports/nrf/drivers/bluetooth/ble_drv.c:604
#, c-format
msgid "Can not apply advertisement data. status: 0x%02x"
-msgstr ""
+msgstr "Não é possível aplicar dados de anúncio. status: 0x%02x"
#: ports/nrf/drivers/bluetooth/ble_drv.c:614
#, c-format
msgid "Can not start advertisement. status: 0x%02x"
-msgstr ""
+msgstr "Não é possível iniciar o anúncio. status: 0x%02x"
#: ports/nrf/drivers/bluetooth/ble_drv.c:631
#, c-format
msgid "Can not stop advertisement. status: 0x%02x"
-msgstr ""
+msgstr "Não pode parar propaganda. status: 0x%02x"
#: ports/nrf/drivers/bluetooth/ble_drv.c:650
#: ports/nrf/drivers/bluetooth/ble_drv.c:726
#, c-format
msgid "Can not read attribute value. status: 0x%02x"
-msgstr ""
+msgstr "Não é possível ler o valor do atributo. status: 0x%02x"
#: ports/nrf/drivers/bluetooth/ble_drv.c:667
#: ports/nrf/drivers/bluetooth/ble_drv.c:756
#, c-format
msgid "Can not write attribute value. status: 0x%02x"
-msgstr ""
+msgstr "Não é possível gravar o valor do atributo. status: 0x%02x"
#: ports/nrf/drivers/bluetooth/ble_drv.c:691
#, c-format
@@ -821,11 +827,11 @@ msgstr ""
#: ports/nrf/modules/ubluepy/ubluepy_service.c:132
#: ports/nrf/modules/ubluepy/ubluepy_uuid.c:137
msgid "Invalid UUID parameter"
-msgstr ""
+msgstr "Parâmetro UUID inválido"
#: ports/nrf/modules/ubluepy/ubluepy_service.c:73
msgid "Invalid Service type"
-msgstr ""
+msgstr "Tipo de serviço inválido"
#: ports/nrf/modules/ubluepy/ubluepy_uuid.c:127
msgid "Invalid UUID string length"
@@ -833,19 +839,19 @@ msgstr ""
#: ports/unix/modffi.c:138
msgid "Unknown type"
-msgstr ""
+msgstr "Tipo desconhecido"
#: ports/unix/modffi.c:207 ports/unix/modffi.c:265
msgid "Error in ffi_prep_cif"
-msgstr ""
+msgstr "Erro no ffi_prep_cif"
#: ports/unix/modffi.c:270
msgid "ffi_prep_closure_loc"
-msgstr ""
+msgstr "ffi_prep_closure_loc"
#: ports/unix/modffi.c:413
msgid "Don't know how to pass object to native function"
-msgstr ""
+msgstr "Não sabe como passar o objeto para a função nativa"
#: ports/unix/modusocket.c:474
#, c-format
@@ -854,34 +860,34 @@ msgstr ""
#: py/argcheck.c:44
msgid "function does not take keyword arguments"
-msgstr ""
+msgstr "função não aceita argumentos de palavras-chave"
#: py/argcheck.c:54 py/bc.c:85 py/objnamedtuple.c:104
#, c-format
msgid "function takes %d positional arguments but %d were given"
-msgstr ""
+msgstr "função leva %d argumentos posicionais, mas apenas %d foram passadas"
#: py/argcheck.c:64
#, c-format
msgid "function missing %d required positional arguments"
-msgstr ""
+msgstr "função ausente %d requer argumentos posicionais"
#: py/argcheck.c:72
#, c-format
msgid "function expected at most %d arguments, got %d"
-msgstr ""
+msgstr "função esperada na maioria dos %d argumentos, obteve %d"
#: py/argcheck.c:97
msgid "'%q' argument required"
-msgstr ""
+msgstr "'%q' argumento(s) requerido(s)"
#: py/argcheck.c:122
msgid "extra positional arguments given"
-msgstr ""
+msgstr "argumentos extra posicionais passados"
#: py/argcheck.c:130
msgid "extra keyword arguments given"
-msgstr ""
+msgstr "argumentos extras de palavras-chave passados"
#: py/argcheck.c:142
msgid "argument num/types mismatch"
@@ -1093,38 +1099,86 @@ msgstr ""
msgid "'data' requires integer arguments"
msgstr ""
-#: py/emitinlinextensa.c:86
-msgid "can only have up to 4 parameters to Xtensa assembly"
+#: py/emitinlinethumb.c:102
+msgid "can only have up to 4 parameters to Thumb assembly"
msgstr ""
-#: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96
-msgid "parameters must be registers in sequence a2 to a5"
+#: py/emitinlinethumb.c:107 py/emitinlinethumb.c:112
+msgid "parameters must be registers in sequence r0 to r3"
+msgstr ""
+
+#: py/emitinlinethumb.c:188 py/emitinlinethumb.c:230
+#, c-format
+msgid "'%s' expects at most r%d"
msgstr ""
-#: py/emitinlinextensa.c:162
+#: py/emitinlinethumb.c:197 py/emitinlinextensa.c:162
#, c-format
msgid "'%s' expects a register"
msgstr ""
-#: py/emitinlinextensa.c:169
+#: py/emitinlinethumb.c:211
+#, c-format
+msgid "'%s' expects a special register"
+msgstr ""
+
+#: py/emitinlinethumb.c:239
+#, c-format
+msgid "'%s' expects an FPU register"
+msgstr ""
+
+#: py/emitinlinethumb.c:292
+#, c-format
+msgid "'%s' expects {r0, r1, ...}"
+msgstr ""
+
+#: py/emitinlinethumb.c:299 py/emitinlinextensa.c:169
#, c-format
msgid "'%s' expects an integer"
msgstr ""
-#: py/emitinlinextensa.c:174
+#: py/emitinlinethumb.c:304
#, c-format
-msgid "'%s' integer %d is not within range %d..%d"
+msgid "'%s' integer 0x%x does not fit in mask 0x%x"
+msgstr ""
+
+#: py/emitinlinethumb.c:328
+#, c-format
+msgid "'%s' expects an address of the form [a, b]"
msgstr ""
-#: py/emitinlinextensa.c:182
+#: py/emitinlinethumb.c:334 py/emitinlinextensa.c:182
#, c-format
msgid "'%s' expects a label"
msgstr ""
-#: py/emitinlinextensa.c:193
+#: py/emitinlinethumb.c:345 py/emitinlinextensa.c:193
msgid "label '%q' not defined"
msgstr ""
+#: py/emitinlinethumb.c:806
+#, c-format
+msgid "unsupported Thumb instruction '%s' with %d arguments"
+msgstr ""
+
+#: py/emitinlinethumb.c:810
+#, fuzzy
+msgid "branch not in range"
+msgstr "Calibração está fora do intervalo"
+
+#: py/emitinlinextensa.c:86
+msgid "can only have up to 4 parameters to Xtensa assembly"
+msgstr ""
+
+#: py/emitinlinextensa.c:91 py/emitinlinextensa.c:96
+msgid "parameters must be registers in sequence a2 to a5"
+msgstr ""
+
+#: py/emitinlinextensa.c:174
+#, c-format
+msgid "'%s' integer %d is not within range %d..%d"
+msgstr ""
+
#: py/emitinlinextensa.c:327
#, c-format
msgid "unsupported Xtensa instruction '%s' with %d arguments"
@@ -1981,6 +2035,25 @@ msgid ""
"destination buffer must be a bytearray or array of type 'B' for bit_depth = 8"
msgstr ""
+#: shared-bindings/audioio/Mixer.c:94
+#, fuzzy
+msgid "Invalid voice count"
+msgstr "certificado inválido"
+
+#: shared-bindings/audioio/Mixer.c:99
+#, fuzzy
+msgid "Invalid channel count"
+msgstr "certificado inválido"
+
+#: shared-bindings/audioio/Mixer.c:103
+msgid "Sample rate must be positive"
+msgstr ""
+
+#: shared-bindings/audioio/Mixer.c:107
+#, fuzzy
+msgid "bits_per_sample must be 8 or 16"
+msgstr "bits devem ser 8"
+
#: shared-bindings/audioio/RawSample.c:98
msgid ""
"sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or "
@@ -2151,10 +2224,6 @@ msgstr ""
msgid "Stream missing readinto() or write() method."
msgstr ""
-#: shared-bindings/network/__init__.c:79 shared-bindings/socket/__init__.c:428
-msgid "no available NIC"
-msgstr ""
-
#: shared-bindings/nvm/ByteArray.c:99
msgid "Slice and value different lengths."
msgstr ""
@@ -2182,7 +2251,7 @@ msgstr ""
#: shared-bindings/pulseio/PWMOut.c:195
msgid ""
-"PWM frequency not writeable when variable_frequency is False on construction."
+"PWM frequency not writable when variable_frequency is False on construction."
msgstr ""
#: shared-bindings/pulseio/PulseIn.c:275
@@ -2230,6 +2299,10 @@ msgstr "O RTC não é suportado nesta placa"
msgid "RTC calibration is not supported on this board"
msgstr "A calibração RTC não é suportada nesta placa"
+#: shared-bindings/socket/__init__.c:428 shared-module/network/__init__.c:64
+msgid "no available NIC"
+msgstr ""
+
#: shared-bindings/storage/__init__.c:77
msgid "filesystem must provide mount method"
msgstr "sistema de arquivos deve fornecer método de montagem"
@@ -2276,6 +2349,34 @@ msgid ""
msgstr ""
"Objeto foi desinicializado e não pode ser mais usaado. Crie um novo objeto."
+#: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117
+msgid "Couldn't allocate first buffer"
+msgstr "Não pôde alocar primeiro buffer"
+
+#: shared-module/audioio/Mixer.c:53 shared-module/audioio/WaveFile.c:123
+msgid "Couldn't allocate second buffer"
+msgstr "Não pôde alocar segundo buffer"
+
+#: shared-module/audioio/Mixer.c:82
+msgid "Voice index too high"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:85
+msgid "The sample's sample rate does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:88
+msgid "The sample's channel count does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:91
+msgid "The sample's bits_per_sample does not match the mixer's"
+msgstr ""
+
+#: shared-module/audioio/Mixer.c:100
+msgid "The sample's signedness does not match the mixer's"
+msgstr ""
+
#: shared-module/audioio/WaveFile.c:61
msgid "Invalid wave file"
msgstr "Aqruivo de ondas inválido"
@@ -2296,14 +2397,6 @@ msgstr "Pedaço de dados deve seguir o pedaço de cortes"
msgid "Invalid file"
msgstr "Arquivo inválido"
-#: shared-module/audioio/WaveFile.c:117
-msgid "Couldn't allocate first buffer"
-msgstr "Não pôde alocar primeiro buffer"
-
-#: shared-module/audioio/WaveFile.c:123
-msgid "Couldn't allocate second buffer"
-msgstr "Não pôde alocar segundo buffer"
-
#: shared-module/bitbangio/I2C.c:58
msgid "Clock stretch too long"
msgstr "Clock se estendeu por tempo demais"
@@ -2369,3 +2462,6 @@ msgstr "'S' e 'O' não são tipos de formato suportados"
#: shared-module/struct/__init__.c:83
msgid "too many arguments provided with the given format"
msgstr "Muitos argumentos fornecidos com o formato dado"
+
+#~ msgid "Baud rate too high for this SPI peripheral"
+#~ msgstr "Taxa de transmissão muito alta para esse periférico SPI"
diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile
index 3a460ed8c..7861f4235 100644
--- a/ports/atmel-samd/Makefile
+++ b/ports/atmel-samd/Makefile
@@ -432,6 +432,8 @@ ifneq ($(CHIP_VARIANT),SAMR21G18A)
audioio/__init__.c \
audioio/AudioOut.c
SRC_SHARED_MODULE += \
+ audioio/__init__.c \
+ audioio/Mixer.c \
audioio/RawSample.c \
audioio/WaveFile.c
endif
diff --git a/ports/atmel-samd/audio_dma.c b/ports/atmel-samd/audio_dma.c
index 45d698c17..68d6f182d 100644
--- a/ports/atmel-samd/audio_dma.c
+++ b/ports/atmel-samd/audio_dma.c
@@ -40,82 +40,6 @@ static audio_dma_t* audio_dma_state[AUDIO_DMA_CHANNEL_COUNT];
// This cannot be in audio_dma_state because it's volatile.
static volatile bool audio_dma_pending[AUDIO_DMA_CHANNEL_COUNT];
-uint32_t audiosample_sample_rate(mp_obj_t sample_obj) {
- if (MP_OBJ_IS_TYPE(sample_obj, &audioio_rawsample_type)) {
- audioio_rawsample_obj_t* sample = MP_OBJ_TO_PTR(sample_obj);
- return sample->sample_rate;
- }
- if (MP_OBJ_IS_TYPE(sample_obj, &audioio_wavefile_type)) {
- audioio_wavefile_obj_t* file = MP_OBJ_TO_PTR(sample_obj);
- return file->sample_rate;
- }
- return 16000;
-}
-
-uint8_t audiosample_bits_per_sample(mp_obj_t sample_obj) {
- if (MP_OBJ_IS_TYPE(sample_obj, &audioio_rawsample_type)) {
- audioio_rawsample_obj_t* sample = MP_OBJ_TO_PTR(sample_obj);
- return sample->bits_per_sample;
- }
- if (MP_OBJ_IS_TYPE(sample_obj, &audioio_wavefile_type)) {
- audioio_wavefile_obj_t* file = MP_OBJ_TO_PTR(sample_obj);
- return file->bits_per_sample;
- }
- return 8;
-}
-
-uint8_t audiosample_channel_count(mp_obj_t sample_obj) {
- if (MP_OBJ_IS_TYPE(sample_obj, &audioio_rawsample_type)) {
- audioio_rawsample_obj_t* sample = MP_OBJ_TO_PTR(sample_obj);
- return sample->channel_count;
- }
- if (MP_OBJ_IS_TYPE(sample_obj, &audioio_wavefile_type)) {
- audioio_wavefile_obj_t* file = MP_OBJ_TO_PTR(sample_obj);
- return file->channel_count;
- }
- return 1;
-}
-
-static void audiosample_reset_buffer(mp_obj_t sample_obj, bool single_channel, uint8_t audio_channel) {
- if (MP_OBJ_IS_TYPE(sample_obj, &audioio_rawsample_type)) {
- audioio_rawsample_obj_t* sample = MP_OBJ_TO_PTR(sample_obj);
- audioio_rawsample_reset_buffer(sample, single_channel, audio_channel);
- }
- if (MP_OBJ_IS_TYPE(sample_obj, &audioio_wavefile_type)) {
- audioio_wavefile_obj_t* file = MP_OBJ_TO_PTR(sample_obj);
- audioio_wavefile_reset_buffer(file, single_channel, audio_channel);
- }
-}
-
-static audioio_get_buffer_result_t audiosample_get_buffer(mp_obj_t sample_obj,
- bool single_channel,
- uint8_t channel,
- uint8_t** buffer, uint32_t* buffer_length) {
- if (MP_OBJ_IS_TYPE(sample_obj, &audioio_rawsample_type)) {
- audioio_rawsample_obj_t* sample = MP_OBJ_TO_PTR(sample_obj);
- return audioio_rawsample_get_buffer(sample, single_channel, channel, buffer, buffer_length);
- }
- if (MP_OBJ_IS_TYPE(sample_obj, &audioio_wavefile_type)) {
- audioio_wavefile_obj_t* file = MP_OBJ_TO_PTR(sample_obj);
- return audioio_wavefile_get_buffer(file, single_channel, channel, buffer, buffer_length);
- }
- return GET_BUFFER_DONE;
-}
-
-static void audiosample_get_buffer_structure(mp_obj_t sample_obj, bool single_channel,
- bool* single_buffer, bool* samples_signed,
- uint32_t* max_buffer_length, uint8_t* spacing) {
- if (MP_OBJ_IS_TYPE(sample_obj, &audioio_rawsample_type)) {
- audioio_rawsample_obj_t* sample = MP_OBJ_TO_PTR(sample_obj);
- audioio_rawsample_get_buffer_structure(sample, single_channel, single_buffer,
- samples_signed, max_buffer_length, spacing);
- } else if (MP_OBJ_IS_TYPE(sample_obj, &audioio_wavefile_type)) {
- audioio_wavefile_obj_t* file = MP_OBJ_TO_PTR(sample_obj);
- audioio_wavefile_get_buffer_structure(file, single_channel, single_buffer, samples_signed,
- max_buffer_length, spacing);
- }
-}
-
uint8_t find_free_audio_dma_channel(void) {
uint8_t channel;
for (channel = 0; channel < AUDIO_DMA_CHANNEL_COUNT; channel++) {
diff --git a/ports/atmel-samd/common-hal/supervisor/Runtime.c b/ports/atmel-samd/common-hal/supervisor/Runtime.c
index 8efe7cb78..2636fe646 100755
--- a/ports/atmel-samd/common-hal/supervisor/Runtime.c
+++ b/ports/atmel-samd/common-hal/supervisor/Runtime.c
@@ -32,3 +32,7 @@ bool common_hal_get_serial_connected(void) {
return (bool) usb_connected();
}
+bool common_hal_get_serial_bytes_available(void) {
+ return (bool) usb_bytes_available();
+}
+
diff --git a/ports/atmel-samd/mpconfigport.h b/ports/atmel-samd/mpconfigport.h
index 20a2b6726..a6351cef6 100644
--- a/ports/atmel-samd/mpconfigport.h
+++ b/ports/atmel-samd/mpconfigport.h
@@ -225,7 +225,7 @@ extern const struct _mp_obj_module_t wiznet_module;
#define MICROPY_PY_URE (1)
#define MICROPY_PY_MICROPYTHON_MEM_INFO (1)
#ifndef MICROPY_PY_FRAMEBUF
- #define MICROPY_PY_FRAMEBUF (1)
+ #define MICROPY_PY_FRAMEBUF (0)
#endif
#define MICROPY_BUILTIN_METHOD_CHECK_SELF_ARG (1)
diff --git a/ports/esp8266/README.md b/ports/esp8266/README.md
index f4dddd1ca..5f0ad8073 100644
--- a/ports/esp8266/README.md
+++ b/ports/esp8266/README.md
@@ -34,6 +34,14 @@ run `make` in its directory to build and install the SDK locally. Make sure
to add toolchain bin directory to your PATH. Read esp-open-sdk's README for
additional important information on toolchain setup.
+Travis builds, including releases are actually built using a specific
+esp-open-sdk binary. The location of the binary can be seen in the
+`.travis.yml` in the top-level directory of CircuitPython. This may be ahead
+of or behind the pfalcon repository, depending on the specific needs of
+CircuitPython. If your local system is binary-compatible with Travis
+(most Ubuntu and Debian based systems are), you can download the binary and
+skip building it locally.
+
Add the external dependencies to the MicroPython repository checkout:
```bash
$ git submodule update --init
diff --git a/ports/nrf/common-hal/busio/SPI.c b/ports/nrf/common-hal/busio/SPI.c
index 405d19c23..f094b7f24 100644
--- a/ports/nrf/common-hal/busio/SPI.c
+++ b/ports/nrf/common-hal/busio/SPI.c
@@ -61,7 +61,7 @@ STATIC spim_peripheral_t spim_peripherals[] = {
void spi_reset(void) {
for (size_t i = 0 ; i < MP_ARRAY_SIZE(spim_peripherals); i++) {
- nrfx_spim_uninit(&spim_peripherals[i].spim);
+ nrf_spim_disable(spim_peripherals[i].spim.p_reg);
}
}
diff --git a/ports/nrf/common-hal/pulseio/PWMOut.c b/ports/nrf/common-hal/pulseio/PWMOut.c
index c3c51d566..5d94bab79 100644
--- a/ports/nrf/common-hal/pulseio/PWMOut.c
+++ b/ports/nrf/common-hal/pulseio/PWMOut.c
@@ -30,154 +30,159 @@
#include "py/runtime.h"
#include "common-hal/pulseio/PWMOut.h"
-#include "nrf_gpio.h"
#include "shared-bindings/pulseio/PWMOut.h"
#include "supervisor/shared/translate.h"
-#define PWM_MAX_MODULE 3
-#define PWM_MAX_CHANNEL 4
+#include "nrf_gpio.h"
#define PWM_MAX_FREQ (16000000)
-NRF_PWM_Type* const pwm_arr[PWM_MAX_MODULE] = { NRF_PWM0, NRF_PWM1, NRF_PWM2 };
-
-uint16_t _seq0[PWM_MAX_MODULE][PWM_MAX_CHANNEL];
-
-
-static int pin2channel(NRF_PWM_Type* pwm, uint8_t pin)
-{
- for(int i=0; i < PWM_MAX_CHANNEL; i++)
- {
- if ( pwm->PSEL.OUT[i] == ((uint32_t)pin) ) return i;
- }
-
- return -1;
-}
-
-static int find_free_channel(NRF_PWM_Type* pwm)
-{
- for(int i=0; i < PWM_MAX_CHANNEL; i++)
- {
- if (pwm->PSEL.OUT[i] == 0xFFFFFFFFUL)
- {
- return i;
+STATIC NRF_PWM_Type* pwms[] = {
+#if NRFX_CHECK(NRFX_PWM0_ENABLED)
+ NRF_PWM0,
+#endif
+#if NRFX_CHECK(NRFX_PWM1_ENABLED)
+ NRF_PWM1,
+#endif
+#if NRFX_CHECK(NRFX_PWM2_ENABLED)
+ NRF_PWM2,
+#endif
+#if NRFX_CHECK(NRFX_PWM3_ENABLED)
+ NRF_PWM3,
+#endif
+};
+
+#define CHANNELS_PER_PWM 4
+
+STATIC uint16_t pwm_seq[MP_ARRAY_SIZE(pwms)][CHANNELS_PER_PWM];
+
+void pwmout_reset(void) {
+ for(int i=0; i < MP_ARRAY_SIZE(pwms); i++) {
+ NRF_PWM_Type* pwm = pwms[i];
+
+ pwm->ENABLE = 0;
+ pwm->MODE = PWM_MODE_UPDOWN_Up;
+ pwm->DECODER = PWM_DECODER_LOAD_Individual;
+ pwm->LOOP = 0;
+ pwm->PRESCALER = PWM_PRESCALER_PRESCALER_DIV_1; // default is 500 hz
+ pwm->COUNTERTOP = (PWM_MAX_FREQ/500); // default is 500 hz
+
+ pwm->SEQ[0].PTR = (uint32_t) pwm_seq[i];
+ pwm->SEQ[0].CNT = CHANNELS_PER_PWM; // default mode is Individual --> count must be 4
+ pwm->SEQ[0].REFRESH = 0;
+ pwm->SEQ[0].ENDDELAY = 0;
+
+ pwm->SEQ[1].PTR = 0;
+ pwm->SEQ[1].CNT = 0;
+ pwm->SEQ[1].REFRESH = 0;
+ pwm->SEQ[1].ENDDELAY = 0;
+
+ for(int ch =0; ch < CHANNELS_PER_PWM; ch++) {
+ pwm_seq[i][ch] = (1 << 15); // polarity = 0
+ }
}
- }
-
- return -1;
}
-static bool pwm_is_unused(NRF_PWM_Type* pwm)
-{
- for(int i=0; i < PWM_MAX_CHANNEL; i++)
- {
- if (pwm->PSEL.OUT[i] != 0xFFFFFFFFUL)
- {
- return false;
+// Find the smallest prescaler value that will allow the divisor to be in range.
+// This allows the most accuracy.
+bool convert_frequency(uint32_t frequency, uint16_t *countertop, nrf_pwm_clk_t *base_clock) {
+ uint32_t divisor = 1;
+ // Use a 32-bit number so we don't overflow the uint16_t;
+ uint32_t tentative_countertop;
+ for (*base_clock = PWM_PRESCALER_PRESCALER_DIV_1;
+ *base_clock <= PWM_PRESCALER_PRESCALER_DIV_128;
+ (*base_clock)++) {
+ tentative_countertop = PWM_MAX_FREQ / divisor / frequency;
+ // COUNTERTOP must be 3..32767, according to datasheet, but 3 doesn't work. 4 does.
+ if (tentative_countertop <= 32767 && tentative_countertop >= 4) {
+ // In range, OK to return.
+ *countertop = tentative_countertop;
+ return true;
+ }
+ divisor *= 2;
}
- }
- return true;
+ return false;
}
-static void find_new_pwm(pulseio_pwmout_obj_t* self)
-{
- // First find unused PWM module
- for(int i=0; i<PWM_MAX_MODULE; i++)
- {
- if ( pwm_is_unused(pwm_arr[i]) )
- {
- self->pwm = pwm_arr[i];
- self->channel = 0;
- return;
- }
- }
-
- // Find available channel in a using PWM
- for(int i=0; i<PWM_MAX_MODULE; i++)
- {
- int ch = find_free_channel(pwm_arr[i]);
- if ( ch >= 0 )
- {
- self->pwm = pwm_arr[i];
- self->channel = (uint8_t) ch;
- return;
+void common_hal_pulseio_pwmout_construct(pulseio_pwmout_obj_t* self,
+ const mcu_pin_obj_t* pin,
+ uint16_t duty,
+ uint32_t frequency,
+ bool variable_frequency) {
+
+ // We don't use the nrfx driver here because we want to dynamically allocate channels
+ // as needed in an already-enabled PWM.
+
+ uint16_t countertop;
+ nrf_pwm_clk_t base_clock;
+ if (frequency == 0 || !convert_frequency(frequency, &countertop, &base_clock)) {
+ mp_raise_ValueError(translate("Invalid PWM frequency"));
}
- }
-}
-void pwmout_reset(void)
-{
- for(int i=0; i<PWM_MAX_MODULE; i++)
- {
- NRF_PWM_Type* pwm = pwm_arr[i];
-
- pwm->MODE = PWM_MODE_UPDOWN_Up;
- pwm->DECODER = PWM_DECODER_LOAD_Individual;
- pwm->LOOP = 0;
- pwm->PRESCALER = PWM_PRESCALER_PRESCALER_DIV_1; // default is 500 hz
- pwm->COUNTERTOP = (PWM_MAX_FREQ/500); // default is 500 hz
-
- pwm->SEQ[0].PTR = (uint32_t) _seq0[i];
- pwm->SEQ[0].CNT = PWM_MAX_CHANNEL; // default mode is Individual --> count must be 4
- pwm->SEQ[0].REFRESH = 0;
- pwm->SEQ[0].ENDDELAY = 0;
-
- pwm->SEQ[1].PTR = 0;
- pwm->SEQ[1].CNT = 0;
- pwm->SEQ[1].REFRESH = 0;
- pwm->SEQ[1].ENDDELAY = 0;
-
- for(int ch =0; ch < PWM_MAX_CHANNEL; ch++)
- {
- _seq0[i][ch] = (1UL << 15); // polarity = 0
+ self->pwm = NULL;
+ self->channel = CHANNELS_PER_PWM; // out-of-range value.
+ bool pwm_already_in_use;
+ NRF_PWM_Type* pwm;
+
+ for (size_t i = 0 ; i < MP_ARRAY_SIZE(pwms); i++) {
+ pwm = pwms[i];
+ pwm_already_in_use = pwm->ENABLE & SPIM_ENABLE_ENABLE_Msk;
+ if (pwm_already_in_use) {
+ if (variable_frequency) {
+ // Variable frequency requires exclusive use of a PWM, so try the next one.
+ continue;
+ }
+
+ // PWM is in use, but see if it's set to the same frequency we need. If so,
+ // look for a free channel.
+ if (pwm->COUNTERTOP == countertop && pwm->PRESCALER == base_clock) {
+ for (size_t chan = 0; chan < CHANNELS_PER_PWM; chan++) {
+ if (pwm->PSEL.OUT[chan] == 0xFFFFFFFF) {
+ // Channel is free.
+ self->pwm = pwm;
+ self->channel = chan;
+ break;
+ }
+ }
+ // Did we find a channel? If not, loop and check the next pwm.
+ if (self->pwm != NULL) {
+ break;
+ }
+ }
+ } else {
+ // PWM not yet in use, so we can start to use it. Use channel 0.
+ self->pwm = pwm;
+ self->channel = 0;
+ break;
+ }
}
- }
-}
-void common_hal_pulseio_pwmout_construct(pulseio_pwmout_obj_t* self,
- const mcu_pin_obj_t* pin,
- uint16_t duty,
- uint32_t frequency,
- bool variable_frequency) {
- self->pwm = NULL;
- self->pin = pin;
-
- // check if mapped to PWM channel already
- for(int i=0; i<PWM_MAX_MODULE; i++)
- {
- int ch = pin2channel(pwm_arr[i], pin->number);
- if ( ch >= 0 )
- {
- self->pwm = pwm_arr[i];
- self->channel = (uint8_t) ch;
- break;
+ if (self->pwm == NULL) {
+ mp_raise_ValueError(translate("All PWM peripherals are in use"));
}
- }
- // Haven't mapped before
- if ( !self->pwm )
- {
- find_new_pwm(self);
- }
+ self->pin_number = pin->number;
+ claim_pin(pin);
+
+ self->frequency = frequency;
+ self->variable_frequency = variable_frequency;
- if (self->pwm)
- {
- nrf_gpio_cfg_output(pin->number);
+ nrf_gpio_cfg_output(self->pin_number);
// disable before mapping pin channel
- self->pwm->ENABLE = 0;
+ nrf_pwm_disable(pwm);
- self->pwm->PSEL.OUT[self->channel] = pin->number;
+ if (!pwm_already_in_use) {
+ nrf_pwm_configure(pwm, base_clock, NRF_PWM_MODE_UP, countertop);
+ }
- self->pwm->COUNTERTOP = (PWM_MAX_FREQ/frequency);
- self->freq = frequency;
- self->variable_freq = variable_frequency;
+ // Connect channel to pin, without disturbing other channels.
+ pwm->PSEL.OUT[self->channel] = pin->number;
- self->pwm->ENABLE = 1;
+ nrf_pwm_enable(pwm);
common_hal_pulseio_pwmout_set_duty_cycle(self, duty);
- }
}
bool common_hal_pulseio_pwmout_deinited(pulseio_pwmout_obj_t* self) {
@@ -185,57 +190,60 @@ bool common_hal_pulseio_pwmout_deinited(pulseio_pwmout_obj_t* self) {
}
void common_hal_pulseio_pwmout_deinit(pulseio_pwmout_obj_t* self) {
- if (common_hal_pulseio_pwmout_deinited(self)) {
- return;
- }
+ if (common_hal_pulseio_pwmout_deinited(self)) {
+ return;
+ }
- self->pwm->ENABLE = 0;
+ nrf_gpio_cfg_default(self->pin_number);
- self->pwm->PSEL.OUT[self->channel] = 0xFFFFFFFFUL;
+ NRF_PWM_Type* pwm = self->pwm;
+ self->pwm = NULL;
- // re-enable PWM module if there is other active channel
- for(int i=0; i < PWM_MAX_CHANNEL; i++)
- {
- if (self->pwm->PSEL.OUT[i] != 0xFFFFFFFFUL)
- {
- self->pwm->ENABLE = 1;
- break;
- }
- }
+ // Disconnect pin from channel.
+ pwm->PSEL.OUT[self->channel] = 0xFFFFFFFF;
- nrf_gpio_cfg_default(self->pin->number);
+ for(int i=0; i < CHANNELS_PER_PWM; i++) {
+ if (self->pwm->PSEL.OUT[i] != 0xFFFFFFFF) {
+ // Some channel is still being used, so don't disable.
+ return;
+ }
+ }
- self->pwm = NULL;
- self->pin = mp_const_none;
+ nrf_pwm_disable(pwm);
}
-void common_hal_pulseio_pwmout_set_duty_cycle(pulseio_pwmout_obj_t* self, uint16_t duty) {
- self->duty = duty;
+void common_hal_pulseio_pwmout_set_duty_cycle(pulseio_pwmout_obj_t* self, uint16_t duty_cycle) {
+ self->duty_cycle = duty_cycle;
- uint16_t* p_value = ((uint16_t*)self->pwm->SEQ[0].PTR) + self->channel;
- *p_value = ((duty * self->pwm->COUNTERTOP) / 0xFFFF) | (1 << 15);
+ uint16_t* p_value = ((uint16_t*)self->pwm->SEQ[0].PTR) + self->channel;
+ *p_value = ((duty_cycle * self->pwm->COUNTERTOP) / 0xFFFF) | (1 << 15);
- self->pwm->TASKS_SEQSTART[0] = 1;
+ self->pwm->TASKS_SEQSTART[0] = 1;
}
uint16_t common_hal_pulseio_pwmout_get_duty_cycle(pulseio_pwmout_obj_t* self) {
- return self->duty;
+ return self->duty_cycle;
}
void common_hal_pulseio_pwmout_set_frequency(pulseio_pwmout_obj_t* self, uint32_t frequency) {
- if (frequency == 0 || frequency > 16000000) {
- mp_raise_ValueError(translate("Invalid PWM frequency"));
- }
+ // COUNTERTOP is 3..32767, so highest available frequency is PWM_MAX_FREQ / 3.
+ uint16_t countertop;
+ nrf_pwm_clk_t base_clock;
+ if (frequency == 0 || !convert_frequency(frequency, &countertop, &base_clock)) {
+ mp_raise_ValueError(translate("Invalid PWM frequency"));
+ }
+ self->frequency = frequency;
- self->freq = frequency;
- self->pwm->COUNTERTOP = (PWM_MAX_FREQ/frequency);
- self->pwm->TASKS_SEQSTART[0] = 1;
+ nrf_pwm_configure(self->pwm, base_clock, NRF_PWM_MODE_UP, countertop);
+ // Set the duty cycle again, because it depends on COUNTERTOP, which probably changed.
+ // Setting the duty cycle will also do a SEQSTART.
+ common_hal_pulseio_pwmout_set_duty_cycle(self, self->duty_cycle);
}
uint32_t common_hal_pulseio_pwmout_get_frequency(pulseio_pwmout_obj_t* self) {
- return self->freq;
+ return self->frequency;
}
bool common_hal_pulseio_pwmout_get_variable_frequency(pulseio_pwmout_obj_t* self) {
- return self->variable_freq;
+ return self->variable_frequency;
}
diff --git a/ports/nrf/common-hal/pulseio/PWMOut.h b/ports/nrf/common-hal/pulseio/PWMOut.h
index 9de127ac7..a4e58dc1a 100644
--- a/ports/nrf/common-hal/pulseio/PWMOut.h
+++ b/ports/nrf/common-hal/pulseio/PWMOut.h
@@ -27,19 +27,17 @@
#ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_PULSEIO_PWMOUT_H
#define MICROPY_INCLUDED_NRF_COMMON_HAL_PULSEIO_PWMOUT_H
-#include "common-hal/microcontroller/Pin.h"
-
+#include "nrfx_pwm.h"
#include "py/obj.h"
typedef struct {
mp_obj_base_t base;
- const mcu_pin_obj_t *pin;
NRF_PWM_Type* pwm;
-
- uint8_t channel;
- bool variable_freq;
- uint16_t duty;
- uint32_t freq;
+ uint8_t pin_number;
+ uint8_t channel: 7;
+ bool variable_frequency: 1;
+ uint16_t duty_cycle;
+ uint32_t frequency;
} pulseio_pwmout_obj_t;
void pwmout_reset(void);
diff --git a/ports/nrf/common-hal/supervisor/Runtime.c b/ports/nrf/common-hal/supervisor/Runtime.c
index b73a94a1b..feab6987d 100755
--- a/ports/nrf/common-hal/supervisor/Runtime.c
+++ b/ports/nrf/common-hal/supervisor/Runtime.c
@@ -32,3 +32,7 @@ bool common_hal_get_serial_connected(void) {
return (bool) serial_connected();
}
+bool common_hal_get_serial_bytes_available(void) {
+ return (bool) serial_bytes_available();
+}
+
diff --git a/ports/nrf/nrfx b/ports/nrf/nrfx
-Subproject 67710e47c7313cc56a15748e485079831ee6a3a
+Subproject d4ebe15f58de1442e3eed93b40d13930e778590
diff --git a/ports/nrf/supervisor/filesystem.c b/ports/nrf/supervisor/filesystem.c
index 1a3165a2d..b6611417d 100644
--- a/ports/nrf/supervisor/filesystem.c
+++ b/ports/nrf/supervisor/filesystem.c
@@ -36,7 +36,7 @@ static mp_vfs_mount_t _mp_vfs;
static fs_user_mount_t _internal_vfs;
-void filesystem_init(bool create_allowed) {
+void filesystem_init(bool create_allowed, bool force_create) {
// init the vfs object
fs_user_mount_t *int_vfs = &_internal_vfs;
int_vfs->flags = 0;
@@ -45,7 +45,7 @@ void filesystem_init(bool create_allowed) {
// try to mount the flash
FRESULT res = f_mount(&int_vfs->fatfs);
- if (res == FR_NO_FILESYSTEM && create_allowed) {
+ if ((res == FR_NO_FILESYSTEM && create_allowed) || force_create) {
// no filesystem so create a fresh one
uint8_t working_buf[_MAX_SS];
res = f_mkfs(&int_vfs->fatfs, FM_FAT | FM_SFD, 4096, working_buf, sizeof(working_buf));
diff --git a/py/emitinlinethumb.c b/py/emitinlinethumb.c
index 577f65672..7f0ec6659 100644
--- a/py/emitinlinethumb.c
+++ b/py/emitinlinethumb.c
@@ -59,7 +59,7 @@ struct _emit_inline_asm_t {
qstr *label_lookup;
};
-STATIC void emit_inline_thumb_error_msg(emit_inline_asm_t *emit, const char *msg) {
+STATIC void emit_inline_thumb_error_msg(emit_inline_asm_t *emit, const compressed_string_t *msg) {
*emit->error_slot = mp_obj_new_exception_msg(&mp_type_SyntaxError, msg);
}
@@ -99,17 +99,17 @@ STATIC void emit_inline_thumb_end_pass(emit_inline_asm_t *emit, mp_uint_t type_s
STATIC mp_uint_t emit_inline_thumb_count_params(emit_inline_asm_t *emit, mp_uint_t n_params, mp_parse_node_t *pn_params) {
if (n_params > 4) {
- emit_inline_thumb_error_msg(emit, "can only have up to 4 parameters to Thumb assembly");
+ emit_inline_thumb_error_msg(emit, translate("can only have up to 4 parameters to Thumb assembly"));
return 0;
}
for (mp_uint_t i = 0; i < n_params; i++) {
if (!MP_PARSE_NODE_IS_ID(pn_params[i])) {
- emit_inline_thumb_error_msg(emit, "parameters must be registers in sequence r0 to r3");
+ emit_inline_thumb_error_msg(emit, translate("parameters must be registers in sequence r0 to r3"));
return 0;
}
const char *p = qstr_str(MP_PARSE_NODE_LEAF_ARG(pn_params[i]));
if (!(strlen(p) == 2 && p[0] == 'r' && p[1] == '0' + i)) {
- emit_inline_thumb_error_msg(emit, "parameters must be registers in sequence r0 to r3");
+ emit_inline_thumb_error_msg(emit, translate("parameters must be registers in sequence r0 to r3"));
return 0;
}
}
@@ -185,7 +185,7 @@ STATIC mp_uint_t get_arg_reg(emit_inline_asm_t *emit, const char *op, mp_parse_n
if (r->reg > max_reg) {
emit_inline_thumb_error_exc(emit,
mp_obj_new_exception_msg_varg(&mp_type_SyntaxError,
- "'%s' expects at most r%d", op, max_reg));
+ translate("'%s' expects at most r%d"), op, max_reg));
return 0;
} else {
return r->reg;
@@ -194,7 +194,7 @@ STATIC mp_uint_t get_arg_reg(emit_inline_asm_t *emit, const char *op, mp_parse_n
}
emit_inline_thumb_error_exc(emit,
mp_obj_new_exception_msg_varg(&mp_type_SyntaxError,
- "'%s' expects a register", op));
+ translate("'%s' expects a register"), op));
return 0;
}
@@ -208,7 +208,7 @@ STATIC mp_uint_t get_arg_special_reg(emit_inline_asm_t *emit, const char *op, mp
}
emit_inline_thumb_error_exc(emit,
mp_obj_new_exception_msg_varg(&mp_type_SyntaxError,
- "'%s' expects a special register", op));
+ translate("'%s' expects a special register"), op));
return 0;
}
@@ -227,7 +227,7 @@ STATIC mp_uint_t get_arg_vfpreg(emit_inline_asm_t *emit, const char *op, mp_pars
if (regno > 31) {
emit_inline_thumb_error_exc(emit,
mp_obj_new_exception_msg_varg(&mp_type_SyntaxError,
- "'%s' expects at most r%d", op, 31));
+ translate("'%s' expects at most r%d"), op, 31));
return 0;
} else {
return regno;
@@ -236,7 +236,7 @@ STATIC mp_uint_t get_arg_vfpreg(emit_inline_asm_t *emit, const char *op, mp_pars
malformed:
emit_inline_thumb_error_exc(emit,
mp_obj_new_exception_msg_varg(&mp_type_SyntaxError,
- "'%s' expects an FPU register", op));
+ translate("'%s' expects an FPU register"), op));
return 0;
}
#endif
@@ -289,19 +289,19 @@ STATIC mp_uint_t get_arg_reglist(emit_inline_asm_t *emit, const char *op, mp_par
return reglist;
bad_arg:
- emit_inline_thumb_error_exc(emit, mp_obj_new_exception_msg_varg(&mp_type_SyntaxError, "'%s' expects {r0, r1, ...}", op));
+ emit_inline_thumb_error_exc(emit, mp_obj_new_exception_msg_varg(&mp_type_SyntaxError, translate("'%s' expects {r0, r1, ...}"), op));
return 0;
}
STATIC uint32_t get_arg_i(emit_inline_asm_t *emit, const char *op, mp_parse_node_t pn, uint32_t fit_mask) {
mp_obj_t o;
if (!mp_parse_node_get_int_maybe(pn, &o)) {
- emit_inline_thumb_error_exc(emit, mp_obj_new_exception_msg_varg(&mp_type_SyntaxError, "'%s' expects an integer", op));
+ emit_inline_thumb_error_exc(emit, mp_obj_new_exception_msg_varg(&mp_type_SyntaxError, translate("'%s' expects an integer"), op));
return 0;
}
uint32_t i = mp_obj_get_int_truncated(o);
if ((i & (~fit_mask)) != 0) {
- emit_inline_thumb_error_exc(emit, mp_obj_new_exception_msg_varg(&mp_type_SyntaxError, "'%s' integer 0x%x does not fit in mask 0x%x", op, i, fit_mask));
+ emit_inline_thumb_error_exc(emit, mp_obj_new_exception_msg_varg(&mp_type_SyntaxError, translate("'%s' integer 0x%x does not fit in mask 0x%x"), op, i, fit_mask));
return 0;
}
return i;
@@ -325,13 +325,13 @@ STATIC bool get_arg_addr(emit_inline_asm_t *emit, const char *op, mp_parse_node_
return true;
bad_arg:
- emit_inline_thumb_error_exc(emit, mp_obj_new_exception_msg_varg(&mp_type_SyntaxError, "'%s' expects an address of the form [a, b]", op));
+ emit_inline_thumb_error_exc(emit, mp_obj_new_exception_msg_varg(&mp_type_SyntaxError, translate("'%s' expects an address of the form [a, b]"), op));
return false;
}
STATIC int get_arg_label(emit_inline_asm_t *emit, const char *op, mp_parse_node_t pn) {
if (!MP_PARSE_NODE_IS_ID(pn)) {
- emit_inline_thumb_error_exc(emit, mp_obj_new_exception_msg_varg(&mp_type_SyntaxError, "'%s' expects a label", op));
+ emit_inline_thumb_error_exc(emit, mp_obj_new_exception_msg_varg(&mp_type_SyntaxError, translate("'%s' expects a label"), op));
return 0;
}
qstr label_qstr = MP_PARSE_NODE_LEAF_ARG(pn);
@@ -342,7 +342,7 @@ STATIC int get_arg_label(emit_inline_asm_t *emit, const char *op, mp_parse_node_
}
// only need to have the labels on the last pass
if (emit->pass == MP_PASS_EMIT) {
- emit_inline_thumb_error_exc(emit, mp_obj_new_exception_msg_varg(&mp_type_SyntaxError, "label '%q' not defined", label_qstr));
+ emit_inline_thumb_error_exc(emit, mp_obj_new_exception_msg_varg(&mp_type_SyntaxError, translate("label '%q' not defined"), label_qstr));
}
return 0;
}
@@ -803,11 +803,11 @@ STATIC void emit_inline_thumb_op(emit_inline_asm_t *emit, qstr op, mp_uint_t n_a
return;
unknown_op:
- emit_inline_thumb_error_exc(emit, mp_obj_new_exception_msg_varg(&mp_type_SyntaxError, "unsupported Thumb instruction '%s' with %d arguments", op_str, n_args));
+ emit_inline_thumb_error_exc(emit, mp_obj_new_exception_msg_varg(&mp_type_SyntaxError, translate("unsupported Thumb instruction '%s' with %d arguments"), op_str, n_args));
return;
branch_not_in_range:
- emit_inline_thumb_error_msg(emit, "branch not in range");
+ emit_inline_thumb_error_msg(emit, translate("branch not in range"));
return;
}
diff --git a/shared-bindings/audioio/Mixer.c b/shared-bindings/audioio/Mixer.c
new file mode 100644
index 000000000..dc7a12ebc
--- /dev/null
+++ b/shared-bindings/audioio/Mixer.c
@@ -0,0 +1,249 @@
+/*
+ * This file is part of the Micro Python 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 "shared-bindings/audioio/Mixer.h"
+
+#include <stdint.h>
+
+#include "lib/utils/context_manager_helpers.h"
+#include "py/binary.h"
+#include "py/objproperty.h"
+#include "py/runtime.h"
+#include "shared-bindings/microcontroller/Pin.h"
+#include "shared-bindings/audioio/RawSample.h"
+#include "shared-bindings/util.h"
+#include "supervisor/shared/translate.h"
+
+//| .. currentmodule:: audioio
+//|
+//| :class:`Mixer` -- Mixes one or more audio samples together
+//| ===========================================================
+//|
+//| Mixer mixes multiple samples into one sample.
+//|
+//| .. class:: Mixer(channel_count=2, buffer_size=1024)
+//|
+//| Create a Mixer object that can mix multiple channels with the same sample rate.
+//|
+//| :param int channel_count: The maximum number of samples to mix at once
+//| :param int buffer_size: The total size in bytes of the buffers to mix into
+//|
+//| Playing a wave file from flash::
+//|
+//| import board
+//| import audioio
+//| import digitalio
+//|
+//| # Required for CircuitPlayground Express
+//| speaker_enable = digitalio.DigitalInOut(board.SPEAKER_ENABLE)
+//| speaker_enable.switch_to_output(value=True)
+//|
+//| music = audioio.WaveFile(open("cplay-5.1-16bit-16khz.wav", "rb"))
+//| drum = audioio.WaveFile(open("drum.wav", "rb"))
+//| mixer = audioio.Mixer(voice_count=2, sample_rate=16000, channel_count=1, bits_per_sample=16, samples_signed=True)
+//| a = audioio.AudioOut(board.A0)
+//|
+//| print("playing")
+//| a.play(mixer)
+//| mixer.play(music, voice=0)
+//| while mixer.playing:
+//| mixer.play(drum, voice=1)
+//| time.sleep(1)
+//| print("stopped")
+//|
+STATIC mp_obj_t audioio_mixer_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args) {
+ mp_arg_check_num(n_args, n_kw, 0, 2, true);
+ mp_map_t kw_args;
+ mp_map_init_fixed_table(&kw_args, n_kw, pos_args + n_args);
+ enum { ARG_voice_count, ARG_buffer_size, ARG_channel_count, ARG_bits_per_sample, ARG_samples_signed, ARG_sample_rate };
+ static const mp_arg_t allowed_args[] = {
+ { MP_QSTR_voice_count, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 2} },
+ { MP_QSTR_buffer_size, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 1024} },
+ { MP_QSTR_channel_count, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 2} },
+ { MP_QSTR_bits_per_sample, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 16} },
+ { MP_QSTR_samples_signed, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = true} },
+ { MP_QSTR_sample_rate, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 8000} },
+ };
+ mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
+ mp_arg_parse_all(n_args, pos_args, &kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
+
+ mp_int_t voice_count = args[ARG_voice_count].u_int;
+ if (voice_count < 1 || voice_count > 255) {
+ mp_raise_ValueError(translate("Invalid voice count"));
+ }
+
+ mp_int_t channel_count = args[ARG_channel_count].u_int;
+ if (channel_count < 1 || channel_count > 2) {
+ mp_raise_ValueError(translate("Invalid channel count"));
+ }
+ mp_int_t sample_rate = args[ARG_sample_rate].u_int;
+ if (sample_rate < 1) {
+ mp_raise_ValueError(translate("Sample rate must be positive"));
+ }
+ mp_int_t bits_per_sample = args[ARG_bits_per_sample].u_int;
+ if (bits_per_sample != 8 && bits_per_sample != 16) {
+ mp_raise_ValueError(translate("bits_per_sample must be 8 or 16"));
+ }
+ audioio_mixer_obj_t *self = m_new_obj_var(audioio_mixer_obj_t, audioio_mixer_voice_t, voice_count);
+ self->base.type = &audioio_mixer_type;
+ common_hal_audioio_mixer_construct(self, voice_count, args[ARG_buffer_size].u_int, bits_per_sample, args[ARG_samples_signed].u_bool, channel_count, sample_rate);
+
+ return MP_OBJ_FROM_PTR(self);
+}
+
+//| .. method:: deinit()
+//|
+//| Deinitialises the Mixer and releases any hardware resources for reuse.
+//|
+STATIC mp_obj_t audioio_mixer_deinit(mp_obj_t self_in) {
+ audioio_mixer_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ common_hal_audioio_mixer_deinit(self);
+ return mp_const_none;
+}
+STATIC MP_DEFINE_CONST_FUN_OBJ_1(audioio_mixer_deinit_obj, audioio_mixer_deinit);
+
+//| .. method:: __enter__()
+//|
+//| No-op used by Context Managers.
+//|
+// Provided by context manager helper.
+
+//| .. method:: __exit__()
+//|
+//| Automatically deinitializes the hardware when exiting a context. See
+//| :ref:`lifetime-and-contextmanagers` for more info.
+//|
+STATIC mp_obj_t audioio_mixer_obj___exit__(size_t n_args, const mp_obj_t *args) {
+ (void)n_args;
+ common_hal_audioio_mixer_deinit(args[0]);
+ return mp_const_none;
+}
+STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(audioio_mixer___exit___obj, 4, 4, audioio_mixer_obj___exit__);
+
+
+//| .. method:: play(sample, *, voice=0, loop=False)
+//|
+//| Plays the sample once when loop=False and continuously when loop=True.
+//| Does not block. Use `playing` to block.
+//|
+//| Sample must be an `audioio.WaveFile`, `audioio.Mixer` or `audioio.RawSample`.
+//|
+//| The sample must match the Mixer's encoding settings given in the constructor.
+//|
+STATIC mp_obj_t audioio_mixer_obj_play(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
+ enum { ARG_sample, ARG_voice, ARG_loop };
+ static const mp_arg_t allowed_args[] = {
+ { MP_QSTR_sample, MP_ARG_OBJ | MP_ARG_REQUIRED },
+ { MP_QSTR_voice, MP_ARG_INT | MP_ARG_KW_ONLY, {.u_int = 0} },
+ { MP_QSTR_loop, MP_ARG_BOOL | MP_ARG_KW_ONLY, {.u_bool = false} },
+ };
+ audioio_mixer_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]);
+ raise_error_if_deinited(common_hal_audioio_mixer_deinited(self));
+ mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
+ mp_arg_parse_all(n_args - 1, pos_args + 1, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args);
+
+ mp_obj_t sample = args[ARG_sample].u_obj;
+ common_hal_audioio_mixer_play(self, sample, args[ARG_voice].u_int, args[ARG_loop].u_bool);
+
+ return mp_const_none;
+}
+MP_DEFINE_CONST_FUN_OBJ_KW(audioio_mixer_play_obj, 1, audioio_mixer_obj_play);
+
+//| .. method:: stop_voice(voice=0)
+//|
+//| Stops playback of the sample on the given voice.
+//|
+STATIC mp_obj_t audioio_mixer_obj_stop_voice(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
+ enum { ARG_voice };
+ static const mp_arg_t allowed_args[] = {
+ { MP_QSTR_voice, MP_ARG_INT, {.u_int = 0} },
+ };
+ audioio_mixer_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]);
+ raise_error_if_deinited(common_hal_audioio_mixer_deinited(self));
+ 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);
+
+ common_hal_audioio_mixer_stop_voice(self, args[ARG_voice].u_int);
+ return mp_const_none;
+}
+MP_DEFINE_CONST_FUN_OBJ_KW(audioio_mixer_stop_voice_obj, 1, audioio_mixer_obj_stop_voice);
+
+//| .. attribute:: playing
+//|
+//| True when any voice is being output. (read-only)
+//|
+STATIC mp_obj_t audioio_mixer_obj_get_playing(mp_obj_t self_in) {
+ audioio_mixer_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ raise_error_if_deinited(common_hal_audioio_mixer_deinited(self));
+ return mp_obj_new_bool(common_hal_audioio_mixer_get_playing(self));
+}
+MP_DEFINE_CONST_FUN_OBJ_1(audioio_mixer_get_playing_obj, audioio_mixer_obj_get_playing);
+
+const mp_obj_property_t audioio_mixer_playing_obj = {
+ .base.type = &mp_type_property,
+ .proxy = {(mp_obj_t)&audioio_mixer_get_playing_obj,
+ (mp_obj_t)&mp_const_none_obj,
+ (mp_obj_t)&mp_const_none_obj},
+};
+
+//| .. attribute:: sample_rate
+//|
+//| 32 bit value that dictates how quickly samples are played in Hertz (cycles per second).
+//|
+STATIC mp_obj_t audioio_mixer_obj_get_sample_rate(mp_obj_t self_in) {
+ audioio_mixer_obj_t *self = MP_OBJ_TO_PTR(self_in);
+ raise_error_if_deinited(common_hal_audioio_mixer_deinited(self));
+ return MP_OBJ_NEW_SMALL_INT(common_hal_audioio_mixer_get_sample_rate(self));
+}
+MP_DEFINE_CONST_FUN_OBJ_1(audioio_mixer_get_sample_rate_obj, audioio_mixer_obj_get_sample_rate);
+
+
+const mp_obj_property_t audioio_mixer_sample_rate_obj = {
+ .base.type = &mp_type_property,
+ .proxy = {(mp_obj_t)&audioio_mixer_get_sample_rate_obj,
+ (mp_obj_t)&mp_const_none_obj,
+ (mp_obj_t)&mp_const_none_obj},
+};
+
+STATIC const mp_rom_map_elem_t audioio_mixer_locals_dict_table[] = {
+ // Methods
+ { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&audioio_mixer_deinit_obj) },
+ { MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj) },
+ { MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&audioio_mixer___exit___obj) },
+ { MP_ROM_QSTR(MP_QSTR_play), MP_ROM_PTR(&audioio_mixer_play_obj) },
+ { MP_ROM_QSTR(MP_QSTR_stop_voice), MP_ROM_PTR(&audioio_mixer_stop_voice_obj) },
+
+ // Properties
+ { MP_ROM_QSTR(MP_QSTR_playing), MP_ROM_PTR(&audioio_mixer_playing_obj) },
+ { MP_ROM_QSTR(MP_QSTR_sample_rate), MP_ROM_PTR(&audioio_mixer_sample_rate_obj) },
+};
+STATIC MP_DEFINE_CONST_DICT(audioio_mixer_locals_dict, audioio_mixer_locals_dict_table);
+
+const mp_obj_type_t audioio_mixer_type = {
+ { &mp_type_type },
+ .name = MP_QSTR_Mixer,
+ .make_new = audioio_mixer_make_new,
+ .locals_dict = (mp_obj_dict_t*)&audioio_mixer_locals_dict,
+};
diff --git a/shared-bindings/audioio/Mixer.h b/shared-bindings/audioio/Mixer.h
new file mode 100644
index 000000000..832072b8f
--- /dev/null
+++ b/shared-bindings/audioio/Mixer.h
@@ -0,0 +1,52 @@
+/*
+ * This file is part of the Micro Python 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.
+ */
+
+#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_AUDIOIO_MIXER_H
+#define MICROPY_INCLUDED_SHARED_BINDINGS_AUDIOIO_MIXER_H
+
+#include "common-hal/microcontroller/Pin.h"
+#include "shared-module/audioio/Mixer.h"
+#include "shared-bindings/audioio/RawSample.h"
+
+extern const mp_obj_type_t audioio_mixer_type;
+
+void common_hal_audioio_mixer_construct(audioio_mixer_obj_t* self,
+ uint8_t voice_count,
+ uint32_t buffer_size,
+ uint8_t bits_per_sample,
+ bool samples_signed,
+ uint8_t channel_count,
+ uint32_t sample_rate);
+
+void common_hal_audioio_mixer_deinit(audioio_mixer_obj_t* self);
+bool common_hal_audioio_mixer_deinited(audioio_mixer_obj_t* self);
+void common_hal_audioio_mixer_play(audioio_mixer_obj_t* self, mp_obj_t sample, uint8_t voice, bool loop);
+void common_hal_audioio_mixer_stop_voice(audioio_mixer_obj_t* self, uint8_t voice);
+
+bool common_hal_audioio_mixer_get_playing(audioio_mixer_obj_t* self);
+uint32_t common_hal_audioio_mixer_get_sample_rate(audioio_mixer_obj_t* self);
+
+#endif // MICROPY_INCLUDED_SHARED_BINDINGS_AUDIOIO_MIXER_H
diff --git a/shared-bindings/audioio/__init__.c b/shared-bindings/audioio/__init__.c
index 8a00b43d8..4786b6425 100644
--- a/shared-bindings/audioio/__init__.c
+++ b/shared-bindings/audioio/__init__.c
@@ -32,6 +32,8 @@
#include "shared-bindings/microcontroller/Pin.h"
#include "shared-bindings/audioio/__init__.h"
#include "shared-bindings/audioio/AudioOut.h"
+#include "shared-bindings/audioio/Mixer.h"
+#include "shared-bindings/audioio/RawSample.h"
#include "shared-bindings/audioio/WaveFile.h"
//| :mod:`audioio` --- Support for audio input and output
@@ -49,6 +51,7 @@
//| :maxdepth: 3
//|
//| AudioOut
+//| Mixer
//| RawSample
//| WaveFile
//|
@@ -61,6 +64,7 @@
STATIC const mp_rom_map_elem_t audioio_module_globals_table[] = {
{ MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_audioio) },
{ MP_ROM_QSTR(MP_QSTR_AudioOut), MP_ROM_PTR(&audioio_audioout_type) },
+ { MP_ROM_QSTR(MP_QSTR_Mixer), MP_ROM_PTR(&audioio_mixer_type) },
{ MP_ROM_QSTR(MP_QSTR_RawSample), MP_ROM_PTR(&audioio_rawsample_type) },
{ MP_ROM_QSTR(MP_QSTR_WaveFile), MP_ROM_PTR(&audioio_wavefile_type) },
};
diff --git a/shared-bindings/pulseio/PWMOut.c b/shared-bindings/pulseio/PWMOut.c
index 9b7094b4e..362b8123d 100644
--- a/shared-bindings/pulseio/PWMOut.c
+++ b/shared-bindings/pulseio/PWMOut.c
@@ -192,7 +192,7 @@ STATIC mp_obj_t pulseio_pwmout_obj_set_frequency(mp_obj_t self_in, mp_obj_t freq
raise_error_if_deinited(common_hal_pulseio_pwmout_deinited(self));
if (!common_hal_pulseio_pwmout_get_variable_frequency(self)) {
mp_raise_AttributeError(translate(
- "PWM frequency not writeable when variable_frequency is False on "
+ "PWM frequency not writable when variable_frequency is False on "
"construction."));
}
common_hal_pulseio_pwmout_set_frequency(self, mp_obj_get_int(frequency));
diff --git a/shared-bindings/supervisor/Runtime.c b/shared-bindings/supervisor/Runtime.c
index b061595cf..5ba2198e1 100755
--- a/shared-bindings/supervisor/Runtime.c
+++ b/shared-bindings/supervisor/Runtime.c
@@ -80,8 +80,34 @@ const mp_obj_property_t supervisor_serial_connected_obj = {
(mp_obj_t)&mp_const_none_obj},
};
+
+//| .. attribute:: runtime.serial_bytes_available
+//|
+//| Returns the whether any bytes are available to read
+//| on the USB serial input. Allows for polling to see whether
+//| to call the built-in input() or wait. (read-only)
+//|
+STATIC mp_obj_t supervisor_get_serial_bytes_available(mp_obj_t self){
+ if (!common_hal_get_serial_bytes_available()) {
+ return mp_const_false;
+ }
+ else {
+ return mp_const_true;
+ }
+}
+MP_DEFINE_CONST_FUN_OBJ_1(supervisor_get_serial_bytes_available_obj, supervisor_get_serial_bytes_available);
+
+const mp_obj_property_t supervisor_serial_bytes_available_obj = {
+ .base.type = &mp_type_property,
+ .proxy = {(mp_obj_t)&supervisor_get_serial_bytes_available_obj,
+ (mp_obj_t)&mp_const_none_obj,
+ (mp_obj_t)&mp_const_none_obj},
+};
+
+
STATIC const mp_rom_map_elem_t supervisor_runtime_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_serial_connected), MP_ROM_PTR(&supervisor_serial_connected_obj) },
+ { MP_ROM_QSTR(MP_QSTR_serial_bytes_available), MP_ROM_PTR(&supervisor_serial_bytes_available_obj) },
};
STATIC MP_DEFINE_CONST_DICT(supervisor_runtime_locals_dict, supervisor_runtime_locals_dict_table);
diff --git a/shared-bindings/supervisor/Runtime.h b/shared-bindings/supervisor/Runtime.h
index 4a67925ec..864b070cd 100755
--- a/shared-bindings/supervisor/Runtime.h
+++ b/shared-bindings/supervisor/Runtime.h
@@ -35,6 +35,8 @@ const mp_obj_type_t supervisor_runtime_type;
bool common_hal_get_serial_connected(void);
+bool common_hal_get_serial_bytes_available(void);
+
//TODO: placeholders for future functions
//bool common_hal_get_repl_active(void);
//bool common_hal_get_usb_enumerated(void);
diff --git a/shared-module/audioio/Mixer.c b/shared-module/audioio/Mixer.c
new file mode 100644
index 000000000..8020a621e
--- /dev/null
+++ b/shared-module/audioio/Mixer.c
@@ -0,0 +1,341 @@
+/*
+ * This file is part of the Micro Python 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 "shared-bindings/audioio/Mixer.h"
+
+#include <stdint.h>
+
+#include "py/runtime.h"
+#include "shared-module/audioio/__init__.h"
+#include "shared-module/audioio/RawSample.h"
+
+void common_hal_audioio_mixer_construct(audioio_mixer_obj_t* self,
+ uint8_t voice_count,
+ uint32_t buffer_size,
+ uint8_t bits_per_sample,
+ bool samples_signed,
+ uint8_t channel_count,
+ uint32_t sample_rate) {
+ self->len = buffer_size / 2 / sizeof(uint32_t) * sizeof(uint32_t);
+
+ self->first_buffer = m_malloc(self->len, false);
+ if (self->first_buffer == NULL) {
+ common_hal_audioio_mixer_deinit(self);
+ mp_raise_msg(&mp_type_MemoryError, translate("Couldn't allocate first buffer"));
+ }
+
+ self->second_buffer = m_malloc(self->len, false);
+ if (self->second_buffer == NULL) {
+ common_hal_audioio_mixer_deinit(self);
+ mp_raise_msg(&mp_type_MemoryError, translate("Couldn't allocate second buffer"));
+ }
+
+ self->bits_per_sample = bits_per_sample;
+ self->samples_signed = samples_signed;
+ self->channel_count = channel_count;
+ self->sample_rate = sample_rate;
+ self->voice_count = voice_count;
+
+ for (uint8_t i = 0; i < self->voice_count; i++) {
+ self->voice[i].sample = NULL;
+ }
+}
+
+void common_hal_audioio_mixer_deinit(audioio_mixer_obj_t* self) {
+ self->first_buffer = NULL;
+ self->second_buffer = NULL;
+}
+
+bool common_hal_audioio_mixer_deinited(audioio_mixer_obj_t* self) {
+ return self->first_buffer == NULL;
+}
+
+uint32_t common_hal_audioio_mixer_get_sample_rate(audioio_mixer_obj_t* self) {
+ return self->sample_rate;
+}
+
+void common_hal_audioio_mixer_play(audioio_mixer_obj_t* self, mp_obj_t sample, uint8_t v, bool loop) {
+ if (v >= self->voice_count) {
+ mp_raise_ValueError(translate("Voice index too high"));
+ }
+ if (audiosample_sample_rate(sample) != self->sample_rate) {
+ mp_raise_ValueError(translate("The sample's sample rate does not match the mixer's"));
+ }
+ if (audiosample_channel_count(sample) != self->channel_count) {
+ mp_raise_ValueError(translate("The sample's channel count does not match the mixer's"));
+ }
+ if (audiosample_bits_per_sample(sample) != self->bits_per_sample) {
+ mp_raise_ValueError(translate("The sample's bits_per_sample does not match the mixer's"));
+ }
+ bool single_buffer;
+ bool samples_signed;
+ uint32_t max_buffer_length;
+ uint8_t spacing;
+ audiosample_get_buffer_structure(sample, false, &single_buffer, &samples_signed,
+ &max_buffer_length, &spacing);
+ if (samples_signed != self->samples_signed) {
+ mp_raise_ValueError(translate("The sample's signedness does not match the mixer's"));
+ }
+ audioio_mixer_voice_t* voice = &self->voice[v];
+ voice->sample = sample;
+ voice->loop = loop;
+
+ audiosample_reset_buffer(sample, false, 0);
+ audioio_get_buffer_result_t result = audiosample_get_buffer(sample, false, 0, (uint8_t**) &voice->remaining_buffer, &voice->buffer_length);
+ // Track length in terms of words.
+ voice->buffer_length /= sizeof(uint32_t);
+ voice->more_data = result == GET_BUFFER_MORE_DATA;
+}
+
+void common_hal_audioio_mixer_stop_voice(audioio_mixer_obj_t* self, uint8_t voice) {
+ self->voice[voice].sample = NULL;
+}
+
+bool common_hal_audioio_mixer_get_playing(audioio_mixer_obj_t* self) {
+ for (int32_t v = 0; v < self->voice_count; v++) {
+ if (self->voice[v].sample != NULL) {
+ return true;
+ }
+ }
+ return false;
+}
+
+void audioio_mixer_reset_buffer(audioio_mixer_obj_t* self,
+ bool single_channel,
+ uint8_t channel) {
+ for (int32_t i = 0; i < self->voice_count; i++) {
+ self->voice[i].sample = NULL;
+ }
+}
+
+uint32_t add8signed(uint32_t a, uint32_t b) {
+ #if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
+ return __QADD8(a, b);
+ #else
+ uint32_t result = 0;
+ for (int8_t i = 0; i < 4; i++) {
+ int8_t ai = a >> (sizeof(int8_t) * 8 * i);
+ int8_t bi = b >> (sizeof(int8_t) * 8 * i);
+ int32_t intermediate = (int32_t) ai + bi;
+ if (intermediate > CHAR_MAX) {
+ intermediate = CHAR_MAX;
+ } else if (intermediate < CHAR_MIN) {
+ //intermediate = CHAR_MIN;
+ }
+ result |= (((uint32_t) intermediate) & 0xff) << (sizeof(int8_t) * 8 * i);
+ }
+ return result;
+ #endif
+}
+
+uint32_t add8unsigned(uint32_t a, uint32_t b) {
+ #if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
+ // Subtract out the DC offset, add and then shift back.
+ a = __USUB8(a, 0x80808080);
+ b = __USUB8(b, 0x80808080);
+ uint32_t sum = __QADD8(a, b);
+ return __UADD8(sum, 0x80808080);
+ #else
+ uint32_t result = 0;
+ for (int8_t i = 0; i < 4; i++) {
+ int8_t ai = (a >> (sizeof(uint8_t) * 8 * i)) - 128;
+ int8_t bi = (b >> (sizeof(uint8_t) * 8 * i)) - 128;
+ int32_t intermediate = (int32_t) ai + bi;
+ if (intermediate > UCHAR_MAX) {
+ intermediate = UCHAR_MAX;
+ }
+ result |= ((uint8_t) intermediate + 128) << (sizeof(uint8_t) * 8 * i);
+ }
+ return result;
+ #endif
+}
+
+uint32_t add16signed(uint32_t a, uint32_t b) {
+ #if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
+ return __QADD16(a, b);
+ #else
+ uint32_t result = 0;
+ for (int8_t i = 0; i < 2; i++) {
+ int16_t ai = a >> (sizeof(int16_t) * 8 * i);
+ int16_t bi = b >> (sizeof(int16_t) * 8 * i);
+ int32_t intermediate = (int32_t) ai + bi;
+ if (intermediate > SHRT_MAX) {
+ intermediate = SHRT_MAX;
+ } else if (intermediate < SHRT_MIN) {
+ intermediate = SHRT_MIN;
+ }
+ result |= (((uint32_t) intermediate) & 0xffff) << (sizeof(int16_t) * 8 * i);
+ }
+ return result;
+ #endif
+}
+
+uint32_t add16unsigned(uint32_t a, uint32_t b) {
+ #if (defined (__ARM_FEATURE_DSP) && (__ARM_FEATURE_DSP == 1))
+ // Subtract out the DC offset, add and then shift back.
+ a = __USUB16(a, 0x80008000);
+ b = __USUB16(b, 0x80008000);
+ uint32_t sum = __QADD16(a, b);
+ return __UADD16(sum, 0x80008000);
+ #else
+ uint32_t result = 0;
+ for (int8_t i = 0; i < 2; i++) {
+ int16_t ai = (a >> (sizeof(uint16_t) * 8 * i)) - 0x8000;
+ int16_t bi = (b >> (sizeof(uint16_t) * 8 * i)) - 0x8000;
+ int32_t intermediate = (int32_t) ai + bi;
+ if (intermediate > USHRT_MAX) {
+ intermediate = USHRT_MAX;
+ }
+ result |= ((uint16_t) intermediate + 0x8000) << (sizeof(int16_t) * 8 * i);
+ }
+ return result;
+ #endif
+}
+
+audioio_get_buffer_result_t audioio_mixer_get_buffer(audioio_mixer_obj_t* self,
+ bool single_channel,
+ uint8_t channel,
+ uint8_t** buffer,
+ uint32_t* buffer_length) {
+ if (!single_channel) {
+ channel = 0;
+ }
+
+ uint32_t channel_read_count = self->left_read_count;
+ if (channel == 1) {
+ channel_read_count = self->right_read_count;
+ }
+ *buffer_length = self->len;
+
+ bool need_more_data = self->read_count == channel_read_count;
+ if (need_more_data) {
+ uint32_t* word_buffer;
+ if (self->use_first_buffer) {
+ *buffer = (uint8_t*) self->first_buffer;
+ word_buffer = self->first_buffer;
+ } else {
+ *buffer = (uint8_t*) self->second_buffer;
+ word_buffer = self->second_buffer;
+ }
+ self->use_first_buffer = !self->use_first_buffer;
+ bool voices_active = false;
+ for (int32_t v = 0; v < self->voice_count; v++) {
+ audioio_mixer_voice_t* voice = &self->voice[v];
+
+ uint32_t j = 0;
+ bool voice_done = voice->sample == NULL;
+ for (uint32_t i = 0; i < self->len / sizeof(uint32_t); i++) {
+ if (!voice_done && j >= voice->buffer_length) {
+ if (!voice->more_data) {
+ if (voice->loop) {
+ audiosample_reset_buffer(voice->sample, false, 0);
+ } else {
+ voice->sample = NULL;
+ voice_done = true;
+ }
+ }
+ if (!voice_done) {
+ // Load another buffer
+ audioio_get_buffer_result_t result = audiosample_get_buffer(voice->sample, false, 0, (uint8_t**) &voice->remaining_buffer, &voice->buffer_length);
+ // Track length in terms of words.
+ voice->buffer_length /= sizeof(uint32_t);
+ voice->more_data = result == GET_BUFFER_MORE_DATA;
+ j = 0;
+ }
+ }
+ // First active voice gets copied over verbatim.
+ uint32_t sample_value;
+ if (voice_done) {
+ // Exit early if another voice already set all samples once.
+ if (voices_active) {
+ continue;
+ }
+ sample_value = 0;
+ if (!self->samples_signed) {
+ if (self->bits_per_sample == 8) {
+ sample_value = 0x7f7f7f7f;
+ } else {
+ sample_value = 0x7fff7fff;
+ }
+ }
+ } else {
+ sample_value = voice->remaining_buffer[j];
+ }
+
+ if (!voices_active) {
+ word_buffer[i] = sample_value;
+ } else {
+ if (self->bits_per_sample == 8) {
+ if (self->samples_signed) {
+ word_buffer[i] = add8signed(word_buffer[i], sample_value);
+ } else {
+ word_buffer[i] = add8unsigned(word_buffer[i], sample_value);
+ }
+ } else {
+ if (self->samples_signed) {
+ word_buffer[i] = add16signed(word_buffer[i], sample_value);
+ } else {
+ word_buffer[i] = add16unsigned(word_buffer[i], sample_value);
+ }
+ }
+ }
+ j++;
+ }
+ voice->buffer_length -= j;
+ voice->remaining_buffer += j;
+
+ voices_active = true;
+ }
+
+ self->read_count += 1;
+ } else if (!self->use_first_buffer) {
+ *buffer = (uint8_t*) self->first_buffer;
+ } else {
+ *buffer = (uint8_t*) self->second_buffer;
+ }
+
+
+ if (channel == 0) {
+ self->left_read_count += 1;
+ } else if (channel == 1) {
+ self->right_read_count += 1;
+ *buffer = *buffer + self->bits_per_sample / 8;
+ }
+ return GET_BUFFER_MORE_DATA;
+}
+
+void audioio_mixer_get_buffer_structure(audioio_mixer_obj_t* self, bool single_channel,
+ bool* single_buffer, bool* samples_signed,
+ uint32_t* max_buffer_length, uint8_t* spacing) {
+ *single_buffer = false;
+ *samples_signed = self->samples_signed;
+ *max_buffer_length = self->len;
+ if (single_channel) {
+ *spacing = self->channel_count;
+ } else {
+ *spacing = 1;
+ }
+}
diff --git a/shared-module/audioio/Mixer.h b/shared-module/audioio/Mixer.h
new file mode 100644
index 000000000..6a88fe0bd
--- /dev/null
+++ b/shared-module/audioio/Mixer.h
@@ -0,0 +1,75 @@
+/*
+ * This file is part of the MicroPython project, http://micropython.org/
+ *
+ * The MIT License (MIT)
+ *
+ * Copyright (c) 2018 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_SHARED_MODULE_AUDIOIO_MIXER_H
+#define MICROPY_INCLUDED_SHARED_MODULE_AUDIOIO_MIXER_H
+
+#include "py/obj.h"
+
+#include "shared-module/audioio/__init__.h"
+
+typedef struct {
+ mp_obj_t sample;
+ bool loop;
+ bool more_data;
+ uint32_t* remaining_buffer;
+ uint32_t buffer_length;
+} audioio_mixer_voice_t;
+
+typedef struct {
+ mp_obj_base_t base;
+ uint32_t* first_buffer;
+ uint32_t* second_buffer;
+ uint32_t len; // in words
+ uint8_t bits_per_sample;
+ bool use_first_buffer;
+ bool samples_signed;
+ uint8_t channel_count;
+ uint32_t sample_rate;
+
+ uint32_t read_count;
+ uint32_t left_read_count;
+ uint32_t right_read_count;
+
+ uint8_t voice_count;
+ audioio_mixer_voice_t voice[];
+} audioio_mixer_obj_t;
+
+
+// These are not available from Python because it may be called in an interrupt.
+void audioio_mixer_reset_buffer(audioio_mixer_obj_t* self,
+ bool single_channel,
+ uint8_t channel);
+audioio_get_buffer_result_t audioio_mixer_get_buffer(audioio_mixer_obj_t* self,
+ bool single_channel,
+ uint8_t channel,
+ uint8_t** buffer,
+ uint32_t* buffer_length); // length in bytes
+void audioio_mixer_get_buffer_structure(audioio_mixer_obj_t* self, bool single_channel,
+ bool* single_buffer, bool* samples_signed,
+ uint32_t* max_buffer_length, uint8_t* spacing);
+
+#endif // MICROPY_INCLUDED_SHARED_MODULE_AUDIOIO_MIXER_H
diff --git a/shared-module/audioio/WaveFile.c b/shared-module/audioio/WaveFile.c
index 7efad05e0..e5a7b1a3b 100644
--- a/shared-module/audioio/WaveFile.c
+++ b/shared-module/audioio/WaveFile.c
@@ -200,13 +200,29 @@ audioio_get_buffer_result_t audioio_wavefile_get_buffer(audioio_wavefile_obj_t*
if (f_read(&self->file->fp, *buffer, num_bytes_to_load, &length_read) != FR_OK) {
return GET_BUFFER_ERROR;
}
+ self->bytes_remaining -= length_read;
+ // Pad the last buffer to word align it.
+ if (self->bytes_remaining == 0 && length_read % sizeof(uint32_t) != 0) {
+ uint32_t pad = length_read % sizeof(uint32_t);
+ length_read += pad;
+ if (self->bits_per_sample == 8) {
+ for (uint32_t i = 0; i < pad; i++) {
+ ((uint8_t*) (*buffer))[length_read / sizeof(uint8_t) - i - 1] = 0x80;
+ }
+ } else if (self->bits_per_sample == 16) {
+ // We know the buffer is aligned because we allocated it onto the heap ourselves.
+ #pragma GCC diagnostic push
+ #pragma GCC diagnostic ignored "-Wcast-align"
+ ((int16_t*) (*buffer))[length_read / sizeof(int16_t) - 1] = 0;
+ #pragma GCC diagnostic pop
+ }
+ }
*buffer_length = length_read;
if (self->buffer_index % 2 == 1) {
self->second_buffer_length = length_read;
} else {
self->buffer_length = length_read;
}
- self->bytes_remaining -= length_read;
self->buffer_index += 1;
self->read_count += 1;
}
diff --git a/shared-module/audioio/__init__.c b/shared-module/audioio/__init__.c
new file mode 100644
index 000000000..b87b06a83
--- /dev/null
+++ b/shared-module/audioio/__init__.c
@@ -0,0 +1,125 @@
+/*
+ * 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 "shared-module/audioio/__init__.h"
+
+#include "py/obj.h"
+#include "shared-bindings/audioio/Mixer.h"
+#include "shared-bindings/audioio/RawSample.h"
+#include "shared-bindings/audioio/WaveFile.h"
+#include "shared-module/audioio/Mixer.h"
+#include "shared-module/audioio/RawSample.h"
+#include "shared-module/audioio/WaveFile.h"
+
+uint32_t audiosample_sample_rate(mp_obj_t sample_obj) {
+ if (MP_OBJ_IS_TYPE(sample_obj, &audioio_rawsample_type)) {
+ audioio_rawsample_obj_t* sample = MP_OBJ_TO_PTR(sample_obj);
+ return sample->sample_rate;
+ } else if (MP_OBJ_IS_TYPE(sample_obj, &audioio_wavefile_type)) {
+ audioio_wavefile_obj_t* file = MP_OBJ_TO_PTR(sample_obj);
+ return file->sample_rate;
+ } else if (MP_OBJ_IS_TYPE(sample_obj, &audioio_mixer_type)) {
+ audioio_mixer_obj_t* mixer = MP_OBJ_TO_PTR(sample_obj);
+ return mixer->sample_rate;
+ }
+ return 16000;
+}
+
+uint8_t audiosample_bits_per_sample(mp_obj_t sample_obj) {
+ if (MP_OBJ_IS_TYPE(sample_obj, &audioio_rawsample_type)) {
+ audioio_rawsample_obj_t* sample = MP_OBJ_TO_PTR(sample_obj);
+ return sample->bits_per_sample;
+ } else if (MP_OBJ_IS_TYPE(sample_obj, &audioio_wavefile_type)) {
+ audioio_wavefile_obj_t* file = MP_OBJ_TO_PTR(sample_obj);
+ return file->bits_per_sample;
+ } else if (MP_OBJ_IS_TYPE(sample_obj, &audioio_mixer_type)) {
+ audioio_mixer_obj_t* mixer = MP_OBJ_TO_PTR(sample_obj);
+ return mixer->bits_per_sample;
+ }
+ return 8;
+}
+
+uint8_t audiosample_channel_count(mp_obj_t sample_obj) {
+ if (MP_OBJ_IS_TYPE(sample_obj, &audioio_rawsample_type)) {
+ audioio_rawsample_obj_t* sample = MP_OBJ_TO_PTR(sample_obj);
+ return sample->channel_count;
+ } else if (MP_OBJ_IS_TYPE(sample_obj, &audioio_wavefile_type)) {
+ audioio_wavefile_obj_t* file = MP_OBJ_TO_PTR(sample_obj);
+ return file->channel_count;
+ } else if (MP_OBJ_IS_TYPE(sample_obj, &audioio_mixer_type)) {
+ audioio_mixer_obj_t* mixer = MP_OBJ_TO_PTR(sample_obj);
+ return mixer->channel_count;
+ }
+ return 1;
+}
+
+void audiosample_reset_buffer(mp_obj_t sample_obj, bool single_channel, uint8_t audio_channel) {
+ if (MP_OBJ_IS_TYPE(sample_obj, &audioio_rawsample_type)) {
+ audioio_rawsample_obj_t* sample = MP_OBJ_TO_PTR(sample_obj);
+ audioio_rawsample_reset_buffer(sample, single_channel, audio_channel);
+ } else if (MP_OBJ_IS_TYPE(sample_obj, &audioio_wavefile_type)) {
+ audioio_wavefile_obj_t* file = MP_OBJ_TO_PTR(sample_obj);
+ audioio_wavefile_reset_buffer(file, single_channel, audio_channel);
+ } else if (MP_OBJ_IS_TYPE(sample_obj, &audioio_mixer_type)) {
+ audioio_mixer_obj_t* file = MP_OBJ_TO_PTR(sample_obj);
+ audioio_mixer_reset_buffer(file, single_channel, audio_channel);
+ }
+}
+
+audioio_get_buffer_result_t audiosample_get_buffer(mp_obj_t sample_obj,
+ bool single_channel,
+ uint8_t channel,
+ uint8_t** buffer, uint32_t* buffer_length) {
+ if (MP_OBJ_IS_TYPE(sample_obj, &audioio_rawsample_type)) {
+ audioio_rawsample_obj_t* sample = MP_OBJ_TO_PTR(sample_obj);
+ return audioio_rawsample_get_buffer(sample, single_channel, channel, buffer, buffer_length);
+ } else if (MP_OBJ_IS_TYPE(sample_obj, &audioio_wavefile_type)) {
+ audioio_wavefile_obj_t* file = MP_OBJ_TO_PTR(sample_obj);
+ return audioio_wavefile_get_buffer(file, single_channel, channel, buffer, buffer_length);
+ } else if (MP_OBJ_IS_TYPE(sample_obj, &audioio_mixer_type)) {
+ audioio_mixer_obj_t* file = MP_OBJ_TO_PTR(sample_obj);
+ return audioio_mixer_get_buffer(file, single_channel, channel, buffer, buffer_length);
+ }
+ return GET_BUFFER_DONE;
+}
+
+void audiosample_get_buffer_structure(mp_obj_t sample_obj, bool single_channel,
+ bool* single_buffer, bool* samples_signed,
+ uint32_t* max_buffer_length, uint8_t* spacing) {
+ if (MP_OBJ_IS_TYPE(sample_obj, &audioio_rawsample_type)) {
+ audioio_rawsample_obj_t* sample = MP_OBJ_TO_PTR(sample_obj);
+ audioio_rawsample_get_buffer_structure(sample, single_channel, single_buffer,
+ samples_signed, max_buffer_length, spacing);
+ } else if (MP_OBJ_IS_TYPE(sample_obj, &audioio_wavefile_type)) {
+ audioio_wavefile_obj_t* file = MP_OBJ_TO_PTR(sample_obj);
+ audioio_wavefile_get_buffer_structure(file, single_channel, single_buffer, samples_signed,
+ max_buffer_length, spacing);
+ } else if (MP_OBJ_IS_TYPE(sample_obj, &audioio_mixer_type)) {
+ audioio_mixer_obj_t* file = MP_OBJ_TO_PTR(sample_obj);
+ audioio_mixer_get_buffer_structure(file, single_channel, single_buffer, samples_signed,
+ max_buffer_length, spacing);
+ }
+}
diff --git a/shared-module/audioio/__init__.h b/shared-module/audioio/__init__.h
index 2491beb12..c805f3116 100644
--- a/shared-module/audioio/__init__.h
+++ b/shared-module/audioio/__init__.h
@@ -27,10 +27,27 @@
#ifndef MICROPY_INCLUDED_SHARED_MODULE_AUDIOIO__INIT__H
#define MICROPY_INCLUDED_SHARED_MODULE_AUDIOIO__INIT__H
+#include <stdbool.h>
+#include <stdint.h>
+
+#include "py/obj.h"
+
typedef enum {
GET_BUFFER_DONE, // No more data to read
GET_BUFFER_MORE_DATA, // More data to read.
GET_BUFFER_ERROR, // Error while reading data.
} audioio_get_buffer_result_t;
+uint32_t audiosample_sample_rate(mp_obj_t sample_obj);
+uint8_t audiosample_bits_per_sample(mp_obj_t sample_obj);
+uint8_t audiosample_channel_count(mp_obj_t sample_obj);
+void audiosample_reset_buffer(mp_obj_t sample_obj, bool single_channel, uint8_t audio_channel);
+audioio_get_buffer_result_t audiosample_get_buffer(mp_obj_t sample_obj,
+ bool single_channel,
+ uint8_t channel,
+ uint8_t** buffer, uint32_t* buffer_length);
+void audiosample_get_buffer_structure(mp_obj_t sample_obj, bool single_channel,
+ bool* single_buffer, bool* samples_signed,
+ uint32_t* max_buffer_length, uint8_t* spacing);
+
#endif // MICROPY_INCLUDED_SHARED_MODULE_AUDIOIO__INIT__H
diff --git a/shared-module/displayio/Sprite.c b/shared-module/displayio/Sprite.c
index 4fe8d1ff6..87600f721 100644
--- a/shared-module/displayio/Sprite.c
+++ b/shared-module/displayio/Sprite.c
@@ -68,7 +68,7 @@ bool displayio_sprite_get_pixel(displayio_sprite_t *self, int16_t x, int16_t y,
if (y < 0 || y >= self->height || x >= self->width || x < 0) {
return false;
}
- uint32_t value;
+ uint32_t value = 0;
if (MP_OBJ_IS_TYPE(self->bitmap, &displayio_bitmap_type)) {
value = common_hal_displayio_bitmap_get_pixel(self->bitmap, x, y);
} else if (MP_OBJ_IS_TYPE(self->bitmap, &displayio_ondiskbitmap_type)) {
diff --git a/tools/preprocess_frozen_modules.py b/tools/preprocess_frozen_modules.py
index d157deeee..bb6959f0d 100755
--- a/tools/preprocess_frozen_modules.py
+++ b/tools/preprocess_frozen_modules.py
@@ -33,7 +33,7 @@ def copy_and_process(in_dir, out_dir):
for root, subdirs, files in os.walk(in_dir):
# Skip library examples directories.
- if Path(root).name in ['examples', 'docs']:
+ if Path(root).name in ['examples', 'docs', 'tests']:
continue
for file in files: