commit
c8d0509eb2
92
.travis.yml
92
.travis.yml
|
@ -6,39 +6,26 @@ compiler:
|
|||
git:
|
||||
depth: 1
|
||||
|
||||
# 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.
|
||||
# Each item under 'env' is a separate Travis job to execute.
|
||||
# They run in separate environments, so each one must take the time
|
||||
# to clone the repository and submodules; to download and install SDKs,
|
||||
# pip packages, and so forth. By gathering activities together in optimal
|
||||
# ways, the "run time" and "total time" of the travis jobs can be minimized.
|
||||
#
|
||||
# Since at the time of writing Travis generally starts 5 or 6 jobs, the
|
||||
# builds have been organized into 5 groups of *approximately* equal durations.
|
||||
# Additionally, the jobs that need extra SDKs are also organized together.
|
||||
#
|
||||
# When adding new boards, take a look on the travis CI page
|
||||
# https://travis-ci.org/adafruit/circuitpython to which build that installs
|
||||
# that SDK is shortest and add it there. In the case of major re-organizations,
|
||||
# just try to make the builds "about equal in run time"
|
||||
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 pca10059 feather_nrf52832 feather_nrf52840_express" TRAVIS_SDK=arm:nrf:esp8266
|
||||
- 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 +44,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 -C .. -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 build
|
||||
- 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 +75,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 +88,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 583326e535454f16b06ebdb9cc06869602a5564c
|
||||
Subproject commit 33c61bfda2c3aada3cb06d36e12d7cf57da02037
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-09-21 12:23-0400\n"
|
||||
"POT-Creation-Date: 2018-10-09 20:51-0400\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 ""
|
||||
|
@ -361,7 +361,7 @@ msgstr ""
|
|||
#: ports/atmel-samd/common-hal/busio/SPI.c:132
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:119
|
||||
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45
|
||||
#: ports/nrf/common-hal/busio/I2C.c:77
|
||||
#: ports/nrf/common-hal/busio/I2C.c:81
|
||||
msgid "Invalid pins"
|
||||
msgstr ""
|
||||
|
||||
|
@ -378,10 +378,12 @@ msgid "bytes > 8 bits not supported"
|
|||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:72
|
||||
#: ports/nrf/common-hal/busio/UART.c:82
|
||||
msgid "tx and rx cannot both be None"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:145
|
||||
#: ports/nrf/common-hal/busio/UART.c:115
|
||||
msgid "Failed to allocate RX buffer"
|
||||
msgstr ""
|
||||
|
||||
|
@ -390,10 +392,12 @@ msgid "Could not initialize UART"
|
|||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:240
|
||||
#: ports/nrf/common-hal/busio/UART.c:149
|
||||
msgid "No RX pin"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:294
|
||||
#: ports/nrf/common-hal/busio/UART.c:195
|
||||
msgid "No TX pin"
|
||||
msgstr ""
|
||||
|
||||
|
@ -409,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:232
|
||||
msgid "Invalid PWM frequency"
|
||||
msgstr ""
|
||||
|
||||
|
@ -690,24 +695,33 @@ msgstr ""
|
|||
msgid "AnalogOut functionality not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/busio/I2C.c:91
|
||||
#: ports/nrf/common-hal/busio/I2C.c:95
|
||||
msgid "All I2C peripherals are in use"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/busio/SPI.c:109
|
||||
#: ports/nrf/common-hal/busio/SPI.c:115
|
||||
msgid "All SPI peripherals are in use"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/busio/SPI.c:170
|
||||
msgid "Baud rate too high for this SPI peripheral"
|
||||
#: ports/nrf/common-hal/busio/UART.c:48
|
||||
#, c-format
|
||||
msgid "error = 0x%08lX"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:43 ports/nrf/common-hal/busio/UART.c:47
|
||||
#: ports/nrf/common-hal/busio/UART.c:51 ports/nrf/common-hal/busio/UART.c:60
|
||||
#: ports/nrf/common-hal/busio/UART.c:66 ports/nrf/common-hal/busio/UART.c:71
|
||||
#: ports/nrf/common-hal/busio/UART.c:76 ports/nrf/common-hal/busio/UART.c:81
|
||||
#: ports/nrf/common-hal/busio/UART.c:86 ports/nrf/common-hal/busio/UART.c:90
|
||||
msgid "busio.UART not yet implemented"
|
||||
#: ports/nrf/common-hal/busio/UART.c:86
|
||||
msgid "Invalid buffer size"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:90
|
||||
msgid "Odd parity is not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326
|
||||
#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336
|
||||
#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347
|
||||
#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356
|
||||
#: ports/nrf/common-hal/busio/UART.c:364
|
||||
msgid "busio.UART not available"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/microcontroller/Processor.c:49
|
||||
|
@ -715,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 ""
|
||||
|
@ -751,27 +769,27 @@ msgstr ""
|
|||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:470
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:520
|
||||
msgid "Can encode UUID into the advertisment packet."
|
||||
msgid "Can encode UUID into the advertisement packet."
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:545
|
||||
msgid "Can not fit data into the advertisment packet."
|
||||
msgid "Can not fit data into the advertisement packet."
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:558
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:604
|
||||
#, c-format
|
||||
msgid "Can not apply advertisment data. status: 0x%02x"
|
||||
msgid "Can not apply advertisement data. status: 0x%02x"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:614
|
||||
#, c-format
|
||||
msgid "Can not start advertisment. status: 0x%02x"
|
||||
msgid "Can not start advertisement. status: 0x%02x"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:631
|
||||
#, c-format
|
||||
msgid "Can not stop advertisment. status: 0x%02x"
|
||||
msgid "Can not stop advertisement. status: 0x%02x"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:650
|
||||
|
@ -1078,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 ""
|
||||
|
@ -1086,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"
|
||||
|
@ -1966,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 "
|
||||
|
@ -1990,19 +2071,19 @@ msgstr ""
|
|||
msgid "Buffer must be at least length 1"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:168
|
||||
#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175
|
||||
msgid "Invalid polarity"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:172
|
||||
#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179
|
||||
msgid "Invalid phase"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:176
|
||||
#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183
|
||||
msgid "Invalid number of bits"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:341
|
||||
#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348
|
||||
msgid "buffer slices must be of equal length"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2163,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
|
||||
|
@ -2256,6 +2337,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 ""
|
||||
|
@ -2276,14 +2385,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 ""
|
||||
|
|
210
locale/de_DE.po
210
locale/de_DE.po
|
@ -7,7 +7,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-09-21 12:23-0400\n"
|
||||
"POT-Creation-Date: 2018-10-09 20:51-0400\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"
|
||||
|
@ -370,7 +370,7 @@ msgstr "Nicht genug Pins vorhanden"
|
|||
#: ports/atmel-samd/common-hal/busio/SPI.c:132
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:119
|
||||
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45
|
||||
#: ports/nrf/common-hal/busio/I2C.c:77
|
||||
#: ports/nrf/common-hal/busio/I2C.c:81
|
||||
msgid "Invalid pins"
|
||||
msgstr "Ungültige Pins"
|
||||
|
||||
|
@ -387,10 +387,12 @@ msgid "bytes > 8 bits not supported"
|
|||
msgstr "bytes mit merh als 8 bits werden nicht unterstützt"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:72
|
||||
#: ports/nrf/common-hal/busio/UART.c:82
|
||||
msgid "tx and rx cannot both be None"
|
||||
msgstr "tx und rx können nicht beide None sein"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:145
|
||||
#: ports/nrf/common-hal/busio/UART.c:115
|
||||
msgid "Failed to allocate RX buffer"
|
||||
msgstr "Konnte keinen RX Buffer allozieren"
|
||||
|
||||
|
@ -399,10 +401,12 @@ msgid "Could not initialize UART"
|
|||
msgstr "Konnte UART nicht initialisieren"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:240
|
||||
#: ports/nrf/common-hal/busio/UART.c:149
|
||||
msgid "No RX pin"
|
||||
msgstr "Kein RX Pin"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:294
|
||||
#: ports/nrf/common-hal/busio/UART.c:195
|
||||
msgid "No TX pin"
|
||||
msgstr "Kein TX Pin"
|
||||
|
||||
|
@ -418,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:232
|
||||
msgid "Invalid PWM frequency"
|
||||
msgstr "Ungültige PWM Frequenz"
|
||||
|
||||
|
@ -699,26 +704,37 @@ msgstr ""
|
|||
msgid "AnalogOut functionality not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/busio/I2C.c:91
|
||||
#: ports/nrf/common-hal/busio/I2C.c:95
|
||||
#, fuzzy
|
||||
msgid "All I2C peripherals are in use"
|
||||
msgstr "Alle timer werden benutzt"
|
||||
|
||||
#: ports/nrf/common-hal/busio/SPI.c:109
|
||||
#: ports/nrf/common-hal/busio/SPI.c:115
|
||||
#, fuzzy
|
||||
msgid "All SPI peripherals are in use"
|
||||
msgstr "Alle timer werden benutzt"
|
||||
|
||||
#: ports/nrf/common-hal/busio/SPI.c:170
|
||||
msgid "Baud rate too high for this SPI peripheral"
|
||||
#: ports/nrf/common-hal/busio/UART.c:48
|
||||
#, c-format
|
||||
msgid "error = 0x%08lX"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:43 ports/nrf/common-hal/busio/UART.c:47
|
||||
#: ports/nrf/common-hal/busio/UART.c:51 ports/nrf/common-hal/busio/UART.c:60
|
||||
#: ports/nrf/common-hal/busio/UART.c:66 ports/nrf/common-hal/busio/UART.c:71
|
||||
#: ports/nrf/common-hal/busio/UART.c:76 ports/nrf/common-hal/busio/UART.c:81
|
||||
#: ports/nrf/common-hal/busio/UART.c:86 ports/nrf/common-hal/busio/UART.c:90
|
||||
msgid "busio.UART not yet implemented"
|
||||
#: ports/nrf/common-hal/busio/UART.c:86
|
||||
#, fuzzy
|
||||
msgid "Invalid buffer size"
|
||||
msgstr "ungültiger dupterm index"
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:90
|
||||
#, fuzzy
|
||||
msgid "Odd parity is not supported"
|
||||
msgstr "bytes mit merh als 8 bits werden nicht unterstützt"
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326
|
||||
#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336
|
||||
#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347
|
||||
#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356
|
||||
#: ports/nrf/common-hal/busio/UART.c:364
|
||||
msgid "busio.UART not available"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/microcontroller/Processor.c:49
|
||||
|
@ -726,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 ""
|
||||
|
@ -762,27 +783,27 @@ msgstr ""
|
|||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:470
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:520
|
||||
msgid "Can encode UUID into the advertisment packet."
|
||||
msgid "Can encode UUID into the advertisement packet."
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:545
|
||||
msgid "Can not fit data into the advertisment packet."
|
||||
msgid "Can not fit data into the advertisement packet."
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:558
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:604
|
||||
#, c-format
|
||||
msgid "Can not apply advertisment data. status: 0x%02x"
|
||||
msgid "Can not apply advertisement data. status: 0x%02x"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:614
|
||||
#, c-format
|
||||
msgid "Can not start advertisment. status: 0x%02x"
|
||||
msgid "Can not start advertisement. status: 0x%02x"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:631
|
||||
#, c-format
|
||||
msgid "Can not stop advertisment. status: 0x%02x"
|
||||
msgid "Can not stop advertisement. status: 0x%02x"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:650
|
||||
|
@ -1089,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 ""
|
||||
|
@ -1097,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"
|
||||
|
@ -1977,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 "
|
||||
|
@ -2001,19 +2089,19 @@ msgstr ""
|
|||
msgid "Buffer must be at least length 1"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:168
|
||||
#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175
|
||||
msgid "Invalid polarity"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:172
|
||||
#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179
|
||||
msgid "Invalid phase"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:176
|
||||
#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183
|
||||
msgid "Invalid number of bits"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:341
|
||||
#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348
|
||||
msgid "buffer slices must be of equal length"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2175,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
|
||||
|
@ -2268,6 +2356,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 ""
|
||||
|
@ -2288,14 +2404,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 ""
|
||||
|
|
203
locale/en_US.po
203
locale/en_US.po
|
@ -7,7 +7,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-09-21 12:23-0400\n"
|
||||
"POT-Creation-Date: 2018-10-09 20:51-0400\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 ""
|
||||
|
@ -361,7 +361,7 @@ msgstr ""
|
|||
#: ports/atmel-samd/common-hal/busio/SPI.c:132
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:119
|
||||
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45
|
||||
#: ports/nrf/common-hal/busio/I2C.c:77
|
||||
#: ports/nrf/common-hal/busio/I2C.c:81
|
||||
msgid "Invalid pins"
|
||||
msgstr ""
|
||||
|
||||
|
@ -378,10 +378,12 @@ msgid "bytes > 8 bits not supported"
|
|||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:72
|
||||
#: ports/nrf/common-hal/busio/UART.c:82
|
||||
msgid "tx and rx cannot both be None"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:145
|
||||
#: ports/nrf/common-hal/busio/UART.c:115
|
||||
msgid "Failed to allocate RX buffer"
|
||||
msgstr ""
|
||||
|
||||
|
@ -390,10 +392,12 @@ msgid "Could not initialize UART"
|
|||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:240
|
||||
#: ports/nrf/common-hal/busio/UART.c:149
|
||||
msgid "No RX pin"
|
||||
msgstr ""
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:294
|
||||
#: ports/nrf/common-hal/busio/UART.c:195
|
||||
msgid "No TX pin"
|
||||
msgstr ""
|
||||
|
||||
|
@ -409,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:232
|
||||
msgid "Invalid PWM frequency"
|
||||
msgstr ""
|
||||
|
||||
|
@ -690,24 +695,33 @@ msgstr ""
|
|||
msgid "AnalogOut functionality not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/busio/I2C.c:91
|
||||
#: ports/nrf/common-hal/busio/I2C.c:95
|
||||
msgid "All I2C peripherals are in use"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/busio/SPI.c:109
|
||||
#: ports/nrf/common-hal/busio/SPI.c:115
|
||||
msgid "All SPI peripherals are in use"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/busio/SPI.c:170
|
||||
msgid "Baud rate too high for this SPI peripheral"
|
||||
#: ports/nrf/common-hal/busio/UART.c:48
|
||||
#, c-format
|
||||
msgid "error = 0x%08lX"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:43 ports/nrf/common-hal/busio/UART.c:47
|
||||
#: ports/nrf/common-hal/busio/UART.c:51 ports/nrf/common-hal/busio/UART.c:60
|
||||
#: ports/nrf/common-hal/busio/UART.c:66 ports/nrf/common-hal/busio/UART.c:71
|
||||
#: ports/nrf/common-hal/busio/UART.c:76 ports/nrf/common-hal/busio/UART.c:81
|
||||
#: ports/nrf/common-hal/busio/UART.c:86 ports/nrf/common-hal/busio/UART.c:90
|
||||
msgid "busio.UART not yet implemented"
|
||||
#: ports/nrf/common-hal/busio/UART.c:86
|
||||
msgid "Invalid buffer size"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:90
|
||||
msgid "Odd parity is not supported"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326
|
||||
#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336
|
||||
#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347
|
||||
#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356
|
||||
#: ports/nrf/common-hal/busio/UART.c:364
|
||||
msgid "busio.UART not available"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/microcontroller/Processor.c:49
|
||||
|
@ -715,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 ""
|
||||
|
@ -751,27 +769,27 @@ msgstr ""
|
|||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:470
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:520
|
||||
msgid "Can encode UUID into the advertisment packet."
|
||||
msgid "Can encode UUID into the advertisement packet."
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:545
|
||||
msgid "Can not fit data into the advertisment packet."
|
||||
msgid "Can not fit data into the advertisement packet."
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:558
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:604
|
||||
#, c-format
|
||||
msgid "Can not apply advertisment data. status: 0x%02x"
|
||||
msgid "Can not apply advertisement data. status: 0x%02x"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:614
|
||||
#, c-format
|
||||
msgid "Can not start advertisment. status: 0x%02x"
|
||||
msgid "Can not start advertisement. status: 0x%02x"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:631
|
||||
#, c-format
|
||||
msgid "Can not stop advertisment. status: 0x%02x"
|
||||
msgid "Can not stop advertisement. status: 0x%02x"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:650
|
||||
|
@ -1078,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 ""
|
||||
|
@ -1086,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"
|
||||
|
@ -1966,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 "
|
||||
|
@ -1990,19 +2071,19 @@ msgstr ""
|
|||
msgid "Buffer must be at least length 1"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:168
|
||||
#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175
|
||||
msgid "Invalid polarity"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:172
|
||||
#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179
|
||||
msgid "Invalid phase"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:176
|
||||
#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183
|
||||
msgid "Invalid number of bits"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:341
|
||||
#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348
|
||||
msgid "buffer slices must be of equal length"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2163,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
|
||||
|
@ -2256,6 +2337,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 ""
|
||||
|
@ -2276,14 +2385,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 ""
|
||||
|
|
391
locale/es.po
391
locale/es.po
|
@ -7,7 +7,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-09-21 12:23-0400\n"
|
||||
"POT-Creation-Date: 2018-10-09 20:51-0400\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"
|
||||
|
@ -343,11 +343,11 @@ msgstr "pin inválido"
|
|||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c:84
|
||||
msgid "Invalid pin for left channel"
|
||||
msgstr ""
|
||||
msgstr "Pin inválido para canal izquierdo"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c:88
|
||||
msgid "Invalid pin for right channel"
|
||||
msgstr ""
|
||||
msgstr "Pin inválido para canal derecho"
|
||||
|
||||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c:91
|
||||
msgid "Cannot output both channels on the same pin"
|
||||
|
@ -366,7 +366,7 @@ msgstr "Todos los canales de eventos están siendo utilizados"
|
|||
#: ports/atmel-samd/common-hal/audioio/AudioOut.c:297
|
||||
#, c-format
|
||||
msgid "Sample rate too high. It must be less than %d"
|
||||
msgstr ""
|
||||
msgstr "Frecuencia de muestreo demasiado alta. Debe ser menor que %d"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/I2C.c:71
|
||||
msgid "Not enough pins available"
|
||||
|
@ -376,57 +376,62 @@ msgstr "No hay suficientes pines disponibles"
|
|||
#: ports/atmel-samd/common-hal/busio/SPI.c:132
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:119
|
||||
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45
|
||||
#: ports/nrf/common-hal/busio/I2C.c:77
|
||||
#: ports/nrf/common-hal/busio/I2C.c:81
|
||||
msgid "Invalid pins"
|
||||
msgstr "pines inválidos"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/I2C.c:101
|
||||
msgid "SDA or SCL needs a pull up"
|
||||
msgstr ""
|
||||
msgstr "SDA o SCL necesitan una pull up"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/I2C.c:121
|
||||
msgid "Unsupported baudrate"
|
||||
msgstr ""
|
||||
msgstr "Baudrate sin soporte"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:66
|
||||
msgid "bytes > 8 bits not supported"
|
||||
msgstr "bytes > 8 bits no son soportados"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:72
|
||||
#: ports/nrf/common-hal/busio/UART.c:82
|
||||
msgid "tx and rx cannot both be None"
|
||||
msgstr "tx y rx no pueden ser ambos None"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:145
|
||||
#: ports/nrf/common-hal/busio/UART.c:115
|
||||
msgid "Failed to allocate RX buffer"
|
||||
msgstr "Fallo la asignación del buffer RX"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:153
|
||||
msgid "Could not initialize UART"
|
||||
msgstr ""
|
||||
msgstr "No se pudo inicializar la UART"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:240
|
||||
#: ports/nrf/common-hal/busio/UART.c:149
|
||||
msgid "No RX pin"
|
||||
msgstr ""
|
||||
msgstr "Sin pin RX"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:294
|
||||
#: ports/nrf/common-hal/busio/UART.c:195
|
||||
msgid "No TX pin"
|
||||
msgstr ""
|
||||
msgstr "Sin pin TX"
|
||||
|
||||
#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c:170
|
||||
#: ports/nrf/common-hal/digitalio/DigitalInOut.c:142
|
||||
msgid "Cannot get pull while in output mode"
|
||||
msgstr ""
|
||||
msgstr "No se puede obtener pull mientras en modo de salida"
|
||||
|
||||
#: ports/atmel-samd/common-hal/microcontroller/__init__.c:74
|
||||
#: ports/esp8266/common-hal/microcontroller/__init__.c:64
|
||||
msgid "Cannot reset into bootloader because no bootloader is present."
|
||||
msgstr ""
|
||||
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:232
|
||||
msgid "Invalid PWM frequency"
|
||||
msgstr ""
|
||||
msgstr "Frecuencia PWM inválida"
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PWMOut.c:187
|
||||
msgid "All timers for this pin are in use"
|
||||
|
@ -434,7 +439,7 @@ msgstr "Todos los timers para este pin están siendo utilizados"
|
|||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:110
|
||||
msgid "No hardware support on pin"
|
||||
msgstr ""
|
||||
msgstr "pin no tiene soporte en hardware"
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:113
|
||||
msgid "EXTINT channel already in use"
|
||||
|
@ -449,16 +454,16 @@ msgstr "Fallo la asignación del buffer RX de %d bytes"
|
|||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:205
|
||||
#: ports/esp8266/common-hal/pulseio/PulseIn.c:151
|
||||
msgid "pop from an empty PulseIn"
|
||||
msgstr ""
|
||||
msgstr "pop en un PulseIn vacío"
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseIn.c:237
|
||||
#: ports/esp8266/common-hal/pulseio/PulseIn.c:182 py/obj.c:420
|
||||
msgid "index out of range"
|
||||
msgstr ""
|
||||
msgstr "index fuera de rango"
|
||||
|
||||
#: ports/atmel-samd/common-hal/pulseio/PulseOut.c:178
|
||||
msgid "Another send is already active"
|
||||
msgstr ""
|
||||
msgstr "Otro envío ya está activo"
|
||||
|
||||
#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c:38
|
||||
msgid "Both pins must support hardware interrupts"
|
||||
|
@ -474,11 +479,11 @@ msgstr "Valor de calibración fuera de rango +/-127"
|
|||
|
||||
#: ports/atmel-samd/common-hal/storage/__init__.c:48
|
||||
msgid "Cannot remount '/' when USB is active."
|
||||
msgstr ""
|
||||
msgstr "No se puede volver a montar '/' cuando el USB esta activo."
|
||||
|
||||
#: ports/atmel-samd/common-hal/touchio/TouchIn.c:75
|
||||
msgid "No free GCLKs"
|
||||
msgstr ""
|
||||
msgstr "Sin GCLKs libres"
|
||||
|
||||
#: ports/atmel-samd/common-hal/usb_hid/Device.c:78
|
||||
#: ports/nrf/common-hal/usb_hid/Device.c:45
|
||||
|
@ -489,48 +494,48 @@ msgstr "Tamaño de buffer incorrecto. Debe ser de %d bytes."
|
|||
#: ports/atmel-samd/common-hal/usb_hid/Device.c:82
|
||||
#: ports/nrf/common-hal/usb_hid/Device.c:53
|
||||
msgid "USB Busy"
|
||||
msgstr ""
|
||||
msgstr "USB ocupado"
|
||||
|
||||
#: ports/atmel-samd/common-hal/usb_hid/Device.c:82
|
||||
#: ports/nrf/common-hal/usb_hid/Device.c:59
|
||||
msgid "USB Error"
|
||||
msgstr ""
|
||||
msgstr "Error USB"
|
||||
|
||||
#: ports/esp8266/common-hal/analogio/AnalogIn.c:43
|
||||
msgid "Pin %q does not have ADC capabilities"
|
||||
msgstr ""
|
||||
msgstr "Pin %q no tiene capacidades ADC"
|
||||
|
||||
#: ports/esp8266/common-hal/analogio/AnalogOut.c:39
|
||||
msgid "No hardware support for analog out."
|
||||
msgstr ""
|
||||
msgstr "Sin soporte de hardware para salida análoga"
|
||||
|
||||
#: ports/esp8266/common-hal/busio/SPI.c:72
|
||||
msgid "Pins not valid for SPI"
|
||||
msgstr ""
|
||||
msgstr "Pines no válidos para SPI"
|
||||
|
||||
#: ports/esp8266/common-hal/busio/UART.c:45
|
||||
msgid "Only tx supported on UART1 (GPIO2)."
|
||||
msgstr ""
|
||||
msgstr "Solo tx soportada en UART1 (GPIO2)"
|
||||
|
||||
#: ports/esp8266/common-hal/busio/UART.c:67 ports/esp8266/machine_uart.c:108
|
||||
msgid "invalid data bits"
|
||||
msgstr ""
|
||||
msgstr "data bits inválidos"
|
||||
|
||||
#: ports/esp8266/common-hal/busio/UART.c:91 ports/esp8266/machine_uart.c:144
|
||||
msgid "invalid stop bits"
|
||||
msgstr ""
|
||||
msgstr "stop bits inválidos"
|
||||
|
||||
#: ports/esp8266/common-hal/digitalio/DigitalInOut.c:200
|
||||
msgid "ESP8266 does not support pull down."
|
||||
msgstr ""
|
||||
msgstr "ESP8266 no tiene soporte para pull down"
|
||||
|
||||
#: ports/esp8266/common-hal/digitalio/DigitalInOut.c:210
|
||||
msgid "GPIO16 does not support pull up."
|
||||
msgstr "GPIO16 no soporta pull up."
|
||||
msgstr "GPIO16 no tiene soporte para pull up."
|
||||
|
||||
#: ports/esp8266/common-hal/microcontroller/__init__.c:66
|
||||
msgid "ESP8226 does not support safe mode."
|
||||
msgstr "ESP8226 no soporta modo seguro"
|
||||
msgstr "ESP8226 no tiene soporte para modo seguro"
|
||||
|
||||
#: ports/esp8266/common-hal/pulseio/PWMOut.c:54
|
||||
#: ports/esp8266/common-hal/pulseio/PWMOut.c:113
|
||||
|
@ -564,273 +569,288 @@ msgstr "No se pudo montar de nuevo el sistema de archivos"
|
|||
|
||||
#: ports/esp8266/common-hal/storage/__init__.c:38
|
||||
msgid "Use esptool to erase flash and re-upload Python instead"
|
||||
msgstr ""
|
||||
msgstr "Usa esptool para borrar la flash y vuelve a cargar Python en su lugar"
|
||||
|
||||
#: ports/esp8266/esp_mphal.c:154
|
||||
msgid "C-level assert"
|
||||
msgstr ""
|
||||
msgstr "C-level assert"
|
||||
|
||||
#: ports/esp8266/machine_adc.c:57
|
||||
#, c-format
|
||||
msgid "not a valid ADC Channel: %d"
|
||||
msgstr ""
|
||||
msgstr "no es un canal ADC válido: %d"
|
||||
|
||||
#: ports/esp8266/machine_hspi.c:131 ports/esp8266/machine_hspi.c:137
|
||||
msgid "impossible baudrate"
|
||||
msgstr ""
|
||||
msgstr "baudrate imposible"
|
||||
|
||||
#: ports/esp8266/machine_pin.c:129
|
||||
msgid "expecting a pin"
|
||||
msgstr ""
|
||||
msgstr "esperando un pin"
|
||||
|
||||
#: ports/esp8266/machine_pin.c:284
|
||||
msgid "Pin(16) doesn't support pull"
|
||||
msgstr ""
|
||||
msgstr "Pin(16) no tiene soporte para pull"
|
||||
|
||||
#: ports/esp8266/machine_pin.c:323
|
||||
msgid "invalid pin"
|
||||
msgstr ""
|
||||
msgstr "pin inválido"
|
||||
|
||||
#: ports/esp8266/machine_pin.c:389
|
||||
msgid "pin does not have IRQ capabilities"
|
||||
msgstr ""
|
||||
msgstr "pin no tiene capacidades IRQ"
|
||||
|
||||
#: ports/esp8266/machine_rtc.c:185
|
||||
msgid "buffer too long"
|
||||
msgstr ""
|
||||
msgstr "buffer demasiado largo"
|
||||
|
||||
#: ports/esp8266/machine_rtc.c:209 ports/esp8266/machine_rtc.c:223
|
||||
#: ports/esp8266/machine_rtc.c:246
|
||||
msgid "invalid alarm"
|
||||
msgstr ""
|
||||
msgstr "alarma inválida"
|
||||
|
||||
#: ports/esp8266/machine_uart.c:169
|
||||
#, c-format
|
||||
msgid "UART(%d) does not exist"
|
||||
msgstr ""
|
||||
msgstr "UART(%d) no existe"
|
||||
|
||||
#: ports/esp8266/machine_uart.c:219
|
||||
msgid "UART(1) can't read"
|
||||
msgstr ""
|
||||
msgstr "UART(1) no puede leer"
|
||||
|
||||
#: ports/esp8266/modesp.c:119
|
||||
msgid "len must be multiple of 4"
|
||||
msgstr ""
|
||||
msgstr "len debe de ser múltiple de 4"
|
||||
|
||||
#: ports/esp8266/modesp.c:274
|
||||
#, c-format
|
||||
msgid "memory allocation failed, allocating %u bytes for native code"
|
||||
msgstr ""
|
||||
"la asignación de memoria ha fallado, asignando %u bytes para código nativo"
|
||||
|
||||
#: ports/esp8266/modesp.c:317
|
||||
msgid "flash location must be below 1MByte"
|
||||
msgstr ""
|
||||
msgstr "la ubicación de la flash debe estar debajo de 1MByte"
|
||||
|
||||
#: ports/esp8266/modmachine.c:63
|
||||
msgid "frequency can only be either 80Mhz or 160MHz"
|
||||
msgstr ""
|
||||
msgstr "la frecuencia solo puede ser 80MHz o 160MHz"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:61
|
||||
msgid "AP required"
|
||||
msgstr ""
|
||||
msgstr "AP necesario"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:61
|
||||
msgid "STA required"
|
||||
msgstr ""
|
||||
msgstr "STA necesario"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:87
|
||||
msgid "Cannot update i/f status"
|
||||
msgstr ""
|
||||
msgstr "No se puede actualizar i/f status"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:142
|
||||
msgid "Cannot set STA config"
|
||||
msgstr ""
|
||||
msgstr "No se puede establecer STA config"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:144
|
||||
msgid "Cannot connect to AP"
|
||||
msgstr ""
|
||||
msgstr "No se puede conectar a AP"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:152
|
||||
msgid "Cannot disconnect from AP"
|
||||
msgstr ""
|
||||
msgstr "No se puede desconectar de AP"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:173
|
||||
msgid "unknown status param"
|
||||
msgstr ""
|
||||
msgstr "status param desconocido"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:222
|
||||
msgid "STA must be active"
|
||||
msgstr ""
|
||||
msgstr "STA debe estar activo"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:239
|
||||
msgid "scan failed"
|
||||
msgstr ""
|
||||
msgstr "scan ha fallado"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:306
|
||||
msgid "wifi_set_ip_info() failed"
|
||||
msgstr ""
|
||||
msgstr "wifi_set_ip_info() ha fallado"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:319
|
||||
msgid "either pos or kw args are allowed"
|
||||
msgstr ""
|
||||
msgstr "ya sea pos o kw args son permitidos"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:329
|
||||
msgid "can't get STA config"
|
||||
msgstr ""
|
||||
msgstr "no se puede obtener STA config"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:331
|
||||
msgid "can't get AP config"
|
||||
msgstr ""
|
||||
msgstr "no se puede obtener AP config"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:346
|
||||
msgid "invalid buffer length"
|
||||
msgstr ""
|
||||
msgstr "longitud de buffer inválida"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:405
|
||||
msgid "can't set STA config"
|
||||
msgstr ""
|
||||
msgstr "no se puede establecer STA config"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:407
|
||||
msgid "can't set AP config"
|
||||
msgstr ""
|
||||
msgstr "no se puede establecer AP config"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:416
|
||||
msgid "can query only one param"
|
||||
msgstr ""
|
||||
msgstr "puede consultar solo un param"
|
||||
|
||||
#: ports/esp8266/modnetwork.c:469
|
||||
msgid "unknown config param"
|
||||
msgstr ""
|
||||
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:91
|
||||
#: ports/nrf/common-hal/busio/I2C.c:95
|
||||
msgid "All I2C peripherals are in use"
|
||||
msgstr "Todos los timers están siendo utilizados"
|
||||
|
||||
#: ports/nrf/common-hal/busio/SPI.c:109
|
||||
#: ports/nrf/common-hal/busio/SPI.c:115
|
||||
msgid "All SPI peripherals are in use"
|
||||
msgstr "Todos los timers están siendo utilizados"
|
||||
|
||||
#: ports/nrf/common-hal/busio/SPI.c:170
|
||||
msgid "Baud rate too high for this SPI peripheral"
|
||||
msgstr ""
|
||||
#: ports/nrf/common-hal/busio/UART.c:48
|
||||
#, c-format
|
||||
msgid "error = 0x%08lX"
|
||||
msgstr "error = 0x%08lx"
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:43 ports/nrf/common-hal/busio/UART.c:47
|
||||
#: ports/nrf/common-hal/busio/UART.c:51 ports/nrf/common-hal/busio/UART.c:60
|
||||
#: ports/nrf/common-hal/busio/UART.c:66 ports/nrf/common-hal/busio/UART.c:71
|
||||
#: ports/nrf/common-hal/busio/UART.c:76 ports/nrf/common-hal/busio/UART.c:81
|
||||
#: ports/nrf/common-hal/busio/UART.c:86 ports/nrf/common-hal/busio/UART.c:90
|
||||
msgid "busio.UART not yet implemented"
|
||||
msgstr ""
|
||||
#: ports/nrf/common-hal/busio/UART.c:86
|
||||
msgid "Invalid buffer size"
|
||||
msgstr "Tamaño de buffer inválido"
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:90
|
||||
msgid "Odd parity is not supported"
|
||||
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
|
||||
#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347
|
||||
#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356
|
||||
#: ports/nrf/common-hal/busio/UART.c:364
|
||||
msgid "busio.UART not available"
|
||||
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 advertisment packet."
|
||||
msgstr ""
|
||||
msgid "Can encode UUID into the advertisement packet."
|
||||
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 advertisment packet."
|
||||
msgstr ""
|
||||
msgid "Can not fit data into the advertisement packet."
|
||||
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 advertisment data. status: 0x%02x"
|
||||
msgstr ""
|
||||
msgid "Can not apply advertisement data. status: 0x%02x"
|
||||
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 advertisment. status: 0x%02x"
|
||||
msgstr ""
|
||||
msgid "Can not start advertisement. status: 0x%02x"
|
||||
msgstr "No se puede inicar el anuncio. status: 0x%02x"
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:631
|
||||
#, c-format
|
||||
msgid "Can not stop advertisment. status: 0x%02x"
|
||||
msgstr ""
|
||||
msgid "Can not stop advertisement. status: 0x%02x"
|
||||
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"
|
||||
|
@ -1095,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 ""
|
||||
|
@ -1103,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"
|
||||
|
@ -1620,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 ""
|
||||
|
@ -1802,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"
|
||||
|
||||
|
@ -1812,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"
|
||||
|
||||
|
@ -1832,7 +1897,6 @@ msgid "can only save bytecode"
|
|||
msgstr ""
|
||||
|
||||
#: py/runtime.c:206
|
||||
#, fuzzy
|
||||
msgid "name not defined"
|
||||
msgstr "módulo no encontrado"
|
||||
|
||||
|
@ -2009,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 "
|
||||
|
@ -2033,19 +2117,19 @@ msgstr ""
|
|||
msgid "Buffer must be at least length 1"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:168
|
||||
#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175
|
||||
msgid "Invalid polarity"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:172
|
||||
#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179
|
||||
msgid "Invalid phase"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:176
|
||||
#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183
|
||||
msgid "Invalid number of bits"
|
||||
msgstr ""
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:341
|
||||
#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348
|
||||
msgid "buffer slices must be of equal length"
|
||||
msgstr ""
|
||||
|
||||
|
@ -2207,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
|
||||
|
@ -2301,6 +2385,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 ""
|
||||
|
@ -2321,14 +2433,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 ""
|
||||
|
@ -2396,3 +2500,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"
|
||||
|
|
220
locale/fil.po
220
locale/fil.po
|
@ -7,7 +7,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: \n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-09-21 12:23-0400\n"
|
||||
"POT-Creation-Date: 2018-10-09 20:51-0400\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"
|
||||
|
@ -373,7 +373,7 @@ msgstr "Hindi sapat ang magagamit na pins"
|
|||
#: ports/atmel-samd/common-hal/busio/SPI.c:132
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:119
|
||||
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45
|
||||
#: ports/nrf/common-hal/busio/I2C.c:77
|
||||
#: ports/nrf/common-hal/busio/I2C.c:81
|
||||
msgid "Invalid pins"
|
||||
msgstr "Mali ang pins"
|
||||
|
||||
|
@ -390,10 +390,12 @@ msgid "bytes > 8 bits not supported"
|
|||
msgstr "hindi sinusuportahan ang bytes > 8 bits"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:72
|
||||
#: ports/nrf/common-hal/busio/UART.c:82
|
||||
msgid "tx and rx cannot both be None"
|
||||
msgstr "tx at rx hindi pwedeng parehas na None"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:145
|
||||
#: ports/nrf/common-hal/busio/UART.c:115
|
||||
msgid "Failed to allocate RX buffer"
|
||||
msgstr "Nabigong ilaan ang RX buffer"
|
||||
|
||||
|
@ -402,10 +404,12 @@ msgid "Could not initialize UART"
|
|||
msgstr "Hindi ma-initialize ang UART"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:240
|
||||
#: ports/nrf/common-hal/busio/UART.c:149
|
||||
msgid "No RX pin"
|
||||
msgstr "Walang RX pin"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:294
|
||||
#: ports/nrf/common-hal/busio/UART.c:195
|
||||
msgid "No TX pin"
|
||||
msgstr "Walang TX pin"
|
||||
|
||||
|
@ -421,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:232
|
||||
msgid "Invalid PWM frequency"
|
||||
msgstr "Mali ang PWM frequency"
|
||||
|
||||
|
@ -705,33 +710,49 @@ msgstr "hindi alam na config param"
|
|||
msgid "AnalogOut functionality not supported"
|
||||
msgstr "Hindi supportado ang AnalogOut"
|
||||
|
||||
#: ports/nrf/common-hal/busio/I2C.c:91
|
||||
#: ports/nrf/common-hal/busio/I2C.c:95
|
||||
#, fuzzy
|
||||
msgid "All I2C peripherals are in use"
|
||||
msgstr "Lahat ng timer ginagamit"
|
||||
|
||||
#: ports/nrf/common-hal/busio/SPI.c:109
|
||||
#: ports/nrf/common-hal/busio/SPI.c:115
|
||||
#, fuzzy
|
||||
msgid "All SPI peripherals are in use"
|
||||
msgstr "Lahat ng timer ginagamit"
|
||||
|
||||
#: ports/nrf/common-hal/busio/SPI.c:170
|
||||
msgid "Baud rate too high for this SPI peripheral"
|
||||
#: ports/nrf/common-hal/busio/UART.c:48
|
||||
#, c-format
|
||||
msgid "error = 0x%08lX"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:43 ports/nrf/common-hal/busio/UART.c:47
|
||||
#: ports/nrf/common-hal/busio/UART.c:51 ports/nrf/common-hal/busio/UART.c:60
|
||||
#: ports/nrf/common-hal/busio/UART.c:66 ports/nrf/common-hal/busio/UART.c:71
|
||||
#: ports/nrf/common-hal/busio/UART.c:76 ports/nrf/common-hal/busio/UART.c:81
|
||||
#: ports/nrf/common-hal/busio/UART.c:86 ports/nrf/common-hal/busio/UART.c:90
|
||||
msgid "busio.UART not yet implemented"
|
||||
msgstr "hindi pa implemented ang busio.UART"
|
||||
#: ports/nrf/common-hal/busio/UART.c:86
|
||||
#, fuzzy
|
||||
msgid "Invalid buffer size"
|
||||
msgstr "mali ang buffer length"
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:90
|
||||
#, fuzzy
|
||||
msgid "Odd parity is not supported"
|
||||
msgstr "hindi sinusuportahan ang bytes > 8 bits"
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326
|
||||
#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336
|
||||
#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347
|
||||
#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356
|
||||
#: ports/nrf/common-hal/busio/UART.c:364
|
||||
msgid "busio.UART not available"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/microcontroller/Processor.c:49
|
||||
#, c-format
|
||||
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."
|
||||
|
@ -768,28 +789,28 @@ msgstr "Hindi ma-encode UUID, para suriin ang haba."
|
|||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:470
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:520
|
||||
msgid "Can encode UUID into the advertisment packet."
|
||||
msgid "Can encode UUID into the advertisement packet."
|
||||
msgstr "Maaring i-encode ang UUID sa advertisement packet."
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:545
|
||||
msgid "Can not fit data into the advertisment packet."
|
||||
msgid "Can not fit data into the advertisement packet."
|
||||
msgstr "Hindi makasya ang data sa loob ng advertisement packet."
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:558
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:604
|
||||
#, c-format
|
||||
msgid "Can not apply advertisment data. status: 0x%02x"
|
||||
msgstr "Hindi ma i-apply ang advertisment data. status: 0x%02x"
|
||||
msgid "Can not apply advertisement data. status: 0x%02x"
|
||||
msgstr "Hindi ma i-apply ang advertisement data. status: 0x%02x"
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:614
|
||||
#, c-format
|
||||
msgid "Can not start advertisment. status: 0x%02x"
|
||||
msgid "Can not start advertisement. status: 0x%02x"
|
||||
msgstr "Hindi masimulaan ang advertisement. status 0x%02x"
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:631
|
||||
#, c-format
|
||||
msgid "Can not stop advertisment. status: 0x%02x"
|
||||
msgstr "Hindi mahinto ang advertisment. status: 0x%02x"
|
||||
msgid "Can not stop advertisement. status: 0x%02x"
|
||||
msgstr "Hindi mahinto ang advertisement. status: 0x%02x"
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:650
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:726
|
||||
|
@ -1099,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"
|
||||
|
@ -1107,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"
|
||||
|
@ -2004,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 "
|
||||
|
@ -2030,19 +2121,19 @@ msgstr "Function nangangailangan ng lock"
|
|||
msgid "Buffer must be at least length 1"
|
||||
msgstr "Buffer dapat ay hindi baba sa 1 na haba"
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:168
|
||||
#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175
|
||||
msgid "Invalid polarity"
|
||||
msgstr "Mali ang polarity"
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:172
|
||||
#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179
|
||||
msgid "Invalid phase"
|
||||
msgstr "Mali ang phase"
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:176
|
||||
#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183
|
||||
msgid "Invalid number of bits"
|
||||
msgstr "Mali ang bilang ng bits"
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:341
|
||||
#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348
|
||||
msgid "buffer slices must be of equal length"
|
||||
msgstr "aarehas na haba dapat ang buffer slices"
|
||||
|
||||
|
@ -2216,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."
|
||||
|
||||
|
@ -2313,6 +2405,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"
|
||||
|
@ -2333,14 +2453,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"
|
||||
|
|
216
locale/fr.po
216
locale/fr.po
|
@ -7,7 +7,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: 0.1\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2018-09-21 12:23-0400\n"
|
||||
"POT-Creation-Date: 2018-10-09 20:51-0400\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"
|
||||
|
@ -368,7 +368,7 @@ msgstr "Pas assez de broches disponibles"
|
|||
#: ports/atmel-samd/common-hal/busio/SPI.c:132
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:119
|
||||
#: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c:45
|
||||
#: ports/nrf/common-hal/busio/I2C.c:77
|
||||
#: ports/nrf/common-hal/busio/I2C.c:81
|
||||
msgid "Invalid pins"
|
||||
msgstr "Broche invalide"
|
||||
|
||||
|
@ -385,10 +385,12 @@ msgid "bytes > 8 bits not supported"
|
|||
msgstr "octets > 8 bits non supporté"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:72
|
||||
#: ports/nrf/common-hal/busio/UART.c:82
|
||||
msgid "tx and rx cannot both be None"
|
||||
msgstr "TX et RX ne peuvent être None tous les deux"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:145
|
||||
#: ports/nrf/common-hal/busio/UART.c:115
|
||||
msgid "Failed to allocate RX buffer"
|
||||
msgstr "Echec de l'allocation du tampon RX"
|
||||
|
||||
|
@ -397,10 +399,12 @@ msgid "Could not initialize UART"
|
|||
msgstr "L'UART n'a pu être initialisé"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:240
|
||||
#: ports/nrf/common-hal/busio/UART.c:149
|
||||
msgid "No RX pin"
|
||||
msgstr "Pas de broche RX"
|
||||
|
||||
#: ports/atmel-samd/common-hal/busio/UART.c:294
|
||||
#: ports/nrf/common-hal/busio/UART.c:195
|
||||
msgid "No TX pin"
|
||||
msgstr "Pas de broche TX"
|
||||
|
||||
|
@ -417,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:232
|
||||
msgid "Invalid PWM frequency"
|
||||
msgstr "Fréquence de PWM invalide"
|
||||
|
||||
|
@ -701,33 +706,50 @@ msgstr "paramètre de config. inconnu"
|
|||
msgid "AnalogOut functionality not supported"
|
||||
msgstr "AnalogOut non supporté"
|
||||
|
||||
#: ports/nrf/common-hal/busio/I2C.c:91
|
||||
#: ports/nrf/common-hal/busio/I2C.c:95
|
||||
#, fuzzy
|
||||
msgid "All I2C peripherals are in use"
|
||||
msgstr "Tous les timers sont utilisés"
|
||||
|
||||
#: ports/nrf/common-hal/busio/SPI.c:109
|
||||
#: ports/nrf/common-hal/busio/SPI.c:115
|
||||
#, fuzzy
|
||||
msgid "All SPI peripherals are in use"
|
||||
msgstr "Tous les timers sont utilisés"
|
||||
|
||||
#: ports/nrf/common-hal/busio/SPI.c:170
|
||||
msgid "Baud rate too high for this SPI peripheral"
|
||||
#: ports/nrf/common-hal/busio/UART.c:48
|
||||
#, c-format
|
||||
msgid "error = 0x%08lX"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:43 ports/nrf/common-hal/busio/UART.c:47
|
||||
#: ports/nrf/common-hal/busio/UART.c:51 ports/nrf/common-hal/busio/UART.c:60
|
||||
#: ports/nrf/common-hal/busio/UART.c:66 ports/nrf/common-hal/busio/UART.c:71
|
||||
#: ports/nrf/common-hal/busio/UART.c:76 ports/nrf/common-hal/busio/UART.c:81
|
||||
#: ports/nrf/common-hal/busio/UART.c:86 ports/nrf/common-hal/busio/UART.c:90
|
||||
msgid "busio.UART not yet implemented"
|
||||
msgstr "busio.UART pas encore implémenté"
|
||||
#: ports/nrf/common-hal/busio/UART.c:86
|
||||
#, fuzzy
|
||||
msgid "Invalid buffer size"
|
||||
msgstr "longueur de tampon invalide"
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:90
|
||||
#, fuzzy
|
||||
msgid "Odd parity is not supported"
|
||||
msgstr "octets > 8 bits non supporté"
|
||||
|
||||
#: ports/nrf/common-hal/busio/UART.c:322 ports/nrf/common-hal/busio/UART.c:326
|
||||
#: ports/nrf/common-hal/busio/UART.c:331 ports/nrf/common-hal/busio/UART.c:336
|
||||
#: ports/nrf/common-hal/busio/UART.c:342 ports/nrf/common-hal/busio/UART.c:347
|
||||
#: ports/nrf/common-hal/busio/UART.c:352 ports/nrf/common-hal/busio/UART.c:356
|
||||
#: ports/nrf/common-hal/busio/UART.c:364
|
||||
#, fuzzy
|
||||
msgid "busio.UART not available"
|
||||
msgstr "busio.UART n'est pas disponible"
|
||||
|
||||
#: ports/nrf/common-hal/microcontroller/Processor.c:49
|
||||
#, c-format
|
||||
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"
|
||||
|
@ -764,27 +786,27 @@ msgstr "Impossible d'encoder l'UUID pour vérifier la longueur."
|
|||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:470
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:520
|
||||
msgid "Can encode UUID into the advertisment packet."
|
||||
msgid "Can encode UUID into the advertisement packet."
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:545
|
||||
msgid "Can not fit data into the advertisment packet."
|
||||
msgid "Can not fit data into the advertisement packet."
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:558
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:604
|
||||
#, c-format
|
||||
msgid "Can not apply advertisment data. status: 0x%02x"
|
||||
msgid "Can not apply advertisement data. status: 0x%02x"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:614
|
||||
#, c-format
|
||||
msgid "Can not start advertisment. status: 0x%02x"
|
||||
msgid "Can not start advertisement. status: 0x%02x"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:631
|
||||
#, c-format
|
||||
msgid "Can not stop advertisment. status: 0x%02x"
|
||||
msgid "Can not stop advertisement. status: 0x%02x"
|
||||
msgstr ""
|
||||
|
||||
#: ports/nrf/drivers/bluetooth/ble_drv.c:650
|
||||
|
@ -1092,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 ""
|
||||
|
@ -1100,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"
|
||||
|
@ -1995,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 "
|
||||
|
@ -2021,19 +2112,19 @@ msgstr "La fonction nécessite un verrou"
|
|||
msgid "Buffer must be at least length 1"
|
||||
msgstr "Le tampon doit être de longueur au moins 1"
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:168
|
||||
#: shared-bindings/bitbangio/SPI.c:151 shared-bindings/busio/SPI.c:175
|
||||
msgid "Invalid polarity"
|
||||
msgstr "Polarité invalide"
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:172
|
||||
#: shared-bindings/bitbangio/SPI.c:155 shared-bindings/busio/SPI.c:179
|
||||
msgid "Invalid phase"
|
||||
msgstr "Phase invalide"
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:176
|
||||
#: shared-bindings/bitbangio/SPI.c:159 shared-bindings/busio/SPI.c:183
|
||||
msgid "Invalid number of bits"
|
||||
msgstr "Nombre de bits invalide"
|
||||
|
||||
#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:341
|
||||
#: shared-bindings/bitbangio/SPI.c:284 shared-bindings/busio/SPI.c:348
|
||||
msgid "buffer slices must be of equal length"
|
||||
msgstr "les slices de tampon doivent être de longueurs égales"
|
||||
|
||||
|
@ -2211,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."
|
||||
|
@ -2309,6 +2401,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"
|
||||
|
@ -2329,14 +2449,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"
|
||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -407,6 +407,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++) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#define CIRCUITPY_MCU_FAMILY samd51
|
||||
|
||||
// This is for Rev A
|
||||
// This is for Rev D
|
||||
#define MICROPY_HW_APA102_MOSI (&pin_PA01)
|
||||
#define MICROPY_HW_APA102_SCK (&pin_PA00)
|
||||
|
||||
|
|
|
@ -15,6 +15,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
|
|||
{ MP_OBJ_NEW_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PB08) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PB09) },
|
||||
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_SDA), MP_ROM_PTR(&pin_PA12) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_ACCELEROMETER_SCL), MP_ROM_PTR(&pin_PA13) },
|
||||
|
||||
// Key Grid columns
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_COL0), MP_ROM_PTR(&pin_PA14) },
|
||||
{ MP_OBJ_NEW_QSTR(MP_QSTR_COL1), MP_ROM_PTR(&pin_PA15) },
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -266,5 +266,23 @@ typedef struct {
|
|||
}
|
||||
|
||||
|
||||
// Settings for the Winbond W25Q128JV-SQ 8MiB SPI flash. Note that JV-IM has a different .memory_type (0x70)
|
||||
// Datasheet: https://www.winbond.com/resource-files/w25q128jv%20revf%2003272018%20plus.pdf
|
||||
#define W25Q128JV_SQ {\
|
||||
.total_size = (1 << 23), /* 16 MiB */ \
|
||||
.start_up_time_us = 5000, \
|
||||
.manufacturer_id = 0xef, \
|
||||
.memory_type = 0x40, \
|
||||
.capacity = 0x18, \
|
||||
.max_clock_speed_mhz = 133, \
|
||||
.has_sector_protection = false, \
|
||||
.supports_fast_read = true, \
|
||||
.supports_qspi = true, \
|
||||
.has_quad_enable = true, \
|
||||
.supports_qspi_writes = true, \
|
||||
.write_status_register_split = false, \
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif // MICROPY_INCLUDED_ATMEL_SAMD_EXTERNAL_FLASH_DEVICES_H
|
||||
|
|
|
@ -207,7 +207,7 @@ extern const struct _mp_obj_module_t usb_hid_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
|
||||
|
|
|
@ -91,7 +91,7 @@ SRC_NRFX = $(addprefix nrfx/,\
|
|||
drivers/src/nrfx_power.c \
|
||||
drivers/src/nrfx_spim.c \
|
||||
drivers/src/nrfx_twim.c \
|
||||
drivers/src/nrfx_uart.c \
|
||||
drivers/src/nrfx_uarte.c \
|
||||
)
|
||||
|
||||
SRC_C += \
|
||||
|
@ -100,6 +100,7 @@ SRC_C += \
|
|||
internal_flash.c \
|
||||
mphalport.c \
|
||||
tick.c \
|
||||
board_busses.c \
|
||||
boards/$(BOARD)/board.c \
|
||||
boards/$(BOARD)/pins.c \
|
||||
device/$(MCU_VARIANT)/startup_$(MCU_SUB_VARIANT).c \
|
||||
|
|
|
@ -30,7 +30,6 @@
|
|||
|
||||
#define MICROPY_HW_UART_RX NRF_GPIO_PIN_MAP(0, 8)
|
||||
#define MICROPY_HW_UART_TX NRF_GPIO_PIN_MAP(0, 6)
|
||||
#define MICROPY_HW_UART_HWFC (0)
|
||||
|
||||
#define PORT_HEAP_SIZE (32 * 1024)
|
||||
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
|
||||
|
|
|
@ -67,5 +67,5 @@
|
|||
#define DEFAULT_SPI_BUS_MOSI (&pin_P0_23)
|
||||
#define DEFAULT_SPI_BUS_MISO (&pin_P0_22)
|
||||
|
||||
#define DEFAULT_UART_BUS_RX (&pin_P1_0)
|
||||
#define DEFAULT_UART_BUS_RX (&pin_P1_00)
|
||||
#define DEFAULT_UART_BUS_TX (&pin_P0_24)
|
||||
|
|
|
@ -28,17 +28,9 @@
|
|||
#define MICROPY_HW_MCU_NAME "nRF52840"
|
||||
#define MICROPY_PY_SYS_PLATFORM "nRF52840-DK"
|
||||
|
||||
// See legend on bottom of board
|
||||
#define MICROPY_HW_UART_RX NRF_GPIO_PIN_MAP(0, 8)
|
||||
#define MICROPY_HW_UART_TX NRF_GPIO_PIN_MAP(0, 6)
|
||||
#define MICROPY_HW_UART_HWFC (0)
|
||||
|
||||
#define PORT_HEAP_SIZE (128 * 1024)
|
||||
#define CIRCUITPY_AUTORELOAD_DELAY_MS 500
|
||||
|
||||
// Temp (could be removed) 0: usb cdc (default), 1 : hwuart (jlink)
|
||||
#define CFG_HWUART_FOR_SERIAL 0
|
||||
|
||||
#define DEFAULT_I2C_BUS_SCL (&pin_P0_27)
|
||||
#define DEFAULT_I2C_BUS_SDA (&pin_P0_26)
|
||||
|
||||
|
|
|
@ -124,6 +124,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = {
|
|||
{ MP_ROM_QSTR(MP_QSTR_P1_15), MP_ROM_PTR(&pin_P1_15) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_P1_15) },
|
||||
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_P1_15) },
|
||||
|
||||
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
|
||||
};
|
||||
|
||||
MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table);
|
||||
|
|
|
@ -54,7 +54,11 @@ STATIC twim_peripheral_t twim_peripherals[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
#define INST_NO 0
|
||||
void i2c_reset(void) {
|
||||
for (size_t i = 0 ; i < MP_ARRAY_SIZE(twim_peripherals); i++) {
|
||||
twim_peripherals[i].in_use = false;
|
||||
}
|
||||
}
|
||||
|
||||
static uint8_t twi_error_to_mp(const nrfx_err_t err) {
|
||||
switch (err) {
|
||||
|
|
|
@ -45,4 +45,6 @@ typedef struct {
|
|||
uint8_t sda_pin_number;
|
||||
} busio_i2c_obj_t;
|
||||
|
||||
void i2c_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_NRF_COMMON_HAL_BUSIO_I2C_H
|
||||
|
|
|
@ -59,40 +59,46 @@ STATIC spim_peripheral_t spim_peripherals[] = {
|
|||
#endif
|
||||
};
|
||||
|
||||
// Convert frequency to clock-speed-dependent value
|
||||
static nrf_spim_frequency_t baudrate_to_spim_frequency(const uint32_t baudrate) {
|
||||
if (baudrate <= 125000) {
|
||||
return NRF_SPIM_FREQ_125K;
|
||||
void spi_reset(void) {
|
||||
for (size_t i = 0 ; i < MP_ARRAY_SIZE(spim_peripherals); i++) {
|
||||
nrf_spim_disable(spim_peripherals[i].spim.p_reg);
|
||||
}
|
||||
if (baudrate <= 250000) {
|
||||
return NRF_SPIM_FREQ_250K;
|
||||
}
|
||||
if (baudrate <= 500000) {
|
||||
return NRF_SPIM_FREQ_500K;
|
||||
}
|
||||
if (baudrate <= 1000000) {
|
||||
return NRF_SPIM_FREQ_1M;
|
||||
}
|
||||
if (baudrate <= 2000000) {
|
||||
return NRF_SPIM_FREQ_2M;
|
||||
}
|
||||
if (baudrate <= 4000000) {
|
||||
return NRF_SPIM_FREQ_4M;
|
||||
}
|
||||
if (baudrate <= 8000000) {
|
||||
return NRF_SPIM_FREQ_8M;
|
||||
}
|
||||
#ifdef SPIM_FREQUENCY_FREQUENCY_M16
|
||||
if (baudrate <= 16000000) {
|
||||
return NRF_SPIM_FREQ_16M;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Convert frequency to clock-speed-dependent value. Choose the next lower baudrate if in between
|
||||
// available baudrates.
|
||||
static nrf_spim_frequency_t baudrate_to_spim_frequency(const uint32_t baudrate) {
|
||||
|
||||
static const struct {
|
||||
const uint32_t boundary;
|
||||
nrf_spim_frequency_t spim_frequency;
|
||||
} baudrate_map[] = {
|
||||
#ifdef SPIM_FREQUENCY_FREQUENCY_M32
|
||||
return NRF_SPIM_FREQ_32M;
|
||||
#else
|
||||
return NRF_SPIM_FREQ_8M;
|
||||
{ 32000000, NRF_SPIM_FREQ_32M },
|
||||
#endif
|
||||
#ifdef SPIM_FREQUENCY_FREQUENCY_M16
|
||||
{ 16000000, NRF_SPIM_FREQ_16M },
|
||||
#endif
|
||||
{ 8000000, NRF_SPIM_FREQ_8M },
|
||||
{ 4000000, NRF_SPIM_FREQ_4M },
|
||||
{ 2000000, NRF_SPIM_FREQ_2M },
|
||||
{ 1000000, NRF_SPIM_FREQ_1M },
|
||||
{ 500000, NRF_SPIM_FREQ_500K },
|
||||
{ 250000, NRF_SPIM_FREQ_250K },
|
||||
{ 0, NRF_SPIM_FREQ_125K },
|
||||
};
|
||||
|
||||
size_t i = 0;
|
||||
uint32_t boundary;
|
||||
do {
|
||||
boundary = baudrate_map[i].boundary;
|
||||
if (baudrate >= boundary) {
|
||||
return baudrate_map[i].spim_frequency;
|
||||
}
|
||||
i++;
|
||||
} while (boundary != 0);
|
||||
// Should not get here.
|
||||
return 0;
|
||||
}
|
||||
|
||||
void common_hal_busio_spi_construct(busio_spi_obj_t *self, const mcu_pin_obj_t * clock, const mcu_pin_obj_t * mosi, const mcu_pin_obj_t * miso) {
|
||||
|
@ -162,26 +168,26 @@ void common_hal_busio_spi_deinit(busio_spi_obj_t *self) {
|
|||
}
|
||||
|
||||
bool common_hal_busio_spi_configure(busio_spi_obj_t *self, uint32_t baudrate, uint8_t polarity, uint8_t phase, uint8_t bits) {
|
||||
// nrf52 does not support 16 bit
|
||||
if (bits != 8)
|
||||
// nrf52 does not support 16 bit
|
||||
if (bits != 8) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (baudrate > self->spim_peripheral->max_frequency_MHz * 1000000) {
|
||||
mp_raise_ValueError(translate("Baud rate too high for this SPI peripheral"));
|
||||
return false;
|
||||
}
|
||||
nrf_spim_frequency_set(self->spim_peripheral->spim.p_reg, baudrate_to_spim_frequency(baudrate));
|
||||
// Set desired frequency, rounding down, and don't go above available frequency for this SPIM.
|
||||
nrf_spim_frequency_set(self->spim_peripheral->spim.p_reg,
|
||||
baudrate_to_spim_frequency(MIN(baudrate,
|
||||
self->spim_peripheral->max_frequency_MHz * 1000000)));
|
||||
|
||||
nrf_spim_mode_t mode = NRF_SPIM_MODE_0;
|
||||
if (polarity) {
|
||||
mode = (phase) ? NRF_SPIM_MODE_3 : NRF_SPIM_MODE_2;
|
||||
} else {
|
||||
mode = (phase) ? NRF_SPIM_MODE_1 : NRF_SPIM_MODE_0;
|
||||
}
|
||||
nrf_spim_mode_t mode = NRF_SPIM_MODE_0;
|
||||
if (polarity) {
|
||||
mode = (phase) ? NRF_SPIM_MODE_3 : NRF_SPIM_MODE_2;
|
||||
} else {
|
||||
mode = (phase) ? NRF_SPIM_MODE_1 : NRF_SPIM_MODE_0;
|
||||
}
|
||||
|
||||
nrf_spim_configure(self->spim_peripheral->spim.p_reg, mode, NRF_SPIM_BIT_ORDER_MSB_FIRST);
|
||||
nrf_spim_configure(self->spim_peripheral->spim.p_reg, mode, NRF_SPIM_BIT_ORDER_MSB_FIRST);
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool common_hal_busio_spi_try_lock(busio_spi_obj_t *self) {
|
||||
|
|
|
@ -45,4 +45,6 @@ typedef struct {
|
|||
uint8_t MISO_pin_number;
|
||||
} busio_spi_obj_t;
|
||||
|
||||
void spi_reset(void);
|
||||
|
||||
#endif // MICROPY_INCLUDED_NRF_COMMON_HAL_BUSIO_SPI_H
|
||||
|
|
|
@ -35,58 +35,333 @@
|
|||
#include "supervisor/shared/translate.h"
|
||||
|
||||
#include "tick.h"
|
||||
#include "nrfx_uarte.h"
|
||||
#include <string.h>
|
||||
|
||||
void common_hal_busio_uart_construct(busio_uart_obj_t *self,
|
||||
const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate,
|
||||
uint8_t bits, uart_parity_t parity, uint8_t stop, uint32_t timeout,
|
||||
uint8_t receiver_buffer_size) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not yet implemented"));
|
||||
#ifdef NRF52840_XXAA
|
||||
|
||||
// expression to examine, and return value in case of failing
|
||||
#define _VERIFY_ERR(_exp) \
|
||||
do {\
|
||||
uint32_t _err = (_exp);\
|
||||
if (NRFX_SUCCESS != _err ) {\
|
||||
mp_raise_msg_varg(&mp_type_RuntimeError, translate("error = 0x%08lX"), _err);\
|
||||
}\
|
||||
}while(0)
|
||||
|
||||
static uint32_t get_nrf_baud (uint32_t baudrate);
|
||||
|
||||
static void uart_callback_irq (const nrfx_uarte_event_t * event, void * context) {
|
||||
busio_uart_obj_t* self = (busio_uart_obj_t*) context;
|
||||
|
||||
switch ( event->type ) {
|
||||
case NRFX_UARTE_EVT_RX_DONE:
|
||||
self->rx_count = event->data.rxtx.bytes;
|
||||
break;
|
||||
|
||||
case NRFX_UARTE_EVT_TX_DONE:
|
||||
break;
|
||||
|
||||
case NRFX_UARTE_EVT_ERROR:
|
||||
if ( self->rx_count == -1 ) {
|
||||
self->rx_count = 0;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void common_hal_busio_uart_construct (busio_uart_obj_t *self,
|
||||
const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate,
|
||||
uint8_t bits, uart_parity_t parity, uint8_t stop, uint32_t timeout,
|
||||
uint8_t receiver_buffer_size) {
|
||||
if ( (tx == mp_const_none) && (rx == mp_const_none) ) {
|
||||
mp_raise_ValueError(translate("tx and rx cannot both be None"));
|
||||
}
|
||||
|
||||
if ( receiver_buffer_size == 0 ) {
|
||||
mp_raise_ValueError(translate("Invalid buffer size"));
|
||||
}
|
||||
|
||||
if ( parity == PARITY_ODD ) {
|
||||
mp_raise_ValueError(translate("Odd parity is not supported"));
|
||||
}
|
||||
|
||||
nrfx_uarte_config_t config = {
|
||||
.pseltxd = (tx == mp_const_none) ? NRF_UARTE_PSEL_DISCONNECTED : tx->number,
|
||||
.pselrxd = (rx == mp_const_none) ? NRF_UARTE_PSEL_DISCONNECTED : rx->number,
|
||||
.pselcts = NRF_UARTE_PSEL_DISCONNECTED,
|
||||
.pselrts = NRF_UARTE_PSEL_DISCONNECTED,
|
||||
.p_context = self,
|
||||
.hwfc = NRF_UARTE_HWFC_DISABLED,
|
||||
.parity = (parity == PARITY_NONE) ? NRF_UARTE_PARITY_EXCLUDED : NRF_UARTE_PARITY_INCLUDED,
|
||||
.baudrate = get_nrf_baud(baudrate),
|
||||
.interrupt_priority = 7
|
||||
};
|
||||
|
||||
// support only 1 instance for now
|
||||
self->uarte = (nrfx_uarte_t ) NRFX_UARTE_INSTANCE(0);
|
||||
nrfx_uarte_uninit(&self->uarte);
|
||||
_VERIFY_ERR(nrfx_uarte_init(&self->uarte, &config, uart_callback_irq));
|
||||
|
||||
// Init buffer for rx
|
||||
if ( rx != mp_const_none ) {
|
||||
self->buffer = (uint8_t *) gc_alloc(receiver_buffer_size, false, false);
|
||||
if ( !self->buffer ) {
|
||||
nrfx_uarte_uninit(&self->uarte);
|
||||
mp_raise_msg(&mp_type_MemoryError, translate("Failed to allocate RX buffer"));
|
||||
}
|
||||
self->bufsize = receiver_buffer_size;
|
||||
|
||||
claim_pin(rx);
|
||||
}
|
||||
|
||||
if ( tx != mp_const_none ) {
|
||||
claim_pin(tx);
|
||||
}
|
||||
|
||||
self->baudrate = baudrate;
|
||||
self->timeout_ms = timeout;
|
||||
|
||||
// queue 1-byte transfer for rx_characters_available()
|
||||
self->rx_count = -1;
|
||||
_VERIFY_ERR(nrfx_uarte_rx(&self->uarte, self->buffer, 1));
|
||||
}
|
||||
|
||||
bool common_hal_busio_uart_deinited(busio_uart_obj_t *self) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not yet implemented"));
|
||||
return (nrf_uarte_rx_pin_get(self->uarte.p_reg) == NRF_UARTE_PSEL_DISCONNECTED) &&
|
||||
(nrf_uarte_tx_pin_get(self->uarte.p_reg) == NRF_UARTE_PSEL_DISCONNECTED);
|
||||
}
|
||||
|
||||
void common_hal_busio_uart_deinit(busio_uart_obj_t *self) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not yet implemented"));
|
||||
if (common_hal_busio_uart_deinited(self)) {
|
||||
return;
|
||||
if ( !common_hal_busio_uart_deinited(self) ) {
|
||||
nrfx_uarte_uninit(&self->uarte);
|
||||
gc_free(self->buffer);
|
||||
}
|
||||
// Do deinit;
|
||||
}
|
||||
|
||||
// Read characters.
|
||||
size_t common_hal_busio_uart_read(busio_uart_obj_t *self, uint8_t *data, size_t len, int *errcode) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not yet implemented"));
|
||||
return 0;
|
||||
if ( nrf_uarte_rx_pin_get(self->uarte.p_reg) == NRF_UARTE_PSEL_DISCONNECTED ) {
|
||||
mp_raise_ValueError(translate("No RX pin"));
|
||||
}
|
||||
|
||||
size_t remain = len;
|
||||
uint64_t start_ticks = ticks_ms;
|
||||
|
||||
while ( 1 ) {
|
||||
// Wait for on-going transfer to complete
|
||||
while ( (self->rx_count == -1) && (ticks_ms - start_ticks < self->timeout_ms) ) {
|
||||
#ifdef MICROPY_VM_HOOK_LOOP
|
||||
MICROPY_VM_HOOK_LOOP
|
||||
#endif
|
||||
}
|
||||
|
||||
// copy received data
|
||||
if ( self->rx_count > 0 ) {
|
||||
memcpy(data, self->buffer, self->rx_count);
|
||||
data += self->rx_count;
|
||||
remain -= self->rx_count;
|
||||
|
||||
self->rx_count = 0;
|
||||
}
|
||||
|
||||
// exit if complete or time up
|
||||
if ( !remain || !(ticks_ms - start_ticks < self->timeout_ms) ) {
|
||||
break;
|
||||
}
|
||||
|
||||
// prepare next receiving
|
||||
const size_t cnt = MIN(self->bufsize, remain);
|
||||
self->rx_count = -1;
|
||||
_VERIFY_ERR(nrfx_uarte_rx(&self->uarte, self->buffer, cnt));
|
||||
}
|
||||
|
||||
// queue 1-byte transfer for rx_characters_available()
|
||||
if ( self->rx_count == 0 ) {
|
||||
self->rx_count = -1;
|
||||
_VERIFY_ERR(nrfx_uarte_rx(&self->uarte, self->buffer, 1));
|
||||
}
|
||||
|
||||
return len - remain;
|
||||
}
|
||||
|
||||
// Write characters.
|
||||
size_t common_hal_busio_uart_write(busio_uart_obj_t *self, const uint8_t *data, size_t len, int *errcode) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not yet implemented"));
|
||||
return 0;
|
||||
size_t common_hal_busio_uart_write (busio_uart_obj_t *self, const uint8_t *data, size_t len, int *errcode) {
|
||||
if ( nrf_uarte_tx_pin_get(self->uarte.p_reg) == NRF_UARTE_PSEL_DISCONNECTED ) {
|
||||
mp_raise_ValueError(translate("No TX pin"));
|
||||
}
|
||||
|
||||
if ( len == 0 ) return 0;
|
||||
|
||||
uint64_t start_ticks = ticks_ms;
|
||||
|
||||
// Wait for on-going transfer to complete
|
||||
while ( nrfx_uarte_tx_in_progress(&self->uarte) && (ticks_ms - start_ticks < self->timeout_ms) ) {
|
||||
#ifdef MICROPY_VM_HOOK_LOOP
|
||||
MICROPY_VM_HOOK_LOOP
|
||||
#endif
|
||||
}
|
||||
|
||||
// Time up
|
||||
if ( !(ticks_ms - start_ticks < self->timeout_ms) ) {
|
||||
*errcode = MP_EAGAIN;
|
||||
return MP_STREAM_ERROR;
|
||||
}
|
||||
|
||||
// EasyDMA can only access SRAM
|
||||
uint8_t * tx_buf = (uint8_t*) data;
|
||||
if ( !nrfx_is_in_ram(data) ) {
|
||||
tx_buf = (uint8_t *) gc_alloc(len, false, false);
|
||||
memcpy(tx_buf, data, len);
|
||||
}
|
||||
|
||||
(*errcode) = nrfx_uarte_tx(&self->uarte, tx_buf, len);
|
||||
_VERIFY_ERR(*errcode);
|
||||
(*errcode) = 0;
|
||||
|
||||
while ( nrfx_uarte_tx_in_progress(&self->uarte) && (ticks_ms - start_ticks < self->timeout_ms) ) {
|
||||
#ifdef MICROPY_VM_HOOK_LOOP
|
||||
MICROPY_VM_HOOK_LOOP
|
||||
#endif
|
||||
}
|
||||
|
||||
if ( !nrfx_is_in_ram(data) ) {
|
||||
gc_free(tx_buf);
|
||||
}
|
||||
|
||||
return len;
|
||||
}
|
||||
|
||||
uint32_t common_hal_busio_uart_get_baudrate(busio_uart_obj_t *self) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not yet implemented"));
|
||||
return self->baudrate;
|
||||
}
|
||||
|
||||
void common_hal_busio_uart_set_baudrate(busio_uart_obj_t *self, uint32_t baudrate) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not yet implemented"));
|
||||
self->baudrate = baudrate;
|
||||
nrf_uarte_baudrate_set(self->uarte.p_reg, get_nrf_baud(baudrate));
|
||||
}
|
||||
|
||||
uint32_t common_hal_busio_uart_rx_characters_available(busio_uart_obj_t *self) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not yet implemented"));
|
||||
return 0;
|
||||
return (self->rx_count > 0) ? self->rx_count : 0;
|
||||
}
|
||||
|
||||
void common_hal_busio_uart_clear_rx_buffer(busio_uart_obj_t *self) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not yet implemented"));
|
||||
// Discard received byte, and queue 1-byte transfer for rx_characters_available()
|
||||
if ( self->rx_count > 0 ) {
|
||||
self->rx_count = -1;
|
||||
_VERIFY_ERR(nrfx_uarte_rx(&self->uarte, self->buffer, 1));
|
||||
}
|
||||
}
|
||||
|
||||
bool common_hal_busio_uart_ready_to_tx(busio_uart_obj_t *self) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not yet implemented"));
|
||||
return !nrfx_uarte_tx_in_progress(&self->uarte);
|
||||
}
|
||||
|
||||
static uint32_t get_nrf_baud (uint32_t baudrate)
|
||||
{
|
||||
if ( baudrate <= 1200 ) {
|
||||
return NRF_UARTE_BAUDRATE_1200;
|
||||
}
|
||||
else if ( baudrate <= 2400 ) {
|
||||
return NRF_UARTE_BAUDRATE_2400;
|
||||
}
|
||||
else if ( baudrate <= 4800 ) {
|
||||
return NRF_UARTE_BAUDRATE_4800;
|
||||
}
|
||||
else if ( baudrate <= 9600 ) {
|
||||
return NRF_UARTE_BAUDRATE_9600;
|
||||
}
|
||||
else if ( baudrate <= 14400 ) {
|
||||
return NRF_UARTE_BAUDRATE_14400;
|
||||
}
|
||||
else if ( baudrate <= 19200 ) {
|
||||
return NRF_UARTE_BAUDRATE_19200;
|
||||
}
|
||||
else if ( baudrate <= 28800 ) {
|
||||
return NRF_UARTE_BAUDRATE_28800;
|
||||
}
|
||||
else if ( baudrate <= 38400 ) {
|
||||
return NRF_UARTE_BAUDRATE_38400;
|
||||
}
|
||||
else if ( baudrate <= 57600 ) {
|
||||
return NRF_UARTE_BAUDRATE_57600;
|
||||
}
|
||||
else if ( baudrate <= 76800 ) {
|
||||
return NRF_UARTE_BAUDRATE_76800;
|
||||
}
|
||||
else if ( baudrate <= 115200 ) {
|
||||
return NRF_UARTE_BAUDRATE_115200;
|
||||
}
|
||||
else if ( baudrate <= 230400 ) {
|
||||
return NRF_UARTE_BAUDRATE_230400;
|
||||
}
|
||||
else if ( baudrate <= 250000 ) {
|
||||
return NRF_UARTE_BAUDRATE_250000;
|
||||
}
|
||||
else if ( baudrate <= 460800 ) {
|
||||
return NRF_UARTE_BAUDRATE_460800;
|
||||
}
|
||||
else if ( baudrate <= 921600 ) {
|
||||
return NRF_UARTE_BAUDRATE_921600;
|
||||
}
|
||||
else {
|
||||
return NRF_UARTE_BAUDRATE_1000000;
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void common_hal_busio_uart_construct (busio_uart_obj_t *self,
|
||||
const mcu_pin_obj_t * tx, const mcu_pin_obj_t * rx, uint32_t baudrate,
|
||||
uint8_t bits, uart_parity_t parity, uint8_t stop, uint32_t timeout,
|
||||
uint8_t receiver_buffer_size) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not available"));
|
||||
}
|
||||
|
||||
bool common_hal_busio_uart_deinited (busio_uart_obj_t *self) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not available"));
|
||||
return true;
|
||||
}
|
||||
|
||||
void common_hal_busio_uart_deinit (busio_uart_obj_t *self) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not available"));
|
||||
}
|
||||
|
||||
// Read characters.
|
||||
size_t common_hal_busio_uart_read (busio_uart_obj_t *self, uint8_t *data, size_t len, int *errcode) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not available"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Write characters.
|
||||
size_t common_hal_busio_uart_write (busio_uart_obj_t *self, const uint8_t *data, size_t len, int *errcode) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not available"));
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint32_t common_hal_busio_uart_get_baudrate (busio_uart_obj_t *self) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not available"));
|
||||
return self->baudrate;
|
||||
}
|
||||
|
||||
void common_hal_busio_uart_set_baudrate (busio_uart_obj_t *self, uint32_t baudrate) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not available"));
|
||||
}
|
||||
|
||||
uint32_t common_hal_busio_uart_rx_characters_available (busio_uart_obj_t *self) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not available"));
|
||||
}
|
||||
|
||||
void common_hal_busio_uart_clear_rx_buffer (busio_uart_obj_t *self) {
|
||||
|
||||
}
|
||||
|
||||
bool common_hal_busio_uart_ready_to_tx (busio_uart_obj_t *self) {
|
||||
mp_raise_NotImplementedError(translate("busio.UART not available"));
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -28,23 +28,22 @@
|
|||
#define MICROPY_INCLUDED_NRF_COMMON_HAL_BUSIO_UART_H
|
||||
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "nrfx_uarte.h"
|
||||
|
||||
#include "py/obj.h"
|
||||
#include "py/ringbuf.h"
|
||||
|
||||
typedef struct {
|
||||
mp_obj_base_t base;
|
||||
uint8_t rx_pin;
|
||||
uint8_t tx_pin;
|
||||
uint8_t character_bits;
|
||||
bool rx_error;
|
||||
|
||||
nrfx_uarte_t uarte;
|
||||
|
||||
uint32_t baudrate;
|
||||
uint32_t timeout_ms;
|
||||
// Index of the oldest received character.
|
||||
uint32_t buffer_start;
|
||||
// Index of the next available spot to store a character.
|
||||
uint32_t buffer_size;
|
||||
uint32_t buffer_length;
|
||||
|
||||
uint8_t* buffer;
|
||||
uint32_t bufsize;
|
||||
volatile int32_t rx_count;
|
||||
} busio_uart_obj_t;
|
||||
|
||||
#endif // MICROPY_INCLUDED_NRF_COMMON_HAL_BUSIO_UART_H
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -467,7 +467,7 @@ bool ble_drv_advertise_data(ubluepy_advertise_data_t * p_adv_params) {
|
|||
// do encoding into the adv buffer
|
||||
if (sd_ble_uuid_encode(&uuid, &encoded_size, &adv_data[byte_pos]) != 0) {
|
||||
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_OSError,
|
||||
translate("Can encode UUID into the advertisment packet.")));
|
||||
translate("Can encode UUID into the advertisement packet.")));
|
||||
}
|
||||
|
||||
BLE_DRIVER_LOG("encoded uuid for service %u: ", 0);
|
||||
|
@ -517,7 +517,7 @@ bool ble_drv_advertise_data(ubluepy_advertise_data_t * p_adv_params) {
|
|||
// do encoding into the adv buffer
|
||||
if (sd_ble_uuid_encode(&uuid, &encoded_size, &adv_data[byte_pos]) != 0) {
|
||||
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_OSError,
|
||||
translate("Can encode UUID into the advertisment packet.")));
|
||||
translate("Can encode UUID into the advertisement packet.")));
|
||||
}
|
||||
|
||||
BLE_DRIVER_LOG("encoded uuid for service %u: ", 0);
|
||||
|
@ -542,7 +542,7 @@ bool ble_drv_advertise_data(ubluepy_advertise_data_t * p_adv_params) {
|
|||
if ((p_adv_params->data_len > 0) && (p_adv_params->p_data != NULL)) {
|
||||
if (p_adv_params->data_len + byte_pos > BLE_GAP_ADV_MAX_SIZE) {
|
||||
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_OSError,
|
||||
translate("Can not fit data into the advertisment packet.")));
|
||||
translate("Can not fit data into the advertisement packet.")));
|
||||
}
|
||||
|
||||
memcpy(adv_data, p_adv_params->p_data, p_adv_params->data_len);
|
||||
|
@ -555,7 +555,7 @@ bool ble_drv_advertise_data(ubluepy_advertise_data_t * p_adv_params) {
|
|||
if ((err_code = sd_ble_gap_adv_data_set(adv_data, byte_pos, NULL, 0)) != 0) {
|
||||
|
||||
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_OSError,
|
||||
translate("Can not apply advertisment data. status: 0x%02x"), (uint16_t)err_code));
|
||||
translate("Can not apply advertisement data. status: 0x%02x"), (uint16_t)err_code));
|
||||
}
|
||||
BLE_DRIVER_LOG("Set Adv data size: " UINT_FMT "\n", byte_pos);
|
||||
#endif
|
||||
|
@ -586,7 +586,7 @@ bool ble_drv_advertise_data(ubluepy_advertise_data_t * p_adv_params) {
|
|||
m_adv_params.primary_phy = BLE_GAP_PHY_1MBPS;
|
||||
#else
|
||||
m_adv_params.fp = BLE_GAP_ADV_FP_ANY;
|
||||
m_adv_params.timeout = 0; // infinite advertisment
|
||||
m_adv_params.timeout = 0; // infinite advertisement
|
||||
#endif
|
||||
|
||||
ble_drv_advertise_stop();
|
||||
|
@ -601,7 +601,7 @@ bool ble_drv_advertise_data(ubluepy_advertise_data_t * p_adv_params) {
|
|||
|
||||
if ((err_code = sd_ble_gap_adv_set_configure(&m_adv_handle, &ble_gap_adv_data, &m_adv_params)) != 0) {
|
||||
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_OSError,
|
||||
translate("Can not apply advertisment data. status: 0x%02x"), (uint16_t)err_code));
|
||||
translate("Can not apply advertisement data. status: 0x%02x"), (uint16_t)err_code));
|
||||
}
|
||||
err_code = sd_ble_gap_adv_start(m_adv_handle, BLE_CONN_CFG_TAG_DEFAULT);
|
||||
#elif (BLUETOOTH_SD == 132 && BLE_API_VERSION == 4)
|
||||
|
@ -611,7 +611,7 @@ bool ble_drv_advertise_data(ubluepy_advertise_data_t * p_adv_params) {
|
|||
#endif
|
||||
if (err_code != 0) {
|
||||
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_OSError,
|
||||
translate("Can not start advertisment. status: 0x%02x"), (uint16_t)err_code));
|
||||
translate("Can not start advertisement. status: 0x%02x"), (uint16_t)err_code));
|
||||
}
|
||||
|
||||
m_adv_in_progress = true;
|
||||
|
@ -628,7 +628,7 @@ void ble_drv_advertise_stop(void) {
|
|||
if ((err_code = sd_ble_gap_adv_stop()) != 0) {
|
||||
#endif
|
||||
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_OSError,
|
||||
translate("Can not stop advertisment. status: 0x%02x"), (uint16_t)err_code));
|
||||
translate("Can not stop advertisement. status: 0x%02x"), (uint16_t)err_code));
|
||||
}
|
||||
}
|
||||
m_adv_in_progress = false;
|
||||
|
|
|
@ -44,7 +44,7 @@ def generate_eddystone_adv_packet(url):
|
|||
service_data = uuid + eddystone_data
|
||||
packet_service_data = gen_ad_type_content(constants.ad_types.AD_TYPE_SERVICE_DATA, service_data)
|
||||
|
||||
# generate advertisment packet
|
||||
# generate advertisement packet
|
||||
packet = bytearray([])
|
||||
packet.extend(packet_flags)
|
||||
packet.extend(packet_uuid16)
|
||||
|
|
|
@ -41,7 +41,7 @@ def event_handler(id, handle, data):
|
|||
rtc.stop()
|
||||
# indicate 'disconnected'
|
||||
LED(1).off()
|
||||
# restart advertisment
|
||||
# restart advertisement
|
||||
periph.advertise(device_name="micr_temp", services=[serv_env_sense])
|
||||
|
||||
elif id == constants.EVT_GATTS_WRITE:
|
||||
|
|
|
@ -166,7 +166,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_2(ubluepy_peripheral_set_conn_handler_obj, periph
|
|||
#if MICROPY_PY_UBLUEPY_PERIPHERAL
|
||||
|
||||
/// \method advertise(device_name, [service=[service1, service2, ...]], [data=bytearray], [connectable=True])
|
||||
/// Start advertising. Connectable advertisment type by default.
|
||||
/// Start advertising. Connectable advertisement type by default.
|
||||
///
|
||||
STATIC mp_obj_t peripheral_advertise(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
||||
static const mp_arg_t allowed_args[] = {
|
||||
|
@ -236,7 +236,7 @@ STATIC mp_obj_t peripheral_advertise(mp_uint_t n_args, const mp_obj_t *pos_args,
|
|||
STATIC MP_DEFINE_CONST_FUN_OBJ_KW(ubluepy_peripheral_advertise_obj, 0, peripheral_advertise);
|
||||
|
||||
/// \method advertise_stop()
|
||||
/// Stop advertisment if any onging advertisment.
|
||||
/// Stop advertisement if any onging advertisement.
|
||||
///
|
||||
STATIC mp_obj_t peripheral_advertise_stop(mp_obj_t self_in) {
|
||||
ubluepy_peripheral_obj_t *self = MP_OBJ_TO_PTR(self_in);
|
||||
|
|
|
@ -27,36 +27,40 @@
|
|||
|
||||
#include <string.h>
|
||||
|
||||
#include "mphalport.h"
|
||||
#include "py/mphal.h"
|
||||
#include "py/mpstate.h"
|
||||
|
||||
#include "py/gc.h"
|
||||
|
||||
#if (MICROPY_PY_BLE_NUS == 0)
|
||||
|
||||
#if !defined( NRF52840_XXAA) || ( defined(CFG_HWUART_FOR_SERIAL) && CFG_HWUART_FOR_SERIAL == 1 )
|
||||
#if !defined( NRF52840_XXAA)
|
||||
int mp_hal_stdin_rx_chr(void) {
|
||||
uint8_t data = 0;
|
||||
|
||||
while (!nrfx_uart_rx_ready(&serial_instance));
|
||||
|
||||
const nrfx_err_t err = nrfx_uart_rx(&serial_instance, &data, sizeof(data));
|
||||
if (err == NRFX_SUCCESS)
|
||||
NRFX_ASSERT(err);
|
||||
|
||||
uint8_t data;
|
||||
nrfx_uarte_rx(&serial_instance, &data, 1);
|
||||
return data;
|
||||
}
|
||||
|
||||
bool mp_hal_stdin_any(void) {
|
||||
return nrfx_uart_rx_ready(&serial_instance);
|
||||
return nrf_uarte_event_check(serial_instance.p_reg, NRF_UARTE_EVENT_RXDRDY);
|
||||
}
|
||||
|
||||
void mp_hal_stdout_tx_strn(const char *str, mp_uint_t len) {
|
||||
if (len == 0)
|
||||
if (len == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
const nrfx_err_t err = nrfx_uart_tx(&serial_instance, (uint8_t*)str, len);
|
||||
if (err == NRFX_SUCCESS)
|
||||
NRFX_ASSERT(err);
|
||||
// EasyDMA can only access SRAM
|
||||
uint8_t * tx_buf = (uint8_t*) str;
|
||||
if ( !nrfx_is_in_ram(str) ) {
|
||||
tx_buf = (uint8_t *) gc_alloc(len, false, false);
|
||||
memcpy(tx_buf, str, len);
|
||||
}
|
||||
|
||||
nrfx_uarte_tx(&serial_instance, tx_buf, len);
|
||||
|
||||
if ( !nrfx_is_in_ram(str) ) {
|
||||
gc_free(tx_buf);
|
||||
}
|
||||
}
|
||||
|
||||
#else
|
||||
|
|
|
@ -31,21 +31,16 @@
|
|||
#include <stdint.h>
|
||||
|
||||
#include "lib/utils/interrupt_char.h"
|
||||
#include "nrfx_uart.h"
|
||||
#include "nrfx_uarte.h"
|
||||
#include "py/mpconfig.h"
|
||||
|
||||
extern nrfx_uart_t serial_instance;
|
||||
extern nrfx_uarte_t serial_instance;
|
||||
|
||||
extern volatile uint64_t ticks_ms;
|
||||
|
||||
static inline mp_uint_t mp_hal_ticks_ms(void) {
|
||||
return ticks_ms;
|
||||
}
|
||||
|
||||
int mp_hal_stdin_rx_chr(void);
|
||||
void mp_hal_stdout_tx_str(const char *str);
|
||||
bool mp_hal_stdin_any(void);
|
||||
void mp_hal_delay_ms(mp_uint_t ms);
|
||||
#define mp_hal_ticks_ms() ((mp_uint_t) ticks_ms)
|
||||
#define mp_hal_delay_us(us) NRFX_DELAY_US((uint32_t) (us))
|
||||
|
||||
bool mp_hal_stdin_any(void);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 293f553ed9551c1fdfd05eac48e75bbdeb4e7290
|
||||
Subproject commit d4ebe15f58de1442e3eed93b40d13930e7785903
|
|
@ -45,13 +45,8 @@
|
|||
#define NRFX_TWIM_DEFAULT_CONFIG_HOLD_BUS_UNINIT 0
|
||||
|
||||
// UART
|
||||
#define NRFX_UART_ENABLED 1
|
||||
#define NRFX_UART0_ENABLED 1
|
||||
|
||||
#define NRFX_UART_DEFAULT_CONFIG_IRQ_PRIORITY 7
|
||||
#define NRFX_UART_DEFAULT_CONFIG_HWFC NRF_UART_HWFC_DISABLED
|
||||
#define NRFX_UART_DEFAULT_CONFIG_PARITY NRF_UART_PARITY_EXCLUDED
|
||||
#define NRFX_UART_DEFAULT_CONFIG_BAUDRATE NRF_UART_BAUDRATE_115200
|
||||
#define NRFX_UARTE_ENABLED 1
|
||||
#define NRFX_UARTE0_ENABLED 1
|
||||
|
||||
// PWM
|
||||
#define NRFX_PWM0_ENABLED 1
|
||||
|
|
|
@ -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));
|
||||
|
|
|
@ -34,6 +34,8 @@
|
|||
|
||||
#include "shared-module/gamepad/__init__.h"
|
||||
#include "common-hal/microcontroller/Pin.h"
|
||||
#include "common-hal/busio/I2C.h"
|
||||
#include "common-hal/busio/SPI.h"
|
||||
#include "common-hal/pulseio/PWMOut.h"
|
||||
#include "tick.h"
|
||||
|
||||
|
@ -72,11 +74,14 @@ safe_mode_t port_init(void) {
|
|||
}
|
||||
|
||||
void reset_port(void) {
|
||||
#ifdef CIRCUITPY_GAMEPAD_TICKS
|
||||
gamepad_reset();
|
||||
#endif
|
||||
#ifdef CIRCUITPY_GAMEPAD_TICKS
|
||||
gamepad_reset();
|
||||
#endif
|
||||
|
||||
i2c_reset();
|
||||
spi_reset();
|
||||
pwmout_reset();
|
||||
|
||||
reset_all_pins();
|
||||
}
|
||||
|
||||
|
|
|
@ -24,19 +24,19 @@
|
|||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "mphalport.h"
|
||||
#include "py/mphal.h"
|
||||
|
||||
#if MICROPY_PY_BLE_NUS
|
||||
#include "ble_uart.h"
|
||||
#else
|
||||
#include "nrf_gpio.h"
|
||||
#include "nrfx_uarte.h"
|
||||
#endif
|
||||
|
||||
#if !defined( NRF52840_XXAA) || ( defined(CFG_HWUART_FOR_SERIAL) && CFG_HWUART_FOR_SERIAL == 1 )
|
||||
#if !defined(NRF52840_XXAA)
|
||||
|
||||
#define INST_NO 0
|
||||
|
||||
nrfx_uart_t serial_instance = NRFX_UART_INSTANCE(INST_NO);
|
||||
uint8_t serial_received_char;
|
||||
nrfx_uarte_t serial_instance = NRFX_UARTE_INSTANCE(0);
|
||||
|
||||
void serial_init(void) {
|
||||
#if MICROPY_PY_BLE_NUS
|
||||
|
@ -45,22 +45,27 @@ void serial_init(void) {
|
|||
;
|
||||
}
|
||||
#else
|
||||
nrfx_uart_config_t config = NRFX_UART_DEFAULT_CONFIG;
|
||||
config.pseltxd = MICROPY_HW_UART_TX;
|
||||
config.pselrxd = MICROPY_HW_UART_RX;
|
||||
config.hwfc = MICROPY_HW_UART_HWFC ? NRF_UART_HWFC_ENABLED : NRF_UART_HWFC_DISABLED;
|
||||
#ifdef MICROPY_HW_UART_CTS
|
||||
config.pselcts = MICROPY_HW_UART_CTS;
|
||||
#endif
|
||||
#ifdef MICROPY_HW_UART_RTS
|
||||
config.pselrts = MICROPY_HW_UART_RTS;
|
||||
#endif
|
||||
nrfx_uarte_config_t config = {
|
||||
.pseltxd = MICROPY_HW_UART_TX,
|
||||
.pselrxd = MICROPY_HW_UART_RX,
|
||||
.pselcts = NRF_UARTE_PSEL_DISCONNECTED,
|
||||
.pselrts = NRF_UARTE_PSEL_DISCONNECTED,
|
||||
.p_context = NULL,
|
||||
.hwfc = NRF_UARTE_HWFC_DISABLED,
|
||||
.parity = NRF_UARTE_PARITY_EXCLUDED,
|
||||
.baudrate = NRF_UARTE_BAUDRATE_115200,
|
||||
.interrupt_priority = 7
|
||||
};
|
||||
|
||||
const nrfx_err_t err = nrfx_uart_init(&serial_instance, &config, NULL);
|
||||
if (err == NRFX_SUCCESS)
|
||||
nrfx_uarte_uninit(&serial_instance);
|
||||
const nrfx_err_t err = nrfx_uarte_init(&serial_instance, &config, NULL); // no callback for blocking mode
|
||||
|
||||
if (err != NRFX_SUCCESS) {
|
||||
NRFX_ASSERT(err);
|
||||
}
|
||||
|
||||
nrfx_uart_rx_enable(&serial_instance);
|
||||
// enabled receiving
|
||||
nrf_uarte_task_trigger(serial_instance.p_reg, NRF_UARTE_TASK_STARTRX);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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,
|
||||
};
|
|
@ -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) },
|
||||
};
|
||||
|
|
|
@ -136,19 +136,26 @@ static void check_lock(busio_spi_obj_t *self) {
|
|||
|
||||
//| .. method:: SPI.configure(\*, baudrate=100000, polarity=0, phase=0, bits=8)
|
||||
//|
|
||||
//| Configures the SPI bus. Only valid when locked.
|
||||
//| Configures the SPI bus. The SPI object must be locked.
|
||||
//|
|
||||
//| :param int baudrate: the desired clock rate in Hertz. The actual clock rate may be higher or lower
|
||||
//| due to the granularity of available clock settings.
|
||||
//| Check the `frequency` attribute for the actual clock rate.
|
||||
//| **Note:** on the SAMD21, it is possible to set the baud rate to 24 MHz, but that
|
||||
//| speed is not guaranteed to work. 12 MHz is the next available lower speed, and is
|
||||
//| within spec for the SAMD21.
|
||||
//| :param int polarity: the base state of the clock line (0 or 1)
|
||||
//| :param int phase: the edge of the clock that data is captured. First (0)
|
||||
//| or second (1). Rising or falling depends on clock polarity.
|
||||
//| :param int bits: the number of bits per word
|
||||
//|
|
||||
//| .. note:: On the SAMD21, it is possible to set the baudrate to 24 MHz, but that
|
||||
//| speed is not guaranteed to work. 12 MHz is the next available lower speed, and is
|
||||
//| within spec for the SAMD21.
|
||||
//|
|
||||
//| .. note:: On the nRF52832, these baudrates are available: 125kHz, 250kHz, 1MHz, 2MHz, 4MHz,
|
||||
//| and 8MHz. On the nRF52840, 16MHz and 32MHz are also available, but only on the first
|
||||
//| `busio.SPI` object you create. Two more ``busio.SPI`` objects can be created, but they are restricted
|
||||
//| to 8MHz maximum. This is a hardware restriction: there is only one high-speed SPI peripheral.
|
||||
//| If you pick a a baudrate other than one of these, the nearest lower
|
||||
//| baudrate will be chosen, with a minimum of 125kHz.
|
||||
STATIC mp_obj_t busio_spi_configure(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
|
||||
enum { ARG_baudrate, ARG_polarity, ARG_phase, ARG_bits };
|
||||
static const mp_arg_t allowed_args[] = {
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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…
Reference in New Issue