From 0651ef17dd41e0558f5daf07608aa507cf2837e7 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 12 May 2021 15:53:52 -0400 Subject: [PATCH 01/35] Fix endpoint checking; Clean up safe mode printing. --- locale/circuitpython.pot | 27 +++++------- main.c | 22 ++++++---- py/circuitpy_mpconfig.mk | 6 +-- supervisor/shared/safe_mode.c | 73 ++++++++++++++++---------------- supervisor/shared/usb/usb_desc.c | 2 +- 5 files changed, 65 insertions(+), 65 deletions(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index c04405b99f..a6e71b519c 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -710,13 +710,7 @@ msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "" #: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" +msgid "CircuitPython was unable to allocate the heap." msgstr "" #: shared-module/bitbangio/SPI.c @@ -1634,10 +1628,6 @@ msgstr "" msgid "Not playing" msgstr "" -#: main.c -msgid "Not running saved code.\n" -msgstr "" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "" @@ -1950,7 +1940,7 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "" #: main.c -msgid "Running in safe mode! " +msgid "Running in safe mode! Not running saved code.\n" msgstr "" #: shared-module/sdcardio/SDCard.c @@ -2071,13 +2061,13 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" #: shared-bindings/rgbmatrix/RGBMatrix.c @@ -2088,7 +2078,7 @@ msgstr "" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" #: shared-module/audiomixer/MixerVoice.c @@ -2382,7 +2372,12 @@ msgid "Writes not supported on Characteristic" msgstr "" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." msgstr "" #: supervisor/shared/safe_mode.c diff --git a/main.c b/main.c index 48373b6834..6904980ae9 100755 --- a/main.c +++ b/main.c @@ -261,18 +261,20 @@ STATIC void print_code_py_status_message(safe_mode_t safe_mode) { serial_write_compressed(translate("Auto-reload is off.\n")); } if (safe_mode != NO_SAFE_MODE) { - serial_write_compressed(translate("Running in safe mode! ")); - serial_write_compressed(translate("Not running saved code.\n")); + serial_write_compressed(translate("Running in safe mode! Not running saved code.\n")); } } STATIC bool run_code_py(safe_mode_t safe_mode) { bool serial_connected_at_start = serial_connected(); + bool printed_safe_mode_message = false; #if CIRCUITPY_AUTORELOAD_DELAY_MS > 0 - serial_write("\n"); - print_code_py_status_message(safe_mode); - print_safe_mode_message(safe_mode); - serial_write("\n"); + if (serial_connected_at_start) { + serial_write("\r\n"); + print_code_py_status_message(safe_mode); + print_safe_mode_message(safe_mode); + printed_safe_mode_message = true; + } #endif pyexec_result_t result; @@ -383,8 +385,11 @@ STATIC bool run_code_py(safe_mode_t safe_mode) { print_code_py_status_message(safe_mode); } - print_safe_mode_message(safe_mode); - serial_write("\n"); + if (!printed_safe_mode_message) { + print_safe_mode_message(safe_mode); + printed_safe_mode_message = true; + } + serial_write("\r\n"); serial_write_compressed(translate("Press any key to enter the REPL. Use CTRL-D to reload.\n")); printed_press_any_key = true; } @@ -521,7 +526,6 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) { usb_set_defaults(); #endif - // TODO(tannewt): Re-add support for flashing boot error output. if (ok_to_run) { bool found_boot = maybe_run_list(boot_py_filenames, NULL); (void) found_boot; diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index c7b83dba21..90e78da0da 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -350,18 +350,18 @@ CFLAGS += -DCIRCUITPY_USB_CDC_DATA_ENABLED_DEFAULT=$(CIRCUITPY_USB_CDC_DATA_ENAB CIRCUITPY_USB_HID ?= 1 CFLAGS += -DCIRCUITPY_USB_HID=$(CIRCUITPY_USB_HID) -CIRCUITPY_USB_HID_ENABLED_DEFAULT = $(CIRCUITPY_USB_HID) +CIRCUITPY_USB_HID_ENABLED_DEFAULT ?= $(CIRCUITPY_USB_HID) CFLAGS += -DCIRCUITPY_USB_HID_ENABLED_DEFAULT=$(CIRCUITPY_USB_HID_ENABLED_DEFAULT) # MIDI is usually available if there are at least 8 endpoints. CIRCUITPY_USB_MIDI ?= $(USB_NUM_EP_8_OR_GREATER) CFLAGS += -DCIRCUITPY_USB_MIDI=$(CIRCUITPY_USB_MIDI) -CIRCUITPY_USB_MIDI_ENABLED_DEFAULT = $(CIRCUITPY_USB_MIDI) +CIRCUITPY_USB_MIDI_ENABLED_DEFAULT ?= $(CIRCUITPY_USB_MIDI) CFLAGS += -DCIRCUITPY_USB_MIDI_ENABLED_DEFAULT=$(CIRCUITPY_USB_MIDI_ENABLED_DEFAULT) CIRCUITPY_USB_MSC ?= 1 CFLAGS += -DCIRCUITPY_USB_MSC=$(CIRCUITPY_USB_MSC) -CIRCUITPY_USB_MSC_ENABLED_DEFAULT = $(CIRCUITPY_USB_MSC) +CIRCUITPY_USB_MSC_ENABLED_DEFAULT ?= $(CIRCUITPY_USB_MSC) CFLAGS += -DCIRCUITPY_USB_MSC_ENABLED_DEFAULT=$(CIRCUITPY_USB_MSC_ENABLED_DEFAULT) # Defaulting this to OFF initially because it has only been tested on a diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index 661fd79af8..ec85ea9d43 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -117,13 +117,17 @@ void __attribute__((noinline,)) reset_into_safe_mode(safe_mode_t reason) { -#define FILE_AN_ISSUE translate("\nPlease file an issue with the contents of your CIRCUITPY drive at \nhttps://github.com/adafruit/circuitpython/issues\n") - void print_safe_mode_message(safe_mode_t reason) { if (reason == NO_SAFE_MODE) { return; } - serial_write("\n"); + + serial_write("\r\n"); + serial_write_compressed(translate("You are in safe mode because:\n")); + + const compressed_string_t *message = NULL; + + // First check for safe mode reasons that do not necessarily reflect bugs. switch (reason) { case USER_SAFE_MODE: @@ -133,40 +137,40 @@ void print_safe_mode_message(safe_mode_t reason) { serial_write_compressed(BOARD_USER_SAFE_MODE_ACTION); serial_write_compressed(translate("To exit, please reset the board without ")); serial_write_compressed(BOARD_USER_SAFE_MODE_ACTION); - #else - break; #endif - return; + break; case MANUAL_SAFE_MODE: - serial_write_compressed(translate("CircuitPython is in safe mode because you pressed the reset button during boot. Press again to exit safe mode.\n")); - return; + message = translate("You pressed the reset button during boot. Press again to exit safe mode."); + break; case PROGRAMMATIC_SAFE_MODE: - serial_write_compressed(translate("The `microcontroller` module was used to boot into safe mode. Press reset to exit safe mode.\n")); - return; + message = translate("The `microcontroller` module was used to boot into safe mode. Press reset to exit safe mode."); + break; + case BROWNOUT: + message = translate("The microcontroller's power dipped. Make sure your power supply provides\nenough power for the whole circuit and press reset (after ejecting CIRCUITPY)."); + break; + case USB_TOO_MANY_ENDPOINTS: + message = translate("USB devices need more endpoints than are available."); + break; + case USB_TOO_MANY_INTERFACE_NAMES: + message = translate("USB devices specify too many interface names."); + break; + case WATCHDOG_RESET: + message = translate("Watchdog timer expired."); + break; default: break; } - serial_write_compressed(translate("You are in safe mode: something unanticipated happened.\n")); - switch (reason) { - case BROWNOUT: - serial_write_compressed(translate("The microcontroller's power dipped. Make sure your power supply provides\nenough power for the whole circuit and press reset (after ejecting CIRCUITPY).\n")); - return; - case HEAP_OVERWRITTEN: - serial_write_compressed(translate("The CircuitPython heap was corrupted because the stack was too small.\nPlease increase the stack size if you know how, or if not:")); - serial_write_compressed(FILE_AN_ISSUE); - return; - case NO_HEAP: - serial_write_compressed(translate("CircuitPython was unable to allocate the heap.\n")); - serial_write_compressed(FILE_AN_ISSUE); - return; - default: - break; + if (message) { + serial_write_compressed(message); + serial_write("\r\n"); + return; } + // Something worse happened. + serial_write_compressed(translate("CircuitPython core code crashed hard. Whoops!\n")); - const compressed_string_t *message = NULL; switch (reason) { case HARD_CRASH: message = translate("Crash into the HardFault_Handler."); @@ -177,6 +181,12 @@ void print_safe_mode_message(safe_mode_t reason) { case MICROPY_FATAL_ERROR: message = translate("Fatal error."); break; + case NO_HEAP: + message = translate("CircuitPython was unable to allocate the heap."); + break; + case HEAP_OVERWRITTEN: + message = translate("The CircuitPython heap was corrupted because the stack was too small.\nIncrease the stack size if you know how. If not:"); + break; case GC_ALLOC_OUTSIDE_VM: message = translate("Attempted heap allocation when VM not running."); break; @@ -193,19 +203,10 @@ void print_safe_mode_message(safe_mode_t reason) { case MEM_MANAGE: message = translate("Invalid memory access."); break; - case WATCHDOG_RESET: - message = translate("Watchdog timer expired."); - break; - case USB_TOO_MANY_ENDPOINTS: - message = translate("USB devices need more endpoints than are available."); - break; - case USB_TOO_MANY_INTERFACE_NAMES: - message = translate("USB devices specify too many interface names."); - break; default: message = translate("Unknown reason."); break; } serial_write_compressed(message); - serial_write_compressed(FILE_AN_ISSUE); + serial_write_compressed(translate("\nPlease file an issue with the contents of your CIRCUITPY drive at \nhttps://github.com/adafruit/circuitpython/issues\n")); } diff --git a/supervisor/shared/usb/usb_desc.c b/supervisor/shared/usb/usb_desc.c index f1d2ac7196..c1be34a5fb 100644 --- a/supervisor/shared/usb/usb_desc.c +++ b/supervisor/shared/usb/usb_desc.c @@ -231,7 +231,7 @@ static void usb_build_configuration_descriptor(void) { configuration_descriptor[CONFIG_NUM_INTERFACES_INDEX] = current_interface; // Did we run out of endpoints? - if (current_endpoint - 1 > USB_NUM_EP) { + if (current_endpoint > USB_NUM_EP) { reset_into_safe_mode(USB_TOO_MANY_ENDPOINTS); } From 478ce93fe40fe3d4cf4c20deef4856d20d22a93c Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Thu, 13 May 2021 19:27:59 +0200 Subject: [PATCH 02/35] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 33 +++++++++++++++++++++++++++++---- locale/cs.po | 30 ++++++++++++++++++++++++++---- locale/de_DE.po | 33 +++++++++++++++++++++++++++++---- locale/el.po | 30 ++++++++++++++++++++++++++---- locale/en_GB.po | 33 +++++++++++++++++++++++++++++---- locale/es.po | 33 +++++++++++++++++++++++++++++---- locale/fil.po | 30 ++++++++++++++++++++++++++---- locale/fr.po | 33 +++++++++++++++++++++++++++++---- locale/hi.po | 30 ++++++++++++++++++++++++++---- locale/it_IT.po | 30 ++++++++++++++++++++++++++---- locale/ja.po | 33 +++++++++++++++++++++++++++++---- locale/ko.po | 30 ++++++++++++++++++++++++++---- locale/nl.po | 33 +++++++++++++++++++++++++++++---- locale/pl.po | 30 ++++++++++++++++++++++++++---- locale/pt_BR.po | 33 +++++++++++++++++++++++++++++---- locale/sv.po | 33 +++++++++++++++++++++++++++++---- locale/zh_Latn_pinyin.po | 33 +++++++++++++++++++++++++++++---- 17 files changed, 472 insertions(+), 68 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index bcc0a3d5e9..06829170f5 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -866,6 +866,10 @@ msgstr "Potongan data harus mengikuti fmt chunk" msgid "Data too large for advertisement packet" msgstr "Data terlalu besar untuk paket advertisment" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "Kapasitas tujuan lebih kecil dari destination_length." @@ -1695,6 +1699,10 @@ msgstr "" "Hanya format Windows, mendukung BMP tidak dikompresi: ukuran header yang " "diberikan adalah %d" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1710,6 +1718,7 @@ msgstr "" #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1787,6 +1796,10 @@ msgstr "Periferal sedang digunakan" msgid "Permission denied" msgstr "Izin ditolak" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "" @@ -1805,6 +1818,11 @@ msgstr "Jumlah pin terlalu besar" msgid "Pin does not have ADC capabilities" msgstr "Pin tidak mempunya kemampuan untuk ADC (Analog Digital Converter)" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1818,10 +1836,6 @@ msgstr "" msgid "Pin must support hardware interrupts" msgstr "Pin harus mendukung interupsi perangkat keras" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "Nomor pin sudah dipesan oleh EXTI" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2047,6 +2061,10 @@ msgstr "" msgid "Size not supported" msgstr "" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "Potongan dan nilai panjangnya berbeda." @@ -2194,6 +2212,10 @@ msgstr "Terlalu banyak tampilan" msgid "Total data to write is larger than %q" msgstr "" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (bagian terakhir dari panggilan terkini):\n" @@ -4381,6 +4403,9 @@ msgstr "zi harus berjenis float" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Pin number already reserved by EXTI" +#~ msgstr "Nomor pin sudah dipesan oleh EXTI" + #~ msgid "USB Busy" #~ msgstr "USB Sibuk" diff --git a/locale/cs.po b/locale/cs.po index 879dc9187d..5a9e299ad0 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -849,6 +849,10 @@ msgstr "" msgid "Data too large for advertisement packet" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "" @@ -1673,6 +1677,10 @@ msgid "" "Only Windows format, uncompressed BMP supported: given header size is %d" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1686,6 +1694,7 @@ msgstr "" #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1761,6 +1770,10 @@ msgstr "" msgid "Permission denied" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "" @@ -1779,6 +1792,11 @@ msgstr "" msgid "Pin does not have ADC capabilities" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1792,10 +1810,6 @@ msgstr "" msgid "Pin must support hardware interrupts" msgstr "" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2016,6 +2030,10 @@ msgstr "" msgid "Size not supported" msgstr "" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "" @@ -2156,6 +2174,10 @@ msgstr "" msgid "Total data to write is larger than %q" msgstr "" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 3847ac1596..9706c286aa 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -864,6 +864,10 @@ msgstr "Dem fmt Block muss ein Datenblock folgen" msgid "Data too large for advertisement packet" msgstr "Zu vielen Daten für das advertisement packet" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "Die Zielkapazität ist kleiner als destination_length." @@ -1698,6 +1702,10 @@ msgstr "" "Nur Windows-Format, unkomprimiertes BMP unterstützt: die gegebene Header-" "Größe ist %d" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1713,6 +1721,7 @@ msgstr "" #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1788,6 +1797,10 @@ msgstr "" msgid "Permission denied" msgstr "Zugang verweigert" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "" @@ -1806,6 +1819,11 @@ msgstr "" msgid "Pin does not have ADC capabilities" msgstr "Pin hat keine ADC Funktionalität" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1819,10 +1837,6 @@ msgstr "" msgid "Pin must support hardware interrupts" msgstr "Pin muss Hardware-Interrupts unterstützen" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "PIN-Nummer bereits von EXTI reserviert" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2048,6 +2062,10 @@ msgstr "" msgid "Size not supported" msgstr "" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "Slice und Wert (value) haben unterschiedliche Längen." @@ -2200,6 +2218,10 @@ msgstr "Zu viele displays" msgid "Total data to write is larger than %q" msgstr "" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Zurückverfolgung (jüngste Aufforderung zuletzt):\n" @@ -4424,6 +4446,9 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Pin number already reserved by EXTI" +#~ msgstr "PIN-Nummer bereits von EXTI reserviert" + #~ msgid "USB Busy" #~ msgstr "USB beschäftigt" diff --git a/locale/el.po b/locale/el.po index e46691e920..ebb94270b3 100644 --- a/locale/el.po +++ b/locale/el.po @@ -846,6 +846,10 @@ msgstr "" msgid "Data too large for advertisement packet" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "" @@ -1670,6 +1674,10 @@ msgid "" "Only Windows format, uncompressed BMP supported: given header size is %d" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1683,6 +1691,7 @@ msgstr "" #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1758,6 +1767,10 @@ msgstr "" msgid "Permission denied" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "" @@ -1776,6 +1789,11 @@ msgstr "" msgid "Pin does not have ADC capabilities" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1789,10 +1807,6 @@ msgstr "" msgid "Pin must support hardware interrupts" msgstr "" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2013,6 +2027,10 @@ msgstr "" msgid "Size not supported" msgstr "" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "" @@ -2153,6 +2171,10 @@ msgstr "" msgid "Total data to write is larger than %q" msgstr "" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index dfbc864f9e..52650e67e0 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -861,6 +861,10 @@ msgstr "Data chunk must follow fmt chunk" msgid "Data too large for advertisement packet" msgstr "Data too large for advertisement packet" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "Destination capacity is smaller than destination_length." @@ -1689,6 +1693,10 @@ msgid "" msgstr "" "Only Windows format, uncompressed BMP supported: given header size is %d" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1704,6 +1712,7 @@ msgstr "Only one TouchAlarm can be set in deep sleep." #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "Only one alarm.time alarm can be set." @@ -1781,6 +1790,10 @@ msgstr "Peripheral in use" msgid "Permission denied" msgstr "Permission denied" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "Pin count must be at least 1" @@ -1799,6 +1812,11 @@ msgstr "Pin count too large" msgid "Pin does not have ADC capabilities" msgstr "Pin does not have ADC capabilities" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1812,10 +1830,6 @@ msgstr "Pin must be on PWM Channel B" msgid "Pin must support hardware interrupts" msgstr "Pin must support hardware interrupts" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "Pin number already reserved by EXTI" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2043,6 +2057,10 @@ msgstr "Side set pin count must be between 1 and 5" msgid "Size not supported" msgstr "Size not supported" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "Slice and value different lengths." @@ -2190,6 +2208,10 @@ msgstr "Too many displays" msgid "Total data to write is larger than %q" msgstr "" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (most recent call last):\n" @@ -4381,6 +4403,9 @@ msgstr "zi must be of float type" msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" +#~ msgid "Pin number already reserved by EXTI" +#~ msgstr "Pin number already reserved by EXTI" + #~ msgid "USB Busy" #~ msgstr "USB busy" diff --git a/locale/es.po b/locale/es.po index c1da703417..f186328f51 100644 --- a/locale/es.po +++ b/locale/es.po @@ -870,6 +870,10 @@ msgstr "Trozo de datos debe seguir fmt chunk" msgid "Data too large for advertisement packet" msgstr "Data es muy grande para el paquete de anuncio" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "Capacidad de destino es mas pequeña que destination_length." @@ -1712,6 +1716,10 @@ msgstr "" "Solo formato de Windows, sin comprimir BMP soportado: tamaño de encabezado " "dado es %d" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1727,6 +1735,7 @@ msgstr "Solamente una TouchAlarm puede ser configurada durante deep sleep." #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "Solamente una alarm.time puede ser configurada." @@ -1804,6 +1813,10 @@ msgstr "Periférico en uso" msgid "Permission denied" msgstr "Permiso denegado" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "El total de pines debe ser por lo menos 1" @@ -1822,6 +1835,11 @@ msgstr "Total de pines demasiado grande" msgid "Pin does not have ADC capabilities" msgstr "Pin no tiene capacidad ADC" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1835,10 +1853,6 @@ msgstr "El pin debe estar en el PWM canal B" msgid "Pin must support hardware interrupts" msgstr "El pin debe admitir interrupciones de hardware" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "Número de pin ya reservado por EXTI" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2069,6 +2083,10 @@ msgstr "El conteo de pines de Side set debe estar entre 1 y 5" msgid "Size not supported" msgstr "Sin capacidades para el tamaño" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "Slice y value tienen tamaños diferentes." @@ -2219,6 +2237,10 @@ msgstr "Muchos displays" msgid "Total data to write is larger than %q" msgstr "La cantidad total de datos es mas grande que %q" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (ultima llamada reciente):\n" @@ -4425,6 +4447,9 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "Pin number already reserved by EXTI" +#~ msgstr "Número de pin ya reservado por EXTI" + #~ msgid "USB Busy" #~ msgstr "USB ocupado" diff --git a/locale/fil.po b/locale/fil.po index 62878a29f7..7cc83c965a 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -856,6 +856,10 @@ msgstr "Dapat sunurin ng Data chunk ang fmt chunk" msgid "Data too large for advertisement packet" msgstr "Hindi makasya ang data sa loob ng advertisement packet" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "" @@ -1688,6 +1692,10 @@ msgid "" "Only Windows format, uncompressed BMP supported: given header size is %d" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1701,6 +1709,7 @@ msgstr "" #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1777,6 +1786,10 @@ msgstr "" msgid "Permission denied" msgstr "Walang pahintulot" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "" @@ -1795,6 +1808,11 @@ msgstr "" msgid "Pin does not have ADC capabilities" msgstr "Ang pin ay walang kakayahan sa ADC" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1808,10 +1826,6 @@ msgstr "" msgid "Pin must support hardware interrupts" msgstr "" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2033,6 +2047,10 @@ msgstr "" msgid "Size not supported" msgstr "" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "Slice at value iba't ibang haba." @@ -2173,6 +2191,10 @@ msgstr "" msgid "Total data to write is larger than %q" msgstr "" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (pinakahuling huling tawag): \n" diff --git a/locale/fr.po b/locale/fr.po index bd54eee740..e95559568d 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -877,6 +877,10 @@ msgstr "Un bloc de données doit suivre un bloc fmt" msgid "Data too large for advertisement packet" msgstr "Données trop volumineuses pour un paquet d'avertissement" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "La capacité de destination est plus petite que 'destination_length'." @@ -1722,6 +1726,10 @@ msgstr "" "Seulement le format BMP Windows, non compressé est supporté : la taille de " "l'entête fournie est %d" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1737,6 +1745,7 @@ msgstr "Seulement une TouchAlarm peu être réglée en someil profond." #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "Seulement une alarme alarm.time peut être réglée." @@ -1816,6 +1825,10 @@ msgstr "Périphérique en utilisation" msgid "Permission denied" msgstr "Permission refusée" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "Nombre de broches doit être au moins 1" @@ -1834,6 +1847,11 @@ msgstr "Nombre de broches trop élevé" msgid "Pin does not have ADC capabilities" msgstr "La broche 'pin' ne supporte pas les capacitées ADC" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1847,10 +1865,6 @@ msgstr "La broche doit être sur le canal B du PWM" msgid "Pin must support hardware interrupts" msgstr "La broche doit supporter les interruptions matérielles" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "Numéro de broche 'pin' déjà réservé par EXTI" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2081,6 +2095,10 @@ msgstr "Nombre de broches Side configurées doit être entre 1 et 5" msgid "Size not supported" msgstr "Taille n'est pas supportée" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "Tranche et valeur de tailles différentes." @@ -2230,6 +2248,10 @@ msgstr "Trop d'affichages" msgid "Total data to write is larger than %q" msgstr "Quantité de données à écrire est plus que %q" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (appels les plus récents en dernier) :\n" @@ -4449,6 +4471,9 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "Pin number already reserved by EXTI" +#~ msgstr "Numéro de broche 'pin' déjà réservé par EXTI" + #~ msgid "USB Busy" #~ msgstr "USB occupé" diff --git a/locale/hi.po b/locale/hi.po index a5d69209de..cbe5483c05 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -846,6 +846,10 @@ msgstr "" msgid "Data too large for advertisement packet" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "" @@ -1670,6 +1674,10 @@ msgid "" "Only Windows format, uncompressed BMP supported: given header size is %d" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1683,6 +1691,7 @@ msgstr "" #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1758,6 +1767,10 @@ msgstr "" msgid "Permission denied" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "" @@ -1776,6 +1789,11 @@ msgstr "" msgid "Pin does not have ADC capabilities" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1789,10 +1807,6 @@ msgstr "" msgid "Pin must support hardware interrupts" msgstr "" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2013,6 +2027,10 @@ msgstr "" msgid "Size not supported" msgstr "" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "" @@ -2153,6 +2171,10 @@ msgstr "" msgid "Total data to write is larger than %q" msgstr "" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index bef3a32734..154817dd42 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -866,6 +866,10 @@ msgstr "" msgid "Data too large for advertisement packet" msgstr "Impossibile inserire dati nel pacchetto di advertisement." +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "La capacità di destinazione è più piccola di destination_length." @@ -1702,6 +1706,10 @@ msgid "" "Only Windows format, uncompressed BMP supported: given header size is %d" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1715,6 +1723,7 @@ msgstr "" #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1795,6 +1804,10 @@ msgstr "" msgid "Permission denied" msgstr "Permesso negato" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "" @@ -1813,6 +1826,11 @@ msgstr "" msgid "Pin does not have ADC capabilities" msgstr "Il pin non ha capacità di ADC" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1826,10 +1844,6 @@ msgstr "" msgid "Pin must support hardware interrupts" msgstr "" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2054,6 +2068,10 @@ msgstr "" msgid "Size not supported" msgstr "" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "" @@ -2194,6 +2212,10 @@ msgstr "Troppi schermi" msgid "Total data to write is larger than %q" msgstr "" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (chiamata più recente per ultima):\n" diff --git a/locale/ja.po b/locale/ja.po index 637d0361cc..13b26eea50 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -857,6 +857,10 @@ msgstr "fmtチャンクの後にdataチャンクが続かなければなりま msgid "Data too large for advertisement packet" msgstr "データが、アドバタイズメントパケットには大きすぎます" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "宛先バッファがdestination_lengthより小さい" @@ -1685,6 +1689,10 @@ msgid "" "Only Windows format, uncompressed BMP supported: given header size is %d" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1698,6 +1706,7 @@ msgstr "" #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1774,6 +1783,10 @@ msgstr "" msgid "Permission denied" msgstr "パーミッション拒否" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "" @@ -1792,6 +1805,11 @@ msgstr "" msgid "Pin does not have ADC capabilities" msgstr "ピンにADCの能力がありません" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1805,10 +1823,6 @@ msgstr "" msgid "Pin must support hardware interrupts" msgstr "ピンはハードウェア割り込みに対応していなければなりません" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "ピン番号はすでにEXTIによって予約されています" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2029,6 +2043,10 @@ msgstr "" msgid "Size not supported" msgstr "サイズは対応していません" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "スライスと値の長さが一致しません" @@ -2175,6 +2193,10 @@ msgstr "" msgid "Total data to write is larger than %q" msgstr "" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "トレースバック(最新の呼び出しが末尾):\n" @@ -4362,6 +4384,9 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "Pin number already reserved by EXTI" +#~ msgstr "ピン番号はすでにEXTIによって予約されています" + #~ msgid "USB Busy" #~ msgstr "USBビジー" diff --git a/locale/ko.po b/locale/ko.po index ed98821e34..25631414f1 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -849,6 +849,10 @@ msgstr "" msgid "Data too large for advertisement packet" msgstr "광고 (브로드 캐스트) 패킷에 대한 데이터가 너무 큽니다" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "" @@ -1673,6 +1677,10 @@ msgid "" "Only Windows format, uncompressed BMP supported: given header size is %d" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1686,6 +1694,7 @@ msgstr "" #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1761,6 +1770,10 @@ msgstr "" msgid "Permission denied" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "" @@ -1779,6 +1792,11 @@ msgstr "" msgid "Pin does not have ADC capabilities" msgstr "" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1792,10 +1810,6 @@ msgstr "" msgid "Pin must support hardware interrupts" msgstr "" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2016,6 +2030,10 @@ msgstr "" msgid "Size not supported" msgstr "" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "" @@ -2156,6 +2174,10 @@ msgstr "" msgid "Total data to write is larger than %q" msgstr "" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 837aebfa19..ac175cf8ff 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -857,6 +857,10 @@ msgstr "Data chunk moet gevolgd worden door fmt chunk" msgid "Data too large for advertisement packet" msgstr "Data te groot voor advertisement pakket" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "Bestemming grootte is kleiner dan destination_length." @@ -1688,6 +1692,10 @@ msgstr "" "Alleen Windows formaat en ongecomprimeerd BMP ondersteund: gegeven header " "grootte is %d" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1703,6 +1711,7 @@ msgstr "" #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "Slechts één alarm.time alarm kan worden ingesteld." @@ -1781,6 +1790,10 @@ msgstr "" msgid "Permission denied" msgstr "Toegang geweigerd" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "" @@ -1799,6 +1812,11 @@ msgstr "" msgid "Pin does not have ADC capabilities" msgstr "Pin heeft geen ADC mogelijkheden" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1812,10 +1830,6 @@ msgstr "" msgid "Pin must support hardware interrupts" msgstr "Pin moet hardware interrupts ondersteunen" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "Pin nummer al gereserveerd door EXTI" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2045,6 +2059,10 @@ msgstr "" msgid "Size not supported" msgstr "Afmeting niet ondersteund" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "Slice en waarde hebben verschillende lengtes." @@ -2193,6 +2211,10 @@ msgstr "Teveel beeldschermen" msgid "Total data to write is larger than %q" msgstr "" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (meest recente call laatst):\n" @@ -4393,6 +4415,9 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "Pin number already reserved by EXTI" +#~ msgstr "Pin nummer al gereserveerd door EXTI" + #~ msgid "USB Busy" #~ msgstr "USB Bezet" diff --git a/locale/pl.po b/locale/pl.po index 13927caf80..1d64749afc 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -857,6 +857,10 @@ msgstr "Fragment danych musi następować po fragmencie fmt" msgid "Data too large for advertisement packet" msgstr "Zbyt dużo danych pakietu rozgłoszeniowego" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "Pojemność celu mniejsza od destination_length." @@ -1683,6 +1687,10 @@ msgid "" "Only Windows format, uncompressed BMP supported: given header size is %d" msgstr "Wspierane są tylko nieskompresowane pliki BMP: wielkość nagłówka %d" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1696,6 +1704,7 @@ msgstr "" #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "" @@ -1771,6 +1780,10 @@ msgstr "" msgid "Permission denied" msgstr "Odmowa dostępu" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "" @@ -1789,6 +1802,11 @@ msgstr "" msgid "Pin does not have ADC capabilities" msgstr "Nóżka nie obsługuje ADC" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1802,10 +1820,6 @@ msgstr "" msgid "Pin must support hardware interrupts" msgstr "Pin musi obsługiwać przerwania sprzętowe" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2026,6 +2040,10 @@ msgstr "" msgid "Size not supported" msgstr "" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "Fragment i wartość są różnych długości." @@ -2166,6 +2184,10 @@ msgstr "Zbyt wiele wyświetlaczy" msgid "Total data to write is larger than %q" msgstr "" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Ślad wyjątku (najnowsze wywołanie na końcu):\n" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 8f32eb1b28..13e577dbc1 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -874,6 +874,10 @@ msgstr "Pedaço de dados deve seguir o pedaço de cortes" msgid "Data too large for advertisement packet" msgstr "Os dados são grandes demais para o pacote de publicidade" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "A capacidade do destino é menor que destination_length." @@ -1712,6 +1716,10 @@ msgstr "" "O BMP descompactado é compatível apenas no formato Windows: o tamanho do " "cabeçalho é %d" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1727,6 +1735,7 @@ msgstr "Apenas um TouchAlarm pode ser colocado em deep sleep." #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "Apenas um alarme alarm.time pode ser definido." @@ -1806,6 +1815,10 @@ msgstr "O periférico está em uso" msgid "Permission denied" msgstr "Permissão negada" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "A contagem dos pinos deve ser com pelo menos 1" @@ -1824,6 +1837,11 @@ msgstr "A contagem dos pinos é muito grande" msgid "Pin does not have ADC capabilities" msgstr "O pino não tem recursos de ADC" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1837,10 +1855,6 @@ msgstr "O pino deve estar no canal B do PWM" msgid "Pin must support hardware interrupts" msgstr "O pino deve ser compatível com as interrupções do hardware" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "Número do PIN já está reservado através da EXTI" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2074,6 +2088,10 @@ msgstr "" msgid "Size not supported" msgstr "O tamanho não é suportado" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "Fatie e avalie os diferentes comprimentos." @@ -2225,6 +2243,10 @@ msgstr "Exibições demais" msgid "Total data to write is larger than %q" msgstr "O total dos dados que serão escritos é maior do que %q" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (a última chamada mais recente):\n" @@ -4438,6 +4460,9 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "Pin number already reserved by EXTI" +#~ msgstr "Número do PIN já está reservado através da EXTI" + #~ msgid "USB Busy" #~ msgstr "USB ocupada" diff --git a/locale/sv.po b/locale/sv.po index 55e38e5cb0..28533ff2fd 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -863,6 +863,10 @@ msgstr "Datasegmentet måste följa fmt-segmentet" msgid "Data too large for advertisement packet" msgstr "Data för stor för annonseringspaket" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "Målkapaciteten är mindre än destination_length." @@ -1695,6 +1699,10 @@ msgid "" msgstr "" "Endast Windows-format, okomprimerad BMP stöds: given headerstorlek är %d" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1710,6 +1718,7 @@ msgstr "Endast ett TouchAlarm kan ställas in för djupsömn." #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "Endast ett alarm.time kan ställas in." @@ -1787,6 +1796,10 @@ msgstr "Periferi i bruk" msgid "Permission denied" msgstr "Åtkomst nekad" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "Antalet pinnar måste vara minst 1" @@ -1805,6 +1818,11 @@ msgstr "Antal pinnar för stort" msgid "Pin does not have ADC capabilities" msgstr "Pinnen har inte ADC-funktionalitet" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1818,10 +1836,6 @@ msgstr "Pinne måste vara på PWM-kanal B" msgid "Pin must support hardware interrupts" msgstr "Pinnen måste stödja hårdvaruavbrott" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "PInn-nummer redan reserverat av EXTI" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2051,6 +2065,10 @@ msgstr "Sido-setets antal pinnar måste vara mellan 1 och 5" msgid "Size not supported" msgstr "Storleken stöds inte" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "Slice och värde har olika längd." @@ -2199,6 +2217,10 @@ msgstr "För många displayer" msgid "Total data to write is larger than %q" msgstr "Totala data att skriva är större än %q" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (senaste anrop):\n" @@ -4396,6 +4418,9 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "Pin number already reserved by EXTI" +#~ msgstr "PInn-nummer redan reserverat av EXTI" + #~ msgid "USB Busy" #~ msgstr "USB upptagen" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 5a9879ed82..3dc2f63178 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -862,6 +862,10 @@ msgstr "Shùjù kuài bìxū zūnxún fmt qū kuài" msgid "Data too large for advertisement packet" msgstr "Guǎnggào bāo de shùjù tài dà" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Deep sleep pins must use a rising edge with pulldown" +msgstr "" + #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." msgstr "Mùbiāo róngliàng xiǎoyú mùdì de_chángdù." @@ -1697,6 +1701,10 @@ msgstr "" "Jǐn zhīchí Windows géshì, zhīchí wèi yāsuō de BMP: Gěi dìng de biāo tóu " "dàxiǎo wèi %d" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Only edge detection is available on this hardware" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c #, c-format msgid "" @@ -1712,6 +1720,7 @@ msgstr "zhǐ yǒu yí gè chù mō bì kě yǐ shè zhì zài shēn dù shuì mi #: ports/esp32s2/common-hal/alarm/time/TimeAlarm.c #: ports/nrf/common-hal/alarm/time/TimeAlarm.c +#: ports/stm/common-hal/alarm/time/TimeAlarm.c msgid "Only one alarm.time alarm can be set." msgstr "zhǐ néng shè zhì yí gè bào jǐng." @@ -1788,6 +1797,10 @@ msgstr "shǐ yòng zhōng de wài shè" msgid "Permission denied" msgstr "Quánxiàn bèi jùjué" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +msgid "Pin cannot wake from Deep Sleep" +msgstr "" + #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" msgstr "yǐn jiǎo jì shù bì xū zhì shǎo wéi 1" @@ -1806,6 +1819,11 @@ msgstr "yǐn jiǎo jì shù tài dà" msgid "Pin does not have ADC capabilities" msgstr "Pin méiyǒu ADC nénglì" +#: ports/stm/common-hal/alarm/pin/PinAlarm.c +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin interrupt already in use" +msgstr "" + #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c msgid "Pin is input only" @@ -1819,10 +1837,6 @@ msgstr "yǐn jiǎo bì xū zài Pwm pín dào B shàng" msgid "Pin must support hardware interrupts" msgstr "Yǐn jiǎo bìxū zhīchí yìngjiàn zhōngduàn" -#: ports/stm/common-hal/pulseio/PulseIn.c -msgid "Pin number already reserved by EXTI" -msgstr "Zhēn hào yǐ bèi EXTI bǎoliú" - #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format msgid "" @@ -2049,6 +2063,10 @@ msgstr "cè miàn shè zhì yǐn jiǎo shù bì xū jiè yú 1 hé 5 zhī jiān" msgid "Size not supported" msgstr "bù zhī chí dà xiǎo" +#: ports/stm/common-hal/alarm/SleepMemory.c +msgid "Sleep Memory not available" +msgstr "" + #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." msgstr "Qiēpiàn hé zhí bùtóng chángdù." @@ -2196,6 +2214,10 @@ msgstr "Xiǎnshì tài duō" msgid "Total data to write is larger than %q" msgstr "yào biān xiě de zǒng shù jù dà yú %q" +#: ports/stm/common-hal/alarm/touch/TouchAlarm.c +msgid "Touch alarms not available" +msgstr "" + #: py/obj.c msgid "Traceback (most recent call last):\n" msgstr "Traceback (Zuìjìn yīcì dǎ diànhuà):\n" @@ -4392,6 +4414,9 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "Pin number already reserved by EXTI" +#~ msgstr "Zhēn hào yǐ bèi EXTI bǎoliú" + #~ msgid "USB Busy" #~ msgstr "USB máng" From fa6c06fb3814797b128913d59bf6624db513471d Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 13 May 2021 21:49:04 -0400 Subject: [PATCH 03/35] count in/out endpoints; allow more usb modules on low-endpoint boards --- locale/ID.po | 2 +- locale/de_DE.po | 4 +-- locale/en_GB.po | 4 +-- locale/es.po | 6 ++--- locale/fr.po | 4 +-- locale/hi.po | 2 +- locale/ja.po | 8 +++--- locale/nl.po | 4 +-- locale/pl.po | 4 +-- locale/pt_BR.po | 6 ++--- locale/sv.po | 4 +-- locale/zh_Latn_pinyin.po | 4 +-- ports/atmel-samd/mpconfigport.mk | 2 +- ports/cxd56/mpconfigport.mk | 2 +- ports/esp32s2/mpconfigport.mk | 17 +++++++----- ports/litex/mpconfigport.mk | 2 +- ports/mimxrt10xx/mpconfigport.mk | 2 +- ports/nrf/mpconfigport.mk | 2 +- ports/raspberrypi/mpconfigport.mk | 2 +- ports/stm/mpconfigport.mk | 15 +++-------- py/circuitpy_mpconfig.mk | 29 +++++++++++++------- shared-bindings/storage/__init__.c | 8 +++++- shared-bindings/usb_cdc/__init__.c | 8 +++++- shared-bindings/usb_hid/__init__.c | 18 +++++++++++-- shared-bindings/usb_midi/__init__.c | 11 ++++++-- shared-module/storage/__init__.c | 16 ++++++----- shared-module/storage/__init__.h | 3 ++- shared-module/usb_cdc/__init__.c | 42 +++++++++++++++-------------- shared-module/usb_cdc/__init__.h | 3 ++- shared-module/usb_hid/__init__.c | 16 ++++++----- shared-module/usb_hid/__init__.h | 3 ++- shared-module/usb_midi/__init__.c | 28 ++++++++++--------- shared-module/usb_midi/__init__.h | 4 ++- supervisor/shared/usb/usb_desc.c | 31 +++++++++++++-------- supervisor/usb.h | 8 ++++++ 35 files changed, 200 insertions(+), 124 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index 33767f674f..21a16f4314 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -4538,7 +4538,7 @@ msgstr "" #~ msgstr "Berjalan di mode aman(safe mode)! Auto-reload tidak aktif.\n" #~ msgid "Running in safe mode! Not running saved code.\n" -#~ msgstr "" +#~ msgstr "Berjalan di mode aman(safe mode)! Tidak menjalankan kode yang disimpan.\n" #~ "Berjalan di mode aman(safe mode)! tidak menjalankan kode yang tersimpan.\n" #~ msgid "'async for' or 'async with' outside async function" diff --git a/locale/de_DE.po b/locale/de_DE.po index 3aaf33b57b..641baa8e04 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -732,8 +732,8 @@ msgstr "" "zu verlassen.\n" #: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" -msgstr "CircuitPython war es nicht möglich heap-Speicher zu allozieren.\n" +msgid "CircuitPython was unable to allocate the heap." +msgstr "CircuitPython war es nicht möglich heap-Speicher zu allozieren." #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." diff --git a/locale/en_GB.po b/locale/en_GB.po index 7fbac0439c..ae8e3ff102 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -729,8 +729,8 @@ msgstr "" "boot. Press again to exit safe mode.\n" #: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" -msgstr "CircuitPython was unable to allocate the heap.\n" +msgid "CircuitPython was unable to allocate the heap." +msgstr "CircuitPython was unable to allocate the heap." #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." diff --git a/locale/es.po b/locale/es.po index 096d413b07..7349726454 100644 --- a/locale/es.po +++ b/locale/es.po @@ -738,8 +738,8 @@ msgstr "" "durante el arranque. Presione nuevamente para salir del modo seguro.\n" #: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" -msgstr "CircuitPython no puedo encontrar el montículo.\n" +msgid "CircuitPython was unable to allocate the heap." +msgstr "CircuitPython no puedo encontrar el montículo." #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." @@ -4777,7 +4777,7 @@ msgstr "zi debe ser una forma (n_section,2)" #~ msgstr "Ejecutando en modo seguro! La auto-recarga esta deshabilitada.\n" #~ msgid "Running in safe mode! Not running saved code.\n" -#~ msgstr "" +#~ msgstr "Ejecutando en modo seguro! No ejecutando el código almacenado.\n" #~ "Ejecutando en modo seguro! No se esta ejecutando el código guardado.\n" #~ msgid "__init__() should return None, not '%s'" diff --git a/locale/fr.po b/locale/fr.po index c422a12a51..30be3b6cbe 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -745,8 +745,8 @@ msgstr "" "mode sans échec.\n" #: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" -msgstr "CircuitPython n'as pu faire l'allocation de la pile.\n" +msgid "CircuitPython was unable to allocate the heap." +msgstr "CircuitPython n'as pu faire l'allocation de la pile." #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." diff --git a/locale/hi.po b/locale/hi.po index 369280fd9d..566ed31686 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -716,7 +716,7 @@ msgid "" msgstr "" #: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" +msgid "CircuitPython was unable to allocate the heap." msgstr "" #: shared-module/bitbangio/SPI.c diff --git a/locale/ja.po b/locale/ja.po index 5bb6460559..b1ce5591fd 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -727,8 +727,8 @@ msgstr "" "度押すとセーフモードを終了します。\n" #: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" -msgstr "CircuitPythonはヒープを確保できませんでした\n" +msgid "CircuitPython was unable to allocate the heap." +msgstr "CircuitPythonはヒープを確保できませんでした" #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." @@ -1966,8 +1966,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "Rowの各要素は digitalio.DigitalInOut でなければなりません" #: main.c -msgid "Running in safe mode! " -msgstr "セーフモードで実行中! " +msgid "Running in safe mode! Not running saved code.\n" +msgstr "セーフモードで実行中! 保存されたコードは実行していません。\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" diff --git a/locale/nl.po b/locale/nl.po index 475ba432bf..ff030620eb 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -725,8 +725,8 @@ msgstr "" "het opstarten. Druk nogmaals om veilige modus te verlaten\n" #: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" -msgstr "CircuitPython kon het heap geheugen niet toewijzen.\n" +msgid "CircuitPython was unable to allocate the heap." +msgstr "CircuitPython kon het heap geheugen niet toewijzen." #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." diff --git a/locale/pl.po b/locale/pl.po index c419e6aaaa..0a8d30f604 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -725,8 +725,8 @@ msgstr "" "przycisk resetowania. Naciśnij ponownie, aby wyjść z trybu awaryjnego.\n" #: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" -msgstr "CircuitPython nie mógł przydzielić sterty.\n" +msgid "CircuitPython was unable to allocate the heap." +msgstr "CircuitPython nie mógł przydzielić sterty." #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." diff --git a/locale/pt_BR.po b/locale/pt_BR.po index dc95cee047..8e854609b7 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -743,8 +743,8 @@ msgstr "" "de segurança.\n" #: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" -msgstr "O CircuitPython não conseguiu alocar o heap.\n" +msgid "CircuitPython was unable to allocate the heap." +msgstr "O CircuitPython não conseguiu alocar o heap." #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." @@ -4818,7 +4818,7 @@ msgstr "zi deve estar na forma (n_section, 2)" #~ msgstr "Rodando em modo seguro! Atualização automática está desligada.\n" #~ msgid "Running in safe mode! Not running saved code.\n" -#~ msgstr "Rodando em modo seguro! Não está executando o código salvo.\n" +#~ msgstr "Rodando em modo seguro! O código salvo não está em execução.\n" #~ msgid "__init__() should return None, not '%s'" #~ msgstr "O __init__() deve retornar Nenhum, não '%s'" diff --git a/locale/sv.po b/locale/sv.po index 4d511c50cd..aaef6de777 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -731,8 +731,8 @@ msgstr "" "under start. Tryck igen för att lämna säkert läge.\n" #: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" -msgstr "CircuitPython kunde inte allokera heap.\n" +msgid "CircuitPython was unable to allocate the heap." +msgstr "CircuitPython kunde inte allokera heap." #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 2978380792..4a31b32cfa 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -732,8 +732,8 @@ msgstr "" "chóng zhì ànniǔ. Zài àn yīcì tuìchū ānquán móshì.\n" #: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" -msgstr "CircuitPython wúfǎ fēnpèi duī.\n" +msgid "CircuitPython was unable to allocate the heap." +msgstr "CircuitPython wúfǎ fēnpèi duī." #: shared-module/bitbangio/SPI.c msgid "Clock pin init failed." diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index 060b17daf5..8d0ff41768 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -21,7 +21,7 @@ endif INTERNAL_LIBM = 1 # Number of USB endpoint pairs. -USB_NUM_EP = 8 +USB_NUM_ENDPOINT_PAIRS = 8 CIRCUITPY_ROTARYIO_SOFTENCODER = 1 diff --git a/ports/cxd56/mpconfigport.mk b/ports/cxd56/mpconfigport.mk index 5dbc71825d..edc8e6ddf5 100644 --- a/ports/cxd56/mpconfigport.mk +++ b/ports/cxd56/mpconfigport.mk @@ -1,7 +1,7 @@ USB_HIGHSPEED = 1 # Number of USB endpoint pairs. -USB_NUM_EP = 6 +USB_NUM_ENDPOINT_PAIRS = 6 # Define an equivalent for MICROPY_LONGINT_IMPL, to pass to $(MPY-TOOL) in py/mkrules.mk # $(MPY-TOOL) needs to know what kind of longint to use (if any) to freeze long integers. diff --git a/ports/esp32s2/mpconfigport.mk b/ports/esp32s2/mpconfigport.mk index 2671c30558..a8dded05de 100644 --- a/ports/esp32s2/mpconfigport.mk +++ b/ports/esp32s2/mpconfigport.mk @@ -27,11 +27,6 @@ CIRCUITPY_ROTARYIO = 1 CIRCUITPY_NVM = 1 CIRCUITPY_PS2IO ?= 1 CIRCUITPY_TOUCHIO_USE_NATIVE ?= 1 -# We don't have enough endpoints to include MIDI. -CIRCUITPY_USB_MIDI ?= 0 -CIRCUITPY_USB_HID ?= 1 -# We have borrowed the VENDOR nomenclature from tinyusb. VENDOR AKA WEBUSB -CIRCUITPY_USB_VENDOR ?= 0 CIRCUITPY_WIFI = 1 CIRCUITPY_WATCHDOG ?= 1 @@ -39,4 +34,14 @@ CIRCUITPY_ESPIDF = 1 CIRCUITPY_MODULE ?= none -USB_NUM_EP = 5 +# From the ESP32-S2 datasheet: +# +# Endpoint number 0 always present (bi-directional, consisting of EP0 IN and EP0 OUT) +# Six additional endpoints (endpoint numbers 1 to 6), configurable as IN or OUT +# Maximum of five IN endpoints concurrently active at any time (including EP0 IN) +# +# Due to the limited number of endpoints, some USB devices will be off by default. +# For instance MIDI is available, but the device is turned off. It can be turned on +# only if something else is turned off, such as HID. +USB_NUM_ENDPOINT_PAIRS = 7 +USB_NUM_IN_ENDPOINTS = 5 diff --git a/ports/litex/mpconfigport.mk b/ports/litex/mpconfigport.mk index d99b303f6d..ce6ed08841 100644 --- a/ports/litex/mpconfigport.mk +++ b/ports/litex/mpconfigport.mk @@ -7,7 +7,7 @@ MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz INTERNAL_LIBM = 1 # Number of USB endpoint pairs. -USB_NUM_EP = 16 +USB_NUM_ENDPOINT_PAIRS = 16 # Longints can be implemented as mpz, as longlong, or not LONGINT_IMPL = MPZ diff --git a/ports/mimxrt10xx/mpconfigport.mk b/ports/mimxrt10xx/mpconfigport.mk index 31b0dbfdac..ac5e7fc8ed 100644 --- a/ports/mimxrt10xx/mpconfigport.mk +++ b/ports/mimxrt10xx/mpconfigport.mk @@ -17,7 +17,7 @@ INTERNAL_LIBM = 1 USB_HIGHSPEED = 1 # Number of USB endpoint pairs. -USB_NUM_EP = 8 +USB_NUM_ENDPOINT_PAIRS = 8 INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/nrf/mpconfigport.mk b/ports/nrf/mpconfigport.mk index b00a051479..b355b8f652 100644 --- a/ports/nrf/mpconfigport.mk +++ b/ports/nrf/mpconfigport.mk @@ -10,7 +10,7 @@ MPY_TOOL_LONGINT_IMPL = -mlongint-impl=mpz INTERNAL_LIBM = 1 # Number of USB endpoint pairs. -USB_NUM_EP = 8 +USB_NUM_ENDPOINT_PAIRS = 8 # All nRF ports have longints. LONGINT_IMPL = MPZ diff --git a/ports/raspberrypi/mpconfigport.mk b/ports/raspberrypi/mpconfigport.mk index 75c5d227f0..8bc70ed638 100644 --- a/ports/raspberrypi/mpconfigport.mk +++ b/ports/raspberrypi/mpconfigport.mk @@ -49,6 +49,6 @@ CIRCUITPY_AUDIOMIXER = 1 INTERNAL_LIBM = 1 # Number of USB endpoint pairs. -USB_NUM_EP = 8 +USB_NUM_ENDPOINT_PAIRS = 8 INTERNAL_FLASH_FILESYSTEM = 1 diff --git a/ports/stm/mpconfigport.mk b/ports/stm/mpconfigport.mk index ae021426df..551d2661d4 100644 --- a/ports/stm/mpconfigport.mk +++ b/ports/stm/mpconfigport.mk @@ -7,7 +7,7 @@ ifeq ($(MCU_VARIANT),$(filter $(MCU_VARIANT),STM32F405xx STM32F407xx)) CIRCUITPY_FRAMEBUFFERIO ?= 1 CIRCUITPY_SDIOIO ?= 1 # Number of USB endpoint pairs. - USB_NUM_EP = 4 + USB_NUM_ENDPOINT_PAIRS = 4 endif ifeq ($(MCU_SERIES),F4) @@ -24,10 +24,7 @@ ifeq ($(MCU_SERIES),F4) CIRCUITPY_NVM ?= 0 CIRCUITPY_ROTARYIO ?= 0 CIRCUITPY_RTC ?= 0 - CIRCUITPY_USB_MIDI ?= 0 - CIRCUITPY_USB_HID ?= 0 - - USB_NUM_EP = 4 + USB_NUM_ENDPOINT_PAIRS = 4 endif ifeq ($(MCU_SERIES),H7) @@ -44,10 +41,8 @@ ifeq ($(MCU_SERIES),H7) CIRCUITPY_PWMIO ?= 0 CIRCUITPY_ROTARYIO ?= 0 CIRCUITPY_RTC ?= 0 - CIRCUITPY_USB_HID ?= 0 - CIRCUITPY_USB_MIDI ?= 0 - USB_NUM_EP = 9 + USB_NUM_ENDPOINT_PAIRS = 9 endif ifeq ($(MCU_SERIES),F7) @@ -62,8 +57,6 @@ ifeq ($(MCU_SERIES),F7) CIRCUITPY_NVM ?= 0 CIRCUITPY_ROTARYIO ?= 0 CIRCUITPY_RTC ?= 0 - CIRCUITPY_USB_HID ?= 0 - CIRCUITPY_USB_MIDI ?= 0 - USB_NUM_EP = 6 + USB_NUM_ENDPOINT_PAIRS = 6 endif diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index 90e78da0da..eec52ca5fc 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -338,8 +338,18 @@ CFLAGS += -DCIRCUITPY_UHEAP=$(CIRCUITPY_UHEAP) CIRCUITPY_USB ?= 1 CFLAGS += -DCIRCUITPY_USB=$(CIRCUITPY_USB) -# Compute this value once, so the shell command is not reinvoked many times. -USB_NUM_EP_8_OR_GREATER := $(shell expr $(USB_NUM_EP) '>=' 8) +# Compute these value once, so the shell command is not reinvoked many times. +USB_NUM_ENDPOINT_PAIRS_5_OR_GREATER := $(shell expr $(USB_NUM_ENDPOINT_PAIRS) '>=' 5) +USB_NUM_ENDPOINT_PAIRS_8_OR_GREATER := $(shell expr $(USB_NUM_ENDPOINT_PAIRS) '>=' 8) + +# Some chips may not support the same number of IN or OUT endpoints as pairs. +# For instance, the ESP32-S2 only supports 5 IN endpoints at once, even though +# it has 7 endpoint pairs. +USB_NUM_IN_ENDPOINTS ?= $(USB_NUM_ENDPOINT_PAIRS) +CFLAGS += -DUSB_NUM_IN_ENDPOINTS=$(USB_NUM_IN_ENDPOINTS) + +USB_NUM_OUT_ENDPOINTS ?= $(USB_NUM_ENDPOINT_PAIRS) +CFLAGS += -DUSB_NUM_OUT_ENDPOINTS=$(USB_NUM_OUT_ENDPOINTS) CIRCUITPY_USB_CDC ?= 1 CFLAGS += -DCIRCUITPY_USB_CDC=$(CIRCUITPY_USB_CDC) @@ -348,15 +358,16 @@ CFLAGS += -DCIRCUITPY_USB_CDC_CONSOLE_ENABLED_DEFAULT=$(CIRCUITPY_USB_CDC_CONSOL CIRCUITPY_USB_CDC_DATA_ENABLED_DEFAULT ?= 0 CFLAGS += -DCIRCUITPY_USB_CDC_DATA_ENABLED_DEFAULT=$(CIRCUITPY_USB_CDC_DATA_ENABLED_DEFAULT) +# HID is available by default, but is not turned on if there are fewer than 5 endpoints. CIRCUITPY_USB_HID ?= 1 CFLAGS += -DCIRCUITPY_USB_HID=$(CIRCUITPY_USB_HID) -CIRCUITPY_USB_HID_ENABLED_DEFAULT ?= $(CIRCUITPY_USB_HID) +CIRCUITPY_USB_HID_ENABLED_DEFAULT ?= $(USB_NUM_ENDPOINT_PAIRS_5_OR_GREATER) CFLAGS += -DCIRCUITPY_USB_HID_ENABLED_DEFAULT=$(CIRCUITPY_USB_HID_ENABLED_DEFAULT) -# MIDI is usually available if there are at least 8 endpoints. -CIRCUITPY_USB_MIDI ?= $(USB_NUM_EP_8_OR_GREATER) +# MIDI is available by default, but is not turned on if there are fewer than 8 endpoints. +CIRCUITPY_USB_MIDI ?= 1 CFLAGS += -DCIRCUITPY_USB_MIDI=$(CIRCUITPY_USB_MIDI) -CIRCUITPY_USB_MIDI_ENABLED_DEFAULT ?= $(CIRCUITPY_USB_MIDI) +CIRCUITPY_USB_MIDI_ENABLED_DEFAULT ?= $(USB_NUM_ENDPOINT_PAIRS_8_OR_GREATER) CFLAGS += -DCIRCUITPY_USB_MIDI_ENABLED_DEFAULT=$(CIRCUITPY_USB_MIDI_ENABLED_DEFAULT) CIRCUITPY_USB_MSC ?= 1 @@ -370,10 +381,10 @@ CFLAGS += -DCIRCUITPY_USB_MSC_ENABLED_DEFAULT=$(CIRCUITPY_USB_MSC_ENABLED_DEFAUL CIRCUITPY_USB_VENDOR ?= 0 CFLAGS += -DCIRCUITPY_USB_VENDOR=$(CIRCUITPY_USB_VENDOR) -ifndef USB_NUM_EP -$(error "USB_NUM_EP (number of USB endpoint pairs)must be defined") +ifndef USB_NUM_ENDPOINT_PAIRS +$(error "USB_NUM_ENDPOINT_PAIRS (number of USB endpoint pairs)must be defined") endif -CFLAGS += -DUSB_NUM_EP=$(USB_NUM_EP) +CFLAGS += -DUSB_NUM_ENDPOINT_PAIRS=$(USB_NUM_ENDPOINT_PAIRS) # For debugging. CIRCUITPY_USTACK ?= 0 diff --git a/shared-bindings/storage/__init__.c b/shared-bindings/storage/__init__.c index 754b6866c8..f19aaa4396 100644 --- a/shared-bindings/storage/__init__.c +++ b/shared-bindings/storage/__init__.c @@ -176,7 +176,13 @@ MP_DEFINE_CONST_FUN_OBJ_0(storage_disable_usb_drive_obj, storage_disable_usb_dri //| """Enabled presenting ``CIRCUITPY`` as a USB mass storage device. //| By default, the device is enabled and ``CIRCUITPY`` is visible, //| so you do not normally need to call this function. -//| Can be called in ``boot.py``, before USB is connected.""" +//| Can be called in ``boot.py``, before USB is connected. +//| +//| If you enable too many devices at once, you will run out of USB endpoints. +//| The number of available endpoints varies by microcontroller. +//| CircuitPython will go into safe mode after running boot.py to inform you if +//| not enough endpoints are available. +//| """ //| ... //| STATIC mp_obj_t storage_enable_usb_drive(void) { diff --git a/shared-bindings/usb_cdc/__init__.c b/shared-bindings/usb_cdc/__init__.c index 557c06a3ec..f16373fa73 100644 --- a/shared-bindings/usb_cdc/__init__.c +++ b/shared-bindings/usb_cdc/__init__.c @@ -82,7 +82,13 @@ MP_DEFINE_CONST_FUN_OBJ_0(usb_cdc_disable_obj, usb_cdc_disable); //| :param console bool: Enable or disable the `console` USB serial device. //| True to enable; False to disable. Enabled by default. //| :param data bool: Enable or disable the `data` USB serial device. -//| True to enable; False to disable. *Disabled* by default.""" +//| True to enable; False to disable. *Disabled* by default. +//| +//| If you enable too many devices at once, you will run out of USB endpoints. +//| The number of available endpoints varies by microcontroller. +//| CircuitPython will go into safe mode after running boot.py to inform you if +//| not enough endpoints are available. +//| """ //| ... //| STATIC mp_obj_t usb_cdc_enable(size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { diff --git a/shared-bindings/usb_hid/__init__.c b/shared-bindings/usb_hid/__init__.c index 8e85cc67f0..f5a7c1cf72 100644 --- a/shared-bindings/usb_hid/__init__.c +++ b/shared-bindings/usb_hid/__init__.c @@ -37,12 +37,21 @@ //| //| devices: Tuple[Device, ...] -//| """Tuple of all active HID device interfaces.""" +//| """Tuple of all active HID device interfaces. +//| The default set of devices is ``Device.KEYBOARD, Device.MOUSE, Device.CONSUMER_CONTROL``, +//| On boards where `usb_hid` is disabled by default, `devices` is an empty tuple. +//| """ //| //| def disable() -> None: //| """Do not present any USB HID devices to the host computer. -//| Can be called in ``boot.py``, before USB is connected.""" +//| Can be called in ``boot.py``, before USB is connected. +//| The HID composite device is normally enabled by default, +//| but on some boards with limited endpoints, including STM32F4, +//| it is disabled by default. You must turn off another USB device such +//| as `usb_cdc` or `storage` to free up endpoints for use by `usb_hid`. +//| """ +//| STATIC mp_obj_t usb_hid_disable(void) { if (!common_hal_usb_hid_disable()) { mp_raise_RuntimeError(translate("Cannot change USB devices now")); @@ -59,6 +68,11 @@ MP_DEFINE_CONST_FUN_OBJ_0(usb_hid_disable_obj, usb_hid_disable); //| If `devices` is empty, HID is disabled. The order of the ``Devices`` //| may matter to the host. For instance, for MacOS, put the mouse device //| before any Gamepad or Digitizer HID device or else it will not work. +//| +//| If you enable too many devices at once, you will run out of USB endpoints. +//| The number of available endpoints varies by microcontroller. +//| CircuitPython will go into safe mode after running boot.py to inform you if +//| not enough endpoints are available. //| """ //| ... //| diff --git a/shared-bindings/usb_midi/__init__.c b/shared-bindings/usb_midi/__init__.c index a3ed06dd8c..9c583fb78e 100644 --- a/shared-bindings/usb_midi/__init__.c +++ b/shared-bindings/usb_midi/__init__.c @@ -45,7 +45,8 @@ //| def disable() -> None: //| """Disable presenting a USB MIDI device to the host. -//| The device is normally enabled by default. +//| The device is normally enabled by default, but on some boards with limited endpoints +//| including ESP32-S2 and certain STM boards, it is disabled by default. //| Can be called in ``boot.py``, before USB is connected.""" //| ... //| @@ -60,7 +61,13 @@ MP_DEFINE_CONST_FUN_OBJ_0(usb_midi_disable_obj, usb_midi_disable); //| def enable() -> None: //| """Enable presenting a USB MIDI device to the host. //| The device is enabled by default, so you do not normally need to call this function. -//| Can be called in ``boot.py``, before USB is connected.""" +//| Can be called in ``boot.py``, before USB is connected. +//| +//| If you enable too many devices at once, you will run out of USB endpoints. +//| The number of available endpoints varies by microcontroller. +//| CircuitPython will go into safe mode after running boot.py to inform you if +//| not enough endpoints are available. +//| """ //| ... //| STATIC mp_obj_t usb_midi_enable(void) { diff --git a/shared-module/storage/__init__.c b/shared-module/storage/__init__.c index b1d038a7d3..cbe72c6f16 100644 --- a/shared-module/storage/__init__.c +++ b/shared-module/storage/__init__.c @@ -93,14 +93,18 @@ size_t storage_usb_descriptor_length(void) { static const char storage_interface_name[] = USB_INTERFACE_NAME " Mass Storage"; -size_t storage_usb_add_descriptor(uint8_t *descriptor_buf, uint8_t *current_interface, uint8_t *current_endpoint, uint8_t *current_interface_string) { +size_t storage_usb_add_descriptor(uint8_t *descriptor_buf, descriptor_counts_t *descriptor_counts, uint8_t *current_interface_string) { memcpy(descriptor_buf, usb_msc_descriptor_template, sizeof(usb_msc_descriptor_template)); - descriptor_buf[MSC_INTERFACE_INDEX] = *current_interface; - (*current_interface)++; + descriptor_buf[MSC_INTERFACE_INDEX] = descriptor_counts->current_interface; + descriptor_counts->current_interface++; - descriptor_buf[MSC_IN_ENDPOINT_INDEX] = 0x80 | (USB_MSC_EP_NUM_IN ? USB_MSC_EP_NUM_IN : *current_endpoint); - descriptor_buf[MSC_OUT_ENDPOINT_INDEX] = USB_MSC_EP_NUM_OUT ? USB_MSC_EP_NUM_OUT : *current_endpoint; - (*current_endpoint)++; + descriptor_buf[MSC_IN_ENDPOINT_INDEX] = + 0x80 | (USB_MSC_EP_NUM_IN ? USB_MSC_EP_NUM_IN : descriptor_counts->current_endpoint); + descriptor_counts->num_in_endpoints++; + descriptor_buf[MSC_OUT_ENDPOINT_INDEX] = + USB_MSC_EP_NUM_OUT ? USB_MSC_EP_NUM_OUT : descriptor_counts->current_endpoint; + descriptor_counts->num_out_endpoints++; + descriptor_counts->current_endpoint++; usb_add_interface_string(*current_interface_string, storage_interface_name); descriptor_buf[MSC_INTERFACE_STRING_INDEX] = *current_interface_string; diff --git a/shared-module/storage/__init__.h b/shared-module/storage/__init__.h index addc8e3d05..a07e2c2e0e 100644 --- a/shared-module/storage/__init__.h +++ b/shared-module/storage/__init__.h @@ -28,12 +28,13 @@ #define SHARED_MODULE_STORAGE___INIT___H #include "py/mpconfig.h" +#include "supervisor/usb.h" #if CIRCUITPY_USB bool storage_usb_enabled(void); void storage_usb_set_defaults(void); size_t storage_usb_descriptor_length(void); -size_t storage_usb_add_descriptor(uint8_t *descriptor_buf, uint8_t *current_interface, uint8_t *current_endpoint, uint8_t *current_interface_string); +size_t storage_usb_add_descriptor(uint8_t *descriptor_buf, descriptor_counts_t *descriptor_counts, uint8_t *current_interface_string); #endif #endif // SHARED_MODULE_STORAGE___INIT___H diff --git a/shared-module/usb_cdc/__init__.c b/shared-module/usb_cdc/__init__.c index 446c65931e..c5da1f41e0 100644 --- a/shared-module/usb_cdc/__init__.c +++ b/shared-module/usb_cdc/__init__.c @@ -173,37 +173,39 @@ size_t usb_cdc_descriptor_length(void) { return sizeof(usb_cdc_descriptor_template); } -size_t usb_cdc_add_descriptor(uint8_t *descriptor_buf, uint8_t *current_interface, uint8_t *current_endpoint, uint8_t *current_interface_string, bool console) { +size_t usb_cdc_add_descriptor(uint8_t *descriptor_buf, descriptor_counts_t *descriptor_counts, uint8_t *current_interface_string, bool console) { memcpy(descriptor_buf, usb_cdc_descriptor_template, sizeof(usb_cdc_descriptor_template)); // Store comm interface number. - descriptor_buf[CDC_FIRST_INTERFACE_INDEX] = *current_interface; - descriptor_buf[CDC_COMM_INTERFACE_INDEX] = *current_interface; - descriptor_buf[CDC_UNION_MASTER_INTERFACE_INDEX] = *current_interface; - (*current_interface)++; + descriptor_buf[CDC_FIRST_INTERFACE_INDEX] = descriptor_counts->current_interface; + descriptor_buf[CDC_COMM_INTERFACE_INDEX] = descriptor_counts->current_interface; + descriptor_buf[CDC_UNION_MASTER_INTERFACE_INDEX] = descriptor_counts->current_interface; + descriptor_counts->current_interface++; // Now store data interface number. - descriptor_buf[CDC_CALL_MANAGEMENT_DATA_INTERFACE_INDEX] = *current_interface; - descriptor_buf[CDC_UNION_SLAVE_INTERFACE_INDEX] = *current_interface; - descriptor_buf[CDC_DATA_INTERFACE_INDEX] = *current_interface; - (*current_interface)++; + descriptor_buf[CDC_CALL_MANAGEMENT_DATA_INTERFACE_INDEX] = descriptor_counts->current_interface; + descriptor_buf[CDC_UNION_SLAVE_INTERFACE_INDEX] = descriptor_counts->current_interface; + descriptor_buf[CDC_DATA_INTERFACE_INDEX] = descriptor_counts->current_interface; + descriptor_counts->current_interface++; descriptor_buf[CDC_CONTROL_IN_ENDPOINT_INDEX] = 0x80 | ( console - ? (USB_CDC_EP_NUM_NOTIFICATION ? USB_CDC_EP_NUM_NOTIFICATION : *current_endpoint) - : (USB_CDC2_EP_NUM_NOTIFICATION ? USB_CDC2_EP_NUM_NOTIFICATION : *current_endpoint)); - (*current_endpoint)++; - - descriptor_buf[CDC_DATA_OUT_ENDPOINT_INDEX] = - console - ? (USB_CDC_EP_NUM_DATA_OUT ? USB_CDC_EP_NUM_DATA_OUT : *current_endpoint) - : (USB_CDC2_EP_NUM_DATA_OUT ? USB_CDC2_EP_NUM_DATA_OUT : *current_endpoint); + ? (USB_CDC_EP_NUM_NOTIFICATION ? USB_CDC_EP_NUM_NOTIFICATION : descriptor_counts->current_endpoint) + : (USB_CDC2_EP_NUM_NOTIFICATION ? USB_CDC2_EP_NUM_NOTIFICATION : descriptor_counts->current_endpoint)); + descriptor_counts->num_in_endpoints++; + descriptor_counts->current_endpoint++; descriptor_buf[CDC_DATA_IN_ENDPOINT_INDEX] = 0x80 | ( console - ? (USB_CDC_EP_NUM_DATA_IN ? USB_CDC_EP_NUM_DATA_IN : *current_endpoint) - : (USB_CDC2_EP_NUM_DATA_IN ? USB_CDC2_EP_NUM_DATA_IN : *current_endpoint)); - (*current_endpoint)++; + ? (USB_CDC_EP_NUM_DATA_IN ? USB_CDC_EP_NUM_DATA_IN : descriptor_counts->current_endpoint) + : (USB_CDC2_EP_NUM_DATA_IN ? USB_CDC2_EP_NUM_DATA_IN : descriptor_counts->current_endpoint)); + descriptor_counts->num_in_endpoints++; + descriptor_buf[CDC_DATA_OUT_ENDPOINT_INDEX] = + console + ? (USB_CDC_EP_NUM_DATA_OUT ? USB_CDC_EP_NUM_DATA_OUT : descriptor_counts->current_endpoint) + : (USB_CDC2_EP_NUM_DATA_OUT ? USB_CDC2_EP_NUM_DATA_OUT : descriptor_counts->current_endpoint); + descriptor_counts->num_out_endpoints++; + descriptor_counts->current_endpoint++; usb_add_interface_string(*current_interface_string, console ? console_cdc_comm_interface_name : data_cdc_comm_interface_name); diff --git a/shared-module/usb_cdc/__init__.h b/shared-module/usb_cdc/__init__.h index ae39143017..5195c964e2 100644 --- a/shared-module/usb_cdc/__init__.h +++ b/shared-module/usb_cdc/__init__.h @@ -29,6 +29,7 @@ #include "py/mpconfig.h" #include "py/objtuple.h" +#include "supervisor/usb.h" bool usb_cdc_console_enabled(void); bool usb_cdc_data_enabled(void); @@ -36,6 +37,6 @@ bool usb_cdc_data_enabled(void); void usb_cdc_set_defaults(void); size_t usb_cdc_descriptor_length(void); -size_t usb_cdc_add_descriptor(uint8_t *descriptor_buf, uint8_t *current_interface, uint8_t *current_endpoint, uint8_t *current_interface_string, bool repl); +size_t usb_cdc_add_descriptor(uint8_t *descriptor_buf, descriptor_counts_t *descriptor_counts, uint8_t *current_interface_string, bool console); #endif /* SHARED_MODULE_USB_CDC___INIT___H */ diff --git a/shared-module/usb_hid/__init__.c b/shared-module/usb_hid/__init__.c index c1df75b9d8..a92fd0c725 100644 --- a/shared-module/usb_hid/__init__.c +++ b/shared-module/usb_hid/__init__.c @@ -113,11 +113,11 @@ size_t usb_hid_descriptor_length(void) { static const char usb_hid_interface_name[] = USB_INTERFACE_NAME " HID"; // This is the interface descriptor, not the report descriptor. -size_t usb_hid_add_descriptor(uint8_t *descriptor_buf, uint8_t *current_interface, uint8_t *current_endpoint, uint8_t *current_interface_string, uint16_t report_descriptor_length) { +size_t usb_hid_add_descriptor(uint8_t *descriptor_buf, descriptor_counts_t *descriptor_counts, uint8_t *current_interface_string, uint16_t report_descriptor_length) { memcpy(descriptor_buf, usb_hid_descriptor_template, sizeof(usb_hid_descriptor_template)); - descriptor_buf[HID_DESCRIPTOR_INTERFACE_INDEX] = *current_interface; - (*current_interface)++; + descriptor_buf[HID_DESCRIPTOR_INTERFACE_INDEX] = descriptor_counts->current_interface; + descriptor_counts->current_interface++; usb_add_interface_string(*current_interface_string, usb_hid_interface_name); descriptor_buf[HID_DESCRIPTOR_INTERFACE_STRING_INDEX] = *current_interface_string; @@ -126,9 +126,13 @@ size_t usb_hid_add_descriptor(uint8_t *descriptor_buf, uint8_t *current_interfac descriptor_buf[HID_DESCRIPTOR_LENGTH_INDEX] = report_descriptor_length & 0xFF; descriptor_buf[HID_DESCRIPTOR_LENGTH_INDEX + 1] = (report_descriptor_length >> 8); - descriptor_buf[HID_IN_ENDPOINT_INDEX] = 0x80 | (USB_HID_EP_NUM_IN ? USB_HID_EP_NUM_IN : *current_endpoint); - descriptor_buf[HID_OUT_ENDPOINT_INDEX] = USB_HID_EP_NUM_OUT ? USB_HID_EP_NUM_OUT : *current_endpoint; - (*current_endpoint)++; + descriptor_buf[HID_IN_ENDPOINT_INDEX] = + 0x80 | (USB_HID_EP_NUM_IN ? USB_HID_EP_NUM_IN : descriptor_counts->current_endpoint); + descriptor_counts->num_in_endpoints++; + descriptor_buf[HID_OUT_ENDPOINT_INDEX] = + USB_HID_EP_NUM_OUT ? USB_HID_EP_NUM_OUT : descriptor_counts->current_endpoint; + descriptor_counts->num_out_endpoints++; + descriptor_counts->current_endpoint++; return sizeof(usb_hid_descriptor_template); } diff --git a/shared-module/usb_hid/__init__.h b/shared-module/usb_hid/__init__.h index 24a4d57a69..5069effd3d 100644 --- a/shared-module/usb_hid/__init__.h +++ b/shared-module/usb_hid/__init__.h @@ -28,13 +28,14 @@ #define SHARED_MODULE_USB_HID___INIT___H #include "shared-module/usb_hid/Device.h" +#include "supervisor/usb.h" extern usb_hid_device_obj_t usb_hid_devices[]; bool usb_hid_enabled(void); void usb_hid_set_defaults(void); -size_t usb_hid_add_descriptor(uint8_t *descriptor_buf, uint8_t *current_interface, uint8_t *current_endpoint, uint8_t *current_interface_string, uint16_t report_descriptor_length); +size_t usb_hid_add_descriptor(uint8_t *descriptor_buf, descriptor_counts_t *descriptor_counts, uint8_t *current_interface_string, uint16_t report_descriptor_length); size_t usb_hid_descriptor_length(void); size_t usb_hid_report_descriptor_length(void); diff --git a/shared-module/usb_midi/__init__.c b/shared-module/usb_midi/__init__.c index c258d35c23..ac2e05adcb 100644 --- a/shared-module/usb_midi/__init__.c +++ b/shared-module/usb_midi/__init__.c @@ -175,36 +175,38 @@ static const char midi_audio_control_interface_name[] = USB_INTERFACE_NAME " Aud static const char midi_in_jack_name[] = USB_INTERFACE_NAME " usb_midi.ports[0]"; static const char midi_out_jack_name[] = USB_INTERFACE_NAME " usb_midi.ports[0]"; -size_t usb_midi_add_descriptor(uint8_t *descriptor_buf, uint8_t *current_interface, uint8_t *current_endpoint, uint8_t *current_interface_string) { +size_t usb_midi_add_descriptor(uint8_t *descriptor_buf, descriptor_counts_t *descriptor_counts, uint8_t *current_interface_string) { memcpy(descriptor_buf, usb_midi_descriptor_template, sizeof(usb_midi_descriptor_template)); - descriptor_buf[MIDI_AUDIO_CONTROL_INTERFACE_NUMBER_INDEX] = *current_interface; - (*current_interface)++; + descriptor_buf[MIDI_AUDIO_CONTROL_INTERFACE_NUMBER_INDEX] = descriptor_counts->current_interface; + descriptor_counts->current_interface++; descriptor_buf[MIDI_STREAMING_IN_ENDPOINT_INDEX] = - 0x80 | (USB_MIDI_EP_NUM_IN ? USB_MIDI_EP_NUM_IN : *current_endpoint); + 0x80 | (USB_MIDI_EP_NUM_IN ? USB_MIDI_EP_NUM_IN : descriptor_counts->current_endpoint); + descriptor_counts->num_in_endpoints++; descriptor_buf[MIDI_STREAMING_OUT_ENDPOINT_INDEX] = - USB_MIDI_EP_NUM_OUT ? USB_MIDI_EP_NUM_OUT : *current_endpoint; - (*current_endpoint)++; + USB_MIDI_EP_NUM_OUT ? USB_MIDI_EP_NUM_OUT : descriptor_counts->current_endpoint; + descriptor_counts->num_out_endpoints++; + descriptor_counts->current_endpoint++; - descriptor_buf[MIDI_STREAMING_INTERFACE_NUMBER_INDEX] = *current_interface; - descriptor_buf[MIDI_STREAMING_INTERFACE_NUMBER_INDEX_2] = *current_interface; - (*current_interface)++; + descriptor_buf[MIDI_STREAMING_INTERFACE_NUMBER_INDEX] = descriptor_counts->current_interface; + descriptor_buf[MIDI_STREAMING_INTERFACE_NUMBER_INDEX_2] = descriptor_counts->current_interface; + descriptor_counts->current_interface++; usb_add_interface_string(*current_interface_string, midi_streaming_interface_name); - descriptor_buf[MIDI_STREAMING_INTERFACE_STRING_INDEX] = *current_interface; + descriptor_buf[MIDI_STREAMING_INTERFACE_STRING_INDEX] = *current_interface_string; (*current_interface_string)++; usb_add_interface_string(*current_interface_string, midi_audio_control_interface_name); - descriptor_buf[MIDI_AUDIO_CONTROL_INTERFACE_STRING_INDEX] = *current_interface; + descriptor_buf[MIDI_AUDIO_CONTROL_INTERFACE_STRING_INDEX] = *current_interface_string; (*current_interface_string)++; usb_add_interface_string(*current_interface_string, midi_in_jack_name); - descriptor_buf[MIDI_IN_JACK_STRING_INDEX] = *current_interface; + descriptor_buf[MIDI_IN_JACK_STRING_INDEX] = *current_interface_string; (*current_interface_string)++; usb_add_interface_string(*current_interface_string, midi_out_jack_name); - descriptor_buf[MIDI_OUT_JACK_STRING_INDEX] = *current_interface; + descriptor_buf[MIDI_OUT_JACK_STRING_INDEX] = *current_interface_string; (*current_interface_string)++; return sizeof(usb_midi_descriptor_template); diff --git a/shared-module/usb_midi/__init__.h b/shared-module/usb_midi/__init__.h index 9ab61e12db..8cc430efe3 100644 --- a/shared-module/usb_midi/__init__.h +++ b/shared-module/usb_midi/__init__.h @@ -27,11 +27,13 @@ #ifndef SHARED_MODULE_USB_MIDI___INIT___H #define SHARED_MODULE_USB_MIDI___INIT___H +#include "supervisor/usb.h" + bool usb_midi_enabled(void); void usb_midi_set_defaults(void); void usb_midi_setup_ports(void); size_t usb_midi_descriptor_length(void); -size_t usb_midi_add_descriptor(uint8_t *descriptor_buf, uint8_t *current_interface, uint8_t *current_endpoint, uint8_t *current_interface_string); +size_t usb_midi_add_descriptor(uint8_t *descriptor_buf, descriptor_counts_t *descriptor_counts, uint8_t *current_interface_string); #endif /* SHARED_MODULE_USB_MIDI___INIT___H */ diff --git a/supervisor/shared/usb/usb_desc.c b/supervisor/shared/usb/usb_desc.c index c1be34a5fb..bad0d84523 100644 --- a/supervisor/shared/usb/usb_desc.c +++ b/supervisor/shared/usb/usb_desc.c @@ -184,9 +184,16 @@ static void usb_build_configuration_descriptor(void) { configuration_descriptor[CONFIG_TOTAL_LENGTH_HI_INDEX] = (total_descriptor_length >> 8) & 0xFF; // Number interfaces and endpoints. - // Endpoint 0 is already used for USB control, so start with 1. - uint8_t current_interface = 0; - uint8_t current_endpoint = 1; + // Endpoint 0 is already used for USB control, + // so start with 1 for the current endpoint and for the number of in and out endpoints + // already in use. + + descriptor_counts_t descriptor_counts = { + .current_interface = 0, + .current_endpoint = 1, + .num_in_endpoints = 1, + .num_out_endpoints = 1, + }; uint8_t *descriptor_buf_remaining = configuration_descriptor + sizeof(configuration_descriptor_template); @@ -194,12 +201,13 @@ static void usb_build_configuration_descriptor(void) { if (usb_cdc_console_enabled()) { // Concatenate and fix up the CDC REPL descriptor. descriptor_buf_remaining += usb_cdc_add_descriptor( - descriptor_buf_remaining, ¤t_interface, ¤t_endpoint, ¤t_interface_string, true); + descriptor_buf_remaining, &descriptor_counts, ¤t_interface_string, true /*console*/); + } if (usb_cdc_data_enabled()) { // Concatenate and fix up the CDC data descriptor. descriptor_buf_remaining += usb_cdc_add_descriptor( - descriptor_buf_remaining, ¤t_interface, ¤t_endpoint, ¤t_interface_string, false); + descriptor_buf_remaining, &descriptor_counts, ¤t_interface_string, false /*console*/); } #endif @@ -207,14 +215,14 @@ static void usb_build_configuration_descriptor(void) { if (storage_usb_enabled()) { // Concatenate and fix up the MSC descriptor. descriptor_buf_remaining += storage_usb_add_descriptor( - descriptor_buf_remaining, ¤t_interface, ¤t_endpoint, ¤t_interface_string); + descriptor_buf_remaining, &descriptor_counts, ¤t_interface_string); } #endif #if CIRCUITPY_USB_HID if (usb_hid_enabled()) { descriptor_buf_remaining += usb_hid_add_descriptor( - descriptor_buf_remaining, ¤t_interface, ¤t_endpoint, ¤t_interface_string, + descriptor_buf_remaining, &descriptor_counts, ¤t_interface_string, usb_hid_report_descriptor_length()); } #endif @@ -223,18 +231,19 @@ static void usb_build_configuration_descriptor(void) { if (usb_midi_enabled()) { // Concatenate and fix up the MIDI descriptor. descriptor_buf_remaining += usb_midi_add_descriptor( - descriptor_buf_remaining, ¤t_interface, ¤t_endpoint, ¤t_interface_string); + descriptor_buf_remaining, &descriptor_counts, ¤t_interface_string); } #endif // Now we know how many interfaces have been used. - configuration_descriptor[CONFIG_NUM_INTERFACES_INDEX] = current_interface; + configuration_descriptor[CONFIG_NUM_INTERFACES_INDEX] = descriptor_counts.current_interface; // Did we run out of endpoints? - if (current_endpoint > USB_NUM_EP) { + if (descriptor_counts.current_endpoint > USB_NUM_ENDPOINT_PAIRS || + descriptor_counts.num_in_endpoints > USB_NUM_IN_ENDPOINTS || + descriptor_counts.num_out_endpoints > USB_NUM_OUT_ENDPOINTS) { reset_into_safe_mode(USB_TOO_MANY_ENDPOINTS); } - } // str must not be on the heap. diff --git a/supervisor/usb.h b/supervisor/usb.h index 918da98897..e0feb58ea8 100644 --- a/supervisor/usb.h +++ b/supervisor/usb.h @@ -50,6 +50,14 @@ void init_usb_hardware(void); // Temporary hook for code after init. Only used for RP2040. void post_usb_init(void); +// Indexes and counts updated as descriptors are built. +typedef struct { + size_t current_interface; + size_t current_endpoint; + size_t num_in_endpoints; + size_t num_out_endpoints; +} descriptor_counts_t; + // Shared implementation. bool usb_enabled(void); void usb_add_interface_string(uint8_t interface_string_index, const char str[]); From 0fcb11b7b22a5423afdd1b8c2b093c3727e95ac3 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Thu, 13 May 2021 23:14:12 -0400 Subject: [PATCH 04/35] shrink some STM32F4 builds: turn MIDI back off --- ports/stm/boards/espruino_pico/mpconfigboard.mk | 1 + ports/stm/boards/pyb_nano_v2/mpconfigboard.mk | 1 + ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk | 1 + 3 files changed, 3 insertions(+) diff --git a/ports/stm/boards/espruino_pico/mpconfigboard.mk b/ports/stm/boards/espruino_pico/mpconfigboard.mk index efbbaa22e2..e76bf8cdc5 100644 --- a/ports/stm/boards/espruino_pico/mpconfigboard.mk +++ b/ports/stm/boards/espruino_pico/mpconfigboard.mk @@ -22,6 +22,7 @@ CIRCUITPY_AUDIOPWMIO = 0 CIRCUITPY_BUSDEVICE = 0 CIRCUITPY_BITMAPTOOLS = 0 CIRCUITPY_FRAMEBUFFERIO = 0 +CIRCUITPY_MIDI = 0 CIRCUITPY_ULAB = 0 CIRCUITPY_VECTORIO = 0 diff --git a/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk b/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk index 5824e65a29..f58a85cfab 100644 --- a/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk +++ b/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk @@ -16,3 +16,4 @@ LD_FILE = boards/STM32F411_fs.ld # Too big for the flash CIRCUITPY_AUDIOCORE = 0 CIRCUITPY_AUDIOPWMIO = 0 +CIRCUITPY_MIDI = 0 diff --git a/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk b/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk index 3180fbd084..412ae8ea8d 100644 --- a/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk @@ -15,3 +15,4 @@ LD_FILE = boards/STM32F411_fs.ld # Too big for the flash CIRCUITPY_AUDIOCORE = 0 CIRCUITPY_AUDIOPWMIO = 0 +CIRCUITPY_MIDI = 0 From c65986f52674304c34e962ced6cf0c90007ec2fa Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 14 May 2021 09:18:14 -0400 Subject: [PATCH 05/35] shrink a bit more --- ports/stm/boards/espruino_pico/mpconfigboard.mk | 1 + ports/stm/boards/pyb_nano_v2/mpconfigboard.mk | 1 + ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk | 1 + 3 files changed, 3 insertions(+) diff --git a/ports/stm/boards/espruino_pico/mpconfigboard.mk b/ports/stm/boards/espruino_pico/mpconfigboard.mk index e76bf8cdc5..bc415f07ec 100644 --- a/ports/stm/boards/espruino_pico/mpconfigboard.mk +++ b/ports/stm/boards/espruino_pico/mpconfigboard.mk @@ -23,6 +23,7 @@ CIRCUITPY_BUSDEVICE = 0 CIRCUITPY_BITMAPTOOLS = 0 CIRCUITPY_FRAMEBUFFERIO = 0 CIRCUITPY_MIDI = 0 +CIRCUITPY_MSGPACK = 0 CIRCUITPY_ULAB = 0 CIRCUITPY_VECTORIO = 0 diff --git a/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk b/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk index f58a85cfab..99af948d7b 100644 --- a/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk +++ b/ports/stm/boards/pyb_nano_v2/mpconfigboard.mk @@ -17,3 +17,4 @@ LD_FILE = boards/STM32F411_fs.ld CIRCUITPY_AUDIOCORE = 0 CIRCUITPY_AUDIOPWMIO = 0 CIRCUITPY_MIDI = 0 +CIRCUITPY_MSGPACK = 0 diff --git a/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk b/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk index 412ae8ea8d..04c8cc2d45 100644 --- a/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk +++ b/ports/stm/boards/stm32f411ve_discovery/mpconfigboard.mk @@ -16,3 +16,4 @@ LD_FILE = boards/STM32F411_fs.ld CIRCUITPY_AUDIOCORE = 0 CIRCUITPY_AUDIOPWMIO = 0 CIRCUITPY_MIDI = 0 +CIRCUITPY_MSGPACK = 0 From 5f37612bcd7ec0c212c79ac45a0619022e9dec20 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Fri, 14 May 2021 01:53:47 +0000 Subject: [PATCH 06/35] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (993 of 993 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 13e577dbc1..e131732b96 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-05-12 21:48+0000\n" +"PO-Revision-Date: 2021-05-14 18:25+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -876,7 +876,7 @@ msgstr "Os dados são grandes demais para o pacote de publicidade" #: ports/stm/common-hal/alarm/pin/PinAlarm.c msgid "Deep sleep pins must use a rising edge with pulldown" -msgstr "" +msgstr "Os pinos deep sleep devem usar uma borda ascendente com pulldown" #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." @@ -1718,7 +1718,7 @@ msgstr "" #: ports/stm/common-hal/alarm/pin/PinAlarm.c msgid "Only edge detection is available on this hardware" -msgstr "" +msgstr "Apenas a detecção de borda está disponível neste hardware" #: shared-module/displayio/OnDiskBitmap.c #, c-format @@ -1817,7 +1817,7 @@ msgstr "Permissão negada" #: ports/stm/common-hal/alarm/pin/PinAlarm.c msgid "Pin cannot wake from Deep Sleep" -msgstr "" +msgstr "O pinto não pode acordar do deep sleep" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" @@ -1840,7 +1840,7 @@ msgstr "O pino não tem recursos de ADC" #: ports/stm/common-hal/alarm/pin/PinAlarm.c #: ports/stm/common-hal/pulseio/PulseIn.c msgid "Pin interrupt already in use" -msgstr "" +msgstr "A interrupção do pino já está em uso" #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c @@ -2090,7 +2090,7 @@ msgstr "O tamanho não é suportado" #: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" -msgstr "" +msgstr "Sleep memory não está disponível" #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." @@ -2245,7 +2245,7 @@ msgstr "O total dos dados que serão escritos é maior do que %q" #: ports/stm/common-hal/alarm/touch/TouchAlarm.c msgid "Touch alarms not available" -msgstr "" +msgstr "Alarmes de toque não estão disponíveis" #: py/obj.c msgid "Traceback (most recent call last):\n" From a362fae7c0f2746b805fb2acd764cc391e62493e Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Fri, 14 May 2021 09:42:11 +0000 Subject: [PATCH 07/35] Translated using Weblate (Swedish) Currently translated at 100.0% (993 of 993 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 28533ff2fd..c6b1acaac3 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-05-10 11:33+0000\n" +"PO-Revision-Date: 2021-05-14 18:25+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -865,7 +865,7 @@ msgstr "Data för stor för annonseringspaket" #: ports/stm/common-hal/alarm/pin/PinAlarm.c msgid "Deep sleep pins must use a rising edge with pulldown" -msgstr "" +msgstr "Deep sleep-pinnar måste använda en stigande flank med pulldown" #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." @@ -1701,7 +1701,7 @@ msgstr "" #: ports/stm/common-hal/alarm/pin/PinAlarm.c msgid "Only edge detection is available on this hardware" -msgstr "" +msgstr "Endast kantdetektering är tillgänglig för denna hårdvara" #: shared-module/displayio/OnDiskBitmap.c #, c-format @@ -1798,7 +1798,7 @@ msgstr "Åtkomst nekad" #: ports/stm/common-hal/alarm/pin/PinAlarm.c msgid "Pin cannot wake from Deep Sleep" -msgstr "" +msgstr "Pinnen kan inte väcka från djup sömn" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" @@ -1821,7 +1821,7 @@ msgstr "Pinnen har inte ADC-funktionalitet" #: ports/stm/common-hal/alarm/pin/PinAlarm.c #: ports/stm/common-hal/pulseio/PulseIn.c msgid "Pin interrupt already in use" -msgstr "" +msgstr "Pinnavbrott används redan" #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c @@ -2067,7 +2067,7 @@ msgstr "Storleken stöds inte" #: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" -msgstr "" +msgstr "Sömnminne inte tillgängligt" #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." @@ -2219,7 +2219,7 @@ msgstr "Totala data att skriva är större än %q" #: ports/stm/common-hal/alarm/touch/TouchAlarm.c msgid "Touch alarms not available" -msgstr "" +msgstr "Touchalarm är inte tillgängligt" #: py/obj.c msgid "Traceback (most recent call last):\n" @@ -2251,7 +2251,7 @@ msgstr "UART skrivfel" #: shared-module/usb_hid/Device.c msgid "USB busy" -msgstr "" +msgstr "USB upptaget" #: supervisor/shared/safe_mode.c msgid "USB devices need more endpoints than are available." @@ -2263,7 +2263,7 @@ msgstr "USB-enheter anger för många gränssnittsnamn." #: shared-module/usb_hid/Device.c msgid "USB error" -msgstr "" +msgstr "USB-fel" #: shared-bindings/_bleio/UUID.c msgid "UUID integer value must be 0-0xffff" @@ -3563,7 +3563,7 @@ msgstr "namn inte definierat" #: py/asmthumb.c msgid "native method too big" -msgstr "" +msgstr "inbyggd metod för stor" #: py/emitnative.c msgid "native yield" @@ -3608,7 +3608,7 @@ msgstr "ingen standardpackare" #: extmod/modurandom.c msgid "no default seed" -msgstr "" +msgstr "inget standard seed" #: py/builtinimport.c msgid "no module named '%q'" @@ -4183,7 +4183,7 @@ msgstr "för många index" #: py/asmthumb.c msgid "too many locals for native method" -msgstr "" +msgstr "för många locals för nativ metod" #: py/runtime.c #, c-format From b2e19530b421b28eb6e1bed5ed33746f7e801b1b Mon Sep 17 00:00:00 2001 From: Hosted Weblate Date: Fri, 14 May 2021 20:25:10 +0200 Subject: [PATCH 08/35] Update translation files Updated by "Update PO files to match POT (msgmerge)" hook in Weblate. Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/ --- locale/ID.po | 80 +++++++++++++++++++++++-------------- locale/cs.po | 27 +++++-------- locale/de_DE.po | 85 ++++++++++++++++++++++++--------------- locale/el.po | 27 +++++-------- locale/en_GB.po | 77 +++++++++++++++++++++++------------ locale/es.po | 85 ++++++++++++++++++++++++--------------- locale/fil.po | 32 ++++++--------- locale/fr.po | 85 ++++++++++++++++++++++++--------------- locale/hi.po | 25 +++++------- locale/it_IT.po | 32 ++++++--------- locale/ja.po | 63 +++++++++++++++++++---------- locale/ko.po | 27 +++++-------- locale/nl.po | 83 +++++++++++++++++++++++--------------- locale/pl.po | 41 +++++++++---------- locale/pt_BR.po | 86 +++++++++++++++++++++++++--------------- locale/sv.po | 82 ++++++++++++++++++++++++-------------- locale/zh_Latn_pinyin.po | 80 +++++++++++++++++++++++-------------- 17 files changed, 597 insertions(+), 420 deletions(-) diff --git a/locale/ID.po b/locale/ID.po index ec67daecf7..69081fae66 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -727,15 +727,7 @@ msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "Kode inti CircuitPython mengalami crash. Aduh!\n" #: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" -"CircuitPython dalam mode aman karena Anda menekan tombol reset saat boot. " -"Tekan lagi untuk keluar dari mode aman.\n" - -#: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" +msgid "CircuitPython was unable to allocate the heap." msgstr "" #: shared-module/bitbangio/SPI.c @@ -1660,10 +1652,6 @@ msgstr "Tidak terhubung" msgid "Not playing" msgstr "Tidak berfungsi" -#: main.c -msgid "Not running saved code.\n" -msgstr "Tidak menjalankan kode yang disimpan.\n" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "" @@ -1998,8 +1986,10 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "Entri baris harus digitalio.DigitalInOut" #: main.c -msgid "Running in safe mode! " +msgid "Running in safe mode! Not running saved code.\n" msgstr "" +"Berjalan di mode aman(safe mode)! Tidak menjalankan kode yang disimpan.\n" +"Berjalan di mode aman(safe mode)! tidak menjalankan kode yang tersimpan.\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -2123,18 +2113,14 @@ msgstr "Waktu baca suhu habis" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" -"heap dari CircuitPython rusak karena stack terlalu kecil.\n" -"Harap tambah ukuran stack jika Anda tahu caranya, atau jika tidak:" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" -"Modul `microcontroller` digunakan untukboot ke mode aman. Tekan reset untuk " -"keluar dari mode aman.\n" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2144,11 +2130,8 @@ msgstr "" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" -"Kekuatan mikrokontroler menurun. Pastikan catu daya Anda menyediakan\n" -"daya yang cukup untuk seluruh rangkaian dan tekan reset (setelah " -"mengeluarkan CIRCUITPY).\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -2453,8 +2436,13 @@ msgid "Writes not supported on Characteristic" msgstr "Menulis tidak didukung pada Karakteristik" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" -msgstr "Anda berada dalam mode aman: sesuatu yang tidak terduga terjadi.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." +msgstr "" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -4403,6 +4391,42 @@ msgstr "zi harus berjenis float" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "" +#~ "CircuitPython is in safe mode because you pressed the reset button during " +#~ "boot. Press again to exit safe mode.\n" +#~ msgstr "" +#~ "CircuitPython dalam mode aman karena Anda menekan tombol reset saat boot. " +#~ "Tekan lagi untuk keluar dari mode aman.\n" + +#~ msgid "Not running saved code.\n" +#~ msgstr "Tidak menjalankan kode yang disimpan.\n" + +#~ msgid "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase the stack size if you know how, or if not:" +#~ msgstr "" +#~ "heap dari CircuitPython rusak karena stack terlalu kecil.\n" +#~ "Harap tambah ukuran stack jika Anda tahu caranya, atau jika tidak:" + +#~ msgid "" +#~ "The `microcontroller` module was used to boot into safe mode. Press reset " +#~ "to exit safe mode.\n" +#~ msgstr "" +#~ "Modul `microcontroller` digunakan untukboot ke mode aman. Tekan reset " +#~ "untuk keluar dari mode aman.\n" + +#~ msgid "" +#~ "The microcontroller's power dipped. Make sure your power supply provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "Kekuatan mikrokontroler menurun. Pastikan catu daya Anda menyediakan\n" +#~ "daya yang cukup untuk seluruh rangkaian dan tekan reset (setelah " +#~ "mengeluarkan CIRCUITPY).\n" + +#~ msgid "You are in safe mode: something unanticipated happened.\n" +#~ msgstr "Anda berada dalam mode aman: sesuatu yang tidak terduga terjadi.\n" + #~ msgid "Pin number already reserved by EXTI" #~ msgstr "Nomor pin sudah dipesan oleh EXTI" @@ -4580,10 +4604,6 @@ msgstr "" #~ msgid "Running in safe mode! Auto-reload is off.\n" #~ msgstr "Berjalan di mode aman(safe mode)! Auto-reload tidak aktif.\n" -#~ msgid "Running in safe mode! Not running saved code.\n" -#~ msgstr "Berjalan di mode aman(safe mode)! Tidak menjalankan kode yang disimpan.\n" -#~ "Berjalan di mode aman(safe mode)! tidak menjalankan kode yang tersimpan.\n" - #~ msgid "'async for' or 'async with' outside async function" #~ msgstr "'async for' atau 'async with' di luar fungsi async" diff --git a/locale/cs.po b/locale/cs.po index 5a9e299ad0..efdd695ed8 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -713,13 +713,7 @@ msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "" #: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" +msgid "CircuitPython was unable to allocate the heap." msgstr "" #: shared-module/bitbangio/SPI.c @@ -1641,10 +1635,6 @@ msgstr "" msgid "Not playing" msgstr "" -#: main.c -msgid "Not running saved code.\n" -msgstr "" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "" @@ -1967,7 +1957,7 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "" #: main.c -msgid "Running in safe mode! " +msgid "Running in safe mode! Not running saved code.\n" msgstr "" #: shared-module/sdcardio/SDCard.c @@ -2092,13 +2082,13 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" #: shared-bindings/rgbmatrix/RGBMatrix.c @@ -2109,7 +2099,7 @@ msgstr "" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" #: shared-module/audiomixer/MixerVoice.c @@ -2407,7 +2397,12 @@ msgid "Writes not supported on Characteristic" msgstr "" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." msgstr "" #: supervisor/shared/safe_mode.c diff --git a/locale/de_DE.po b/locale/de_DE.po index c161619e14..fc0116514e 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -722,15 +722,6 @@ msgstr "Schreiben von CharacteristicBuffer ist nicht vorgesehen" msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "Der CircuitPython-Kerncode ist hart abgestürzt. Hoppla!\n" -#: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" -"CircuitPython befindet sich im abgesicherten Modus, da Sie beim Booten die " -"Reset-Taste gedrückt haben. Drücken Sie erneut, um den abgesicherten Modus " -"zu verlassen.\n" - #: supervisor/shared/safe_mode.c msgid "CircuitPython was unable to allocate the heap." msgstr "CircuitPython war es nicht möglich heap-Speicher zu allozieren." @@ -1662,10 +1653,6 @@ msgstr "Nicht verbunden" msgid "Not playing" msgstr "Spielt nicht ab" -#: main.c -msgid "Not running saved code.\n" -msgstr "Gespeicherter Code wird nicht ausgeführt.\n" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "" @@ -1999,8 +1986,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "Zeileneintrag muss ein digitalio.DigitalInOut sein" #: main.c -msgid "Running in safe mode! " -msgstr "" +msgid "Running in safe mode! Not running saved code.\n" +msgstr "Sicherheitsmodus aktiv! Gespeicherter Code wird nicht ausgeführt\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -2124,18 +2111,14 @@ msgstr "Zeitüberschreitung beim Auslesen der Temperatur" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" -"Der CircuitPython-Heap wurde beschädigt, weil der Stapel zu klein war.\n" -"Bitte erhöhen Sie die Stapelgröße, wenn Sie wissen wie oder wenn nicht:" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" -"Das `Mikrocontroller` Modul wurde benutzt, um in den Sicherheitsmodus zu " -"starten. Drücke Reset um den Sicherheitsmodus zu verlassen.\n" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2145,13 +2128,8 @@ msgstr "" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" -"Die Spannungsversorgung des Mikrocontrollers hat den minimal Wert " -"unterschritten.\n" -"Stellen Sie sicher, dass Ihr Netzteil genug Strom bereitstellt für den " -"gesamten Stromkreis und drücken Sie Reset (nach dem Auswerfen von " -"CIRCUITPY).\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -2464,10 +2442,13 @@ msgid "Writes not supported on Characteristic" msgstr "Schreiben nicht unterstüzt für diese Charakteristik" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." msgstr "" -"Sie befinden sich im abgesicherten Modus: Es ist etwas Unerwartetes " -"passiert.\n" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -4446,6 +4427,47 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "" +#~ "CircuitPython is in safe mode because you pressed the reset button during " +#~ "boot. Press again to exit safe mode.\n" +#~ msgstr "" +#~ "CircuitPython befindet sich im abgesicherten Modus, da Sie beim Booten " +#~ "die Reset-Taste gedrückt haben. Drücken Sie erneut, um den abgesicherten " +#~ "Modus zu verlassen.\n" + +#~ msgid "Not running saved code.\n" +#~ msgstr "Gespeicherter Code wird nicht ausgeführt.\n" + +#~ msgid "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase the stack size if you know how, or if not:" +#~ msgstr "" +#~ "Der CircuitPython-Heap wurde beschädigt, weil der Stapel zu klein war.\n" +#~ "Bitte erhöhen Sie die Stapelgröße, wenn Sie wissen wie oder wenn nicht:" + +#~ msgid "" +#~ "The `microcontroller` module was used to boot into safe mode. Press reset " +#~ "to exit safe mode.\n" +#~ msgstr "" +#~ "Das `Mikrocontroller` Modul wurde benutzt, um in den Sicherheitsmodus zu " +#~ "starten. Drücke Reset um den Sicherheitsmodus zu verlassen.\n" + +#~ msgid "" +#~ "The microcontroller's power dipped. Make sure your power supply provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "Die Spannungsversorgung des Mikrocontrollers hat den minimal Wert " +#~ "unterschritten.\n" +#~ "Stellen Sie sicher, dass Ihr Netzteil genug Strom bereitstellt für den " +#~ "gesamten Stromkreis und drücken Sie Reset (nach dem Auswerfen von " +#~ "CIRCUITPY).\n" + +#~ msgid "You are in safe mode: something unanticipated happened.\n" +#~ msgstr "" +#~ "Sie befinden sich im abgesicherten Modus: Es ist etwas Unerwartetes " +#~ "passiert.\n" + #~ msgid "Pin number already reserved by EXTI" #~ msgstr "PIN-Nummer bereits von EXTI reserviert" @@ -4742,9 +4764,6 @@ msgstr "" #~ msgid "Running in safe mode! Auto-reload is off.\n" #~ msgstr "Sicherheitsmodus aktiv! Automatisches Neuladen ist deaktiviert.\n" -#~ msgid "Running in safe mode! Not running saved code.\n" -#~ msgstr "Sicherheitsmodus aktiv! Gespeicherter Code wird nicht ausgeführt\n" - #~ msgid "__init__() should return None, not '%s'" #~ msgstr "__init__() sollte None zurückgeben, nicht '%s'" diff --git a/locale/el.po b/locale/el.po index ebb94270b3..868f518631 100644 --- a/locale/el.po +++ b/locale/el.po @@ -710,13 +710,7 @@ msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "" #: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" +msgid "CircuitPython was unable to allocate the heap." msgstr "" #: shared-module/bitbangio/SPI.c @@ -1638,10 +1632,6 @@ msgstr "" msgid "Not playing" msgstr "" -#: main.c -msgid "Not running saved code.\n" -msgstr "" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "" @@ -1964,7 +1954,7 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "" #: main.c -msgid "Running in safe mode! " +msgid "Running in safe mode! Not running saved code.\n" msgstr "" #: shared-module/sdcardio/SDCard.c @@ -2089,13 +2079,13 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" #: shared-bindings/rgbmatrix/RGBMatrix.c @@ -2106,7 +2096,7 @@ msgstr "" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" #: shared-module/audiomixer/MixerVoice.c @@ -2404,7 +2394,12 @@ msgid "Writes not supported on Characteristic" msgstr "" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." msgstr "" #: supervisor/shared/safe_mode.c diff --git a/locale/en_GB.po b/locale/en_GB.po index 46dc636f6b..4d1b3fb36f 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -720,14 +720,6 @@ msgstr "CharacteristicBuffer writing not provided" msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "CircuitPython core code crashed hard. Crikey!\n" -#: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" - #: supervisor/shared/safe_mode.c msgid "CircuitPython was unable to allocate the heap." msgstr "CircuitPython was unable to allocate the heap." @@ -1655,10 +1647,6 @@ msgstr "Not connected" msgid "Not playing" msgstr "Not playing" -#: main.c -msgid "Not running saved code.\n" -msgstr "Not running saved code.\n" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "Not settable" @@ -1994,8 +1982,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "Row entry must be digitalio. DigitalInOut" #: main.c -msgid "Running in safe mode! " -msgstr "Running in safe mode! " +msgid "Running in safe mode! Not running saved code.\n" +msgstr "" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -2119,18 +2107,14 @@ msgstr "Temperature read timed out" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" -"The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" -"The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2140,11 +2124,8 @@ msgstr "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" -"The microcontroller's power dipped. Make sure your power supply provides\n" -"enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -2448,8 +2429,13 @@ msgid "Writes not supported on Characteristic" msgstr "Writes not supported on Characteristic" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" -msgstr "You are in safe mode: something unanticipated happened.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." +msgstr "" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -4403,6 +4389,45 @@ msgstr "zi must be of float type" msgid "zi must be of shape (n_section, 2)" msgstr "zi must be of shape (n_section, 2)" +#~ msgid "" +#~ "CircuitPython is in safe mode because you pressed the reset button during " +#~ "boot. Press again to exit safe mode.\n" +#~ msgstr "" +#~ "CircuitPython is in safe mode because you pressed the reset button during " +#~ "boot. Press again to exit safe mode.\n" + +#~ msgid "Not running saved code.\n" +#~ msgstr "Not running saved code.\n" + +#~ msgid "Running in safe mode! " +#~ msgstr "Running in safe mode! " + +#~ msgid "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase the stack size if you know how, or if not:" +#~ msgstr "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase the stack size if you know how, or if not:" + +#~ msgid "" +#~ "The `microcontroller` module was used to boot into safe mode. Press reset " +#~ "to exit safe mode.\n" +#~ msgstr "" +#~ "The `microcontroller` module was used to boot into safe mode. Press reset " +#~ "to exit safe mode.\n" + +#~ msgid "" +#~ "The microcontroller's power dipped. Make sure your power supply provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "The microcontroller's power dipped. Make sure your power supply provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" + +#~ msgid "You are in safe mode: something unanticipated happened.\n" +#~ msgstr "You are in safe mode: something unanticipated happened.\n" + #~ msgid "Pin number already reserved by EXTI" #~ msgstr "Pin number already reserved by EXTI" diff --git a/locale/es.po b/locale/es.po index 4f93e640a6..7868533c89 100644 --- a/locale/es.po +++ b/locale/es.po @@ -729,14 +729,6 @@ msgstr "CharateristicBuffer escritura no proporcionada" msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "El código central de CircuitPython se estrelló con fuerza. ¡Whoops!\n" -#: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" -"CircuitPython está en modo seguro porque presionó el botón de reinicio " -"durante el arranque. Presione nuevamente para salir del modo seguro.\n" - #: supervisor/shared/safe_mode.c msgid "CircuitPython was unable to allocate the heap." msgstr "CircuitPython no puedo encontrar el montículo." @@ -1676,10 +1668,6 @@ msgstr "No conectado" msgid "Not playing" msgstr "No reproduciendo" -#: main.c -msgid "Not running saved code.\n" -msgstr "No ejecutando el código almacenado.\n" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "No configurable" @@ -2020,8 +2008,10 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "La entrada de la fila debe ser digitalio.DigitalInOut" #: main.c -msgid "Running in safe mode! " -msgstr "¡Corriendo en modo seguro! " +msgid "Running in safe mode! Not running saved code.\n" +msgstr "" +"Ejecutando en modo seguro! No ejecutando el código almacenado.\n" +"Ejecutando en modo seguro! No se esta ejecutando el código guardado.\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -2145,18 +2135,14 @@ msgstr "Lectura de temperatura expirada" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" -"El heap de CircuitPython se dañó porque la pila era demasiado pequeña.\n" -"Aumente el tamaño de la pila si sabe cómo, o si no:" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" -"El módulo de `microcontroller` fue utilizado para arrancar en modo seguro. " -"Presiona reset para salir del modo seguro.\n" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2166,12 +2152,8 @@ msgstr "La longitud de rgb_pins debe ser 6, 12, 18, 24, o 30" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" -"La alimentación del microntrolador bajó. Asegúrate que tu fuente de " -"alimentación\n" -"pueda aportar suficiente energía para todo el circuito y presiona reset " -"(luego de expulsar CIRCUITPY)\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -2481,8 +2463,13 @@ msgid "Writes not supported on Characteristic" msgstr "Escrituras no admitidas en Characteristic" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" -msgstr "Estás en modo seguro: algo inesperado ha sucedido.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." +msgstr "" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -4447,6 +4434,46 @@ msgstr "zi debe ser de tipo flotante" msgid "zi must be of shape (n_section, 2)" msgstr "zi debe ser una forma (n_section,2)" +#~ msgid "" +#~ "CircuitPython is in safe mode because you pressed the reset button during " +#~ "boot. Press again to exit safe mode.\n" +#~ msgstr "" +#~ "CircuitPython está en modo seguro porque presionó el botón de reinicio " +#~ "durante el arranque. Presione nuevamente para salir del modo seguro.\n" + +#~ msgid "Not running saved code.\n" +#~ msgstr "No ejecutando el código almacenado.\n" + +#~ msgid "Running in safe mode! " +#~ msgstr "¡Corriendo en modo seguro! " + +#~ msgid "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase the stack size if you know how, or if not:" +#~ msgstr "" +#~ "El heap de CircuitPython se dañó porque la pila era demasiado pequeña.\n" +#~ "Aumente el tamaño de la pila si sabe cómo, o si no:" + +#~ msgid "" +#~ "The `microcontroller` module was used to boot into safe mode. Press reset " +#~ "to exit safe mode.\n" +#~ msgstr "" +#~ "El módulo de `microcontroller` fue utilizado para arrancar en modo " +#~ "seguro. Presiona reset para salir del modo seguro.\n" + +#~ msgid "" +#~ "The microcontroller's power dipped. Make sure your power supply provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "La alimentación del microntrolador bajó. Asegúrate que tu fuente de " +#~ "alimentación\n" +#~ "pueda aportar suficiente energía para todo el circuito y presiona reset " +#~ "(luego de expulsar CIRCUITPY)\n" + +#~ msgid "You are in safe mode: something unanticipated happened.\n" +#~ msgstr "Estás en modo seguro: algo inesperado ha sucedido.\n" + #~ msgid "Pin number already reserved by EXTI" #~ msgstr "Número de pin ya reservado por EXTI" @@ -4819,10 +4846,6 @@ msgstr "zi debe ser una forma (n_section,2)" #~ msgid "Running in safe mode! Auto-reload is off.\n" #~ msgstr "Ejecutando en modo seguro! La auto-recarga esta deshabilitada.\n" -#~ msgid "Running in safe mode! Not running saved code.\n" -#~ msgstr "Ejecutando en modo seguro! No ejecutando el código almacenado.\n" -#~ "Ejecutando en modo seguro! No se esta ejecutando el código guardado.\n" - #~ msgid "__init__() should return None, not '%s'" #~ msgstr "__init__() deberia devolver None, no '%s'" diff --git a/locale/fil.po b/locale/fil.po index 7cc83c965a..95059f2c1e 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -717,13 +717,7 @@ msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "" #: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" +msgid "CircuitPython was unable to allocate the heap." msgstr "" #: shared-module/bitbangio/SPI.c @@ -1654,10 +1648,6 @@ msgstr "Hindi maka connect sa AP" msgid "Not playing" msgstr "Hindi playing" -#: main.c -msgid "Not running saved code.\n" -msgstr "" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "" @@ -1984,8 +1974,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "" #: main.c -msgid "Running in safe mode! " -msgstr "" +msgid "Running in safe mode! Not running saved code.\n" +msgstr "Tumatakbo sa safe mode! Hindi tumatakbo ang nai-save na code.\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -2109,13 +2099,13 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" #: shared-bindings/rgbmatrix/RGBMatrix.c @@ -2126,7 +2116,7 @@ msgstr "" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" #: shared-module/audiomixer/MixerVoice.c @@ -2432,7 +2422,12 @@ msgid "Writes not supported on Characteristic" msgstr "" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." msgstr "" #: supervisor/shared/safe_mode.c @@ -4521,9 +4516,6 @@ msgstr "" #~ msgid "Running in safe mode! Auto-reload is off.\n" #~ msgstr "Tumatakbo sa safe mode! Awtomatikong pag re-reload ay OFF.\n" -#~ msgid "Running in safe mode! Not running saved code.\n" -#~ msgstr "Tumatakbo sa safe mode! Hindi tumatakbo ang nai-save na code.\n" - #~ msgid "__init__() should return None, not '%s'" #~ msgstr "__init__() dapat magbalink na None, hindi '%s'" diff --git a/locale/fr.po b/locale/fr.po index a0bbd48a40..230f17f05d 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -735,15 +735,6 @@ msgstr "Ecriture sur 'CharacteristicBuffer' non fournie" msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "Le code principal de CircuitPython s'est écrasé durement. Oups !\n" -#: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" -"CircuitPython est en mode sans échec car vous avez appuyé sur le bouton de " -"réinitialisation pendant le démarrage. Appuyez à nouveau pour quitter le " -"mode sans échec.\n" - #: supervisor/shared/safe_mode.c msgid "CircuitPython was unable to allocate the heap." msgstr "CircuitPython n'as pu faire l'allocation de la pile." @@ -1686,10 +1677,6 @@ msgstr "Non connecté" msgid "Not playing" msgstr "Ne joue pas" -#: main.c -msgid "Not running saved code.\n" -msgstr "N'exécute pas le code sauvegardé.\n" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "Non réglable" @@ -2032,8 +2019,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "L'entrée de ligne 'Row' doit être un digitalio.DigitalInOut" #: main.c -msgid "Running in safe mode! " -msgstr "Exécution en mode sécurisé! " +msgid "Running in safe mode! Not running saved code.\n" +msgstr "Mode sans-échec ! Le code sauvegardé n'est pas éxecuté.\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -2157,18 +2144,14 @@ msgstr "Délais de lecture de température dépassée" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" -"Le tas CircuitPython a été corrompu car la pile était trop petite.\n" -"Veuillez augmenter la taille de la pile si vous savez comment, ou sinon :" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" -"Le module `microcontroller` a été utilisé pour démarrer en mode sans échec. " -"Appuyez sur reset pour quitter le mode sans échec.\n" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2178,12 +2161,8 @@ msgstr "La taille de rgb_pins doit être 6, 12, 18, 24 ou 30" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" -"La puissance du microcontrôleur a baissé. Assurez-vous que votre " -"alimentation fournit\n" -"assez de puissance pour tout le circuit et appuyez sur reset (après avoir " -"éjecté CIRCUITPY).\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -2496,8 +2475,13 @@ msgid "Writes not supported on Characteristic" msgstr "Écritures non supporté vers les Characteristic" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" -msgstr "Vous êtes en mode sans échec : quelque chose d'imprévu s'est passé.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." +msgstr "" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -4471,6 +4455,48 @@ msgstr "zi doit être de type float" msgid "zi must be of shape (n_section, 2)" msgstr "zi doit être de forme (n_section, 2)" +#~ msgid "" +#~ "CircuitPython is in safe mode because you pressed the reset button during " +#~ "boot. Press again to exit safe mode.\n" +#~ msgstr "" +#~ "CircuitPython est en mode sans échec car vous avez appuyé sur le bouton " +#~ "de réinitialisation pendant le démarrage. Appuyez à nouveau pour quitter " +#~ "le mode sans échec.\n" + +#~ msgid "Not running saved code.\n" +#~ msgstr "N'exécute pas le code sauvegardé.\n" + +#~ msgid "Running in safe mode! " +#~ msgstr "Exécution en mode sécurisé! " + +#~ msgid "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase the stack size if you know how, or if not:" +#~ msgstr "" +#~ "Le tas CircuitPython a été corrompu car la pile était trop petite.\n" +#~ "Veuillez augmenter la taille de la pile si vous savez comment, ou sinon :" + +#~ msgid "" +#~ "The `microcontroller` module was used to boot into safe mode. Press reset " +#~ "to exit safe mode.\n" +#~ msgstr "" +#~ "Le module `microcontroller` a été utilisé pour démarrer en mode sans " +#~ "échec. Appuyez sur reset pour quitter le mode sans échec.\n" + +#~ msgid "" +#~ "The microcontroller's power dipped. Make sure your power supply provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "La puissance du microcontrôleur a baissé. Assurez-vous que votre " +#~ "alimentation fournit\n" +#~ "assez de puissance pour tout le circuit et appuyez sur reset (après avoir " +#~ "éjecté CIRCUITPY).\n" + +#~ msgid "You are in safe mode: something unanticipated happened.\n" +#~ msgstr "" +#~ "Vous êtes en mode sans échec : quelque chose d'imprévu s'est passé.\n" + #~ msgid "Pin number already reserved by EXTI" #~ msgstr "Numéro de broche 'pin' déjà réservé par EXTI" @@ -4849,9 +4875,6 @@ msgstr "zi doit être de forme (n_section, 2)" #~ msgid "Running in safe mode! Auto-reload is off.\n" #~ msgstr "Mode sans-échec ! Auto-chargement désactivé.\n" -#~ msgid "Running in safe mode! Not running saved code.\n" -#~ msgstr "Mode sans-échec ! Le code sauvegardé n'est pas éxecuté.\n" - #~ msgid "__init__() should return None, not '%s'" #~ msgstr "__init__() doit retourner None, pas '%s'" diff --git a/locale/hi.po b/locale/hi.po index daeef2a56d..c2b945d44c 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -709,12 +709,6 @@ msgstr "" msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" - #: supervisor/shared/safe_mode.c msgid "CircuitPython was unable to allocate the heap." msgstr "" @@ -1638,10 +1632,6 @@ msgstr "" msgid "Not playing" msgstr "" -#: main.c -msgid "Not running saved code.\n" -msgstr "" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "" @@ -1964,7 +1954,7 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "" #: main.c -msgid "Running in safe mode! " +msgid "Running in safe mode! Not running saved code.\n" msgstr "" #: shared-module/sdcardio/SDCard.c @@ -2089,13 +2079,13 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" #: shared-bindings/rgbmatrix/RGBMatrix.c @@ -2106,7 +2096,7 @@ msgstr "" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" #: shared-module/audiomixer/MixerVoice.c @@ -2404,7 +2394,12 @@ msgid "Writes not supported on Characteristic" msgstr "" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." msgstr "" #: supervisor/shared/safe_mode.c diff --git a/locale/it_IT.po b/locale/it_IT.po index 154817dd42..eb8613c5b7 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -727,13 +727,7 @@ msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "" #: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" +msgid "CircuitPython was unable to allocate the heap." msgstr "" #: shared-module/bitbangio/SPI.c @@ -1667,10 +1661,6 @@ msgstr "Impossible connettersi all'AP" msgid "Not playing" msgstr "In pausa" -#: main.c -msgid "Not running saved code.\n" -msgstr "" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "" @@ -2003,8 +1993,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "" #: main.c -msgid "Running in safe mode! " -msgstr "" +msgid "Running in safe mode! Not running saved code.\n" +msgstr "Modalità sicura in esecuzione! Codice salvato non in esecuzione.\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -2130,13 +2120,13 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" #: shared-bindings/rgbmatrix/RGBMatrix.c @@ -2147,7 +2137,7 @@ msgstr "" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" #: shared-module/audiomixer/MixerVoice.c @@ -2447,7 +2437,12 @@ msgid "Writes not supported on Characteristic" msgstr "" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." msgstr "" #: supervisor/shared/safe_mode.c @@ -4538,9 +4533,6 @@ msgstr "" #~ msgid "Running in safe mode! Auto-reload is off.\n" #~ msgstr "Modalità sicura in esecuzione! Auto-reload disattivato.\n" -#~ msgid "Running in safe mode! Not running saved code.\n" -#~ msgstr "Modalità sicura in esecuzione! Codice salvato non in esecuzione.\n" - #~ msgid "__init__() should return None, not '%s'" #~ msgstr "__init__() deve ritornare None, non '%s'" diff --git a/locale/ja.po b/locale/ja.po index 2646d6493f..26874a5e4c 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -718,14 +718,6 @@ msgstr "" msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "CircuitPythonのコアコードが激しくクラッシュしました。おっと!\n" -#: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" -"起動中にリセットボタンを押したためCircuitPythonはセーフモードにいます。もう一" -"度押すとセーフモードを終了します。\n" - #: supervisor/shared/safe_mode.c msgid "CircuitPython was unable to allocate the heap." msgstr "CircuitPythonはヒープを確保できませんでした" @@ -1651,10 +1643,6 @@ msgstr "接続されていません" msgid "Not playing" msgstr "再生していません" -#: main.c -msgid "Not running saved code.\n" -msgstr "保存されたコードは実行していません。\n" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "" @@ -2105,18 +2093,14 @@ msgstr "温度読み取りがタイムアウトしました" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" -"スタックが小さすぎたためCircuitPythonのヒープが壊れました。\n" -"スタックサイズを上げるか、その方法が分からなければ:" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" -"`microcontroller` モジュールが使われてセーフモードで起動しました。セーフモー" -"ドを抜けるにはリセットを押します。\n" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2126,10 +2110,8 @@ msgstr "" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" -"マイコンの電力が降下しました。使っている電源が十分な電力を回路に供給すること" -"を確認し (CIRCUITPYを取り出してから) リセットを押してください。\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -2427,7 +2409,12 @@ msgid "Writes not supported on Characteristic" msgstr "" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." msgstr "" #: supervisor/shared/safe_mode.c @@ -4384,6 +4371,38 @@ msgstr "ziはfloat値でなければなりません" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "" +#~ "CircuitPython is in safe mode because you pressed the reset button during " +#~ "boot. Press again to exit safe mode.\n" +#~ msgstr "" +#~ "起動中にリセットボタンを押したためCircuitPythonはセーフモードにいます。も" +#~ "う一度押すとセーフモードを終了します。\n" + +#~ msgid "Not running saved code.\n" +#~ msgstr "保存されたコードは実行していません。\n" + +#~ msgid "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase the stack size if you know how, or if not:" +#~ msgstr "" +#~ "スタックが小さすぎたためCircuitPythonのヒープが壊れました。\n" +#~ "スタックサイズを上げるか、その方法が分からなければ:" + +#~ msgid "" +#~ "The `microcontroller` module was used to boot into safe mode. Press reset " +#~ "to exit safe mode.\n" +#~ msgstr "" +#~ "`microcontroller` モジュールが使われてセーフモードで起動しました。セーフ" +#~ "モードを抜けるにはリセットを押します。\n" + +#~ msgid "" +#~ "The microcontroller's power dipped. Make sure your power supply provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "マイコンの電力が降下しました。使っている電源が十分な電力を回路に供給するこ" +#~ "とを確認し (CIRCUITPYを取り出してから) リセットを押してください。\n" + #~ msgid "Pin number already reserved by EXTI" #~ msgstr "ピン番号はすでにEXTIによって予約されています" diff --git a/locale/ko.po b/locale/ko.po index 25631414f1..3895e5326d 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -713,13 +713,7 @@ msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "" #: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" - -#: supervisor/shared/safe_mode.c -msgid "CircuitPython was unable to allocate the heap.\n" +msgid "CircuitPython was unable to allocate the heap." msgstr "" #: shared-module/bitbangio/SPI.c @@ -1641,10 +1635,6 @@ msgstr "" msgid "Not playing" msgstr "" -#: main.c -msgid "Not running saved code.\n" -msgstr "" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "" @@ -1967,7 +1957,7 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "" #: main.c -msgid "Running in safe mode! " +msgid "Running in safe mode! Not running saved code.\n" msgstr "" #: shared-module/sdcardio/SDCard.c @@ -2092,13 +2082,13 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" #: shared-bindings/rgbmatrix/RGBMatrix.c @@ -2109,7 +2099,7 @@ msgstr "" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" #: shared-module/audiomixer/MixerVoice.c @@ -2408,7 +2398,12 @@ msgid "Writes not supported on Characteristic" msgstr "" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." msgstr "" #: supervisor/shared/safe_mode.c diff --git a/locale/nl.po b/locale/nl.po index cef3bae312..29089f697a 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -716,14 +716,6 @@ msgstr "CharacteristicBuffer schrijven is niet beschikbaar" msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "CircuitPython core code is hard gecrashed. Ojee!\n" -#: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" -"CircuitPython is in veilige modus omdat de rest knop werd ingedrukt tijdens " -"het opstarten. Druk nogmaals om veilige modus te verlaten\n" - #: supervisor/shared/safe_mode.c msgid "CircuitPython was unable to allocate the heap." msgstr "CircuitPython kon het heap geheugen niet toewijzen." @@ -1652,10 +1644,6 @@ msgstr "Niet verbonden" msgid "Not playing" msgstr "Wordt niet afgespeeld" -#: main.c -msgid "Not running saved code.\n" -msgstr "Opgeslagen code wordt niet uitgevoerd.\n" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "Niet instelbaar" @@ -1996,8 +1984,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "Rij invoeging moet digitalio.DigitalInOut zijn" #: main.c -msgid "Running in safe mode! " -msgstr "Veilige modus wordt uitgevoerd! " +msgid "Running in safe mode! Not running saved code.\n" +msgstr "Draaiende in veilige modus! Opgeslagen code wordt niet uitgevoerd.\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -2121,18 +2109,14 @@ msgstr "Temperatuur lees time-out" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" -"De CircuitPyton heap is corrupt omdat de stack te klein was.\n" -"Vergroot de stack grootte als je weet hoe, zo niet:" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" -"De `microcontroller` module is gebruikt om in veilige modus op te starten. " -"Druk reset om de veilige modus te verlaten.\n" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2142,12 +2126,8 @@ msgstr "De lengte van rgb_pins moet 6, 12, 18, 24 of 30 zijn" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" -"Het vermogen van de microcontroller zakte. Zorg ervoor dat de " -"stroomvoorziening \n" -"voldoende vermogen heeft voor het hele systeem en druk reset (na uitwerpen " -"van CIRCUITPY).\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -2455,8 +2435,13 @@ msgid "Writes not supported on Characteristic" msgstr "Schrijven niet ondersteund op Characteristic" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" -msgstr "Je bent in de veilige modus: er is iets onverwachts gebeurd.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." +msgstr "" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -4415,6 +4400,46 @@ msgstr "zi moet van type float zijn" msgid "zi must be of shape (n_section, 2)" msgstr "zi moet vorm (n_section, 2) hebben" +#~ msgid "" +#~ "CircuitPython is in safe mode because you pressed the reset button during " +#~ "boot. Press again to exit safe mode.\n" +#~ msgstr "" +#~ "CircuitPython is in veilige modus omdat de rest knop werd ingedrukt " +#~ "tijdens het opstarten. Druk nogmaals om veilige modus te verlaten\n" + +#~ msgid "Not running saved code.\n" +#~ msgstr "Opgeslagen code wordt niet uitgevoerd.\n" + +#~ msgid "Running in safe mode! " +#~ msgstr "Veilige modus wordt uitgevoerd! " + +#~ msgid "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase the stack size if you know how, or if not:" +#~ msgstr "" +#~ "De CircuitPyton heap is corrupt omdat de stack te klein was.\n" +#~ "Vergroot de stack grootte als je weet hoe, zo niet:" + +#~ msgid "" +#~ "The `microcontroller` module was used to boot into safe mode. Press reset " +#~ "to exit safe mode.\n" +#~ msgstr "" +#~ "De `microcontroller` module is gebruikt om in veilige modus op te " +#~ "starten. Druk reset om de veilige modus te verlaten.\n" + +#~ msgid "" +#~ "The microcontroller's power dipped. Make sure your power supply provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "Het vermogen van de microcontroller zakte. Zorg ervoor dat de " +#~ "stroomvoorziening \n" +#~ "voldoende vermogen heeft voor het hele systeem en druk reset (na " +#~ "uitwerpen van CIRCUITPY).\n" + +#~ msgid "You are in safe mode: something unanticipated happened.\n" +#~ msgstr "Je bent in de veilige modus: er is iets onverwachts gebeurd.\n" + #~ msgid "Pin number already reserved by EXTI" #~ msgstr "Pin nummer al gereserveerd door EXTI" @@ -4750,10 +4775,6 @@ msgstr "zi moet vorm (n_section, 2) hebben" #~ msgid "Running in safe mode! Auto-reload is off.\n" #~ msgstr "Draaiende in veilige modus! Auto-herlaad is uit.\n" -#~ msgid "Running in safe mode! Not running saved code.\n" -#~ msgstr "" -#~ "Draaiende in veilige modus! Opgeslagen code wordt niet uitgevoerd.\n" - #~ msgid "__init__() should return None, not '%s'" #~ msgstr "__init __ () zou None moeten retouneren, niet '%s'" diff --git a/locale/pl.po b/locale/pl.po index 0b801519b8..f6001abc34 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -716,14 +716,6 @@ msgstr "Pisanie do CharacteristicBuffer niewspierane" msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "" -#: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" -"CircuitPython jest w trybie awaryjnym, ponieważ podczas rozruchu naciśnięto " -"przycisk resetowania. Naciśnij ponownie, aby wyjść z trybu awaryjnego.\n" - #: supervisor/shared/safe_mode.c msgid "CircuitPython was unable to allocate the heap." msgstr "CircuitPython nie mógł przydzielić sterty." @@ -1651,10 +1643,6 @@ msgstr "Nie podłączono" msgid "Not playing" msgstr "Nic nie jest odtwarzane" -#: main.c -msgid "Not running saved code.\n" -msgstr "" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "" @@ -1977,8 +1965,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "Rzędy muszą być digitalio.DigitalInOut" #: main.c -msgid "Running in safe mode! " -msgstr "" +msgid "Running in safe mode! Not running saved code.\n" +msgstr "Uruchomiony tryb bezpieczeństwa! Zapisany kod nie jest uruchamiany.\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -2102,13 +2090,13 @@ msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" #: shared-bindings/rgbmatrix/RGBMatrix.c @@ -2119,7 +2107,7 @@ msgstr "" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" #: shared-module/audiomixer/MixerVoice.c @@ -2423,7 +2411,12 @@ msgid "Writes not supported on Characteristic" msgstr "" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." msgstr "" #: supervisor/shared/safe_mode.c @@ -4375,6 +4368,14 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "" +#~ "CircuitPython is in safe mode because you pressed the reset button during " +#~ "boot. Press again to exit safe mode.\n" +#~ msgstr "" +#~ "CircuitPython jest w trybie awaryjnym, ponieważ podczas rozruchu " +#~ "naciśnięto przycisk resetowania. Naciśnij ponownie, aby wyjść z trybu " +#~ "awaryjnego.\n" + #~ msgid "USB Busy" #~ msgstr "USB Zajęte" @@ -4566,10 +4567,6 @@ msgstr "" #~ msgid "Running in safe mode! Auto-reload is off.\n" #~ msgstr "Uruchomiony tryb bezpieczeństwa! Samo-przeładowanie wyłączone.\n" -#~ msgid "Running in safe mode! Not running saved code.\n" -#~ msgstr "" -#~ "Uruchomiony tryb bezpieczeństwa! Zapisany kod nie jest uruchamiany.\n" - #~ msgid "__init__() should return None, not '%s'" #~ msgstr "__init__() powinien zwracać None, nie '%s'" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 6da8b3f957..882ce1c0cb 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -733,15 +733,6 @@ msgstr "Escrita CharacteristicBuffer não informada" msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "O núcleo principal do CircuitPython falhou feio. Ops!\n" -#: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" -"O CircuitPython está no modo de segurança porque você pressionou o botão de " -"redefinição durante a inicialização. Pressione novamente para sair do modo " -"de segurança.\n" - #: supervisor/shared/safe_mode.c msgid "CircuitPython was unable to allocate the heap." msgstr "O CircuitPython não conseguiu alocar o heap." @@ -1677,10 +1668,6 @@ msgstr "Não Conectado" msgid "Not playing" msgstr "Não está jogando" -#: main.c -msgid "Not running saved code.\n" -msgstr "O código salvo não está em execução.\n" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "Não configurável" @@ -2024,8 +2011,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "A entrada da linha deve ser digitalio.DigitalInOut" #: main.c -msgid "Running in safe mode! " -msgstr "Executando no modo de segurança! " +msgid "Running in safe mode! Not running saved code.\n" +msgstr "Rodando em modo seguro! O código salvo não está em execução.\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -2150,19 +2137,14 @@ msgstr "A leitura da temperatura expirou" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" -"A área de alocação dinâmica de variáveis (heap) do CircuitPython foi " -"corrompida porque a pilha de funções (stack) era muito pequena.\n" -"Aumente o tamanho da pilha de funções caso saiba como, ou caso não saiba:" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" -"O módulo `microcontrolador` foi utilizado para inicializar no modo de " -"segurança. Pressione reset para encerrar do modo de segurança.\n" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2172,12 +2154,8 @@ msgstr "O comprimento dos rgb_pins devem ser 6, 12, 18, 24, ou 30" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" -"A força do microcontrolador caiu. Verifique se a fonte de alimentação " -"fornece\n" -"energia suficiente para todo o circuito e pressione reset (após a ejeção " -"CIRCUITPY).\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -2489,8 +2467,13 @@ msgid "Writes not supported on Characteristic" msgstr "A escrita não é compatível na Característica" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" -msgstr "Você está no modo de segurança: algo inesperado aconteceu.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." +msgstr "" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -4460,6 +4443,48 @@ msgstr "zi deve ser de um tipo float" msgid "zi must be of shape (n_section, 2)" msgstr "zi deve estar na forma (n_section, 2)" +#~ msgid "" +#~ "CircuitPython is in safe mode because you pressed the reset button during " +#~ "boot. Press again to exit safe mode.\n" +#~ msgstr "" +#~ "O CircuitPython está no modo de segurança porque você pressionou o botão " +#~ "de redefinição durante a inicialização. Pressione novamente para sair do " +#~ "modo de segurança.\n" + +#~ msgid "Not running saved code.\n" +#~ msgstr "O código salvo não está em execução.\n" + +#~ msgid "Running in safe mode! " +#~ msgstr "Executando no modo de segurança! " + +#~ msgid "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase the stack size if you know how, or if not:" +#~ msgstr "" +#~ "A área de alocação dinâmica de variáveis (heap) do CircuitPython foi " +#~ "corrompida porque a pilha de funções (stack) era muito pequena.\n" +#~ "Aumente o tamanho da pilha de funções caso saiba como, ou caso não saiba:" + +#~ msgid "" +#~ "The `microcontroller` module was used to boot into safe mode. Press reset " +#~ "to exit safe mode.\n" +#~ msgstr "" +#~ "O módulo `microcontrolador` foi utilizado para inicializar no modo de " +#~ "segurança. Pressione reset para encerrar do modo de segurança.\n" + +#~ msgid "" +#~ "The microcontroller's power dipped. Make sure your power supply provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "A força do microcontrolador caiu. Verifique se a fonte de alimentação " +#~ "fornece\n" +#~ "energia suficiente para todo o circuito e pressione reset (após a ejeção " +#~ "CIRCUITPY).\n" + +#~ msgid "You are in safe mode: something unanticipated happened.\n" +#~ msgstr "Você está no modo de segurança: algo inesperado aconteceu.\n" + #~ msgid "Pin number already reserved by EXTI" #~ msgstr "Número do PIN já está reservado através da EXTI" @@ -4860,9 +4885,6 @@ msgstr "zi deve estar na forma (n_section, 2)" #~ msgid "Running in safe mode! Auto-reload is off.\n" #~ msgstr "Rodando em modo seguro! Atualização automática está desligada.\n" -#~ msgid "Running in safe mode! Not running saved code.\n" -#~ msgstr "Rodando em modo seguro! O código salvo não está em execução.\n" - #~ msgid "__init__() should return None, not '%s'" #~ msgstr "O __init__() deve retornar Nenhum, não '%s'" diff --git a/locale/sv.po b/locale/sv.po index 06c51bf38b..74331a0b54 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -722,14 +722,6 @@ msgstr "Skrivning för CharacteristicBuffer är inte tillhandahållen" msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "CircuitPython kärnkod kraschade hårt. Hoppsan!\n" -#: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" -"CircuitPython är i säkert läge eftersom du tryckte på återställningsknappen " -"under start. Tryck igen för att lämna säkert läge.\n" - #: supervisor/shared/safe_mode.c msgid "CircuitPython was unable to allocate the heap." msgstr "CircuitPython kunde inte allokera heap." @@ -1660,10 +1652,6 @@ msgstr "Inte ansluten" msgid "Not playing" msgstr "Ingen uppspelning" -#: main.c -msgid "Not running saved code.\n" -msgstr "Kör inte sparad kod.\n" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "Går inte sätta" @@ -2002,8 +1990,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "Radvärdet måste vara digitalio.DigitalInOut" #: main.c -msgid "Running in safe mode! " -msgstr "Kör i säkert läge! " +msgid "Running in safe mode! Not running saved code.\n" +msgstr "Kör i säkert läge! Sparad kod körs inte.\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -2127,18 +2115,14 @@ msgstr "Temperaturavläsning tog för lång tid" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" -"CircuitPythons heap blev korrupt eftersom stacken var för liten.\n" -"Öka stackstorleken om du vet hur, eller om inte:" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" -"Modulen \"microkontroller\" användes för att starta i säkert läge. Tryck på " -"reset för att lämna säkert läge.\n" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2148,12 +2132,8 @@ msgstr "Längden på rgb_pins vara 6, 12, 18, 24 eller 30" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" -"Mikrokontrollerns matningsspänning droppade. Se till att strömförsörjningen " -"ger\n" -"tillräckligt med ström för hela kretsen och tryck på reset (efter utmatning " -"av CIRCUITPY).\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -2458,8 +2438,13 @@ msgid "Writes not supported on Characteristic" msgstr "Skrivning stöds inte på karaktäristik" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" -msgstr "Du är i säkert läge: något öväntat hände.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." +msgstr "" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -4418,6 +4403,46 @@ msgstr "zi måste vara av typ float" msgid "zi must be of shape (n_section, 2)" msgstr "zi måste vara i formen (n_section, 2)" +#~ msgid "" +#~ "CircuitPython is in safe mode because you pressed the reset button during " +#~ "boot. Press again to exit safe mode.\n" +#~ msgstr "" +#~ "CircuitPython är i säkert läge eftersom du tryckte på " +#~ "återställningsknappen under start. Tryck igen för att lämna säkert läge.\n" + +#~ msgid "Not running saved code.\n" +#~ msgstr "Kör inte sparad kod.\n" + +#~ msgid "Running in safe mode! " +#~ msgstr "Kör i säkert läge! " + +#~ msgid "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase the stack size if you know how, or if not:" +#~ msgstr "" +#~ "CircuitPythons heap blev korrupt eftersom stacken var för liten.\n" +#~ "Öka stackstorleken om du vet hur, eller om inte:" + +#~ msgid "" +#~ "The `microcontroller` module was used to boot into safe mode. Press reset " +#~ "to exit safe mode.\n" +#~ msgstr "" +#~ "Modulen \"microkontroller\" användes för att starta i säkert läge. Tryck " +#~ "på reset för att lämna säkert läge.\n" + +#~ msgid "" +#~ "The microcontroller's power dipped. Make sure your power supply provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "Mikrokontrollerns matningsspänning droppade. Se till att " +#~ "strömförsörjningen ger\n" +#~ "tillräckligt med ström för hela kretsen och tryck på reset (efter " +#~ "utmatning av CIRCUITPY).\n" + +#~ msgid "You are in safe mode: something unanticipated happened.\n" +#~ msgstr "Du är i säkert läge: något öväntat hände.\n" + #~ msgid "Pin number already reserved by EXTI" #~ msgstr "PInn-nummer redan reserverat av EXTI" @@ -4798,9 +4823,6 @@ msgstr "zi måste vara i formen (n_section, 2)" #~ msgid "Running in safe mode! Auto-reload is off.\n" #~ msgstr "Kör i säkert läge! Autoladdning är avstängd.\n" -#~ msgid "Running in safe mode! Not running saved code.\n" -#~ msgstr "Kör i säkert läge! Sparad kod körs inte.\n" - #~ msgid "__init__() should return None, not '%s'" #~ msgstr "__init __ () ska returnera None, inte '%s'" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 52eaecfdd5..621430e4f7 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -723,14 +723,6 @@ msgstr "Wèi tígōng zìfú huǎncún xiě rù" msgid "CircuitPython core code crashed hard. Whoops!\n" msgstr "CircuitPython de héxīn chūxiàn gùzhàng. Āiyā!\n" -#: supervisor/shared/safe_mode.c -msgid "" -"CircuitPython is in safe mode because you pressed the reset button during " -"boot. Press again to exit safe mode.\n" -msgstr "" -"CircuitPython chǔyú ānquán móshì, yīnwèi zài yǐndǎo guòchéng zhōng àn xiàle " -"chóng zhì ànniǔ. Zài àn yīcì tuìchū ānquán móshì.\n" - #: supervisor/shared/safe_mode.c msgid "CircuitPython was unable to allocate the heap." msgstr "CircuitPython wúfǎ fēnpèi duī." @@ -1662,10 +1654,6 @@ msgstr "Wèi liánjiē" msgid "Not playing" msgstr "Wèi bòfàng" -#: main.c -msgid "Not running saved code.\n" -msgstr "Méiyǒu yùnxíng yǐ bǎocún de dàimǎ.\n" - #: shared-bindings/_bleio/__init__.c msgid "Not settable" msgstr "bù kě shè zhì" @@ -2000,8 +1988,8 @@ msgid "Row entry must be digitalio.DigitalInOut" msgstr "Xíng xiàng bìxū shì digitalio.DigitalInOut" #: main.c -msgid "Running in safe mode! " -msgstr "Zài ānquán móshì xià yùnxíng! " +msgid "Running in safe mode! Not running saved code.\n" +msgstr "Zài ānquán móshì xià yùnxíng! Bù yùnxíng yǐ bǎocún de dàimǎ.\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -2125,18 +2113,14 @@ msgstr "Wēndù dòu qǔ chāoshí" #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" -"Please increase the stack size if you know how, or if not:" +"Increase the stack size if you know how. If not:" msgstr "" -"Yóuyú duīzhàn tài xiǎo,CircuitPython duī yǐ sǔnhuài.\n" -"Rúguǒ nín zhīdào rúhé zēngjiā duīzhàn dàxiǎo, fǒuzé:" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " -"exit safe mode.\n" +"exit safe mode." msgstr "" -"“Wēi kòngzhì qì” mókuài yòng yú qǐdòng ānquán móshì. Àn chóng zhì kě tuìchū " -"ānquán móshì.\n" #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2146,11 +2130,8 @@ msgstr "Rgb_pins de chángdù bìxū wèi 6,12,18,24 huò 30" msgid "" "The microcontroller's power dipped. Make sure your power supply provides\n" "enough power for the whole circuit and press reset (after ejecting " -"CIRCUITPY).\n" +"CIRCUITPY)." msgstr "" -"wēi kòng zhì qì de gōng lǜ jiàng dī. Quèbǎo nín de diànyuán wèi zhěnggè\n" -"diànlù tígōng zúgòu de diànyuán, bìng àn xià fùwèi (Dànchū CIRCUITPY " -"zhīhòu).\n" #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -2456,8 +2437,13 @@ msgid "Writes not supported on Characteristic" msgstr "Tèzhēng bù zhīchí xiě rù" #: supervisor/shared/safe_mode.c -msgid "You are in safe mode: something unanticipated happened.\n" -msgstr "Nín chǔyú ānquán móshì: Chū hū yìliào de shìqíng fāshēngle.\n" +msgid "You are in safe mode because:\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "" +"You pressed the reset button during boot. Press again to exit safe mode." +msgstr "" #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " @@ -4414,6 +4400,45 @@ msgstr "zi bìxū wèi fú diǎn xíng" msgid "zi must be of shape (n_section, 2)" msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" +#~ msgid "" +#~ "CircuitPython is in safe mode because you pressed the reset button during " +#~ "boot. Press again to exit safe mode.\n" +#~ msgstr "" +#~ "CircuitPython chǔyú ānquán móshì, yīnwèi zài yǐndǎo guòchéng zhōng àn " +#~ "xiàle chóng zhì ànniǔ. Zài àn yīcì tuìchū ānquán móshì.\n" + +#~ msgid "Not running saved code.\n" +#~ msgstr "Méiyǒu yùnxíng yǐ bǎocún de dàimǎ.\n" + +#~ msgid "Running in safe mode! " +#~ msgstr "Zài ānquán móshì xià yùnxíng! " + +#~ msgid "" +#~ "The CircuitPython heap was corrupted because the stack was too small.\n" +#~ "Please increase the stack size if you know how, or if not:" +#~ msgstr "" +#~ "Yóuyú duīzhàn tài xiǎo,CircuitPython duī yǐ sǔnhuài.\n" +#~ "Rúguǒ nín zhīdào rúhé zēngjiā duīzhàn dàxiǎo, fǒuzé:" + +#~ msgid "" +#~ "The `microcontroller` module was used to boot into safe mode. Press reset " +#~ "to exit safe mode.\n" +#~ msgstr "" +#~ "“Wēi kòngzhì qì” mókuài yòng yú qǐdòng ānquán móshì. Àn chóng zhì kě " +#~ "tuìchū ānquán móshì.\n" + +#~ msgid "" +#~ "The microcontroller's power dipped. Make sure your power supply provides\n" +#~ "enough power for the whole circuit and press reset (after ejecting " +#~ "CIRCUITPY).\n" +#~ msgstr "" +#~ "wēi kòng zhì qì de gōng lǜ jiàng dī. Quèbǎo nín de diànyuán wèi zhěnggè\n" +#~ "diànlù tígōng zúgòu de diànyuán, bìng àn xià fùwèi (Dànchū CIRCUITPY " +#~ "zhīhòu).\n" + +#~ msgid "You are in safe mode: something unanticipated happened.\n" +#~ msgstr "Nín chǔyú ānquán móshì: Chū hū yìliào de shìqíng fāshēngle.\n" + #~ msgid "Pin number already reserved by EXTI" #~ msgstr "Zhēn hào yǐ bèi EXTI bǎoliú" @@ -4762,9 +4787,6 @@ msgstr "zi bìxū jùyǒu xíngzhuàng (n_section,2)" #~ msgid "Running in safe mode! Auto-reload is off.\n" #~ msgstr "Zài ānquán móshì xià yùnxíng! Zìdòng chóngxīn jiāzài yǐ guānbì.\n" -#~ msgid "Running in safe mode! Not running saved code.\n" -#~ msgstr "Zài ānquán móshì xià yùnxíng! Bù yùnxíng yǐ bǎocún de dàimǎ.\n" - #~ msgid "__init__() should return None, not '%s'" #~ msgstr "__Init__() yīnggāi fǎnhuí not, ér bùshì '%s'" From 6a2ba83e30e9a82ee99d08f4fe8d11efb6e22fce Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 14 May 2021 14:29:36 -0400 Subject: [PATCH 09/35] Update Rotary Trinkey and Slide Trinkey pins --- .../boards/adafruit_rotary_trinkey_m0/mpconfigboard.h | 1 + .../boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk | 1 - ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c | 3 ++- ports/atmel-samd/boards/adafruit_slide_trinkey_m0/board.c | 2 +- .../boards/adafruit_slide_trinkey_m0/mpconfigboard.h | 5 ++--- ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.h b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.h index 2b06b31ede..1f927d9a62 100644 --- a/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.h +++ b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.h @@ -10,6 +10,7 @@ #define IGNORE_PIN_PA02 1 #define IGNORE_PIN_PA03 1 #define IGNORE_PIN_PA05 1 +#define IGNORE_PIN_PA07 1 #define IGNORE_PIN_PA08 1 #define IGNORE_PIN_PA09 1 #define IGNORE_PIN_PA10 1 diff --git a/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk index b596c726cd..3bcdd8f896 100644 --- a/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk @@ -16,7 +16,6 @@ CIRCUITPY_PULSEIO = 0 CIRCUITPY_PWMIO = 0 CIRCUITPY_AUDIOCORE = 0 CIRCUITPY_BUSIO = 0 -CIRCUITPY_TOUCHIO = 0 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c index cd014fcb64..95e3fef822 100644 --- a/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/pins.c @@ -2,8 +2,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA01) }, + { MP_ROM_QSTR(MP_QSTR_ROTA), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_ROTB), MP_ROM_PTR(&pin_PA00) }, - { MP_ROM_QSTR(MP_QSTR_ROTA), MP_ROM_PTR(&pin_PA06) }, { MP_ROM_QSTR(MP_QSTR_SWITCH), MP_ROM_PTR(&pin_PA27) }, + { MP_ROM_QSTR(MP_QSTR_TOUCH), MP_ROM_PTR(&pin_PA06) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/board.c b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/board.c index 095750731b..c1d1260143 100644 --- a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/board.c +++ b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/board.c @@ -37,5 +37,5 @@ bool board_requests_safe_mode(void) { } void reset_board(void) { - board_reset_user_neopixels(&pin_PA06, 2); + board_reset_user_neopixels(&pin_PA04, 2); } diff --git a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.h b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.h index 1d9a4122df..759290cda7 100644 --- a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.h +++ b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.h @@ -1,7 +1,7 @@ #define MICROPY_HW_BOARD_NAME "Adafruit Slide Trinkey M0" #define MICROPY_HW_MCU_NAME "samd21e18" -#define MICROPY_HW_NEOPIXEL (&pin_PA06) +#define MICROPY_HW_NEOPIXEL (&pin_PA04) #define MICROPY_PORT_A (0) #define MICROPY_PORT_B (0) @@ -9,10 +9,9 @@ #define IGNORE_PIN_PA00 1 #define IGNORE_PIN_PA01 1 -#define IGNORE_PIN_PA02 1 #define IGNORE_PIN_PA03 1 -#define IGNORE_PIN_PA04 1 #define IGNORE_PIN_PA05 1 +#define IGNORE_PIN_PA06 1 #define IGNORE_PIN_PA08 1 #define IGNORE_PIN_PA09 1 #define IGNORE_PIN_PA10 1 diff --git a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c index 238610ddc2..a9b1c9eca0 100644 --- a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c +++ b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/pins.c @@ -1,8 +1,8 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - // { MP_ROM_QSTR(MP_QSTR_TOUCH), MP_ROM_PTR(&pin_PA07) }, - { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA06) }, - { MP_ROM_QSTR(MP_QSTR_POTENTIOMETER), MP_ROM_PTR(&pin_PA07) }, + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_PA04) }, + { MP_ROM_QSTR(MP_QSTR_POTENTIOMETER), MP_ROM_PTR(&pin_PA02) }, + { MP_ROM_QSTR(MP_QSTR_TOUCH), MP_ROM_PTR(&pin_PA07) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 990e58902d0eb40c02e731f4f2bb0b9784c2d5ee Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 14 May 2021 17:09:15 -0400 Subject: [PATCH 10/35] add CIRCUITPY_PIXELBUF to all trinkeys; add NeoPixel to prox --- .../boards/adafruit_neokey_trinkey_m0/mpconfigboard.mk | 2 ++ .../boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk | 4 ++-- .../boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk | 2 ++ .../boards/adafruit_slide_trinkey_m0/mpconfigboard.mk | 2 ++ ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk | 2 -- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/mpconfigboard.mk index a552fc3d64..4a1255c2d0 100644 --- a/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_neokey_trinkey_m0/mpconfigboard.mk @@ -18,6 +18,8 @@ CIRCUITPY_PWMIO = 0 CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 0 +CIRCUITPY_PIXELBUF = 1 + # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID diff --git a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk index 49e5a88c57..39aa5d62e1 100644 --- a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk @@ -17,8 +17,8 @@ CIRCUITPY_RTC = 0 CIRCUITPY_PULSEIO = 0 CIRCUITPY_PWMIO = 0 -CIRCUITPY_PIXELBUF = 0 -CIRCUITPY_TOUCHIO = 1 +CIRCUITPY_PIXELBUF = 1 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk index 3bcdd8f896..8f9d9b1de3 100644 --- a/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_rotary_trinkey_m0/mpconfigboard.mk @@ -17,6 +17,8 @@ CIRCUITPY_PWMIO = 0 CIRCUITPY_AUDIOCORE = 0 CIRCUITPY_BUSIO = 0 +CIRCUITPY_PIXELBUF = 1 + # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID diff --git a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.mk index 5ef783908b..ebb966e709 100644 --- a/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_slide_trinkey_m0/mpconfigboard.mk @@ -18,6 +18,8 @@ CIRCUITPY_PWMIO = 0 CIRCUITPY_AUDIOCORE = 0 CIRCUITPY_BUSIO = 0 +CIRCUITPY_PIXELBUF = 1 + # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_SimpleMath FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk index 4ff9677693..8f0ed95a47 100644 --- a/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk @@ -20,8 +20,6 @@ CIRCUITPY_AUDIOCORE = 0 CIRCUITPY_BUSIO = 0 CIRCUITPY_PIXELBUF = 1 -CIRCUITPY_USB_MIDI = 1 -CIRCUITPY_TOUCHIO = 1 # Include these Python libraries in firmware. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel From 1e2a94578289511f042f3934fe2039daf6af021c Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 14 May 2021 21:52:54 -0400 Subject: [PATCH 11/35] Make busio.SPI be NotImplementedError on proxlight to save space --- .../adafruit_proxlight_trinkey_m0/mpconfigboard.mk | 7 +++++-- .../boards/neopixel_trinkey_m0/mpconfigboard.mk | 10 +++++----- ports/atmel-samd/mpconfigport.mk | 8 ++++++-- py/circuitpy_mpconfig.mk | 3 +++ shared-bindings/busio/SPI.c | 9 +++++++++ 5 files changed, 28 insertions(+), 9 deletions(-) diff --git a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk index 39aa5d62e1..cee8049231 100644 --- a/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/adafruit_proxlight_trinkey_m0/mpconfigboard.mk @@ -8,14 +8,17 @@ CHIP_FAMILY = samd21 INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = NONE + CIRCUITPY_FULL_BUILD = 0 CIRCUITPY_ANALOGIO = 0 CIRCUITPY_AUDIOCORE = 0 -CIRCUITPY_ROTARYIO = 0 -CIRCUITPY_RTC = 0 +CIRCUITPY_BUSIO_SPI = 0 CIRCUITPY_PULSEIO = 0 CIRCUITPY_PWMIO = 0 +CIRCUITPY_ROTARYIO = 0 +CIRCUITPY_RTC = 0 +CIRCUITPY_USB_MIDI = 0 CIRCUITPY_PIXELBUF = 1 diff --git a/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk b/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk index 8f0ed95a47..2eb9ebd33e 100644 --- a/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/neopixel_trinkey_m0/mpconfigboard.mk @@ -12,15 +12,15 @@ LONGINT_IMPL = NONE CIRCUITPY_FULL_BUILD = 0 CIRCUITPY_ANALOGIO = 0 -CIRCUITPY_ROTARYIO = 0 -CIRCUITPY_RTC = 0 -CIRCUITPY_PULSEIO = 0 -CIRCUITPY_PWMIO = 0 CIRCUITPY_AUDIOCORE = 0 CIRCUITPY_BUSIO = 0 +CIRCUITPY_PULSEIO = 0 +CIRCUITPY_PWMIO = 0 +CIRCUITPY_ROTARYIO = 0 +CIRCUITPY_RTC = 0 CIRCUITPY_PIXELBUF = 1 # Include these Python libraries in firmware. -FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_HID +FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index 060b17daf5..aaa3bfccbe 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -60,15 +60,19 @@ CIRCUITPY_VECTORIO = 0 MICROPY_PY_ASYNC_AWAIT = 0 -ifeq ($(TRANSLATION), ja) +ifeq ($(TRANSLATION),ja) +ifeq ($(CIRCUITPY_DISPLAYIO),1) RELEASE_NEEDS_CLEAN_BUILD = 1 CIRCUITPY_TERMINALIO = 0 endif +endif -ifeq ($(TRANSLATION), ko) +ifeq ($(TRANSLATION),ko) +ifeq ($(CIRCUITPY_DISPLAYIO),1) RELEASE_NEEDS_CLEAN_BUILD = 1 CIRCUITPY_TERMINALIO = 0 endif +endif SUPEROPT_GC = 0 SUPEROPT_VM = 0 diff --git a/py/circuitpy_mpconfig.mk b/py/circuitpy_mpconfig.mk index c7b83dba21..b5cd699a09 100644 --- a/py/circuitpy_mpconfig.mk +++ b/py/circuitpy_mpconfig.mk @@ -121,6 +121,9 @@ CFLAGS += -DCIRCUITPY_BUILTINS_POW3=$(CIRCUITPY_BUILTINS_POW3) CIRCUITPY_BUSIO ?= 1 CFLAGS += -DCIRCUITPY_BUSIO=$(CIRCUITPY_BUSIO) +CIRCUITPY_BUSIO_SPI ?= 1 +CFLAGS += -DCIRCUITPY_BUSIO_SPI=$(CIRCUITPY_BUSIO_SPI) + CIRCUITPY_CAMERA ?= 0 CFLAGS += -DCIRCUITPY_CAMERA=$(CIRCUITPY_CAMERA) diff --git a/shared-bindings/busio/SPI.c b/shared-bindings/busio/SPI.c index 893ebeb5cd..5a82ac0b41 100644 --- a/shared-bindings/busio/SPI.c +++ b/shared-bindings/busio/SPI.c @@ -81,6 +81,7 @@ // TODO(tannewt): Support LSB SPI. STATIC mp_obj_t busio_spi_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + #if CIRCUITPY_BUSIO_SPI busio_spi_obj_t *self = m_new_obj(busio_spi_obj_t); self->base.type = &busio_spi_type; enum { ARG_clock, ARG_MOSI, ARG_MISO }; @@ -102,8 +103,12 @@ STATIC mp_obj_t busio_spi_make_new(const mp_obj_type_t *type, size_t n_args, con common_hal_busio_spi_construct(self, clock, mosi, miso); return MP_OBJ_FROM_PTR(self); + #else + mp_raise_NotImplementedError(NULL); + #endif // CIRCUITPY_BUSIO_SPI } +#if CIRCUITPY_BUSIO_SPI //| def deinit(self) -> None: //| """Turn off the SPI bus.""" //| ... @@ -399,8 +404,11 @@ const mp_obj_property_t busio_spi_frequency_obj = { MP_ROM_NONE, MP_ROM_NONE}, }; +#endif // CIRCUITPY_BUSIO_SPI + STATIC const mp_rom_map_elem_t busio_spi_locals_dict_table[] = { + #if CIRCUITPY_BUSIO_SPI { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&busio_spi_deinit_obj) }, { MP_ROM_QSTR(MP_QSTR___enter__), MP_ROM_PTR(&default___enter___obj) }, { MP_ROM_QSTR(MP_QSTR___exit__), MP_ROM_PTR(&busio_spi_obj___exit___obj) }, @@ -413,6 +421,7 @@ STATIC const mp_rom_map_elem_t busio_spi_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_write), MP_ROM_PTR(&busio_spi_write_obj) }, { MP_ROM_QSTR(MP_QSTR_write_readinto), MP_ROM_PTR(&busio_spi_write_readinto_obj) }, { MP_ROM_QSTR(MP_QSTR_frequency), MP_ROM_PTR(&busio_spi_frequency_obj) } + #endif // CIRCUITPY_BUSIO_SPI }; STATIC MP_DEFINE_CONST_DICT(busio_spi_locals_dict, busio_spi_locals_dict_table); From ea0e18d2e0c904b86ea3fa45ecaf14b300e56905 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Fri, 14 May 2021 23:41:44 -0400 Subject: [PATCH 12/35] fix logic for suppressing ja and ko clean builds when not necessary --- ports/atmel-samd/mpconfigport.mk | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index aaa3bfccbe..19ceed6d29 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -60,18 +60,19 @@ CIRCUITPY_VECTORIO = 0 MICROPY_PY_ASYNC_AWAIT = 0 -ifeq ($(TRANSLATION),ja) -ifeq ($(CIRCUITPY_DISPLAYIO),1) -RELEASE_NEEDS_CLEAN_BUILD = 1 +# We don't have room for the fonts for terminalio for ja and ko +# so turn off terminalio, and if it's off and displayio is on, +# force a clean build. +# Note that we cannot test $(CIRCUITPY_DISPLAYIO) directly with an +# ifeq, because it's not set yet. +ifeq ($(TRANSLATION), ja) CIRCUITPY_TERMINALIO = 0 -endif +RELEASE_NEEDS_CLEAN_BUILD = $(CIRCUITPY_DISPLAYIO) endif -ifeq ($(TRANSLATION),ko) -ifeq ($(CIRCUITPY_DISPLAYIO),1) -RELEASE_NEEDS_CLEAN_BUILD = 1 +ifeq ($(TRANSLATION), ko) CIRCUITPY_TERMINALIO = 0 -endif +RELEASE_NEEDS_CLEAN_BUILD = $(CIRCUITPY_DISPLAYIO) endif SUPEROPT_GC = 0 From 1964167801d2d6d3b426725fb642968bfe7bd6fe Mon Sep 17 00:00:00 2001 From: Alvaro Figueroa Date: Fri, 14 May 2021 21:21:38 +0000 Subject: [PATCH 13/35] Translated using Weblate (Spanish) Currently translated at 100.0% (992 of 992 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/es/ --- locale/es.po | 29 +++++++++++++++++++---------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/locale/es.po b/locale/es.po index 7868533c89..9085cb3c23 100644 --- a/locale/es.po +++ b/locale/es.po @@ -8,7 +8,7 @@ msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-05-12 14:07+0000\n" +"PO-Revision-Date: 2021-05-15 15:52+0000\n" "Last-Translator: Alvaro Figueroa \n" "Language-Team: \n" "Language: es\n" @@ -864,7 +864,7 @@ msgstr "Data es muy grande para el paquete de anuncio" #: ports/stm/common-hal/alarm/pin/PinAlarm.c msgid "Deep sleep pins must use a rising edge with pulldown" -msgstr "" +msgstr "Pines de sueño profundo deben usar eje de subida con jalado hacia abajo" #: shared-bindings/audiobusio/PDMIn.c msgid "Destination capacity is smaller than destination_length." @@ -1706,7 +1706,7 @@ msgstr "" #: ports/stm/common-hal/alarm/pin/PinAlarm.c msgid "Only edge detection is available on this hardware" -msgstr "" +msgstr "Este hardware solo tiene capacidad para detección de borde" #: shared-module/displayio/OnDiskBitmap.c #, c-format @@ -1803,7 +1803,7 @@ msgstr "Permiso denegado" #: ports/stm/common-hal/alarm/pin/PinAlarm.c msgid "Pin cannot wake from Deep Sleep" -msgstr "" +msgstr "El Pin no se puede despertar de un sueño profundo" #: ports/raspberrypi/bindings/rp2pio/StateMachine.c msgid "Pin count must be at least 1" @@ -1826,7 +1826,7 @@ msgstr "Pin no tiene capacidad ADC" #: ports/stm/common-hal/alarm/pin/PinAlarm.c #: ports/stm/common-hal/pulseio/PulseIn.c msgid "Pin interrupt already in use" -msgstr "" +msgstr "Interrupción de Pin ya está en uso" #: shared-bindings/adafruit_bus_device/SPIDevice.c #: shared-bindings/digitalio/DigitalInOut.c @@ -2010,8 +2010,7 @@ msgstr "La entrada de la fila debe ser digitalio.DigitalInOut" #: main.c msgid "Running in safe mode! Not running saved code.\n" msgstr "" -"Ejecutando en modo seguro! No ejecutando el código almacenado.\n" -"Ejecutando en modo seguro! No se esta ejecutando el código guardado.\n" +"¡Ejecutando en modo seguro! No se esta ejecutando el código almacenado.\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" @@ -2075,7 +2074,7 @@ msgstr "Sin capacidades para el tamaño" #: ports/stm/common-hal/alarm/SleepMemory.c msgid "Sleep Memory not available" -msgstr "" +msgstr "Memoria de sueño no disponible" #: shared-bindings/alarm/SleepMemory.c shared-bindings/nvm/ByteArray.c msgid "Slice and value different lengths." @@ -2137,12 +2136,16 @@ msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +"El montículo de CircuitPython está corrupto porque la pila era muy pequeña.\n" +"Aumente el tamaño de pila si sabe como. De lo contrario:" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +"El módulo de `microcontroller` se usó para un arranque en modo seguro. " +"Presione reset para salir del modo seguro." #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2154,6 +2157,10 @@ msgid "" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY)." msgstr "" +"La corriente eléctrica de la microcontroladora bajó. Asegúrate que tu fuente " +"de poder provee\n" +"suficiente corriente para todo el circuito y presiones reset (luego de " +"expulsar CIRCUITPY)." #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -2221,7 +2228,7 @@ msgstr "La cantidad total de datos es mas grande que %q" #: ports/stm/common-hal/alarm/touch/TouchAlarm.c msgid "Touch alarms not available" -msgstr "" +msgstr "Alarmas táctiles no disponibles" #: py/obj.c msgid "Traceback (most recent call last):\n" @@ -2464,12 +2471,14 @@ msgstr "Escrituras no admitidas en Characteristic" #: supervisor/shared/safe_mode.c msgid "You are in safe mode because:\n" -msgstr "" +msgstr "Estás en modo seguro por la razón:\n" #: supervisor/shared/safe_mode.c msgid "" "You pressed the reset button during boot. Press again to exit safe mode." msgstr "" +"Has presionado el botón de reset durante el arranque. Presiones de nuevo " +"para salir del modo seguro." #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " From b1fc0833206347f0a2b0cabc162ed24b1ba2f239 Mon Sep 17 00:00:00 2001 From: Wellington Terumi Uemura Date: Sat, 15 May 2021 09:21:19 +0000 Subject: [PATCH 14/35] Translated using Weblate (Portuguese (Brazil)) Currently translated at 100.0% (992 of 992 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/pt_BR/ --- locale/pt_BR.po | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 882ce1c0cb..f7e5bfe991 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-05-14 18:25+0000\n" +"PO-Revision-Date: 2021-05-15 15:52+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -2139,12 +2139,17 @@ msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +"A área de alocação dinâmica de variáveis (heap) do CircuitPython foi " +"corrompido pois a pilha era muito pequena.\n" +"Aumente o tamanho da pilha se souber como. Senão:" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +"O módulo `microcontrolador` foi utilizado para iniciar em modo seguro. " +"Pressione reset para encerrar do modo de segurança." #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2156,6 +2161,10 @@ msgid "" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY)." msgstr "" +"O alimentação do micro controlador diminuiu. Certifique-se de que a sua " +"fonte de alimentação fornece\n" +"corrente suficiente para todo o circuito e pressione reset (depois de ejetar " +"o CIRCUITPY)." #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -2468,12 +2477,14 @@ msgstr "A escrita não é compatível na Característica" #: supervisor/shared/safe_mode.c msgid "You are in safe mode because:\n" -msgstr "" +msgstr "Você está no modo de segurança pois:\n" #: supervisor/shared/safe_mode.c msgid "" "You pressed the reset button during boot. Press again to exit safe mode." msgstr "" +"Você pressionou o botão reset durante a inicialização. Pressione-o novamente " +"para sair do modo de segurança." #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " From 9576028656d2cf04f66b57c23badeaa3234e7f1e Mon Sep 17 00:00:00 2001 From: Jonny Bergdahl Date: Sat, 15 May 2021 12:41:02 +0000 Subject: [PATCH 15/35] Translated using Weblate (Swedish) Currently translated at 100.0% (992 of 992 strings) Translation: CircuitPython/main Translate-URL: https://hosted.weblate.org/projects/circuitpython/main/sv/ --- locale/sv.po | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/locale/sv.po b/locale/sv.po index 74331a0b54..4b4da0ecab 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -6,7 +6,7 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2021-01-04 12:55-0600\n" -"PO-Revision-Date: 2021-05-14 18:25+0000\n" +"PO-Revision-Date: 2021-05-15 15:52+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -2117,12 +2117,16 @@ msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +"CircuitPython-heapen blev korrupt eftersom stacken är för liten.\n" +"Öka stackstorleken om du vet hur, eller om inte:" #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +"Modulen `microcontroller` användes för att starta upp i felsäkert läge. " +"Tryck på reset för att avsluta felsäkert läget." #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2134,6 +2138,10 @@ msgid "" "enough power for the whole circuit and press reset (after ejecting " "CIRCUITPY)." msgstr "" +"Mikrokontrollerns matningsspänning sjönk. Se till att strömförsörjningen " +"ger\n" +"tillräckligt med ström för hela kretsen och tryck på reset (efter utmatning " +"av CIRCUITPY)." #: shared-module/audiomixer/MixerVoice.c msgid "The sample's bits_per_sample does not match the mixer's" @@ -2439,12 +2447,14 @@ msgstr "Skrivning stöds inte på karaktäristik" #: supervisor/shared/safe_mode.c msgid "You are in safe mode because:\n" -msgstr "" +msgstr "Du är i felsäkert läge eftersom:\n" #: supervisor/shared/safe_mode.c msgid "" "You pressed the reset button during boot. Press again to exit safe mode." msgstr "" +"Du tryckte på resetknappen under uppstarten. Tryck igen för att avsluta " +"felsäkert läge." #: supervisor/shared/safe_mode.c msgid "You requested starting safe mode by " From 82677dd9669d41df89be89dbef931b8e2c2ce80c Mon Sep 17 00:00:00 2001 From: jposada202020 Date: Sat, 15 May 2021 12:06:08 -0400 Subject: [PATCH 16/35] adding parameter documentation explanation. --- docs/design_guide.rst | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docs/design_guide.rst b/docs/design_guide.rst index 0c3beb8550..8c3c8cc842 100644 --- a/docs/design_guide.rst +++ b/docs/design_guide.rst @@ -332,6 +332,32 @@ To add different types outside CircuitPython you need to include them in the int The intersphinx_mapping above includes references to Python, BusDevice and CircuitPython Documentation +When the parameter have two different types, you should reference them as follows:: + + + class Character_LCD: + """Base class for character LCD + + :param ~digitalio.DigitalInOut rs: The reset data line + :param ~pwmio.PWMOut,~digitalio.DigitalInOut blue: Blue RGB Anode + + """ + + def __init__(self, rs, blue): + self._rc = rs + self.blue = blue + + +Renders as: + +.. py:class:: Character_LCD(rs, blue) + :noindex: + + Base class for character LCD + + :param ~digitalio.DigitalInOut rs: The reset data line + :param ~pwmio.PWMOut,~digitalio.DigitalInOut blue: Blue RGB Anode + param_name ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ From 8118eb1fe5c473ada8ea8fb3f0862fc93522a7bf Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Sun, 16 May 2021 14:36:18 -0400 Subject: [PATCH 17/35] update frozen libs --- frozen/Adafruit_CircuitPython_BLE | 2 +- frozen/Adafruit_CircuitPython_BLE_Apple_Notification_Center | 2 +- frozen/Adafruit_CircuitPython_BusDevice | 2 +- frozen/Adafruit_CircuitPython_CircuitPlayground | 2 +- frozen/Adafruit_CircuitPython_Crickit | 2 +- frozen/Adafruit_CircuitPython_DRV2605 | 2 +- frozen/Adafruit_CircuitPython_DS3231 | 2 +- frozen/Adafruit_CircuitPython_Display_Shapes | 2 +- frozen/Adafruit_CircuitPython_Display_Text | 2 +- frozen/Adafruit_CircuitPython_DotStar | 2 +- frozen/Adafruit_CircuitPython_ESP32SPI | 2 +- frozen/Adafruit_CircuitPython_FocalTouch | 2 +- frozen/Adafruit_CircuitPython_IRRemote | 2 +- frozen/Adafruit_CircuitPython_LC709203F | 2 +- frozen/Adafruit_CircuitPython_LIS3DH | 2 +- frozen/Adafruit_CircuitPython_LSM6DS | 2 +- frozen/Adafruit_CircuitPython_MIDI | 2 +- frozen/Adafruit_CircuitPython_Motor | 2 +- frozen/Adafruit_CircuitPython_NeoPixel | 2 +- frozen/Adafruit_CircuitPython_ProgressBar | 2 +- frozen/Adafruit_CircuitPython_RFM69 | 2 +- frozen/Adafruit_CircuitPython_RFM9x | 2 +- frozen/Adafruit_CircuitPython_Register | 2 +- frozen/Adafruit_CircuitPython_Requests | 2 +- frozen/Adafruit_CircuitPython_SD | 2 +- frozen/Adafruit_CircuitPython_ST7789 | 2 +- frozen/Adafruit_CircuitPython_Thermistor | 2 +- frozen/Adafruit_CircuitPython_seesaw | 2 +- frozen/pew-pewpew-standalone-10.x | 2 +- 29 files changed, 29 insertions(+), 29 deletions(-) diff --git a/frozen/Adafruit_CircuitPython_BLE b/frozen/Adafruit_CircuitPython_BLE index 8bb1210eeb..df40a24184 160000 --- a/frozen/Adafruit_CircuitPython_BLE +++ b/frozen/Adafruit_CircuitPython_BLE @@ -1 +1 @@ -Subproject commit 8bb1210eebed4846dae7e76ff1db86a010b132bc +Subproject commit df40a241841918d6c0a984d427e61ca831b7b431 diff --git a/frozen/Adafruit_CircuitPython_BLE_Apple_Notification_Center b/frozen/Adafruit_CircuitPython_BLE_Apple_Notification_Center index 6a034887e3..a8f3cbc1a9 160000 --- a/frozen/Adafruit_CircuitPython_BLE_Apple_Notification_Center +++ b/frozen/Adafruit_CircuitPython_BLE_Apple_Notification_Center @@ -1 +1 @@ -Subproject commit 6a034887e370caa61fee5f51db8dd393d3e72542 +Subproject commit a8f3cbc1a94b8a5d25f80101f519025a162dbb80 diff --git a/frozen/Adafruit_CircuitPython_BusDevice b/frozen/Adafruit_CircuitPython_BusDevice index eb4b21e216..5aceeae814 160000 --- a/frozen/Adafruit_CircuitPython_BusDevice +++ b/frozen/Adafruit_CircuitPython_BusDevice @@ -1 +1 @@ -Subproject commit eb4b21e216efd8ec0c4862a938e81b56be961724 +Subproject commit 5aceeae814effae4eb950f1078c194b11401faa7 diff --git a/frozen/Adafruit_CircuitPython_CircuitPlayground b/frozen/Adafruit_CircuitPython_CircuitPlayground index 3c540329b6..d2bdacf878 160000 --- a/frozen/Adafruit_CircuitPython_CircuitPlayground +++ b/frozen/Adafruit_CircuitPython_CircuitPlayground @@ -1 +1 @@ -Subproject commit 3c540329b63163e45f108df4bfebc387d5352c4f +Subproject commit d2bdacf878a4bde3009370705b9b49eb1441428b diff --git a/frozen/Adafruit_CircuitPython_Crickit b/frozen/Adafruit_CircuitPython_Crickit index 809646ba11..66adc454f5 160000 --- a/frozen/Adafruit_CircuitPython_Crickit +++ b/frozen/Adafruit_CircuitPython_Crickit @@ -1 +1 @@ -Subproject commit 809646ba11366b5aedbc8a90be1da1829304bf62 +Subproject commit 66adc454f5c9cc66b9e38777a61c58bc82a04090 diff --git a/frozen/Adafruit_CircuitPython_DRV2605 b/frozen/Adafruit_CircuitPython_DRV2605 index ce30b04a3c..c8483fe490 160000 --- a/frozen/Adafruit_CircuitPython_DRV2605 +++ b/frozen/Adafruit_CircuitPython_DRV2605 @@ -1 +1 @@ -Subproject commit ce30b04a3c8e557d48a0607ddcb25272b196a433 +Subproject commit c8483fe4909fba9b4ecfce7092918a038cc087a0 diff --git a/frozen/Adafruit_CircuitPython_DS3231 b/frozen/Adafruit_CircuitPython_DS3231 index 4f5dc66d50..5b017df35b 160000 --- a/frozen/Adafruit_CircuitPython_DS3231 +++ b/frozen/Adafruit_CircuitPython_DS3231 @@ -1 +1 @@ -Subproject commit 4f5dc66d50e43ca8d413ab0d86c125a7a13d394f +Subproject commit 5b017df35b6a4cb4b7a30d0ac5d4595583ea461d diff --git a/frozen/Adafruit_CircuitPython_Display_Shapes b/frozen/Adafruit_CircuitPython_Display_Shapes index 07435f53ee..d68bb9e0e7 160000 --- a/frozen/Adafruit_CircuitPython_Display_Shapes +++ b/frozen/Adafruit_CircuitPython_Display_Shapes @@ -1 +1 @@ -Subproject commit 07435f53ee60e373042d6a3c8261218edd7c4e88 +Subproject commit d68bb9e0e7a28d38d9f36627c35b6949595b2f7e diff --git a/frozen/Adafruit_CircuitPython_Display_Text b/frozen/Adafruit_CircuitPython_Display_Text index 92733f5103..11bf02c3a8 160000 --- a/frozen/Adafruit_CircuitPython_Display_Text +++ b/frozen/Adafruit_CircuitPython_Display_Text @@ -1 +1 @@ -Subproject commit 92733f5103eb81e1c1f0b0e2cdd9009f3bae344a +Subproject commit 11bf02c3a850d390802f944a693ff4e0d531727f diff --git a/frozen/Adafruit_CircuitPython_DotStar b/frozen/Adafruit_CircuitPython_DotStar index f4f66fa039..8ece81d95a 160000 --- a/frozen/Adafruit_CircuitPython_DotStar +++ b/frozen/Adafruit_CircuitPython_DotStar @@ -1 +1 @@ -Subproject commit f4f66fa03990428c239eac68d37f79a7245b4cd3 +Subproject commit 8ece81d95a62c2aa84a7f4d5ebaef362bbbabc45 diff --git a/frozen/Adafruit_CircuitPython_ESP32SPI b/frozen/Adafruit_CircuitPython_ESP32SPI index fce466bd2b..d3e7a587a2 160000 --- a/frozen/Adafruit_CircuitPython_ESP32SPI +++ b/frozen/Adafruit_CircuitPython_ESP32SPI @@ -1 +1 @@ -Subproject commit fce466bd2bb70ca86b79e5cb36bbaca00afacfd1 +Subproject commit d3e7a587a2f974251f44254fae88c14a52229979 diff --git a/frozen/Adafruit_CircuitPython_FocalTouch b/frozen/Adafruit_CircuitPython_FocalTouch index 0cfa671b0c..27b6d39384 160000 --- a/frozen/Adafruit_CircuitPython_FocalTouch +++ b/frozen/Adafruit_CircuitPython_FocalTouch @@ -1 +1 @@ -Subproject commit 0cfa671b0c38386ba4da59119d61d399faa9b358 +Subproject commit 27b6d39384249cc9050d5d87982e88f1323e3098 diff --git a/frozen/Adafruit_CircuitPython_IRRemote b/frozen/Adafruit_CircuitPython_IRRemote index fc3a7b4798..d8260f2fe2 160000 --- a/frozen/Adafruit_CircuitPython_IRRemote +++ b/frozen/Adafruit_CircuitPython_IRRemote @@ -1 +1 @@ -Subproject commit fc3a7b479874a1ea315ddb3bf6c5e281e16ef097 +Subproject commit d8260f2fe2a8b3e874320483060756dce4c2a9ec diff --git a/frozen/Adafruit_CircuitPython_LC709203F b/frozen/Adafruit_CircuitPython_LC709203F index 9945e1da2b..06ec55ec5a 160000 --- a/frozen/Adafruit_CircuitPython_LC709203F +++ b/frozen/Adafruit_CircuitPython_LC709203F @@ -1 +1 @@ -Subproject commit 9945e1da2bca561995c6dea387d47877e89cf571 +Subproject commit 06ec55ec5acc56ff98db8b4b203be3092cf44c94 diff --git a/frozen/Adafruit_CircuitPython_LIS3DH b/frozen/Adafruit_CircuitPython_LIS3DH index bea5d4a347..cf564ad0de 160000 --- a/frozen/Adafruit_CircuitPython_LIS3DH +++ b/frozen/Adafruit_CircuitPython_LIS3DH @@ -1 +1 @@ -Subproject commit bea5d4a347aeece71a421ee292551264e3bf7ae2 +Subproject commit cf564ad0defb0bc98a41f195c5b20d1aa88641ed diff --git a/frozen/Adafruit_CircuitPython_LSM6DS b/frozen/Adafruit_CircuitPython_LSM6DS index fee951908c..fa2cb2c777 160000 --- a/frozen/Adafruit_CircuitPython_LSM6DS +++ b/frozen/Adafruit_CircuitPython_LSM6DS @@ -1 +1 @@ -Subproject commit fee951908cc5f1ba7db5edd2537fade09d626730 +Subproject commit fa2cb2c7770f67fa16053fe5375b1a9ad3a3d0a5 diff --git a/frozen/Adafruit_CircuitPython_MIDI b/frozen/Adafruit_CircuitPython_MIDI index 669ab7b752..54cc3311b9 160000 --- a/frozen/Adafruit_CircuitPython_MIDI +++ b/frozen/Adafruit_CircuitPython_MIDI @@ -1 +1 @@ -Subproject commit 669ab7b752d6c863577312560faf505656e5e603 +Subproject commit 54cc3311b979dcd52bb870456d612f39e8bfd226 diff --git a/frozen/Adafruit_CircuitPython_Motor b/frozen/Adafruit_CircuitPython_Motor index 608291801c..a9ef35bae5 160000 --- a/frozen/Adafruit_CircuitPython_Motor +++ b/frozen/Adafruit_CircuitPython_Motor @@ -1 +1 @@ -Subproject commit 608291801ce7112b280d32518de79993cc80963a +Subproject commit a9ef35bae580b6a0d99a425856fcc863ad58a54d diff --git a/frozen/Adafruit_CircuitPython_NeoPixel b/frozen/Adafruit_CircuitPython_NeoPixel index 59add970cc..bdef506ca4 160000 --- a/frozen/Adafruit_CircuitPython_NeoPixel +++ b/frozen/Adafruit_CircuitPython_NeoPixel @@ -1 +1 @@ -Subproject commit 59add970cc66f9b0f2d45082e86b25650843a159 +Subproject commit bdef506ca48a50607ad6a3e5a9c7cc2c9ace0e42 diff --git a/frozen/Adafruit_CircuitPython_ProgressBar b/frozen/Adafruit_CircuitPython_ProgressBar index f8206d40e9..7b617d33ee 160000 --- a/frozen/Adafruit_CircuitPython_ProgressBar +++ b/frozen/Adafruit_CircuitPython_ProgressBar @@ -1 +1 @@ -Subproject commit f8206d40e9375bfa5ffc8ace2948751c742c8f8f +Subproject commit 7b617d33ee5746140aa38edec001f4f5c31167ce diff --git a/frozen/Adafruit_CircuitPython_RFM69 b/frozen/Adafruit_CircuitPython_RFM69 index c0b9bdf229..161b39148e 160000 --- a/frozen/Adafruit_CircuitPython_RFM69 +++ b/frozen/Adafruit_CircuitPython_RFM69 @@ -1 +1 @@ -Subproject commit c0b9bdf22997552396abb514a6304d33460c2912 +Subproject commit 161b39148ebd79f051630737e34e0cbd6d838a59 diff --git a/frozen/Adafruit_CircuitPython_RFM9x b/frozen/Adafruit_CircuitPython_RFM9x index 4696e07638..378616f160 160000 --- a/frozen/Adafruit_CircuitPython_RFM9x +++ b/frozen/Adafruit_CircuitPython_RFM9x @@ -1 +1 @@ -Subproject commit 4696e07638eff28392b57162d2a70e20473e97b7 +Subproject commit 378616f160bbcbc85f0acd960b4eb181b9c2fd0b diff --git a/frozen/Adafruit_CircuitPython_Register b/frozen/Adafruit_CircuitPython_Register index 5fee6e0c38..a0892d1822 160000 --- a/frozen/Adafruit_CircuitPython_Register +++ b/frozen/Adafruit_CircuitPython_Register @@ -1 +1 @@ -Subproject commit 5fee6e0c3878110844bc51e16063eeae7d94c457 +Subproject commit a0892d1822937fe89146dec68604b3e924d5c51e diff --git a/frozen/Adafruit_CircuitPython_Requests b/frozen/Adafruit_CircuitPython_Requests index c070f6e8db..c55425e178 160000 --- a/frozen/Adafruit_CircuitPython_Requests +++ b/frozen/Adafruit_CircuitPython_Requests @@ -1 +1 @@ -Subproject commit c070f6e8dbc37757cbcb444269c6cd6a4b676647 +Subproject commit c55425e17842cce3ec0b34489133436c3e1a3898 diff --git a/frozen/Adafruit_CircuitPython_SD b/frozen/Adafruit_CircuitPython_SD index 96ee9954a3..63f795518c 160000 --- a/frozen/Adafruit_CircuitPython_SD +++ b/frozen/Adafruit_CircuitPython_SD @@ -1 +1 @@ -Subproject commit 96ee9954a3099ee9c9d7d7b7747f30ab3c6a45bf +Subproject commit 63f795518c79821fa1f60c4978b59c8bbd16ad1c diff --git a/frozen/Adafruit_CircuitPython_ST7789 b/frozen/Adafruit_CircuitPython_ST7789 index e0225d3f7c..f1841618d2 160000 --- a/frozen/Adafruit_CircuitPython_ST7789 +++ b/frozen/Adafruit_CircuitPython_ST7789 @@ -1 +1 @@ -Subproject commit e0225d3f7c4e137846cb2ceed4915559d4ba9daf +Subproject commit f1841618d2690bb54dabd98fd8650af30bc2c9bf diff --git a/frozen/Adafruit_CircuitPython_Thermistor b/frozen/Adafruit_CircuitPython_Thermistor index fb773e0ed1..da67fd3046 160000 --- a/frozen/Adafruit_CircuitPython_Thermistor +++ b/frozen/Adafruit_CircuitPython_Thermistor @@ -1 +1 @@ -Subproject commit fb773e0ed1891cda2ace6271fafc5312e167d275 +Subproject commit da67fd3046c85eae0a3e417074bc681befa39218 diff --git a/frozen/Adafruit_CircuitPython_seesaw b/frozen/Adafruit_CircuitPython_seesaw index 9d91ec849e..6467edbed5 160000 --- a/frozen/Adafruit_CircuitPython_seesaw +++ b/frozen/Adafruit_CircuitPython_seesaw @@ -1 +1 @@ -Subproject commit 9d91ec849efb5fbc3d26d350a75a61f15d19bc48 +Subproject commit 6467edbed535484ebdd7492d885adf3433fb8280 diff --git a/frozen/pew-pewpew-standalone-10.x b/frozen/pew-pewpew-standalone-10.x index 88b8be84b5..a14da2e1ce 160000 --- a/frozen/pew-pewpew-standalone-10.x +++ b/frozen/pew-pewpew-standalone-10.x @@ -1 +1 @@ -Subproject commit 88b8be84b5dce7660f58c02a63263f1d2ff0709f +Subproject commit a14da2e1ced1010a0da65f758199ff08eedd0bd5 From 11ef36d09dbbe24aa8dd4f50f732b862d73f765b Mon Sep 17 00:00:00 2001 From: root Date: Mon, 17 May 2021 16:24:45 -0500 Subject: [PATCH 18/35] Implement pulseout for RP2040 --- ports/raspberrypi/Makefile | 2 +- .../raspberrypi/common-hal/pulseio/PulseOut.c | 46 ++++++++++++------- .../raspberrypi/common-hal/pulseio/PulseOut.h | 4 +- 3 files changed, 34 insertions(+), 18 deletions(-) diff --git a/ports/raspberrypi/Makefile b/ports/raspberrypi/Makefile index 9333f5d1f4..ac13a061b7 100644 --- a/ports/raspberrypi/Makefile +++ b/ports/raspberrypi/Makefile @@ -106,7 +106,7 @@ INC += -I. \ -I$(BUILD) # Pico specific configuration -CFLAGS += -DRASPBERRYPI -DPICO_ON_DEVICE=1 -DPICO_NO_BINARY_INFO=0 -DPICO_TIME_DEFAULT_ALARM_POOL_DISABLED=1 -DPICO_DIVIDER_CALL_IDIV0=0 -DPICO_DIVIDER_CALL_LDIV0=0 -DPICO_DIVIDER_HARDWARE=1 -DPICO_DOUBLE_ROM=1 -DPICO_FLOAT_ROM=1 -DPICO_MULTICORE=1 -DPICO_BITS_IN_RAM=0 -DPICO_DIVIDER_IN_RAM=0 -DPICO_DOUBLE_PROPAGATE_NANS=0 -DPICO_DOUBLE_IN_RAM=0 -DPICO_MEM_IN_RAM=0 -DPICO_FLOAT_IN_RAM=0 -DPICO_FLOAT_PROPAGATE_NANS=1 -DPICO_NO_FLASH=0 -DPICO_COPY_TO_RAM=0 -DPICO_DISABLE_SHARED_IRQ_HANDLERS=0 -DPICO_NO_BI_BOOTSEL_VIA_DOUBLE_RESET=0 +CFLAGS += -DRASPBERRYPI -DPICO_ON_DEVICE=1 -DPICO_NO_BINARY_INFO=0 -DPICO_TIME_DEFAULT_ALARM_POOL_DISABLED=0 -DPICO_DIVIDER_CALL_IDIV0=0 -DPICO_DIVIDER_CALL_LDIV0=0 -DPICO_DIVIDER_HARDWARE=1 -DPICO_DOUBLE_ROM=1 -DPICO_FLOAT_ROM=1 -DPICO_MULTICORE=1 -DPICO_BITS_IN_RAM=0 -DPICO_DIVIDER_IN_RAM=0 -DPICO_DOUBLE_PROPAGATE_NANS=0 -DPICO_DOUBLE_IN_RAM=0 -DPICO_MEM_IN_RAM=0 -DPICO_FLOAT_IN_RAM=0 -DPICO_FLOAT_PROPAGATE_NANS=1 -DPICO_NO_FLASH=0 -DPICO_COPY_TO_RAM=0 -DPICO_DISABLE_SHARED_IRQ_HANDLERS=0 -DPICO_NO_BI_BOOTSEL_VIA_DOUBLE_RESET=0 OPTIMIZATION_FLAGS ?= -O3 # TinyUSB defines CFLAGS += -DTUD_OPT_RP2040_USB_DEVICE_ENUMERATION_FIX=1 -DCFG_TUSB_MCU=OPT_MCU_RP2040 -DCFG_TUD_MIDI_RX_BUFSIZE=128 -DCFG_TUD_CDC_RX_BUFSIZE=256 -DCFG_TUD_MIDI_TX_BUFSIZE=128 -DCFG_TUD_CDC_TX_BUFSIZE=256 -DCFG_TUD_MSC_BUFSIZE=1024 diff --git a/ports/raspberrypi/common-hal/pulseio/PulseOut.c b/ports/raspberrypi/common-hal/pulseio/PulseOut.c index c3536af04b..1a7b5892c1 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseOut.c +++ b/ports/raspberrypi/common-hal/pulseio/PulseOut.c @@ -27,31 +27,38 @@ #include "common-hal/pulseio/PulseOut.h" #include - -#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" - #include "mpconfigport.h" -#include "py/gc.h" #include "py/runtime.h" #include "shared-bindings/pulseio/PulseOut.h" +#include "shared-bindings/pwmio/PWMOut.h" +#include "common-hal/pwmio/PWMOut.h" #include "supervisor/shared/translate.h" +#include "src/rp2_common/hardware_pwm/include/hardware/pwm.h" +#include "src/common/pico_time/include/pico/time.h" static uint8_t refcount = 0; - - static uint16_t *pulse_buffer = NULL; static volatile uint16_t pulse_index = 0; static uint16_t pulse_length; -static volatile uint32_t current_compare = 0; +pwmio_pwmout_obj_t *pwmout_obj; +volatile uint16_t current_duty_cycle; void pulse_finish(void) { pulse_index++; - - // Always turn it off. + // Turn pwm pin off by settting duty cyle to 1. + common_hal_pwmio_pwmout_set_duty_cycle(pwmout_obj,1); if (pulse_index >= pulse_length) { return; } - current_compare = (current_compare + pulse_buffer[pulse_index] * 3 / 4) & 0xffff; + add_alarm_in_us( pulse_buffer[pulse_index], pulseout_interrupt_handler, NULL, false); + if (pulse_index % 2 == 0) { + common_hal_pwmio_pwmout_set_duty_cycle(pwmout_obj,current_duty_cycle); + } +} + +int64_t pulseout_interrupt_handler(alarm_id_t id, void *user_data) { + pulse_finish(); + return 0; } void pulseout_reset() { @@ -63,12 +70,13 @@ void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, const mcu_pin_obj_t *pin, uint32_t frequency, uint16_t duty_cycle) { - mp_raise_NotImplementedError(translate("Unsupported operation")); refcount++; - + pwmout_obj = (pwmio_pwmout_obj_t *)carrier; + current_duty_cycle = common_hal_pwmio_pwmout_get_duty_cycle(pwmout_obj); self->pin = carrier->pin->number; - + self->slice = carrier->slice; + pwm_set_enabled (pwmout_obj->slice,false); } bool common_hal_pulseio_pulseout_deinited(pulseio_pulseout_obj_t *self) { @@ -79,8 +87,6 @@ void common_hal_pulseio_pulseout_deinit(pulseio_pulseout_obj_t *self) { if (common_hal_pulseio_pulseout_deinited(self)) { return; } - - refcount--; self->pin = NO_PIN; } @@ -90,6 +96,14 @@ void common_hal_pulseio_pulseout_send(pulseio_pulseout_obj_t *self, uint16_t *pu pulse_index = 0; pulse_length = length; - current_compare = pulses[0] * 3 / 4; + add_alarm_in_us( pulses[0], pulseout_interrupt_handler, NULL, false); + common_hal_pwmio_pwmout_set_duty_cycle(pwmout_obj,current_duty_cycle); + pwm_set_enabled (pwmout_obj->slice,true); + while(pulse_index < length) { + // Do other things while we wait. The interrupts will handle sending the + // signal. + RUN_BACKGROUND_TASKS; + } + pwm_set_enabled (pwmout_obj->slice,false); } diff --git a/ports/raspberrypi/common-hal/pulseio/PulseOut.h b/ports/raspberrypi/common-hal/pulseio/PulseOut.h index 4f1bb9fa7a..8dcebdba98 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseOut.h +++ b/ports/raspberrypi/common-hal/pulseio/PulseOut.h @@ -28,6 +28,7 @@ #define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEOUT_H #include "common-hal/microcontroller/Pin.h" +#include "src/common/pico_time/include/pico/time.h" #include "py/obj.h" @@ -36,9 +37,10 @@ typedef struct { mp_obj_base_t base; uint8_t pin; + uint8_t slice; } pulseio_pulseout_obj_t; void pulseout_reset(void); -void pulseout_interrupt_handler(uint8_t index); +int64_t pulseout_interrupt_handler(alarm_id_t id, void *user_data); #endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_PULSEIO_PULSEOUT_H From ff4b1b28d2f222f660e21228c6ca80c4894d54ec Mon Sep 17 00:00:00 2001 From: root Date: Mon, 17 May 2021 16:43:55 -0500 Subject: [PATCH 19/35] iFormatting fixes --- ports/raspberrypi/common-hal/pulseio/PulseOut.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/ports/raspberrypi/common-hal/pulseio/PulseOut.c b/ports/raspberrypi/common-hal/pulseio/PulseOut.c index 1a7b5892c1..99f59b2520 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseOut.c +++ b/ports/raspberrypi/common-hal/pulseio/PulseOut.c @@ -50,9 +50,9 @@ void pulse_finish(void) { if (pulse_index >= pulse_length) { return; } - add_alarm_in_us( pulse_buffer[pulse_index], pulseout_interrupt_handler, NULL, false); + add_alarm_in_us(pulse_buffer[pulse_index], pulseout_interrupt_handler, NULL, false); if (pulse_index % 2 == 0) { - common_hal_pwmio_pwmout_set_duty_cycle(pwmout_obj,current_duty_cycle); + common_hal_pwmio_pwmout_set_duty_cycle(pwmout_obj,current_duty_cycle); } } @@ -76,7 +76,7 @@ void common_hal_pulseio_pulseout_construct(pulseio_pulseout_obj_t *self, current_duty_cycle = common_hal_pwmio_pwmout_get_duty_cycle(pwmout_obj); self->pin = carrier->pin->number; self->slice = carrier->slice; - pwm_set_enabled (pwmout_obj->slice,false); + pwm_set_enabled(pwmout_obj->slice,false); } bool common_hal_pulseio_pulseout_deinited(pulseio_pulseout_obj_t *self) { @@ -96,14 +96,14 @@ void common_hal_pulseio_pulseout_send(pulseio_pulseout_obj_t *self, uint16_t *pu pulse_index = 0; pulse_length = length; - add_alarm_in_us( pulses[0], pulseout_interrupt_handler, NULL, false); + add_alarm_in_us(pulses[0], pulseout_interrupt_handler, NULL, false); common_hal_pwmio_pwmout_set_duty_cycle(pwmout_obj,current_duty_cycle); - pwm_set_enabled (pwmout_obj->slice,true); + pwm_set_enabled(pwmout_obj->slice,true); - while(pulse_index < length) { + while (pulse_index < length) { // Do other things while we wait. The interrupts will handle sending the // signal. RUN_BACKGROUND_TASKS; } - pwm_set_enabled (pwmout_obj->slice,false); + pwm_set_enabled(pwmout_obj->slice,false); } From 9393467819c1c13509d2ba5f6c2ee52f17ae63f1 Mon Sep 17 00:00:00 2001 From: root Date: Mon, 17 May 2021 22:13:00 -0500 Subject: [PATCH 20/35] Update comment for spelling --- ports/raspberrypi/common-hal/pulseio/PulseOut.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/raspberrypi/common-hal/pulseio/PulseOut.c b/ports/raspberrypi/common-hal/pulseio/PulseOut.c index 99f59b2520..7a1b709b4c 100644 --- a/ports/raspberrypi/common-hal/pulseio/PulseOut.c +++ b/ports/raspberrypi/common-hal/pulseio/PulseOut.c @@ -45,7 +45,7 @@ volatile uint16_t current_duty_cycle; void pulse_finish(void) { pulse_index++; - // Turn pwm pin off by settting duty cyle to 1. + // Turn pwm pin off by setting duty cyle to 1. common_hal_pwmio_pwmout_set_duty_cycle(pwmout_obj,1); if (pulse_index >= pulse_length) { return; From da248d159428194d55753439cb2dc5398df0501c Mon Sep 17 00:00:00 2001 From: Kamil Tomaszewski Date: Tue, 18 May 2021 17:02:16 +0200 Subject: [PATCH 21/35] spresense: Fix USB CDC and MSC --- ports/cxd56/mpconfigport.h | 2 +- shared-module/storage/__init__.c | 8 ++++++++ shared-module/usb_cdc/__init__.c | 8 ++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/ports/cxd56/mpconfigport.h b/ports/cxd56/mpconfigport.h index 4c332577e6..3560e72855 100644 --- a/ports/cxd56/mpconfigport.h +++ b/ports/cxd56/mpconfigport.h @@ -37,7 +37,7 @@ // so define these before #include'ing that file. #define USB_CDC_EP_NUM_NOTIFICATION (3) #define USB_CDC_EP_NUM_DATA_OUT (2) -#define USB_CDC_EP_NUM_DATA_IN (2) +#define USB_CDC_EP_NUM_DATA_IN (1) #define USB_MSC_EP_NUM_OUT (5) #define USB_MSC_EP_NUM_IN (4) diff --git a/shared-module/storage/__init__.c b/shared-module/storage/__init__.c index cbe72c6f16..da90a40355 100644 --- a/shared-module/storage/__init__.c +++ b/shared-module/storage/__init__.c @@ -63,7 +63,11 @@ static const uint8_t usb_msc_descriptor_template[] = { 0xFF, // 11 bEndpointAddress (IN/D2H) [SET AT RUNTIME: 0x80 | number] #define MSC_IN_ENDPOINT_INDEX (11) 0x02, // 12 bmAttributes (Bulk) +#if USB_HIGHSPEED + 0x00, 0x02, // 13,14 wMaxPacketSize 512 +#else 0x40, 0x00, // 13,14 wMaxPacketSize 64 +#endif 0x00, // 15 bInterval 0 (unit depends on device speed) // MSC Endpoint OUT Descriptor @@ -72,7 +76,11 @@ static const uint8_t usb_msc_descriptor_template[] = { 0xFF, // 18 bEndpointAddress (OUT/H2D) [SET AT RUNTIME] #define MSC_OUT_ENDPOINT_INDEX (18) 0x02, // 19 bmAttributes (Bulk) +#if USB_HIGHSPEED + 0x00, 0x02, // 20,21 wMaxPacketSize 512 +#else 0x40, 0x00, // 20,21 wMaxPacketSize 64 +#endif 0x00, // 22 bInterval 0 (unit depends on device speed) }; diff --git a/shared-module/usb_cdc/__init__.c b/shared-module/usb_cdc/__init__.c index c5da1f41e0..5b2275280e 100644 --- a/shared-module/usb_cdc/__init__.c +++ b/shared-module/usb_cdc/__init__.c @@ -121,7 +121,11 @@ static const uint8_t usb_cdc_descriptor_template[] = { 0xFF, // 54 bEndpointAddress (OUT/H2D) [SET AT RUNTIME] #define CDC_DATA_OUT_ENDPOINT_INDEX 54 0x02, // 55 bmAttributes (Bulk) +#if USB_HIGHSPEED + 0x00, 0x02, // 56,57 wMaxPacketSize 512 +#else 0x40, 0x00, // 56,57 wMaxPacketSize 64 +#endif 0x00, // 58 bInterval 0 (unit depends on device speed) // CDC Data IN Endpoint Descriptor @@ -130,7 +134,11 @@ static const uint8_t usb_cdc_descriptor_template[] = { 0xFF, // 61 bEndpointAddress (IN/D2H) [SET AT RUNTIME: 0x80 | number] #define CDC_DATA_IN_ENDPOINT_INDEX 61 0x02, // 62 bmAttributes (Bulk) +#if USB_HIGHSPEED + 0x00, 0x02, // 63,64 wMaxPacketSize 512 +#else 0x40, 0x00, // 63,64 wMaxPacketSize 64 +#endif 0x00, // 65 bInterval 0 (unit depends on device speed) }; From cec9015e198c7cb688862858e3dc1f3b750bc3ca Mon Sep 17 00:00:00 2001 From: ladyada Date: Mon, 17 May 2021 13:05:08 -0400 Subject: [PATCH 22/35] iz makropad with oled --- .../boards/adafruit_macropad_rp2040/board.c | 40 +++++++++++++++++++ .../adafruit_macropad_rp2040/mpconfigboard.h | 7 ++++ .../adafruit_macropad_rp2040/mpconfigboard.mk | 9 +++++ .../boards/adafruit_macropad_rp2040/pins.c | 35 ++++++++++++++++ 4 files changed, 91 insertions(+) create mode 100644 ports/raspberrypi/boards/adafruit_macropad_rp2040/board.c create mode 100644 ports/raspberrypi/boards/adafruit_macropad_rp2040/mpconfigboard.h create mode 100644 ports/raspberrypi/boards/adafruit_macropad_rp2040/mpconfigboard.mk create mode 100644 ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c diff --git a/ports/raspberrypi/boards/adafruit_macropad_rp2040/board.c b/ports/raspberrypi/boards/adafruit_macropad_rp2040/board.c new file mode 100644 index 0000000000..c4021a83e9 --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_macropad_rp2040/board.c @@ -0,0 +1,40 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2021 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "supervisor/board.h" + +#include "shared-bindings/microcontroller/Pin.h" +#include "src/rp2_common/hardware_gpio/include/hardware/gpio.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/raspberrypi/boards/adafruit_macropad_rp2040/mpconfigboard.h b/ports/raspberrypi/boards/adafruit_macropad_rp2040/mpconfigboard.h new file mode 100644 index 0000000000..5900003713 --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_macropad_rp2040/mpconfigboard.h @@ -0,0 +1,7 @@ +#define MICROPY_HW_BOARD_NAME "Adafruit Macropad RP2040" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO16) + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO25) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO24) diff --git a/ports/raspberrypi/boards/adafruit_macropad_rp2040/mpconfigboard.mk b/ports/raspberrypi/boards/adafruit_macropad_rp2040/mpconfigboard.mk new file mode 100644 index 0000000000..4d708bcf79 --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_macropad_rp2040/mpconfigboard.mk @@ -0,0 +1,9 @@ +USB_VID = 0x239A +USB_PID = 0x8108 +USB_PRODUCT = "Macropad RP2040" +USB_MANUFACTURER = "Adafruit" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "W25Q64JVxQ" diff --git a/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c new file mode 100644 index 0000000000..51f2a2ad33 --- /dev/null +++ b/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c @@ -0,0 +1,35 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_KEY1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_KEY2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_KEY3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_KEY4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_KEY5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_KEY6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_KEY7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_KEY8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_KEY9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_KEY10), MP_ROM_PTR(&pin_GPIO10) }, + { MP_ROM_QSTR(MP_QSTR_KEY11), MP_ROM_PTR(&pin_GPIO11) }, + { MP_ROM_QSTR(MP_QSTR_KEY12), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_ENCODER_SWITCH), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_ENCODER_A), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_ENCODER_B), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_OLED_RESET), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO24) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); From 38ffc4352d18c59a10d490a75bdb521ac4e8c8fc Mon Sep 17 00:00:00 2001 From: ladyada Date: Mon, 17 May 2021 13:05:54 -0400 Subject: [PATCH 23/35] add workflow for makropad --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9df017ce3a..194c8a7261 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -176,6 +176,7 @@ jobs: - "TG-Watch" - "adafruit_feather_rp2040" - "adafruit_itsybitsy_rp2040" + - "adafruit_macropad_rp2040" - "adafruit_neokey_trinkey_m0" - "adafruit_proxlight_trinkey_m0" - "adafruit_qt2040_trinkey" From fdbd3bc8c2fb9dd46708c7ee237b72bfb621d272 Mon Sep 17 00:00:00 2001 From: lady ada Date: Tue, 18 May 2021 11:09:31 -0400 Subject: [PATCH 24/35] add missing AREF pin --- ports/atmel-samd/boards/feather_m0_express/pins.c | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/atmel-samd/boards/feather_m0_express/pins.c b/ports/atmel-samd/boards/feather_m0_express/pins.c index 19320ca794..aea705a493 100644 --- a/ports/atmel-samd/boards/feather_m0_express/pins.c +++ b/ports/atmel-samd/boards/feather_m0_express/pins.c @@ -1,6 +1,7 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_AREF), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, From d8b895f1d7a5b1e3d75034cb682cfaaf305fd76d Mon Sep 17 00:00:00 2001 From: lady ada Date: Tue, 18 May 2021 20:53:13 -0400 Subject: [PATCH 25/35] add LED and speaker - natch! --- ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c b/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c index 51f2a2ad33..8ce16c0e9c 100644 --- a/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c +++ b/ports/raspberrypi/boards/adafruit_macropad_rp2040/pins.c @@ -14,6 +14,9 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_KEY11), MP_ROM_PTR(&pin_GPIO11) }, { MP_ROM_QSTR(MP_QSTR_KEY12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_LED), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_ENCODER_SWITCH), MP_ROM_PTR(&pin_GPIO0) }, { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO16) }, From 9a70aa1e8de62baf65d932355b20676002c66ccc Mon Sep 17 00:00:00 2001 From: lady ada Date: Tue, 18 May 2021 22:20:38 -0400 Subject: [PATCH 26/35] figure out the AREF thing later --- ports/atmel-samd/boards/feather_m0_express/pins.c | 1 - 1 file changed, 1 deletion(-) diff --git a/ports/atmel-samd/boards/feather_m0_express/pins.c b/ports/atmel-samd/boards/feather_m0_express/pins.c index aea705a493..19320ca794 100644 --- a/ports/atmel-samd/boards/feather_m0_express/pins.c +++ b/ports/atmel-samd/boards/feather_m0_express/pins.c @@ -1,7 +1,6 @@ #include "shared-bindings/board/__init__.h" STATIC const mp_rom_map_elem_t board_global_dict_table[] = { - { MP_ROM_QSTR(MP_QSTR_AREF), MP_ROM_PTR(&pin_PA03) }, { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PB08) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB09) }, From aebee2de7309be36bbaca7ad690c680dc804d728 Mon Sep 17 00:00:00 2001 From: Dan Halbert Date: Wed, 19 May 2021 07:35:17 -0400 Subject: [PATCH 27/35] Handle USB_HIGHSPEED for MIDI also --- shared-module/storage/__init__.c | 12 ++++++------ shared-module/usb_cdc/__init__.c | 12 ++++++------ shared-module/usb_midi/__init__.c | 10 +++++++++- 3 files changed, 21 insertions(+), 13 deletions(-) diff --git a/shared-module/storage/__init__.c b/shared-module/storage/__init__.c index da90a40355..5857432a52 100644 --- a/shared-module/storage/__init__.c +++ b/shared-module/storage/__init__.c @@ -63,11 +63,11 @@ static const uint8_t usb_msc_descriptor_template[] = { 0xFF, // 11 bEndpointAddress (IN/D2H) [SET AT RUNTIME: 0x80 | number] #define MSC_IN_ENDPOINT_INDEX (11) 0x02, // 12 bmAttributes (Bulk) -#if USB_HIGHSPEED + #if USB_HIGHSPEED 0x00, 0x02, // 13,14 wMaxPacketSize 512 -#else + #else 0x40, 0x00, // 13,14 wMaxPacketSize 64 -#endif + #endif 0x00, // 15 bInterval 0 (unit depends on device speed) // MSC Endpoint OUT Descriptor @@ -76,11 +76,11 @@ static const uint8_t usb_msc_descriptor_template[] = { 0xFF, // 18 bEndpointAddress (OUT/H2D) [SET AT RUNTIME] #define MSC_OUT_ENDPOINT_INDEX (18) 0x02, // 19 bmAttributes (Bulk) -#if USB_HIGHSPEED + #if USB_HIGHSPEED 0x00, 0x02, // 20,21 wMaxPacketSize 512 -#else + #else 0x40, 0x00, // 20,21 wMaxPacketSize 64 -#endif + #endif 0x00, // 22 bInterval 0 (unit depends on device speed) }; diff --git a/shared-module/usb_cdc/__init__.c b/shared-module/usb_cdc/__init__.c index 5b2275280e..769a2ce87f 100644 --- a/shared-module/usb_cdc/__init__.c +++ b/shared-module/usb_cdc/__init__.c @@ -121,11 +121,11 @@ static const uint8_t usb_cdc_descriptor_template[] = { 0xFF, // 54 bEndpointAddress (OUT/H2D) [SET AT RUNTIME] #define CDC_DATA_OUT_ENDPOINT_INDEX 54 0x02, // 55 bmAttributes (Bulk) -#if USB_HIGHSPEED + #if USB_HIGHSPEED 0x00, 0x02, // 56,57 wMaxPacketSize 512 -#else + #else 0x40, 0x00, // 56,57 wMaxPacketSize 64 -#endif + #endif 0x00, // 58 bInterval 0 (unit depends on device speed) // CDC Data IN Endpoint Descriptor @@ -134,11 +134,11 @@ static const uint8_t usb_cdc_descriptor_template[] = { 0xFF, // 61 bEndpointAddress (IN/D2H) [SET AT RUNTIME: 0x80 | number] #define CDC_DATA_IN_ENDPOINT_INDEX 61 0x02, // 62 bmAttributes (Bulk) -#if USB_HIGHSPEED + #if USB_HIGHSPEED 0x00, 0x02, // 63,64 wMaxPacketSize 512 -#else + #else 0x40, 0x00, // 63,64 wMaxPacketSize 64 -#endif + #endif 0x00, // 65 bInterval 0 (unit depends on device speed) }; diff --git a/shared-module/usb_midi/__init__.c b/shared-module/usb_midi/__init__.c index ac2e05adcb..8cac2ba8af 100644 --- a/shared-module/usb_midi/__init__.c +++ b/shared-module/usb_midi/__init__.c @@ -127,7 +127,11 @@ static const uint8_t usb_midi_descriptor_template[] = { 0xFF, // 66 bEndpointAddress (OUT/H2D) [SET AT RUNTIME] #define MIDI_STREAMING_OUT_ENDPOINT_INDEX (66) 0x02, // 67 bmAttributes (Bulk) + #if USB_HIGHSPEED + 0x00, 0x02, // 68,69 wMaxPacketSize (512) + #else 0x40, 0x00, // 68,69 wMaxPacketSize (64) + #endif 0x00, // 70 bInterval 0 (unit depends on device speed) // MIDI Data Endpoint Descriptor @@ -143,7 +147,11 @@ static const uint8_t usb_midi_descriptor_template[] = { 0xFF, // 78 bEndpointAddress (IN/D2H) [SET AT RUNTIME: 0x80 | number] #define MIDI_STREAMING_IN_ENDPOINT_INDEX (78) 0x02, // 79 bmAttributes (Bulk) - 0x40, 0x00, // 8081 wMaxPacketSize 64 + #if USB_HIGHSPEED + 0x00, 0x02, // 80, 81 wMaxPacketSize (512) + #else + 0x40, 0x00, // 80, 81 wMaxPacketSize (64) + #endif 0x00, // 82 bInterval 0 (unit depends on device speed) // MIDI Data Endpoint Descriptor From 9dabe882f14f4e8d29e517fab2a6cf8d483eda08 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Tue, 18 May 2021 17:37:21 -0700 Subject: [PATCH 28/35] Fix safe mode on rp2040 --- ports/raspberrypi/supervisor/port.c | 6 +++--- supervisor/shared/safe_mode.c | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ports/raspberrypi/supervisor/port.c b/ports/raspberrypi/supervisor/port.c index 9b3e140a85..443cfc2715 100644 --- a/ports/raspberrypi/supervisor/port.c +++ b/ports/raspberrypi/supervisor/port.c @@ -196,13 +196,13 @@ uint32_t *port_heap_get_top(void) { return port_stack_get_top(); } +extern uint32_t __scratch_x_start__; void port_set_saved_word(uint32_t value) { - // NOTE: This doesn't survive pressing the reset button (aka toggling RUN). - watchdog_hw->scratch[0] = value; + __scratch_x_start__ = value; } uint32_t port_get_saved_word(void) { - return watchdog_hw->scratch[0]; + return __scratch_x_start__; } uint64_t port_get_raw_ticks(uint8_t *subticks) { diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index ec85ea9d43..ca95b0d487 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -78,7 +78,7 @@ safe_mode_t wait_for_safe_mode_reset(void) { #endif uint64_t start_ticks = supervisor_ticks_ms64(); uint64_t diff = 0; - while (diff < 700) { + while (diff < 1000) { #ifdef MICROPY_HW_LED_STATUS // Blink on for 100, off for 100, on for 100, off for 100 and on for 200 common_hal_digitalio_digitalinout_set_value(&status_led, diff > 100 && diff / 100 != 2 && diff / 100 != 4); From 7dee378ade00b14a9eca5503ccc12527f653541f Mon Sep 17 00:00:00 2001 From: gabewillen Date: Wed, 30 Sep 2020 12:01:19 -0500 Subject: [PATCH 29/35] Update Adapter.h Added support for setting transmitter power --- shared-bindings/_bleio/Adapter.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/shared-bindings/_bleio/Adapter.h b/shared-bindings/_bleio/Adapter.h index 81b9ec3130..acbbf1ae2b 100644 --- a/shared-bindings/_bleio/Adapter.h +++ b/shared-bindings/_bleio/Adapter.h @@ -44,6 +44,8 @@ void common_hal_bleio_adapter_construct_hci_uart(bleio_adapter_obj_t *self, busi extern bool common_hal_bleio_adapter_get_advertising(bleio_adapter_obj_t *self); extern bool common_hal_bleio_adapter_get_enabled(bleio_adapter_obj_t *self); extern void common_hal_bleio_adapter_set_enabled(bleio_adapter_obj_t *self, bool enabled); +extern mp_int_t common_hal_bleio_adapter_get_tx_power(bleio_adapter_obj_t *self); +extern void common_hal_bleio_adapter_set_tx_power(bleio_adapter_obj_t *self, mp_int_t tx_power); extern bool common_hal_bleio_adapter_get_connected(bleio_adapter_obj_t *self); extern bleio_address_obj_t *common_hal_bleio_adapter_get_address(bleio_adapter_obj_t *self); extern bool common_hal_bleio_adapter_set_address(bleio_adapter_obj_t *self, bleio_address_obj_t *address); From 806b39fb22d696d9dd9c7259ba06d03cd96a471b Mon Sep 17 00:00:00 2001 From: gabewillen Date: Wed, 30 Sep 2020 12:01:58 -0500 Subject: [PATCH 30/35] Update Adapter.c Added support for setting transmitter power --- shared-bindings/_bleio/Adapter.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/shared-bindings/_bleio/Adapter.c b/shared-bindings/_bleio/Adapter.c index 9c0cbb71ad..e8975c57ea 100644 --- a/shared-bindings/_bleio/Adapter.c +++ b/shared-bindings/_bleio/Adapter.c @@ -142,6 +142,34 @@ const mp_obj_property_t bleio_adapter_enabled_obj = { MP_ROM_NONE }, }; +//| +//| tx_power: int +//| """transmitter power""" +//| + +STATIC mp_obj_t bleio_adapter_get_tx_power(mp_obj_t self) { +return mp_obj_new_int(common_hal_bleio_adapter_get_tx_power(self)); +} +STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_get_tx_power_obj, bleio_adapter_get_tx_power); + +static mp_obj_t bleio_adapter_set_tx_power(mp_obj_t self, mp_obj_t value) { + const mp_int_t tx_power = mp_obj_get_int(value); + + common_hal_bleio_adapter_set_tx_power(self, tx_power); + + return mp_const_none; +} + +STATIC MP_DEFINE_CONST_FUN_OBJ_2(bleio_adapter_set_tx_power_obj, bleio_adapter_set_tx_power); + +const mp_obj_property_t bleio_adapter_tx_power_obj = { + .base.type = &mp_type_property, + .proxy = { (mp_obj_t)&bleio_adapter_get_tx_power_obj, + (mp_obj_t)&bleio_adapter_set_tx_power_obj, + (mp_obj_t)&mp_const_none_obj }, +}; + + //| address: Address //| """MAC address of the BLE adapter.""" //| @@ -457,6 +485,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_erase_bonding_obj, bleio_adapter_ STATIC const mp_rom_map_elem_t bleio_adapter_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_enabled), MP_ROM_PTR(&bleio_adapter_enabled_obj) }, + { MP_ROM_QSTR(MP_QSTR_tx_power), MP_ROM_PTR(&bleio_adapter_tx_power_obj) }, { MP_ROM_QSTR(MP_QSTR_address), MP_ROM_PTR(&bleio_adapter_address_obj) }, { MP_ROM_QSTR(MP_QSTR_name), MP_ROM_PTR(&bleio_adapter_name_obj) }, From 6b39df406a453243d99b5ac31601267f21d779cd Mon Sep 17 00:00:00 2001 From: gabewillen Date: Wed, 30 Sep 2020 12:03:30 -0500 Subject: [PATCH 31/35] Update Adapter.c Added support for setting transmitter power currently done during every time advertising starts as implemented in the Arduino library --- ports/nrf/common-hal/_bleio/Adapter.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/ports/nrf/common-hal/_bleio/Adapter.c b/ports/nrf/common-hal/_bleio/Adapter.c index 26555e24da..dc1ceae677 100644 --- a/ports/nrf/common-hal/_bleio/Adapter.c +++ b/ports/nrf/common-hal/_bleio/Adapter.c @@ -333,6 +333,10 @@ STATIC void bleio_adapter_reset_name(bleio_adapter_obj_t *self) { common_hal_bleio_adapter_set_name(self, (char *)default_ble_name); } + +// The nRF SD 6.1.0 can only do one concurrent advertisement so share the advertising handle. +uint8_t adv_handle = BLE_GAP_ADV_SET_HANDLE_NOT_SET; + void common_hal_bleio_adapter_set_enabled(bleio_adapter_obj_t *self, bool enabled) { const bool is_enabled = common_hal_bleio_adapter_get_enabled(self); @@ -386,6 +390,14 @@ bool common_hal_bleio_adapter_get_enabled(bleio_adapter_obj_t *self) { return is_enabled; } +void common_hal_bleio_adapter_set_tx_power(bleio_adapter_obj_t *self, mp_int_t tx_power) { + self->tx_power = tx_power; +} + +mp_int_t common_hal_bleio_adapter_get_tx_power(bleio_adapter_obj_t *self) { + return self->tx_power; +} + bleio_address_obj_t *common_hal_bleio_adapter_get_address(bleio_adapter_obj_t *self) { common_hal_bleio_adapter_set_enabled(self, true); @@ -619,8 +631,6 @@ mp_obj_t common_hal_bleio_adapter_connect(bleio_adapter_obj_t *self, bleio_addre return mp_const_none; } -// The nRF SD 6.1.0 can only do one concurrent advertisement so share the advertising handle. -uint8_t adv_handle = BLE_GAP_ADV_SET_HANDLE_NOT_SET; STATIC void check_data_fit(size_t data_len, bool connectable) { if (data_len > BLE_GAP_ADV_SET_DATA_SIZE_EXTENDED_MAX_SUPPORTED || @@ -725,7 +735,10 @@ uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, } ble_drv_add_event_handler(advertising_on_ble_evt, self); - + err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, adv_handle, self->tx_power); + if (err_code != NRF_SUCCESS) { + return err_code; + } vm_used_ble = true; err_code = sd_ble_gap_adv_start(adv_handle, BLE_CONN_CFG_TAG_CUSTOM); if (err_code != NRF_SUCCESS) { From e29158483e7c1410ae04218db9fee7b800e80e64 Mon Sep 17 00:00:00 2001 From: gabewillen Date: Wed, 30 Sep 2020 15:22:32 -0500 Subject: [PATCH 32/35] Update Adapter.h Added the tx_power to the adapter object --- ports/nrf/common-hal/_bleio/Adapter.h | 1 + 1 file changed, 1 insertion(+) diff --git a/ports/nrf/common-hal/_bleio/Adapter.h b/ports/nrf/common-hal/_bleio/Adapter.h index 68a8b48644..ce56b27083 100644 --- a/ports/nrf/common-hal/_bleio/Adapter.h +++ b/ports/nrf/common-hal/_bleio/Adapter.h @@ -48,6 +48,7 @@ typedef struct { uint8_t *current_advertising_data; bleio_scanresults_obj_t *scan_results; mp_obj_t name; + mp_int_t tx_power; mp_obj_tuple_t *connection_objs; ble_drv_evt_handler_entry_t handler_entry; } bleio_adapter_obj_t; From ee7a701487a55d6c1ceb354e4f7b8d6095b2b50f Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 19 May 2021 12:21:48 -0700 Subject: [PATCH 33/35] Switch to start_advertising arg --- devices/ble_hci/common-hal/_bleio/Adapter.c | 11 ++++-- ports/nrf/common-hal/_bleio/Adapter.c | 27 ++++++-------- ports/nrf/common-hal/_bleio/Adapter.h | 1 - shared-bindings/_bleio/Adapter.c | 39 ++++----------------- shared-bindings/_bleio/Adapter.h | 4 +-- 5 files changed, 27 insertions(+), 55 deletions(-) diff --git a/devices/ble_hci/common-hal/_bleio/Adapter.c b/devices/ble_hci/common-hal/_bleio/Adapter.c index 14938e8a1d..bc928cc7b9 100644 --- a/devices/ble_hci/common-hal/_bleio/Adapter.c +++ b/devices/ble_hci/common-hal/_bleio/Adapter.c @@ -645,7 +645,7 @@ STATIC void check_data_fit(size_t data_len, bool connectable) { // return true; // } -uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, float interval, uint8_t *advertising_data, uint16_t advertising_data_len, uint8_t *scan_response_data, uint16_t scan_response_data_len) { +uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, float interval, uint8_t *advertising_data, uint16_t advertising_data_len, uint8_t *scan_response_data, uint16_t scan_response_data_len, mp_int_t tx_power) { check_enabled(self); if (self->now_advertising) { @@ -769,7 +769,7 @@ uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, return 0; } -void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, mp_float_t interval, mp_buffer_info_t *advertising_data_bufinfo, mp_buffer_info_t *scan_response_data_bufinfo) { +void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, mp_float_t interval, mp_buffer_info_t *advertising_data_bufinfo, mp_buffer_info_t *scan_response_data_bufinfo, mp_int_t tx_power) { check_enabled(self); // interval value has already been validated. @@ -793,12 +793,17 @@ void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool } } + if (tx_power != 0) { + mp_raise_NotImplementedError(); + } + const uint32_t result = _common_hal_bleio_adapter_start_advertising( self, connectable, anonymous, timeout, interval, advertising_data_bufinfo->buf, advertising_data_bufinfo->len, scan_response_data_bufinfo->buf, - scan_response_data_bufinfo->len); + scan_response_data_bufinfo->len, + tx_power); if (result) { mp_raise_bleio_BluetoothError(translate("Already advertising")); diff --git a/ports/nrf/common-hal/_bleio/Adapter.c b/ports/nrf/common-hal/_bleio/Adapter.c index dc1ceae677..bfcaf461a0 100644 --- a/ports/nrf/common-hal/_bleio/Adapter.c +++ b/ports/nrf/common-hal/_bleio/Adapter.c @@ -333,10 +333,6 @@ STATIC void bleio_adapter_reset_name(bleio_adapter_obj_t *self) { common_hal_bleio_adapter_set_name(self, (char *)default_ble_name); } - -// The nRF SD 6.1.0 can only do one concurrent advertisement so share the advertising handle. -uint8_t adv_handle = BLE_GAP_ADV_SET_HANDLE_NOT_SET; - void common_hal_bleio_adapter_set_enabled(bleio_adapter_obj_t *self, bool enabled) { const bool is_enabled = common_hal_bleio_adapter_get_enabled(self); @@ -390,14 +386,6 @@ bool common_hal_bleio_adapter_get_enabled(bleio_adapter_obj_t *self) { return is_enabled; } -void common_hal_bleio_adapter_set_tx_power(bleio_adapter_obj_t *self, mp_int_t tx_power) { - self->tx_power = tx_power; -} - -mp_int_t common_hal_bleio_adapter_get_tx_power(bleio_adapter_obj_t *self) { - return self->tx_power; -} - bleio_address_obj_t *common_hal_bleio_adapter_get_address(bleio_adapter_obj_t *self) { common_hal_bleio_adapter_set_enabled(self, true); @@ -639,6 +627,9 @@ STATIC void check_data_fit(size_t data_len, bool connectable) { } } +// The nRF SD 6.1.0 can only do one concurrent advertisement so share the advertising handle. +uint8_t adv_handle = BLE_GAP_ADV_SET_HANDLE_NOT_SET; + STATIC bool advertising_on_ble_evt(ble_evt_t *ble_evt, void *self_in) { bleio_adapter_obj_t *self = (bleio_adapter_obj_t *)self_in; @@ -657,7 +648,10 @@ STATIC bool advertising_on_ble_evt(ble_evt_t *ble_evt, void *self_in) { return true; } -uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, float interval, uint8_t *advertising_data, uint16_t advertising_data_len, uint8_t *scan_response_data, uint16_t scan_response_data_len) { +uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, + bool anonymous, uint32_t timeout, float interval, uint8_t *advertising_data, + uint16_t advertising_data_len, uint8_t *scan_response_data, uint16_t scan_response_data_len, + mp_int_t tx_power) { if (self->current_advertising_data != NULL && self->current_advertising_data == self->advertising_data) { return NRF_ERROR_BUSY; } @@ -735,7 +729,7 @@ uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, } ble_drv_add_event_handler(advertising_on_ble_evt, self); - err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, adv_handle, self->tx_power); + err_code = sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, adv_handle, tx_power); if (err_code != NRF_SUCCESS) { return err_code; } @@ -749,7 +743,7 @@ uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, } -void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, mp_float_t interval, mp_buffer_info_t *advertising_data_bufinfo, mp_buffer_info_t *scan_response_data_bufinfo) { +void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, mp_float_t interval, mp_buffer_info_t *advertising_data_bufinfo, mp_buffer_info_t *scan_response_data_bufinfo, mp_int_t tx_power) { if (self->current_advertising_data != NULL && self->current_advertising_data == self->advertising_data) { mp_raise_bleio_BluetoothError(translate("Already advertising.")); } @@ -797,7 +791,8 @@ void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool self->advertising_data, advertising_data_bufinfo->len, self->scan_response_data, - scan_response_data_bufinfo->len)); + scan_response_data_bufinfo->len, + tx_power)); } void common_hal_bleio_adapter_stop_advertising(bleio_adapter_obj_t *self) { diff --git a/ports/nrf/common-hal/_bleio/Adapter.h b/ports/nrf/common-hal/_bleio/Adapter.h index ce56b27083..68a8b48644 100644 --- a/ports/nrf/common-hal/_bleio/Adapter.h +++ b/ports/nrf/common-hal/_bleio/Adapter.h @@ -48,7 +48,6 @@ typedef struct { uint8_t *current_advertising_data; bleio_scanresults_obj_t *scan_results; mp_obj_t name; - mp_int_t tx_power; mp_obj_tuple_t *connection_objs; ble_drv_evt_handler_entry_t handler_entry; } bleio_adapter_obj_t; diff --git a/shared-bindings/_bleio/Adapter.c b/shared-bindings/_bleio/Adapter.c index e8975c57ea..1c16cc7d87 100644 --- a/shared-bindings/_bleio/Adapter.c +++ b/shared-bindings/_bleio/Adapter.c @@ -142,34 +142,6 @@ const mp_obj_property_t bleio_adapter_enabled_obj = { MP_ROM_NONE }, }; -//| -//| tx_power: int -//| """transmitter power""" -//| - -STATIC mp_obj_t bleio_adapter_get_tx_power(mp_obj_t self) { -return mp_obj_new_int(common_hal_bleio_adapter_get_tx_power(self)); -} -STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_get_tx_power_obj, bleio_adapter_get_tx_power); - -static mp_obj_t bleio_adapter_set_tx_power(mp_obj_t self, mp_obj_t value) { - const mp_int_t tx_power = mp_obj_get_int(value); - - common_hal_bleio_adapter_set_tx_power(self, tx_power); - - return mp_const_none; -} - -STATIC MP_DEFINE_CONST_FUN_OBJ_2(bleio_adapter_set_tx_power_obj, bleio_adapter_set_tx_power); - -const mp_obj_property_t bleio_adapter_tx_power_obj = { - .base.type = &mp_type_property, - .proxy = { (mp_obj_t)&bleio_adapter_get_tx_power_obj, - (mp_obj_t)&bleio_adapter_set_tx_power_obj, - (mp_obj_t)&mp_const_none_obj }, -}; - - //| address: Address //| """MAC address of the BLE adapter.""" //| @@ -218,7 +190,7 @@ const mp_obj_property_t bleio_adapter_name_obj = { MP_ROM_NONE }, }; -//| def start_advertising(self, data: ReadableBuffer, *, scan_response: Optional[ReadableBuffer] = None, connectable: bool = True, anonymous: bool = False, timeout: int = 0, interval: float = 0.1) -> None: +//| def start_advertising(self, data: ReadableBuffer, *, scan_response: Optional[ReadableBuffer] = None, connectable: bool = True, anonymous: bool = False, timeout: int = 0, interval: float = 0.1, tx_power: int = 0) -> None: //| """Starts advertising until `stop_advertising` is called or if connectable, another device //| connects to us. //| @@ -233,13 +205,14 @@ const mp_obj_property_t bleio_adapter_name_obj = { //| :param bool connectable: If `True` then other devices are allowed to connect to this peripheral. //| :param bool anonymous: If `True` then this device's MAC address is randomized before advertising. //| :param int timeout: If set, we will only advertise for this many seconds. Zero means no timeout. -//| :param float interval: advertising interval, in seconds""" +//| :param float interval: advertising interval, in seconds +//| :param tx_power int: transmitter power while advertising in dBm""" //| ... //| STATIC mp_obj_t bleio_adapter_start_advertising(mp_uint_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { bleio_adapter_obj_t *self = MP_OBJ_TO_PTR(pos_args[0]); - enum { ARG_data, ARG_scan_response, ARG_connectable, ARG_anonymous, ARG_timeout, ARG_interval }; + enum { ARG_data, ARG_scan_response, ARG_connectable, ARG_anonymous, ARG_timeout, ARG_interval, ARG_tx_power }; static const mp_arg_t allowed_args[] = { { MP_QSTR_data, MP_ARG_REQUIRED | MP_ARG_OBJ }, { MP_QSTR_scan_response, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = mp_const_none} }, @@ -247,6 +220,7 @@ STATIC mp_obj_t bleio_adapter_start_advertising(mp_uint_t n_args, const mp_obj_t { MP_QSTR_anonymous, MP_ARG_KW_ONLY | MP_ARG_BOOL, {.u_bool = false} }, { MP_QSTR_timeout, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} }, { MP_QSTR_interval, MP_ARG_KW_ONLY | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} }, + { MP_QSTR_tx_power, MP_ARG_KW_ONLY | MP_ARG_INT, {.u_int = 0} }, }; mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; @@ -279,7 +253,7 @@ STATIC mp_obj_t bleio_adapter_start_advertising(mp_uint_t n_args, const mp_obj_t } common_hal_bleio_adapter_start_advertising(self, connectable, anonymous, timeout, interval, - &data_bufinfo, &scan_response_bufinfo); + &data_bufinfo, &scan_response_bufinfo, args[ARG_tx_power].u_int); return mp_const_none; } @@ -485,7 +459,6 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_1(bleio_adapter_erase_bonding_obj, bleio_adapter_ STATIC const mp_rom_map_elem_t bleio_adapter_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_enabled), MP_ROM_PTR(&bleio_adapter_enabled_obj) }, - { MP_ROM_QSTR(MP_QSTR_tx_power), MP_ROM_PTR(&bleio_adapter_tx_power_obj) }, { MP_ROM_QSTR(MP_QSTR_address), MP_ROM_PTR(&bleio_adapter_address_obj) }, { MP_ROM_QSTR(MP_QSTR_name), MP_ROM_PTR(&bleio_adapter_name_obj) }, diff --git a/shared-bindings/_bleio/Adapter.h b/shared-bindings/_bleio/Adapter.h index acbbf1ae2b..06dc47311b 100644 --- a/shared-bindings/_bleio/Adapter.h +++ b/shared-bindings/_bleio/Adapter.h @@ -53,9 +53,9 @@ extern bool common_hal_bleio_adapter_set_address(bleio_adapter_obj_t *self, blei extern mp_obj_str_t *common_hal_bleio_adapter_get_name(bleio_adapter_obj_t *self); extern void common_hal_bleio_adapter_set_name(bleio_adapter_obj_t *self, const char *name); -extern uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, float interval, uint8_t *advertising_data, uint16_t advertising_data_len, uint8_t *scan_response_data, uint16_t scan_response_data_len); +extern uint32_t _common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, float interval, uint8_t *advertising_data, uint16_t advertising_data_len, uint8_t *scan_response_data, uint16_t scan_response_data_len, mp_int_t tx_power); -extern void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, mp_float_t interval, mp_buffer_info_t *advertising_data_bufinfo, mp_buffer_info_t *scan_response_data_bufinfo); +extern void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool connectable, bool anonymous, uint32_t timeout, mp_float_t interval, mp_buffer_info_t *advertising_data_bufinfo, mp_buffer_info_t *scan_response_data_bufinfo, mp_int_t tx_power); extern void common_hal_bleio_adapter_stop_advertising(bleio_adapter_obj_t *self); extern mp_obj_t common_hal_bleio_adapter_start_scan(bleio_adapter_obj_t *self, uint8_t *prefixes, size_t prefix_length, bool extended, mp_int_t buffer_size, mp_float_t timeout, mp_float_t interval, mp_float_t window, mp_int_t minimum_rssi, bool active); From 42ee48ccb5e0e67455a8949023c490087abe57d0 Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 19 May 2021 14:09:11 -0700 Subject: [PATCH 34/35] Improve error for invalid parameters --- locale/circuitpython.pot | 6 +++++- ports/nrf/common-hal/_bleio/__init__.c | 3 +++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index d96c4f60cf..1da8b1783c 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -1211,6 +1211,10 @@ msgstr "" msgid "Invalid AuthMode" msgstr "" +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Invalid BLE parameter" +msgstr "" + #: shared-module/displayio/OnDiskBitmap.c msgid "Invalid BMP file" msgstr "" @@ -2316,7 +2320,7 @@ msgstr "" msgid "Unsupported format" msgstr "" -#: ports/raspberrypi/common-hal/pulseio/PulseOut.c py/moduerrno.c +#: py/moduerrno.c msgid "Unsupported operation" msgstr "" diff --git a/ports/nrf/common-hal/_bleio/__init__.c b/ports/nrf/common-hal/_bleio/__init__.c index 72a8e91370..8c28b970c4 100644 --- a/ports/nrf/common-hal/_bleio/__init__.c +++ b/ports/nrf/common-hal/_bleio/__init__.c @@ -52,6 +52,9 @@ void check_nrf_error(uint32_t err_code) { case NRF_ERROR_TIMEOUT: mp_raise_msg(&mp_type_TimeoutError, NULL); return; + case NRF_ERROR_INVALID_PARAM: + mp_raise_ValueError(translate("Invalid BLE parameter")); + return; case BLE_ERROR_INVALID_CONN_HANDLE: mp_raise_ConnectionError(translate("Not connected")); return; From 65813ef35835e9137801815c9b7e1721f7d4e2bd Mon Sep 17 00:00:00 2001 From: Scott Shawcroft Date: Wed, 19 May 2021 14:14:32 -0700 Subject: [PATCH 35/35] Fix ble_hci builds --- devices/ble_hci/common-hal/_bleio/Adapter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devices/ble_hci/common-hal/_bleio/Adapter.c b/devices/ble_hci/common-hal/_bleio/Adapter.c index bc928cc7b9..97468339b0 100644 --- a/devices/ble_hci/common-hal/_bleio/Adapter.c +++ b/devices/ble_hci/common-hal/_bleio/Adapter.c @@ -794,7 +794,7 @@ void common_hal_bleio_adapter_start_advertising(bleio_adapter_obj_t *self, bool } if (tx_power != 0) { - mp_raise_NotImplementedError(); + mp_raise_NotImplementedError(translate("Only tx_power=0 supported")); } const uint32_t result = _common_hal_bleio_adapter_start_advertising(