Merge remote-tracking branch 'origin/master' into circuitpython/nickzoic/703-wiznet-5500-native
This commit is contained in:
commit
aab28748bb
80
.travis.yml
80
.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)
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit a660fb0cfc8641d5645d1cdea76027266b278388
|
||||
Subproject commit 33c61bfda2c3aada3cb06d36e12d7cf57da02037
|
@ -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,6 +1096,72 @@ msgstr ""
|
||||
msgid "'data' requires integer arguments"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinethumb.c:102
|
||||
msgid "can only have up to 4 parameters to Thumb assembly"
|
||||
msgstr ""
|
||||
|
||||
#: 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/emitinlinethumb.c:197 py/emitinlinextensa.c:162
|
||||
#, c-format
|
||||
msgid "'%s' expects a register"
|
||||
msgstr ""
|
||||
|
||||
#: 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/emitinlinethumb.c:304
|
||||
#, c-format
|
||||
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/emitinlinethumb.c:334 py/emitinlinextensa.c:182
|
||||
#, c-format
|
||||
msgid "'%s' expects a label"
|
||||
msgstr ""
|
||||
|
||||
#: 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 ""
|
||||
@ -1099,30 +1170,11 @@ msgstr ""
|
||||
msgid "parameters must be registers in sequence a2 to a5"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:162
|
||||
#, c-format
|
||||
msgid "'%s' expects a register"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:169
|
||||
#, c-format
|
||||
msgid "'%s' expects an integer"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:174
|
||||
#, c-format
|
||||
msgid "'%s' integer %d is not within range %d..%d"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:182
|
||||
#, c-format
|
||||
msgid "'%s' expects a label"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:193
|
||||
msgid "label '%q' not defined"
|
||||
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 ""
|
||||
|
163
locale/de_DE.po
163
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,6 +1110,73 @@ msgstr ""
|
||||
msgid "'data' requires integer arguments"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinethumb.c:102
|
||||
msgid "can only have up to 4 parameters to Thumb assembly"
|
||||
msgstr ""
|
||||
|
||||
#: 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/emitinlinethumb.c:197 py/emitinlinextensa.c:162
|
||||
#, c-format
|
||||
msgid "'%s' expects a register"
|
||||
msgstr ""
|
||||
|
||||
#: 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/emitinlinethumb.c:304
|
||||
#, c-format
|
||||
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/emitinlinethumb.c:334 py/emitinlinextensa.c:182
|
||||
#, c-format
|
||||
msgid "'%s' expects a label"
|
||||
msgstr ""
|
||||
|
||||
#: 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 ""
|
||||
@ -1112,30 +1185,11 @@ msgstr ""
|
||||
msgid "parameters must be registers in sequence a2 to a5"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:162
|
||||
#, c-format
|
||||
msgid "'%s' expects a register"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:169
|
||||
#, c-format
|
||||
msgid "'%s' expects an integer"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:174
|
||||
#, c-format
|
||||
msgid "'%s' integer %d is not within range %d..%d"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:182
|
||||
#, c-format
|
||||
msgid "'%s' expects a label"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:193
|
||||
msgid "label '%q' not defined"
|
||||
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 ""
|
||||
|
158
locale/en_US.po
158
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,6 +1096,72 @@ msgstr ""
|
||||
msgid "'data' requires integer arguments"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinethumb.c:102
|
||||
msgid "can only have up to 4 parameters to Thumb assembly"
|
||||
msgstr ""
|
||||
|
||||
#: 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/emitinlinethumb.c:197 py/emitinlinextensa.c:162
|
||||
#, c-format
|
||||
msgid "'%s' expects a register"
|
||||
msgstr ""
|
||||
|
||||
#: 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/emitinlinethumb.c:304
|
||||
#, c-format
|
||||
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/emitinlinethumb.c:334 py/emitinlinextensa.c:182
|
||||
#, c-format
|
||||
msgid "'%s' expects a label"
|
||||
msgstr ""
|
||||
|
||||
#: 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 ""
|
||||
@ -1099,30 +1170,11 @@ msgstr ""
|
||||
msgid "parameters must be registers in sequence a2 to a5"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:162
|
||||
#, c-format
|
||||
msgid "'%s' expects a register"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:169
|
||||
#, c-format
|
||||
msgid "'%s' expects an integer"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:174
|
||||
#, c-format
|
||||
msgid "'%s' integer %d is not within range %d..%d"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:182
|
||||
#, c-format
|
||||
msgid "'%s' expects a label"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:193
|
||||
msgid "label '%q' not defined"
|
||||
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 ""
|
||||
|
229
locale/es.po
229
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,6 +1115,73 @@ msgstr ""
|
||||
msgid "'data' requires integer arguments"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinethumb.c:102
|
||||
msgid "can only have up to 4 parameters to Thumb assembly"
|
||||
msgstr ""
|
||||
|
||||
#: 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/emitinlinethumb.c:197 py/emitinlinextensa.c:162
|
||||
#, c-format
|
||||
msgid "'%s' expects a register"
|
||||
msgstr ""
|
||||
|
||||
#: 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/emitinlinethumb.c:304
|
||||
#, c-format
|
||||
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/emitinlinethumb.c:334 py/emitinlinextensa.c:182
|
||||
#, c-format
|
||||
msgid "'%s' expects a label"
|
||||
msgstr ""
|
||||
|
||||
#: 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 ""
|
||||
@ -1119,30 +1190,11 @@ msgstr ""
|
||||
msgid "parameters must be registers in sequence a2 to a5"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:162
|
||||
#, c-format
|
||||
msgid "'%s' expects a register"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:169
|
||||
#, c-format
|
||||
msgid "'%s' expects an integer"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:174
|
||||
#, c-format
|
||||
msgid "'%s' integer %d is not within range %d..%d"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:182
|
||||
#, c-format
|
||||
msgid "'%s' expects a label"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:193
|
||||
msgid "label '%q' not defined"
|
||||
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"
|
||||
|
167
locale/fil.po
167
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,6 +1120,75 @@ msgstr "'data' kailangan ng hindi bababa sa 2 argument"
|
||||
msgid "'data' requires integer arguments"
|
||||
msgstr "'data' kailangan ng integer arguments"
|
||||
|
||||
#: 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/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/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/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/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/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/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"
|
||||
@ -1122,30 +1197,11 @@ msgstr "maaari lamang magkaroon ng hanggang 4 na parameter sa Xtensa assembly"
|
||||
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:162
|
||||
#, c-format
|
||||
msgid "'%s' expects a register"
|
||||
msgstr "Inaasahan ng '%s' ang isang rehistro"
|
||||
|
||||
#: 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"
|
||||
msgstr "'%s' integer %d ay wala sa sakop ng %d..%d"
|
||||
|
||||
#: py/emitinlinextensa.c:182
|
||||
#, c-format
|
||||
msgid "'%s' expects a label"
|
||||
msgstr "'%s' umaasa ng label"
|
||||
|
||||
#: py/emitinlinextensa.c:193
|
||||
msgid "label '%q' not defined"
|
||||
msgstr "label '%d' kailangan na i-define"
|
||||
|
||||
#: 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"
|
||||
|
176
locale/fr.po
176
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,6 +1114,74 @@ msgstr "'data' nécessite au moins 2 arguments"
|
||||
msgid "'data' requires integer arguments"
|
||||
msgstr "'data' nécessite des arguments entiers"
|
||||
|
||||
#: py/emitinlinethumb.c:102
|
||||
msgid "can only have up to 4 parameters to Thumb assembly"
|
||||
msgstr ""
|
||||
|
||||
#: 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/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/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/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/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/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 ""
|
||||
@ -1116,30 +1190,11 @@ msgstr ""
|
||||
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:162
|
||||
#, c-format
|
||||
msgid "'%s' expects a register"
|
||||
msgstr "'%s' attend un registre"
|
||||
|
||||
#: 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"
|
||||
msgstr "'%s' l'entier %d n'est pas dans la gamme %d..%d"
|
||||
|
||||
#: py/emitinlinextensa.c:182
|
||||
#, c-format
|
||||
msgid "'%s' expects a label"
|
||||
msgstr "'%s' attend un label"
|
||||
|
||||
#: py/emitinlinextensa.c:193
|
||||
msgid "label '%q' not defined"
|
||||
msgstr "label '%q' non supporté"
|
||||
|
||||
#: 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"
|
||||
@ -2426,10 +2522,10 @@ msgstr "'S' et 'O' ne sont pas des types de format supportés"
|
||||
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"
|
||||
|
2511
locale/it_IT.po
Normal file
2511
locale/it_IT.po
Normal file
File diff suppressed because it is too large
Load Diff
316
locale/pt_BR.po
316
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,6 +1099,73 @@ msgstr ""
|
||||
msgid "'data' requires integer arguments"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinethumb.c:102
|
||||
msgid "can only have up to 4 parameters to Thumb assembly"
|
||||
msgstr ""
|
||||
|
||||
#: 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/emitinlinethumb.c:197 py/emitinlinextensa.c:162
|
||||
#, c-format
|
||||
msgid "'%s' expects a register"
|
||||
msgstr ""
|
||||
|
||||
#: 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/emitinlinethumb.c:304
|
||||
#, c-format
|
||||
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/emitinlinethumb.c:334 py/emitinlinextensa.c:182
|
||||
#, c-format
|
||||
msgid "'%s' expects a label"
|
||||
msgstr ""
|
||||
|
||||
#: 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 ""
|
||||
@ -1101,30 +1174,11 @@ msgstr ""
|
||||
msgid "parameters must be registers in sequence a2 to a5"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:162
|
||||
#, c-format
|
||||
msgid "'%s' expects a register"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:169
|
||||
#, c-format
|
||||
msgid "'%s' expects an integer"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:174
|
||||
#, c-format
|
||||
msgid "'%s' integer %d is not within range %d..%d"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:182
|
||||
#, c-format
|
||||
msgid "'%s' expects a label"
|
||||
msgstr ""
|
||||
|
||||
#: py/emitinlinextensa.c:193
|
||||
msgid "label '%q' not defined"
|
||||
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"
|
||||
|
@ -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
|
||||
|
@ -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++) {
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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 };
|
||||
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
|
||||
};
|
||||
|
||||
uint16_t _seq0[PWM_MAX_MODULE][PWM_MAX_CHANNEL];
|
||||
#define CHANNELS_PER_PWM 4
|
||||
|
||||
STATIC uint16_t pwm_seq[MP_ARRAY_SIZE(pwms)][CHANNELS_PER_PWM];
|
||||
|
||||
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;
|
||||
}
|
||||
void pwmout_reset(void) {
|
||||
for(int i=0; i < MP_ARRAY_SIZE(pwms); i++) {
|
||||
NRF_PWM_Type* pwm = pwms[i];
|
||||
|
||||
return -1;
|
||||
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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
// 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 -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;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
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 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
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
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;
|
||||
const mcu_pin_obj_t* pin,
|
||||
uint16_t duty,
|
||||
uint32_t frequency,
|
||||
bool variable_frequency) {
|
||||
|
||||
// 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;
|
||||
// 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"));
|
||||
}
|
||||
}
|
||||
|
||||
// Haven't mapped before
|
||||
if ( !self->pwm )
|
||||
{
|
||||
find_new_pwm(self);
|
||||
}
|
||||
self->pwm = NULL;
|
||||
self->channel = CHANNELS_PER_PWM; // out-of-range value.
|
||||
bool pwm_already_in_use;
|
||||
NRF_PWM_Type* pwm;
|
||||
|
||||
if (self->pwm)
|
||||
{
|
||||
nrf_gpio_cfg_output(pin->number);
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
if (self->pwm == NULL) {
|
||||
mp_raise_ValueError(translate("All PWM peripherals are in use"));
|
||||
}
|
||||
|
||||
self->pin_number = pin->number;
|
||||
claim_pin(pin);
|
||||
|
||||
self->frequency = frequency;
|
||||
self->variable_frequency = variable_frequency;
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
self->pwm->ENABLE = 0;
|
||||
|
||||
self->pwm->PSEL.OUT[self->channel] = 0xFFFFFFFFUL;
|
||||
|
||||
// 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;
|
||||
if (common_hal_pulseio_pwmout_deinited(self)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
nrf_gpio_cfg_default(self->pin->number);
|
||||
nrf_gpio_cfg_default(self->pin_number);
|
||||
|
||||
self->pwm = NULL;
|
||||
self->pin = mp_const_none;
|
||||
NRF_PWM_Type* pwm = self->pwm;
|
||||
self->pwm = NULL;
|
||||
|
||||
// Disconnect pin from channel.
|
||||
pwm->PSEL.OUT[self->channel] = 0xFFFFFFFF;
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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();
|
||||
}
|
||||
|
||||
|
@ -1 +1 @@
|
||||
Subproject commit 67710e47c7313cc56a15748e485079831ee6a3af
|
||||
Subproject commit d4ebe15f58de1442e3eed93b40d13930e7785903
|
@ -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));
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
249
shared-bindings/audioio/Mixer.c
Normal file
249
shared-bindings/audioio/Mixer.c
Normal file
@ -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,
|
||||
};
|
52
shared-bindings/audioio/Mixer.h
Normal file
52
shared-bindings/audioio/Mixer.h
Normal file
@ -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
|
@ -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) },
|
||||
};
|
||||
|
@ -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));
|
||||
|
@ -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);
|
||||
|
@ -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);
|
||||
|
341
shared-module/audioio/Mixer.c
Normal file
341
shared-module/audioio/Mixer.c
Normal file
@ -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;
|
||||
}
|
||||
}
|
75
shared-module/audioio/Mixer.h
Normal file
75
shared-module/audioio/Mixer.h
Normal file
@ -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
|
@ -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;
|
||||
}
|
||||
|
125
shared-module/audioio/__init__.c
Normal file
125
shared-module/audioio/__init__.c
Normal file
@ -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);
|
||||
}
|
||||
}
|
@ -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
|
||||
|
@ -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)) {
|
||||
|
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user