Merge tinyusb changes from upstream

This commit is contained in:
Hierophect 2019-07-24 14:54:22 -04:00
commit d66c9590af
172 changed files with 7082 additions and 3851 deletions

View File

@ -22,10 +22,10 @@ git:
# just try to make the builds "about equal in run time" # just try to make the builds "about equal in run time"
env: env:
- TRAVIS_TESTS="unix docs translations website" TRAVIS_BOARDS="circuitplayground_express mini_sam_m4 grandcentral_m4_express capablerobot_usbhub pygamer pca10056 pca10059 feather_nrf52840_express makerdiary_nrf52840_mdk makerdiary_nrf52840_mdk_usb_dongle particle_boron particle_argon particle_xenon sparkfun_nrf52840_mini electronut_labs_papyr electronut_labs_blip" TRAVIS_SDK=arm:nrf - TRAVIS_TESTS="unix docs translations website" TRAVIS_BOARDS="circuitplayground_express mini_sam_m4 grandcentral_m4_express capablerobot_usbhub pygamer pca10056 pca10059 feather_nrf52840_express makerdiary_nrf52840_mdk makerdiary_nrf52840_mdk_usb_dongle particle_boron particle_argon particle_xenon sparkfun_nrf52840_mini electronut_labs_papyr electronut_labs_blip" TRAVIS_SDK=arm:nrf
- TRAVIS_BOARDS="metro_m0_express metro_m4_express metro_m4_airlift_lite pirkey_m0 trellis_m4_express trinket_m0 sparkfun_lumidrive sparkfun_redboard_turbo bast_pro_mini_m0" TRAVIS_SDK=arm - TRAVIS_BOARDS="metro_m0_express metro_m4_express metro_m4_airlift_lite pirkey_m0 trellis_m4_express trinket_m0 sparkfun_lumidrive sparkfun_redboard_turbo bast_pro_mini_m0 datum_distance pyruler" TRAVIS_SDK=arm
- TRAVIS_BOARDS="feather_radiofruit_zigbee gemma_m0 hallowing_m0_express itsybitsy_m0_express itsybitsy_m4_express meowmeow sam32 uchip escornabot_makech pygamer_advance" TRAVIS_SDK=arm - TRAVIS_BOARDS="feather_radiofruit_zigbee gemma_m0 hallowing_m0_express itsybitsy_m0_express itsybitsy_m4_express meowmeow sam32 uchip escornabot_makech pygamer_advance datum_imu" TRAVIS_SDK=arm
- TRAVIS_BOARDS="feather_m0_express_crickit feather_m0_rfm69 feather_m0_rfm9x feather_m4_express arduino_zero arduino_mkr1300 arduino_mkrzero pewpew10 kicksat-sprite ugame10 robohatmm1" TRAVIS_SDK=arm - TRAVIS_BOARDS="feather_m0_express_crickit feather_m0_rfm69 feather_m0_rfm9x feather_m4_express arduino_zero arduino_mkr1300 arduino_mkrzero pewpew10 kicksat-sprite ugame10 robohatmm1 datum_light" TRAVIS_SDK=arm
- TRAVIS_BOARDS="circuitplayground_express_crickit feather_m0_adalogger feather_m0_basic feather_m0_express catwan_usbstick pyportal sparkfun_samd21_mini sparkfun_samd21_dev pybadge pybadge_airlift" TRAVIS_SDK=arm - TRAVIS_BOARDS="circuitplayground_express_crickit feather_m0_adalogger feather_m0_basic feather_m0_express catwan_usbstick pyportal sparkfun_samd21_mini sparkfun_samd21_dev pybadge pybadge_airlift datum_weather" TRAVIS_SDK=arm
addons: addons:
artifacts: artifacts:
@ -33,6 +33,16 @@ addons:
- $(ls -d1 bin/*/*/* | tr "\n" ":") - $(ls -d1 bin/*/*/* | tr "\n" ":")
target_paths: / target_paths: /
# Some deploy jobs take over 10 minutes so use this keep alive hack to make sure Travis doesn't kill us.
before_deploy: |
function keep_alive() {
while true; do
echo -en "\a"
sleep 5
done
}
keep_alive &
deploy: deploy:
provider: releases provider: releases
api_key: api_key:

View File

@ -84,6 +84,7 @@ version = release = '0.0.0'
# List of patterns, relative to source directory, that match files and # List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files. # directories to ignore when looking for source files.
exclude_patterns = ["**/build*", exclude_patterns = ["**/build*",
".git",
".venv", ".venv",
".direnv", ".direnv",
"docs/README.md", "docs/README.md",

View File

@ -60,6 +60,7 @@ For example, a user can then use ``deinit()```::
import digitalio import digitalio
import board import board
import time
led = digitalio.DigitalInOut(board.D13) led = digitalio.DigitalInOut(board.D13)
led.direction = digitalio.Direction.OUTPUT led.direction = digitalio.Direction.OUTPUT
@ -79,6 +80,7 @@ Alternatively, using a ``with`` statement ensures that the hardware is deinitial
import digitalio import digitalio
import board import board
import time
with digitalio.DigitalInOut(board.D13) as led: with digitalio.DigitalInOut(board.D13) as led:
led.direction = digitalio.Direction.OUTPUT led.direction = digitalio.Direction.OUTPUT

@ -1 +1 @@
Subproject commit 97e2629d647584681b2883f2081fa2cddb3d61cc Subproject commit 0848c462b3e431a9da42e96537d2b597a4579636

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-11 14:59-0700\n" "POT-Creation-Date: 2019-07-19 16:10-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -218,16 +218,15 @@ msgstr ""
msgid "A hardware interrupt channel is already in use" msgid "A hardware interrupt channel is already in use"
msgstr "Sebuah channel hardware interrupt sedang digunakan" msgstr "Sebuah channel hardware interrupt sedang digunakan"
#: shared-bindings/bleio/Address.c
#, c-format
msgid "Address is not %d bytes long or is in wrong format"
msgstr ""
#: shared-bindings/bleio/Address.c #: shared-bindings/bleio/Address.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Address must be %d bytes long" msgid "Address must be %d bytes long"
msgstr "buffers harus mempunyai panjang yang sama" msgstr "buffers harus mempunyai panjang yang sama"
#: shared-bindings/bleio/Address.c
msgid "Address type out of range"
msgstr ""
#: ports/nrf/common-hal/busio/I2C.c #: ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use" msgid "All I2C peripherals are in use"
msgstr "Semua perangkat I2C sedang digunakan" msgstr "Semua perangkat I2C sedang digunakan"
@ -313,6 +312,10 @@ msgstr ""
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Kedua pin harus mendukung hardware interrut" msgstr "Kedua pin harus mendukung hardware interrut"
#: shared-bindings/displayio/Display.c
msgid "Brightness must be 0-1.0"
msgstr ""
#: shared-bindings/supervisor/__init__.c #: shared-bindings/supervisor/__init__.c
msgid "Brightness must be between 0 and 255" msgid "Brightness must be between 0 and 255"
msgstr "" msgstr ""
@ -354,20 +357,8 @@ msgstr ""
msgid "Can not use dotstar with %s" msgid "Can not use dotstar with %s"
msgstr "" msgstr ""
#: shared-bindings/bleio/Device.c #: ports/nrf/common-hal/bleio/Characteristic.c
msgid "Can't add services in Central mode" msgid "Can't set CCCD for local Characteristic"
msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't advertise in Central mode"
msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't change the name in Central mode"
msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't connect in Peripheral mode"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c #: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c
@ -456,10 +447,22 @@ msgstr "Clock unit sedang digunakan"
msgid "Column entry must be digitalio.DigitalInOut" msgid "Column entry must be digitalio.DigitalInOut"
msgstr "" msgstr ""
#: shared-bindings/displayio/I2CDisplay.c
msgid "Command must be 0-255"
msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
msgid "Command must be an int between 0 and 255" msgid "Command must be an int between 0 and 255"
msgstr "" msgstr ""
#: py/persistentcode.c
msgid "Corrupt .mpy file"
msgstr ""
#: py/emitglue.c
msgid "Corrupt raw code"
msgstr ""
#: ports/nrf/common-hal/bleio/UUID.c #: ports/nrf/common-hal/bleio/UUID.c
#, c-format #, c-format
msgid "Could not decode ble_uuid, err 0x%04x" msgid "Could not decode ble_uuid, err 0x%04x"
@ -494,17 +497,11 @@ msgstr ""
msgid "Data chunk must follow fmt chunk" msgid "Data chunk must follow fmt chunk"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy #, fuzzy
msgid "Data too large for advertisement packet" msgid "Data too large for advertisement packet"
msgstr "Tidak bisa menyesuaikan data ke dalam paket advertisment" msgstr "Tidak bisa menyesuaikan data ke dalam paket advertisment"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Data too large for the advertisement packet"
msgstr "Tidak bisa menyesuaikan data ke dalam paket advertisment"
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Destination capacity is smaller than destination_length." msgid "Destination capacity is smaller than destination_length."
msgstr "" msgstr ""
@ -542,6 +539,10 @@ msgstr ""
msgid "Expected a UUID" msgid "Expected a UUID"
msgstr "" msgstr ""
#: shared-bindings/bleio/Central.c
msgid "Expected an Address"
msgstr ""
#: shared-module/_pixelbuf/PixelBuf.c #: shared-module/_pixelbuf/PixelBuf.c
#, c-format #, c-format
msgid "Expected tuple of length %d, got %d" msgid "Expected tuple of length %d, got %d"
@ -551,12 +552,7 @@ msgstr ""
msgid "Failed sending command." msgid "Failed sending command."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
#, fuzzy
msgid "Failed to acquire mutex"
msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to acquire mutex, err 0x%04x" msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX" msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX"
@ -566,11 +562,6 @@ msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX"
msgid "Failed to add characteristic, err 0x%04x" msgid "Failed to add characteristic, err 0x%04x"
msgstr "Gagal untuk menambahkan karakteristik, status: 0x%08lX" msgstr "Gagal untuk menambahkan karakteristik, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Failed to add service"
msgstr "Gagal untuk menambahkan layanan, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to add service, err 0x%04x" msgid "Failed to add service, err 0x%04x"
@ -591,27 +582,21 @@ msgstr "Gagal untuk megalokasikan buffer RX dari %d byte"
msgid "Failed to change softdevice state" msgid "Failed to change softdevice state"
msgstr "Gagal untuk merubah status softdevice, error: 0x%08lX" msgstr "Gagal untuk merubah status softdevice, error: 0x%08lX"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy #, c-format
msgid "Failed to connect:" msgid "Failed to configure advertising, err 0x%04x"
msgstr "Gagal untuk menyambungkan, status: 0x%08lX" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
#, fuzzy msgid "Failed to connect: timeout"
msgid "Failed to continue scanning" msgstr ""
msgstr "Gagal untuk melanjutkan scanning, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to continue scanning, err 0x%04x" msgid "Failed to continue scanning, err 0x%04x"
msgstr "Gagal untuk melanjutkan scanning, status: 0x%08lX" msgstr "Gagal untuk melanjutkan scanning, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
#, fuzzy
msgid "Failed to create mutex"
msgstr "Gagal untuk membuat mutex, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy #, fuzzy
msgid "Failed to discover services" msgid "Failed to discover services"
msgstr "Gagal untuk menemukan layanan, status: 0x%08lX" msgstr "Gagal untuk menemukan layanan, status: 0x%08lX"
@ -651,48 +636,41 @@ msgstr "Gagal untuk menulis nilai gatts, status: 0x%08lX"
msgid "Failed to register Vendor-Specific UUID, err 0x%04x" msgid "Failed to register Vendor-Specific UUID, err 0x%04x"
msgstr "Gagal untuk menambahkan Vendor Spesific UUID, status: 0x%08lX" msgstr "Gagal untuk menambahkan Vendor Spesific UUID, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
#, fuzzy
msgid "Failed to release mutex"
msgstr "Gagal untuk melepaskan mutex, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to release mutex, err 0x%04x" msgid "Failed to release mutex, err 0x%04x"
msgstr "Gagal untuk melepaskan mutex, status: 0x%08lX" msgstr "Gagal untuk melepaskan mutex, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy #, c-format
msgid "Failed to start advertising" msgid "Failed to set device name, err 0x%04x"
msgstr "Gagal untuk memulai advertisement, status: 0x%08lX" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to start advertising, err 0x%04x" msgid "Failed to start advertising, err 0x%04x"
msgstr "Gagal untuk memulai advertisement, status: 0x%08lX" msgstr "Gagal untuk memulai advertisement, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
#, fuzzy #, c-format
msgid "Failed to start scanning" msgid "Failed to start connecting, error 0x%04x"
msgstr "Gagal untuk melakukan scanning, status: 0x%08lX" msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to start scanning, err 0x%04x" msgid "Failed to start scanning, err 0x%04x"
msgstr "Gagal untuk melakukan scanning, status: 0x%08lX" msgstr "Gagal untuk melakukan scanning, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Failed to stop advertising"
msgstr "Gagal untuk memberhentikan advertisement, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to stop advertising, err 0x%04x" msgid "Failed to stop advertising, err 0x%04x"
msgstr "Gagal untuk memberhentikan advertisement, status: 0x%08lX" msgstr "Gagal untuk memberhentikan advertisement, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format
msgid "Failed to write CCCD, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c #: ports/nrf/common-hal/bleio/Characteristic.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to write attribute value, err 0x%04x" msgid "Failed to write attribute value, err 0x%04x"
@ -908,6 +886,10 @@ msgstr ""
msgid "Must be a %q subclass." msgid "Must be a %q subclass."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c #: ports/atmel-samd/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip" msgid "No DAC on chip"
msgstr "Tidak ada DAC (Digital Analog Converter) di dalam chip" msgstr "Tidak ada DAC (Digital Analog Converter) di dalam chip"
@ -958,6 +940,7 @@ msgstr ""
msgid "No such file/directory" msgid "No such file/directory"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
#: shared-bindings/bleio/CharacteristicBuffer.c #: shared-bindings/bleio/CharacteristicBuffer.c
#, fuzzy #, fuzzy
msgid "Not connected" msgid "Not connected"
@ -1196,7 +1179,8 @@ msgstr "Untuk keluar, silahkan reset board tanpa "
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "Terlalu banyak channel dalam sampel" msgstr "Terlalu banyak channel dalam sampel"
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
#: shared-bindings/displayio/ParallelBus.c
msgid "Too many display busses" msgid "Too many display busses"
msgstr "" msgstr ""
@ -1221,7 +1205,7 @@ msgid "USB Error"
msgstr "" msgstr ""
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID integer value not in range 0 to 0xffff" msgid "UUID integer value must be 0-0xffff"
msgstr "" msgstr ""
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
@ -1237,6 +1221,11 @@ msgstr ""
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "Tidak dapat mengalokasikan buffer untuk signed conversion" msgstr "Tidak dapat mengalokasikan buffer untuk signed conversion"
#: shared-module/displayio/I2CDisplay.c
#, c-format
msgid "Unable to find I2C Display at %x"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Unable to find free GCLK" msgid "Unable to find free GCLK"
@ -1920,8 +1909,9 @@ msgstr ""
msgid "integer required" msgid "integer required"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c #: shared-bindings/bleio/Peripheral.c shared-bindings/bleio/Scanner.c
msgid "interval not in range 0.0020 to 10.24" #, c-format
msgid "interval must be in range %s-%s"
msgstr "" msgstr ""
#: extmod/machine_i2c.c #: extmod/machine_i2c.c
@ -2136,6 +2126,14 @@ msgstr "tidak ada modul yang bernama '%q'"
msgid "no such attribute" msgid "no such attribute"
msgstr "" msgstr ""
#: shared-bindings/bleio/Peripheral.c
msgid "non-Service found in services"
msgstr ""
#: ports/nrf/common-hal/bleio/Central.c
msgid "non-UUID found in service_uuids"
msgstr ""
#: py/compile.c #: py/compile.c
msgid "non-default argument follows default argument" msgid "non-default argument follows default argument"
msgstr "argumen non-default mengikuti argumen standar(default)" msgstr "argumen non-default mengikuti argumen standar(default)"
@ -2345,10 +2343,6 @@ msgstr ""
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "kompilasi script tidak didukung" msgstr "kompilasi script tidak didukung"
#: shared-bindings/bleio/Peripheral.c
msgid "services includes an object that is not a Service"
msgstr ""
#: py/objstr.c #: py/objstr.c
msgid "sign not allowed in string format specifier" msgid "sign not allowed in string format specifier"
msgstr "" msgstr ""
@ -2616,6 +2610,10 @@ msgstr ""
msgid "value_count must be > 0" msgid "value_count must be > 0"
msgstr "" msgstr ""
#: shared-bindings/bleio/Scanner.c
msgid "window must be <= interval"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c #: shared-bindings/_pixelbuf/PixelBuf.c
msgid "write_args must be a list, tuple, or None" msgid "write_args must be a list, tuple, or None"
msgstr "" msgstr ""
@ -2662,6 +2660,10 @@ msgstr ""
#~ msgid "Cannot update i/f status" #~ msgid "Cannot update i/f status"
#~ msgstr "Tidak dapat memperbarui status i/f" #~ msgstr "Tidak dapat memperbarui status i/f"
#, fuzzy
#~ msgid "Data too large for the advertisement packet"
#~ msgstr "Tidak bisa menyesuaikan data ke dalam paket advertisment"
#~ msgid "Don't know how to pass object to native function" #~ msgid "Don't know how to pass object to native function"
#~ msgstr "Tidak tahu cara meloloskan objek ke fungsi native" #~ msgstr "Tidak tahu cara meloloskan objek ke fungsi native"
@ -2674,6 +2676,26 @@ msgstr ""
#~ msgid "Error in ffi_prep_cif" #~ msgid "Error in ffi_prep_cif"
#~ msgstr "Errod pada ffi_prep_cif" #~ msgstr "Errod pada ffi_prep_cif"
#, fuzzy
#~ msgid "Failed to acquire mutex"
#~ msgstr "Gagal untuk mendapatkan mutex, status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to add service"
#~ msgstr "Gagal untuk menambahkan layanan, status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to connect:"
#~ msgstr "Gagal untuk menyambungkan, status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to continue scanning"
#~ msgstr "Gagal untuk melanjutkan scanning, status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to create mutex"
#~ msgstr "Gagal untuk membuat mutex, status: 0x%08lX"
#, fuzzy #, fuzzy
#~ msgid "Failed to notify or indicate attribute value, err %0x04x" #~ msgid "Failed to notify or indicate attribute value, err %0x04x"
#~ msgstr "Gagal untuk melaporkan nilai atribut, status: 0x%08lX" #~ msgstr "Gagal untuk melaporkan nilai atribut, status: 0x%08lX"
@ -2682,6 +2704,22 @@ msgstr ""
#~ msgid "Failed to read attribute value, err %0x04x" #~ msgid "Failed to read attribute value, err %0x04x"
#~ msgstr "Gagal untuk membaca nilai atribut, status: 0x%08lX" #~ msgstr "Gagal untuk membaca nilai atribut, status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to release mutex"
#~ msgstr "Gagal untuk melepaskan mutex, status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to start advertising"
#~ msgstr "Gagal untuk memulai advertisement, status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to start scanning"
#~ msgstr "Gagal untuk melakukan scanning, status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to stop advertising"
#~ msgstr "Gagal untuk memberhentikan advertisement, status: 0x%08lX"
#~ msgid "GPIO16 does not support pull up." #~ msgid "GPIO16 does not support pull up."
#~ msgstr "GPIO16 tidak mendukung pull up" #~ msgstr "GPIO16 tidak mendukung pull up"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-12 00:59-0700\n" "POT-Creation-Date: 2019-07-19 16:10-0700\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n" "Language-Team: LANGUAGE <LL@li.org>\n"
@ -219,12 +219,11 @@ msgstr ""
#: shared-bindings/bleio/Address.c #: shared-bindings/bleio/Address.c
#, c-format #, c-format
msgid "Address is not %d bytes long or is in wrong format" msgid "Address must be %d bytes long"
msgstr "" msgstr ""
#: shared-bindings/bleio/Address.c #: shared-bindings/bleio/Address.c
#, c-format msgid "Address type out of range"
msgid "Address must be %d bytes long"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/I2C.c #: ports/nrf/common-hal/busio/I2C.c
@ -309,6 +308,10 @@ msgstr ""
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "" msgstr ""
#: shared-bindings/displayio/Display.c
msgid "Brightness must be 0-1.0"
msgstr ""
#: shared-bindings/supervisor/__init__.c #: shared-bindings/supervisor/__init__.c
msgid "Brightness must be between 0 and 255" msgid "Brightness must be between 0 and 255"
msgstr "" msgstr ""
@ -349,20 +352,8 @@ msgstr ""
msgid "Can not use dotstar with %s" msgid "Can not use dotstar with %s"
msgstr "" msgstr ""
#: shared-bindings/bleio/Device.c #: ports/nrf/common-hal/bleio/Characteristic.c
msgid "Can't add services in Central mode" msgid "Can't set CCCD for local Characteristic"
msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't advertise in Central mode"
msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't change the name in Central mode"
msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't connect in Peripheral mode"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c #: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c
@ -446,10 +437,22 @@ msgstr ""
msgid "Column entry must be digitalio.DigitalInOut" msgid "Column entry must be digitalio.DigitalInOut"
msgstr "" msgstr ""
#: shared-bindings/displayio/I2CDisplay.c
msgid "Command must be 0-255"
msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
msgid "Command must be an int between 0 and 255" msgid "Command must be an int between 0 and 255"
msgstr "" msgstr ""
#: py/persistentcode.c
msgid "Corrupt .mpy file"
msgstr ""
#: py/emitglue.c
msgid "Corrupt raw code"
msgstr ""
#: ports/nrf/common-hal/bleio/UUID.c #: ports/nrf/common-hal/bleio/UUID.c
#, c-format #, c-format
msgid "Could not decode ble_uuid, err 0x%04x" msgid "Could not decode ble_uuid, err 0x%04x"
@ -484,15 +487,10 @@ msgstr ""
msgid "Data chunk must follow fmt chunk" msgid "Data chunk must follow fmt chunk"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Data too large for advertisement packet" msgid "Data too large for advertisement packet"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Data too large for the advertisement packet"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Destination capacity is smaller than destination_length." msgid "Destination capacity is smaller than destination_length."
msgstr "" msgstr ""
@ -530,6 +528,10 @@ msgstr ""
msgid "Expected a UUID" msgid "Expected a UUID"
msgstr "" msgstr ""
#: shared-bindings/bleio/Central.c
msgid "Expected an Address"
msgstr ""
#: shared-module/_pixelbuf/PixelBuf.c #: shared-module/_pixelbuf/PixelBuf.c
#, c-format #, c-format
msgid "Expected tuple of length %d, got %d" msgid "Expected tuple of length %d, got %d"
@ -539,11 +541,7 @@ msgstr ""
msgid "Failed sending command." msgid "Failed sending command."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
msgid "Failed to acquire mutex"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, c-format #, c-format
msgid "Failed to acquire mutex, err 0x%04x" msgid "Failed to acquire mutex, err 0x%04x"
msgstr "" msgstr ""
@ -553,10 +551,6 @@ msgstr ""
msgid "Failed to add characteristic, err 0x%04x" msgid "Failed to add characteristic, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to add service"
msgstr ""
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to add service, err 0x%04x" msgid "Failed to add service, err 0x%04x"
@ -576,12 +570,13 @@ msgstr ""
msgid "Failed to change softdevice state" msgid "Failed to change softdevice state"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Failed to connect:" #, c-format
msgid "Failed to configure advertising, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to continue scanning" msgid "Failed to connect: timeout"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
@ -589,11 +584,7 @@ msgstr ""
msgid "Failed to continue scanning, err 0x%04x" msgid "Failed to continue scanning, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to create mutex"
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to discover services" msgid "Failed to discover services"
msgstr "" msgstr ""
@ -630,27 +621,24 @@ msgstr ""
msgid "Failed to register Vendor-Specific UUID, err 0x%04x" msgid "Failed to register Vendor-Specific UUID, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
msgid "Failed to release mutex"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, c-format #, c-format
msgid "Failed to release mutex, err 0x%04x" msgid "Failed to release mutex, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Failed to start advertising" #, c-format
msgid "Failed to set device name, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to start advertising, err 0x%04x" msgid "Failed to start advertising, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to start scanning" #, c-format
msgid "Failed to start connecting, error 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
@ -658,16 +646,16 @@ msgstr ""
msgid "Failed to start scanning, err 0x%04x" msgid "Failed to start scanning, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to stop advertising"
msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to stop advertising, err 0x%04x" msgid "Failed to stop advertising, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format
msgid "Failed to write CCCD, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c #: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format #, c-format
msgid "Failed to write attribute value, err 0x%04x" msgid "Failed to write attribute value, err 0x%04x"
@ -883,6 +871,10 @@ msgstr ""
msgid "Must be a %q subclass." msgid "Must be a %q subclass."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c #: ports/atmel-samd/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip" msgid "No DAC on chip"
msgstr "" msgstr ""
@ -933,6 +925,7 @@ msgstr ""
msgid "No such file/directory" msgid "No such file/directory"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
#: shared-bindings/bleio/CharacteristicBuffer.c #: shared-bindings/bleio/CharacteristicBuffer.c
msgid "Not connected" msgid "Not connected"
msgstr "" msgstr ""
@ -1163,7 +1156,8 @@ msgstr ""
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "" msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
#: shared-bindings/displayio/ParallelBus.c
msgid "Too many display busses" msgid "Too many display busses"
msgstr "" msgstr ""
@ -1188,7 +1182,7 @@ msgid "USB Error"
msgstr "" msgstr ""
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID integer value not in range 0 to 0xffff" msgid "UUID integer value must be 0-0xffff"
msgstr "" msgstr ""
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
@ -1204,6 +1198,11 @@ msgstr ""
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "" msgstr ""
#: shared-module/displayio/I2CDisplay.c
#, c-format
msgid "Unable to find I2C Display at %x"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Unable to find free GCLK" msgid "Unable to find free GCLK"
@ -1876,8 +1875,9 @@ msgstr ""
msgid "integer required" msgid "integer required"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c #: shared-bindings/bleio/Peripheral.c shared-bindings/bleio/Scanner.c
msgid "interval not in range 0.0020 to 10.24" #, c-format
msgid "interval must be in range %s-%s"
msgstr "" msgstr ""
#: extmod/machine_i2c.c #: extmod/machine_i2c.c
@ -2091,6 +2091,14 @@ msgstr ""
msgid "no such attribute" msgid "no such attribute"
msgstr "" msgstr ""
#: shared-bindings/bleio/Peripheral.c
msgid "non-Service found in services"
msgstr ""
#: ports/nrf/common-hal/bleio/Central.c
msgid "non-UUID found in service_uuids"
msgstr ""
#: py/compile.c #: py/compile.c
msgid "non-default argument follows default argument" msgid "non-default argument follows default argument"
msgstr "" msgstr ""
@ -2299,10 +2307,6 @@ msgstr ""
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "" msgstr ""
#: shared-bindings/bleio/Peripheral.c
msgid "services includes an object that is not a Service"
msgstr ""
#: py/objstr.c #: py/objstr.c
msgid "sign not allowed in string format specifier" msgid "sign not allowed in string format specifier"
msgstr "" msgstr ""
@ -2569,6 +2573,10 @@ msgstr ""
msgid "value_count must be > 0" msgid "value_count must be > 0"
msgstr "" msgstr ""
#: shared-bindings/bleio/Scanner.c
msgid "window must be <= interval"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c #: shared-bindings/_pixelbuf/PixelBuf.c
msgid "write_args must be a list, tuple, or None" msgid "write_args must be a list, tuple, or None"
msgstr "" msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-11 14:59-0700\n" "POT-Creation-Date: 2019-07-19 16:10-0700\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: Pascal Deneaux\n" "Last-Translator: Pascal Deneaux\n"
"Language-Team: Sebastian Plamauer, Pascal Deneaux\n" "Language-Team: Sebastian Plamauer, Pascal Deneaux\n"
@ -219,16 +219,15 @@ msgstr "3-arg pow() wird nicht unterstützt"
msgid "A hardware interrupt channel is already in use" msgid "A hardware interrupt channel is already in use"
msgstr "Ein Hardware Interrupt Kanal wird schon benutzt" msgstr "Ein Hardware Interrupt Kanal wird schon benutzt"
#: shared-bindings/bleio/Address.c
#, c-format
msgid "Address is not %d bytes long or is in wrong format"
msgstr "Die Adresse ist nicht %d Bytes lang oder das Format ist falsch"
#: shared-bindings/bleio/Address.c #: shared-bindings/bleio/Address.c
#, c-format #, c-format
msgid "Address must be %d bytes long" msgid "Address must be %d bytes long"
msgstr "Die Adresse muss %d Bytes lang sein" msgstr "Die Adresse muss %d Bytes lang sein"
#: shared-bindings/bleio/Address.c
msgid "Address type out of range"
msgstr ""
#: ports/nrf/common-hal/busio/I2C.c #: ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use" msgid "All I2C peripherals are in use"
msgstr "Alle I2C-Peripheriegeräte sind in Benutzung" msgstr "Alle I2C-Peripheriegeräte sind in Benutzung"
@ -313,6 +312,10 @@ msgstr "Bit depth muss ein Vielfaches von 8 sein."
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Beide pins müssen Hardware Interrupts unterstützen" msgstr "Beide pins müssen Hardware Interrupts unterstützen"
#: shared-bindings/displayio/Display.c
msgid "Brightness must be 0-1.0"
msgstr ""
#: shared-bindings/supervisor/__init__.c #: shared-bindings/supervisor/__init__.c
msgid "Brightness must be between 0 and 255" msgid "Brightness must be between 0 and 255"
msgstr "Die Helligkeit muss zwischen 0 und 255 liegen" msgstr "Die Helligkeit muss zwischen 0 und 255 liegen"
@ -353,21 +356,9 @@ msgstr ""
msgid "Can not use dotstar with %s" msgid "Can not use dotstar with %s"
msgstr "Kann dotstar nicht mit %s verwenden" msgstr "Kann dotstar nicht mit %s verwenden"
#: shared-bindings/bleio/Device.c #: ports/nrf/common-hal/bleio/Characteristic.c
msgid "Can't add services in Central mode" msgid "Can't set CCCD for local Characteristic"
msgstr "Im Central mode können Dienste nicht hinzugefügt werden" msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't advertise in Central mode"
msgstr "Im Central mode kann advertise nicht gemacht werden"
#: shared-bindings/bleio/Device.c
msgid "Can't change the name in Central mode"
msgstr "Im Central mode kann name nicht geändert werden"
#: shared-bindings/bleio/Device.c
msgid "Can't connect in Peripheral mode"
msgstr "Im Peripheral mode kann keine Verbindung hergestellt werden"
#: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c #: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c
msgid "Cannot delete values" msgid "Cannot delete values"
@ -450,10 +441,22 @@ msgstr "Clock unit wird benutzt"
msgid "Column entry must be digitalio.DigitalInOut" msgid "Column entry must be digitalio.DigitalInOut"
msgstr "" msgstr ""
#: shared-bindings/displayio/I2CDisplay.c
msgid "Command must be 0-255"
msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
msgid "Command must be an int between 0 and 255" msgid "Command must be an int between 0 and 255"
msgstr "Der Befehl muss ein int zwischen 0 und 255 sein" msgstr "Der Befehl muss ein int zwischen 0 und 255 sein"
#: py/persistentcode.c
msgid "Corrupt .mpy file"
msgstr ""
#: py/emitglue.c
msgid "Corrupt raw code"
msgstr ""
#: ports/nrf/common-hal/bleio/UUID.c #: ports/nrf/common-hal/bleio/UUID.c
#, c-format #, c-format
msgid "Could not decode ble_uuid, err 0x%04x" msgid "Could not decode ble_uuid, err 0x%04x"
@ -488,15 +491,10 @@ msgstr "Data 0 pin muss am Byte ausgerichtet sein"
msgid "Data chunk must follow fmt chunk" msgid "Data chunk must follow fmt chunk"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Data too large for advertisement packet" msgid "Data too large for advertisement packet"
msgstr "Zu vielen Daten für das advertisement packet" msgstr "Zu vielen Daten für das advertisement packet"
#: ports/nrf/common-hal/bleio/Device.c
msgid "Data too large for the advertisement packet"
msgstr "Daten sind zu groß für das advertisement packet"
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Destination capacity is smaller than destination_length." msgid "Destination capacity is smaller than destination_length."
msgstr "Die Zielkapazität ist kleiner als destination_length." msgstr "Die Zielkapazität ist kleiner als destination_length."
@ -534,6 +532,10 @@ msgstr "Characteristic wird erwartet"
msgid "Expected a UUID" msgid "Expected a UUID"
msgstr "Eine UUID wird erwartet" msgstr "Eine UUID wird erwartet"
#: shared-bindings/bleio/Central.c
msgid "Expected an Address"
msgstr ""
#: shared-module/_pixelbuf/PixelBuf.c #: shared-module/_pixelbuf/PixelBuf.c
#, c-format #, c-format
msgid "Expected tuple of length %d, got %d" msgid "Expected tuple of length %d, got %d"
@ -543,11 +545,7 @@ msgstr "Habe ein Tupel der Länge %d erwartet aber %d erhalten"
msgid "Failed sending command." msgid "Failed sending command."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
msgid "Failed to acquire mutex"
msgstr "Akquirieren des Mutex gescheitert"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, c-format #, c-format
msgid "Failed to acquire mutex, err 0x%04x" msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Mutex konnte nicht akquiriert werden. Status: 0x%04x" msgstr "Mutex konnte nicht akquiriert werden. Status: 0x%04x"
@ -557,10 +555,6 @@ msgstr "Mutex konnte nicht akquiriert werden. Status: 0x%04x"
msgid "Failed to add characteristic, err 0x%04x" msgid "Failed to add characteristic, err 0x%04x"
msgstr "Hinzufügen des Characteristic ist gescheitert. Status: 0x%04x" msgstr "Hinzufügen des Characteristic ist gescheitert. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to add service"
msgstr "Dienst konnte nicht hinzugefügt werden"
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to add service, err 0x%04x" msgid "Failed to add service, err 0x%04x"
@ -580,24 +574,21 @@ msgstr "Konnte keine RX Buffer mit %d allozieren"
msgid "Failed to change softdevice state" msgid "Failed to change softdevice state"
msgstr "Fehler beim Ändern des Softdevice-Status" msgstr "Fehler beim Ändern des Softdevice-Status"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Failed to connect:" #, c-format
msgstr "Verbindung fehlgeschlagen:" msgid "Failed to configure advertising, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to continue scanning" msgid "Failed to connect: timeout"
msgstr "Der Scanvorgang kann nicht fortgesetzt werden" msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, c-format #, c-format
msgid "Failed to continue scanning, err 0x%04x" msgid "Failed to continue scanning, err 0x%04x"
msgstr "Der Scanvorgang kann nicht fortgesetzt werden. Status: 0x%04x" msgstr "Der Scanvorgang kann nicht fortgesetzt werden. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to create mutex"
msgstr "Erstellen des Mutex ist fehlgeschlagen"
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to discover services" msgid "Failed to discover services"
msgstr "Es konnten keine Dienste gefunden werden" msgstr "Es konnten keine Dienste gefunden werden"
@ -634,44 +625,41 @@ msgstr "gatts value konnte nicht gelesen werden. Status: 0x%04x"
msgid "Failed to register Vendor-Specific UUID, err 0x%04x" msgid "Failed to register Vendor-Specific UUID, err 0x%04x"
msgstr "Kann keine herstellerspezifische UUID hinzufügen. Status: 0x%04x" msgstr "Kann keine herstellerspezifische UUID hinzufügen. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
msgid "Failed to release mutex"
msgstr "Loslassen des Mutex gescheitert"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, c-format #, c-format
msgid "Failed to release mutex, err 0x%04x" msgid "Failed to release mutex, err 0x%04x"
msgstr "Mutex konnte nicht freigegeben werden. Status: 0x%04x" msgstr "Mutex konnte nicht freigegeben werden. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Failed to start advertising" #, c-format
msgstr "Kann advertisement nicht starten" msgid "Failed to set device name, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to start advertising, err 0x%04x" msgid "Failed to start advertising, err 0x%04x"
msgstr "Kann advertisement nicht starten. Status: 0x%04x" msgstr "Kann advertisement nicht starten. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to start scanning" #, c-format
msgstr "Der Scanvorgang kann nicht gestartet werden" msgid "Failed to start connecting, error 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, c-format #, c-format
msgid "Failed to start scanning, err 0x%04x" msgid "Failed to start scanning, err 0x%04x"
msgstr "Der Scanvorgang kann nicht gestartet werden. Status: 0x%04x" msgstr "Der Scanvorgang kann nicht gestartet werden. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to stop advertising"
msgstr "Kann advertisement nicht stoppen"
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to stop advertising, err 0x%04x" msgid "Failed to stop advertising, err 0x%04x"
msgstr "Kann advertisement nicht stoppen. Status: 0x%04x" msgstr "Kann advertisement nicht stoppen. Status: 0x%04x"
#: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format
msgid "Failed to write CCCD, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c #: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format #, c-format
msgid "Failed to write attribute value, err 0x%04x" msgid "Failed to write attribute value, err 0x%04x"
@ -896,6 +884,10 @@ msgstr ""
msgid "Must be a %q subclass." msgid "Must be a %q subclass."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c #: ports/atmel-samd/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip" msgid "No DAC on chip"
msgstr "Kein DAC im Chip vorhanden" msgstr "Kein DAC im Chip vorhanden"
@ -946,6 +938,7 @@ msgstr "Kein Speicherplatz auf Gerät"
msgid "No such file/directory" msgid "No such file/directory"
msgstr "Keine solche Datei/Verzeichnis" msgstr "Keine solche Datei/Verzeichnis"
#: ports/nrf/common-hal/bleio/Characteristic.c
#: shared-bindings/bleio/CharacteristicBuffer.c #: shared-bindings/bleio/CharacteristicBuffer.c
msgid "Not connected" msgid "Not connected"
msgstr "Nicht verbunden" msgstr "Nicht verbunden"
@ -1192,7 +1185,8 @@ msgstr "Zum beenden, resette bitte das board ohne "
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "Zu viele Kanäle im sample" msgstr "Zu viele Kanäle im sample"
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
#: shared-bindings/displayio/ParallelBus.c
msgid "Too many display busses" msgid "Too many display busses"
msgstr "" msgstr ""
@ -1217,8 +1211,8 @@ msgid "USB Error"
msgstr "USB Fehler" msgstr "USB Fehler"
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID integer value not in range 0 to 0xffff" msgid "UUID integer value must be 0-0xffff"
msgstr "UUID-Integer nicht im Bereich 0 bis 0xffff" msgstr ""
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
@ -1233,6 +1227,11 @@ msgstr "Der UUID-Wert ist kein str-, int- oder Byte-Puffer"
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "Konnte keine Buffer für Vorzeichenumwandlung allozieren" msgstr "Konnte keine Buffer für Vorzeichenumwandlung allozieren"
#: shared-module/displayio/I2CDisplay.c
#, c-format
msgid "Unable to find I2C Display at %x"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Unable to find free GCLK" msgid "Unable to find free GCLK"
@ -1917,9 +1916,10 @@ msgstr "int() arg 2 muss >= 2 und <= 36 sein"
msgid "integer required" msgid "integer required"
msgstr "integer erforderlich" msgstr "integer erforderlich"
#: ports/nrf/common-hal/bleio/Broadcaster.c #: shared-bindings/bleio/Peripheral.c shared-bindings/bleio/Scanner.c
msgid "interval not in range 0.0020 to 10.24" #, c-format
msgstr "Das Interval ist nicht im Bereich 0.0020 bis 10.24" msgid "interval must be in range %s-%s"
msgstr ""
#: extmod/machine_i2c.c #: extmod/machine_i2c.c
msgid "invalid I2C peripheral" msgid "invalid I2C peripheral"
@ -2138,6 +2138,14 @@ msgstr "Kein Modul mit dem Namen '%q'"
msgid "no such attribute" msgid "no such attribute"
msgstr "" msgstr ""
#: shared-bindings/bleio/Peripheral.c
msgid "non-Service found in services"
msgstr ""
#: ports/nrf/common-hal/bleio/Central.c
msgid "non-UUID found in service_uuids"
msgstr ""
#: py/compile.c #: py/compile.c
msgid "non-default argument follows default argument" msgid "non-default argument follows default argument"
msgstr "ein non-default argument folgt auf ein default argument" msgstr "ein non-default argument folgt auf ein default argument"
@ -2350,10 +2358,6 @@ msgstr "Der schedule stack ist voll"
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "kompilieren von Skripten ist nicht unterstützt" msgstr "kompilieren von Skripten ist nicht unterstützt"
#: shared-bindings/bleio/Peripheral.c
msgid "services includes an object that is not a Service"
msgstr ""
#: py/objstr.c #: py/objstr.c
msgid "sign not allowed in string format specifier" msgid "sign not allowed in string format specifier"
msgstr "" msgstr ""
@ -2625,6 +2629,10 @@ msgstr ""
msgid "value_count must be > 0" msgid "value_count must be > 0"
msgstr "" msgstr ""
#: shared-bindings/bleio/Scanner.c
msgid "window must be <= interval"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c #: shared-bindings/_pixelbuf/PixelBuf.c
msgid "write_args must be a list, tuple, or None" msgid "write_args must be a list, tuple, or None"
msgstr "write_args muss eine Liste, ein Tupel oder None sein" msgstr "write_args muss eine Liste, ein Tupel oder None sein"
@ -2656,9 +2664,24 @@ msgstr ""
#~ msgid "AP required" #~ msgid "AP required"
#~ msgstr "AP erforderlich" #~ msgstr "AP erforderlich"
#~ msgid "Address is not %d bytes long or is in wrong format"
#~ msgstr "Die Adresse ist nicht %d Bytes lang oder das Format ist falsch"
#~ msgid "C-level assert" #~ msgid "C-level assert"
#~ msgstr "C-Level Assert" #~ msgstr "C-Level Assert"
#~ msgid "Can't add services in Central mode"
#~ msgstr "Im Central mode können Dienste nicht hinzugefügt werden"
#~ msgid "Can't advertise in Central mode"
#~ msgstr "Im Central mode kann advertise nicht gemacht werden"
#~ msgid "Can't change the name in Central mode"
#~ msgstr "Im Central mode kann name nicht geändert werden"
#~ msgid "Can't connect in Peripheral mode"
#~ msgstr "Im Peripheral mode kann keine Verbindung hergestellt werden"
#~ msgid "Cannot connect to AP" #~ msgid "Cannot connect to AP"
#~ msgstr "Kann nicht zu AP verbinden" #~ msgstr "Kann nicht zu AP verbinden"
@ -2671,6 +2694,9 @@ msgstr ""
#~ msgid "Cannot update i/f status" #~ msgid "Cannot update i/f status"
#~ msgstr "Kann i/f Status nicht updaten" #~ msgstr "Kann i/f Status nicht updaten"
#~ msgid "Data too large for the advertisement packet"
#~ msgstr "Daten sind zu groß für das advertisement packet"
#~ msgid "Don't know how to pass object to native function" #~ msgid "Don't know how to pass object to native function"
#~ msgstr "" #~ msgstr ""
#~ "Ich weiß nicht, wie man das Objekt an die native Funktion übergeben kann" #~ "Ich weiß nicht, wie man das Objekt an die native Funktion übergeben kann"
@ -2684,12 +2710,39 @@ msgstr ""
#~ msgid "Error in ffi_prep_cif" #~ msgid "Error in ffi_prep_cif"
#~ msgstr "Fehler in ffi_prep_cif" #~ msgstr "Fehler in ffi_prep_cif"
#~ msgid "Failed to acquire mutex"
#~ msgstr "Akquirieren des Mutex gescheitert"
#~ msgid "Failed to add service"
#~ msgstr "Dienst konnte nicht hinzugefügt werden"
#~ msgid "Failed to connect:"
#~ msgstr "Verbindung fehlgeschlagen:"
#~ msgid "Failed to continue scanning"
#~ msgstr "Der Scanvorgang kann nicht fortgesetzt werden"
#~ msgid "Failed to create mutex"
#~ msgstr "Erstellen des Mutex ist fehlgeschlagen"
#~ msgid "Failed to notify or indicate attribute value, err %0x04x" #~ msgid "Failed to notify or indicate attribute value, err %0x04x"
#~ msgstr "Kann den Attributwert nicht mitteilen. Status: 0x%04x" #~ msgstr "Kann den Attributwert nicht mitteilen. Status: 0x%04x"
#~ msgid "Failed to read attribute value, err %0x04x" #~ msgid "Failed to read attribute value, err %0x04x"
#~ msgstr "Kann den Attributwert nicht lesen. Status: 0x%04x" #~ msgstr "Kann den Attributwert nicht lesen. Status: 0x%04x"
#~ msgid "Failed to release mutex"
#~ msgstr "Loslassen des Mutex gescheitert"
#~ msgid "Failed to start advertising"
#~ msgstr "Kann advertisement nicht starten"
#~ msgid "Failed to start scanning"
#~ msgstr "Der Scanvorgang kann nicht gestartet werden"
#~ msgid "Failed to stop advertising"
#~ msgstr "Kann advertisement nicht stoppen"
#~ msgid "Function requires lock." #~ msgid "Function requires lock."
#~ msgstr "" #~ msgstr ""
#~ "Die Funktion erwartet, dass der 'lock'-Befehl zuvor ausgeführt wurde" #~ "Die Funktion erwartet, dass der 'lock'-Befehl zuvor ausgeführt wurde"
@ -2761,6 +2814,9 @@ msgstr ""
#~ msgid "UART(1) can't read" #~ msgid "UART(1) can't read"
#~ msgstr "UART(1) kann nicht lesen" #~ msgstr "UART(1) kann nicht lesen"
#~ msgid "UUID integer value not in range 0 to 0xffff"
#~ msgstr "UUID-Integer nicht im Bereich 0 bis 0xffff"
#~ msgid "Unable to remount filesystem" #~ msgid "Unable to remount filesystem"
#~ msgstr "Dateisystem konnte nicht wieder eingebunden werden." #~ msgstr "Dateisystem konnte nicht wieder eingebunden werden."
@ -2792,6 +2848,9 @@ msgstr ""
#~ msgid "impossible baudrate" #~ msgid "impossible baudrate"
#~ msgstr "Unmögliche Baudrate" #~ msgstr "Unmögliche Baudrate"
#~ msgid "interval not in range 0.0020 to 10.24"
#~ msgstr "Das Interval ist nicht im Bereich 0.0020 bis 10.24"
#~ msgid "invalid alarm" #~ msgid "invalid alarm"
#~ msgstr "ungültiger Alarm" #~ msgstr "ungültiger Alarm"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-11 14:59-0700\n" "POT-Creation-Date: 2019-07-19 16:10-0700\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -219,12 +219,11 @@ msgstr ""
#: shared-bindings/bleio/Address.c #: shared-bindings/bleio/Address.c
#, c-format #, c-format
msgid "Address is not %d bytes long or is in wrong format" msgid "Address must be %d bytes long"
msgstr "" msgstr ""
#: shared-bindings/bleio/Address.c #: shared-bindings/bleio/Address.c
#, c-format msgid "Address type out of range"
msgid "Address must be %d bytes long"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/I2C.c #: ports/nrf/common-hal/busio/I2C.c
@ -309,6 +308,10 @@ msgstr ""
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "" msgstr ""
#: shared-bindings/displayio/Display.c
msgid "Brightness must be 0-1.0"
msgstr ""
#: shared-bindings/supervisor/__init__.c #: shared-bindings/supervisor/__init__.c
msgid "Brightness must be between 0 and 255" msgid "Brightness must be between 0 and 255"
msgstr "" msgstr ""
@ -349,20 +352,8 @@ msgstr ""
msgid "Can not use dotstar with %s" msgid "Can not use dotstar with %s"
msgstr "" msgstr ""
#: shared-bindings/bleio/Device.c #: ports/nrf/common-hal/bleio/Characteristic.c
msgid "Can't add services in Central mode" msgid "Can't set CCCD for local Characteristic"
msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't advertise in Central mode"
msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't change the name in Central mode"
msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't connect in Peripheral mode"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c #: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c
@ -446,10 +437,22 @@ msgstr ""
msgid "Column entry must be digitalio.DigitalInOut" msgid "Column entry must be digitalio.DigitalInOut"
msgstr "" msgstr ""
#: shared-bindings/displayio/I2CDisplay.c
msgid "Command must be 0-255"
msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
msgid "Command must be an int between 0 and 255" msgid "Command must be an int between 0 and 255"
msgstr "" msgstr ""
#: py/persistentcode.c
msgid "Corrupt .mpy file"
msgstr ""
#: py/emitglue.c
msgid "Corrupt raw code"
msgstr ""
#: ports/nrf/common-hal/bleio/UUID.c #: ports/nrf/common-hal/bleio/UUID.c
#, c-format #, c-format
msgid "Could not decode ble_uuid, err 0x%04x" msgid "Could not decode ble_uuid, err 0x%04x"
@ -484,15 +487,10 @@ msgstr ""
msgid "Data chunk must follow fmt chunk" msgid "Data chunk must follow fmt chunk"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Data too large for advertisement packet" msgid "Data too large for advertisement packet"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Data too large for the advertisement packet"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Destination capacity is smaller than destination_length." msgid "Destination capacity is smaller than destination_length."
msgstr "" msgstr ""
@ -530,6 +528,10 @@ msgstr ""
msgid "Expected a UUID" msgid "Expected a UUID"
msgstr "" msgstr ""
#: shared-bindings/bleio/Central.c
msgid "Expected an Address"
msgstr ""
#: shared-module/_pixelbuf/PixelBuf.c #: shared-module/_pixelbuf/PixelBuf.c
#, c-format #, c-format
msgid "Expected tuple of length %d, got %d" msgid "Expected tuple of length %d, got %d"
@ -539,11 +541,7 @@ msgstr ""
msgid "Failed sending command." msgid "Failed sending command."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
msgid "Failed to acquire mutex"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, c-format #, c-format
msgid "Failed to acquire mutex, err 0x%04x" msgid "Failed to acquire mutex, err 0x%04x"
msgstr "" msgstr ""
@ -553,10 +551,6 @@ msgstr ""
msgid "Failed to add characteristic, err 0x%04x" msgid "Failed to add characteristic, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to add service"
msgstr ""
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to add service, err 0x%04x" msgid "Failed to add service, err 0x%04x"
@ -576,12 +570,13 @@ msgstr ""
msgid "Failed to change softdevice state" msgid "Failed to change softdevice state"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Failed to connect:" #, c-format
msgid "Failed to configure advertising, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to continue scanning" msgid "Failed to connect: timeout"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
@ -589,11 +584,7 @@ msgstr ""
msgid "Failed to continue scanning, err 0x%04x" msgid "Failed to continue scanning, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to create mutex"
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to discover services" msgid "Failed to discover services"
msgstr "" msgstr ""
@ -630,27 +621,24 @@ msgstr ""
msgid "Failed to register Vendor-Specific UUID, err 0x%04x" msgid "Failed to register Vendor-Specific UUID, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
msgid "Failed to release mutex"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, c-format #, c-format
msgid "Failed to release mutex, err 0x%04x" msgid "Failed to release mutex, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Failed to start advertising" #, c-format
msgid "Failed to set device name, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to start advertising, err 0x%04x" msgid "Failed to start advertising, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to start scanning" #, c-format
msgid "Failed to start connecting, error 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
@ -658,16 +646,16 @@ msgstr ""
msgid "Failed to start scanning, err 0x%04x" msgid "Failed to start scanning, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to stop advertising"
msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to stop advertising, err 0x%04x" msgid "Failed to stop advertising, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format
msgid "Failed to write CCCD, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c #: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format #, c-format
msgid "Failed to write attribute value, err 0x%04x" msgid "Failed to write attribute value, err 0x%04x"
@ -883,6 +871,10 @@ msgstr ""
msgid "Must be a %q subclass." msgid "Must be a %q subclass."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c #: ports/atmel-samd/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip" msgid "No DAC on chip"
msgstr "" msgstr ""
@ -933,6 +925,7 @@ msgstr ""
msgid "No such file/directory" msgid "No such file/directory"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
#: shared-bindings/bleio/CharacteristicBuffer.c #: shared-bindings/bleio/CharacteristicBuffer.c
msgid "Not connected" msgid "Not connected"
msgstr "" msgstr ""
@ -1163,7 +1156,8 @@ msgstr ""
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "" msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
#: shared-bindings/displayio/ParallelBus.c
msgid "Too many display busses" msgid "Too many display busses"
msgstr "" msgstr ""
@ -1188,7 +1182,7 @@ msgid "USB Error"
msgstr "" msgstr ""
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID integer value not in range 0 to 0xffff" msgid "UUID integer value must be 0-0xffff"
msgstr "" msgstr ""
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
@ -1204,6 +1198,11 @@ msgstr ""
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "" msgstr ""
#: shared-module/displayio/I2CDisplay.c
#, c-format
msgid "Unable to find I2C Display at %x"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Unable to find free GCLK" msgid "Unable to find free GCLK"
@ -1876,8 +1875,9 @@ msgstr ""
msgid "integer required" msgid "integer required"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c #: shared-bindings/bleio/Peripheral.c shared-bindings/bleio/Scanner.c
msgid "interval not in range 0.0020 to 10.24" #, c-format
msgid "interval must be in range %s-%s"
msgstr "" msgstr ""
#: extmod/machine_i2c.c #: extmod/machine_i2c.c
@ -2091,6 +2091,14 @@ msgstr ""
msgid "no such attribute" msgid "no such attribute"
msgstr "" msgstr ""
#: shared-bindings/bleio/Peripheral.c
msgid "non-Service found in services"
msgstr ""
#: ports/nrf/common-hal/bleio/Central.c
msgid "non-UUID found in service_uuids"
msgstr ""
#: py/compile.c #: py/compile.c
msgid "non-default argument follows default argument" msgid "non-default argument follows default argument"
msgstr "" msgstr ""
@ -2299,10 +2307,6 @@ msgstr ""
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "" msgstr ""
#: shared-bindings/bleio/Peripheral.c
msgid "services includes an object that is not a Service"
msgstr ""
#: py/objstr.c #: py/objstr.c
msgid "sign not allowed in string format specifier" msgid "sign not allowed in string format specifier"
msgstr "" msgstr ""
@ -2569,6 +2573,10 @@ msgstr ""
msgid "value_count must be > 0" msgid "value_count must be > 0"
msgstr "" msgstr ""
#: shared-bindings/bleio/Scanner.c
msgid "window must be <= interval"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c #: shared-bindings/_pixelbuf/PixelBuf.c
msgid "write_args must be a list, tuple, or None" msgid "write_args must be a list, tuple, or None"
msgstr "" msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-11 14:59-0700\n" "POT-Creation-Date: 2019-07-19 16:10-0700\n"
"PO-Revision-Date: 2018-07-27 11:55-0700\n" "PO-Revision-Date: 2018-07-27 11:55-0700\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: @sommersoft, @MrCertainly\n" "Language-Team: @sommersoft, @MrCertainly\n"
@ -221,12 +221,11 @@ msgstr "Avast! A hardware interrupt channel be used already"
#: shared-bindings/bleio/Address.c #: shared-bindings/bleio/Address.c
#, c-format #, c-format
msgid "Address is not %d bytes long or is in wrong format" msgid "Address must be %d bytes long"
msgstr "" msgstr ""
#: shared-bindings/bleio/Address.c #: shared-bindings/bleio/Address.c
#, c-format msgid "Address type out of range"
msgid "Address must be %d bytes long"
msgstr "" msgstr ""
#: ports/nrf/common-hal/busio/I2C.c #: ports/nrf/common-hal/busio/I2C.c
@ -313,6 +312,10 @@ msgstr ""
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "" msgstr ""
#: shared-bindings/displayio/Display.c
msgid "Brightness must be 0-1.0"
msgstr ""
#: shared-bindings/supervisor/__init__.c #: shared-bindings/supervisor/__init__.c
msgid "Brightness must be between 0 and 255" msgid "Brightness must be between 0 and 255"
msgstr "" msgstr ""
@ -353,20 +356,8 @@ msgstr ""
msgid "Can not use dotstar with %s" msgid "Can not use dotstar with %s"
msgstr "" msgstr ""
#: shared-bindings/bleio/Device.c #: ports/nrf/common-hal/bleio/Characteristic.c
msgid "Can't add services in Central mode" msgid "Can't set CCCD for local Characteristic"
msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't advertise in Central mode"
msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't change the name in Central mode"
msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't connect in Peripheral mode"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c #: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c
@ -450,10 +441,22 @@ msgstr ""
msgid "Column entry must be digitalio.DigitalInOut" msgid "Column entry must be digitalio.DigitalInOut"
msgstr "" msgstr ""
#: shared-bindings/displayio/I2CDisplay.c
msgid "Command must be 0-255"
msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
msgid "Command must be an int between 0 and 255" msgid "Command must be an int between 0 and 255"
msgstr "" msgstr ""
#: py/persistentcode.c
msgid "Corrupt .mpy file"
msgstr ""
#: py/emitglue.c
msgid "Corrupt raw code"
msgstr ""
#: ports/nrf/common-hal/bleio/UUID.c #: ports/nrf/common-hal/bleio/UUID.c
#, c-format #, c-format
msgid "Could not decode ble_uuid, err 0x%04x" msgid "Could not decode ble_uuid, err 0x%04x"
@ -488,15 +491,10 @@ msgstr ""
msgid "Data chunk must follow fmt chunk" msgid "Data chunk must follow fmt chunk"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Data too large for advertisement packet" msgid "Data too large for advertisement packet"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Data too large for the advertisement packet"
msgstr ""
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Destination capacity is smaller than destination_length." msgid "Destination capacity is smaller than destination_length."
msgstr "" msgstr ""
@ -534,6 +532,10 @@ msgstr ""
msgid "Expected a UUID" msgid "Expected a UUID"
msgstr "" msgstr ""
#: shared-bindings/bleio/Central.c
msgid "Expected an Address"
msgstr ""
#: shared-module/_pixelbuf/PixelBuf.c #: shared-module/_pixelbuf/PixelBuf.c
#, c-format #, c-format
msgid "Expected tuple of length %d, got %d" msgid "Expected tuple of length %d, got %d"
@ -543,11 +545,7 @@ msgstr ""
msgid "Failed sending command." msgid "Failed sending command."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
msgid "Failed to acquire mutex"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, c-format #, c-format
msgid "Failed to acquire mutex, err 0x%04x" msgid "Failed to acquire mutex, err 0x%04x"
msgstr "" msgstr ""
@ -557,10 +555,6 @@ msgstr ""
msgid "Failed to add characteristic, err 0x%04x" msgid "Failed to add characteristic, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to add service"
msgstr ""
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to add service, err 0x%04x" msgid "Failed to add service, err 0x%04x"
@ -580,12 +574,13 @@ msgstr ""
msgid "Failed to change softdevice state" msgid "Failed to change softdevice state"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Failed to connect:" #, c-format
msgid "Failed to configure advertising, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to continue scanning" msgid "Failed to connect: timeout"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
@ -593,11 +588,7 @@ msgstr ""
msgid "Failed to continue scanning, err 0x%04x" msgid "Failed to continue scanning, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to create mutex"
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to discover services" msgid "Failed to discover services"
msgstr "" msgstr ""
@ -634,27 +625,24 @@ msgstr ""
msgid "Failed to register Vendor-Specific UUID, err 0x%04x" msgid "Failed to register Vendor-Specific UUID, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
msgid "Failed to release mutex"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, c-format #, c-format
msgid "Failed to release mutex, err 0x%04x" msgid "Failed to release mutex, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Failed to start advertising" #, c-format
msgid "Failed to set device name, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to start advertising, err 0x%04x" msgid "Failed to start advertising, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to start scanning" #, c-format
msgid "Failed to start connecting, error 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
@ -662,16 +650,16 @@ msgstr ""
msgid "Failed to start scanning, err 0x%04x" msgid "Failed to start scanning, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to stop advertising"
msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to stop advertising, err 0x%04x" msgid "Failed to stop advertising, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format
msgid "Failed to write CCCD, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c #: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format #, c-format
msgid "Failed to write attribute value, err 0x%04x" msgid "Failed to write attribute value, err 0x%04x"
@ -887,6 +875,10 @@ msgstr ""
msgid "Must be a %q subclass." msgid "Must be a %q subclass."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c #: ports/atmel-samd/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip" msgid "No DAC on chip"
msgstr "Shiver me timbers! There be no DAC on this chip" msgstr "Shiver me timbers! There be no DAC on this chip"
@ -937,6 +929,7 @@ msgstr ""
msgid "No such file/directory" msgid "No such file/directory"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
#: shared-bindings/bleio/CharacteristicBuffer.c #: shared-bindings/bleio/CharacteristicBuffer.c
msgid "Not connected" msgid "Not connected"
msgstr "" msgstr ""
@ -1167,7 +1160,8 @@ msgstr ""
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "" msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
#: shared-bindings/displayio/ParallelBus.c
msgid "Too many display busses" msgid "Too many display busses"
msgstr "" msgstr ""
@ -1192,7 +1186,7 @@ msgid "USB Error"
msgstr "" msgstr ""
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID integer value not in range 0 to 0xffff" msgid "UUID integer value must be 0-0xffff"
msgstr "" msgstr ""
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
@ -1208,6 +1202,11 @@ msgstr ""
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "" msgstr ""
#: shared-module/displayio/I2CDisplay.c
#, c-format
msgid "Unable to find I2C Display at %x"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Unable to find free GCLK" msgid "Unable to find free GCLK"
@ -1880,8 +1879,9 @@ msgstr ""
msgid "integer required" msgid "integer required"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c #: shared-bindings/bleio/Peripheral.c shared-bindings/bleio/Scanner.c
msgid "interval not in range 0.0020 to 10.24" #, c-format
msgid "interval must be in range %s-%s"
msgstr "" msgstr ""
#: extmod/machine_i2c.c #: extmod/machine_i2c.c
@ -2095,6 +2095,14 @@ msgstr ""
msgid "no such attribute" msgid "no such attribute"
msgstr "" msgstr ""
#: shared-bindings/bleio/Peripheral.c
msgid "non-Service found in services"
msgstr ""
#: ports/nrf/common-hal/bleio/Central.c
msgid "non-UUID found in service_uuids"
msgstr ""
#: py/compile.c #: py/compile.c
msgid "non-default argument follows default argument" msgid "non-default argument follows default argument"
msgstr "" msgstr ""
@ -2303,10 +2311,6 @@ msgstr ""
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "" msgstr ""
#: shared-bindings/bleio/Peripheral.c
msgid "services includes an object that is not a Service"
msgstr ""
#: py/objstr.c #: py/objstr.c
msgid "sign not allowed in string format specifier" msgid "sign not allowed in string format specifier"
msgstr "" msgstr ""
@ -2573,6 +2577,10 @@ msgstr ""
msgid "value_count must be > 0" msgid "value_count must be > 0"
msgstr "" msgstr ""
#: shared-bindings/bleio/Scanner.c
msgid "window must be <= interval"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c #: shared-bindings/_pixelbuf/PixelBuf.c
msgid "write_args must be a list, tuple, or None" msgid "write_args must be a list, tuple, or None"
msgstr "" msgstr ""

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-15 09:21-0500\n" "POT-Creation-Date: 2019-07-19 16:10-0700\n"
"PO-Revision-Date: 2018-08-24 22:56-0500\n" "PO-Revision-Date: 2018-08-24 22:56-0500\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -219,16 +219,15 @@ msgstr "pow() con 3 argumentos no soportado"
msgid "A hardware interrupt channel is already in use" msgid "A hardware interrupt channel is already in use"
msgstr "El canal EXTINT ya está siendo utilizado" msgstr "El canal EXTINT ya está siendo utilizado"
#: shared-bindings/bleio/Address.c
#, c-format
msgid "Address is not %d bytes long or is in wrong format"
msgstr "Direción no es %d bytes de largo o esta en el formato incorrecto"
#: shared-bindings/bleio/Address.c #: shared-bindings/bleio/Address.c
#, c-format #, c-format
msgid "Address must be %d bytes long" msgid "Address must be %d bytes long"
msgstr "La dirección debe ser %d bytes de largo" msgstr "La dirección debe ser %d bytes de largo"
#: shared-bindings/bleio/Address.c
msgid "Address type out of range"
msgstr ""
#: ports/nrf/common-hal/busio/I2C.c #: ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use" msgid "All I2C peripherals are in use"
msgstr "Todos los periféricos I2C están siendo usados" msgstr "Todos los periféricos I2C están siendo usados"
@ -247,7 +246,9 @@ msgstr "Todos los canales de eventos estan siendo usados"
#: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "All sync event channels in use" msgid "All sync event channels in use"
msgstr "Todos los canales de eventos de sincronización (sync event channels) están siendo utilizados" msgstr ""
"Todos los canales de eventos de sincronización (sync event channels) están "
"siendo utilizados"
#: shared-bindings/pulseio/PWMOut.c #: shared-bindings/pulseio/PWMOut.c
msgid "All timers for this pin are in use" msgid "All timers for this pin are in use"
@ -287,7 +288,9 @@ msgstr "Valores del array deben ser bytes individuales."
#: supervisor/shared/safe_mode.c #: supervisor/shared/safe_mode.c
msgid "Attempted heap allocation when MicroPython VM not running.\n" msgid "Attempted heap allocation when MicroPython VM not running.\n"
msgstr "Intento de allocation de heap cuando la VM de MicroPython no estaba corriendo.\n" msgstr ""
"Intento de allocation de heap cuando la VM de MicroPython no estaba "
"corriendo.\n"
#: main.c #: main.c
msgid "Auto-reload is off.\n" msgid "Auto-reload is off.\n"
@ -297,7 +300,9 @@ msgstr "Auto-recarga deshabilitada.\n"
msgid "" msgid ""
"Auto-reload is on. Simply save files over USB to run them or enter REPL to " "Auto-reload is on. Simply save files over USB to run them or enter REPL to "
"disable.\n" "disable.\n"
msgstr "Auto-reload habilitado. Simplemente guarda los archivos via USB para ejecutarlos o entra al REPL para desabilitarlos.\n" msgstr ""
"Auto-reload habilitado. Simplemente guarda los archivos via USB para "
"ejecutarlos o entra al REPL para desabilitarlos.\n"
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
msgid "Bit clock and word select must share a clock unit" msgid "Bit clock and word select must share a clock unit"
@ -311,6 +316,10 @@ msgstr "Bits depth debe ser múltiplo de 8."
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Ambos pines deben soportar interrupciones por hardware" msgstr "Ambos pines deben soportar interrupciones por hardware"
#: shared-bindings/displayio/Display.c
msgid "Brightness must be 0-1.0"
msgstr ""
#: shared-bindings/supervisor/__init__.c #: shared-bindings/supervisor/__init__.c
msgid "Brightness must be between 0 and 255" msgid "Brightness must be between 0 and 255"
msgstr "El brillo debe estar entro 0 y 255" msgstr "El brillo debe estar entro 0 y 255"
@ -351,21 +360,9 @@ msgstr ""
msgid "Can not use dotstar with %s" msgid "Can not use dotstar with %s"
msgstr "No se puede usar dotstar con %s" msgstr "No se puede usar dotstar con %s"
#: shared-bindings/bleio/Device.c #: ports/nrf/common-hal/bleio/Characteristic.c
msgid "Can't add services in Central mode" msgid "Can't set CCCD for local Characteristic"
msgstr "No se pueden agregar servicio en modo Central" msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't advertise in Central mode"
msgstr "No puede anunciarse en Central mode"
#: shared-bindings/bleio/Device.c
msgid "Can't change the name in Central mode"
msgstr "No se puede cambiar el nombre en modo Central"
#: shared-bindings/bleio/Device.c
msgid "Can't connect in Peripheral mode"
msgstr "No se puede conectar en modo Peripheral"
#: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c #: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c
msgid "Cannot delete values" msgid "Cannot delete values"
@ -448,10 +445,22 @@ msgstr "Clock unit está siendo utilizado"
msgid "Column entry must be digitalio.DigitalInOut" msgid "Column entry must be digitalio.DigitalInOut"
msgstr "Entrada de columna debe ser digitalio.DigitalInOut" msgstr "Entrada de columna debe ser digitalio.DigitalInOut"
#: shared-bindings/displayio/I2CDisplay.c
msgid "Command must be 0-255"
msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
msgid "Command must be an int between 0 and 255" msgid "Command must be an int between 0 and 255"
msgstr "Command debe estar entre 0 y 255." msgstr "Command debe estar entre 0 y 255."
#: py/persistentcode.c
msgid "Corrupt .mpy file"
msgstr ""
#: py/emitglue.c
msgid "Corrupt raw code"
msgstr ""
#: ports/nrf/common-hal/bleio/UUID.c #: ports/nrf/common-hal/bleio/UUID.c
#, c-format #, c-format
msgid "Could not decode ble_uuid, err 0x%04x" msgid "Could not decode ble_uuid, err 0x%04x"
@ -486,15 +495,10 @@ msgstr "El pin Data 0 debe estar alineado a bytes"
msgid "Data chunk must follow fmt chunk" msgid "Data chunk must follow fmt chunk"
msgstr "Trozo de datos debe seguir fmt chunk" msgstr "Trozo de datos debe seguir fmt chunk"
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Data too large for advertisement packet" msgid "Data too large for advertisement packet"
msgstr "Data es muy grande para el paquete de advertisement." msgstr "Data es muy grande para el paquete de advertisement."
#: ports/nrf/common-hal/bleio/Device.c
msgid "Data too large for the advertisement packet"
msgstr "Data es muy grande para el paquete de advertisement."
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Destination capacity is smaller than destination_length." msgid "Destination capacity is smaller than destination_length."
msgstr "Capacidad de destino es mas pequeña que destination_length." msgstr "Capacidad de destino es mas pequeña que destination_length."
@ -532,6 +536,10 @@ msgstr "Se esperaba una Característica."
msgid "Expected a UUID" msgid "Expected a UUID"
msgstr "Se esperaba un UUID" msgstr "Se esperaba un UUID"
#: shared-bindings/bleio/Central.c
msgid "Expected an Address"
msgstr ""
#: shared-module/_pixelbuf/PixelBuf.c #: shared-module/_pixelbuf/PixelBuf.c
#, c-format #, c-format
msgid "Expected tuple of length %d, got %d" msgid "Expected tuple of length %d, got %d"
@ -541,24 +549,16 @@ msgstr "Se esperaba un tuple de %d, se obtuvo %d"
msgid "Failed sending command." msgid "Failed sending command."
msgstr "Fallo enviando comando" msgstr "Fallo enviando comando"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
msgid "Failed to acquire mutex" #, fuzzy, c-format
msgstr "Fallo al adquirir el mutex"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, c-format
msgid "Failed to acquire mutex, err 0x%04x" msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Fallo al adquirir el mutex, err: 0x%08lX" msgstr "No se puede adquirir el mutex, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Service.c #: ports/nrf/common-hal/bleio/Service.c
#, c-format #, fuzzy, c-format
msgid "Failed to add characteristic, err 0x%04x" msgid "Failed to add characteristic, err 0x%04x"
msgstr "Fallo al añadir caracteristica, err: 0x%08lX" msgstr "Fallo al añadir caracteristica, err: 0x%08lX"
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to add service"
msgstr "Fallo al agregar servicio"
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to add service, err 0x%04x" msgid "Failed to add service, err 0x%04x"
@ -578,24 +578,22 @@ msgstr "Falló la asignación del buffer RX de %d bytes"
msgid "Failed to change softdevice state" msgid "Failed to change softdevice state"
msgstr "No se puede cambiar el estado del softdevice" msgstr "No se puede cambiar el estado del softdevice"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Failed to connect:" #, c-format
msgstr "No se puede conectar:" msgid "Failed to configure advertising, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to continue scanning" msgid "Failed to connect: timeout"
msgstr "No se puede iniciar el escaneo." msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, c-format #, c-format
msgid "Failed to continue scanning, err 0x%04x" msgid "Failed to continue scanning, err 0x%04x"
msgstr "No se puede iniciar el escaneo. err: 0x%02x" msgstr "No se puede iniciar el escaneo. err: 0x%02x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to create mutex" #, fuzzy
msgstr "Fallo al crear mutex"
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to discover services" msgid "Failed to discover services"
msgstr "No se puede descubrir servicios" msgstr "No se puede descubrir servicios"
@ -632,44 +630,41 @@ msgstr "No se puede escribir el valor del atributo. status: 0x%02x"
msgid "Failed to register Vendor-Specific UUID, err 0x%04x" msgid "Failed to register Vendor-Specific UUID, err 0x%04x"
msgstr "Fallo al registrar el Vendor-Specific UUID, err 0x%04x" msgstr "Fallo al registrar el Vendor-Specific UUID, err 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
msgid "Failed to release mutex"
msgstr "No se puede liberar el mutex, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, c-format #, c-format
msgid "Failed to release mutex, err 0x%04x" msgid "Failed to release mutex, err 0x%04x"
msgstr "No se puede liberar el mutex, err 0x%04x" msgstr "No se puede liberar el mutex, err 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Failed to start advertising" #, c-format
msgstr "No se puede inicar el anuncio" msgid "Failed to set device name, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to start advertising, err 0x%04x" msgid "Failed to start advertising, err 0x%04x"
msgstr "No se puede inicar el anuncio. err: 0x%04x" msgstr "No se puede inicar el anuncio. err: 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to start scanning" #, c-format
msgstr "No se puede iniciar el escaneo" msgid "Failed to start connecting, error 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, c-format #, c-format
msgid "Failed to start scanning, err 0x%04x" msgid "Failed to start scanning, err 0x%04x"
msgstr "No se puede iniciar el escaneo. err 0x%04x" msgstr "No se puede iniciar el escaneo. err 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to stop advertising"
msgstr "No se puede detener el anuncio"
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to stop advertising, err 0x%04x" msgid "Failed to stop advertising, err 0x%04x"
msgstr "No se puede detener el anuncio. err: 0x%04x" msgstr "No se puede detener el anuncio. err: 0x%04x"
#: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format
msgid "Failed to write CCCD, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c #: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format #, c-format
msgid "Failed to write attribute value, err 0x%04x" msgid "Failed to write attribute value, err 0x%04x"
@ -727,7 +722,9 @@ msgstr "operación I2C no soportada"
msgid "" msgid ""
"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" "Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/"
"mpy-update for more info." "mpy-update for more info."
msgstr "Archivo .mpy incompatible. Actualice todos los archivos .mpy. Consulte http://adafru.it/mpy-update para más información" msgstr ""
"Archivo .mpy incompatible. Actualice todos los archivos .mpy. Consulte "
"http://adafru.it/mpy-update para más información"
#: shared-bindings/_pew/PewPew.c #: shared-bindings/_pew/PewPew.c
msgid "Incorrect buffer size" msgid "Incorrect buffer size"
@ -889,6 +886,10 @@ msgstr "Micrófono demora de inicio debe estar en el rango 0.0 a 1.0"
msgid "Must be a %q subclass." msgid "Must be a %q subclass."
msgstr "Debe de ser una subclase de %q" msgstr "Debe de ser una subclase de %q"
#: ports/nrf/common-hal/bleio/Characteristic.c
msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c #: ports/atmel-samd/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip" msgid "No DAC on chip"
msgstr "El chip no tiene DAC" msgstr "El chip no tiene DAC"
@ -939,6 +940,7 @@ msgstr "No queda espacio en el dispositivo"
msgid "No such file/directory" msgid "No such file/directory"
msgstr "No existe el archivo/directorio" msgstr "No existe el archivo/directorio"
#: ports/nrf/common-hal/bleio/Characteristic.c
#: shared-bindings/bleio/CharacteristicBuffer.c #: shared-bindings/bleio/CharacteristicBuffer.c
msgid "Not connected" msgid "Not connected"
msgstr "No conectado" msgstr "No conectado"
@ -951,7 +953,8 @@ msgstr "No reproduciendo"
msgid "" msgid ""
"Object has been deinitialized and can no longer be used. Create a new object." "Object has been deinitialized and can no longer be used. Create a new object."
msgstr "" msgstr ""
"El objeto se ha desinicializado y ya no se puede utilizar. Crea un nuevo objeto" "El objeto se ha desinicializado y ya no se puede utilizar. Crea un nuevo "
"objeto"
#: ports/nrf/common-hal/busio/UART.c #: ports/nrf/common-hal/busio/UART.c
msgid "Odd parity is not supported" msgid "Odd parity is not supported"
@ -1193,7 +1196,8 @@ msgstr "Para salir, por favor reinicia la tarjeta sin "
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "Demasiados canales en sample." msgstr "Demasiados canales en sample."
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
#: shared-bindings/displayio/ParallelBus.c
msgid "Too many display busses" msgid "Too many display busses"
msgstr "Demasiados buses de pantalla" msgstr "Demasiados buses de pantalla"
@ -1218,8 +1222,8 @@ msgid "USB Error"
msgstr "Error USB" msgstr "Error USB"
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID integer value not in range 0 to 0xffff" msgid "UUID integer value must be 0-0xffff"
msgstr "UUID integer valor no es en el distancia de 0 a 0xffff" msgstr ""
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
@ -1234,6 +1238,11 @@ msgstr "UUID valor no es un str, int o byte buffer"
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "No se pudieron asignar buffers para la conversión con signo" msgstr "No se pudieron asignar buffers para la conversión con signo"
#: shared-module/displayio/I2CDisplay.c
#, c-format
msgid "Unable to find I2C Display at %x"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Unable to find free GCLK" msgid "Unable to find free GCLK"
@ -1362,8 +1371,8 @@ msgstr "argumento es una secuencia vacía"
msgid "argument has wrong type" msgid "argument has wrong type"
msgstr "el argumento tiene un tipo erroneo" msgstr "el argumento tiene un tipo erroneo"
#: py/argcheck.c shared-bindings/digitalio/DigitalInOut.c #: py/argcheck.c shared-bindings/_stage/__init__.c
#: shared-bindings/gamepad/GamePad.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c
msgid "argument num/types mismatch" msgid "argument num/types mismatch"
msgstr "argumento número/tipos no coinciden" msgstr "argumento número/tipos no coinciden"
@ -1922,9 +1931,10 @@ msgstr "int() arg 2 debe ser >= 2 y <= 36"
msgid "integer required" msgid "integer required"
msgstr "Entero requerido" msgstr "Entero requerido"
#: ports/nrf/common-hal/bleio/Broadcaster.c #: shared-bindings/bleio/Peripheral.c shared-bindings/bleio/Scanner.c
msgid "interval not in range 0.0020 to 10.24" #, c-format
msgstr "interval no estan en el rango 0.0020 a 10.24" msgid "interval must be in range %s-%s"
msgstr ""
#: extmod/machine_i2c.c #: extmod/machine_i2c.c
msgid "invalid I2C peripheral" msgid "invalid I2C peripheral"
@ -2140,6 +2150,14 @@ msgstr "ningún módulo se llama '%q'"
msgid "no such attribute" msgid "no such attribute"
msgstr "no hay tal atributo" msgstr "no hay tal atributo"
#: shared-bindings/bleio/Peripheral.c
msgid "non-Service found in services"
msgstr ""
#: ports/nrf/common-hal/bleio/Central.c
msgid "non-UUID found in service_uuids"
msgstr ""
#: py/compile.c #: py/compile.c
msgid "non-default argument follows default argument" msgid "non-default argument follows default argument"
msgstr "argumento no predeterminado sigue argumento predeterminado" msgstr "argumento no predeterminado sigue argumento predeterminado"
@ -2355,10 +2373,6 @@ msgstr ""
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "script de compilación no soportado" msgstr "script de compilación no soportado"
#: shared-bindings/bleio/Peripheral.c
msgid "services includes an object that is not a Service"
msgstr "services incluye un objeto que no es Servicio"
#: py/objstr.c #: py/objstr.c
msgid "sign not allowed in string format specifier" msgid "sign not allowed in string format specifier"
msgstr "signo no permitido en el espeficador de string format" msgstr "signo no permitido en el espeficador de string format"
@ -2626,6 +2640,10 @@ msgstr ""
msgid "value_count must be > 0" msgid "value_count must be > 0"
msgstr "" msgstr ""
#: shared-bindings/bleio/Scanner.c
msgid "window must be <= interval"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c #: shared-bindings/_pixelbuf/PixelBuf.c
msgid "write_args must be a list, tuple, or None" msgid "write_args must be a list, tuple, or None"
msgstr "" msgstr ""
@ -2659,6 +2677,21 @@ msgstr "paso cero"
#~ msgid "AP required" #~ msgid "AP required"
#~ msgstr "AP requerido" #~ msgstr "AP requerido"
#~ msgid "Address is not %d bytes long or is in wrong format"
#~ msgstr "Direción no es %d bytes largo o esta en el formato incorrecto"
#~ msgid "Can't add services in Central mode"
#~ msgstr "No se pueden agregar servicio en modo Central"
#~ msgid "Can't advertise in Central mode"
#~ msgstr "No se puede anunciar en modo Central"
#~ msgid "Can't change the name in Central mode"
#~ msgstr "No se puede cambiar el nombre en modo Central"
#~ msgid "Can't connect in Peripheral mode"
#~ msgstr "No se puede conectar en modo Peripheral"
#~ msgid "Cannot connect to AP" #~ msgid "Cannot connect to AP"
#~ msgstr "No se puede conectar a AP" #~ msgstr "No se puede conectar a AP"
@ -2671,6 +2704,10 @@ msgstr "paso cero"
#~ msgid "Cannot update i/f status" #~ msgid "Cannot update i/f status"
#~ msgstr "No se puede actualizar i/f status" #~ msgstr "No se puede actualizar i/f status"
#, fuzzy
#~ msgid "Data too large for the advertisement packet"
#~ msgstr "Los datos no caben en el paquete de anuncio."
#~ msgid "Don't know how to pass object to native function" #~ msgid "Don't know how to pass object to native function"
#~ msgstr "No se sabe cómo pasar objeto a función nativa" #~ msgstr "No se sabe cómo pasar objeto a función nativa"
@ -2683,6 +2720,26 @@ msgstr "paso cero"
#~ msgid "Error in ffi_prep_cif" #~ msgid "Error in ffi_prep_cif"
#~ msgstr "Error en ffi_prep_cif" #~ msgstr "Error en ffi_prep_cif"
#, fuzzy
#~ msgid "Failed to acquire mutex"
#~ msgstr "No se puede adquirir el mutex, status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to add service"
#~ msgstr "No se puede detener el anuncio. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to connect:"
#~ msgstr "No se puede conectar. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to continue scanning"
#~ msgstr "No se puede iniciar el escaneo. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to create mutex"
#~ msgstr "No se puede leer el valor del atributo. status 0x%02x"
#, fuzzy #, fuzzy
#~ msgid "Failed to notify or indicate attribute value, err %0x04x" #~ msgid "Failed to notify or indicate attribute value, err %0x04x"
#~ msgstr "No se puede notificar el valor del anuncio. status: 0x%02x" #~ msgstr "No se puede notificar el valor del anuncio. status: 0x%02x"
@ -2691,6 +2748,22 @@ msgstr "paso cero"
#~ msgid "Failed to read attribute value, err %0x04x" #~ msgid "Failed to read attribute value, err %0x04x"
#~ msgstr "No se puede leer el valor del atributo. status 0x%02x" #~ msgstr "No se puede leer el valor del atributo. status 0x%02x"
#, fuzzy
#~ msgid "Failed to release mutex"
#~ msgstr "No se puede liberar el mutex, status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to start advertising"
#~ msgstr "No se puede inicar el anuncio. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to start scanning"
#~ msgstr "No se puede iniciar el escaneo. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to stop advertising"
#~ msgstr "No se puede detener el anuncio. status: 0x%02x"
#~ msgid "Function requires lock." #~ msgid "Function requires lock."
#~ msgstr "La función requiere lock" #~ msgstr "La función requiere lock"
@ -2764,6 +2837,9 @@ msgstr "paso cero"
#~ msgid "UART(1) can't read" #~ msgid "UART(1) can't read"
#~ msgstr "UART(1) no puede leer" #~ msgstr "UART(1) no puede leer"
#~ msgid "UUID integer value not in range 0 to 0xffff"
#~ msgstr "El valor integer UUID no está en el rango 0 a 0xffff"
#~ msgid "Unable to remount filesystem" #~ msgid "Unable to remount filesystem"
#~ msgstr "Incapaz de montar de nuevo el sistema de archivos" #~ msgstr "Incapaz de montar de nuevo el sistema de archivos"
@ -2813,6 +2889,9 @@ msgstr "paso cero"
#~ msgid "impossible baudrate" #~ msgid "impossible baudrate"
#~ msgstr "baudrate imposible" #~ msgstr "baudrate imposible"
#~ msgid "interval not in range 0.0020 to 10.24"
#~ msgstr "El intervalo está fuera del rango de 0.0020 a 10.24"
#~ msgid "invalid alarm" #~ msgid "invalid alarm"
#~ msgstr "alarma inválida" #~ msgstr "alarma inválida"
@ -2850,6 +2929,9 @@ msgstr "paso cero"
#~ msgid "scan failed" #~ msgid "scan failed"
#~ msgstr "scan ha fallado" #~ msgstr "scan ha fallado"
#~ msgid "services includes an object that is not a Service"
#~ msgstr "services incluye un objeto que no es servicio"
#~ msgid "too many arguments" #~ msgid "too many arguments"
#~ msgstr "muchos argumentos" #~ msgstr "muchos argumentos"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-11 14:59-0700\n" "POT-Creation-Date: 2019-07-19 16:10-0700\n"
"PO-Revision-Date: 2018-12-20 22:15-0800\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n"
"Last-Translator: Timothy <me@timothygarcia.ca>\n" "Last-Translator: Timothy <me@timothygarcia.ca>\n"
"Language-Team: fil\n" "Language-Team: fil\n"
@ -220,16 +220,15 @@ msgstr "3-arg pow() hindi suportado"
msgid "A hardware interrupt channel is already in use" msgid "A hardware interrupt channel is already in use"
msgstr "Isang channel ng hardware interrupt ay ginagamit na" msgstr "Isang channel ng hardware interrupt ay ginagamit na"
#: shared-bindings/bleio/Address.c
#, c-format
msgid "Address is not %d bytes long or is in wrong format"
msgstr ""
#: shared-bindings/bleio/Address.c #: shared-bindings/bleio/Address.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Address must be %d bytes long" msgid "Address must be %d bytes long"
msgstr "ang palette ay dapat 32 bytes ang haba" msgstr "ang palette ay dapat 32 bytes ang haba"
#: shared-bindings/bleio/Address.c
msgid "Address type out of range"
msgstr ""
#: ports/nrf/common-hal/busio/I2C.c #: ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use" msgid "All I2C peripherals are in use"
msgstr "Lahat ng I2C peripherals ginagamit" msgstr "Lahat ng I2C peripherals ginagamit"
@ -315,6 +314,10 @@ msgstr "Bit depth ay dapat multiple ng 8."
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Ang parehong mga pin ay dapat na sumusuporta sa hardware interrupts" msgstr "Ang parehong mga pin ay dapat na sumusuporta sa hardware interrupts"
#: shared-bindings/displayio/Display.c
msgid "Brightness must be 0-1.0"
msgstr ""
#: shared-bindings/supervisor/__init__.c #: shared-bindings/supervisor/__init__.c
msgid "Brightness must be between 0 and 255" msgid "Brightness must be between 0 and 255"
msgstr "Ang liwanag ay dapat sa gitna ng 0 o 255" msgstr "Ang liwanag ay dapat sa gitna ng 0 o 255"
@ -356,21 +359,9 @@ msgstr ""
msgid "Can not use dotstar with %s" msgid "Can not use dotstar with %s"
msgstr "" msgstr ""
#: shared-bindings/bleio/Device.c #: ports/nrf/common-hal/bleio/Characteristic.c
msgid "Can't add services in Central mode" msgid "Can't set CCCD for local Characteristic"
msgstr "Hindi maarang maglagay ng service sa Central mode" msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't advertise in Central mode"
msgstr "Hindi ma advertise habang nasa Central mode"
#: shared-bindings/bleio/Device.c
msgid "Can't change the name in Central mode"
msgstr "Hindi mapalitan ang pangalan sa Central mode"
#: shared-bindings/bleio/Device.c
msgid "Can't connect in Peripheral mode"
msgstr "Hindi maconnect sa Peripheral mode"
#: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c #: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c
msgid "Cannot delete values" msgid "Cannot delete values"
@ -454,11 +445,23 @@ msgstr "Clock unit ginagamit"
msgid "Column entry must be digitalio.DigitalInOut" msgid "Column entry must be digitalio.DigitalInOut"
msgstr "" msgstr ""
#: shared-bindings/displayio/I2CDisplay.c
msgid "Command must be 0-255"
msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
#, fuzzy #, fuzzy
msgid "Command must be an int between 0 and 255" msgid "Command must be an int between 0 and 255"
msgstr "Sa gitna ng 0 o 255 dapat ang bytes." msgstr "Sa gitna ng 0 o 255 dapat ang bytes."
#: py/persistentcode.c
msgid "Corrupt .mpy file"
msgstr ""
#: py/emitglue.c
msgid "Corrupt raw code"
msgstr ""
#: ports/nrf/common-hal/bleio/UUID.c #: ports/nrf/common-hal/bleio/UUID.c
#, c-format #, c-format
msgid "Could not decode ble_uuid, err 0x%04x" msgid "Could not decode ble_uuid, err 0x%04x"
@ -494,17 +497,11 @@ msgstr "graphic ay dapat 2048 bytes ang haba"
msgid "Data chunk must follow fmt chunk" msgid "Data chunk must follow fmt chunk"
msgstr "Dapat sunurin ng Data chunk ang fmt chunk" msgstr "Dapat sunurin ng Data chunk ang fmt chunk"
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy #, fuzzy
msgid "Data too large for advertisement packet" msgid "Data too large for advertisement packet"
msgstr "Hindi makasya ang data sa loob ng advertisement packet" msgstr "Hindi makasya ang data sa loob ng advertisement packet"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Data too large for the advertisement packet"
msgstr "Hindi makasya ang data sa loob ng advertisement packet"
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Destination capacity is smaller than destination_length." msgid "Destination capacity is smaller than destination_length."
msgstr "" msgstr ""
@ -545,6 +542,10 @@ msgstr "Hindi mabasa and Characteristic."
msgid "Expected a UUID" msgid "Expected a UUID"
msgstr "Umasa ng %q" msgstr "Umasa ng %q"
#: shared-bindings/bleio/Central.c
msgid "Expected an Address"
msgstr ""
#: shared-module/_pixelbuf/PixelBuf.c #: shared-module/_pixelbuf/PixelBuf.c
#, c-format #, c-format
msgid "Expected tuple of length %d, got %d" msgid "Expected tuple of length %d, got %d"
@ -554,12 +555,7 @@ msgstr ""
msgid "Failed sending command." msgid "Failed sending command."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
#, fuzzy
msgid "Failed to acquire mutex"
msgstr "Nabigo sa pag kuha ng mutex, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to acquire mutex, err 0x%04x" msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Nabigo sa pag kuha ng mutex, status: 0x%08lX" msgstr "Nabigo sa pag kuha ng mutex, status: 0x%08lX"
@ -569,11 +565,6 @@ msgstr "Nabigo sa pag kuha ng mutex, status: 0x%08lX"
msgid "Failed to add characteristic, err 0x%04x" msgid "Failed to add characteristic, err 0x%04x"
msgstr "Nabigo sa paglagay ng characteristic, status: 0x%08lX" msgstr "Nabigo sa paglagay ng characteristic, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Failed to add service"
msgstr "Hindi matagumpay ang paglagay ng service, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to add service, err 0x%04x" msgid "Failed to add service, err 0x%04x"
@ -594,27 +585,21 @@ msgstr "Nabigong ilaan ang RX buffer ng %d bytes"
msgid "Failed to change softdevice state" msgid "Failed to change softdevice state"
msgstr "Nabigo sa pagbago ng softdevice state, error: 0x%08lX" msgstr "Nabigo sa pagbago ng softdevice state, error: 0x%08lX"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy #, c-format
msgid "Failed to connect:" msgid "Failed to configure advertising, err 0x%04x"
msgstr "Hindi makaconnect, status: 0x%08lX" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
#, fuzzy msgid "Failed to connect: timeout"
msgid "Failed to continue scanning" msgstr ""
msgstr "Hindi maituloy ang pag scan, status: 0x%0xlX"
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to continue scanning, err 0x%04x" msgid "Failed to continue scanning, err 0x%04x"
msgstr "Hindi maituloy ang pag scan, status: 0x%0xlX" msgstr "Hindi maituloy ang pag scan, status: 0x%0xlX"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
#, fuzzy
msgid "Failed to create mutex"
msgstr "Hindi matagumpay ang pagbuo ng mutex, status: 0x%0xlX"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy #, fuzzy
msgid "Failed to discover services" msgid "Failed to discover services"
msgstr "Nabigo sa pagdiscover ng services, status: 0x%08lX" msgstr "Nabigo sa pagdiscover ng services, status: 0x%08lX"
@ -654,48 +639,41 @@ msgstr "Hindi maisulat ang gatts value, status: 0x%08lX"
msgid "Failed to register Vendor-Specific UUID, err 0x%04x" msgid "Failed to register Vendor-Specific UUID, err 0x%04x"
msgstr "Hindi matagumpay ang paglagay ng Vender Specific UUID, status: 0x%08lX" msgstr "Hindi matagumpay ang paglagay ng Vender Specific UUID, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
#, fuzzy
msgid "Failed to release mutex"
msgstr "Nabigo sa pagrelease ng mutex, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to release mutex, err 0x%04x" msgid "Failed to release mutex, err 0x%04x"
msgstr "Nabigo sa pagrelease ng mutex, status: 0x%08lX" msgstr "Nabigo sa pagrelease ng mutex, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy #, c-format
msgid "Failed to start advertising" msgid "Failed to set device name, err 0x%04x"
msgstr "Hindi masimulaan ang advertisement, status: 0x%08lX" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to start advertising, err 0x%04x" msgid "Failed to start advertising, err 0x%04x"
msgstr "Hindi masimulaan ang advertisement, status: 0x%08lX" msgstr "Hindi masimulaan ang advertisement, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
#, fuzzy #, c-format
msgid "Failed to start scanning" msgid "Failed to start connecting, error 0x%04x"
msgstr "Hindi masimulaan mag i-scan, status: 0x%0xlX" msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to start scanning, err 0x%04x" msgid "Failed to start scanning, err 0x%04x"
msgstr "Hindi masimulaan mag i-scan, status: 0x%0xlX" msgstr "Hindi masimulaan mag i-scan, status: 0x%0xlX"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Failed to stop advertising"
msgstr "Hindi mahinto ang advertisement, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to stop advertising, err 0x%04x" msgid "Failed to stop advertising, err 0x%04x"
msgstr "Hindi mahinto ang advertisement, status: 0x%08lX" msgstr "Hindi mahinto ang advertisement, status: 0x%08lX"
#: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format
msgid "Failed to write CCCD, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c #: ports/nrf/common-hal/bleio/Characteristic.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to write attribute value, err 0x%04x" msgid "Failed to write attribute value, err 0x%04x"
@ -917,6 +895,10 @@ msgstr "Ang delay ng startup ng mikropono ay dapat na nasa 0.0 hanggang 1.0"
msgid "Must be a %q subclass." msgid "Must be a %q subclass."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c #: ports/atmel-samd/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip" msgid "No DAC on chip"
msgstr "Walang DAC sa chip" msgstr "Walang DAC sa chip"
@ -967,6 +949,7 @@ msgstr ""
msgid "No such file/directory" msgid "No such file/directory"
msgstr "Walang file/directory" msgstr "Walang file/directory"
#: ports/nrf/common-hal/bleio/Characteristic.c
#: shared-bindings/bleio/CharacteristicBuffer.c #: shared-bindings/bleio/CharacteristicBuffer.c
#, fuzzy #, fuzzy
msgid "Not connected" msgid "Not connected"
@ -1216,7 +1199,8 @@ msgstr "Para lumabas, paki-reset ang board na wala ang "
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "Sobra ang channels sa sample." msgstr "Sobra ang channels sa sample."
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
#: shared-bindings/displayio/ParallelBus.c
msgid "Too many display busses" msgid "Too many display busses"
msgstr "" msgstr ""
@ -1241,7 +1225,7 @@ msgid "USB Error"
msgstr "May pagkakamali ang USB" msgstr "May pagkakamali ang USB"
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID integer value not in range 0 to 0xffff" msgid "UUID integer value must be 0-0xffff"
msgstr "" msgstr ""
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
@ -1257,6 +1241,11 @@ msgstr ""
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "Hindi ma-allocate ang buffers para sa naka-sign na conversion" msgstr "Hindi ma-allocate ang buffers para sa naka-sign na conversion"
#: shared-module/displayio/I2CDisplay.c
#, c-format
msgid "Unable to find I2C Display at %x"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Unable to find free GCLK" msgid "Unable to find free GCLK"
@ -1952,8 +1941,9 @@ msgstr "int() arg 2 ay dapat >=2 at <= 36"
msgid "integer required" msgid "integer required"
msgstr "kailangan ng int" msgstr "kailangan ng int"
#: ports/nrf/common-hal/bleio/Broadcaster.c #: shared-bindings/bleio/Peripheral.c shared-bindings/bleio/Scanner.c
msgid "interval not in range 0.0020 to 10.24" #, c-format
msgid "interval must be in range %s-%s"
msgstr "" msgstr ""
#: extmod/machine_i2c.c #: extmod/machine_i2c.c
@ -2172,6 +2162,14 @@ msgstr "walang module na '%q'"
msgid "no such attribute" msgid "no such attribute"
msgstr "walang ganoon na attribute" msgstr "walang ganoon na attribute"
#: shared-bindings/bleio/Peripheral.c
msgid "non-Service found in services"
msgstr ""
#: ports/nrf/common-hal/bleio/Central.c
msgid "non-UUID found in service_uuids"
msgstr ""
#: py/compile.c #: py/compile.c
msgid "non-default argument follows default argument" msgid "non-default argument follows default argument"
msgstr "non-default argument sumusunod sa default argument" msgstr "non-default argument sumusunod sa default argument"
@ -2385,10 +2383,6 @@ msgstr "puno na ang schedule stack"
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "script kompilasyon hindi supportado" msgstr "script kompilasyon hindi supportado"
#: shared-bindings/bleio/Peripheral.c
msgid "services includes an object that is not a Service"
msgstr ""
#: py/objstr.c #: py/objstr.c
msgid "sign not allowed in string format specifier" msgid "sign not allowed in string format specifier"
msgstr "sign hindi maaring string format specifier" msgstr "sign hindi maaring string format specifier"
@ -2657,6 +2651,10 @@ msgstr ""
msgid "value_count must be > 0" msgid "value_count must be > 0"
msgstr "" msgstr ""
#: shared-bindings/bleio/Scanner.c
msgid "window must be <= interval"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c #: shared-bindings/_pixelbuf/PixelBuf.c
msgid "write_args must be a list, tuple, or None" msgid "write_args must be a list, tuple, or None"
msgstr "" msgstr ""
@ -2693,6 +2691,18 @@ msgstr "zero step"
#~ msgid "C-level assert" #~ msgid "C-level assert"
#~ msgstr "C-level assert" #~ msgstr "C-level assert"
#~ msgid "Can't add services in Central mode"
#~ msgstr "Hindi maarang maglagay ng service sa Central mode"
#~ msgid "Can't advertise in Central mode"
#~ msgstr "Hindi ma advertise habang nasa Central mode"
#~ msgid "Can't change the name in Central mode"
#~ msgstr "Hindi mapalitan ang pangalan sa Central mode"
#~ msgid "Can't connect in Peripheral mode"
#~ msgstr "Hindi maconnect sa Peripheral mode"
#~ msgid "Cannot connect to AP" #~ msgid "Cannot connect to AP"
#~ msgstr "Hindi maka connect sa AP" #~ msgstr "Hindi maka connect sa AP"
@ -2705,6 +2715,10 @@ msgstr "zero step"
#~ msgid "Cannot update i/f status" #~ msgid "Cannot update i/f status"
#~ msgstr "Hindi ma-update i/f status" #~ msgstr "Hindi ma-update i/f status"
#, fuzzy
#~ msgid "Data too large for the advertisement packet"
#~ msgstr "Hindi makasya ang data sa loob ng advertisement packet"
#~ msgid "Don't know how to pass object to native function" #~ msgid "Don't know how to pass object to native function"
#~ msgstr "Hindi alam ipasa ang object sa native function" #~ msgstr "Hindi alam ipasa ang object sa native function"
@ -2717,6 +2731,26 @@ msgstr "zero step"
#~ msgid "Error in ffi_prep_cif" #~ msgid "Error in ffi_prep_cif"
#~ msgstr "Pagkakamali sa ffi_prep_cif" #~ msgstr "Pagkakamali sa ffi_prep_cif"
#, fuzzy
#~ msgid "Failed to acquire mutex"
#~ msgstr "Nabigo sa pag kuha ng mutex, status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to add service"
#~ msgstr "Hindi matagumpay ang paglagay ng service, status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to connect:"
#~ msgstr "Hindi makaconnect, status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to continue scanning"
#~ msgstr "Hindi maituloy ang pag scan, status: 0x%0xlX"
#, fuzzy
#~ msgid "Failed to create mutex"
#~ msgstr "Hindi matagumpay ang pagbuo ng mutex, status: 0x%0xlX"
#, fuzzy #, fuzzy
#~ msgid "Failed to notify or indicate attribute value, err %0x04x" #~ msgid "Failed to notify or indicate attribute value, err %0x04x"
#~ msgstr "Hindi mabalitaan ang attribute value, status: 0x%08lX" #~ msgstr "Hindi mabalitaan ang attribute value, status: 0x%08lX"
@ -2725,6 +2759,22 @@ msgstr "zero step"
#~ msgid "Failed to read attribute value, err %0x04x" #~ msgid "Failed to read attribute value, err %0x04x"
#~ msgstr "Hindi mabasa ang value ng attribute, status: 0x%08lX" #~ msgstr "Hindi mabasa ang value ng attribute, status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to release mutex"
#~ msgstr "Nabigo sa pagrelease ng mutex, status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to start advertising"
#~ msgstr "Hindi masimulaan ang advertisement, status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to start scanning"
#~ msgstr "Hindi masimulaan mag i-scan, status: 0x%0xlX"
#, fuzzy
#~ msgid "Failed to stop advertising"
#~ msgstr "Hindi mahinto ang advertisement, status: 0x%08lX"
#~ msgid "Function requires lock." #~ msgid "Function requires lock."
#~ msgstr "Kailangan ng lock ang function." #~ msgstr "Kailangan ng lock ang function."

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: 0.1\n" "Project-Id-Version: 0.1\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-11 14:59-0700\n" "POT-Creation-Date: 2019-07-19 16:10-0700\n"
"PO-Revision-Date: 2019-04-14 20:05+0100\n" "PO-Revision-Date: 2019-04-14 20:05+0100\n"
"Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n" "Last-Translator: Pierrick Couturier <arofarn@arofarn.info>\n"
"Language-Team: fr\n" "Language-Team: fr\n"
@ -221,16 +221,15 @@ msgstr "pow() non supporté avec 3 arguments"
msgid "A hardware interrupt channel is already in use" msgid "A hardware interrupt channel is already in use"
msgstr "Un canal d'interruptions matérielles est déjà utilisé" msgstr "Un canal d'interruptions matérielles est déjà utilisé"
#: shared-bindings/bleio/Address.c
#, c-format
msgid "Address is not %d bytes long or is in wrong format"
msgstr "L'adresse n'est pas longue de %d octets ou est d'un format erroné"
#: shared-bindings/bleio/Address.c #: shared-bindings/bleio/Address.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Address must be %d bytes long" msgid "Address must be %d bytes long"
msgstr "L'adresse doit être longue de %d octets" msgstr "L'adresse doit être longue de %d octets"
#: shared-bindings/bleio/Address.c
msgid "Address type out of range"
msgstr ""
#: ports/nrf/common-hal/busio/I2C.c #: ports/nrf/common-hal/busio/I2C.c
#, fuzzy #, fuzzy
msgid "All I2C peripherals are in use" msgid "All I2C peripherals are in use"
@ -320,6 +319,10 @@ msgstr "La profondeur de bit doit être un multiple de 8."
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Les deux entrées doivent supporter les interruptions matérielles" msgstr "Les deux entrées doivent supporter les interruptions matérielles"
#: shared-bindings/displayio/Display.c
msgid "Brightness must be 0-1.0"
msgstr ""
#: shared-bindings/supervisor/__init__.c #: shared-bindings/supervisor/__init__.c
msgid "Brightness must be between 0 and 255" msgid "Brightness must be between 0 and 255"
msgstr "La luminosité doit être entre 0 et 255" msgstr "La luminosité doit être entre 0 et 255"
@ -361,21 +364,9 @@ msgstr ""
msgid "Can not use dotstar with %s" msgid "Can not use dotstar with %s"
msgstr "Impossible d'utiliser 'dotstar' avec %s" msgstr "Impossible d'utiliser 'dotstar' avec %s"
#: shared-bindings/bleio/Device.c #: ports/nrf/common-hal/bleio/Characteristic.c
msgid "Can't add services in Central mode" msgid "Can't set CCCD for local Characteristic"
msgstr "Impossible d'ajouter des services en mode Central" msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't advertise in Central mode"
msgstr "Impossible de publier en mode Central"
#: shared-bindings/bleio/Device.c
msgid "Can't change the name in Central mode"
msgstr "Modification du nom impossible en mode Central"
#: shared-bindings/bleio/Device.c
msgid "Can't connect in Peripheral mode"
msgstr "Impossible de se connecter en mode 'Peripheral'"
#: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c #: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c
msgid "Cannot delete values" msgid "Cannot delete values"
@ -460,11 +451,23 @@ msgstr "Horloge en cours d'utilisation"
msgid "Column entry must be digitalio.DigitalInOut" msgid "Column entry must be digitalio.DigitalInOut"
msgstr "L'entrée 'Column' doit être un digitalio.DigitalInOut" msgstr "L'entrée 'Column' doit être un digitalio.DigitalInOut"
#: shared-bindings/displayio/I2CDisplay.c
msgid "Command must be 0-255"
msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
#, fuzzy #, fuzzy
msgid "Command must be an int between 0 and 255" msgid "Command must be an int between 0 and 255"
msgstr "La commande doit être un entier entre 0 et 255" msgstr "La commande doit être un entier entre 0 et 255"
#: py/persistentcode.c
msgid "Corrupt .mpy file"
msgstr ""
#: py/emitglue.c
msgid "Corrupt raw code"
msgstr ""
#: ports/nrf/common-hal/bleio/UUID.c #: ports/nrf/common-hal/bleio/UUID.c
#, c-format #, c-format
msgid "Could not decode ble_uuid, err 0x%04x" msgid "Could not decode ble_uuid, err 0x%04x"
@ -500,15 +503,10 @@ msgstr "La broche 'Data 0' doit être aligné sur l'octet"
msgid "Data chunk must follow fmt chunk" msgid "Data chunk must follow fmt chunk"
msgstr "Un bloc de données doit suivre un bloc de format" msgstr "Un bloc de données doit suivre un bloc de format"
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Data too large for advertisement packet" msgid "Data too large for advertisement packet"
msgstr "Données trop volumineuses pour un paquet de diffusion" msgstr "Données trop volumineuses pour un paquet de diffusion"
#: ports/nrf/common-hal/bleio/Device.c
msgid "Data too large for the advertisement packet"
msgstr "Données trop volumineuses pour le paquet de diffusion"
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Destination capacity is smaller than destination_length." msgid "Destination capacity is smaller than destination_length."
msgstr "La capacité de destination est plus petite que 'destination_length'." msgstr "La capacité de destination est plus petite que 'destination_length'."
@ -548,6 +546,10 @@ msgstr "Une 'Characteristic' est attendue"
msgid "Expected a UUID" msgid "Expected a UUID"
msgstr "Un UUID est attendu" msgstr "Un UUID est attendu"
#: shared-bindings/bleio/Central.c
msgid "Expected an Address"
msgstr ""
#: shared-module/_pixelbuf/PixelBuf.c #: shared-module/_pixelbuf/PixelBuf.c
#, c-format #, c-format
msgid "Expected tuple of length %d, got %d" msgid "Expected tuple of length %d, got %d"
@ -557,12 +559,7 @@ msgstr "Tuple de longueur %d attendu, obtenu %d"
msgid "Failed sending command." msgid "Failed sending command."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
#, fuzzy
msgid "Failed to acquire mutex"
msgstr "Echec de l'obtention de mutex"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to acquire mutex, err 0x%04x" msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Echec de l'obtention de mutex, err 0x%04x" msgstr "Echec de l'obtention de mutex, err 0x%04x"
@ -572,11 +569,6 @@ msgstr "Echec de l'obtention de mutex, err 0x%04x"
msgid "Failed to add characteristic, err 0x%04x" msgid "Failed to add characteristic, err 0x%04x"
msgstr "Echec de l'ajout de caractéristique, err 0x%04x" msgstr "Echec de l'ajout de caractéristique, err 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Failed to add service"
msgstr "Echec de l'ajout de service"
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to add service, err 0x%04x" msgid "Failed to add service, err 0x%04x"
@ -597,27 +589,21 @@ msgstr "Echec de l'allocation de %d octets du tampon RX"
msgid "Failed to change softdevice state" msgid "Failed to change softdevice state"
msgstr "Echec de la modification de l'état du périphérique" msgstr "Echec de la modification de l'état du périphérique"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy #, c-format
msgid "Failed to connect:" msgid "Failed to configure advertising, err 0x%04x"
msgstr "Echec de connection:" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
#, fuzzy msgid "Failed to connect: timeout"
msgid "Failed to continue scanning" msgstr ""
msgstr "Impossible de poursuivre le scan"
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to continue scanning, err 0x%04x" msgid "Failed to continue scanning, err 0x%04x"
msgstr "Impossible de poursuivre le scan, err 0x%04x" msgstr "Impossible de poursuivre le scan, err 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
#, fuzzy
msgid "Failed to create mutex"
msgstr "Echec de la création de mutex"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy #, fuzzy
msgid "Failed to discover services" msgid "Failed to discover services"
msgstr "Echec de la découverte de services" msgstr "Echec de la découverte de services"
@ -658,48 +644,41 @@ msgstr "Impossible de lire la valeur de 'gatts', err 0x%04x"
msgid "Failed to register Vendor-Specific UUID, err 0x%04x" msgid "Failed to register Vendor-Specific UUID, err 0x%04x"
msgstr "Echec de l'ajout de l'UUID du fournisseur, err 0x%04x" msgstr "Echec de l'ajout de l'UUID du fournisseur, err 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
#, fuzzy
msgid "Failed to release mutex"
msgstr "Impossible de libérer mutex"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to release mutex, err 0x%04x" msgid "Failed to release mutex, err 0x%04x"
msgstr "Impossible de libérer mutex, err 0x%04x" msgstr "Impossible de libérer mutex, err 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy #, c-format
msgid "Failed to start advertising" msgid "Failed to set device name, err 0x%04x"
msgstr "Echec du démarrage de la diffusion" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to start advertising, err 0x%04x" msgid "Failed to start advertising, err 0x%04x"
msgstr "Impossible de commencer à diffuser, err 0x%04x" msgstr "Impossible de commencer à diffuser, err 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
#, fuzzy #, c-format
msgid "Failed to start scanning" msgid "Failed to start connecting, error 0x%04x"
msgstr "Impossible de commencer à scanner" msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to start scanning, err 0x%04x" msgid "Failed to start scanning, err 0x%04x"
msgstr "Impossible de commencer à scanner, err 0x%04x" msgstr "Impossible de commencer à scanner, err 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Failed to stop advertising"
msgstr "Echec de l'arrêt de diffusion"
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to stop advertising, err 0x%04x" msgid "Failed to stop advertising, err 0x%04x"
msgstr "Echec de l'arrêt de diffusion, err 0x%04x" msgstr "Echec de l'arrêt de diffusion, err 0x%04x"
#: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format
msgid "Failed to write CCCD, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c #: ports/nrf/common-hal/bleio/Characteristic.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to write attribute value, err 0x%04x" msgid "Failed to write attribute value, err 0x%04x"
@ -925,6 +904,10 @@ msgstr "Le délais au démarrage du micro doit être entre 0.0 et 1.0"
msgid "Must be a %q subclass." msgid "Must be a %q subclass."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c #: ports/atmel-samd/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip" msgid "No DAC on chip"
msgstr "Pas de DAC sur la puce" msgstr "Pas de DAC sur la puce"
@ -975,6 +958,7 @@ msgstr "Il n'y a plus d'espace libre sur le périphérique"
msgid "No such file/directory" msgid "No such file/directory"
msgstr "Fichier/dossier introuvable" msgstr "Fichier/dossier introuvable"
#: ports/nrf/common-hal/bleio/Characteristic.c
#: shared-bindings/bleio/CharacteristicBuffer.c #: shared-bindings/bleio/CharacteristicBuffer.c
#, fuzzy #, fuzzy
msgid "Not connected" msgid "Not connected"
@ -1236,7 +1220,8 @@ msgstr "Pour quitter, redémarrez la carte SVP sans "
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "Trop de canaux dans l'échantillon." msgstr "Trop de canaux dans l'échantillon."
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
#: shared-bindings/displayio/ParallelBus.c
msgid "Too many display busses" msgid "Too many display busses"
msgstr "Trop de bus d'affichage" msgstr "Trop de bus d'affichage"
@ -1261,8 +1246,8 @@ msgid "USB Error"
msgstr "Erreur USB" msgstr "Erreur USB"
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID integer value not in range 0 to 0xffff" msgid "UUID integer value must be 0-0xffff"
msgstr "valeur de l'entier UUID est hors-bornes 0 à 0xffff" msgstr ""
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
@ -1280,6 +1265,11 @@ msgstr ""
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "Impossible d'allouer des tampons pour une conversion signée" msgstr "Impossible d'allouer des tampons pour une conversion signée"
#: shared-module/displayio/I2CDisplay.c
#, c-format
msgid "Unable to find I2C Display at %x"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Unable to find free GCLK" msgid "Unable to find free GCLK"
@ -1984,9 +1974,10 @@ msgstr "l'argument 2 de int() doit être >=2 et <=36"
msgid "integer required" msgid "integer required"
msgstr "entier requis" msgstr "entier requis"
#: ports/nrf/common-hal/bleio/Broadcaster.c #: shared-bindings/bleio/Peripheral.c shared-bindings/bleio/Scanner.c
msgid "interval not in range 0.0020 to 10.24" #, c-format
msgstr "intervalle hors bornes 0.0020 à 10.24" msgid "interval must be in range %s-%s"
msgstr ""
#: extmod/machine_i2c.c #: extmod/machine_i2c.c
msgid "invalid I2C peripheral" msgid "invalid I2C peripheral"
@ -2205,6 +2196,14 @@ msgstr "pas de module '%q'"
msgid "no such attribute" msgid "no such attribute"
msgstr "pas de tel attribut" msgstr "pas de tel attribut"
#: shared-bindings/bleio/Peripheral.c
msgid "non-Service found in services"
msgstr ""
#: ports/nrf/common-hal/bleio/Central.c
msgid "non-UUID found in service_uuids"
msgstr ""
#: py/compile.c #: py/compile.c
msgid "non-default argument follows default argument" msgid "non-default argument follows default argument"
msgstr "" msgstr ""
@ -2425,10 +2424,6 @@ msgstr "pile de planification pleine"
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "compilation de script non supportée" msgstr "compilation de script non supportée"
#: shared-bindings/bleio/Peripheral.c
msgid "services includes an object that is not a Service"
msgstr "'services' inclut un object qui n'est pas un 'Service'"
#: py/objstr.c #: py/objstr.c
msgid "sign not allowed in string format specifier" msgid "sign not allowed in string format specifier"
msgstr "signe non autorisé dans les spéc. de formats de chaînes de caractères" msgstr "signe non autorisé dans les spéc. de formats de chaînes de caractères"
@ -2699,6 +2694,10 @@ msgstr ""
msgid "value_count must be > 0" msgid "value_count must be > 0"
msgstr "'value_count' doit être > 0" msgstr "'value_count' doit être > 0"
#: shared-bindings/bleio/Scanner.c
msgid "window must be <= interval"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c #: shared-bindings/_pixelbuf/PixelBuf.c
msgid "write_args must be a list, tuple, or None" msgid "write_args must be a list, tuple, or None"
msgstr "'write_args' doit être une liste, un tuple ou 'None'" msgstr "'write_args' doit être une liste, un tuple ou 'None'"
@ -2733,6 +2732,21 @@ msgstr "'step' nul"
#~ msgid "AP required" #~ msgid "AP required"
#~ msgstr "'AP' requis" #~ msgstr "'AP' requis"
#~ msgid "Address is not %d bytes long or is in wrong format"
#~ msgstr "L'adresse n'est pas longue de %d octets ou est d'un format erroné"
#~ msgid "Can't add services in Central mode"
#~ msgstr "Impossible d'ajouter des services en mode Central"
#~ msgid "Can't advertise in Central mode"
#~ msgstr "Impossible de publier en mode Central"
#~ msgid "Can't change the name in Central mode"
#~ msgstr "Modification du nom impossible en mode Central"
#~ msgid "Can't connect in Peripheral mode"
#~ msgstr "Impossible de se connecter en mode 'Peripheral'"
#~ msgid "Cannot connect to AP" #~ msgid "Cannot connect to AP"
#~ msgstr "Impossible de se connecter à 'AP'" #~ msgstr "Impossible de se connecter à 'AP'"
@ -2745,6 +2759,9 @@ msgstr "'step' nul"
#~ msgid "Cannot update i/f status" #~ msgid "Cannot update i/f status"
#~ msgstr "le status i/f ne peut être mis à jour" #~ msgstr "le status i/f ne peut être mis à jour"
#~ msgid "Data too large for the advertisement packet"
#~ msgstr "Données trop volumineuses pour le paquet de diffusion"
#~ msgid "Don't know how to pass object to native function" #~ msgid "Don't know how to pass object to native function"
#~ msgstr "Ne sais pas comment passer l'objet à une fonction native" #~ msgstr "Ne sais pas comment passer l'objet à une fonction native"
@ -2757,6 +2774,26 @@ msgstr "'step' nul"
#~ msgid "Error in ffi_prep_cif" #~ msgid "Error in ffi_prep_cif"
#~ msgstr "Erreur dans ffi_prep_cif" #~ msgstr "Erreur dans ffi_prep_cif"
#, fuzzy
#~ msgid "Failed to acquire mutex"
#~ msgstr "Echec de l'obtention de mutex"
#, fuzzy
#~ msgid "Failed to add service"
#~ msgstr "Echec de l'ajout de service"
#, fuzzy
#~ msgid "Failed to connect:"
#~ msgstr "Echec de connection:"
#, fuzzy
#~ msgid "Failed to continue scanning"
#~ msgstr "Impossible de poursuivre le scan"
#, fuzzy
#~ msgid "Failed to create mutex"
#~ msgstr "Echec de la création de mutex"
#, fuzzy #, fuzzy
#~ msgid "Failed to notify or indicate attribute value, err %0x04x" #~ msgid "Failed to notify or indicate attribute value, err %0x04x"
#~ msgstr "Impossible de notifier la valeur de l'attribut. status: 0x%08lX" #~ msgstr "Impossible de notifier la valeur de l'attribut. status: 0x%08lX"
@ -2765,6 +2802,22 @@ msgstr "'step' nul"
#~ msgid "Failed to read attribute value, err %0x04x" #~ msgid "Failed to read attribute value, err %0x04x"
#~ msgstr "Impossible de lire la valeur de l'attribut. status: 0x%08lX" #~ msgstr "Impossible de lire la valeur de l'attribut. status: 0x%08lX"
#, fuzzy
#~ msgid "Failed to release mutex"
#~ msgstr "Impossible de libérer mutex"
#, fuzzy
#~ msgid "Failed to start advertising"
#~ msgstr "Echec du démarrage de la diffusion"
#, fuzzy
#~ msgid "Failed to start scanning"
#~ msgstr "Impossible de commencer à scanner"
#, fuzzy
#~ msgid "Failed to stop advertising"
#~ msgstr "Echec de l'arrêt de diffusion"
#~ msgid "Function requires lock." #~ msgid "Function requires lock."
#~ msgstr "La fonction nécessite un verrou." #~ msgstr "La fonction nécessite un verrou."
@ -2835,6 +2888,9 @@ msgstr "'step' nul"
#~ msgid "UART(1) can't read" #~ msgid "UART(1) can't read"
#~ msgstr "UART(1) ne peut pas lire" #~ msgstr "UART(1) ne peut pas lire"
#~ msgid "UUID integer value not in range 0 to 0xffff"
#~ msgstr "valeur de l'entier UUID est hors-bornes 0 à 0xffff"
#~ msgid "Unable to remount filesystem" #~ msgid "Unable to remount filesystem"
#~ msgstr "Impossible de remonter le système de fichiers" #~ msgstr "Impossible de remonter le système de fichiers"
@ -2881,6 +2937,9 @@ msgstr "'step' nul"
#~ msgid "impossible baudrate" #~ msgid "impossible baudrate"
#~ msgstr "débit impossible" #~ msgstr "débit impossible"
#~ msgid "interval not in range 0.0020 to 10.24"
#~ msgstr "intervalle hors bornes 0.0020 à 10.24"
#~ msgid "invalid alarm" #~ msgid "invalid alarm"
#~ msgstr "alarme invalide" #~ msgstr "alarme invalide"
@ -2916,6 +2975,9 @@ msgstr "'step' nul"
#~ msgid "scan failed" #~ msgid "scan failed"
#~ msgstr "échec du scan" #~ msgstr "échec du scan"
#~ msgid "services includes an object that is not a Service"
#~ msgstr "'services' inclut un object qui n'est pas un 'Service'"
#~ msgid "too many arguments" #~ msgid "too many arguments"
#~ msgstr "trop d'arguments" #~ msgstr "trop d'arguments"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-11 14:59-0700\n" "POT-Creation-Date: 2019-07-19 16:10-0700\n"
"PO-Revision-Date: 2018-10-02 16:27+0200\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n"
"Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n" "Last-Translator: Enrico Paganin <enrico.paganin@mail.com>\n"
"Language-Team: \n" "Language-Team: \n"
@ -219,16 +219,15 @@ msgstr "pow() con tre argmomenti non supportata"
msgid "A hardware interrupt channel is already in use" msgid "A hardware interrupt channel is already in use"
msgstr "Un canale di interrupt hardware è già in uso" msgstr "Un canale di interrupt hardware è già in uso"
#: shared-bindings/bleio/Address.c
#, c-format
msgid "Address is not %d bytes long or is in wrong format"
msgstr ""
#: shared-bindings/bleio/Address.c #: shared-bindings/bleio/Address.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Address must be %d bytes long" msgid "Address must be %d bytes long"
msgstr "la palette deve essere lunga 32 byte" msgstr "la palette deve essere lunga 32 byte"
#: shared-bindings/bleio/Address.c
msgid "Address type out of range"
msgstr ""
#: ports/nrf/common-hal/busio/I2C.c #: ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use" msgid "All I2C peripherals are in use"
msgstr "Tutte le periferiche I2C sono in uso" msgstr "Tutte le periferiche I2C sono in uso"
@ -315,6 +314,10 @@ msgstr "La profondità di bit deve essere multipla di 8."
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Entrambi i pin devono supportare gli interrupt hardware" msgstr "Entrambi i pin devono supportare gli interrupt hardware"
#: shared-bindings/displayio/Display.c
msgid "Brightness must be 0-1.0"
msgstr ""
#: shared-bindings/supervisor/__init__.c #: shared-bindings/supervisor/__init__.c
msgid "Brightness must be between 0 and 255" msgid "Brightness must be between 0 and 255"
msgstr "La luminosità deve essere compreso tra 0 e 255" msgstr "La luminosità deve essere compreso tra 0 e 255"
@ -356,21 +359,9 @@ msgstr ""
msgid "Can not use dotstar with %s" msgid "Can not use dotstar with %s"
msgstr "dotstar non può essere usato con %s" msgstr "dotstar non può essere usato con %s"
#: shared-bindings/bleio/Device.c #: ports/nrf/common-hal/bleio/Characteristic.c
msgid "Can't add services in Central mode" msgid "Can't set CCCD for local Characteristic"
msgstr "non si può aggiungere servizi in Central mode" msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't advertise in Central mode"
msgstr "non si può pubblicizzare in Central mode"
#: shared-bindings/bleio/Device.c
msgid "Can't change the name in Central mode"
msgstr "non si può cambiare il nome in Central mode"
#: shared-bindings/bleio/Device.c
msgid "Can't connect in Peripheral mode"
msgstr "non si può connettere in Periferal mode"
#: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c #: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c
msgid "Cannot delete values" msgid "Cannot delete values"
@ -455,11 +446,23 @@ msgstr "Unità di clock in uso"
msgid "Column entry must be digitalio.DigitalInOut" msgid "Column entry must be digitalio.DigitalInOut"
msgstr "" msgstr ""
#: shared-bindings/displayio/I2CDisplay.c
msgid "Command must be 0-255"
msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
#, fuzzy #, fuzzy
msgid "Command must be an int between 0 and 255" msgid "Command must be an int between 0 and 255"
msgstr "I byte devono essere compresi tra 0 e 255" msgstr "I byte devono essere compresi tra 0 e 255"
#: py/persistentcode.c
msgid "Corrupt .mpy file"
msgstr ""
#: py/emitglue.c
msgid "Corrupt raw code"
msgstr ""
#: ports/nrf/common-hal/bleio/UUID.c #: ports/nrf/common-hal/bleio/UUID.c
#, c-format #, c-format
msgid "Could not decode ble_uuid, err 0x%04x" msgid "Could not decode ble_uuid, err 0x%04x"
@ -495,17 +498,11 @@ msgstr "graphic deve essere lunga 2048 byte"
msgid "Data chunk must follow fmt chunk" msgid "Data chunk must follow fmt chunk"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy #, fuzzy
msgid "Data too large for advertisement packet" msgid "Data too large for advertisement packet"
msgstr "Impossibile inserire dati nel pacchetto di advertisement." msgstr "Impossibile inserire dati nel pacchetto di advertisement."
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Data too large for the advertisement packet"
msgstr "Impossibile inserire dati nel pacchetto di advertisement."
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Destination capacity is smaller than destination_length." msgid "Destination capacity is smaller than destination_length."
msgstr "La capacità di destinazione è più piccola di destination_length." msgstr "La capacità di destinazione è più piccola di destination_length."
@ -545,6 +542,10 @@ msgstr "Non è possibile aggiungere Characteristic."
msgid "Expected a UUID" msgid "Expected a UUID"
msgstr "Atteso un %q" msgstr "Atteso un %q"
#: shared-bindings/bleio/Central.c
msgid "Expected an Address"
msgstr ""
#: shared-module/_pixelbuf/PixelBuf.c #: shared-module/_pixelbuf/PixelBuf.c
#, c-format #, c-format
msgid "Expected tuple of length %d, got %d" msgid "Expected tuple of length %d, got %d"
@ -554,12 +555,7 @@ msgstr ""
msgid "Failed sending command." msgid "Failed sending command."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
#, fuzzy
msgid "Failed to acquire mutex"
msgstr "Impossibile allocare buffer RX"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to acquire mutex, err 0x%04x" msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x" msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
@ -569,11 +565,6 @@ msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
msgid "Failed to add characteristic, err 0x%04x" msgid "Failed to add characteristic, err 0x%04x"
msgstr "Impossibile fermare advertisement. status: 0x%02x" msgstr "Impossibile fermare advertisement. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Failed to add service"
msgstr "Impossibile fermare advertisement. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to add service, err 0x%04x" msgid "Failed to add service, err 0x%04x"
@ -594,27 +585,21 @@ msgstr "Fallita allocazione del buffer RX di %d byte"
msgid "Failed to change softdevice state" msgid "Failed to change softdevice state"
msgstr "Impossibile fermare advertisement. status: 0x%02x" msgstr "Impossibile fermare advertisement. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy #, c-format
msgid "Failed to connect:" msgid "Failed to configure advertising, err 0x%04x"
msgstr "Impossibile connettersi. status: 0x%02x" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
#, fuzzy msgid "Failed to connect: timeout"
msgid "Failed to continue scanning" msgstr ""
msgstr "Impossible iniziare la scansione. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to continue scanning, err 0x%04x" msgid "Failed to continue scanning, err 0x%04x"
msgstr "Impossible iniziare la scansione. status: 0x%02x" msgstr "Impossible iniziare la scansione. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
#, fuzzy
msgid "Failed to create mutex"
msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy #, fuzzy
msgid "Failed to discover services" msgid "Failed to discover services"
msgstr "Impossibile fermare advertisement. status: 0x%02x" msgstr "Impossibile fermare advertisement. status: 0x%02x"
@ -653,48 +638,41 @@ msgstr "Impossibile scrivere valore dell'attributo. status: 0x%02x"
msgid "Failed to register Vendor-Specific UUID, err 0x%04x" msgid "Failed to register Vendor-Specific UUID, err 0x%04x"
msgstr "Non è possibile aggiungere l'UUID del vendor specifico da 128-bit" msgstr "Non è possibile aggiungere l'UUID del vendor specifico da 128-bit"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
#, fuzzy
msgid "Failed to release mutex"
msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to release mutex, err 0x%04x" msgid "Failed to release mutex, err 0x%04x"
msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x" msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy #, c-format
msgid "Failed to start advertising" msgid "Failed to set device name, err 0x%04x"
msgstr "Impossibile avviare advertisement. status: 0x%02x" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to start advertising, err 0x%04x" msgid "Failed to start advertising, err 0x%04x"
msgstr "Impossibile avviare advertisement. status: 0x%02x" msgstr "Impossibile avviare advertisement. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
#, fuzzy #, c-format
msgid "Failed to start scanning" msgid "Failed to start connecting, error 0x%04x"
msgstr "Impossible iniziare la scansione. status: 0x%02x" msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to start scanning, err 0x%04x" msgid "Failed to start scanning, err 0x%04x"
msgstr "Impossible iniziare la scansione. status: 0x%02x" msgstr "Impossible iniziare la scansione. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Failed to stop advertising"
msgstr "Impossibile fermare advertisement. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to stop advertising, err 0x%04x" msgid "Failed to stop advertising, err 0x%04x"
msgstr "Impossibile fermare advertisement. status: 0x%02x" msgstr "Impossibile fermare advertisement. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format
msgid "Failed to write CCCD, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c #: ports/nrf/common-hal/bleio/Characteristic.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to write attribute value, err 0x%04x" msgid "Failed to write attribute value, err 0x%04x"
@ -916,6 +894,10 @@ msgstr ""
msgid "Must be a %q subclass." msgid "Must be a %q subclass."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c #: ports/atmel-samd/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip" msgid "No DAC on chip"
msgstr "Nessun DAC sul chip" msgstr "Nessun DAC sul chip"
@ -966,6 +948,7 @@ msgstr "Non che spazio sul dispositivo"
msgid "No such file/directory" msgid "No such file/directory"
msgstr "Nessun file/directory esistente" msgstr "Nessun file/directory esistente"
#: ports/nrf/common-hal/bleio/Characteristic.c
#: shared-bindings/bleio/CharacteristicBuffer.c #: shared-bindings/bleio/CharacteristicBuffer.c
#, fuzzy #, fuzzy
msgid "Not connected" msgid "Not connected"
@ -1215,7 +1198,8 @@ msgstr "Per uscire resettare la scheda senza "
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "" msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
#: shared-bindings/displayio/ParallelBus.c
msgid "Too many display busses" msgid "Too many display busses"
msgstr "" msgstr ""
@ -1240,7 +1224,7 @@ msgid "USB Error"
msgstr "Errore USB" msgstr "Errore USB"
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID integer value not in range 0 to 0xffff" msgid "UUID integer value must be 0-0xffff"
msgstr "" msgstr ""
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
@ -1256,6 +1240,11 @@ msgstr ""
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "Ipossibilitato ad allocare buffer per la conversione con segno" msgstr "Ipossibilitato ad allocare buffer per la conversione con segno"
#: shared-module/displayio/I2CDisplay.c
#, c-format
msgid "Unable to find I2C Display at %x"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Unable to find free GCLK" msgid "Unable to find free GCLK"
@ -1944,8 +1933,9 @@ msgstr "il secondo argomanto di int() deve essere >= 2 e <= 36"
msgid "integer required" msgid "integer required"
msgstr "intero richiesto" msgstr "intero richiesto"
#: ports/nrf/common-hal/bleio/Broadcaster.c #: shared-bindings/bleio/Peripheral.c shared-bindings/bleio/Scanner.c
msgid "interval not in range 0.0020 to 10.24" #, c-format
msgid "interval must be in range %s-%s"
msgstr "" msgstr ""
#: extmod/machine_i2c.c #: extmod/machine_i2c.c
@ -2166,6 +2156,14 @@ msgstr "nessun modulo chiamato '%q'"
msgid "no such attribute" msgid "no such attribute"
msgstr "attributo inesistente" msgstr "attributo inesistente"
#: shared-bindings/bleio/Peripheral.c
msgid "non-Service found in services"
msgstr ""
#: ports/nrf/common-hal/bleio/Central.c
msgid "non-UUID found in service_uuids"
msgstr ""
#: py/compile.c #: py/compile.c
msgid "non-default argument follows default argument" msgid "non-default argument follows default argument"
msgstr "argomento non predefinito segue argmoento predfinito" msgstr "argomento non predefinito segue argmoento predfinito"
@ -2383,10 +2381,6 @@ msgstr ""
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "compilazione dello scrip non suportata" msgstr "compilazione dello scrip non suportata"
#: shared-bindings/bleio/Peripheral.c
msgid "services includes an object that is not a Service"
msgstr ""
#: py/objstr.c #: py/objstr.c
msgid "sign not allowed in string format specifier" msgid "sign not allowed in string format specifier"
msgstr "segno non permesso nello spcificatore di formato della stringa" msgstr "segno non permesso nello spcificatore di formato della stringa"
@ -2655,6 +2649,10 @@ msgstr ""
msgid "value_count must be > 0" msgid "value_count must be > 0"
msgstr "" msgstr ""
#: shared-bindings/bleio/Scanner.c
msgid "window must be <= interval"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c #: shared-bindings/_pixelbuf/PixelBuf.c
msgid "write_args must be a list, tuple, or None" msgid "write_args must be a list, tuple, or None"
msgstr "" msgstr ""
@ -2691,6 +2689,18 @@ msgstr "zero step"
#~ msgid "C-level assert" #~ msgid "C-level assert"
#~ msgstr "assert a livello C" #~ msgstr "assert a livello C"
#~ msgid "Can't add services in Central mode"
#~ msgstr "non si può aggiungere servizi in Central mode"
#~ msgid "Can't advertise in Central mode"
#~ msgstr "non si può pubblicizzare in Central mode"
#~ msgid "Can't change the name in Central mode"
#~ msgstr "non si può cambiare il nome in Central mode"
#~ msgid "Can't connect in Peripheral mode"
#~ msgstr "non si può connettere in Periferal mode"
#~ msgid "Cannot connect to AP" #~ msgid "Cannot connect to AP"
#~ msgstr "Impossible connettersi all'AP" #~ msgstr "Impossible connettersi all'AP"
@ -2703,6 +2713,10 @@ msgstr "zero step"
#~ msgid "Cannot update i/f status" #~ msgid "Cannot update i/f status"
#~ msgstr "Impossibile aggiornare status di i/f" #~ msgstr "Impossibile aggiornare status di i/f"
#, fuzzy
#~ msgid "Data too large for the advertisement packet"
#~ msgstr "Impossibile inserire dati nel pacchetto di advertisement."
#~ msgid "Don't know how to pass object to native function" #~ msgid "Don't know how to pass object to native function"
#~ msgstr "Non so come passare l'oggetto alla funzione nativa" #~ msgstr "Non so come passare l'oggetto alla funzione nativa"
@ -2715,6 +2729,26 @@ msgstr "zero step"
#~ msgid "Error in ffi_prep_cif" #~ msgid "Error in ffi_prep_cif"
#~ msgstr "Errore in ffi_prep_cif" #~ msgstr "Errore in ffi_prep_cif"
#, fuzzy
#~ msgid "Failed to acquire mutex"
#~ msgstr "Impossibile allocare buffer RX"
#, fuzzy
#~ msgid "Failed to add service"
#~ msgstr "Impossibile fermare advertisement. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to connect:"
#~ msgstr "Impossibile connettersi. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to continue scanning"
#~ msgstr "Impossible iniziare la scansione. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to create mutex"
#~ msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
#, fuzzy #, fuzzy
#~ msgid "Failed to notify or indicate attribute value, err %0x04x" #~ msgid "Failed to notify or indicate attribute value, err %0x04x"
#~ msgstr "Impossibile notificare valore dell'attributo. status: 0x%02x" #~ msgstr "Impossibile notificare valore dell'attributo. status: 0x%02x"
@ -2723,6 +2757,22 @@ msgstr "zero step"
#~ msgid "Failed to read attribute value, err %0x04x" #~ msgid "Failed to read attribute value, err %0x04x"
#~ msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x" #~ msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to release mutex"
#~ msgstr "Impossibile leggere valore dell'attributo. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to start advertising"
#~ msgstr "Impossibile avviare advertisement. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to start scanning"
#~ msgstr "Impossible iniziare la scansione. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to stop advertising"
#~ msgstr "Impossibile fermare advertisement. status: 0x%02x"
#~ msgid "GPIO16 does not support pull up." #~ msgid "GPIO16 does not support pull up."
#~ msgstr "GPIO16 non supporta pull-up" #~ msgstr "GPIO16 non supporta pull-up"

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: \n" "Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-11 14:59-0700\n" "POT-Creation-Date: 2019-07-19 16:10-0700\n"
"PO-Revision-Date: 2019-03-19 18:37-0700\n" "PO-Revision-Date: 2019-03-19 18:37-0700\n"
"Last-Translator: Radomir Dopieralski <circuitpython@sheep.art.pl>\n" "Last-Translator: Radomir Dopieralski <circuitpython@sheep.art.pl>\n"
"Language-Team: pl\n" "Language-Team: pl\n"
@ -218,16 +218,15 @@ msgstr "3-argumentowy pow() jest niewspierany"
msgid "A hardware interrupt channel is already in use" msgid "A hardware interrupt channel is already in use"
msgstr "Kanał przerwań sprzętowych w użyciu" msgstr "Kanał przerwań sprzętowych w użyciu"
#: shared-bindings/bleio/Address.c
#, c-format
msgid "Address is not %d bytes long or is in wrong format"
msgstr "Adres nie ma długości %d bajtów lub zły format"
#: shared-bindings/bleio/Address.c #: shared-bindings/bleio/Address.c
#, c-format #, c-format
msgid "Address must be %d bytes long" msgid "Address must be %d bytes long"
msgstr "Adres musi mieć %d bajtów" msgstr "Adres musi mieć %d bajtów"
#: shared-bindings/bleio/Address.c
msgid "Address type out of range"
msgstr ""
#: ports/nrf/common-hal/busio/I2C.c #: ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use" msgid "All I2C peripherals are in use"
msgstr "Wszystkie peryferia I2C w użyciu" msgstr "Wszystkie peryferia I2C w użyciu"
@ -312,6 +311,10 @@ msgstr "Głębia musi być wielokrotnością 8."
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Obie nóżki muszą wspierać przerwania sprzętowe" msgstr "Obie nóżki muszą wspierać przerwania sprzętowe"
#: shared-bindings/displayio/Display.c
msgid "Brightness must be 0-1.0"
msgstr ""
#: shared-bindings/supervisor/__init__.c #: shared-bindings/supervisor/__init__.c
msgid "Brightness must be between 0 and 255" msgid "Brightness must be between 0 and 255"
msgstr "Jasność musi być pomiędzy 0 a 255" msgstr "Jasność musi być pomiędzy 0 a 255"
@ -352,21 +355,9 @@ msgstr ""
msgid "Can not use dotstar with %s" msgid "Can not use dotstar with %s"
msgstr "Nie można używać dotstar z %s" msgstr "Nie można używać dotstar z %s"
#: shared-bindings/bleio/Device.c #: ports/nrf/common-hal/bleio/Characteristic.c
msgid "Can't add services in Central mode" msgid "Can't set CCCD for local Characteristic"
msgstr "Nie można dodać serwisów w trybie Central" msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't advertise in Central mode"
msgstr "Nie można rozgłaszać w trybie Central"
#: shared-bindings/bleio/Device.c
msgid "Can't change the name in Central mode"
msgstr "Nie można zmienić nazwy w trybie Central"
#: shared-bindings/bleio/Device.c
msgid "Can't connect in Peripheral mode"
msgstr "Nie można się łączyć w trybie Peripheral"
#: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c #: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c
msgid "Cannot delete values" msgid "Cannot delete values"
@ -449,10 +440,22 @@ msgstr "Jednostka zegara w użyciu"
msgid "Column entry must be digitalio.DigitalInOut" msgid "Column entry must be digitalio.DigitalInOut"
msgstr "Kolumny muszą być typu digitalio.DigitalInOut" msgstr "Kolumny muszą być typu digitalio.DigitalInOut"
#: shared-bindings/displayio/I2CDisplay.c
msgid "Command must be 0-255"
msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
msgid "Command must be an int between 0 and 255" msgid "Command must be an int between 0 and 255"
msgstr "Komenda musi być int pomiędzy 0 a 255" msgstr "Komenda musi być int pomiędzy 0 a 255"
#: py/persistentcode.c
msgid "Corrupt .mpy file"
msgstr ""
#: py/emitglue.c
msgid "Corrupt raw code"
msgstr ""
#: ports/nrf/common-hal/bleio/UUID.c #: ports/nrf/common-hal/bleio/UUID.c
#, c-format #, c-format
msgid "Could not decode ble_uuid, err 0x%04x" msgid "Could not decode ble_uuid, err 0x%04x"
@ -487,15 +490,10 @@ msgstr "Nóżka data 0 musi być wyrównana do bajtu"
msgid "Data chunk must follow fmt chunk" msgid "Data chunk must follow fmt chunk"
msgstr "Fragment danych musi następować po fragmencie fmt" msgstr "Fragment danych musi następować po fragmencie fmt"
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Data too large for advertisement packet" msgid "Data too large for advertisement packet"
msgstr "Zbyt dużo danych pakietu rozgłoszeniowego" msgstr "Zbyt dużo danych pakietu rozgłoszeniowego"
#: ports/nrf/common-hal/bleio/Device.c
msgid "Data too large for the advertisement packet"
msgstr "Zbyt dużo danych pakietu rozgłoszeniowego"
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Destination capacity is smaller than destination_length." msgid "Destination capacity is smaller than destination_length."
msgstr "Pojemność celu mniejsza od destination_length." msgstr "Pojemność celu mniejsza od destination_length."
@ -533,6 +531,10 @@ msgstr "Oczekiwano charakterystyki"
msgid "Expected a UUID" msgid "Expected a UUID"
msgstr "Oczekiwano UUID" msgstr "Oczekiwano UUID"
#: shared-bindings/bleio/Central.c
msgid "Expected an Address"
msgstr ""
#: shared-module/_pixelbuf/PixelBuf.c #: shared-module/_pixelbuf/PixelBuf.c
#, c-format #, c-format
msgid "Expected tuple of length %d, got %d" msgid "Expected tuple of length %d, got %d"
@ -542,11 +544,7 @@ msgstr "Oczekiwano krotkę długości %d, otrzymano %d"
msgid "Failed sending command." msgid "Failed sending command."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
msgid "Failed to acquire mutex"
msgstr "Nie udało się uzyskać blokady"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, c-format #, c-format
msgid "Failed to acquire mutex, err 0x%04x" msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Nie udało się uzyskać blokady, błąd 0x$04x" msgstr "Nie udało się uzyskać blokady, błąd 0x$04x"
@ -556,10 +554,6 @@ msgstr "Nie udało się uzyskać blokady, błąd 0x$04x"
msgid "Failed to add characteristic, err 0x%04x" msgid "Failed to add characteristic, err 0x%04x"
msgstr "Nie udało się dodać charakterystyki, błąd 0x$04x" msgstr "Nie udało się dodać charakterystyki, błąd 0x$04x"
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to add service"
msgstr "Nie udało się dodać serwisu"
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to add service, err 0x%04x" msgid "Failed to add service, err 0x%04x"
@ -579,24 +573,21 @@ msgstr "Nie udała się alokacja %d bajtów na bufor RX"
msgid "Failed to change softdevice state" msgid "Failed to change softdevice state"
msgstr "Nie udało się zmienić stanu softdevice" msgstr "Nie udało się zmienić stanu softdevice"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Failed to connect:" #, c-format
msgstr "Nie udało się połączenie:" msgid "Failed to configure advertising, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to continue scanning" msgid "Failed to connect: timeout"
msgstr "Nie udała się kontynuacja skanowania" msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, c-format #, c-format
msgid "Failed to continue scanning, err 0x%04x" msgid "Failed to continue scanning, err 0x%04x"
msgstr "Nie udała się kontynuacja skanowania, błąd 0x%04x" msgstr "Nie udała się kontynuacja skanowania, błąd 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to create mutex"
msgstr "Nie udało się stworzyć blokady"
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to discover services" msgid "Failed to discover services"
msgstr "Nie udało się odkryć serwisów" msgstr "Nie udało się odkryć serwisów"
@ -633,44 +624,41 @@ msgstr "Nie udało się odczytać gatts, błąd 0x%04x"
msgid "Failed to register Vendor-Specific UUID, err 0x%04x" msgid "Failed to register Vendor-Specific UUID, err 0x%04x"
msgstr "Nie udało się zarejestrować UUID dostawcy, błąd 0x%04x" msgstr "Nie udało się zarejestrować UUID dostawcy, błąd 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
msgid "Failed to release mutex"
msgstr "Nie udało się zwolnić blokady"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, c-format #, c-format
msgid "Failed to release mutex, err 0x%04x" msgid "Failed to release mutex, err 0x%04x"
msgstr "Nie udało się zwolnić blokady, błąd 0x%04x" msgstr "Nie udało się zwolnić blokady, błąd 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Failed to start advertising" #, c-format
msgstr "Nie udało się rozpocząć rozgłaszania" msgid "Failed to set device name, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to start advertising, err 0x%04x" msgid "Failed to start advertising, err 0x%04x"
msgstr "Nie udało się rozpocząć rozgłaszania, błąd 0x%04x" msgstr "Nie udało się rozpocząć rozgłaszania, błąd 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to start scanning" #, c-format
msgstr "Nie udało się rozpocząć skanowania" msgid "Failed to start connecting, error 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, c-format #, c-format
msgid "Failed to start scanning, err 0x%04x" msgid "Failed to start scanning, err 0x%04x"
msgstr "Nie udało się rozpocząć skanowania, błąd 0x%04x" msgstr "Nie udało się rozpocząć skanowania, błąd 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to stop advertising"
msgstr "Nie udało się zatrzymać rozgłaszania"
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to stop advertising, err 0x%04x" msgid "Failed to stop advertising, err 0x%04x"
msgstr "Nie udało się zatrzymać rozgłaszania, błąd 0x%04x" msgstr "Nie udało się zatrzymać rozgłaszania, błąd 0x%04x"
#: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format
msgid "Failed to write CCCD, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c #: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format #, c-format
msgid "Failed to write attribute value, err 0x%04x" msgid "Failed to write attribute value, err 0x%04x"
@ -893,6 +881,10 @@ msgstr "Opóźnienie włączenia mikrofonu musi być w zakresie od 0.0 do 1.0"
msgid "Must be a %q subclass." msgid "Must be a %q subclass."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c #: ports/atmel-samd/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip" msgid "No DAC on chip"
msgstr "Brak DAC" msgstr "Brak DAC"
@ -943,6 +935,7 @@ msgstr "Brak miejsca"
msgid "No such file/directory" msgid "No such file/directory"
msgstr "Brak pliku/katalogu" msgstr "Brak pliku/katalogu"
#: ports/nrf/common-hal/bleio/Characteristic.c
#: shared-bindings/bleio/CharacteristicBuffer.c #: shared-bindings/bleio/CharacteristicBuffer.c
msgid "Not connected" msgid "Not connected"
msgstr "Nie podłączono" msgstr "Nie podłączono"
@ -1183,7 +1176,8 @@ msgstr "By wyjść, proszę zresetować płytkę bez "
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "Zbyt wiele kanałów." msgstr "Zbyt wiele kanałów."
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
#: shared-bindings/displayio/ParallelBus.c
msgid "Too many display busses" msgid "Too many display busses"
msgstr "Zbyt wiele magistrali" msgstr "Zbyt wiele magistrali"
@ -1208,8 +1202,8 @@ msgid "USB Error"
msgstr "Błąd USB" msgstr "Błąd USB"
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID integer value not in range 0 to 0xffff" msgid "UUID integer value must be 0-0xffff"
msgstr "Wartość UUID poza zakresem 0 do 0xffff" msgstr ""
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
@ -1224,6 +1218,11 @@ msgstr "UUID nie jest typu str, int lub bytes"
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "Nie udała się alokacja buforów do konwersji ze znakiem" msgstr "Nie udała się alokacja buforów do konwersji ze znakiem"
#: shared-module/displayio/I2CDisplay.c
#, c-format
msgid "Unable to find I2C Display at %x"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Unable to find free GCLK" msgid "Unable to find free GCLK"
@ -1901,9 +1900,10 @@ msgstr "argument 2 do int() busi być pomiędzy 2 a 36"
msgid "integer required" msgid "integer required"
msgstr "wymagana liczba całkowita" msgstr "wymagana liczba całkowita"
#: ports/nrf/common-hal/bleio/Broadcaster.c #: shared-bindings/bleio/Peripheral.c shared-bindings/bleio/Scanner.c
msgid "interval not in range 0.0020 to 10.24" #, c-format
msgstr "przedział poza zakresem 0.0020 do 10.24" msgid "interval must be in range %s-%s"
msgstr ""
#: extmod/machine_i2c.c #: extmod/machine_i2c.c
msgid "invalid I2C peripheral" msgid "invalid I2C peripheral"
@ -2116,6 +2116,14 @@ msgstr "brak modułu o nazwie '%q'"
msgid "no such attribute" msgid "no such attribute"
msgstr "nie ma takiego atrybutu" msgstr "nie ma takiego atrybutu"
#: shared-bindings/bleio/Peripheral.c
msgid "non-Service found in services"
msgstr ""
#: ports/nrf/common-hal/bleio/Central.c
msgid "non-UUID found in service_uuids"
msgstr ""
#: py/compile.c #: py/compile.c
msgid "non-default argument follows default argument" msgid "non-default argument follows default argument"
msgstr "argument z wartością domyślną przed argumentem bez" msgstr "argument z wartością domyślną przed argumentem bez"
@ -2326,10 +2334,6 @@ msgstr "stos planu pełen"
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "kompilowanie skryptów nieobsługiwane" msgstr "kompilowanie skryptów nieobsługiwane"
#: shared-bindings/bleio/Peripheral.c
msgid "services includes an object that is not a Service"
msgstr "obiekt typu innego niż Service w services"
#: py/objstr.c #: py/objstr.c
msgid "sign not allowed in string format specifier" msgid "sign not allowed in string format specifier"
msgstr "znak jest niedopuszczalny w specyfikacji formatu łańcucha" msgstr "znak jest niedopuszczalny w specyfikacji formatu łańcucha"
@ -2596,6 +2600,10 @@ msgstr ""
msgid "value_count must be > 0" msgid "value_count must be > 0"
msgstr "value_count musi być > 0" msgstr "value_count musi być > 0"
#: shared-bindings/bleio/Scanner.c
msgid "window must be <= interval"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c #: shared-bindings/_pixelbuf/PixelBuf.c
msgid "write_args must be a list, tuple, or None" msgid "write_args must be a list, tuple, or None"
msgstr "write_args musi być listą, krotką lub None" msgstr "write_args musi być listą, krotką lub None"
@ -2624,6 +2632,51 @@ msgstr "y poza zakresem"
msgid "zero step" msgid "zero step"
msgstr "zerowy krok" msgstr "zerowy krok"
#~ msgid "Address is not %d bytes long or is in wrong format"
#~ msgstr "Adres nie ma długości %d bajtów lub zły format"
#~ msgid "Can't add services in Central mode"
#~ msgstr "Nie można dodać serwisów w trybie Central"
#~ msgid "Can't advertise in Central mode"
#~ msgstr "Nie można rozgłaszać w trybie Central"
#~ msgid "Can't change the name in Central mode"
#~ msgstr "Nie można zmienić nazwy w trybie Central"
#~ msgid "Can't connect in Peripheral mode"
#~ msgstr "Nie można się łączyć w trybie Peripheral"
#~ msgid "Data too large for the advertisement packet"
#~ msgstr "Zbyt dużo danych pakietu rozgłoszeniowego"
#~ msgid "Failed to acquire mutex"
#~ msgstr "Nie udało się uzyskać blokady"
#~ msgid "Failed to add service"
#~ msgstr "Nie udało się dodać serwisu"
#~ msgid "Failed to connect:"
#~ msgstr "Nie udało się połączenie:"
#~ msgid "Failed to continue scanning"
#~ msgstr "Nie udała się kontynuacja skanowania"
#~ msgid "Failed to create mutex"
#~ msgstr "Nie udało się stworzyć blokady"
#~ msgid "Failed to release mutex"
#~ msgstr "Nie udało się zwolnić blokady"
#~ msgid "Failed to start advertising"
#~ msgstr "Nie udało się rozpocząć rozgłaszania"
#~ msgid "Failed to start scanning"
#~ msgstr "Nie udało się rozpocząć skanowania"
#~ msgid "Failed to stop advertising"
#~ msgstr "Nie udało się zatrzymać rozgłaszania"
#~ msgid "Invalid bit clock pin" #~ msgid "Invalid bit clock pin"
#~ msgstr "Zła nóżka zegara" #~ msgstr "Zła nóżka zegara"
@ -2635,3 +2688,12 @@ msgstr "zerowy krok"
#~ msgid "Must be a Group subclass." #~ msgid "Must be a Group subclass."
#~ msgstr "Musi dziedziczyć z Group." #~ msgstr "Musi dziedziczyć z Group."
#~ msgid "UUID integer value not in range 0 to 0xffff"
#~ msgstr "Wartość UUID poza zakresem 0 do 0xffff"
#~ msgid "interval not in range 0.0020 to 10.24"
#~ msgstr "przedział poza zakresem 0.0020 do 10.24"
#~ msgid "services includes an object that is not a Service"
#~ msgstr "obiekt typu innego niż Service w services"

View File

@ -8,7 +8,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: PACKAGE VERSION\n" "Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-11 14:59-0700\n" "POT-Creation-Date: 2019-07-19 16:10-0700\n"
"PO-Revision-Date: 2018-10-02 21:14-0000\n" "PO-Revision-Date: 2018-10-02 21:14-0000\n"
"Last-Translator: \n" "Last-Translator: \n"
"Language-Team: \n" "Language-Team: \n"
@ -219,16 +219,15 @@ msgstr ""
msgid "A hardware interrupt channel is already in use" msgid "A hardware interrupt channel is already in use"
msgstr "Um canal de interrupção de hardware já está em uso" msgstr "Um canal de interrupção de hardware já está em uso"
#: shared-bindings/bleio/Address.c
#, c-format
msgid "Address is not %d bytes long or is in wrong format"
msgstr ""
#: shared-bindings/bleio/Address.c #: shared-bindings/bleio/Address.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Address must be %d bytes long" msgid "Address must be %d bytes long"
msgstr "buffers devem ser o mesmo tamanho" msgstr "buffers devem ser o mesmo tamanho"
#: shared-bindings/bleio/Address.c
msgid "Address type out of range"
msgstr ""
#: ports/nrf/common-hal/busio/I2C.c #: ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use" msgid "All I2C peripherals are in use"
msgstr "Todos os periféricos I2C estão em uso" msgstr "Todos os periféricos I2C estão em uso"
@ -312,6 +311,10 @@ msgstr ""
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Ambos os pinos devem suportar interrupções de hardware" msgstr "Ambos os pinos devem suportar interrupções de hardware"
#: shared-bindings/displayio/Display.c
msgid "Brightness must be 0-1.0"
msgstr ""
#: shared-bindings/supervisor/__init__.c #: shared-bindings/supervisor/__init__.c
msgid "Brightness must be between 0 and 255" msgid "Brightness must be between 0 and 255"
msgstr "O brilho deve estar entre 0 e 255" msgstr "O brilho deve estar entre 0 e 255"
@ -353,20 +356,8 @@ msgstr ""
msgid "Can not use dotstar with %s" msgid "Can not use dotstar with %s"
msgstr "" msgstr ""
#: shared-bindings/bleio/Device.c #: ports/nrf/common-hal/bleio/Characteristic.c
msgid "Can't add services in Central mode" msgid "Can't set CCCD for local Characteristic"
msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't advertise in Central mode"
msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't change the name in Central mode"
msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't connect in Peripheral mode"
msgstr "" msgstr ""
#: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c #: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c
@ -451,11 +442,23 @@ msgstr "Unidade de Clock em uso"
msgid "Column entry must be digitalio.DigitalInOut" msgid "Column entry must be digitalio.DigitalInOut"
msgstr "" msgstr ""
#: shared-bindings/displayio/I2CDisplay.c
msgid "Command must be 0-255"
msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
#, fuzzy #, fuzzy
msgid "Command must be an int between 0 and 255" msgid "Command must be an int between 0 and 255"
msgstr "Os bytes devem estar entre 0 e 255." msgstr "Os bytes devem estar entre 0 e 255."
#: py/persistentcode.c
msgid "Corrupt .mpy file"
msgstr ""
#: py/emitglue.c
msgid "Corrupt raw code"
msgstr ""
#: ports/nrf/common-hal/bleio/UUID.c #: ports/nrf/common-hal/bleio/UUID.c
#, c-format #, c-format
msgid "Could not decode ble_uuid, err 0x%04x" msgid "Could not decode ble_uuid, err 0x%04x"
@ -490,17 +493,11 @@ msgstr ""
msgid "Data chunk must follow fmt chunk" msgid "Data chunk must follow fmt chunk"
msgstr "Pedaço de dados deve seguir o pedaço de cortes" msgstr "Pedaço de dados deve seguir o pedaço de cortes"
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy #, fuzzy
msgid "Data too large for advertisement packet" msgid "Data too large for advertisement packet"
msgstr "Não é possível ajustar dados no pacote de anúncios." msgstr "Não é possível ajustar dados no pacote de anúncios."
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Data too large for the advertisement packet"
msgstr "Não é possível ajustar dados no pacote de anúncios."
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Destination capacity is smaller than destination_length." msgid "Destination capacity is smaller than destination_length."
msgstr "" msgstr ""
@ -540,6 +537,10 @@ msgstr "Não é possível adicionar Característica."
msgid "Expected a UUID" msgid "Expected a UUID"
msgstr "Esperado um" msgstr "Esperado um"
#: shared-bindings/bleio/Central.c
msgid "Expected an Address"
msgstr ""
#: shared-module/_pixelbuf/PixelBuf.c #: shared-module/_pixelbuf/PixelBuf.c
#, c-format #, c-format
msgid "Expected tuple of length %d, got %d" msgid "Expected tuple of length %d, got %d"
@ -549,12 +550,7 @@ msgstr ""
msgid "Failed sending command." msgid "Failed sending command."
msgstr "Falha ao enviar comando." msgstr "Falha ao enviar comando."
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
#, fuzzy
msgid "Failed to acquire mutex"
msgstr "Falha ao alocar buffer RX"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to acquire mutex, err 0x%04x" msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Não é possível ler o valor do atributo. status: 0x%02x" msgstr "Não é possível ler o valor do atributo. status: 0x%02x"
@ -564,11 +560,6 @@ msgstr "Não é possível ler o valor do atributo. status: 0x%02x"
msgid "Failed to add characteristic, err 0x%04x" msgid "Failed to add characteristic, err 0x%04x"
msgstr "Não pode parar propaganda. status: 0x%02x" msgstr "Não pode parar propaganda. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Failed to add service"
msgstr "Não pode parar propaganda. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to add service, err 0x%04x" msgid "Failed to add service, err 0x%04x"
@ -589,12 +580,13 @@ msgstr "Falha ao alocar buffer RX de %d bytes"
msgid "Failed to change softdevice state" msgid "Failed to change softdevice state"
msgstr "Não pode parar propaganda. status: 0x%02x" msgstr "Não pode parar propaganda. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Failed to connect:" #, c-format
msgid "Failed to configure advertising, err 0x%04x"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to continue scanning" msgid "Failed to connect: timeout"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
@ -602,12 +594,7 @@ msgstr ""
msgid "Failed to continue scanning, err 0x%04x" msgid "Failed to continue scanning, err 0x%04x"
msgstr "Não é possível iniciar o anúncio. status: 0x%02x" msgstr "Não é possível iniciar o anúncio. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
#, fuzzy
msgid "Failed to create mutex"
msgstr "Não é possível ler o valor do atributo. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy #, fuzzy
msgid "Failed to discover services" msgid "Failed to discover services"
msgstr "Não pode parar propaganda. status: 0x%02x" msgstr "Não pode parar propaganda. status: 0x%02x"
@ -646,48 +633,41 @@ msgstr "Não é possível gravar o valor do atributo. status: 0x%02x"
msgid "Failed to register Vendor-Specific UUID, err 0x%04x" msgid "Failed to register Vendor-Specific UUID, err 0x%04x"
msgstr "Não é possível adicionar o UUID de 128 bits específico do fornecedor." msgstr "Não é possível adicionar o UUID de 128 bits específico do fornecedor."
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
#, fuzzy
msgid "Failed to release mutex"
msgstr "Não é possível ler o valor do atributo. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to release mutex, err 0x%04x" msgid "Failed to release mutex, err 0x%04x"
msgstr "Não é possível ler o valor do atributo. status: 0x%02x" msgstr "Não é possível ler o valor do atributo. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy #, c-format
msgid "Failed to start advertising" msgid "Failed to set device name, err 0x%04x"
msgstr "Não é possível iniciar o anúncio. status: 0x%02x" msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to start advertising, err 0x%04x" msgid "Failed to start advertising, err 0x%04x"
msgstr "Não é possível iniciar o anúncio. status: 0x%02x" msgstr "Não é possível iniciar o anúncio. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
#, fuzzy #, c-format
msgid "Failed to start scanning" msgid "Failed to start connecting, error 0x%04x"
msgstr "Não é possível iniciar o anúncio. status: 0x%02x" msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to start scanning, err 0x%04x" msgid "Failed to start scanning, err 0x%04x"
msgstr "Não é possível iniciar o anúncio. status: 0x%02x" msgstr "Não é possível iniciar o anúncio. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Device.c
#, fuzzy
msgid "Failed to stop advertising"
msgstr "Não pode parar propaganda. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to stop advertising, err 0x%04x" msgid "Failed to stop advertising, err 0x%04x"
msgstr "Não pode parar propaganda. status: 0x%02x" msgstr "Não pode parar propaganda. status: 0x%02x"
#: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format
msgid "Failed to write CCCD, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c #: ports/nrf/common-hal/bleio/Characteristic.c
#, fuzzy, c-format #, fuzzy, c-format
msgid "Failed to write attribute value, err 0x%04x" msgid "Failed to write attribute value, err 0x%04x"
@ -906,6 +886,10 @@ msgstr ""
msgid "Must be a %q subclass." msgid "Must be a %q subclass."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c #: ports/atmel-samd/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip" msgid "No DAC on chip"
msgstr "Nenhum DAC no chip" msgstr "Nenhum DAC no chip"
@ -956,6 +940,7 @@ msgstr ""
msgid "No such file/directory" msgid "No such file/directory"
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
#: shared-bindings/bleio/CharacteristicBuffer.c #: shared-bindings/bleio/CharacteristicBuffer.c
#, fuzzy #, fuzzy
msgid "Not connected" msgid "Not connected"
@ -1191,7 +1176,8 @@ msgstr "Para sair, por favor, reinicie a placa sem "
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "Muitos canais na amostra." msgstr "Muitos canais na amostra."
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
#: shared-bindings/displayio/ParallelBus.c
msgid "Too many display busses" msgid "Too many display busses"
msgstr "" msgstr ""
@ -1216,7 +1202,7 @@ msgid "USB Error"
msgstr "Erro na USB" msgstr "Erro na USB"
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID integer value not in range 0 to 0xffff" msgid "UUID integer value must be 0-0xffff"
msgstr "" msgstr ""
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
@ -1232,6 +1218,11 @@ msgstr ""
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "Não é possível alocar buffers para conversão assinada" msgstr "Não é possível alocar buffers para conversão assinada"
#: shared-module/displayio/I2CDisplay.c
#, c-format
msgid "Unable to find I2C Display at %x"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Unable to find free GCLK" msgid "Unable to find free GCLK"
@ -1909,8 +1900,9 @@ msgstr ""
msgid "integer required" msgid "integer required"
msgstr "inteiro requerido" msgstr "inteiro requerido"
#: ports/nrf/common-hal/bleio/Broadcaster.c #: shared-bindings/bleio/Peripheral.c shared-bindings/bleio/Scanner.c
msgid "interval not in range 0.0020 to 10.24" #, c-format
msgid "interval must be in range %s-%s"
msgstr "" msgstr ""
#: extmod/machine_i2c.c #: extmod/machine_i2c.c
@ -2125,6 +2117,14 @@ msgstr ""
msgid "no such attribute" msgid "no such attribute"
msgstr "" msgstr ""
#: shared-bindings/bleio/Peripheral.c
msgid "non-Service found in services"
msgstr ""
#: ports/nrf/common-hal/bleio/Central.c
msgid "non-UUID found in service_uuids"
msgstr ""
#: py/compile.c #: py/compile.c
msgid "non-default argument follows default argument" msgid "non-default argument follows default argument"
msgstr "" msgstr ""
@ -2334,10 +2334,6 @@ msgstr ""
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "compilação de script não suportada" msgstr "compilação de script não suportada"
#: shared-bindings/bleio/Peripheral.c
msgid "services includes an object that is not a Service"
msgstr ""
#: py/objstr.c #: py/objstr.c
msgid "sign not allowed in string format specifier" msgid "sign not allowed in string format specifier"
msgstr "" msgstr ""
@ -2606,6 +2602,10 @@ msgstr ""
msgid "value_count must be > 0" msgid "value_count must be > 0"
msgstr "" msgstr ""
#: shared-bindings/bleio/Scanner.c
msgid "window must be <= interval"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c #: shared-bindings/_pixelbuf/PixelBuf.c
msgid "write_args must be a list, tuple, or None" msgid "write_args must be a list, tuple, or None"
msgstr "" msgstr ""
@ -2649,6 +2649,10 @@ msgstr "passo zero"
#~ msgid "Cannot update i/f status" #~ msgid "Cannot update i/f status"
#~ msgstr "Não é possível atualizar o status i/f" #~ msgstr "Não é possível atualizar o status i/f"
#, fuzzy
#~ msgid "Data too large for the advertisement packet"
#~ msgstr "Não é possível ajustar dados no pacote de anúncios."
#~ msgid "Don't know how to pass object to native function" #~ msgid "Don't know how to pass object to native function"
#~ msgstr "Não sabe como passar o objeto para a função nativa" #~ msgstr "Não sabe como passar o objeto para a função nativa"
@ -2661,6 +2665,18 @@ msgstr "passo zero"
#~ msgid "Error in ffi_prep_cif" #~ msgid "Error in ffi_prep_cif"
#~ msgstr "Erro no ffi_prep_cif" #~ msgstr "Erro no ffi_prep_cif"
#, fuzzy
#~ msgid "Failed to acquire mutex"
#~ msgstr "Falha ao alocar buffer RX"
#, fuzzy
#~ msgid "Failed to add service"
#~ msgstr "Não pode parar propaganda. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to create mutex"
#~ msgstr "Não é possível ler o valor do atributo. status: 0x%02x"
#, fuzzy #, fuzzy
#~ msgid "Failed to notify or indicate attribute value, err %0x04x" #~ msgid "Failed to notify or indicate attribute value, err %0x04x"
#~ msgstr "Não é possível gravar o valor do atributo. status: 0x%02x" #~ msgstr "Não é possível gravar o valor do atributo. status: 0x%02x"
@ -2669,6 +2685,22 @@ msgstr "passo zero"
#~ msgid "Failed to read attribute value, err %0x04x" #~ msgid "Failed to read attribute value, err %0x04x"
#~ msgstr "Não é possível ler o valor do atributo. status: 0x%02x" #~ msgstr "Não é possível ler o valor do atributo. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to release mutex"
#~ msgstr "Não é possível ler o valor do atributo. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to start advertising"
#~ msgstr "Não é possível iniciar o anúncio. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to start scanning"
#~ msgstr "Não é possível iniciar o anúncio. status: 0x%02x"
#, fuzzy
#~ msgid "Failed to stop advertising"
#~ msgstr "Não pode parar propaganda. status: 0x%02x"
#~ msgid "GPIO16 does not support pull up." #~ msgid "GPIO16 does not support pull up."
#~ msgstr "GPIO16 não suporta pull up." #~ msgstr "GPIO16 não suporta pull up."

View File

@ -7,7 +7,7 @@ msgid ""
msgstr "" msgstr ""
"Project-Id-Version: circuitpython-cn\n" "Project-Id-Version: circuitpython-cn\n"
"Report-Msgid-Bugs-To: \n" "Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-06-11 14:59-0700\n" "POT-Creation-Date: 2019-07-19 16:10-0700\n"
"PO-Revision-Date: 2019-04-13 10:10-0700\n" "PO-Revision-Date: 2019-04-13 10:10-0700\n"
"Last-Translator: hexthat\n" "Last-Translator: hexthat\n"
"Language-Team: Chinese Hanyu Pinyin\n" "Language-Team: Chinese Hanyu Pinyin\n"
@ -219,16 +219,15 @@ msgstr "bù zhīchí 3-arg pow ()"
msgid "A hardware interrupt channel is already in use" msgid "A hardware interrupt channel is already in use"
msgstr "Yìngjiàn zhōngduàn tōngdào yǐ zài shǐyòng zhōng" msgstr "Yìngjiàn zhōngduàn tōngdào yǐ zài shǐyòng zhōng"
#: shared-bindings/bleio/Address.c
#, c-format
msgid "Address is not %d bytes long or is in wrong format"
msgstr "Dìzhǐ bùshì %d zì jié zhǎng, huòzhě géshì cuòwù"
#: shared-bindings/bleio/Address.c #: shared-bindings/bleio/Address.c
#, c-format #, c-format
msgid "Address must be %d bytes long" msgid "Address must be %d bytes long"
msgstr "Dìzhǐ bìxū shì %d zì jié zhǎng" msgstr "Dìzhǐ bìxū shì %d zì jié zhǎng"
#: shared-bindings/bleio/Address.c
msgid "Address type out of range"
msgstr ""
#: ports/nrf/common-hal/busio/I2C.c #: ports/nrf/common-hal/busio/I2C.c
msgid "All I2C peripherals are in use" msgid "All I2C peripherals are in use"
msgstr "Suǒyǒu I2C wàiwéi qì zhèngzài shǐyòng" msgstr "Suǒyǒu I2C wàiwéi qì zhèngzài shǐyòng"
@ -313,6 +312,10 @@ msgstr "Bǐtè shēndù bìxū shì 8 bèi yǐshàng."
msgid "Both pins must support hardware interrupts" msgid "Both pins must support hardware interrupts"
msgstr "Liǎng gè yǐn jiǎo dōu bìxū zhīchí yìngjiàn zhōngduàn" msgstr "Liǎng gè yǐn jiǎo dōu bìxū zhīchí yìngjiàn zhōngduàn"
#: shared-bindings/displayio/Display.c
msgid "Brightness must be 0-1.0"
msgstr ""
#: shared-bindings/supervisor/__init__.c #: shared-bindings/supervisor/__init__.c
msgid "Brightness must be between 0 and 255" msgid "Brightness must be between 0 and 255"
msgstr "Liàngdù bìxū jiè yú 0 dào 255 zhī jiān" msgstr "Liàngdù bìxū jiè yú 0 dào 255 zhī jiān"
@ -353,21 +356,9 @@ msgstr ""
msgid "Can not use dotstar with %s" msgid "Can not use dotstar with %s"
msgstr "Wúfǎ yǔ dotstar yīqǐ shǐyòng %s" msgstr "Wúfǎ yǔ dotstar yīqǐ shǐyòng %s"
#: shared-bindings/bleio/Device.c #: ports/nrf/common-hal/bleio/Characteristic.c
msgid "Can't add services in Central mode" msgid "Can't set CCCD for local Characteristic"
msgstr "Wúfǎ zài zhōngyāng móshì xià tiānjiā fúwù" msgstr ""
#: shared-bindings/bleio/Device.c
msgid "Can't advertise in Central mode"
msgstr "Wúfǎ zài zhōngyāng móshì zhōng guǎnggào"
#: shared-bindings/bleio/Device.c
msgid "Can't change the name in Central mode"
msgstr "Wúfǎ gēnggǎi zhōngyāng móshì de míngchēng"
#: shared-bindings/bleio/Device.c
msgid "Can't connect in Peripheral mode"
msgstr "Wúfǎ zài biānyuán móshì zhōng liánjiē"
#: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c #: shared-bindings/displayio/Bitmap.c shared-bindings/pulseio/PulseIn.c
msgid "Cannot delete values" msgid "Cannot delete values"
@ -450,10 +441,22 @@ msgstr "Shǐyòng shízhōng dānwèi"
msgid "Column entry must be digitalio.DigitalInOut" msgid "Column entry must be digitalio.DigitalInOut"
msgstr "Liè tiáomù bìxū shì digitalio.DigitalInOut" msgstr "Liè tiáomù bìxū shì digitalio.DigitalInOut"
#: shared-bindings/displayio/I2CDisplay.c
msgid "Command must be 0-255"
msgstr ""
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c
msgid "Command must be an int between 0 and 255" msgid "Command must be an int between 0 and 255"
msgstr "Mìnglìng bìxū shì 0 dào 255 zhī jiān de int" msgstr "Mìnglìng bìxū shì 0 dào 255 zhī jiān de int"
#: py/persistentcode.c
msgid "Corrupt .mpy file"
msgstr ""
#: py/emitglue.c
msgid "Corrupt raw code"
msgstr ""
#: ports/nrf/common-hal/bleio/UUID.c #: ports/nrf/common-hal/bleio/UUID.c
#, c-format #, c-format
msgid "Could not decode ble_uuid, err 0x%04x" msgid "Could not decode ble_uuid, err 0x%04x"
@ -488,15 +491,10 @@ msgstr "Shùjù 0 de yǐn jiǎo bìxū shì zì jié duìqí"
msgid "Data chunk must follow fmt chunk" msgid "Data chunk must follow fmt chunk"
msgstr "Shùjù kuài bìxū zūnxún fmt qū kuài" msgstr "Shùjù kuài bìxū zūnxún fmt qū kuài"
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Data too large for advertisement packet" msgid "Data too large for advertisement packet"
msgstr "Guǎnggào bāo de shùjù tài dà" msgstr "Guǎnggào bāo de shùjù tài dà"
#: ports/nrf/common-hal/bleio/Device.c
msgid "Data too large for the advertisement packet"
msgstr "Guǎnggào bāo de shùjù tài dà"
#: shared-bindings/audiobusio/PDMIn.c #: shared-bindings/audiobusio/PDMIn.c
msgid "Destination capacity is smaller than destination_length." msgid "Destination capacity is smaller than destination_length."
msgstr "Mùbiāo róngliàng xiǎoyú mùdì de_chángdù." msgstr "Mùbiāo róngliàng xiǎoyú mùdì de_chángdù."
@ -534,6 +532,10 @@ msgstr "Yùqí de tèdiǎn"
msgid "Expected a UUID" msgid "Expected a UUID"
msgstr "Yùqí UUID" msgstr "Yùqí UUID"
#: shared-bindings/bleio/Central.c
msgid "Expected an Address"
msgstr ""
#: shared-module/_pixelbuf/PixelBuf.c #: shared-module/_pixelbuf/PixelBuf.c
#, c-format #, c-format
msgid "Expected tuple of length %d, got %d" msgid "Expected tuple of length %d, got %d"
@ -543,11 +545,7 @@ msgstr "Qīwàng de chángdù wèi %d de yuán zǔ, dédào %d"
msgid "Failed sending command." msgid "Failed sending command."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
msgid "Failed to acquire mutex"
msgstr "Wúfǎ huòdé mutex"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, c-format #, c-format
msgid "Failed to acquire mutex, err 0x%04x" msgid "Failed to acquire mutex, err 0x%04x"
msgstr "Wúfǎ huòdé mutex, err 0x%04x" msgstr "Wúfǎ huòdé mutex, err 0x%04x"
@ -557,10 +555,6 @@ msgstr "Wúfǎ huòdé mutex, err 0x%04x"
msgid "Failed to add characteristic, err 0x%04x" msgid "Failed to add characteristic, err 0x%04x"
msgstr "Tiānjiā tèxìng shībài, err 0x%04x" msgstr "Tiānjiā tèxìng shībài, err 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to add service"
msgstr "Tiānjiā fúwù shībài"
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to add service, err 0x%04x" msgid "Failed to add service, err 0x%04x"
@ -580,24 +574,21 @@ msgstr "Fēnpèi RX huǎnchōng qū%d zì jié shībài"
msgid "Failed to change softdevice state" msgid "Failed to change softdevice state"
msgstr "Gēnggǎi ruǎn shèbèi zhuàngtài shībài" msgstr "Gēnggǎi ruǎn shèbèi zhuàngtài shībài"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Failed to connect:" #, c-format
msgstr "Liánjiē shībài:" msgid "Failed to configure advertising, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to continue scanning" msgid "Failed to connect: timeout"
msgstr "Jìxù sǎomiáo shībài" msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, c-format #, c-format
msgid "Failed to continue scanning, err 0x%04x" msgid "Failed to continue scanning, err 0x%04x"
msgstr "Jìxù sǎomiáo shībài, err 0x%04x" msgstr "Jìxù sǎomiáo shībài, err 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to create mutex"
msgstr "Wúfǎ chuàngjiàn hù chì suǒ"
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to discover services" msgid "Failed to discover services"
msgstr "Fāxiàn fúwù shībài" msgstr "Fāxiàn fúwù shībài"
@ -634,44 +625,41 @@ msgstr "Wúfǎ dòu qǔ gatts zhí, err 0x%04x"
msgid "Failed to register Vendor-Specific UUID, err 0x%04x" msgid "Failed to register Vendor-Specific UUID, err 0x%04x"
msgstr "Wúfǎ zhùcè màizhǔ tèdìng de UUID, err 0x%04x" msgstr "Wúfǎ zhùcè màizhǔ tèdìng de UUID, err 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/sd_mutex.c
msgid "Failed to release mutex"
msgstr "Wúfǎ shìfàng mutex"
#: ports/nrf/common-hal/bleio/Characteristic.c ports/nrf/sd_mutex.c
#, c-format #, c-format
msgid "Failed to release mutex, err 0x%04x" msgid "Failed to release mutex, err 0x%04x"
msgstr "Wúfǎ shìfàng mutex, err 0x%04x" msgstr "Wúfǎ shìfàng mutex, err 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Peripheral.c
msgid "Failed to start advertising" #, c-format
msgstr "Qǐdòng guǎnggào shībài" msgid "Failed to set device name, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to start advertising, err 0x%04x" msgid "Failed to start advertising, err 0x%04x"
msgstr "Qǐdòng guǎnggào shībài, err 0x%04x" msgstr "Qǐdòng guǎnggào shībài, err 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c #: ports/nrf/common-hal/bleio/Central.c
msgid "Failed to start scanning" #, c-format
msgstr "Qǐdòng sǎomiáo shībài" msgid "Failed to start connecting, error 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Scanner.c #: ports/nrf/common-hal/bleio/Scanner.c
#, c-format #, c-format
msgid "Failed to start scanning, err 0x%04x" msgid "Failed to start scanning, err 0x%04x"
msgstr "Qǐdòng sǎomiáo shībài, err 0x%04x" msgstr "Qǐdòng sǎomiáo shībài, err 0x%04x"
#: ports/nrf/common-hal/bleio/Device.c
msgid "Failed to stop advertising"
msgstr "Wúfǎ tíngzhǐ guǎnggào"
#: ports/nrf/common-hal/bleio/Broadcaster.c
#: ports/nrf/common-hal/bleio/Peripheral.c #: ports/nrf/common-hal/bleio/Peripheral.c
#, c-format #, c-format
msgid "Failed to stop advertising, err 0x%04x" msgid "Failed to stop advertising, err 0x%04x"
msgstr "Wúfǎ tíngzhǐ guǎnggào, err 0x%04x" msgstr "Wúfǎ tíngzhǐ guǎnggào, err 0x%04x"
#: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format
msgid "Failed to write CCCD, err 0x%04x"
msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c #: ports/nrf/common-hal/bleio/Characteristic.c
#, c-format #, c-format
msgid "Failed to write attribute value, err 0x%04x" msgid "Failed to write attribute value, err 0x%04x"
@ -893,6 +881,10 @@ msgstr "Màikèfēng qǐdòng yánchí bìxū zài 0.0 Dào 1.0 De fànwéi nèi
msgid "Must be a %q subclass." msgid "Must be a %q subclass."
msgstr "" msgstr ""
#: ports/nrf/common-hal/bleio/Characteristic.c
msgid "No CCCD for this Characteristic"
msgstr ""
#: ports/atmel-samd/common-hal/analogio/AnalogOut.c #: ports/atmel-samd/common-hal/analogio/AnalogOut.c
msgid "No DAC on chip" msgid "No DAC on chip"
msgstr "Méiyǒu DAC zài xīnpiàn shàng de" msgstr "Méiyǒu DAC zài xīnpiàn shàng de"
@ -943,6 +935,7 @@ msgstr "Shèbèi shàng méiyǒu kònggé"
msgid "No such file/directory" msgid "No such file/directory"
msgstr "Méiyǒu cǐ lèi wénjiàn/mùlù" msgstr "Méiyǒu cǐ lèi wénjiàn/mùlù"
#: ports/nrf/common-hal/bleio/Characteristic.c
#: shared-bindings/bleio/CharacteristicBuffer.c #: shared-bindings/bleio/CharacteristicBuffer.c
msgid "Not connected" msgid "Not connected"
msgstr "Wèi liánjiē" msgstr "Wèi liánjiē"
@ -1188,7 +1181,8 @@ msgstr "Yào tuìchū, qǐng chóng zhì bǎnkuài ér bùyòng "
msgid "Too many channels in sample." msgid "Too many channels in sample."
msgstr "Chōuyàng zhōng de píndào tài duō." msgstr "Chōuyàng zhōng de píndào tài duō."
#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/ParallelBus.c #: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c
#: shared-bindings/displayio/ParallelBus.c
msgid "Too many display busses" msgid "Too many display busses"
msgstr "Xiǎnshì zǒngxiàn tài duōle" msgstr "Xiǎnshì zǒngxiàn tài duōle"
@ -1213,8 +1207,8 @@ msgid "USB Error"
msgstr "USB Cuòwù" msgstr "USB Cuòwù"
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID integer value not in range 0 to 0xffff" msgid "UUID integer value must be 0-0xffff"
msgstr "UUID zhěngshù zhí bùzài fànwéi 0 zhì 0xffff" msgstr ""
#: shared-bindings/bleio/UUID.c #: shared-bindings/bleio/UUID.c
msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'"
@ -1229,6 +1223,11 @@ msgstr "UUID zhí bùshì str,int huò zì jié huǎnchōng qū"
msgid "Unable to allocate buffers for signed conversion" msgid "Unable to allocate buffers for signed conversion"
msgstr "Wúfǎ fēnpèi huǎnchōng qū yòng yú qiānmíng zhuǎnhuàn" msgstr "Wúfǎ fēnpèi huǎnchōng qū yòng yú qiānmíng zhuǎnhuàn"
#: shared-module/displayio/I2CDisplay.c
#, c-format
msgid "Unable to find I2C Display at %x"
msgstr ""
#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c
#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c
msgid "Unable to find free GCLK" msgid "Unable to find free GCLK"
@ -1911,9 +1910,10 @@ msgstr "zhěngshù() cānshù 2 bìxū > = 2 qiě <= 36"
msgid "integer required" msgid "integer required"
msgstr "xūyào zhěngshù" msgstr "xūyào zhěngshù"
#: ports/nrf/common-hal/bleio/Broadcaster.c #: shared-bindings/bleio/Peripheral.c shared-bindings/bleio/Scanner.c
msgid "interval not in range 0.0020 to 10.24" #, c-format
msgstr "jùlí 0.0020 Zhì 10.24 Zhī jiān de jiàngé shíjiān" msgid "interval must be in range %s-%s"
msgstr ""
#: extmod/machine_i2c.c #: extmod/machine_i2c.c
msgid "invalid I2C peripheral" msgid "invalid I2C peripheral"
@ -2128,6 +2128,14 @@ msgstr "méiyǒu mókuài '%q'"
msgid "no such attribute" msgid "no such attribute"
msgstr "méiyǒu cǐ shǔxìng" msgstr "méiyǒu cǐ shǔxìng"
#: shared-bindings/bleio/Peripheral.c
msgid "non-Service found in services"
msgstr ""
#: ports/nrf/common-hal/bleio/Central.c
msgid "non-UUID found in service_uuids"
msgstr ""
#: py/compile.c #: py/compile.c
msgid "non-default argument follows default argument" msgid "non-default argument follows default argument"
msgstr "bùshì mòrèn cānshù zūnxún mòrèn cānshù" msgstr "bùshì mòrèn cānshù zūnxún mòrèn cānshù"
@ -2338,10 +2346,6 @@ msgstr "jìhuà duīzhàn yǐ mǎn"
msgid "script compilation not supported" msgid "script compilation not supported"
msgstr "bù zhīchí jiǎoběn biānyì" msgstr "bù zhīchí jiǎoběn biānyì"
#: shared-bindings/bleio/Peripheral.c
msgid "services includes an object that is not a Service"
msgstr "fúwù bāokuò yīgè bùshì fúwù de wùjiàn"
#: py/objstr.c #: py/objstr.c
msgid "sign not allowed in string format specifier" msgid "sign not allowed in string format specifier"
msgstr "zìfú chuàn géshì shuōmíng fú zhōng bù yǔnxǔ shǐyòng fúhào" msgstr "zìfú chuàn géshì shuōmíng fú zhōng bù yǔnxǔ shǐyòng fúhào"
@ -2608,6 +2612,10 @@ msgstr ""
msgid "value_count must be > 0" msgid "value_count must be > 0"
msgstr "zhí jìshù bìxū wèi > 0" msgstr "zhí jìshù bìxū wèi > 0"
#: shared-bindings/bleio/Scanner.c
msgid "window must be <= interval"
msgstr ""
#: shared-bindings/_pixelbuf/PixelBuf.c #: shared-bindings/_pixelbuf/PixelBuf.c
msgid "write_args must be a list, tuple, or None" msgid "write_args must be a list, tuple, or None"
msgstr "xiě cānshù bìxū shì yuán zǔ, lièbiǎo huò None" msgstr "xiě cānshù bìxū shì yuán zǔ, lièbiǎo huò None"
@ -2636,6 +2644,51 @@ msgstr "y zhí chāochū biānjiè"
msgid "zero step" msgid "zero step"
msgstr "líng bù" msgstr "líng bù"
#~ msgid "Address is not %d bytes long or is in wrong format"
#~ msgstr "Dìzhǐ bùshì %d zì jié zhǎng, huòzhě géshì cuòwù"
#~ msgid "Can't add services in Central mode"
#~ msgstr "Wúfǎ zài zhōngyāng móshì xià tiānjiā fúwù"
#~ msgid "Can't advertise in Central mode"
#~ msgstr "Wúfǎ zài zhōngyāng móshì zhōng guǎnggào"
#~ msgid "Can't change the name in Central mode"
#~ msgstr "Wúfǎ gēnggǎi zhōngyāng móshì de míngchēng"
#~ msgid "Can't connect in Peripheral mode"
#~ msgstr "Wúfǎ zài biānyuán móshì zhōng liánjiē"
#~ msgid "Data too large for the advertisement packet"
#~ msgstr "Guǎnggào bāo de shùjù tài dà"
#~ msgid "Failed to acquire mutex"
#~ msgstr "Wúfǎ huòdé mutex"
#~ msgid "Failed to add service"
#~ msgstr "Tiānjiā fúwù shībài"
#~ msgid "Failed to connect:"
#~ msgstr "Liánjiē shībài:"
#~ msgid "Failed to continue scanning"
#~ msgstr "Jìxù sǎomiáo shībài"
#~ msgid "Failed to create mutex"
#~ msgstr "Wúfǎ chuàngjiàn hù chì suǒ"
#~ msgid "Failed to release mutex"
#~ msgstr "Wúfǎ shìfàng mutex"
#~ msgid "Failed to start advertising"
#~ msgstr "Qǐdòng guǎnggào shībài"
#~ msgid "Failed to start scanning"
#~ msgstr "Qǐdòng sǎomiáo shībài"
#~ msgid "Failed to stop advertising"
#~ msgstr "Wúfǎ tíngzhǐ guǎnggào"
#~ msgid "Invalid bit clock pin" #~ msgid "Invalid bit clock pin"
#~ msgstr "Wúxiào de wèi shízhōng yǐn jiǎo" #~ msgstr "Wúxiào de wèi shízhōng yǐn jiǎo"
@ -2660,12 +2713,21 @@ msgstr "líng bù"
#~ msgid "Only bit maps of 8 bit color or less are supported" #~ msgid "Only bit maps of 8 bit color or less are supported"
#~ msgstr "Jǐn zhīchí 8 wèi yánsè huò xiǎoyú" #~ msgstr "Jǐn zhīchí 8 wèi yánsè huò xiǎoyú"
#~ msgid "UUID integer value not in range 0 to 0xffff"
#~ msgstr "UUID zhěngshù zhí bùzài fànwéi 0 zhì 0xffff"
#~ msgid "expected a DigitalInOut" #~ msgid "expected a DigitalInOut"
#~ msgstr "qídài de DigitalInOut" #~ msgstr "qídài de DigitalInOut"
#~ msgid "interval not in range 0.0020 to 10.24"
#~ msgstr "jùlí 0.0020 Zhì 10.24 Zhī jiān de jiàngé shíjiān"
#~ msgid "row must be packed and word aligned" #~ msgid "row must be packed and word aligned"
#~ msgstr "xíng bìxū dǎbāo bìngqiě zì duìqí" #~ msgstr "xíng bìxū dǎbāo bìngqiě zì duìqí"
#~ msgid "services includes an object that is not a Service"
#~ msgstr "fúwù bāokuò yīgè bùshì fúwù de wùjiàn"
#~ msgid "too many arguments" #~ msgid "too many arguments"
#~ msgstr "tài duō cānshù" #~ msgstr "tài duō cānshù"

View File

@ -124,15 +124,20 @@ Setup
----- -----
An ARM compiler is required for the build, along with the associated binary An ARM compiler is required for the build, along with the associated binary
utilities. On Ubuntu, these can be installed as follows: utilities. They can be installed as follows:
.. code-block:: shell - Ubuntu
.. code-block:: shell
sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa sudo add-apt-repository ppa:team-gcc-arm-embedded/ppa
sudo apt-get install gcc-arm-embedded sudo apt-get install gcc-arm-embedded
On Arch Linux the compiler is available for via the package - Arch Linux
``arm-none-eabi-gcc``.
.. code-block:: shell
sudo pacman -S arm-none-eabi-gcc arm-none-eabi-newlib
For other systems, the `GNU Arm Embedded Toolchain <https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads>`_ For other systems, the `GNU Arm Embedded Toolchain <https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads>`_
may be available in binary form. may be available in binary form.

View File

@ -3,7 +3,7 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2018 hathach for Adafruit Industries * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -24,20 +24,15 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#ifndef USB_DESC_H_ #include "boards/board.h"
#define USB_DESC_H_
#include "lib/tinyusb/src/tusb.h" void board_init(void)
{
}
#ifdef __cplusplus bool board_requests_safe_mode(void) {
extern "C" { return false;
#endif }
// Descriptors set used by tinyusb stack void reset_board(void) {
extern tud_desc_set_t tud_desc_set; }
#ifdef __cplusplus
}
#endif
#endif /* USB_DESC_H_ */

View File

@ -0,0 +1,29 @@
// LEDs
#define MICROPY_HW_LED_STATUS (&pin_PA17)
#define MICROPY_HW_LED_TX &pin_PA27
#define MICROPY_HW_LED_RX &pin_PA17
#define MICROPY_HW_BOARD_NAME "J&J Studios datum-Distance"
#define MICROPY_HW_MCU_NAME "samd21g18"
#define MICROPY_PORT_A (0)
#define MICROPY_PORT_B (0)
#define MICROPY_PORT_C (0)
#define CIRCUITPY_INTERNAL_NVM_SIZE 256
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE)
#define DEFAULT_I2C_BUS_SCL (&pin_PA23)
#define DEFAULT_I2C_BUS_SDA (&pin_PA22)
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
#define DEFAULT_SPI_BUS_MISO (&pin_PA12)
#define DEFAULT_UART_BUS_RX (&pin_PA11)
#define DEFAULT_UART_BUS_TX (&pin_PA10)
// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1

View File

@ -0,0 +1,14 @@
LD_FILE = boards/samd21x18-bootloader.ld
USB_VID = 0x04D8
USB_PID = 0xEE8C
USB_PRODUCT = "datum-Distance"
USB_MANUFACTURER = "J&J Studios LLC"
CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1
SUPEROPT_GC = 0

View File

@ -0,0 +1,27 @@
#include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) },
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA20) },
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA21) },
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

View File

@ -3,7 +3,7 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -24,11 +24,15 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#ifndef MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_ADVERTISEMENTDATA_H #include "boards/board.h"
#define MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_ADVERTISEMENTDATA_H
#include "py/obj.h" void board_init(void)
{
}
extern const mp_obj_type_t bleio_advertisementdata_type; bool board_requests_safe_mode(void) {
return false;
}
#endif // MICROPY_INCLUDED_SHARED_BINDINGS_BLEIO_ADVERTISEMENTDATA_H void reset_board(void) {
}

View File

@ -0,0 +1,29 @@
// LEDs
#define MICROPY_HW_LED_STATUS (&pin_PA17)
#define MICROPY_HW_LED_TX &pin_PA27
#define MICROPY_HW_LED_RX &pin_PA17
#define MICROPY_HW_BOARD_NAME "J&J Studios datum-IMU"
#define MICROPY_HW_MCU_NAME "samd21g18"
#define MICROPY_PORT_A (0)
#define MICROPY_PORT_B (0)
#define MICROPY_PORT_C (0)
#define CIRCUITPY_INTERNAL_NVM_SIZE 256
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE)
#define DEFAULT_I2C_BUS_SCL (&pin_PA23)
#define DEFAULT_I2C_BUS_SDA (&pin_PA22)
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
#define DEFAULT_SPI_BUS_MISO (&pin_PA12)
#define DEFAULT_UART_BUS_RX (&pin_PA11)
#define DEFAULT_UART_BUS_TX (&pin_PA10)
// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1

View File

@ -0,0 +1,14 @@
LD_FILE = boards/samd21x18-bootloader.ld
USB_VID = 0x04D8
USB_PID = 0xEE8D
USB_PRODUCT = "datum-IMU"
USB_MANUFACTURER = "J&J Studios LLC"
CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1
SUPEROPT_GC = 0

View File

@ -0,0 +1,29 @@
#include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA03) },
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) },
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA20) },
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA21) },
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

View File

@ -0,0 +1,38 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "boards/board.h"
void board_init(void)
{
}
bool board_requests_safe_mode(void) {
return false;
}
void reset_board(void) {
}

View File

@ -0,0 +1,29 @@
// LEDs
#define MICROPY_HW_LED_STATUS (&pin_PA17)
#define MICROPY_HW_LED_TX &pin_PA27
#define MICROPY_HW_LED_RX &pin_PA17
#define MICROPY_HW_BOARD_NAME "J&J Studios datum-Light"
#define MICROPY_HW_MCU_NAME "samd21g18"
#define MICROPY_PORT_A (0)
#define MICROPY_PORT_B (0)
#define MICROPY_PORT_C (0)
#define CIRCUITPY_INTERNAL_NVM_SIZE 256
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE)
#define DEFAULT_I2C_BUS_SCL (&pin_PA23)
#define DEFAULT_I2C_BUS_SDA (&pin_PA22)
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
#define DEFAULT_SPI_BUS_MISO (&pin_PA12)
#define DEFAULT_UART_BUS_RX (&pin_PA11)
#define DEFAULT_UART_BUS_TX (&pin_PA10)
// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1

View File

@ -0,0 +1,14 @@
LD_FILE = boards/samd21x18-bootloader.ld
USB_VID = 0x04D8
USB_PID = 0xEE8E
USB_PRODUCT = "datum-Light"
USB_MANUFACTURER = "J&J Studios LLC"
CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1
SUPEROPT_GC = 0

View File

@ -0,0 +1,27 @@
#include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) },
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA20) },
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA21) },
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

View File

@ -0,0 +1,38 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "boards/board.h"
void board_init(void)
{
}
bool board_requests_safe_mode(void) {
return false;
}
void reset_board(void) {
}

View File

@ -0,0 +1,29 @@
// LEDs
#define MICROPY_HW_LED_STATUS (&pin_PA17)
#define MICROPY_HW_LED_TX &pin_PA27
#define MICROPY_HW_LED_RX &pin_PA17
#define MICROPY_HW_BOARD_NAME "J&J Studios datum-Weather"
#define MICROPY_HW_MCU_NAME "samd21g18"
#define MICROPY_PORT_A (0)
#define MICROPY_PORT_B (0)
#define MICROPY_PORT_C (0)
#define CIRCUITPY_INTERNAL_NVM_SIZE 256
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE)
#define DEFAULT_I2C_BUS_SCL (&pin_PA23)
#define DEFAULT_I2C_BUS_SDA (&pin_PA22)
#define DEFAULT_SPI_BUS_SCK (&pin_PB11)
#define DEFAULT_SPI_BUS_MOSI (&pin_PB10)
#define DEFAULT_SPI_BUS_MISO (&pin_PA12)
#define DEFAULT_UART_BUS_RX (&pin_PA11)
#define DEFAULT_UART_BUS_TX (&pin_PA10)
// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1

View File

@ -0,0 +1,14 @@
LD_FILE = boards/samd21x18-bootloader.ld
USB_VID = 0x04D8
USB_PID = 0xEE8F
USB_PRODUCT = "datum-Weather"
USB_MANUFACTURER = "J&J Studios LLC"
CHIP_VARIANT = SAMD21G18A
CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1
SUPEROPT_GC = 0

View File

@ -0,0 +1,27 @@
#include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PB11) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PB10) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA12) },
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA22) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA23) },
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_PA20) },
{ MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_PA21) },
{ MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_D10), MP_ROM_PTR(&pin_PA18) },
{ MP_ROM_QSTR(MP_QSTR_D11), MP_ROM_PTR(&pin_PA16) },
{ MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_PA19) },
{ MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_PA17) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

View File

@ -91,6 +91,8 @@ void board_init(void) {
1, // row start 1, // row start
0, // rotation 0, // rotation
16, // Color depth 16, // Color depth
false, // Grayscale
false, // Pixels in a byte share a row. Only used for depth < 8
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
@ -98,6 +100,7 @@ void board_init(void) {
display_init_sequence, display_init_sequence,
sizeof(display_init_sequence), sizeof(display_init_sequence),
&pin_PA00, &pin_PA00,
NO_BRIGHTNESS_COMMAND,
1.0f, // brightness (ignored) 1.0f, // brightness (ignored)
true, // auto_brightness true, // auto_brightness
false, // single_byte_bounds false, // single_byte_bounds

View File

@ -16,6 +16,7 @@ LONGINT_IMPL = MPZ
CIRCUITPY_I2CSLAVE = 0 CIRCUITPY_I2CSLAVE = 0
CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_FREQUENCYIO = 0
CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_AUDIOBUSIO = 0
CIRCUITPY_BITBANGIO = 0
SUPEROPT_GC = 0 SUPEROPT_GC = 0
# Include these Python libraries in firmware. # Include these Python libraries in firmware.

View File

@ -5,8 +5,5 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_PA00) }, { MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_PA00) },
{ MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_PA01) }, { MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_PA01) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
}; };
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

View File

@ -93,6 +93,8 @@ void board_init(void) {
0, // row start 0, // row start
270, // rotation 270, // rotation
16, // Color depth 16, // Color depth
false, // grayscale
false, // pixels in byte share row. only used for depth < 8
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
@ -100,6 +102,7 @@ void board_init(void) {
display_init_sequence, display_init_sequence,
sizeof(display_init_sequence), sizeof(display_init_sequence),
&pin_PA01, // backlight pin &pin_PA01, // backlight pin
NO_BRIGHTNESS_COMMAND,
1.0f, // brightness (ignored) 1.0f, // brightness (ignored)
true, // auto_brightness true, // auto_brightness
false, // single_byte_bounds false, // single_byte_bounds

View File

@ -71,6 +71,8 @@ void board_init(void) {
0, // row start 0, // row start
90, // rotation 90, // rotation
16, // Color depth 16, // Color depth
false, // grayscale
false, // pixels in byte share row. Only used for depth < 8
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
@ -78,6 +80,7 @@ void board_init(void) {
display_init_sequence, display_init_sequence,
sizeof(display_init_sequence), sizeof(display_init_sequence),
&pin_PA01, // backlight pin &pin_PA01, // backlight pin
NO_BRIGHTNESS_COMMAND,
1.0f, // brightness (ignored) 1.0f, // brightness (ignored)
true, // auto_brightness true, // auto_brightness
false, // single_byte_bounds false, // single_byte_bounds

View File

@ -93,6 +93,8 @@ void board_init(void) {
0, // row start 0, // row start
270, // rotation 270, // rotation
16, // Color depth 16, // Color depth
false, // Grayscale
false, // pixels in a byte share a row. Only valid for depths < 8
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
@ -100,6 +102,7 @@ void board_init(void) {
display_init_sequence, display_init_sequence,
sizeof(display_init_sequence), sizeof(display_init_sequence),
&pin_PA01, // backlight pin &pin_PA01, // backlight pin
NO_BRIGHTNESS_COMMAND,
1.0f, // brightness (ignored) 1.0f, // brightness (ignored)
true, // auto_brightness true, // auto_brightness
false, // single_byte_bounds false, // single_byte_bounds

View File

@ -71,6 +71,8 @@ void board_init(void) {
0, // row start 0, // row start
90, // rotation 90, // rotation
16, // Color depth 16, // Color depth
false, // Grayscale
false, // pixels in a byte share a row. Only valid for depths < 8
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
@ -78,6 +80,7 @@ void board_init(void) {
display_init_sequence, display_init_sequence,
sizeof(display_init_sequence), sizeof(display_init_sequence),
&pin_PA01, // backlight pin &pin_PA01, // backlight pin
NO_BRIGHTNESS_COMMAND,
1.0f, // brightness (ignored) 1.0f, // brightness (ignored)
true, // auto_brightness true, // auto_brightness
false, // single_byte_bounds false, // single_byte_bounds

View File

@ -83,13 +83,16 @@ void board_init(void) {
0, // row start 0, // row start
0, // rotation 0, // rotation
16, // Color depth 16, // Color depth
false, // grayscale
false, // pixels_in_byte_share_row (unused for depths > 8)
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
0x37, // Set vertical scroll command 0x37, // Set vertical scroll command
display_init_sequence, display_init_sequence,
sizeof(display_init_sequence), sizeof(display_init_sequence),
&pin_PB31, &pin_PB31, // Backlight pin
NO_BRIGHTNESS_COMMAND,
1.0f, // brightness (ignored) 1.0f, // brightness (ignored)
true, // auto_brightness true, // auto_brightness
false, // single_byte_bounds false, // single_byte_bounds

View File

@ -0,0 +1,37 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2017 Scott Shawcroft for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "boards/board.h"
void board_init(void) {
}
bool board_requests_safe_mode(void) {
return false;
}
void reset_board(void) {
}

View File

@ -0,0 +1,63 @@
#define MICROPY_HW_BOARD_NAME "Adafruit PyRuler"
#define MICROPY_HW_MCU_NAME "samd21e18"
#define MICROPY_HW_LED_STATUS (&pin_PA10)
#define MICROPY_HW_APA102_MOSI (&pin_PA00)
#define MICROPY_HW_APA102_SCK (&pin_PA01)
#define MICROPY_PORT_A (PORT_PA00 | PORT_PA01)
#define MICROPY_PORT_B (0)
#define MICROPY_PORT_C (0)
#define CIRCUITPY_INTERNAL_NVM_SIZE 256
#define BOARD_FLASH_SIZE (0x00040000 - 0x2000 - 0x010000 - CIRCUITPY_INTERNAL_NVM_SIZE)
#define IGNORE_PIN_PA12 1
#define IGNORE_PIN_PA13 1
#define IGNORE_PIN_PA16 1
#define IGNORE_PIN_PA17 1
#define IGNORE_PIN_PA18 1
#define IGNORE_PIN_PA19 1
#define IGNORE_PIN_PA20 1
#define IGNORE_PIN_PA21 1
#define IGNORE_PIN_PA22 1
#define IGNORE_PIN_PA23 1
// USB is always used internally so skip the pin objects for it.
#define IGNORE_PIN_PA24 1
#define IGNORE_PIN_PA25 1
#define IGNORE_PIN_PA30 1
#define IGNORE_PIN_PA31 1
#define IGNORE_PIN_PB01 1
#define IGNORE_PIN_PB02 1
#define IGNORE_PIN_PB03 1
#define IGNORE_PIN_PB04 1
#define IGNORE_PIN_PB05 1
#define IGNORE_PIN_PB06 1
#define IGNORE_PIN_PB07 1
#define IGNORE_PIN_PB08 1
#define IGNORE_PIN_PB09 1
#define IGNORE_PIN_PB10 1
#define IGNORE_PIN_PB11 1
#define IGNORE_PIN_PB12 1
#define IGNORE_PIN_PB13 1
#define IGNORE_PIN_PB14 1
#define IGNORE_PIN_PB15 1
#define IGNORE_PIN_PB16 1
#define IGNORE_PIN_PB17 1
#define IGNORE_PIN_PB22 1
#define IGNORE_PIN_PB23 1
#define IGNORE_PIN_PB30 1
#define IGNORE_PIN_PB31 1
#define IGNORE_PIN_PB00 1
#define DEFAULT_I2C_BUS_SCL (&pin_PA09)
#define DEFAULT_I2C_BUS_SDA (&pin_PA08)
#define DEFAULT_SPI_BUS_SCK (&pin_PA07)
#define DEFAULT_SPI_BUS_MOSI (&pin_PA06)
#define DEFAULT_SPI_BUS_MISO (&pin_PA09)
#define DEFAULT_UART_BUS_RX (&pin_PA07)
#define DEFAULT_UART_BUS_TX (&pin_PA06)

View File

@ -0,0 +1,14 @@
LD_FILE = boards/samd21x18-bootloader.ld
USB_VID = 0x239A
USB_PID = 0x804C
USB_PRODUCT = "PyRuler"
USB_MANUFACTURER = "Adafruit Industries LLC"
CHIP_VARIANT = SAMD21E18A
CHIP_FAMILY = samd21
INTERNAL_FLASH_FILESYSTEM = 1
LONGINT_IMPL = NONE
CIRCUITPY_SMALL_BUILD = 1
SUPEROPT_GC = 0

View File

@ -0,0 +1,50 @@
#include "shared-bindings/board/__init__.h"
STATIC const mp_rom_map_elem_t board_global_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) },
{ MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_CAP0), MP_ROM_PTR(&pin_PA11) },
{ MP_ROM_QSTR(MP_QSTR_CAP1), MP_ROM_PTR(&pin_PA05) },
{ MP_ROM_QSTR(MP_QSTR_CAP2), MP_ROM_PTR(&pin_PA04) },
{ MP_ROM_QSTR(MP_QSTR_CAP3), MP_ROM_PTR(&pin_PA03) },
{ MP_ROM_QSTR(MP_QSTR_LED4), MP_ROM_PTR(&pin_PA15) },
{ MP_ROM_QSTR(MP_QSTR_LED5), MP_ROM_PTR(&pin_PA14) },
{ MP_ROM_QSTR(MP_QSTR_LED6), MP_ROM_PTR(&pin_PA28) },
{ MP_ROM_QSTR(MP_QSTR_LED7), MP_ROM_PTR(&pin_PA27) },
{ MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA09) },
{ MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA06) },
{ MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA07) },
{ MP_ROM_QSTR(MP_QSTR_D13),MP_ROM_PTR(&pin_PA10) },
{ MP_ROM_QSTR(MP_QSTR_APA102_MOSI), MP_ROM_PTR(&pin_PA00) },
{ MP_ROM_QSTR(MP_QSTR_APA102_SCK), MP_ROM_PTR(&pin_PA01) },
{ MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) },
{ MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) },
{ MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) },
};
MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table);

View File

@ -91,6 +91,8 @@ void board_init(void) {
2, // row start 2, // row start
0, // rotation 0, // rotation
16, // Color depth 16, // Color depth
false, // grayscale
false, // pixels in byte share row. Only used with depth < 8
MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command MIPI_COMMAND_SET_COLUMN_ADDRESS, // Set column command
MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command MIPI_COMMAND_SET_PAGE_ADDRESS, // Set row command
MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command MIPI_COMMAND_WRITE_MEMORY_START, // Write memory command
@ -98,6 +100,7 @@ void board_init(void) {
display_init_sequence, display_init_sequence,
sizeof(display_init_sequence), sizeof(display_init_sequence),
NULL, NULL,
NO_BRIGHTNESS_COMMAND,
1.0f, // brightness 1.0f, // brightness
false, // auto_brightness false, // auto_brightness
false, // single_byte_bounds false, // single_byte_bounds

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -31,4 +31,4 @@ CIRCUITPY_PIXELBUF = 0
FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/ugame10 FROZEN_MPY_DIRS += $(TOP)/frozen/circuitpython-stage/ugame10
CIRCUITPY_DISPLAY_FONT = "../../tools/Tecate-bitmap-fonts/bitmap/phallus/lemon.bdf" CIRCUITPY_DISPLAY_FONT = $(TOP)/ports/atmel-samd/boards/ugame10/brutalist-6.bdf

View File

@ -36,6 +36,8 @@
#include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/microcontroller/__init__.h"
#include "supervisor/shared/translate.h" #include "supervisor/shared/translate.h"
#include "common-hal/busio/SPI.h" // for never_reset_sercom
// Number of times to try to send packet if failed. // Number of times to try to send packet if failed.
#define ATTEMPTS 2 #define ATTEMPTS 2
@ -225,3 +227,10 @@ uint8_t common_hal_busio_i2c_read(busio_i2c_obj_t *self, uint16_t addr,
} }
return MP_EIO; return MP_EIO;
} }
void common_hal_busio_i2c_never_reset(busio_i2c_obj_t *self) {
never_reset_sercom(self->i2c_desc.device.hw);
never_reset_pin_number(self->scl_pin);
never_reset_pin_number(self->sda_pin);
}

View File

@ -43,6 +43,7 @@ typedef struct {
} busio_spi_obj_t; } busio_spi_obj_t;
void reset_sercoms(void); void reset_sercoms(void);
void never_reset_sercom(Sercom* sercom);
#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_SPI_H #endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_BUSIO_SPI_H

View File

@ -55,7 +55,7 @@ static void usart_async_rxc_callback(const struct usart_async_descriptor *const
void common_hal_busio_uart_construct(busio_uart_obj_t *self, 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, 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, mp_float_t timeout, uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout,
uint8_t receiver_buffer_size) { uint16_t receiver_buffer_size) {
Sercom* sercom = NULL; Sercom* sercom = NULL;
uint8_t sercom_index = 255; // Unset index uint8_t sercom_index = 255; // Unset index
uint32_t rx_pinmux = 0; uint32_t rx_pinmux = 0;
@ -88,11 +88,19 @@ void common_hal_busio_uart_construct(busio_uart_obj_t *self,
continue; continue;
} }
potential_sercom = sercom_insts[sercom_index]; potential_sercom = sercom_insts[sercom_index];
#ifdef SAMD21
if (potential_sercom->USART.CTRLA.bit.ENABLE != 0 || if (potential_sercom->USART.CTRLA.bit.ENABLE != 0 ||
!(tx->sercom[i].pad == 0 || !(tx->sercom[i].pad == 0 ||
tx->sercom[i].pad == 2)) { tx->sercom[i].pad == 2)) {
continue; continue;
} }
#endif
#ifdef SAMD51
if (potential_sercom->USART.CTRLA.bit.ENABLE != 0 ||
!(tx->sercom[i].pad == 0)) {
continue;
}
#endif
tx_pinmux = PINMUX(tx->number, (i == 0) ? MUX_C : MUX_D); tx_pinmux = PINMUX(tx->number, (i == 0) ? MUX_C : MUX_D);
tx_pad = tx->sercom[i].pad; tx_pad = tx->sercom[i].pad;
if (rx == mp_const_none) { if (rx == mp_const_none) {

View File

@ -31,6 +31,7 @@
#include "common-hal/microcontroller/Pin.h" #include "common-hal/microcontroller/Pin.h"
#include "py/runtime.h" #include "py/runtime.h"
#include "shared-bindings/digitalio/DigitalInOut.h" #include "shared-bindings/digitalio/DigitalInOut.h"
#include "shared-bindings/microcontroller/__init__.h"
#include "tick.h" #include "tick.h"
@ -66,10 +67,6 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel
common_hal_digitalio_digitalinout_construct(&self->chip_select, chip_select); common_hal_digitalio_digitalinout_construct(&self->chip_select, chip_select);
common_hal_digitalio_digitalinout_switch_to_output(&self->chip_select, true, DRIVE_MODE_PUSH_PULL); common_hal_digitalio_digitalinout_switch_to_output(&self->chip_select, true, DRIVE_MODE_PUSH_PULL);
self->reset.base.type = &digitalio_digitalinout_type;
common_hal_digitalio_digitalinout_construct(&self->reset, reset);
common_hal_digitalio_digitalinout_switch_to_output(&self->reset, true, DRIVE_MODE_PUSH_PULL);
self->write.base.type = &digitalio_digitalinout_type; self->write.base.type = &digitalio_digitalinout_type;
common_hal_digitalio_digitalinout_construct(&self->write, write); common_hal_digitalio_digitalinout_construct(&self->write, write);
common_hal_digitalio_digitalinout_switch_to_output(&self->write, true, DRIVE_MODE_PUSH_PULL); common_hal_digitalio_digitalinout_switch_to_output(&self->write, true, DRIVE_MODE_PUSH_PULL);
@ -82,11 +79,21 @@ void common_hal_displayio_parallelbus_construct(displayio_parallelbus_obj_t* sel
self->write_group = &PORT->Group[write->number / 32]; self->write_group = &PORT->Group[write->number / 32];
self->write_mask = 1 << (write->number % 32); self->write_mask = 1 << (write->number % 32);
if (reset != NULL) {
self->reset.base.type = &digitalio_digitalinout_type;
common_hal_digitalio_digitalinout_construct(&self->reset, reset);
common_hal_digitalio_digitalinout_switch_to_output(&self->reset, true, DRIVE_MODE_PUSH_PULL);
never_reset_pin_number(reset->number);
common_hal_digitalio_digitalinout_set_value(&self->reset, false);
common_hal_mcu_delay_us(4);
common_hal_digitalio_digitalinout_set_value(&self->reset, true);
}
never_reset_pin_number(command->number); never_reset_pin_number(command->number);
never_reset_pin_number(chip_select->number); never_reset_pin_number(chip_select->number);
never_reset_pin_number(write->number); never_reset_pin_number(write->number);
never_reset_pin_number(read->number); never_reset_pin_number(read->number);
never_reset_pin_number(reset->number);
for (uint8_t i = 0; i < 8; i++) { for (uint8_t i = 0; i < 8; i++) {
never_reset_pin_number(data_pin + i); never_reset_pin_number(data_pin + i);
} }

View File

@ -17,7 +17,7 @@ endif
# Put samd21-only choices here. # Put samd21-only choices here.
ifeq ($(CHIP_FAMILY),samd21) ifeq ($(CHIP_FAMILY),samd21)
# frequencyio not yet verified as working on SAMD21. # frequencyio not yet verified as working on SAMD21.
CIRCUITPY_FRQUENCYIO = 0 CIRCUITPY_FREQUENCYIO = 0
endif endif
# Put samd51-only choices here. # Put samd51-only choices here.

View File

@ -40,7 +40,7 @@ extern UartDevice UartDev;
void common_hal_busio_uart_construct(busio_uart_obj_t *self, 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, 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, mp_float_t timeout, uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout,
uint8_t receiver_buffer_size) { uint16_t receiver_buffer_size) {
if (rx != mp_const_none || tx != &pin_GPIO2) { if (rx != mp_const_none || tx != &pin_GPIO2) {
nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, translate("Only tx supported on UART1 (GPIO2)."))); nlr_raise(mp_obj_new_exception_msg(&mp_type_OSError, translate("Only tx supported on UART1 (GPIO2).")));
} }

View File

@ -81,6 +81,7 @@ INC += -I./nrfx
INC += -I./nrfx/hal INC += -I./nrfx/hal
INC += -I./nrfx/mdk INC += -I./nrfx/mdk
INC += -I./nrfx/drivers/include INC += -I./nrfx/drivers/include
INC += -I./nrfx/drivers/src
INC += -I./bluetooth INC += -I./bluetooth
INC += -I./peripherals INC += -I./peripherals
INC += -I../../lib/mp-readline INC += -I../../lib/mp-readline
@ -159,7 +160,6 @@ SRC_C += \
boards/$(BOARD)/pins.c \ boards/$(BOARD)/pins.c \
device/$(MCU_VARIANT)/startup_$(MCU_SUB_VARIANT).c \ device/$(MCU_VARIANT)/startup_$(MCU_SUB_VARIANT).c \
bluetooth/ble_drv.c \ bluetooth/ble_drv.c \
bluetooth/ble_uart.c \
lib/libc/string0.c \ lib/libc/string0.c \
lib/mp-readline/readline.c \ lib/mp-readline/readline.c \
lib/oofatfs/ff.c \ lib/oofatfs/ff.c \

View File

@ -3,8 +3,9 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2016 Glenn Ruben Bakke * Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2016 Glenn Ruben Bakke
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal

View File

@ -3,8 +3,9 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2016 Glenn Ruben Bakke * Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2016 Glenn Ruben Bakke
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -30,10 +31,6 @@
#include "ble.h" #include "ble.h"
#if (BLUETOOTH_SD == 132) && (BLE_API_VERSION == 2)
#define NRF52
#endif
#define MAX_TX_IN_PROGRESS 10 #define MAX_TX_IN_PROGRESS 10
#ifndef BLE_GATT_ATT_MTU_DEFAULT #ifndef BLE_GATT_ATT_MTU_DEFAULT
@ -43,9 +40,12 @@
#define BLE_CONN_CFG_TAG_CUSTOM 1 #define BLE_CONN_CFG_TAG_CUSTOM 1
#define MSEC_TO_UNITS(TIME, RESOLUTION) (((TIME) * 1000) / (RESOLUTION)) #define MSEC_TO_UNITS(TIME, RESOLUTION) (((TIME) * 1000) / (RESOLUTION))
#define SEC_TO_UNITS(TIME, RESOLUTION) (((TIME) * 1000000) / (RESOLUTION))
// 0.625 msecs (625 usecs) // 0.625 msecs (625 usecs)
#define ADV_INTERVAL_UNIT_FLOAT_SECS (0.000625) #define ADV_INTERVAL_UNIT_FLOAT_SECS (0.000625)
// Microseconds is the base unit. The macros above know that.
#define UNIT_0_625_MS (625) #define UNIT_0_625_MS (625)
#define UNIT_1_25_MS (1250)
#define UNIT_10_MS (10000) #define UNIT_10_MS (10000)
typedef void (*ble_drv_evt_handler_t)(ble_evt_t*, void*); typedef void (*ble_drv_evt_handler_t)(ble_evt_t*, void*);

View File

@ -3,8 +3,9 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2017 Glenn Ruben Bakke * Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2017 Glenn Ruben Bakke
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal

View File

@ -20,3 +20,11 @@ else
endif endif
NRF_DEFINES += -DNRF52840_XXAA -DNRF52840 NRF_DEFINES += -DNRF52840_XXAA -DNRF52840
QSPI_FLASH_FILESYSTEM = 0
INTERNAL_FLASH_FILESYSTEM = 1
CIRCUITPY_AUDIOIO = 0
CIRCUITPY_DISPLAYIO = 1
CIRCUITPY_GAMEPAD = 1
CIRCUITPY_STAGE = 1

View File

@ -35,9 +35,9 @@
#define MICROPY_HW_LED_STATUS (&pin_P1_12) #define MICROPY_HW_LED_STATUS (&pin_P1_12)
#define MICROPY_HW_RGB_LED_RED (&pin_P0_13) #define CP_RGB_STATUS_R (&pin_P0_13)
#define MICROPY_HW_RGB_LED_GREEN (&pin_P0_14) #define CP_RGB_STATUS_G (&pin_P0_14)
#define MICROPY_HW_RGB_LED_BLUE (&pin_P0_15) #define CP_RGB_STATUS_B (&pin_P0_15)
#if QSPI_FLASH_FILESYSTEM #if QSPI_FLASH_FILESYSTEM
#define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 20) #define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(0, 20)

View File

@ -3,8 +3,8 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2016 Scott Shawcroft for Adafruit Industries * Copyright (c) 2016 Scott Shawcroft for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal

View File

@ -3,6 +3,7 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2018 Dan Halbert for Adafruit Industries
* Copyright (c) 2016 Glenn Ruben Bakke * Copyright (c) 2016 Glenn Ruben Bakke
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* *
@ -136,17 +137,15 @@ void common_hal_bleio_adapter_get_address(bleio_address_obj_t *address) {
uint32_t err_code; uint32_t err_code;
common_hal_bleio_adapter_set_enabled(true); common_hal_bleio_adapter_set_enabled(true);
#if (BLE_API_VERSION == 2)
err_code = sd_ble_gap_address_get(&local_address);
#else
err_code = sd_ble_gap_addr_get(&local_address); err_code = sd_ble_gap_addr_get(&local_address);
#endif
if (err_code != NRF_SUCCESS) { if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg(translate("Failed to get local address")); mp_raise_OSError_msg(translate("Failed to get local address"));
} }
address->type = local_address.addr_type; address->type = local_address.addr_type;
memcpy(address->value, local_address.addr, BLEIO_ADDRESS_BYTES);
mp_buffer_info_t buf_info;
mp_get_buffer_raise(address, &buf_info, MP_BUFFER_READ);
memcpy(address->bytes, buf_info.buf, NUM_BLEIO_ADDRESS_BYTES);
} }

View File

@ -3,8 +3,9 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2016 Glenn Ruben Bakke * Copyright (c) 2018 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2016 Glenn Ruben Bakke
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal

View File

@ -1,98 +0,0 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2018 Dan Halbert for Adafruit Industries
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <string.h>
#include "ble.h"
#include "ble_drv.h"
#include "ble_hci.h"
#include "nrf_soc.h"
#include "py/runtime.h"
#include "common-hal/bleio/Broadcaster.h"
#include "shared-bindings/bleio/Adapter.h"
#include "shared-bindings/bleio/Broadcaster.h"
static uint8_t m_adv_handle = BLE_GAP_ADV_SET_HANDLE_NOT_SET;
void common_hal_bleio_broadcaster_construct(bleio_broadcaster_obj_t *self, mp_float_t interval) {
common_hal_bleio_adapter_set_enabled(true); // TODO -- Do this somewhere else maybe bleio __init__
const mp_float_t min = BLE_GAP_ADV_INTERVAL_MIN * ADV_INTERVAL_UNIT_FLOAT_SECS;
const mp_float_t max = BLE_GAP_ADV_INTERVAL_MAX * ADV_INTERVAL_UNIT_FLOAT_SECS;
if (interval < min || interval > max) {
// Would like to print range using the constants above, but vargs would convert to double.
mp_raise_ValueError(translate("interval not in range 0.0020 to 10.24"));
}
self->interval = interval;
}
void common_hal_bleio_broadcaster_start_advertising(bleio_broadcaster_obj_t *self, mp_buffer_info_t *data) {
uint32_t err_code;
if (data->len >= BLE_GAP_ADV_SET_DATA_SIZE_MAX) {
mp_raise_ValueError(translate("Data too large for advertisement packet"));
}
memcpy(self->adv_data, data->buf, data->len);
ble_gap_adv_params_t m_adv_params = {
.interval = (uint32_t) (self->interval / ADV_INTERVAL_UNIT_FLOAT_SECS),
.properties.type = BLE_GAP_ADV_TYPE_NONCONNECTABLE_SCANNABLE_UNDIRECTED,
.duration = BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED,
.filter_policy = BLE_GAP_ADV_FP_ANY,
.primary_phy = BLE_GAP_PHY_1MBPS,
};
common_hal_bleio_broadcaster_stop_advertising(self);
const ble_gap_adv_data_t ble_gap_adv_data = {
.adv_data.p_data = self->adv_data,
.adv_data.len = data->len,
};
err_code = sd_ble_gap_adv_set_configure(&m_adv_handle, &ble_gap_adv_data, &m_adv_params);
if (err_code == NRF_SUCCESS) {
err_code = sd_ble_gap_adv_start(m_adv_handle, BLE_CONN_CFG_TAG_CUSTOM);
}
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg_varg(translate("Failed to start advertising, err 0x%04x"), err_code);
}
}
void common_hal_bleio_broadcaster_stop_advertising(bleio_broadcaster_obj_t *self) {
if (m_adv_handle == BLE_GAP_ADV_SET_HANDLE_NOT_SET) {
return;
}
const uint32_t err_code = sd_ble_gap_adv_stop(m_adv_handle);
if ((err_code != NRF_SUCCESS) && (err_code != NRF_ERROR_INVALID_STATE)) {
mp_raise_OSError_msg_varg(translate("Failed to stop advertising, err 0x%04x"), err_code);
}
}

View File

@ -0,0 +1,463 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec
*
* 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 <string.h>
#include <stdio.h>
#include "ble.h"
#include "ble_drv.h"
#include "ble_hci.h"
#include "nrf_soc.h"
#include "py/objstr.h"
#include "py/runtime.h"
#include "shared-bindings/bleio/Adapter.h"
#include "shared-bindings/bleio/Characteristic.h"
#include "shared-bindings/bleio/Central.h"
#include "shared-bindings/bleio/Descriptor.h"
#include "shared-bindings/bleio/Service.h"
#include "shared-bindings/bleio/UUID.h"
static bleio_service_obj_t *m_char_discovery_service;
static bleio_characteristic_obj_t *m_desc_discovery_characteristic;
static volatile bool m_discovery_in_process;
static volatile bool m_discovery_successful;
// service_uuid may be NULL, to discover all services.
STATIC bool discover_next_services(bleio_central_obj_t *self, uint16_t start_handle, ble_uuid_t *service_uuid) {
m_discovery_successful = false;
m_discovery_in_process = true;
uint32_t err_code = sd_ble_gattc_primary_services_discover(self->conn_handle, start_handle, service_uuid);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg(translate("Failed to discover services"));
}
// Wait for a discovery event.
while (m_discovery_in_process) {
MICROPY_VM_HOOK_LOOP;
}
return m_discovery_successful;
}
STATIC bool discover_next_characteristics(bleio_central_obj_t *self, bleio_service_obj_t *service, uint16_t start_handle) {
m_char_discovery_service = service;
ble_gattc_handle_range_t handle_range;
handle_range.start_handle = start_handle;
handle_range.end_handle = service->end_handle;
m_discovery_successful = false;
m_discovery_in_process = true;
uint32_t err_code = sd_ble_gattc_characteristics_discover(self->conn_handle, &handle_range);
if (err_code != NRF_SUCCESS) {
return false;
}
// Wait for a discovery event.
while (m_discovery_in_process) {
MICROPY_VM_HOOK_LOOP;
}
return m_discovery_successful;
}
STATIC bool discover_next_descriptors(bleio_central_obj_t *self, bleio_characteristic_obj_t *characteristic, uint16_t start_handle, uint16_t end_handle) {
m_desc_discovery_characteristic = characteristic;
ble_gattc_handle_range_t handle_range;
handle_range.start_handle = start_handle;
handle_range.end_handle = end_handle;
m_discovery_successful = false;
m_discovery_in_process = true;
uint32_t err_code = sd_ble_gattc_descriptors_discover(self->conn_handle, &handle_range);
if (err_code != NRF_SUCCESS) {
return false;
}
// Wait for a discovery event.
while (m_discovery_in_process) {
MICROPY_VM_HOOK_LOOP;
}
return m_discovery_successful;
}
STATIC void on_primary_srv_discovery_rsp(ble_gattc_evt_prim_srvc_disc_rsp_t *response, bleio_central_obj_t *central) {
for (size_t i = 0; i < response->count; ++i) {
ble_gattc_service_t *gattc_service = &response->services[i];
bleio_service_obj_t *service = m_new_obj(bleio_service_obj_t);
service->base.type = &bleio_service_type;
// Initialize several fields at once.
common_hal_bleio_service_construct(service, NULL, mp_obj_new_list(0, NULL), false);
service->device = MP_OBJ_FROM_PTR(central);
service->start_handle = gattc_service->handle_range.start_handle;
service->end_handle = gattc_service->handle_range.end_handle;
service->handle = gattc_service->handle_range.start_handle;
if (gattc_service->uuid.type != BLE_UUID_TYPE_UNKNOWN) {
// Known service UUID.
bleio_uuid_obj_t *uuid = m_new_obj(bleio_uuid_obj_t);
uuid->base.type = &bleio_uuid_type;
bleio_uuid_construct_from_nrf_ble_uuid(uuid, &gattc_service->uuid);
service->uuid = uuid;
service->device = MP_OBJ_FROM_PTR(central);
} else {
// The discovery response contained a 128-bit UUID that has not yet been registered with the
// softdevice via sd_ble_uuid_vs_add(). We need to fetch the 128-bit value and register it.
// For now, just set the UUID to NULL.
service->uuid = NULL;
}
mp_obj_list_append(central->service_list, service);
}
if (response->count > 0) {
m_discovery_successful = true;
}
m_discovery_in_process = false;
}
STATIC void on_char_discovery_rsp(ble_gattc_evt_char_disc_rsp_t *response, bleio_central_obj_t *central) {
for (size_t i = 0; i < response->count; ++i) {
ble_gattc_char_t *gattc_char = &response->chars[i];
bleio_characteristic_obj_t *characteristic = m_new_obj(bleio_characteristic_obj_t);
characteristic->base.type = &bleio_characteristic_type;
characteristic->descriptor_list = mp_obj_new_list(0, NULL);
bleio_uuid_obj_t *uuid = NULL;
if (gattc_char->uuid.type != BLE_UUID_TYPE_UNKNOWN) {
// Known characteristic UUID.
uuid = m_new_obj(bleio_uuid_obj_t);
uuid->base.type = &bleio_uuid_type;
bleio_uuid_construct_from_nrf_ble_uuid(uuid, &gattc_char->uuid);
} else {
// The discovery response contained a 128-bit UUID that has not yet been registered with the
// softdevice via sd_ble_uuid_vs_add(). We need to fetch the 128-bit value and register it.
// For now, just leave the UUID as NULL.
}
bleio_characteristic_properties_t props;
props.broadcast = gattc_char->char_props.broadcast;
props.indicate = gattc_char->char_props.indicate;
props.notify = gattc_char->char_props.notify;
props.read = gattc_char->char_props.read;
props.write = gattc_char->char_props.write;
props.write_no_response = gattc_char->char_props.write_wo_resp;
// Call common_hal_bleio_characteristic_construct() to initalize some fields and set up evt handler.
common_hal_bleio_characteristic_construct(characteristic, uuid, props, mp_obj_new_list(0, NULL));
characteristic->handle = gattc_char->handle_value;
characteristic->service = m_char_discovery_service;
mp_obj_list_append(m_char_discovery_service->characteristic_list, MP_OBJ_FROM_PTR(characteristic));
}
if (response->count > 0) {
m_discovery_successful = true;
}
m_discovery_in_process = false;
}
STATIC void on_desc_discovery_rsp(ble_gattc_evt_desc_disc_rsp_t *response, bleio_central_obj_t *central) {
for (size_t i = 0; i < response->count; ++i) {
ble_gattc_desc_t *gattc_desc = &response->descs[i];
// Remember handles for certain well-known descriptors.
switch (gattc_desc->uuid.uuid) {
case DESCRIPTOR_UUID_CLIENT_CHARACTERISTIC_CONFIGURATION:
m_desc_discovery_characteristic->cccd_handle = gattc_desc->handle;
break;
case DESCRIPTOR_UUID_SERVER_CHARACTERISTIC_CONFIGURATION:
m_desc_discovery_characteristic->sccd_handle = gattc_desc->handle;
break;
case DESCRIPTOR_UUID_CHARACTERISTIC_USER_DESCRIPTION:
m_desc_discovery_characteristic->user_desc_handle = gattc_desc->handle;
break;
default:
// TODO: sd_ble_gattc_descriptors_discover() can return things that are not descriptors,
// so ignore those.
// https://devzone.nordicsemi.com/f/nordic-q-a/49500/sd_ble_gattc_descriptors_discover-is-returning-attributes-that-are-not-descriptors
break;
}
bleio_descriptor_obj_t *descriptor = m_new_obj(bleio_descriptor_obj_t);
descriptor->base.type = &bleio_descriptor_type;
bleio_uuid_obj_t *uuid = NULL;
if (gattc_desc->uuid.type != BLE_UUID_TYPE_UNKNOWN) {
// Known descriptor UUID.
uuid = m_new_obj(bleio_uuid_obj_t);
uuid->base.type = &bleio_uuid_type;
bleio_uuid_construct_from_nrf_ble_uuid(uuid, &gattc_desc->uuid);
} else {
// The discovery response contained a 128-bit UUID that has not yet been registered with the
// softdevice via sd_ble_uuid_vs_add(). We need to fetch the 128-bit value and register it.
// For now, just leave the UUID as NULL.
}
common_hal_bleio_descriptor_construct(descriptor, uuid);
descriptor->handle = gattc_desc->handle;
descriptor->characteristic = m_desc_discovery_characteristic;
mp_obj_list_append(m_desc_discovery_characteristic->descriptor_list, MP_OBJ_FROM_PTR(descriptor));
}
if (response->count > 0) {
m_discovery_successful = true;
}
m_discovery_in_process = false;
}
STATIC void central_on_ble_evt(ble_evt_t *ble_evt, void *central_in) {
bleio_central_obj_t *central = (bleio_central_obj_t*)central_in;
switch (ble_evt->header.evt_id) {
case BLE_GAP_EVT_CONNECTED:
central->conn_handle = ble_evt->evt.gap_evt.conn_handle;
central->waiting_to_connect = false;
break;
case BLE_GAP_EVT_TIMEOUT:
// Handle will be invalid.
central->waiting_to_connect = false;
break;
case BLE_GAP_EVT_DISCONNECTED:
central->conn_handle = BLE_CONN_HANDLE_INVALID;
m_discovery_successful = false;
m_discovery_in_process = false;
break;
case BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP:
on_primary_srv_discovery_rsp(&ble_evt->evt.gattc_evt.params.prim_srvc_disc_rsp, central);
break;
case BLE_GATTC_EVT_CHAR_DISC_RSP:
on_char_discovery_rsp(&ble_evt->evt.gattc_evt.params.char_disc_rsp, central);
break;
case BLE_GATTC_EVT_DESC_DISC_RSP:
on_desc_discovery_rsp(&ble_evt->evt.gattc_evt.params.desc_disc_rsp, central);
break;
case BLE_GAP_EVT_SEC_PARAMS_REQUEST:
sd_ble_gap_sec_params_reply(central->conn_handle, BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP, NULL, NULL);
break;
case BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST: {
ble_gap_evt_conn_param_update_request_t *request =
&ble_evt->evt.gap_evt.params.conn_param_update_request;
sd_ble_gap_conn_param_update(central->conn_handle, &request->conn_params);
break;
}
default:
// For debugging.
// mp_printf(&mp_plat_print, "Unhandled central event: 0x%04x\n", ble_evt->header.evt_id);
break;
}
}
void common_hal_bleio_central_construct(bleio_central_obj_t *self) {
common_hal_bleio_adapter_set_enabled(true);
self->service_list = mp_obj_new_list(0, NULL);
self->gatt_role = GATT_ROLE_CLIENT;
self->conn_handle = BLE_CONN_HANDLE_INVALID;
}
void common_hal_bleio_central_connect(bleio_central_obj_t *self, bleio_address_obj_t *address, mp_float_t timeout, mp_obj_t service_uuids) {
common_hal_bleio_adapter_set_enabled(true);
ble_drv_add_event_handler(central_on_ble_evt, self);
ble_gap_addr_t addr;
addr.addr_type = address->type;
mp_buffer_info_t address_buf_info;
mp_get_buffer_raise(address->bytes, &address_buf_info, MP_BUFFER_READ);
memcpy(addr.addr, (uint8_t *) address_buf_info.buf, NUM_BLEIO_ADDRESS_BYTES);
ble_gap_scan_params_t scan_params = {
.interval = MSEC_TO_UNITS(100, UNIT_0_625_MS),
.window = MSEC_TO_UNITS(100, UNIT_0_625_MS),
.scan_phys = BLE_GAP_PHY_1MBPS,
// timeout of 0 means no timeout
.timeout = SEC_TO_UNITS(timeout, UNIT_10_MS),
};
ble_gap_conn_params_t conn_params = {
.conn_sup_timeout = MSEC_TO_UNITS(4000, UNIT_10_MS),
.min_conn_interval = MSEC_TO_UNITS(15, UNIT_1_25_MS),
.max_conn_interval = MSEC_TO_UNITS(300, UNIT_1_25_MS),
.slave_latency = 0, // number of conn events
};
self->waiting_to_connect = true;
uint32_t err_code = sd_ble_gap_connect(&addr, &scan_params, &conn_params, BLE_CONN_CFG_TAG_CUSTOM);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg_varg(translate("Failed to start connecting, error 0x%04x"), err_code);
}
while (self->waiting_to_connect) {
MICROPY_VM_HOOK_LOOP;
}
if (self->conn_handle == BLE_CONN_HANDLE_INVALID) {
mp_raise_OSError_msg(translate("Failed to connect: timeout"));
}
// Connection successful.
// Now discover services on the remote peripheral.
if (service_uuids == mp_const_none) {
// List of service UUID's not given, so discover all available services.
uint16_t next_service_start_handle = BLE_GATT_HANDLE_START;
while (discover_next_services(self, next_service_start_handle, MP_OBJ_NULL)) {
// discover_next_services() appends to service_list.
// Get the most recently discovered service, and then ask for services
// whose handles start after the last attribute handle inside that service.
const bleio_service_obj_t *service =
MP_OBJ_TO_PTR(self->service_list->items[self->service_list->len - 1]);
next_service_start_handle = service->end_handle + 1;
}
} else {
mp_obj_iter_buf_t iter_buf;
mp_obj_t iterable = mp_getiter(service_uuids, &iter_buf);
mp_obj_t uuid_obj;
while ((uuid_obj = mp_iternext(iterable)) != MP_OBJ_STOP_ITERATION) {
if (!MP_OBJ_IS_TYPE(uuid_obj, &bleio_uuid_type)) {
mp_raise_ValueError(translate("non-UUID found in service_uuids"));
}
bleio_uuid_obj_t *uuid = MP_OBJ_TO_PTR(uuid_obj);
ble_uuid_t nrf_uuid;
bleio_uuid_convert_to_nrf_ble_uuid(uuid, &nrf_uuid);
// Service might or might not be discovered; that's ok. Caller has to check
// Central.remote_services to find out.
// We only need to call this once for each service to discover.
discover_next_services(self, BLE_GATT_HANDLE_START, &nrf_uuid);
}
}
for (size_t service_idx = 0; service_idx < self->service_list->len; ++service_idx) {
bleio_service_obj_t *service = MP_OBJ_TO_PTR(self->service_list->items[service_idx]);
// Skip the service if it had an unknown (unregistered) UUID.
if (service->uuid == NULL) {
continue;
}
uint16_t next_char_start_handle = service->start_handle;
// Stop when we go past the end of the range of handles for this service or
// discovery call returns nothing.
// discover_next_characteristics() appends to the characteristic_list.
while (next_char_start_handle <= service->end_handle &&
discover_next_characteristics(self, service, next_char_start_handle)) {
// Get the most recently discovered characteristic, and then ask for characteristics
// whose handles start after the last attribute handle inside that characteristic.
const bleio_characteristic_obj_t *characteristic =
MP_OBJ_TO_PTR(service->characteristic_list->items[service->characteristic_list->len - 1]);
next_char_start_handle = characteristic->handle + 1;
}
// Got characteristics for this service. Now discover descriptors for each characteristic.
size_t char_list_len = service->characteristic_list->len;
for (size_t char_idx = 0; char_idx < char_list_len; ++char_idx) {
bleio_characteristic_obj_t *characteristic =
MP_OBJ_TO_PTR(service->characteristic_list->items[char_idx]);
const bool last_characteristic = char_idx == char_list_len - 1;
bleio_characteristic_obj_t *next_characteristic = last_characteristic
? NULL
: MP_OBJ_TO_PTR(service->characteristic_list->items[char_idx + 1]);
// Skip the characteristic if it had an unknown (unregistered) UUID.
if (characteristic->uuid == NULL) {
continue;
}
uint16_t next_desc_start_handle = characteristic->handle + 1;
// Don't run past the end of this service or the beginning of the next characteristic.
uint16_t next_desc_end_handle = next_characteristic == NULL
? service->end_handle
: next_characteristic->handle - 1;
// Stop when we go past the end of the range of handles for this service or
// discovery call returns nothing.
// discover_next_descriptors() appends to the descriptor_list.
while (next_desc_start_handle <= service->end_handle &&
next_desc_start_handle < next_desc_end_handle &&
discover_next_descriptors(self, characteristic,
next_desc_start_handle, next_desc_end_handle)) {
// Get the most recently discovered descriptor, and then ask for descriptors
// whose handles start after that descriptor's handle.
const bleio_descriptor_obj_t *descriptor =
MP_OBJ_TO_PTR(characteristic->descriptor_list->items[characteristic->descriptor_list->len - 1]);
next_desc_start_handle = descriptor->handle + 1;
}
}
}
}
void common_hal_bleio_central_disconnect(bleio_central_obj_t *self) {
sd_ble_gap_disconnect(self->conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
}
bool common_hal_bleio_central_get_connected(bleio_central_obj_t *self) {
return self->conn_handle != BLE_CONN_HANDLE_INVALID;
}
mp_obj_list_t *common_hal_bleio_central_get_remote_services(bleio_central_obj_t *self) {
return self->service_list;
}

View File

@ -3,6 +3,7 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
@ -24,22 +25,21 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#ifndef MICROPY_INCLUDED_SHARED_MODULE_BLEIO_DEVICE_H #ifndef MICROPY_INCLUDED_SHARED_MODULE_BLEIO_CENTRAL_H
#define MICROPY_INCLUDED_SHARED_MODULE_BLEIO_DEVICE_H #define MICROPY_INCLUDED_SHARED_MODULE_BLEIO_CENTRAL_H
#include <stdbool.h> #include <stdbool.h>
#include "py/objlist.h"
#include "shared-module/bleio/__init__.h"
#include "shared-module/bleio/Address.h" #include "shared-module/bleio/Address.h"
typedef struct { typedef struct {
mp_obj_base_t base; mp_obj_base_t base;
bool is_peripheral; gatt_role_t gatt_role;
mp_obj_t name; volatile bool waiting_to_connect;
bleio_address_obj_t address;
volatile uint16_t conn_handle; volatile uint16_t conn_handle;
mp_obj_t service_list; mp_obj_list_t *service_list;
mp_obj_t notif_handler; } bleio_central_obj_t;
mp_obj_t conn_handler;
} bleio_device_obj_t;
#endif // MICROPY_INCLUDED_SHARED_MODULE_BLEIO_DEVICE_H #endif // MICROPY_INCLUDED_SHARED_MODULE_BLEIO_CENTRAL_H

View File

@ -3,6 +3,7 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
@ -34,12 +35,8 @@
#include "py/runtime.h" #include "py/runtime.h"
#include "common-hal/bleio/__init__.h" #include "common-hal/bleio/__init__.h"
#include "common-hal/bleio/Characteristic.h" #include "common-hal/bleio/Characteristic.h"
#include "shared-module/bleio/Characteristic.h"
STATIC volatile bleio_characteristic_obj_t *m_read_characteristic; STATIC volatile bleio_characteristic_obj_t *m_read_characteristic;
STATIC volatile uint8_t m_tx_in_progress;
// Serialize gattc writes that send a response. This might be done per object?
STATIC nrf_mutex_t *m_write_mutex;
STATIC uint16_t get_cccd(bleio_characteristic_obj_t *characteristic) { STATIC uint16_t get_cccd(bleio_characteristic_obj_t *characteristic) {
const uint16_t conn_handle = common_hal_bleio_device_get_conn_handle(characteristic->service->device); const uint16_t conn_handle = common_hal_bleio_device_get_conn_handle(characteristic->service->device);
@ -63,7 +60,7 @@ STATIC uint16_t get_cccd(bleio_characteristic_obj_t *characteristic) {
} }
STATIC void gatts_read(bleio_characteristic_obj_t *characteristic) { STATIC void gatts_read(bleio_characteristic_obj_t *characteristic) {
// This might be BLE_CONN_HANDLE_INVALID if we're not conected, but that's OK, because // This might be BLE_CONN_HANDLE_INVALID if we're not connected, but that's OK, because
// we can still read and write the local value. // we can still read and write the local value.
const uint16_t conn_handle = common_hal_bleio_device_get_conn_handle(characteristic->service->device); const uint16_t conn_handle = common_hal_bleio_device_get_conn_handle(characteristic->service->device);
@ -118,24 +115,35 @@ STATIC void gatts_notify_indicate(bleio_characteristic_obj_t *characteristic, mp
.p_data = bufinfo->buf, .p_data = bufinfo->buf,
}; };
while (m_tx_in_progress >= MAX_TX_IN_PROGRESS) { const uint16_t conn_handle = common_hal_bleio_device_get_conn_handle(characteristic->service->device);
#ifdef MICROPY_VM_HOOK_LOOP
MICROPY_VM_HOOK_LOOP while (1) {
#endif const uint32_t err_code = sd_ble_gatts_hvx(conn_handle, &hvx_params);
if (err_code == NRF_SUCCESS) {
break;
}
// TX buffer is full
// We could wait for an event indicating the write is complete, but just retrying is easier.
if (err_code == NRF_ERROR_RESOURCES) {
MICROPY_VM_HOOK_LOOP;
continue;
} }
const uint16_t conn_handle = common_hal_bleio_device_get_conn_handle(characteristic->service->device); // Some real error has occurred.
m_tx_in_progress++;
const uint32_t err_code = sd_ble_gatts_hvx(conn_handle, &hvx_params);
if (err_code != NRF_SUCCESS) {
m_tx_in_progress--;
mp_raise_OSError_msg_varg(translate("Failed to notify or indicate attribute value, err 0x%04x"), err_code); mp_raise_OSError_msg_varg(translate("Failed to notify or indicate attribute value, err 0x%04x"), err_code);
} }
} }
STATIC void check_connected(uint16_t conn_handle) {
if (conn_handle == BLE_CONN_HANDLE_INVALID) {
mp_raise_OSError_msg(translate("Not connected"));
}
}
STATIC void gattc_read(bleio_characteristic_obj_t *characteristic) { STATIC void gattc_read(bleio_characteristic_obj_t *characteristic) {
const uint16_t conn_handle = common_hal_bleio_device_get_conn_handle(characteristic->service->device); const uint16_t conn_handle = common_hal_bleio_device_get_conn_handle(characteristic->service->device);
check_connected(conn_handle);
m_read_characteristic = characteristic; m_read_characteristic = characteristic;
@ -144,80 +152,55 @@ STATIC void gattc_read(bleio_characteristic_obj_t *characteristic) {
mp_raise_OSError_msg_varg(translate("Failed to read attribute value, err 0x%04x"), err_code); mp_raise_OSError_msg_varg(translate("Failed to read attribute value, err 0x%04x"), err_code);
} }
//
while (m_read_characteristic != NULL) { while (m_read_characteristic != NULL) {
#ifdef MICROPY_VM_HOOK_LOOP MICROPY_VM_HOOK_LOOP;
MICROPY_VM_HOOK_LOOP
#endif
} }
} }
STATIC void gattc_write(bleio_characteristic_obj_t *characteristic, mp_buffer_info_t *bufinfo) { STATIC void gattc_write(bleio_characteristic_obj_t *characteristic, mp_buffer_info_t *bufinfo) {
const uint16_t conn_handle = common_hal_bleio_device_get_conn_handle(characteristic->service->device); const uint16_t conn_handle = common_hal_bleio_device_get_conn_handle(characteristic->service->device);
uint32_t err_code; check_connected(conn_handle);
ble_gattc_write_params_t write_params = { ble_gattc_write_params_t write_params = {
.flags = BLE_GATT_EXEC_WRITE_FLAG_PREPARED_CANCEL, .write_op = characteristic->props.write_no_response ? BLE_GATT_OP_WRITE_CMD : BLE_GATT_OP_WRITE_REQ,
.write_op = BLE_GATT_OP_WRITE_REQ,
.handle = characteristic->handle, .handle = characteristic->handle,
.p_value = bufinfo->buf, .p_value = bufinfo->buf,
.len = bufinfo->len, .len = bufinfo->len,
}; };
if (characteristic->props.write_no_response) { while (1) {
write_params.write_op = BLE_GATT_OP_WRITE_CMD; uint32_t err_code = sd_ble_gattc_write(conn_handle, &write_params);
if (err_code == NRF_SUCCESS) {
err_code = sd_mutex_acquire(m_write_mutex); break;
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg_varg(translate("Failed to acquire mutex, err 0x%04x"), err_code);
}
} }
err_code = sd_ble_gattc_write(conn_handle, &write_params); // Write with response will return NRF_ERROR_BUSY if the response has not been received.
if (err_code != NRF_SUCCESS) { // Write without reponse will return NRF_ERROR_RESOURCES if too many writes are pending.
if (err_code == NRF_ERROR_BUSY || err_code == NRF_ERROR_RESOURCES) {
// We could wait for an event indicating the write is complete, but just retrying is easier.
MICROPY_VM_HOOK_LOOP;
continue;
}
// Some real error occurred.
mp_raise_OSError_msg_varg(translate("Failed to write attribute value, err 0x%04x"), err_code); mp_raise_OSError_msg_varg(translate("Failed to write attribute value, err 0x%04x"), err_code);
} }
while (sd_mutex_acquire(m_write_mutex) == NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN) {
#ifdef MICROPY_VM_HOOK_LOOP
MICROPY_VM_HOOK_LOOP
#endif
}
err_code = sd_mutex_release(m_write_mutex);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg_varg(translate("Failed to release mutex, err 0x%04x"), err_code);
}
} }
STATIC void characteristic_on_ble_evt(ble_evt_t *ble_evt, void *param) { STATIC void characteristic_on_ble_evt(ble_evt_t *ble_evt, void *param) {
switch (ble_evt->header.evt_id) { switch (ble_evt->header.evt_id) {
case BLE_GATTS_EVT_HVN_TX_COMPLETE:
{
uint8_t count = ble_evt->evt.gatts_evt.params.hvn_tx_complete.count;
// Don't underflow the count.
if (count >= m_tx_in_progress) {
m_tx_in_progress = 0;
} else {
m_tx_in_progress -= count;
}
break;
}
case BLE_GATTC_EVT_READ_RSP: // More events may be handled later, so keep this as a switch.
{
case BLE_GATTC_EVT_READ_RSP: {
ble_gattc_evt_read_rsp_t *response = &ble_evt->evt.gattc_evt.params.read_rsp; ble_gattc_evt_read_rsp_t *response = &ble_evt->evt.gattc_evt.params.read_rsp;
m_read_characteristic->value_data = mp_obj_new_bytearray(response->len, response->data); m_read_characteristic->value_data = mp_obj_new_bytearray(response->len, response->data);
// Flag to busy-wait loop that we've read the characteristic. // Indicate to busy-wait loop that we've read the characteristic.
m_read_characteristic = NULL; m_read_characteristic = NULL;
break; break;
} }
case BLE_GATTC_EVT_WRITE_RSP:
// Someone else can write now.
sd_mutex_release(m_write_mutex);
break;
// For debugging. // For debugging.
default: default:
// mp_printf(&mp_plat_print, "Unhandled characteristic event: 0x%04x\n", ble_evt->header.evt_id); // mp_printf(&mp_plat_print, "Unhandled characteristic event: 0x%04x\n", ble_evt->header.evt_id);
@ -226,18 +209,22 @@ STATIC void characteristic_on_ble_evt(ble_evt_t *ble_evt, void *param) {
} }
void common_hal_bleio_characteristic_construct(bleio_characteristic_obj_t *self, bleio_uuid_obj_t *uuid, bleio_characteristic_properties_t props) { void common_hal_bleio_characteristic_construct(bleio_characteristic_obj_t *self, bleio_uuid_obj_t *uuid, bleio_characteristic_properties_t props, mp_obj_list_t *descriptor_list) {
self->service = NULL; self->service = mp_const_none;
self->uuid = uuid; self->uuid = uuid;
self->value_data = NULL; self->value_data = mp_const_none;
self->props = props; self->props = props;
self->descriptor_list = descriptor_list;
self->handle = BLE_GATT_HANDLE_INVALID; self->handle = BLE_GATT_HANDLE_INVALID;
ble_drv_add_event_handler(characteristic_on_ble_evt, self); ble_drv_add_event_handler(characteristic_on_ble_evt, self);
} }
void common_hal_bleio_characteristic_get_value(bleio_characteristic_obj_t *self) { mp_obj_list_t *common_hal_bleio_characteristic_get_descriptor_list(bleio_characteristic_obj_t *self) {
return self->descriptor_list;
}
mp_obj_t common_hal_bleio_characteristic_get_value(bleio_characteristic_obj_t *self) {
switch (common_hal_bleio_device_get_gatt_role(self->service->device)) { switch (common_hal_bleio_device_get_gatt_role(self->service->device)) {
case GATT_ROLE_CLIENT: case GATT_ROLE_CLIENT:
gattc_read(self); gattc_read(self);
@ -251,6 +238,8 @@ void common_hal_bleio_characteristic_get_value(bleio_characteristic_obj_t *self)
mp_raise_RuntimeError(translate("bad GATT role")); mp_raise_RuntimeError(translate("bad GATT role"));
break; break;
} }
return self->value_data;
} }
void common_hal_bleio_characteristic_set_value(bleio_characteristic_obj_t *self, mp_buffer_info_t *bufinfo) { void common_hal_bleio_characteristic_set_value(bleio_characteristic_obj_t *self, mp_buffer_info_t *bufinfo) {
@ -285,3 +274,56 @@ void common_hal_bleio_characteristic_set_value(bleio_characteristic_obj_t *self,
break; break;
} }
} }
bleio_uuid_obj_t *common_hal_bleio_characteristic_get_uuid(bleio_characteristic_obj_t *self) {
return self->uuid;
}
bleio_characteristic_properties_t common_hal_bleio_characteristic_get_properties(bleio_characteristic_obj_t *self) {
return self->props;
}
void common_hal_bleio_characteristic_set_cccd(bleio_characteristic_obj_t *self, bool notify, bool indicate) {
if (self->cccd_handle == BLE_GATT_HANDLE_INVALID) {
mp_raise_ValueError(translate("No CCCD for this Characteristic"));
}
if (common_hal_bleio_device_get_gatt_role(self->service->device) != GATT_ROLE_CLIENT) {
mp_raise_ValueError(translate("Can't set CCCD for local Characteristic"));
}
uint16_t cccd_value =
(notify ? BLE_GATT_HVX_NOTIFICATION : 0) |
(indicate ? BLE_GATT_HVX_INDICATION : 0);
const uint16_t conn_handle = common_hal_bleio_device_get_conn_handle(self->service->device);
check_connected(conn_handle);
ble_gattc_write_params_t write_params = {
.write_op = BLE_GATT_OP_WRITE_REQ,
.handle = self->cccd_handle,
.p_value = (uint8_t *) &cccd_value,
.len = 2,
};
while (1) {
uint32_t err_code = sd_ble_gattc_write(conn_handle, &write_params);
if (err_code == NRF_SUCCESS) {
break;
}
// Write with response will return NRF_ERROR_BUSY if the response has not been received.
// Write without reponse will return NRF_ERROR_RESOURCES if too many writes are pending.
if (err_code == NRF_ERROR_BUSY || err_code == NRF_ERROR_RESOURCES) {
// We could wait for an event indicating the write is complete, but just retrying is easier.
MICROPY_VM_HOOK_LOOP;
continue;
}
// Some real error occurred.
mp_raise_OSError_msg_varg(translate("Failed to write CCCD, err 0x%04x"), err_code);
}
}

View File

@ -3,6 +3,7 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
@ -24,23 +25,24 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#ifndef MICROPY_INCLUDED_COMMON_HAL_BLEIO_CHARACTERISTIC_H #ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_CHARACTERISTIC_H
#define MICROPY_INCLUDED_COMMON_HAL_BLEIO_CHARACTERISTIC_H #define MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_CHARACTERISTIC_H
#include "shared-module/bleio/Characteristic.h" #include "common-hal/bleio/Service.h"
#include "shared-module/bleio/Service.h"
#include "common-hal/bleio/UUID.h" #include "common-hal/bleio/UUID.h"
#include "shared-module/bleio/Characteristic.h"
typedef struct { typedef struct {
mp_obj_base_t base; mp_obj_base_t base;
bleio_service_obj_t *service; bleio_service_obj_t *service;
bleio_uuid_obj_t *uuid; bleio_uuid_obj_t *uuid;
mp_obj_t value_data; volatile mp_obj_t value_data;
uint16_t handle; uint16_t handle;
bleio_characteristic_properties_t props; bleio_characteristic_properties_t props;
mp_obj_list_t *descriptor_list;
uint16_t user_desc_handle; uint16_t user_desc_handle;
uint16_t cccd_handle; uint16_t cccd_handle;
uint16_t sccd_handle; uint16_t sccd_handle;
} bleio_characteristic_obj_t; } bleio_characteristic_obj_t;
#endif // MICROPY_INCLUDED_COMMON_HAL_BLEIO_CHARACTERISTIC_H #endif // MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_CHARACTERISTIC_H

View File

@ -40,25 +40,42 @@
#include "common-hal/bleio/__init__.h" #include "common-hal/bleio/__init__.h"
#include "common-hal/bleio/CharacteristicBuffer.h" #include "common-hal/bleio/CharacteristicBuffer.h"
STATIC void write_to_ringbuf(bleio_characteristic_buffer_obj_t *self, uint8_t *data, uint16_t len) {
// Push all the data onto the ring buffer.
uint8_t is_nested_critical_region;
sd_nvic_critical_region_enter(&is_nested_critical_region);
for (size_t i = 0; i < len; i++) {
ringbuf_put(&self->ringbuf, data[i]);
}
sd_nvic_critical_region_exit(is_nested_critical_region);
}
STATIC void characteristic_buffer_on_ble_evt(ble_evt_t *ble_evt, void *param) { STATIC void characteristic_buffer_on_ble_evt(ble_evt_t *ble_evt, void *param) {
bleio_characteristic_buffer_obj_t *self = (bleio_characteristic_buffer_obj_t *) param; bleio_characteristic_buffer_obj_t *self = (bleio_characteristic_buffer_obj_t *) param;
switch (ble_evt->header.evt_id) { switch (ble_evt->header.evt_id) {
case BLE_GATTS_EVT_WRITE: { case BLE_GATTS_EVT_WRITE: {
// A client wrote to this server characteristic.
ble_gatts_evt_write_t *evt_write = &ble_evt->evt.gatts_evt.params.write; ble_gatts_evt_write_t *evt_write = &ble_evt->evt.gatts_evt.params.write;
// Event handle must match the handle for my characteristic. // Event handle must match the handle for my characteristic.
if (evt_write->handle == self->characteristic->handle) { if (evt_write->handle == self->characteristic->handle) {
// Push all the data onto the ring buffer. write_to_ringbuf(self, evt_write->data, evt_write->len);
uint8_t is_nested_critical_region; }
sd_nvic_critical_region_enter(&is_nested_critical_region); break;
for (size_t i = 0; i < evt_write->len; i++) { }
ringbuf_put(&self->ringbuf, evt_write->data[i]);
case BLE_GATTC_EVT_HVX: {
// A remote service wrote to this characteristic.
ble_gattc_evt_hvx_t* evt_hvx = &ble_evt->evt.gattc_evt.params.hvx;
// Must be a notification, and event handle must match the handle for my characteristic.
if (evt_hvx->type == BLE_GATT_HVX_NOTIFICATION &&
evt_hvx->handle == self->characteristic->handle) {
write_to_ringbuf(self, evt_hvx->data, evt_hvx->len);
} }
sd_nvic_critical_region_exit(is_nested_critical_region);
break; break;
} }
} }
}
} }
// Assumes that timeout and buffer_size have been validated before call. // Assumes that timeout and buffer_size have been validated before call.
@ -82,13 +99,11 @@ int common_hal_bleio_characteristic_buffer_read(bleio_characteristic_buffer_obj_
// Wait for all bytes received or timeout // Wait for all bytes received or timeout
while ( (ringbuf_count(&self->ringbuf) < len) && (ticks_ms - start_ticks < self->timeout_ms) ) { while ( (ringbuf_count(&self->ringbuf) < len) && (ticks_ms - start_ticks < self->timeout_ms) ) {
#ifdef MICROPY_VM_HOOK_LOOP MICROPY_VM_HOOK_LOOP;
MICROPY_VM_HOOK_LOOP ;
// Allow user to break out of a timeout with a KeyboardInterrupt. // Allow user to break out of a timeout with a KeyboardInterrupt.
if ( mp_hal_is_interrupted() ) { if ( mp_hal_is_interrupted() ) {
return 0; return 0;
} }
#endif
} }
// Copy received data. Lock out write interrupt handler while copying. // Copy received data. Lock out write interrupt handler while copying.

View File

@ -3,7 +3,7 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2019 Dan Halbert for Adafruit Industries
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -24,8 +24,8 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#ifndef MICROPY_INCLUDED_COMMON_HAL_BLEIO_CHARACTERISTICBUFFER_H #ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_CHARACTERISTICBUFFER_H
#define MICROPY_INCLUDED_COMMON_HAL_BLEIO_CHARACTERISTICBUFFER_H #define MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_CHARACTERISTICBUFFER_H
#include "nrf_soc.h" #include "nrf_soc.h"
@ -40,4 +40,4 @@ typedef struct {
ringbuf_t ringbuf; ringbuf_t ringbuf;
} bleio_characteristic_buffer_obj_t; } bleio_characteristic_buffer_obj_t;
#endif // MICROPY_INCLUDED_COMMON_HAL_BLEIO_CHARACTERISTICBUFFER_H #endif // MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_CHARACTERISTICBUFFER_H

View File

@ -3,8 +3,9 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2016 Glenn Ruben Bakke * Copyright (c) 2018 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2016 Glenn Ruben Bakke
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -29,7 +30,6 @@
#include "shared-bindings/bleio/UUID.h" #include "shared-bindings/bleio/UUID.h"
void common_hal_bleio_descriptor_construct(bleio_descriptor_obj_t *self, bleio_uuid_obj_t *uuid) { void common_hal_bleio_descriptor_construct(bleio_descriptor_obj_t *self, bleio_uuid_obj_t *uuid) {
// TODO: set handle ???
self->uuid = uuid; self->uuid = uuid;
} }
@ -37,6 +37,6 @@ mp_int_t common_hal_bleio_descriptor_get_handle(bleio_descriptor_obj_t *self) {
return self->handle; return self->handle;
} }
mp_obj_t common_hal_bleio_descriptor_get_uuid(bleio_descriptor_obj_t *self) { bleio_uuid_obj_t *common_hal_bleio_descriptor_get_uuid(bleio_descriptor_obj_t *self) {
return MP_OBJ_FROM_PTR(self->uuid); return self->uuid;
} }

View File

@ -3,8 +3,9 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2016 Glenn Ruben Bakke * Copyright (c) 2018 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2016 Glenn Ruben Bakke
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -29,11 +30,13 @@
#define MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_DESCRIPTOR_H #define MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_DESCRIPTOR_H
#include "py/obj.h" #include "py/obj.h"
#include "common-hal/bleio/Characteristic.h"
#include "common-hal/bleio/UUID.h" #include "common-hal/bleio/UUID.h"
typedef struct { typedef struct {
mp_obj_base_t base; mp_obj_base_t base;
uint16_t handle; uint16_t handle;
bleio_characteristic_obj_t *characteristic;
bleio_uuid_obj_t *uuid; bleio_uuid_obj_t *uuid;
} bleio_descriptor_obj_t; } bleio_descriptor_obj_t;

View File

@ -1,601 +0,0 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2018 Artur Pacholec
*
* 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 <string.h>
#include <stdio.h>
#include "ble.h"
#include "ble_drv.h"
#include "ble_hci.h"
#include "nrf_soc.h"
#include "py/objstr.h"
#include "py/runtime.h"
#include "shared-bindings/bleio/Adapter.h"
#include "shared-bindings/bleio/Characteristic.h"
#include "shared-bindings/bleio/Device.h"
#include "shared-bindings/bleio/Service.h"
#include "shared-bindings/bleio/UUID.h"
#define BLE_MIN_CONN_INTERVAL MSEC_TO_UNITS(15, UNIT_0_625_MS)
#define BLE_MAX_CONN_INTERVAL MSEC_TO_UNITS(300, UNIT_0_625_MS)
#define BLE_SLAVE_LATENCY 0
#define BLE_CONN_SUP_TIMEOUT MSEC_TO_UNITS(4000, UNIT_10_MS)
#define BLE_ADV_LENGTH_FIELD_SIZE 1
#define BLE_ADV_AD_TYPE_FIELD_SIZE 1
#define BLE_AD_TYPE_FLAGS_DATA_SIZE 1
#ifndef BLE_GAP_ADV_MAX_SIZE
#define BLE_GAP_ADV_MAX_SIZE 31
#endif
static bleio_service_obj_t *m_char_discovery_service;
static volatile bool m_discovery_successful;
static nrf_mutex_t *m_discovery_mutex;
#if (BLUETOOTH_SD == 140)
static uint8_t m_adv_handle = BLE_GAP_ADV_SET_HANDLE_NOT_SET;
static uint8_t m_scan_buffer_data[BLE_GAP_SCAN_BUFFER_MIN];
static ble_data_t m_scan_buffer = {
.p_data = m_scan_buffer_data,
.len = BLE_GAP_SCAN_BUFFER_MIN
};
#endif
STATIC uint32_t set_advertisement_data(bleio_device_obj_t *device, bool connectable, mp_buffer_info_t *raw_data) {
common_hal_bleio_adapter_set_enabled(true);
uint8_t adv_data[BLE_GAP_ADV_MAX_SIZE];
uint8_t byte_pos = 0;
uint32_t err_code;
#define ADD_FIELD(field, len) \
do { \
if (byte_pos + (len) > BLE_GAP_ADV_MAX_SIZE) { \
mp_raise_ValueError(translate("Data too large for the advertisement packet")); \
} \
adv_data[byte_pos] = (field); \
byte_pos += (len); \
} while (0)
GET_STR_DATA_LEN(device->name, name_data, name_len);
if (name_len > 0) {
ble_gap_conn_sec_mode_t sec_mode;
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sec_mode);
err_code = sd_ble_gap_device_name_set(&sec_mode, name_data, name_len);
if (err_code != NRF_SUCCESS) {
return err_code;
}
// TODO: Shorten if too long
ADD_FIELD(BLE_ADV_AD_TYPE_FIELD_SIZE + name_len, BLE_ADV_LENGTH_FIELD_SIZE);
ADD_FIELD(BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME, BLE_ADV_AD_TYPE_FIELD_SIZE);
memcpy(&adv_data[byte_pos], name_data, name_len);
byte_pos += name_len;
}
// set flags, default to disc mode
if (raw_data->len == 0) {
ADD_FIELD(BLE_ADV_AD_TYPE_FIELD_SIZE + BLE_AD_TYPE_FLAGS_DATA_SIZE, BLE_ADV_LENGTH_FIELD_SIZE);
ADD_FIELD(BLE_GAP_AD_TYPE_FLAGS, BLE_AD_TYPE_FLAGS_DATA_SIZE);
ADD_FIELD(BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE, BLE_AD_TYPE_FLAGS_DATA_SIZE);
} else {
if (byte_pos + raw_data->len > BLE_GAP_ADV_MAX_SIZE) {
mp_raise_ValueError(translate("Data too large for the advertisement packet"));
}
memcpy(&adv_data[byte_pos], raw_data->buf, raw_data->len);
byte_pos += raw_data->len;
}
const mp_obj_list_t *service_list = MP_OBJ_TO_PTR(device->service_list);
if (service_list->len > 0) {
bool has_128bit_services = false;
bool has_16bit_services = false;
for (size_t i = 0; i < service_list->len; ++i) {
const bleio_service_obj_t *service = MP_OBJ_TO_PTR(service_list->items[i]);
if (service->is_secondary) {
continue;
}
switch (common_hal_bleio_uuid_get_size(service->uuid)) {
case 16:
has_16bit_services = true;
break;
case 128:
has_128bit_services = true;
break;
}
}
if (has_16bit_services) {
const uint8_t size_byte_pos = byte_pos;
uint8_t uuid_total_size = 0;
// skip length byte for now, apply total length post calculation
byte_pos += BLE_ADV_LENGTH_FIELD_SIZE;
ADD_FIELD(BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_COMPLETE, BLE_ADV_AD_TYPE_FIELD_SIZE);
for (size_t i = 0; i < service_list->len; ++i) {
const bleio_service_obj_t *service = MP_OBJ_TO_PTR(service_list->items[i]);
uint8_t encoded_size = 0;
if (common_hal_bleio_uuid_get_size(service->uuid) != 16 || service->is_secondary) {
continue;
}
ble_uuid_t uuid;
bleio_uuid_convert_to_nrf_ble_uuid(service->uuid, &uuid);
err_code = sd_ble_uuid_encode(&uuid, &encoded_size, &adv_data[byte_pos]);
if (err_code != NRF_SUCCESS) {
return err_code;
}
uuid_total_size += encoded_size;
byte_pos += encoded_size;
}
adv_data[size_byte_pos] = (BLE_ADV_AD_TYPE_FIELD_SIZE + uuid_total_size);
}
if (has_128bit_services) {
const uint8_t size_byte_pos = byte_pos;
uint8_t uuid_total_size = 0;
// skip length byte for now, apply total length post calculation
byte_pos += BLE_ADV_LENGTH_FIELD_SIZE;
ADD_FIELD(BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_COMPLETE, BLE_ADV_AD_TYPE_FIELD_SIZE);
for (size_t i = 0; i < service_list->len; ++i) {
const bleio_service_obj_t *service = MP_OBJ_TO_PTR(service_list->items[i]);
uint8_t encoded_size = 0;
if (common_hal_bleio_uuid_get_size(service->uuid) != 16 || service->is_secondary) {
continue;
}
ble_uuid_t uuid;
bleio_uuid_convert_to_nrf_ble_uuid(service->uuid, &uuid);
err_code = sd_ble_uuid_encode(&uuid, &encoded_size, &adv_data[byte_pos]);
if (err_code != NRF_SUCCESS) {
return err_code;
}
uuid_total_size += encoded_size;
byte_pos += encoded_size;
}
adv_data[size_byte_pos] = (BLE_ADV_AD_TYPE_FIELD_SIZE + uuid_total_size);
}
}
#if (BLUETOOTH_SD == 132)
err_code = sd_ble_gap_adv_data_set(adv_data, byte_pos, NULL, 0);
if (err_code != NRF_SUCCESS) {
return err_code;
}
#endif
static ble_gap_adv_params_t m_adv_params = {
.interval = MSEC_TO_UNITS(100, UNIT_0_625_MS),
#if (BLUETOOTH_SD == 140)
.properties.type = BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED,
.duration = BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED,
.filter_policy = BLE_GAP_ADV_FP_ANY,
.primary_phy = BLE_GAP_PHY_1MBPS,
#else
.type = BLE_GAP_ADV_TYPE_ADV_IND,
.fp = BLE_GAP_ADV_FP_ANY,
#endif
};
if (!connectable) {
#if (BLUETOOTH_SD == 140)
m_adv_params.properties.type = BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED;
#else
m_adv_params.type = BLE_GAP_ADV_TYPE_ADV_NONCONN_IND;
#endif
}
common_hal_bleio_device_stop_advertising(device);
#if (BLUETOOTH_SD == 140)
const ble_gap_adv_data_t ble_gap_adv_data = {
.adv_data.p_data = adv_data,
.adv_data.len = byte_pos,
};
err_code = sd_ble_gap_adv_set_configure(&m_adv_handle, &ble_gap_adv_data, &m_adv_params);
if (err_code != NRF_SUCCESS) {
return err_code;
}
err_code = sd_ble_gap_adv_start(m_adv_handle, BLE_CONN_CFG_TAG_CUSTOM);
#elif (BLUETOOTH_SD == 132 && BLE_API_VERSION == 4)
err_code = sd_ble_gap_adv_start(&m_adv_params, BLE_CONN_CFG_TAG_CUSTOM);
#else
err_code = sd_ble_gap_adv_start(&m_adv_params);
#endif
return err_code;
}
STATIC bool discover_services(bleio_device_obj_t *device, uint16_t start_handle) {
m_discovery_successful = false;
uint32_t err_code = sd_ble_gattc_primary_services_discover(device->conn_handle, start_handle, NULL);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg(translate("Failed to discover services"));
}
// Serialize discovery.
err_code = sd_mutex_acquire(m_discovery_mutex);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg(translate("Failed to acquire mutex"));
}
// Wait for someone else to release m_discovery_mutex.
while (sd_mutex_acquire(m_discovery_mutex) == NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN) {
#ifdef MICROPY_VM_HOOK_LOOP
MICROPY_VM_HOOK_LOOP
#endif
}
err_code = sd_mutex_release(m_discovery_mutex);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg(translate("Failed to release mutex"));
}
return m_discovery_successful;
}
STATIC bool discover_characteristics(bleio_device_obj_t *device, bleio_service_obj_t *service, uint16_t start_handle) {
m_char_discovery_service = service;
ble_gattc_handle_range_t handle_range;
handle_range.start_handle = start_handle;
handle_range.end_handle = service->end_handle;
m_discovery_successful = false;
uint32_t err_code = sd_ble_gattc_characteristics_discover(device->conn_handle, &handle_range);
if (err_code != NRF_SUCCESS) {
return false;
}
err_code = sd_mutex_acquire(m_discovery_mutex);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg(translate("Failed to acquire mutex"));
}
while (sd_mutex_acquire(m_discovery_mutex) == NRF_ERROR_SOC_MUTEX_ALREADY_TAKEN) {
#ifdef MICROPY_VM_HOOK_LOOP
MICROPY_VM_HOOK_LOOP
#endif
}
err_code = sd_mutex_release(m_discovery_mutex);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg(translate("Failed to release mutex"));
}
return m_discovery_successful;
}
STATIC void on_primary_srv_discovery_rsp(ble_gattc_evt_prim_srvc_disc_rsp_t *response, bleio_device_obj_t *device) {
for (size_t i = 0; i < response->count; ++i) {
ble_gattc_service_t *gattc_service = &response->services[i];
bleio_service_obj_t *service = m_new_obj(bleio_service_obj_t);
service->base.type = &bleio_service_type;
service->device = device;
service->char_list = mp_obj_new_list(0, NULL);
service->start_handle = gattc_service->handle_range.start_handle;
service->end_handle = gattc_service->handle_range.end_handle;
service->handle = gattc_service->handle_range.start_handle;
bleio_uuid_obj_t *uuid = m_new_obj(bleio_uuid_obj_t);
bleio_uuid_construct_from_nrf_ble_uuid(uuid, &gattc_service->uuid);
service->uuid = uuid;
mp_obj_list_append(device->service_list, service);
}
if (response->count > 0) {
m_discovery_successful = true;
}
const uint32_t err_code = sd_mutex_release(m_discovery_mutex);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg(translate("Failed to release mutex"));
}
}
STATIC void on_char_discovery_rsp(ble_gattc_evt_char_disc_rsp_t *response, bleio_device_obj_t *device) {
for (size_t i = 0; i < response->count; ++i) {
ble_gattc_char_t *gattc_char = &response->chars[i];
bleio_characteristic_obj_t *characteristic = m_new_obj(bleio_characteristic_obj_t);
characteristic->base.type = &bleio_characteristic_type;
bleio_uuid_obj_t *uuid = m_new_obj(bleio_uuid_obj_t);
uuid->base.type = &bleio_uuid_type;
bleio_uuid_construct_from_nrf_ble_uuid(uuid, &gattc_char->uuid);
characteristic->uuid = uuid;
characteristic->props.broadcast = gattc_char->char_props.broadcast;
characteristic->props.indicate = gattc_char->char_props.indicate;
characteristic->props.notify = gattc_char->char_props.notify;
characteristic->props.read = gattc_char->char_props.read;
characteristic->props.write = gattc_char->char_props.write;
characteristic->props.write_no_response = gattc_char->char_props.write_wo_resp;
characteristic->handle = gattc_char->handle_value;
characteristic->service = m_char_discovery_service;
mp_obj_list_append(m_char_discovery_service->char_list, MP_OBJ_FROM_PTR(characteristic));
}
if (response->count > 0) {
m_discovery_successful = true;
}
const uint32_t err_code = sd_mutex_release(m_discovery_mutex);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg(translate("Failed to release mutex"));
}
}
STATIC void on_adv_report(ble_gap_evt_adv_report_t *report, bleio_device_obj_t *device) {
uint32_t err_code;
if (memcmp(report->peer_addr.addr, device->address.value, BLEIO_ADDRESS_BYTES) != 0) {
#if (BLUETOOTH_SD == 140)
err_code = sd_ble_gap_scan_start(NULL, &m_scan_buffer);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg(translate("Failed to continue scanning"));
}
#endif
return;
}
ble_gap_scan_params_t scan_params = {
.active = 1,
.interval = MSEC_TO_UNITS(100, UNIT_0_625_MS),
.window = MSEC_TO_UNITS(100, UNIT_0_625_MS),
};
ble_gap_addr_t addr;
memset(&addr, 0, sizeof(addr));
addr.addr_type = report->peer_addr.addr_type;
memcpy(addr.addr, report->peer_addr.addr, BLEIO_ADDRESS_BYTES);
ble_gap_conn_params_t conn_params = {
.min_conn_interval = BLE_MIN_CONN_INTERVAL,
.max_conn_interval = BLE_MAX_CONN_INTERVAL,
.conn_sup_timeout = BLE_CONN_SUP_TIMEOUT,
.slave_latency = BLE_SLAVE_LATENCY,
};
#if (BLE_API_VERSION == 2)
err_code = sd_ble_gap_connect(&addr, &scan_params, &conn_params);
#else
err_code = sd_ble_gap_connect(&addr, &scan_params, &conn_params, BLE_CONN_CFG_TAG_CUSTOM);
#endif
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg(translate("Failed to connect:"));
}
}
STATIC void on_ble_evt(ble_evt_t *ble_evt, void *device_in) {
bleio_device_obj_t *device = (bleio_device_obj_t*)device_in;
switch (ble_evt->header.evt_id) {
case BLE_GAP_EVT_CONNECTED:
{
ble_gap_conn_params_t conn_params;
device->conn_handle = ble_evt->evt.gap_evt.conn_handle;
sd_ble_gap_ppcp_get(&conn_params);
sd_ble_gap_conn_param_update(ble_evt->evt.gap_evt.conn_handle, &conn_params);
break;
}
case BLE_GAP_EVT_DISCONNECTED:
device->conn_handle = BLE_CONN_HANDLE_INVALID;
break;
case BLE_GAP_EVT_ADV_REPORT:
on_adv_report(&ble_evt->evt.gap_evt.params.adv_report, device);
break;
case BLE_GATTC_EVT_PRIM_SRVC_DISC_RSP:
on_primary_srv_discovery_rsp(&ble_evt->evt.gattc_evt.params.prim_srvc_disc_rsp, device);
break;
case BLE_GATTC_EVT_CHAR_DISC_RSP:
on_char_discovery_rsp(&ble_evt->evt.gattc_evt.params.char_disc_rsp, device);
break;
case BLE_GATTS_EVT_SYS_ATTR_MISSING:
sd_ble_gatts_sys_attr_set(ble_evt->evt.gatts_evt.conn_handle, NULL, 0, 0);
break;
#if (BLE_API_VERSION == 4)
case BLE_GATTS_EVT_EXCHANGE_MTU_REQUEST:
sd_ble_gatts_exchange_mtu_reply(device->conn_handle, BLE_GATT_ATT_MTU_DEFAULT);
break;
#endif
case BLE_GAP_EVT_SEC_PARAMS_REQUEST:
sd_ble_gap_sec_params_reply(device->conn_handle, BLE_GAP_SEC_STATUS_PAIRING_NOT_SUPP, NULL, NULL);
break;
case BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST:
{
ble_gap_evt_conn_param_update_request_t *request = &ble_evt->evt.gap_evt.params.conn_param_update_request;
sd_ble_gap_conn_param_update(device->conn_handle, &request->conn_params);
break;
}
}
}
void common_hal_bleio_device_add_service(bleio_device_obj_t *device, bleio_service_obj_t *service) {
ble_uuid_t uuid;
bleio_uuid_convert_to_nrf_ble_uuid(service->uuid, &uuid);
uint8_t service_type = BLE_GATTS_SRVC_TYPE_PRIMARY;
if (service->is_secondary) {
service_type = BLE_GATTS_SRVC_TYPE_SECONDARY;
}
common_hal_bleio_adapter_set_enabled(true);
const uint32_t err_code = sd_ble_gatts_service_add(service_type, &uuid, &service->handle);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg(translate("Failed to add service"));
}
const mp_obj_list_t *char_list = MP_OBJ_TO_PTR(service->char_list);
for (size_t i = 0; i < char_list->len; ++i) {
bleio_characteristic_obj_t *characteristic = char_list->items[i];
common_hal_bleio_service_add_characteristic(service, characteristic);
}
}
void common_hal_bleio_device_start_advertising(bleio_device_obj_t *device, bool connectable, mp_buffer_info_t *raw_data) {
if (connectable) {
ble_drv_add_event_handler(on_ble_evt, device);
}
const uint32_t err_code = set_advertisement_data(device, connectable, raw_data);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg(translate("Failed to start advertising"));
}
}
void common_hal_bleio_device_stop_advertising(bleio_device_obj_t *device) {
uint32_t err_code;
#if (BLUETOOTH_SD == 140)
if (m_adv_handle == BLE_GAP_ADV_SET_HANDLE_NOT_SET)
return;
err_code = sd_ble_gap_adv_stop(m_adv_handle);
#else
err_code = sd_ble_gap_adv_stop();
#endif
if ((err_code != NRF_SUCCESS) && (err_code != NRF_ERROR_INVALID_STATE)) {
mp_raise_OSError_msg(translate("Failed to stop advertising"));
}
}
void common_hal_bleio_device_connect(bleio_device_obj_t *device) {
ble_drv_add_event_handler(on_ble_evt, device);
ble_gap_scan_params_t scan_params = {
.interval = MSEC_TO_UNITS(100, UNIT_0_625_MS),
.window = MSEC_TO_UNITS(100, UNIT_0_625_MS),
#if (BLUETOOTH_SD == 140)
.scan_phys = BLE_GAP_PHY_1MBPS,
#endif
};
common_hal_bleio_adapter_set_enabled(true);
uint32_t err_code;
#if (BLUETOOTH_SD == 140)
err_code = sd_ble_gap_scan_start(&scan_params, &m_scan_buffer);
#else
err_code = sd_ble_gap_scan_start(&scan_params);
#endif
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg(translate("Failed to start scanning"));
}
while (device->conn_handle == BLE_CONN_HANDLE_INVALID) {
#ifdef MICROPY_VM_HOOK_LOOP
MICROPY_VM_HOOK_LOOP
#endif
}
// TODO: read name
if (m_discovery_mutex == NULL) {
m_discovery_mutex = m_new_ll(nrf_mutex_t, 1);
err_code = sd_mutex_new(m_discovery_mutex);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg(translate("Failed to create mutex"));
}
}
// find services
bool found_service = discover_services(device, BLE_GATT_HANDLE_START);
while (found_service) {
const mp_obj_list_t *service_list = MP_OBJ_TO_PTR(device->service_list);
const bleio_service_obj_t *service = service_list->items[service_list->len - 1];
found_service = discover_services(device, service->end_handle + 1);
}
// find characteristics in each service
const mp_obj_list_t *service_list = MP_OBJ_TO_PTR(device->service_list);
for (size_t i = 0; i < service_list->len; ++i) {
bleio_service_obj_t *service = service_list->items[i];
bool found_char = discover_characteristics(device, service, service->start_handle);
while (found_char) {
const mp_obj_list_t *char_list = MP_OBJ_TO_PTR(service->char_list);
const bleio_characteristic_obj_t *characteristic = char_list->items[char_list->len - 1];
const uint16_t next_handle = characteristic->handle + 1;
if (next_handle >= service->end_handle) {
break;
}
found_char = discover_characteristics(device, service, next_handle);
}
}
}
void common_hal_bleio_device_disconnect(bleio_device_obj_t *device) {
sd_ble_gap_disconnect(device->conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
}

View File

@ -3,8 +3,8 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2018 Dan Halbert for Adafruit Industries * Copyright (c) 2018 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -32,6 +32,8 @@
#include "ble_drv.h" #include "ble_drv.h"
#include "ble_hci.h" #include "ble_hci.h"
#include "nrf_soc.h" #include "nrf_soc.h"
#include "py/gc.h"
#include "py/objlist.h"
#include "py/objstr.h" #include "py/objstr.h"
#include "py/runtime.h" #include "py/runtime.h"
#include "shared-bindings/bleio/Adapter.h" #include "shared-bindings/bleio/Adapter.h"
@ -39,6 +41,7 @@
#include "shared-bindings/bleio/Peripheral.h" #include "shared-bindings/bleio/Peripheral.h"
#include "shared-bindings/bleio/Service.h" #include "shared-bindings/bleio/Service.h"
#include "shared-bindings/bleio/UUID.h" #include "shared-bindings/bleio/UUID.h"
#include "common-hal/bleio/Service.h"
#define BLE_MIN_CONN_INTERVAL MSEC_TO_UNITS(15, UNIT_0_625_MS) #define BLE_MIN_CONN_INTERVAL MSEC_TO_UNITS(15, UNIT_0_625_MS)
#define BLE_MAX_CONN_INTERVAL MSEC_TO_UNITS(300, UNIT_0_625_MS) #define BLE_MAX_CONN_INTERVAL MSEC_TO_UNITS(300, UNIT_0_625_MS)
@ -49,182 +52,12 @@
#define BLE_ADV_AD_TYPE_FIELD_SIZE 1 #define BLE_ADV_AD_TYPE_FIELD_SIZE 1
#define BLE_AD_TYPE_FLAGS_DATA_SIZE 1 #define BLE_AD_TYPE_FLAGS_DATA_SIZE 1
static uint8_t m_adv_handle = BLE_GAP_ADV_SET_HANDLE_NOT_SET; STATIC void check_data_fit(size_t data_len) {
if (data_len > BLE_GAP_ADV_SET_DATA_SIZE_MAX) {
STATIC void check_data_fit(size_t pos, size_t data_len) {
if (pos + data_len >= BLE_GAP_ADV_SET_DATA_SIZE_MAX) {
mp_raise_ValueError(translate("Data too large for advertisement packet")); mp_raise_ValueError(translate("Data too large for advertisement packet"));
} }
} }
STATIC uint32_t add_services_to_advertisement(bleio_peripheral_obj_t *self, size_t* adv_data_pos_p, size_t uuid_len) {
uint32_t uuids_total_size = 0;
const mp_obj_list_t *service_list = MP_OBJ_TO_PTR(self->service_list);
uint32_t err_code = NRF_SUCCESS;
check_data_fit(*adv_data_pos_p, 1 + 1);
// Remember where length byte is; fill in later when we know the size.
const size_t length_pos = *adv_data_pos_p;
(*adv_data_pos_p)++;
self->adv_data[(*adv_data_pos_p)++] = (uuid_len == 16)
? BLE_GAP_AD_TYPE_16BIT_SERVICE_UUID_COMPLETE
: BLE_GAP_AD_TYPE_128BIT_SERVICE_UUID_COMPLETE;
for (size_t i = 0; i < service_list->len; ++i) {
const bleio_service_obj_t *service = MP_OBJ_TO_PTR(service_list->items[i]);
uint8_t encoded_size = 0;
// Skip services of the wrong length and secondary services.
if (common_hal_bleio_uuid_get_size(service->uuid) != uuid_len || service->is_secondary) {
continue;
}
ble_uuid_t uuid;
bleio_uuid_convert_to_nrf_ble_uuid(service->uuid, &uuid);
err_code = sd_ble_uuid_encode(&uuid, &encoded_size, &(self->adv_data[*adv_data_pos_p]));
if (err_code != NRF_SUCCESS) {
return err_code;
}
check_data_fit(*adv_data_pos_p, encoded_size);
uuids_total_size += encoded_size;
(*adv_data_pos_p) += encoded_size;
}
self->adv_data[length_pos] = 1 + uuids_total_size; // 1 for the field type.
return err_code;
}
// if raw_data is a zero-length buffer, generate an advertising packet that advertises the
// services passed in when this Peripheral was created.
// If raw_data contains some bytes, use those bytes as the advertising packet.
// TODO: Generate the advertising packet in Python, not here.
STATIC uint32_t set_advertisement_data(bleio_peripheral_obj_t *self, bool connectable, mp_buffer_info_t *raw_data) {
common_hal_bleio_adapter_set_enabled(true);
size_t adv_data_pos = 0;
uint32_t err_code;
GET_STR_DATA_LEN(self->name, name_data, name_len);
if (name_len > 0) {
ble_gap_conn_sec_mode_t sec_mode;
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sec_mode);
// We'll add the name after everything else, shortening it if necessary.
err_code = sd_ble_gap_device_name_set(&sec_mode, name_data, name_len);
if (err_code != NRF_SUCCESS) {
return err_code;
}
}
if (raw_data->len != 0) {
// User-supplied advertising packet.
check_data_fit(adv_data_pos, raw_data->len);
memcpy(&(self->adv_data[adv_data_pos]), raw_data->buf, raw_data->len);
adv_data_pos += raw_data->len;
} else {
// Build up advertising packet.
check_data_fit(adv_data_pos, 1 + 1 + 1);
self->adv_data[adv_data_pos++] = 2;
self->adv_data[adv_data_pos++] = BLE_GAP_AD_TYPE_FLAGS;
self->adv_data[adv_data_pos++] = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
// The 16-bit ids and 128-bit ids are grouped together by length, so find it whether we have
// 16 and/or 128-bit service UUIDs.
const mp_obj_list_t *service_list = MP_OBJ_TO_PTR(self->service_list);
if (service_list->len > 0) {
bool has_128bit_services = false;
bool has_16bit_services = false;
for (size_t i = 0; i < service_list->len; ++i) {
const bleio_service_obj_t *service = MP_OBJ_TO_PTR(service_list->items[i]);
if (service->is_secondary) {
continue;
}
switch (common_hal_bleio_uuid_get_size(service->uuid)) {
case 16:
has_16bit_services = true;
break;
case 128:
has_128bit_services = true;
break;
}
}
// Add 16-bit service UUID's in a group, then 128-bit service UUID's.
if (has_16bit_services) {
err_code = add_services_to_advertisement(self, &adv_data_pos, 16);
if (err_code != NRF_SUCCESS) {
return err_code;
}
}
if (has_128bit_services) {
err_code = add_services_to_advertisement(self, &adv_data_pos, 128);
if (err_code != NRF_SUCCESS) {
return err_code;
}
}
}
// Always include TX power.
check_data_fit(adv_data_pos, 1 + 1 + 1);
self->adv_data[adv_data_pos++] = 1 + 1;
self->adv_data[adv_data_pos++] = BLE_GAP_AD_TYPE_TX_POWER_LEVEL;
self->adv_data[adv_data_pos++] = 0; // TODO - allow power level to be set later.
// We need room for at least a one-character name.
check_data_fit(adv_data_pos, 1 + 1 + 1);
// How big a name can we fit?
size_t bytes_left = BLE_GAP_ADV_SET_DATA_SIZE_MAX - adv_data_pos - 1 - 1;
size_t partial_name_len = MIN(bytes_left, name_len);
self->adv_data[adv_data_pos++] = 1 + partial_name_len;
self->adv_data[adv_data_pos++] = (partial_name_len == name_len)
? BLE_GAP_AD_TYPE_COMPLETE_LOCAL_NAME
: BLE_GAP_AD_TYPE_SHORT_LOCAL_NAME;
memcpy(&(self->adv_data[adv_data_pos]), name_data, partial_name_len);
adv_data_pos += partial_name_len;
} // end of advertising packet construction
static ble_gap_adv_params_t m_adv_params = {
.interval = MSEC_TO_UNITS(1000, UNIT_0_625_MS),
.properties.type = BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED,
.duration = BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED,
.filter_policy = BLE_GAP_ADV_FP_ANY,
.primary_phy = BLE_GAP_PHY_1MBPS,
};
if (!connectable) {
m_adv_params.properties.type = BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED;
}
common_hal_bleio_peripheral_stop_advertising(self);
const ble_gap_adv_data_t ble_gap_adv_data = {
.adv_data.p_data = self->adv_data,
.adv_data.len = adv_data_pos,
};
err_code = sd_ble_gap_adv_set_configure(&m_adv_handle, &ble_gap_adv_data, &m_adv_params);
if (err_code != NRF_SUCCESS) {
return err_code;
}
err_code = sd_ble_gap_adv_start(m_adv_handle, BLE_CONN_CFG_TAG_CUSTOM);
return err_code;
}
STATIC void peripheral_on_ble_evt(ble_evt_t *ble_evt, void *self_in) { STATIC void peripheral_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
bleio_peripheral_obj_t *self = (bleio_peripheral_obj_t*)self_in; bleio_peripheral_obj_t *self = (bleio_peripheral_obj_t*)self_in;
@ -261,7 +94,8 @@ STATIC void peripheral_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
break; break;
case BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST: { case BLE_GAP_EVT_CONN_PARAM_UPDATE_REQUEST: {
ble_gap_evt_conn_param_update_request_t *request = &ble_evt->evt.gap_evt.params.conn_param_update_request; ble_gap_evt_conn_param_update_request_t *request =
&ble_evt->evt.gap_evt.params.conn_param_update_request;
sd_ble_gap_conn_param_update(self->conn_handle, &request->conn_params); sd_ble_gap_conn_param_update(self->conn_handle, &request->conn_params);
break; break;
} }
@ -286,24 +120,28 @@ STATIC void peripheral_on_ble_evt(ble_evt_t *ble_evt, void *self_in) {
} }
} }
void common_hal_bleio_peripheral_construct(bleio_peripheral_obj_t *self, mp_obj_list_t *service_list, mp_obj_t name) {
common_hal_bleio_adapter_set_enabled(true);
void common_hal_bleio_peripheral_construct(bleio_peripheral_obj_t *self) { self->service_list = service_list;
common_hal_bleio_adapter_set_enabled(true); // TODO -- Do this somewhere else maybe bleio __init__ self->name = name;
self->gatt_role = GATT_ROLE_SERVER; self->gatt_role = GATT_ROLE_SERVER;
self->conn_handle = BLE_CONN_HANDLE_INVALID; self->conn_handle = BLE_CONN_HANDLE_INVALID;
self->adv_handle = BLE_GAP_ADV_SET_HANDLE_NOT_SET;
// Add all the services. // Add all the services.
mp_obj_list_t *service_list = MP_OBJ_TO_PTR(self->service_list);
for (size_t service_idx = 0; service_idx < service_list->len; ++service_idx) { for (size_t service_idx = 0; service_idx < service_list->len; ++service_idx) {
bleio_service_obj_t *service = MP_OBJ_TO_PTR(service_list->items[service_idx]); bleio_service_obj_t *service = MP_OBJ_TO_PTR(service_list->items[service_idx]);
service->device = MP_OBJ_FROM_PTR(self);
ble_uuid_t uuid; ble_uuid_t uuid;
bleio_uuid_convert_to_nrf_ble_uuid(service->uuid, &uuid); bleio_uuid_convert_to_nrf_ble_uuid(service->uuid, &uuid);
uint8_t service_type = BLE_GATTS_SRVC_TYPE_PRIMARY; uint8_t service_type = BLE_GATTS_SRVC_TYPE_PRIMARY;
if (service->is_secondary) { if (common_hal_bleio_service_get_is_secondary(service)) {
service_type = BLE_GATTS_SRVC_TYPE_SECONDARY; service_type = BLE_GATTS_SRVC_TYPE_SECONDARY;
} }
@ -318,29 +156,94 @@ void common_hal_bleio_peripheral_construct(bleio_peripheral_obj_t *self) {
} }
mp_obj_list_t *common_hal_bleio_peripheral_get_service_list(bleio_peripheral_obj_t *self) {
return self->service_list;
}
bool common_hal_bleio_peripheral_get_connected(bleio_peripheral_obj_t *self) { bool common_hal_bleio_peripheral_get_connected(bleio_peripheral_obj_t *self) {
return self->conn_handle != BLE_CONN_HANDLE_INVALID; return self->conn_handle != BLE_CONN_HANDLE_INVALID;
} }
void common_hal_bleio_peripheral_start_advertising(bleio_peripheral_obj_t *self, bool connectable, mp_buffer_info_t *raw_data) { mp_obj_t common_hal_bleio_peripheral_get_name(bleio_peripheral_obj_t *self) {
return self->name;
}
void common_hal_bleio_peripheral_start_advertising(bleio_peripheral_obj_t *self, bool connectable, mp_float_t interval, mp_buffer_info_t *advertising_data_bufinfo, mp_buffer_info_t *scan_response_data_bufinfo) {
// interval value has already been validated.
if (connectable) { if (connectable) {
ble_drv_add_event_handler(peripheral_on_ble_evt, self); ble_drv_add_event_handler(peripheral_on_ble_evt, self);
} }
const uint32_t err_code = set_advertisement_data(self, connectable, raw_data); common_hal_bleio_adapter_set_enabled(true);
uint32_t err_code;
GET_STR_DATA_LEN(self->name, name_data, name_len);
if (name_len > 0) {
ble_gap_conn_sec_mode_t sec_mode;
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&sec_mode);
err_code = sd_ble_gap_device_name_set(&sec_mode, name_data, name_len);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg_varg(translate("Failed to set device name, err 0x%04x"), err_code);
}
}
check_data_fit(advertising_data_bufinfo->len);
// The advertising data buffers must not move, because the SoftDevice depends on them.
// So make them long-lived.
self->advertising_data = (uint8_t *) gc_alloc(BLE_GAP_ADV_SET_DATA_SIZE_MAX * sizeof(uint8_t), false, true);
memcpy(self->advertising_data, advertising_data_bufinfo->buf, advertising_data_bufinfo->len);
check_data_fit(scan_response_data_bufinfo->len);
self->scan_response_data = (uint8_t *) gc_alloc(BLE_GAP_ADV_SET_DATA_SIZE_MAX * sizeof(uint8_t), false, true);
memcpy(self->scan_response_data, scan_response_data_bufinfo->buf, scan_response_data_bufinfo->len);
ble_gap_adv_params_t adv_params = {
.interval = SEC_TO_UNITS(interval, UNIT_0_625_MS),
.properties.type = connectable ? BLE_GAP_ADV_TYPE_CONNECTABLE_SCANNABLE_UNDIRECTED
: BLE_GAP_ADV_TYPE_NONCONNECTABLE_NONSCANNABLE_UNDIRECTED,
.duration = BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED,
.filter_policy = BLE_GAP_ADV_FP_ANY,
.primary_phy = BLE_GAP_PHY_1MBPS,
};
common_hal_bleio_peripheral_stop_advertising(self);
const ble_gap_adv_data_t ble_gap_adv_data = {
.adv_data.p_data = self->advertising_data,
.adv_data.len = advertising_data_bufinfo->len,
.scan_rsp_data.p_data = scan_response_data_bufinfo-> len > 0 ? self->scan_response_data : NULL,
.scan_rsp_data.len = scan_response_data_bufinfo->len,
};
err_code = sd_ble_gap_adv_set_configure(&self->adv_handle, &ble_gap_adv_data, &adv_params);
if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg_varg(translate("Failed to configure advertising, err 0x%04x"), err_code);
}
err_code = sd_ble_gap_adv_start(self->adv_handle, BLE_CONN_CFG_TAG_CUSTOM);
if (err_code != NRF_SUCCESS) { if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg_varg(translate("Failed to start advertising, err 0x%04x"), err_code); mp_raise_OSError_msg_varg(translate("Failed to start advertising, err 0x%04x"), err_code);
} }
} }
void common_hal_bleio_peripheral_stop_advertising(bleio_peripheral_obj_t *self) { void common_hal_bleio_peripheral_stop_advertising(bleio_peripheral_obj_t *self) {
if (self->adv_handle == BLE_GAP_ADV_SET_HANDLE_NOT_SET)
if (m_adv_handle == BLE_GAP_ADV_SET_HANDLE_NOT_SET)
return; return;
const uint32_t err_code = sd_ble_gap_adv_stop(m_adv_handle); const uint32_t err_code = sd_ble_gap_adv_stop(self->adv_handle);
if ((err_code != NRF_SUCCESS) && (err_code != NRF_ERROR_INVALID_STATE)) { if ((err_code != NRF_SUCCESS) && (err_code != NRF_ERROR_INVALID_STATE)) {
mp_raise_OSError_msg_varg(translate("Failed to stop advertising, err 0x%04x"), err_code); mp_raise_OSError_msg_varg(translate("Failed to stop advertising, err 0x%04x"), err_code);
} }
} }
void common_hal_bleio_peripheral_disconnect(bleio_peripheral_obj_t *self) {
sd_ble_gap_disconnect(self->conn_handle, BLE_HCI_REMOTE_USER_TERMINATED_CONNECTION);
}

View File

@ -3,8 +3,8 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2018 Dan Halbert for Adafruit Industries
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -25,13 +25,16 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#ifndef MICROPY_INCLUDED_COMMON_HAL_BLEIO_PERIPHERAL_H #ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_PERIPHERAL_H
#define MICROPY_INCLUDED_COMMON_HAL_BLEIO_PERIPHERAL_H #define MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_PERIPHERAL_H
#include <stdbool.h> #include <stdbool.h>
#include "ble.h" #include "ble.h"
#include "py/obj.h"
#include "py/objlist.h"
#include "shared-module/bleio/__init__.h" #include "shared-module/bleio/__init__.h"
#include "shared-module/bleio/Address.h" #include "shared-module/bleio/Address.h"
@ -40,14 +43,14 @@ typedef struct {
mp_obj_t name; mp_obj_t name;
gatt_role_t gatt_role; gatt_role_t gatt_role;
volatile uint16_t conn_handle; volatile uint16_t conn_handle;
mp_obj_t service_list; mp_obj_list_t *service_list;
mp_obj_t notif_handler; // The advertising data and scan response buffers are held by us, not by the SD, so we must
mp_obj_t conn_handler; // maintain them and not change it. If we need to change the contents during advertising,
// The advertising data buffer is held by us, not by the SD, so we must
// maintain it and not change it. If we need to change its contents during advertising,
// there are tricks to get the SD to notice (see DevZone - TBS). // there are tricks to get the SD to notice (see DevZone - TBS).
uint8_t adv_data[BLE_GAP_ADV_SET_DATA_SIZE_MAX]; uint8_t* advertising_data;
uint8_t* scan_response_data;
uint8_t adv_handle;
} bleio_peripheral_obj_t; } bleio_peripheral_obj_t;
#endif // MICROPY_INCLUDED_COMMON_HAL_BLEIO_PERIPHERAL_H #endif // MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_PERIPHERAL_H

View File

@ -3,8 +3,9 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2016 Glenn Ruben Bakke * Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2016 Glenn Ruben Bakke
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -30,22 +31,21 @@
#include "ble_drv.h" #include "ble_drv.h"
#include "ble_gap.h" #include "ble_gap.h"
#include "py/mphal.h" #include "py/mphal.h"
#include "py/objlist.h"
#include "py/runtime.h" #include "py/runtime.h"
#include "shared-bindings/bleio/Adapter.h" #include "shared-bindings/bleio/Adapter.h"
#include "shared-bindings/bleio/ScanEntry.h" #include "shared-bindings/bleio/ScanEntry.h"
#include "shared-bindings/bleio/Scanner.h" #include "shared-bindings/bleio/Scanner.h"
#include "shared-module/bleio/ScanEntry.h" #include "shared-module/bleio/ScanEntry.h"
#if (BLUETOOTH_SD == 140)
static uint8_t m_scan_buffer_data[BLE_GAP_SCAN_BUFFER_MIN]; static uint8_t m_scan_buffer_data[BLE_GAP_SCAN_BUFFER_MIN];
static ble_data_t m_scan_buffer = { static ble_data_t m_scan_buffer = {
m_scan_buffer_data, m_scan_buffer_data,
BLE_GAP_SCAN_BUFFER_MIN BLE_GAP_SCAN_BUFFER_MIN
}; };
#endif
STATIC void on_ble_evt(ble_evt_t *ble_evt, void *scanner_in) { STATIC void scanner_on_ble_evt(ble_evt_t *ble_evt, void *scanner_in) {
bleio_scanner_obj_t *scanner = (bleio_scanner_obj_t*)scanner_in; bleio_scanner_obj_t *scanner = (bleio_scanner_obj_t*)scanner_in;
ble_gap_evt_adv_report_t *report = &ble_evt->evt.gap_evt.params.adv_report; ble_gap_evt_adv_report_t *report = &ble_evt->evt.gap_evt.params.adv_report;
@ -53,56 +53,53 @@ STATIC void on_ble_evt(ble_evt_t *ble_evt, void *scanner_in) {
return; return;
} }
// TODO: Don't add new entry for each item, group by address and update
bleio_scanentry_obj_t *entry = m_new_obj(bleio_scanentry_obj_t); bleio_scanentry_obj_t *entry = m_new_obj(bleio_scanentry_obj_t);
entry->base.type = &bleio_scanentry_type; entry->base.type = &bleio_scanentry_type;
entry->rssi = report->rssi; entry->rssi = report->rssi;
entry->address.type = report->peer_addr.addr_type; bleio_address_obj_t *address = m_new_obj(bleio_address_obj_t);
memcpy(entry->address.value, report->peer_addr.addr, BLEIO_ADDRESS_BYTES); address->base.type = &bleio_address_type;
common_hal_bleio_address_construct(MP_OBJ_TO_PTR(address),
report->peer_addr.addr, report->peer_addr.addr_type);
entry->address = address;
#if (BLUETOOTH_SD == 140) entry->data = mp_obj_new_bytes(report->data.p_data, report->data.len);
entry->data = mp_obj_new_bytearray(report->data.len, report->data.p_data);
#else
entry->data = mp_obj_new_bytearray(report->dlen, report->data);
#endif
mp_obj_list_append(scanner->adv_reports, entry); mp_obj_list_append(scanner->scan_entries, MP_OBJ_FROM_PTR(entry));
#if (BLUETOOTH_SD == 140)
const uint32_t err_code = sd_ble_gap_scan_start(NULL, &m_scan_buffer); const uint32_t err_code = sd_ble_gap_scan_start(NULL, &m_scan_buffer);
if (err_code != NRF_SUCCESS) { if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg_varg(translate("Failed to continue scanning, err 0x%04x"), err_code); mp_raise_OSError_msg_varg(translate("Failed to continue scanning, err 0x%04x"), err_code);
} }
#endif
} }
void common_hal_bleio_scanner_scan(bleio_scanner_obj_t *self, mp_int_t timeout) { void common_hal_bleio_scanner_construct(bleio_scanner_obj_t *self) {
ble_drv_add_event_handler(on_ble_evt, self); }
mp_obj_t common_hal_bleio_scanner_scan(bleio_scanner_obj_t *self, mp_float_t timeout, mp_float_t interval, mp_float_t window) {
common_hal_bleio_adapter_set_enabled(true);
ble_drv_add_event_handler(scanner_on_ble_evt, self);
ble_gap_scan_params_t scan_params = { ble_gap_scan_params_t scan_params = {
.interval = MSEC_TO_UNITS(self->interval, UNIT_0_625_MS), .interval = SEC_TO_UNITS(interval, UNIT_0_625_MS),
.window = MSEC_TO_UNITS(self->window, UNIT_0_625_MS), .window = SEC_TO_UNITS(window, UNIT_0_625_MS),
#if (BLUETOOTH_SD == 140)
.scan_phys = BLE_GAP_PHY_1MBPS, .scan_phys = BLE_GAP_PHY_1MBPS,
#endif
}; };
common_hal_bleio_adapter_set_enabled(true); self->scan_entries = mp_obj_new_list(0, NULL);
uint32_t err_code; uint32_t err_code;
#if (BLUETOOTH_SD == 140)
err_code = sd_ble_gap_scan_start(&scan_params, &m_scan_buffer); err_code = sd_ble_gap_scan_start(&scan_params, &m_scan_buffer);
#else
err_code = sd_ble_gap_scan_start(&scan_params);
#endif
if (err_code != NRF_SUCCESS) { if (err_code != NRF_SUCCESS) {
mp_raise_OSError_msg_varg(translate("Failed to start scanning, err 0x%04x"), err_code); mp_raise_OSError_msg_varg(translate("Failed to start scanning, err 0x%04x"), err_code);
} }
if (timeout > 0) { mp_hal_delay_ms(timeout * 1000);
mp_hal_delay_ms(timeout);
sd_ble_gap_scan_stop(); sd_ble_gap_scan_stop();
}
// Return list, and don't hang on to it, so it can be GC'd.
mp_obj_t entries = self->scan_entries;
self->scan_entries = MP_OBJ_NULL;
return entries;
} }

View File

@ -3,6 +3,7 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
@ -24,16 +25,16 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#ifndef MICROPY_INCLUDED_SHARED_MODULE_BLEIO_SCANNER_H #ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_SCANNER_H
#define MICROPY_INCLUDED_SHARED_MODULE_BLEIO_SCANNER_H #define MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_SCANNER_H
#include "py/obj.h" #include "py/obj.h"
typedef struct { typedef struct {
mp_obj_base_t base; mp_obj_base_t base;
mp_obj_t adv_reports; mp_obj_t scan_entries;
uint16_t interval; uint16_t interval;
uint16_t window; uint16_t window;
} bleio_scanner_obj_t; } bleio_scanner_obj_t;
#endif // MICROPY_INCLUDED_SHARED_MODULE_BLEIO_SCANNER_H #endif // MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_SCANNER_H

View File

@ -3,6 +3,7 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
@ -29,18 +30,43 @@
#include "py/runtime.h" #include "py/runtime.h"
#include "common-hal/bleio/__init__.h" #include "common-hal/bleio/__init__.h"
#include "common-hal/bleio/Characteristic.h" #include "common-hal/bleio/Characteristic.h"
#include "shared-bindings/bleio/Characteristic.h"
#include "shared-bindings/bleio/Service.h" #include "shared-bindings/bleio/Service.h"
#include "shared-bindings/bleio/Adapter.h" #include "shared-bindings/bleio/Adapter.h"
void common_hal_bleio_service_construct(bleio_service_obj_t *self) { void common_hal_bleio_service_construct(bleio_service_obj_t *self, bleio_uuid_obj_t *uuid, mp_obj_list_t *characteristic_list, bool is_secondary) {
self->device = mp_const_none;
self->handle = 0xFFFF;
self->uuid = uuid;
self->characteristic_list = characteristic_list;
self->is_secondary = is_secondary;
for (size_t characteristic_idx = 0; characteristic_idx < characteristic_list->len; ++characteristic_idx) {
bleio_characteristic_obj_t *characteristic =
MP_OBJ_TO_PTR(characteristic_list->items[characteristic_idx]);
characteristic->service = self;
}
}
bleio_uuid_obj_t *common_hal_bleio_service_get_uuid(bleio_service_obj_t *self) {
return self->uuid;
}
mp_obj_list_t *common_hal_bleio_service_get_characteristic_list(bleio_service_obj_t *self) {
return self->characteristic_list;
}
bool common_hal_bleio_service_get_is_secondary(bleio_service_obj_t *self) {
return self->is_secondary;
} }
// Call this after the Service has been added to the Peripheral. // Call this after the Service has been added to the Peripheral.
void common_hal_bleio_service_add_all_characteristics(bleio_service_obj_t *self) { void common_hal_bleio_service_add_all_characteristics(bleio_service_obj_t *self) {
// Add all the characteristics. // Add all the characteristics.
const mp_obj_list_t *char_list = MP_OBJ_TO_PTR(self->char_list); for (size_t characteristic_idx = 0; characteristic_idx < self->characteristic_list->len; ++characteristic_idx) {
for (size_t char_idx = 0; char_idx < char_list->len; ++char_idx) { bleio_characteristic_obj_t *characteristic =
bleio_characteristic_obj_t *characteristic = char_list->items[char_idx]; MP_OBJ_TO_PTR(self->characteristic_list->items[characteristic_idx]);
ble_gatts_char_md_t char_md = { ble_gatts_char_md_t char_md = {
.char_props.broadcast = characteristic->props.broadcast, .char_props.broadcast = characteristic->props.broadcast,

View File

@ -3,6 +3,7 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2018 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
@ -24,21 +25,24 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#ifndef MICROPY_INCLUDED_SHARED_MODULE_BLEIO_SERVICE_H #ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_SERVICE_H
#define MICROPY_INCLUDED_SHARED_MODULE_BLEIO_SERVICE_H #define MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_SERVICE_H
#include "py/objlist.h"
#include "common-hal/bleio/UUID.h" #include "common-hal/bleio/UUID.h"
typedef struct { typedef struct {
mp_obj_base_t base; mp_obj_base_t base;
// Handle for this service.
uint16_t handle; uint16_t handle;
bool is_secondary; bool is_secondary;
bleio_uuid_obj_t *uuid; bleio_uuid_obj_t *uuid;
// May be a Peripheral, Central, etc. // May be a Peripheral, Central, etc.
mp_obj_t *device; mp_obj_t device;
mp_obj_t char_list; mp_obj_list_t *characteristic_list;
// Range of attribute handles of this service.
uint16_t start_handle; uint16_t start_handle;
uint16_t end_handle; uint16_t end_handle;
} bleio_service_obj_t; } bleio_service_obj_t;
#endif // MICROPY_INCLUDED_SHARED_MODULE_BLEIO_SERVICE_H #endif // MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_SERVICE_H

View File

@ -3,8 +3,9 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2016 Glenn Ruben Bakke * Copyright (c) 2018 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2016 Glenn Ruben Bakke
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal

View File

@ -3,8 +3,9 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2016 Glenn Ruben Bakke * Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2016 Glenn Ruben Bakke
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal

View File

@ -3,8 +3,9 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2016 Glenn Ruben Bakke * Copyright (c) 2018 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2016 Glenn Ruben Bakke
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -27,6 +28,7 @@
#include "shared-bindings/bleio/__init__.h" #include "shared-bindings/bleio/__init__.h"
#include "shared-bindings/bleio/Adapter.h" #include "shared-bindings/bleio/Adapter.h"
#include "shared-bindings/bleio/Central.h"
#include "shared-bindings/bleio/Peripheral.h" #include "shared-bindings/bleio/Peripheral.h"
#include "common-hal/bleio/__init__.h" #include "common-hal/bleio/__init__.h"
@ -48,9 +50,8 @@ const super_adapter_obj_t common_hal_bleio_adapter_obj = {
gatt_role_t common_hal_bleio_device_get_gatt_role(mp_obj_t device) { gatt_role_t common_hal_bleio_device_get_gatt_role(mp_obj_t device) {
if (MP_OBJ_IS_TYPE(device, &bleio_peripheral_type)) { if (MP_OBJ_IS_TYPE(device, &bleio_peripheral_type)) {
return ((bleio_peripheral_obj_t*) MP_OBJ_TO_PTR(device))->gatt_role; return ((bleio_peripheral_obj_t*) MP_OBJ_TO_PTR(device))->gatt_role;
// Does not exist yet. } else if (MP_OBJ_IS_TYPE(device, &bleio_central_type)) {
// } else if (MP_OBJ_IS_TYPE(device, &bleio_central_type)) { return ((bleio_central_obj_t*) MP_OBJ_TO_PTR(device))->gatt_role;
// return ((bleio_central_obj_t*) MP_OBJ_TO_PTR(device))->gatt_role;
} else { } else {
return GATT_ROLE_NONE; return GATT_ROLE_NONE;
} }
@ -59,9 +60,8 @@ gatt_role_t common_hal_bleio_device_get_gatt_role(mp_obj_t device) {
uint16_t common_hal_bleio_device_get_conn_handle(mp_obj_t device) { uint16_t common_hal_bleio_device_get_conn_handle(mp_obj_t device) {
if (MP_OBJ_IS_TYPE(device, &bleio_peripheral_type)) { if (MP_OBJ_IS_TYPE(device, &bleio_peripheral_type)) {
return ((bleio_peripheral_obj_t*) MP_OBJ_TO_PTR(device))->conn_handle; return ((bleio_peripheral_obj_t*) MP_OBJ_TO_PTR(device))->conn_handle;
// Does not exist yet. } else if (MP_OBJ_IS_TYPE(device, &bleio_central_type)) {
// } else if (MP_OBJ_IS_TYPE(device, &bleio_central_type)) { return ((bleio_central_obj_t*) MP_OBJ_TO_PTR(device))->conn_handle;
// return ((bleio_central_obj_t*) MP_OBJ_TO_PTR(device))->conn_handle;
} else { } else {
return 0; return 0;
} }

View File

@ -24,8 +24,8 @@
* THE SOFTWARE. * THE SOFTWARE.
*/ */
#ifndef MICROPY_INCLUDED_COMMON_HAL_BLEIO_INIT_H #ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_INIT_H
#define MICROPY_INCLUDED_COMMON_HAL_BLEIO_INIT_H #define MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_INIT_H
#include "shared-bindings/bleio/__init__.h" #include "shared-bindings/bleio/__init__.h"
#include "shared-bindings/bleio/Adapter.h" #include "shared-bindings/bleio/Adapter.h"
@ -39,4 +39,4 @@
gatt_role_t common_hal_bleio_device_get_gatt_role(mp_obj_t device); gatt_role_t common_hal_bleio_device_get_gatt_role(mp_obj_t device);
uint16_t common_hal_bleio_device_get_conn_handle(mp_obj_t device); uint16_t common_hal_bleio_device_get_conn_handle(mp_obj_t device);
#endif // MICROPY_INCLUDED_COMMON_HAL_BLEIO_INIT_H #endif // MICROPY_INCLUDED_NRF_COMMON_HAL_BLEIO_INIT_H

View File

@ -3,9 +3,10 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2016 Sandeep Mistry All right reserved. * Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2017 hathach
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2017 hathach
* Copyright (c) 2016 Sandeep Mistry All right reserved.
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal
@ -56,13 +57,30 @@ STATIC twim_peripheral_t twim_peripherals[] = {
#endif #endif
}; };
STATIC bool never_reset[MP_ARRAY_SIZE(twim_peripherals)];
void i2c_reset(void) { void i2c_reset(void) {
for (size_t i = 0 ; i < MP_ARRAY_SIZE(twim_peripherals); i++) { for (size_t i = 0 ; i < MP_ARRAY_SIZE(twim_peripherals); i++) {
if (never_reset[i]) {
continue;
}
nrf_twim_disable(twim_peripherals[i].twim.p_twim); nrf_twim_disable(twim_peripherals[i].twim.p_twim);
twim_peripherals[i].in_use = false; twim_peripherals[i].in_use = false;
} }
} }
void common_hal_busio_i2c_never_reset(busio_i2c_obj_t *self) {
for (size_t i = 0 ; i < MP_ARRAY_SIZE(twim_peripherals); i++) {
if (self->twim_peripheral == &twim_peripherals[i]) {
never_reset[i] = true;
never_reset_pin_number(self->scl_pin_number);
never_reset_pin_number(self->sda_pin_number);
break;
}
}
}
static uint8_t twi_error_to_mp(const nrfx_err_t err) { static uint8_t twi_error_to_mp(const nrfx_err_t err) {
switch (err) { switch (err) {
case NRFX_ERROR_DRV_TWI_ERR_ANACK: case NRFX_ERROR_DRV_TWI_ERR_ANACK:

View File

@ -1,9 +1,11 @@
/* /*
* SPI Master library for nRF5x. * SPI Master library for nRF5x.
* Copyright (c) 2015 Arduino LLC *
* Copyright (c) 2016 Sandeep Mistry All right reserved. * Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2017 hathach
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2017 hathach
* Copyright (c) 2016 Sandeep Mistry All right reserved.
* Copyright (c) 2015 Arduino LLC
* *
* This library is free software; you can redistribute it and/or * This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public * modify it under the terms of the GNU Lesser General Public
@ -59,7 +61,7 @@ STATIC spim_peripheral_t spim_peripherals[] = {
#endif #endif
}; };
STATIC bool never_reset[4]; STATIC bool never_reset[MP_ARRAY_SIZE(spim_peripherals)];
void spi_reset(void) { void spi_reset(void) {
for (size_t i = 0 ; i < MP_ARRAY_SIZE(spim_peripherals); i++) { for (size_t i = 0 ; i < MP_ARRAY_SIZE(spim_peripherals); i++) {

View File

@ -131,7 +131,7 @@ void uart_reset(void) {
void common_hal_busio_uart_construct (busio_uart_obj_t *self, 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, 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, mp_float_t timeout, uint8_t bits, uart_parity_t parity, uint8_t stop, mp_float_t timeout,
uint8_t receiver_buffer_size) { uint16_t receiver_buffer_size) {
// Find a free UART peripheral. // Find a free UART peripheral.
self->uarte = NULL; self->uarte = NULL;
for (size_t i = 0 ; i < MP_ARRAY_SIZE(nrfx_uartes); i++) { for (size_t i = 0 ; i < MP_ARRAY_SIZE(nrfx_uartes); i++) {

View File

@ -111,18 +111,23 @@ void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout
// //
// If there is not enough memory, we will fall back to cycle counter // If there is not enough memory, we will fall back to cycle counter
// using DWT // using DWT
uint32_t pattern_size = numBytes * 8 * sizeof(uint16_t) + 2 * sizeof(uint16_t);
#define PATTERN_SIZE(numBytes) (numBytes * 8 * sizeof(uint16_t) + 2 * sizeof(uint16_t))
uint32_t pattern_size = PATTERN_SIZE(numBytes);
uint16_t* pixels_pattern = NULL; uint16_t* pixels_pattern = NULL;
bool pattern_on_heap = false; bool pattern_on_heap = false;
// Use the stack to store 1 pixels worth of PWM data for the status led. uint32_t to ensure alignment. // Use the stack to store 1 pixels worth of PWM data for the status led. uint32_t to ensure alignment.
uint32_t one_pixel[8 * sizeof(uint16_t) + 1]; // Make it at least as big as PATTERN_SIZE(3), for one pixel of RGB data.
// PATTERN_SIZE is a multiple of 4, so we don't need round up to make sure one_pixel is large enough.
uint32_t one_pixel[PATTERN_SIZE(3)/sizeof(uint32_t)];
NRF_PWM_Type* pwm = find_free_pwm(); NRF_PWM_Type* pwm = find_free_pwm();
// only malloc if there is PWM device available // only malloc if there is PWM device available
if ( pwm != NULL ) { if ( pwm != NULL ) {
if (pattern_size <= sizeof(one_pixel) * sizeof(uint32_t)) { if (pattern_size <= sizeof(one_pixel)) {
pixels_pattern = (uint16_t *) one_pixel; pixels_pattern = (uint16_t *) one_pixel;
} else { } else {
pixels_pattern = (uint16_t *) m_malloc_maybe(pattern_size, false); pixels_pattern = (uint16_t *) m_malloc_maybe(pattern_size, false);

View File

@ -77,11 +77,7 @@ void common_hal_pulseio_pwmout_reset_ok(pulseio_pwmout_obj_t *self) {
} }
} }
void pwmout_reset(void) { void reset_single_pwmout(uint8_t i) {
for(size_t i=0; i < MP_ARRAY_SIZE(pwms); i++) {
if (never_reset_pwm[i] > 0) {
continue;
}
NRF_PWM_Type* pwm = pwms[i]; NRF_PWM_Type* pwm = pwms[i];
pwm->ENABLE = 0; pwm->ENABLE = 0;
@ -104,6 +100,14 @@ void pwmout_reset(void) {
for(int ch =0; ch < CHANNELS_PER_PWM; ch++) { for(int ch =0; ch < CHANNELS_PER_PWM; ch++) {
pwm_seq[i][ch] = (1 << 15); // polarity = 0 pwm_seq[i][ch] = (1 << 15); // polarity = 0
} }
}
void pwmout_reset(void) {
for(size_t i=0; i < MP_ARRAY_SIZE(pwms); i++) {
if (never_reset_pwm[i] > 0) {
continue;
}
reset_single_pwmout(i);
} }
} }
@ -148,9 +152,9 @@ pwmout_result_t common_hal_pulseio_pwmout_construct(pulseio_pwmout_obj_t* self,
self->channel = CHANNELS_PER_PWM; // out-of-range value. self->channel = CHANNELS_PER_PWM; // out-of-range value.
bool pwm_already_in_use; bool pwm_already_in_use;
NRF_PWM_Type* pwm; NRF_PWM_Type* pwm;
size_t pwm_index = 0;
for (size_t i = 0 ; i < MP_ARRAY_SIZE(pwms); i++) { for (; pwm_index < MP_ARRAY_SIZE(pwms); pwm_index++) {
pwm = pwms[i]; pwm = pwms[pwm_index];
pwm_already_in_use = pwm->ENABLE & SPIM_ENABLE_ENABLE_Msk; pwm_already_in_use = pwm->ENABLE & SPIM_ENABLE_ENABLE_Msk;
if (pwm_already_in_use) { if (pwm_already_in_use) {
if (variable_frequency) { if (variable_frequency) {
@ -199,6 +203,7 @@ pwmout_result_t common_hal_pulseio_pwmout_construct(pulseio_pwmout_obj_t* self,
nrf_pwm_disable(pwm); nrf_pwm_disable(pwm);
if (!pwm_already_in_use) { if (!pwm_already_in_use) {
reset_single_pwmout(pwm_index);
nrf_pwm_configure(pwm, base_clock, NRF_PWM_MODE_UP, countertop); nrf_pwm_configure(pwm, base_clock, NRF_PWM_MODE_UP, countertop);
} }

View File

@ -3,8 +3,9 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2015 Glenn Ruben Bakke * Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* Copyright (c) 2015 Glenn Ruben Bakke
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal * of this software and associated documentation files (the "Software"), to deal

View File

@ -81,13 +81,13 @@
#define NRFX_TIMER1_ENABLED 1 #define NRFX_TIMER1_ENABLED 1
#define NRFX_TIMER2_ENABLED 1 #define NRFX_TIMER2_ENABLED 1
#ifdef NRFX_TIMER3 #ifdef NRF_TIMER3
#define NRFX_TIMER3_ENABLED 1 #define NRFX_TIMER3_ENABLED 1
#else #else
#define NRFX_TIMER3_ENABLED 0 #define NRFX_TIMER3_ENABLED 0
#endif #endif
#ifdef NRFX_TIMER4 #ifdef NRF_TIMER4
#define NRFX_TIMER4_ENABLED 1 #define NRFX_TIMER4_ENABLED 1
#else #else
#define NRFX_TIMER4_ENABLED 0 #define NRFX_TIMER4_ENABLED 0

View File

@ -224,7 +224,7 @@ $(filter $(SRC_PATTERNS), \
audioio/AudioOut.c \ audioio/AudioOut.c \
bleio/__init__.c \ bleio/__init__.c \
bleio/Adapter.c \ bleio/Adapter.c \
bleio/Broadcaster.c \ bleio/Central.c \
bleio/Characteristic.c \ bleio/Characteristic.c \
bleio/CharacteristicBuffer.c \ bleio/CharacteristicBuffer.c \
bleio/Descriptor.c \ bleio/Descriptor.c \
@ -289,8 +289,6 @@ SRC_BINDINGS_ENUMS += \
SRC_BINDINGS_ENUMS += \ SRC_BINDINGS_ENUMS += \
$(filter $(SRC_PATTERNS), \ $(filter $(SRC_PATTERNS), \
bleio/Address.c \ bleio/Address.c \
bleio/AddressType.c \
bleio/AdvertisementData.c \
bleio/ScanEntry.c \ bleio/ScanEntry.c \
) )
@ -311,12 +309,15 @@ $(filter $(SRC_PATTERNS), \
bitbangio/SPI.c \ bitbangio/SPI.c \
bitbangio/__init__.c \ bitbangio/__init__.c \
board/__init__.c \ board/__init__.c \
bleio/Address.c \
bleio/ScanEntry.c \
busio/OneWire.c \ busio/OneWire.c \
displayio/Bitmap.c \ displayio/Bitmap.c \
displayio/ColorConverter.c \ displayio/ColorConverter.c \
displayio/Display.c \ displayio/Display.c \
displayio/FourWire.c \ displayio/FourWire.c \
displayio/Group.c \ displayio/Group.c \
displayio/I2CDisplay.c \
displayio/OnDiskBitmap.c \ displayio/OnDiskBitmap.c \
displayio/Palette.c \ displayio/Palette.c \
displayio/Shape.c \ displayio/Shape.c \

View File

@ -142,11 +142,12 @@ mp_obj_t mp_make_function_from_raw_code(const mp_raw_code_t *rc, mp_obj_t def_ar
fun = mp_obj_new_fun_asm(rc->n_pos_args, rc->data.u_native.fun_data, rc->data.u_native.type_sig); fun = mp_obj_new_fun_asm(rc->n_pos_args, rc->data.u_native.fun_data, rc->data.u_native.type_sig);
break; break;
#endif #endif
default: case MP_CODE_BYTECODE:
// rc->kind should always be set and BYTECODE is the only remaining case
assert(rc->kind == MP_CODE_BYTECODE);
fun = mp_obj_new_fun_bc(def_args, def_kw_args, rc->data.u_byte.bytecode, rc->data.u_byte.const_table); fun = mp_obj_new_fun_bc(def_args, def_kw_args, rc->data.u_byte.bytecode, rc->data.u_byte.const_table);
break; break;
default:
// All other kinds are invalid.
mp_raise_RuntimeError(translate("Corrupt raw code"));
} }
// check for generator functions and if so wrap in generator object // check for generator functions and if so wrap in generator object

View File

@ -763,6 +763,7 @@ void mp_obj_tuple_del(mp_obj_t self_in);
mp_int_t mp_obj_tuple_hash(mp_obj_t self_in); mp_int_t mp_obj_tuple_hash(mp_obj_t self_in);
// list // list
mp_obj_t mp_obj_list_clear(mp_obj_t self_in);
mp_obj_t mp_obj_list_append(mp_obj_t self_in, mp_obj_t arg); mp_obj_t mp_obj_list_append(mp_obj_t self_in, mp_obj_t arg);
mp_obj_t mp_obj_list_remove(mp_obj_t self_in, mp_obj_t value); mp_obj_t mp_obj_list_remove(mp_obj_t self_in, mp_obj_t value);
void mp_obj_list_get(mp_obj_t self_in, size_t *len, mp_obj_t **items); void mp_obj_list_get(mp_obj_t self_in, size_t *len, mp_obj_t **items);

View File

@ -340,7 +340,7 @@ mp_obj_t mp_obj_list_sort(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_
return mp_const_none; return mp_const_none;
} }
STATIC mp_obj_t list_clear(mp_obj_t self_in) { mp_obj_t mp_obj_list_clear(mp_obj_t self_in) {
mp_check_self(MP_OBJ_IS_TYPE(self_in, &mp_type_list)); mp_check_self(MP_OBJ_IS_TYPE(self_in, &mp_type_list));
mp_obj_list_t *self = MP_OBJ_TO_PTR(self_in); mp_obj_list_t *self = MP_OBJ_TO_PTR(self_in);
self->len = 0; self->len = 0;
@ -418,7 +418,7 @@ STATIC mp_obj_t list_reverse(mp_obj_t self_in) {
STATIC MP_DEFINE_CONST_FUN_OBJ_2(list_append_obj, mp_obj_list_append); STATIC MP_DEFINE_CONST_FUN_OBJ_2(list_append_obj, mp_obj_list_append);
STATIC MP_DEFINE_CONST_FUN_OBJ_2(list_extend_obj, list_extend); STATIC MP_DEFINE_CONST_FUN_OBJ_2(list_extend_obj, list_extend);
STATIC MP_DEFINE_CONST_FUN_OBJ_1(list_clear_obj, list_clear); STATIC MP_DEFINE_CONST_FUN_OBJ_1(list_clear_obj, mp_obj_list_clear);
STATIC MP_DEFINE_CONST_FUN_OBJ_1(list_copy_obj, list_copy); STATIC MP_DEFINE_CONST_FUN_OBJ_1(list_copy_obj, list_copy);
STATIC MP_DEFINE_CONST_FUN_OBJ_2(list_count_obj, list_count); STATIC MP_DEFINE_CONST_FUN_OBJ_2(list_count_obj, list_count);
STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(list_index_obj, 2, 4, list_index); STATIC MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(list_index_obj, 2, 4, list_index);

View File

@ -102,20 +102,35 @@ STATIC void extract_prelude(const byte **ip, const byte **ip2, bytecode_prelude_
#include "py/parsenum.h" #include "py/parsenum.h"
STATIC void raise_corrupt_mpy(void) {
mp_raise_RuntimeError(translate("Corrupt .mpy file"));
}
STATIC int read_byte(mp_reader_t *reader) { STATIC int read_byte(mp_reader_t *reader) {
return reader->readbyte(reader->data); mp_uint_t b = reader->readbyte(reader->data);
if (b == MP_READER_EOF) {
raise_corrupt_mpy();
}
return b;
} }
STATIC void read_bytes(mp_reader_t *reader, byte *buf, size_t len) { STATIC void read_bytes(mp_reader_t *reader, byte *buf, size_t len) {
while (len-- > 0) { while (len-- > 0) {
*buf++ = reader->readbyte(reader->data); mp_uint_t b =reader->readbyte(reader->data);
if (b == MP_READER_EOF) {
raise_corrupt_mpy();
}
*buf++ = b;
} }
} }
STATIC size_t read_uint(mp_reader_t *reader) { STATIC size_t read_uint(mp_reader_t *reader) {
size_t unum = 0; size_t unum = 0;
for (;;) { for (;;) {
byte b = reader->readbyte(reader->data); mp_uint_t b = reader->readbyte(reader->data);
if (b == MP_READER_EOF) {
raise_corrupt_mpy();
}
unum = (unum << 7) | (b & 0x7f); unum = (unum << 7) | (b & 0x7f);
if ((b & 0x80) == 0) { if ((b & 0x80) == 0) {
break; break;
@ -145,11 +160,12 @@ STATIC mp_obj_t load_obj(mp_reader_t *reader) {
return mp_obj_new_str_from_vstr(obj_type == 's' ? &mp_type_str : &mp_type_bytes, &vstr); return mp_obj_new_str_from_vstr(obj_type == 's' ? &mp_type_str : &mp_type_bytes, &vstr);
} else if (obj_type == 'i') { } else if (obj_type == 'i') {
return mp_parse_num_integer(vstr.buf, vstr.len, 10, NULL); return mp_parse_num_integer(vstr.buf, vstr.len, 10, NULL);
} else { } else if (obj_type == 'f' || obj_type == 'c') {
assert(obj_type == 'f' || obj_type == 'c');
return mp_parse_num_decimal(vstr.buf, vstr.len, obj_type == 'c', false, NULL); return mp_parse_num_decimal(vstr.buf, vstr.len, obj_type == 'c', false, NULL);
} }
} }
raise_corrupt_mpy();
return MP_OBJ_FROM_PTR(&mp_const_none_obj);
} }
STATIC void load_bytecode_qstrs(mp_reader_t *reader, byte *ip, byte *ip_top) { STATIC void load_bytecode_qstrs(mp_reader_t *reader, byte *ip, byte *ip_top) {

View File

@ -95,7 +95,12 @@ STATIC mp_obj_t stage_render(size_t n_args, const mp_obj_t *args) {
MICROPY_VM_HOOK_LOOP ; MICROPY_VM_HOOK_LOOP ;
#endif #endif
} }
displayio_display_set_region_to_update(display, x0, y0, x1, y1); displayio_area_t area;
area.x1 = x0;
area.y1 = y0;
area.x2 = x1;
area.y2 = y1;
displayio_display_set_region_to_update(display, &area);
render_stage(x0, y0, x1, y1, layers, layers_size, buffer, buffer_size, display); render_stage(x0, y0, x1, y1, layers, layers_size, buffer, buffer_size, display);
displayio_display_end_transaction(display); displayio_display_end_transaction(display);

View File

@ -3,6 +3,7 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2018 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy

View File

@ -3,6 +3,7 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2018 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy

View File

@ -3,6 +3,7 @@
* *
* The MIT License (MIT) * The MIT License (MIT)
* *
* Copyright (c) 2019 Dan Halbert for Adafruit Industries
* Copyright (c) 2018 Artur Pacholec * Copyright (c) 2018 Artur Pacholec
* *
* Permission is hereby granted, free of charge, to any person obtaining a copy * Permission is hereby granted, free of charge, to any person obtaining a copy
@ -33,13 +34,6 @@
#include "shared-bindings/bleio/Address.h" #include "shared-bindings/bleio/Address.h"
#include "shared-module/bleio/Address.h" #include "shared-module/bleio/Address.h"
#define ADDRESS_BYTE_LEN 12
STATIC uint8_t xdigit_8b_value(byte nibble1, byte nibble2) {
return unichar_xdigit_value(nibble1) | (unichar_xdigit_value(nibble2) << 4);
}
//| .. currentmodule:: bleio //| .. currentmodule:: bleio
//| //|
//| :class:`Address` -- BLE address //| :class:`Address` -- BLE address
@ -48,31 +42,20 @@ STATIC uint8_t xdigit_8b_value(byte nibble1, byte nibble2) {
//| Encapsulates the address of a BLE device. //| Encapsulates the address of a BLE device.
//| //|
//| .. class:: Address(address) //| .. class:: Address(address, address_type)
//| //|
//| Create a new Address object encapsulating the address value. //| Create a new Address object encapsulating the address value.
//| The value itself can be one of: //| The value itself can be one of:
//| //|
//| - a `str` value in the format of 'XXXXXXXXXXXX' or 'XX:XX:XX:XX:XX:XX' (12 hex digits) //| :param buf address: The address value to encapsulate. A buffer object (bytearray, bytes) of 6 bytes.
//| - a `bytes` or `bytearray` containing 6 bytes //| :param int address_type: one of the integer values: `PUBLIC`, `RANDOM_STATIC`,
//| - another Address object //| `RANDOM_PRIVATE_RESOLVABLE`, or `RANDOM_PRIVATE_NON_RESOLVABLE`.
//|
//| :param address: The address to encapsulate
//|
//| .. attribute:: type
//|
//| The address type. One of:
//|
//| - `bleio.AddressType.PUBLIC`
//| - `bleio.AddressType.RANDOM_STATIC`
//| - `bleio.AddressType.RANDOM_PRIVATE_RESOLVABLE`
//| - `bleio.AddressType.RANDOM_PRIVATE_NON_RESOLVABLE`
//| //|
STATIC mp_obj_t bleio_address_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { STATIC mp_obj_t bleio_address_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) {
enum { ARG_address }; enum { ARG_address, ARG_address_type };
static const mp_arg_t allowed_args[] = { static const mp_arg_t allowed_args[] = {
{ MP_QSTR_address, MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, { MP_QSTR_address, MP_ARG_OBJ | MP_ARG_REQUIRED },
{ MP_QSTR_address_type, MP_ARG_INT, {.u_int = BLEIO_ADDRESS_TYPE_PUBLIC } },
}; };
mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];
@ -80,83 +63,52 @@ STATIC mp_obj_t bleio_address_make_new(const mp_obj_type_t *type, size_t n_args,
bleio_address_obj_t *self = m_new_obj(bleio_address_obj_t); bleio_address_obj_t *self = m_new_obj(bleio_address_obj_t);
self->base.type = &bleio_address_type; self->base.type = &bleio_address_type;
self->type = ADDRESS_PUBLIC;
const mp_obj_t address = args[ARG_address].u_obj; const mp_obj_t address = args[ARG_address].u_obj;
if (MP_OBJ_IS_STR(address)) {
GET_STR_DATA_LEN(address, str, str_len);
size_t value_index = 0;
int str_index = str_len;
bool error = false;
// Loop until fewer than two characters left.
while (str_index >= 1 && value_index < sizeof(self->value)) {
if (str[str_index] == ':') {
// Skip colon separators.
str_index--;
continue;
}
if (!unichar_isxdigit(str[str_index]) ||
!unichar_isxdigit(str[str_index-1])) {
error = true;
break;
}
self->value[value_index] = xdigit_8b_value(str[str_index],
str[str_index-1]);
value_index += 1;
str_index -= 2;
}
// Check for correct number of hex digits and no parsing errors.
if (error || value_index != ADDRESS_BYTE_LEN || str_index != -1) {
mp_raise_ValueError_varg(translate("Address is not %d bytes long or is in wrong format"),
ADDRESS_BYTE_LEN);
}
} else if (MP_OBJ_IS_TYPE(address, &mp_type_bytearray) || MP_OBJ_IS_TYPE(address, &mp_type_bytes)) {
mp_buffer_info_t buf_info; mp_buffer_info_t buf_info;
mp_get_buffer_raise(address, &buf_info, MP_BUFFER_READ); mp_get_buffer_raise(address, &buf_info, MP_BUFFER_READ);
if (buf_info.len != BLEIO_ADDRESS_BYTES) { if (buf_info.len != NUM_BLEIO_ADDRESS_BYTES) {
mp_raise_ValueError_varg(translate("Address must be %d bytes long"), BLEIO_ADDRESS_BYTES); mp_raise_ValueError_varg(translate("Address must be %d bytes long"), NUM_BLEIO_ADDRESS_BYTES);
} }
for (size_t b = 0; b < BLEIO_ADDRESS_BYTES; ++b) { const mp_int_t address_type = args[ARG_address_type].u_int;
self->value[BLEIO_ADDRESS_BYTES - b - 1] = ((uint8_t*)buf_info.buf)[b]; if (address_type < BLEIO_ADDRESS_TYPE_MIN || address_type > BLEIO_ADDRESS_TYPE_MAX) {
} mp_raise_ValueError(translate("Address type out of range"));
} else if (MP_OBJ_IS_TYPE(address, &bleio_address_type)) {
// deep copy
bleio_address_obj_t *other = MP_OBJ_TO_PTR(address);
self->type = other->type;
memcpy(self->value, other->value, BLEIO_ADDRESS_BYTES);
} }
common_hal_bleio_address_construct(self, buf_info.buf, address_type);
return MP_OBJ_FROM_PTR(self); return MP_OBJ_FROM_PTR(self);
} }
STATIC void bleio_address_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) { //| .. attribute:: address_bytes
//|
//| The bytes that make up the device address (read-only)
//|
STATIC mp_obj_t bleio_address_get_address_bytes(mp_obj_t self_in) {
bleio_address_obj_t *self = MP_OBJ_TO_PTR(self_in); bleio_address_obj_t *self = MP_OBJ_TO_PTR(self_in);
mp_printf(print, "Address('%02x:%02x:%02x:%02x:%02x:%02x')", return common_hal_bleio_address_get_address_bytes(self);
self->value[5], self->value[4], self->value[3],
self->value[2], self->value[1], self->value[0]);
} }
MP_DEFINE_CONST_FUN_OBJ_1(bleio_address_get_address_bytes_obj, bleio_address_get_address_bytes);
const mp_obj_property_t bleio_address_address_bytes_obj = {
.base.type = &mp_type_property,
.proxy = {(mp_obj_t)&bleio_address_get_address_bytes_obj,
(mp_obj_t)&mp_const_none_obj,
(mp_obj_t)&mp_const_none_obj},
};
//| .. attribute:: type
//|
//| The address type (read-only).
//| One of the integer values: `PUBLIC`, `RANDOM_STATIC`,
//| `RANDOM_PRIVATE_RESOLVABLE`, or `RANDOM_PRIVATE_NON_RESOLVABLE`.
//|
STATIC mp_obj_t bleio_address_get_type(mp_obj_t self_in) { STATIC mp_obj_t bleio_address_get_type(mp_obj_t self_in) {
bleio_address_obj_t *self = MP_OBJ_TO_PTR(self_in); bleio_address_obj_t *self = MP_OBJ_TO_PTR(self_in);
if (self->type == ADDRESS_PUBLIC) { return MP_OBJ_NEW_SMALL_INT(common_hal_bleio_address_get_type(self));
return (mp_obj_t)&bleio_addresstype_public_obj;
} else if (self->type == ADDRESS_RANDOM_STATIC) {
return (mp_obj_t)&bleio_addresstype_random_static_obj;
} else if (self->type == ADDRESS_RANDOM_PRIVATE_RESOLVABLE) {
return (mp_obj_t)&bleio_addresstype_random_private_resolvable_obj;
} else if (self->type == ADDRESS_RANDOM_PRIVATE_NON_RESOLVABLE) {
return (mp_obj_t)&bleio_addresstype_random_private_non_resolvable_obj;
}
return mp_const_none;
} }
MP_DEFINE_CONST_FUN_OBJ_1(bleio_address_get_type_obj, bleio_address_get_type); MP_DEFINE_CONST_FUN_OBJ_1(bleio_address_get_type_obj, bleio_address_get_type);
@ -167,8 +119,74 @@ const mp_obj_property_t bleio_address_type_obj = {
(mp_obj_t)&mp_const_none_obj}, (mp_obj_t)&mp_const_none_obj},
}; };
//| .. method:: __eq__(other)
//|
//| Two Address objects are equal if their addresses and address types are equal.
//|
STATIC mp_obj_t bleio_address_binary_op(mp_binary_op_t op, mp_obj_t lhs_in, mp_obj_t rhs_in) {
switch (op) {
// Two Addresses are equal if their address bytes and address_type are equal
case MP_BINARY_OP_EQUAL:
if (MP_OBJ_IS_TYPE(rhs_in, &bleio_address_type)) {
bleio_address_obj_t *lhs = MP_OBJ_TO_PTR(lhs_in);
bleio_address_obj_t *rhs = MP_OBJ_TO_PTR(rhs_in);
return mp_obj_new_bool(
mp_obj_equal(common_hal_bleio_address_get_address_bytes(lhs),
common_hal_bleio_address_get_address_bytes(rhs)) &&
common_hal_bleio_address_get_type(lhs) ==
common_hal_bleio_address_get_type(rhs));
} else {
return mp_const_false;
}
default:
return MP_OBJ_NULL; // op not supported
}
}
STATIC void bleio_address_print(const mp_print_t *print, mp_obj_t self_in, mp_print_kind_t kind) {
bleio_address_obj_t *self = MP_OBJ_TO_PTR(self_in);
if (kind == PRINT_STR) {
mp_buffer_info_t buf_info;
mp_obj_t address_bytes = common_hal_bleio_address_get_address_bytes(self);
mp_get_buffer_raise(address_bytes, &buf_info, MP_BUFFER_READ);
const uint8_t *buf = (uint8_t *) buf_info.buf;
mp_printf(print,
"%02x:%02x:%02x:%02x:%02x:%02x",
buf[5], buf[4], buf[3], buf[2], buf[1], buf[0]);
} else {
mp_printf(print, "<Address>");
}
}
//| .. data:: PUBLIC
//|
//| A publicly known address, with a company ID (high 24 bits)and company-assigned part (low 24 bits).
//|
//| .. data:: RANDOM_STATIC
//|
//| A randomly generated address that does not change often. It may never change or may change after
//| a power cycle.
//|
//| .. data:: RANDOM_PRIVATE_RESOLVABLE
//|
//| An address that is usable when the peer knows the other device's secret Identity Resolving Key (IRK).
//|
//| .. data:: RANDOM_PRIVATE_NON_RESOLVABLE
//|
//| A randomly generated address that changes on every connection.
//|
STATIC const mp_rom_map_elem_t bleio_address_locals_dict_table[] = { STATIC const mp_rom_map_elem_t bleio_address_locals_dict_table[] = {
{ MP_ROM_QSTR(MP_QSTR_address_bytes), MP_ROM_PTR(&bleio_address_address_bytes_obj) },
{ MP_ROM_QSTR(MP_QSTR_type), MP_ROM_PTR(&bleio_address_type_obj) }, { MP_ROM_QSTR(MP_QSTR_type), MP_ROM_PTR(&bleio_address_type_obj) },
// These match the BLE_GAP_ADDR_TYPES values used by the nRF library.
{ MP_ROM_QSTR(MP_QSTR_PUBLIC), MP_OBJ_NEW_SMALL_INT(0) },
{ MP_ROM_QSTR(MP_QSTR_RANDOM_STATIC), MP_OBJ_NEW_SMALL_INT(1) },
{ MP_ROM_QSTR(MP_QSTR_RANDOM_PRIVATE_RESOLVABLE), MP_OBJ_NEW_SMALL_INT(2) },
{ MP_ROM_QSTR(MP_QSTR_RANDOM_PRIVATE_NON_RESOLVABLE), MP_OBJ_NEW_SMALL_INT(3) },
}; };
STATIC MP_DEFINE_CONST_DICT(bleio_address_locals_dict, bleio_address_locals_dict_table); STATIC MP_DEFINE_CONST_DICT(bleio_address_locals_dict, bleio_address_locals_dict_table);
@ -176,7 +194,8 @@ STATIC MP_DEFINE_CONST_DICT(bleio_address_locals_dict, bleio_address_locals_dict
const mp_obj_type_t bleio_address_type = { const mp_obj_type_t bleio_address_type = {
{ &mp_type_type }, { &mp_type_type },
.name = MP_QSTR_Address, .name = MP_QSTR_Address,
.print = bleio_address_print,
.make_new = bleio_address_make_new, .make_new = bleio_address_make_new,
.print = bleio_address_print,
.binary_op = bleio_address_binary_op,
.locals_dict = (mp_obj_dict_t*)&bleio_address_locals_dict .locals_dict = (mp_obj_dict_t*)&bleio_address_locals_dict
}; };

Some files were not shown because too many files have changed in this diff Show More