diff --git a/extmod/moduasyncio.c b/extmod/moduasyncio.c index c7d1753e2f..8af32f21d9 100644 --- a/extmod/moduasyncio.c +++ b/extmod/moduasyncio.c @@ -73,10 +73,18 @@ STATIC mp_obj_t task_getiter(mp_obj_t self_in, mp_obj_iter_buf_t *iter_buf); #define _TICKS_PERIOD (1lu << 29) #define _TICKS_MAX (_TICKS_PERIOD - 1) #define _TICKS_HALFPERIOD (_TICKS_PERIOD >> 1) - +#if !CIRCUITPY || (defined(__unix__) || defined(__APPLE__)) STATIC mp_obj_t ticks(void) { return MP_OBJ_NEW_SMALL_INT(mp_hal_ticks_ms() & _TICKS_MAX); } +#else +// We don't share the implementation above because our supervisor_ticks_ms +// starts the epoch about 65 seconds before the first overflow (see +// shared-bindings/supervisor/__init__.c). We assume/require that +// supervisor.ticks_ms is picked as the ticks implementation under +// CircuitPython for the Python-coded bits of asyncio. +#define ticks() MP_OBJ_NEW_SMALL_INT(supervisor_ticks_ms()) +#endif STATIC mp_int_t ticks_diff(mp_obj_t t1_in, mp_obj_t t0_in) { mp_uint_t t0 = MP_OBJ_SMALL_INT_VALUE(t0_in); diff --git a/locale/ID.po b/locale/ID.po index 9784f8fb1c..6741923b7d 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -591,6 +591,13 @@ msgstr "" msgid "Both RX and TX required for flow control" msgstr "" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "Kedua pin harus mendukung hardware interrut" @@ -656,6 +663,11 @@ msgstr "" msgid "Bus pin %d is already in use" msgstr "Pin bus %d sudah digunakan" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "Byte buffer harus 16 byte." @@ -2004,18 +2016,38 @@ msgstr "" msgid "Temperature read timed out" msgstr "Waktu baca suhu habis" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" @@ -2076,8 +2108,8 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Untuk keluar, silahkan reset board tanpa " +msgid "To exit, please reset the board without requesting safe mode." +msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample" @@ -2376,10 +2408,6 @@ 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 " -msgstr "Anda mengajukan untuk memulai mode aman pada (safe mode) pada " - #: py/objtype.c msgid "__init__() should return None" msgstr "__init __() harus mengembalikan None" @@ -2673,7 +2701,7 @@ msgstr "" msgid "can't set 512 block size" msgstr "" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "" @@ -3847,39 +3875,6 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "" @@ -4400,6 +4395,12 @@ msgstr "zi harus berjenis float" msgid "zi must be of shape (n_section, 2)" msgstr "Zi harus berbentuk (n_section, 2)" +#~ msgid "To exit, please reset the board without " +#~ msgstr "Untuk keluar, silahkan reset board tanpa " + +#~ msgid "You requested starting safe mode by " +#~ msgstr "Anda mengajukan untuk memulai mode aman pada (safe mode) pada " + #~ msgid "Stream missing readinto() or write() method." #~ msgstr "Aliran tidak menemukan metode readinto() atau write()." diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot old mode 100644 new mode 100755 index dda2cbd02c..768daa8651 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -583,6 +583,13 @@ msgstr "" msgid "Both RX and TX required for flow control" msgstr "" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "" @@ -648,6 +655,11 @@ msgstr "" msgid "Bus pin %d is already in use" msgstr "" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "" @@ -1975,18 +1987,38 @@ msgstr "" msgid "Temperature read timed out" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" @@ -2047,7 +2079,7 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " +msgid "To exit, please reset the board without requesting safe mode." msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c @@ -2345,10 +2377,6 @@ 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 " -msgstr "" - #: py/objtype.c msgid "__init__() should return None" msgstr "" @@ -2642,7 +2670,7 @@ msgstr "" msgid "can't set 512 block size" msgstr "" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "" @@ -3815,39 +3843,6 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 9c911b504e..9159489fe5 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -592,6 +592,13 @@ msgstr "Bootovací zařízení musí být první (rozhraní #0)." msgid "Both RX and TX required for flow control" msgstr "RX a TX jsou vyžadovány pro kontrolu toku" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "Oba piny musí podporovat hardwarové přerušení" @@ -657,6 +664,11 @@ msgstr "Buffery musí mít stejnou velikost" msgid "Bus pin %d is already in use" msgstr "Sběrnicový pin %d je již používán" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "Bajtový buffer musí být 16 bajtů." @@ -1993,18 +2005,38 @@ msgstr "" msgid "Temperature read timed out" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" @@ -2065,7 +2097,7 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " +msgid "To exit, please reset the board without requesting safe mode." msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c @@ -2363,10 +2395,6 @@ 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 " -msgstr "" - #: py/objtype.c msgid "__init__() should return None" msgstr "" @@ -2660,7 +2688,7 @@ msgstr "" msgid "can't set 512 block size" msgstr "" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "" @@ -3833,39 +3861,6 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "" diff --git a/locale/de_DE.po b/locale/de_DE.po index 999f3e3bbb..bb53013fac 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -128,7 +128,7 @@ msgstr "%q Initialisierung ist gescheitert" #: shared-bindings/dualbank/__init__.c msgid "%q is %q" -msgstr "" +msgstr "%q ist %q" #: py/argcheck.c msgid "%q length must be %d" @@ -174,6 +174,7 @@ msgstr "%q muss >= %d sein" #: shared-bindings/audiocore/RawSample.c msgid "%q must be a bytearray or array of type 'h', 'H', 'b', or 'B'" msgstr "" +"%q muss ein Byte-Array oder ein array vom Typ 'h', 'H', 'b', oder 'B' sein" #: py/argcheck.c msgid "%q must be a string" @@ -594,6 +595,13 @@ msgstr "Boot-Gerät muss erstes Gerät sein (interface #0)." msgid "Both RX and TX required for flow control" msgstr "Sowohl RX als auch TX sind zu Flusssteuerung erforderlich" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "Beide Pins müssen Hardware-Interrupts unterstützen" @@ -659,6 +667,11 @@ msgstr "Buffers müssen gleiche Größe haben" msgid "Bus pin %d is already in use" msgstr "Bus-Pin %d wird schon benutzt" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "Der Puffer muss 16 Bytes lang sein." @@ -1030,16 +1043,16 @@ msgstr "Filter zu komplex" #: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware is duplicate" -msgstr "" +msgstr "Die Firmware ist doppelt vorhanden" #: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware is invalid" -msgstr "" +msgstr "Die Firmware ist ungültig" #: ports/espressif/common-hal/coproc/Coproc.c #: ports/espressif/common-hal/dualbank/__init__.c msgid "Firmware is too big" -msgstr "" +msgstr "Die Firmware ist zu groß" #: shared-bindings/bitmaptools/__init__.c msgid "For L8 colorspace, input bitmap must have 8 bits per pixel" @@ -1657,7 +1670,7 @@ msgstr "" #: ports/espressif/common-hal/alarm/coproc/CoprocAlarm.c #: ports/espressif/common-hal/alarm/touch/TouchAlarm.c msgid "Only one %q can be set in deep sleep." -msgstr "" +msgstr "Nur ein %q kann im Deep-Sleep gesetzt werden." #: ports/espressif/common-hal/i2ctarget/I2CTarget.c #: ports/raspberrypi/common-hal/i2ctarget/I2CTarget.c @@ -2017,6 +2030,10 @@ msgstr "Systemeintrag muss auf gnss.SatelliteSystem lauten" msgid "Temperature read timed out" msgstr "Zeitüberschreitung beim Auslesen der Temperatur" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" @@ -2025,6 +2042,14 @@ msgstr "" "Der Heap von CircuitPython wurde beschädigt, weil der Stack zu klein war.\n" "Vergrößern Sie den Stack, wenn Sie wissen, wie. Wenn nicht:" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " @@ -2033,6 +2058,14 @@ msgstr "" "Das Modul `microcontroller` wurde zum Booten in den abgesicherten Modus " "verwendet. Drücken Sie Reset, um den abgesicherten Modus zu verlassen." +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "Die Länge von rgb_pins muss 6, 12, 18, 24 oder 30 betragen" @@ -2102,8 +2135,8 @@ msgstr "" "Zeitbeschränkung ist zu groß: Maximale Zeitbeschränkung ist %d Sekunden" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Zum beenden, resette bitte das board ohne " +msgid "To exit, please reset the board without requesting safe mode." +msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample" @@ -2224,7 +2257,7 @@ msgstr "mDNS-Abfrage kann nicht gestartet werden" #: shared-bindings/coproc/CoprocMemory.c msgid "Unable to write" -msgstr "" +msgstr "Schreiben nicht möglich" #: shared-bindings/nvm/ByteArray.c msgid "Unable to write to nvm." @@ -2416,10 +2449,6 @@ msgstr "" "Du hast beim Booten die Reset-Taste gedrückt. Drücke sie erneut, um den " "abgesicherten Modus zu beenden." -#: supervisor/shared/safe_mode.c -msgid "You requested starting safe mode by " -msgstr "Du hast das Starten im abgesicherten Modus ausgelöst durch " - #: py/objtype.c msgid "__init__() should return None" msgstr "__init__() sollte None zurückgeben" @@ -2717,7 +2746,7 @@ msgstr "" msgid "can't set 512 block size" msgstr "Kann Blockgröße von 512 nicht setzen" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "kann Attribut nicht setzen" @@ -2988,6 +3017,8 @@ msgid "" "esp32_camera.Camera requires reserved PSRAM to be configured. See the " "documentation for instructions." msgstr "" +"esp32_camera.Camera benötigt reservierten PSRAM um konfiguriert werden zu " +"können. Sieh in der Dokumentation für eine Anleitung nach." #: py/runtime.c msgid "exceptions must derive from BaseException" @@ -3911,39 +3942,6 @@ msgstr "pow() drittes Argument darf nicht 0 sein" msgid "pow() with 3 arguments requires integers" msgstr "pow() mit 3 Argumenten erfordert Integer" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "BOOT Taste wird beim Starten gedrückt.\n" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "SW38 Taste wird beim Starten gedrückt.\n" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "VOLUME Taste wird beim Starten gedrückt.\n" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "Drücken der Boot-Taste beim Start.\n" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "Drücken Sie beim Start beide Tasten.\n" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "Drücken der linken Taste beim Einschalten\n" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "Pull-Masken kollidieren mit Richtungsmasken" @@ -4391,7 +4389,7 @@ msgstr "wifi ist nicht aktiviert" #: ports/raspberrypi/common-hal/wifi/Monitor.c msgid "wifi.Monitor not available" -msgstr "" +msgstr "wifi.Monitor nicht verfügbar" #: shared-bindings/_bleio/Adapter.c msgid "window must be <= interval" @@ -4467,6 +4465,30 @@ msgstr "zi muss eine Gleitkommazahl sein" msgid "zi must be of shape (n_section, 2)" msgstr "zi muss die Form (n_section, 2) haben" +#~ msgid "To exit, please reset the board without " +#~ msgstr "Zum beenden, resette bitte das board ohne " + +#~ msgid "You requested starting safe mode by " +#~ msgstr "Du hast das Starten im abgesicherten Modus ausgelöst durch " + +#~ msgid "pressing BOOT button at start up.\n" +#~ msgstr "BOOT Taste wird beim Starten gedrückt.\n" + +#~ msgid "pressing SW38 button at start up.\n" +#~ msgstr "SW38 Taste wird beim Starten gedrückt.\n" + +#~ msgid "pressing VOLUME button at start up.\n" +#~ msgstr "VOLUME Taste wird beim Starten gedrückt.\n" + +#~ msgid "pressing boot button at start up.\n" +#~ msgstr "Drücken der Boot-Taste beim Start.\n" + +#~ msgid "pressing both buttons at start up.\n" +#~ msgstr "Drücken Sie beim Start beide Tasten.\n" + +#~ msgid "pressing the left button at start up\n" +#~ msgstr "Drücken der linken Taste beim Einschalten\n" + #~ msgid "Only one TouchAlarm can be set in deep sleep." #~ msgstr "Nur ein TouchAlarm kann in Deep Sleep gesetzt werden." @@ -4510,7 +4532,7 @@ msgstr "zi muss die Form (n_section, 2) haben" #~ "sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' " #~ "or 'B'" #~ msgstr "" -#~ "sample_source buffer muss ein Bytearray oder ein Array vom Typ 'h', 'H', " +#~ "sample_source buffer muss ein Byte-Array oder ein Array vom Typ 'h', 'H', " #~ "'b' oder 'B' sein" #~ msgid "Expected an alarm" diff --git a/locale/el.po b/locale/el.po index 55f8535703..59e69f257f 100644 --- a/locale/el.po +++ b/locale/el.po @@ -598,6 +598,13 @@ msgstr "Η συσκευή boot πρέπει να είναι η πρώτη συσ msgid "Both RX and TX required for flow control" msgstr "Και RX και TX απαιτούνται για έλεγχο flow" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "Και τα δύο pin πρέπει να υποστηρίζουν interrupts υλικού" @@ -663,6 +670,11 @@ msgstr "Τα Buffers πρέπει να είναι του ιδίου μεγέθο msgid "Bus pin %d is already in use" msgstr "Bus pin %d είναι ήδη σε χρήση" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "Byte buffer πρέπει να είναι 16 bytes." @@ -2002,18 +2014,38 @@ msgstr "" msgid "Temperature read timed out" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" @@ -2074,7 +2106,7 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " +msgid "To exit, please reset the board without requesting safe mode." msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c @@ -2372,10 +2404,6 @@ 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 " -msgstr "" - #: py/objtype.c msgid "__init__() should return None" msgstr "" @@ -2669,7 +2697,7 @@ msgstr "" msgid "can't set 512 block size" msgstr "" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "" @@ -3842,39 +3870,6 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "" diff --git a/locale/en_GB.po b/locale/en_GB.po index e9e74b6ac9..7b111a211a 100644 --- a/locale/en_GB.po +++ b/locale/en_GB.po @@ -595,6 +595,13 @@ msgstr "" msgid "Both RX and TX required for flow control" msgstr "Both RX and TX required for flow control" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "Both pins must support hardware interrupts" @@ -660,6 +667,11 @@ msgstr "" msgid "Bus pin %d is already in use" msgstr "Bus pin %d is already in use" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "Byte buffer must be 16 bytes." @@ -1999,6 +2011,10 @@ msgstr "System entry must be gnss.SatelliteSystem" msgid "Temperature read timed out" msgstr "Temperature read timed out" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" @@ -2007,6 +2023,14 @@ msgstr "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " @@ -2015,6 +2039,14 @@ msgstr "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "The length of rgb_pins must be 6, 12, 18, 24, or 30" @@ -2078,8 +2110,8 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "Timeout is too long: Maximum timeout length is %d seconds" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "To exit, please reset the board without " +msgid "To exit, please reset the board without requesting safe mode." +msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample" @@ -2379,10 +2411,6 @@ msgid "" msgstr "" "You pressed the reset button during boot. Press again to exit safe mode." -#: supervisor/shared/safe_mode.c -msgid "You requested starting safe mode by " -msgstr "You requested starting safe mode by " - #: py/objtype.c msgid "__init__() should return None" msgstr "__init__() should return None" @@ -2676,7 +2704,7 @@ msgstr "can't send non-None value to a just-started generator" msgid "can't set 512 block size" msgstr "can't set 512 block size" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "can't set attribute" @@ -3852,39 +3880,6 @@ msgstr "pow() 3rd argument cannot be 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() with 3 arguments requires integers" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "pressing boot button at start up.\n" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "pressing both buttons at start up.\n" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "pressing the left button at start up\n" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "pull masks conflict with direction masks" @@ -4405,6 +4400,21 @@ 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 "To exit, please reset the board without " +#~ msgstr "To exit, please reset the board without " + +#~ msgid "You requested starting safe mode by " +#~ msgstr "You requested starting safe mode by " + +#~ msgid "pressing boot button at start up.\n" +#~ msgstr "pressing boot button at start up.\n" + +#~ msgid "pressing both buttons at start up.\n" +#~ msgstr "pressing both buttons at start up.\n" + +#~ msgid "pressing the left button at start up\n" +#~ msgstr "pressing the left button at start up\n" + #~ msgid "Only one TouchAlarm can be set in deep sleep." #~ msgstr "Only one TouchAlarm can be set in deep sleep." diff --git a/locale/es.po b/locale/es.po index 56ed23fa30..5f3837732f 100644 --- a/locale/es.po +++ b/locale/es.po @@ -599,6 +599,13 @@ msgstr "" msgid "Both RX and TX required for flow control" msgstr "Ambos RX y TX requeridos para control de flujo" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "Ambos pines deben soportar interrupciones por hardware" @@ -665,6 +672,11 @@ msgstr "" msgid "Bus pin %d is already in use" msgstr "Bus pin %d ya está siendo utilizado" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "Búfer Byte debe de ser 16 bytes." @@ -2028,6 +2040,10 @@ msgstr "La entrada del sistema debe ser gnss.SatelliteSystem" msgid "Temperature read timed out" msgstr "Lectura de temperatura expirada" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" @@ -2036,6 +2052,14 @@ 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:" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " @@ -2044,6 +2068,14 @@ msgstr "" "El módulo de `microcontroller` se usó para un arranque en modo seguro. " "Presione reset para salir del modo seguro." +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "La longitud de rgb_pins debe ser 6, 12, 18, 24, o 30" @@ -2110,8 +2142,8 @@ msgstr "" "segundos" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Para salir, por favor reinicia la tarjeta sin " +msgid "To exit, please reset the board without requesting safe mode." +msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample" @@ -2415,10 +2447,6 @@ 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 " -msgstr "Solicitaste iniciar en modo seguro por " - #: py/objtype.c msgid "__init__() should return None" msgstr "__init__() deberia devolver None" @@ -2713,7 +2741,7 @@ msgstr "" msgid "can't set 512 block size" msgstr "no se puede definir un tamaño de bloque de 512" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "no se puede asignar el atributo" @@ -3899,39 +3927,6 @@ msgstr "el 3er argumento de pow() no puede ser 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() con 3 argumentos requiere enteros" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "presionando botón de arranque al inicio.\n" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "presionando ambos botones al inicio.\n" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "presione el botón izquierdo al arranque\n" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "máscara de pull en conflicto con máscara de dirección" @@ -4453,6 +4448,21 @@ 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 "To exit, please reset the board without " +#~ msgstr "Para salir, por favor reinicia la tarjeta sin " + +#~ msgid "You requested starting safe mode by " +#~ msgstr "Solicitaste iniciar en modo seguro por " + +#~ msgid "pressing boot button at start up.\n" +#~ msgstr "presionando botón de arranque al inicio.\n" + +#~ msgid "pressing both buttons at start up.\n" +#~ msgstr "presionando ambos botones al inicio.\n" + +#~ msgid "pressing the left button at start up\n" +#~ msgstr "presione el botón izquierdo al arranque\n" + #~ msgid "Only one TouchAlarm can be set in deep sleep." #~ msgstr "Solamente una TouchAlarm puede ser configurada durante deep sleep." diff --git a/locale/fil.po b/locale/fil.po index 7c13b61711..9391a5f697 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -588,6 +588,13 @@ msgstr "" msgid "Both RX and TX required for flow control" msgstr "" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "Ang parehong mga pin ay dapat na sumusuporta sa hardware interrupts" @@ -653,6 +660,11 @@ msgstr "" msgid "Bus pin %d is already in use" msgstr "Ginagamit na ang DAC" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c #, fuzzy msgid "Byte buffer must be 16 bytes." @@ -1992,18 +2004,38 @@ msgstr "" msgid "Temperature read timed out" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" @@ -2064,8 +2096,8 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Para lumabas, paki-reset ang board na wala ang " +msgid "To exit, please reset the board without requesting safe mode." +msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample" @@ -2364,10 +2396,6 @@ 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 " -msgstr "Ikaw ang humiling sa safe mode sa pamamagitan ng " - #: py/objtype.c msgid "__init__() should return None" msgstr "__init__() dapat magbalik na None" @@ -2664,7 +2692,7 @@ msgstr "hindi mapadala ang non-None value sa isang kaka umpisang generator" msgid "can't set 512 block size" msgstr "" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "hindi ma i-set ang attribute" @@ -3852,39 +3880,6 @@ msgstr "pow() 3rd argument ay hindi maaring 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() na may 3 argumento kailangan ng integers" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "" @@ -4407,6 +4402,12 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "To exit, please reset the board without " +#~ msgstr "Para lumabas, paki-reset ang board na wala ang " + +#~ msgid "You requested starting safe mode by " +#~ msgstr "Ikaw ang humiling sa safe mode sa pamamagitan ng " + #~ msgid "Stream missing readinto() or write() method." #~ msgstr "Stream kulang ng readinto() o write() method." diff --git a/locale/fr.po b/locale/fr.po index 19278499dd..9eb7bba7bd 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -601,6 +601,13 @@ msgstr "L'appareil de démarrage doit être le premier (interface #0)." msgid "Both RX and TX required for flow control" msgstr "RX et TX requis pour le contrôle de flux" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "Les deux broches doivent supporter les interruptions matérielles" @@ -666,6 +673,11 @@ msgstr "Les tampons doivent avoir la même taille" msgid "Bus pin %d is already in use" msgstr "La broche %d du bus est déjà utilisée" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "Le tampon doit être de 16 octets." @@ -2048,6 +2060,10 @@ msgstr "L'entrée du système doit être gnss.SatelliteSystem" msgid "Temperature read timed out" msgstr "Délais de lecture de température dépassée" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" @@ -2056,6 +2072,14 @@ msgstr "" "La pile de CircuitPython est corrompue parce que la pile était trop petite.\n" "Augmentez la taille de la pile si vous savez comment. Sinon :" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " @@ -2064,6 +2088,14 @@ msgstr "" "Le module `microcontroller` a été utilisé pour démarrer en mode sûr. Pressez " "reset pour quitter le mode sûr." +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "La taille de rgb_pins doit être 6, 12, 18, 24 ou 30" @@ -2131,8 +2163,8 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "Le délai est trop long : le délai maximal est de %d secondes" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Pour quitter, SVP redémarrez la carte sans " +msgid "To exit, please reset the board without requesting safe mode." +msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample" @@ -2446,10 +2478,6 @@ msgstr "" "Vous avez pressé le bouton reset pendant le démarrage. Pressez-le à nouveau " "pour sortir du mode sûr." -#: supervisor/shared/safe_mode.c -msgid "You requested starting safe mode by " -msgstr "Vous avez demandé à démarrer en mode sans-échec par " - #: py/objtype.c msgid "__init__() should return None" msgstr "__init__() doit retourner None" @@ -2746,7 +2774,7 @@ msgstr "" msgid "can't set 512 block size" msgstr "impossible de définir une taille de bloc de 512" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "attribut non modifiable" @@ -3941,39 +3969,6 @@ msgstr "le 3e argument de pow() ne peut être 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() avec 3 arguments nécessite des entiers" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "presser le bouton BOOT au démarrage.\n" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "presser le bouton SW38 au démarrage.\n" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "presser le bouton VOLUME au démarrage.\n" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "bouton boot appuyé lors du démarrage.\n" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "les deux boutons appuyés lors du démarrage.\n" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "appuyer le bouton de gauche au démarage\n" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "masque pull est en conflit avec les masques de direction" @@ -4495,6 +4490,30 @@ 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 "To exit, please reset the board without " +#~ msgstr "Pour quitter, SVP redémarrez la carte sans " + +#~ msgid "You requested starting safe mode by " +#~ msgstr "Vous avez demandé à démarrer en mode sans-échec par " + +#~ msgid "pressing BOOT button at start up.\n" +#~ msgstr "presser le bouton BOOT au démarrage.\n" + +#~ msgid "pressing SW38 button at start up.\n" +#~ msgstr "presser le bouton SW38 au démarrage.\n" + +#~ msgid "pressing VOLUME button at start up.\n" +#~ msgstr "presser le bouton VOLUME au démarrage.\n" + +#~ msgid "pressing boot button at start up.\n" +#~ msgstr "bouton boot appuyé lors du démarrage.\n" + +#~ msgid "pressing both buttons at start up.\n" +#~ msgstr "les deux boutons appuyés lors du démarrage.\n" + +#~ msgid "pressing the left button at start up\n" +#~ msgstr "appuyer le bouton de gauche au démarage\n" + #~ msgid "Only one TouchAlarm can be set in deep sleep." #~ msgstr "Seulement une TouchAlarm peu être réglée en sommeil profond." diff --git a/locale/hi.po b/locale/hi.po index b2a6d4e25a..cde333382b 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -583,6 +583,13 @@ msgstr "" msgid "Both RX and TX required for flow control" msgstr "" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "" @@ -648,6 +655,11 @@ msgstr "" msgid "Bus pin %d is already in use" msgstr "" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "" @@ -1975,18 +1987,38 @@ msgstr "" msgid "Temperature read timed out" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" @@ -2047,7 +2079,7 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " +msgid "To exit, please reset the board without requesting safe mode." msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c @@ -2345,10 +2377,6 @@ 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 " -msgstr "" - #: py/objtype.c msgid "__init__() should return None" msgstr "" @@ -2642,7 +2670,7 @@ msgstr "" msgid "can't set 512 block size" msgstr "" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "" @@ -3815,39 +3843,6 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "" diff --git a/locale/it_IT.po b/locale/it_IT.po index ec9b5a055d..dc688a83a9 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -595,6 +595,13 @@ msgstr "" msgid "Both RX and TX required for flow control" msgstr "Sia RX che TX richiedono il controllo del flow" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "Entrambi i pin devono supportare gli interrupt hardware" @@ -660,6 +667,11 @@ msgstr "" msgid "Bus pin %d is already in use" msgstr "Bus pin %d è già in uso" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "I buffer byte devono essere di almeno 16 bytes." @@ -2002,18 +2014,38 @@ msgstr "" msgid "Temperature read timed out" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" @@ -2074,8 +2106,8 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Per uscire resettare la scheda senza " +msgid "To exit, please reset the board without requesting safe mode." +msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample" @@ -2374,10 +2406,6 @@ 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 " -msgstr "È stato richiesto l'avvio in modalità sicura da " - #: py/objtype.c msgid "__init__() should return None" msgstr "__init__() deve ritornare None" @@ -2675,7 +2703,7 @@ msgstr "" msgid "can't set 512 block size" msgstr "" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "impossibile impostare attributo" @@ -3865,39 +3893,6 @@ msgstr "il terzo argomento di pow() non può essere 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() con 3 argomenti richiede interi" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "" @@ -4420,6 +4415,12 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "To exit, please reset the board without " +#~ msgstr "Per uscire resettare la scheda senza " + +#~ msgid "You requested starting safe mode by " +#~ msgstr "È stato richiesto l'avvio in modalità sicura da " + #~ msgid "Stream missing readinto() or write() method." #~ msgstr "Metodi mancanti readinto() o write() allo stream." diff --git a/locale/ja.po b/locale/ja.po index 5515942cf3..3d3b5ef16c 100644 --- a/locale/ja.po +++ b/locale/ja.po @@ -590,6 +590,13 @@ msgstr "" msgid "Both RX and TX required for flow control" msgstr "フロー制御のためRXとTXの両方が必要" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "両方のピンにハードウェア割り込み対応が必要" @@ -655,6 +662,11 @@ msgstr "" msgid "Bus pin %d is already in use" msgstr "Busピン%dはすでに使用中" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "バッファは16バイトでなければなりません" @@ -1988,18 +2000,38 @@ msgstr "system引数はgnss.SatelliteSystemでなければなりません" msgid "Temperature read timed out" msgstr "温度読み取りがタイムアウトしました" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" @@ -2060,7 +2092,7 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "タイムアウトが長すぎです。最大のタイムアウト長は%d秒" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " +msgid "To exit, please reset the board without requesting safe mode." msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c @@ -2359,10 +2391,6 @@ 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 " -msgstr "" - #: py/objtype.c msgid "__init__() should return None" msgstr "" @@ -2656,7 +2684,7 @@ msgstr "" msgid "can't set 512 block size" msgstr "" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "" @@ -3836,39 +3864,6 @@ msgstr "pow()の3つ目の引数は0にできません" msgid "pow() with 3 arguments requires integers" msgstr "pow()の第3引数には整数が必要" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "" diff --git a/locale/ko.po b/locale/ko.po index f266fa6499..88c8b4d3c6 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -586,6 +586,13 @@ msgstr "" msgid "Both RX and TX required for flow control" msgstr "" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "" @@ -651,6 +658,11 @@ msgstr "" msgid "Bus pin %d is already in use" msgstr "" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "잘못된 크기의 버퍼. 16 바이트 여야합니다." @@ -1978,18 +1990,38 @@ msgstr "" msgid "Temperature read timed out" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" @@ -2050,7 +2082,7 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " +msgid "To exit, please reset the board without requesting safe mode." msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c @@ -2349,10 +2381,6 @@ 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 " -msgstr "" - #: py/objtype.c msgid "__init__() should return None" msgstr "" @@ -2646,7 +2674,7 @@ msgstr "" msgid "can't set 512 block size" msgstr "" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "" @@ -3819,39 +3847,6 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "" diff --git a/locale/nl.po b/locale/nl.po index 6ffae54cb5..69747fb971 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -588,6 +588,13 @@ msgstr "" msgid "Both RX and TX required for flow control" msgstr "RX en TX zijn beide vereist voor stroomregeling" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "Beide pinnen moeten hardware interrupts ondersteunen" @@ -653,6 +660,11 @@ msgstr "" msgid "Bus pin %d is already in use" msgstr "Bus pin %d al in gebruik" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "Byte buffer moet 16 bytes zijn." @@ -1999,18 +2011,38 @@ msgstr "Systeem invoer moet gnss.SatelliteSystem zijn" msgid "Temperature read timed out" msgstr "Temperatuur lees time-out" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "De lengte van rgb_pins moet 6, 12, 18, 24 of 30 zijn" @@ -2071,8 +2103,8 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "Time-out is te lang. Maximale time-out lengte is %d seconden" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Om te beëindigen, reset het bord zonder " +msgid "To exit, please reset the board without requesting safe mode." +msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample" @@ -2375,10 +2407,6 @@ 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 " -msgstr "Je hebt aangeven de veilige modus te starten door " - #: py/objtype.c msgid "__init__() should return None" msgstr "__init __() zou None moeten retourneren" @@ -2673,7 +2701,7 @@ msgstr "kan geen niet-'None' waarde naar een net gestartte generator sturen" msgid "can't set 512 block size" msgstr "kan geen 512 blokgrootte instellen" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "kan attribute niet instellen" @@ -3852,39 +3880,6 @@ msgstr "derde argument van pow() mag geen 0 zijn" msgid "pow() with 3 arguments requires integers" msgstr "pow() met 3 argumenten vereist integers" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "druk bootknop in bij opstarten.\n" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "druk beide knoppen in bij opstarten.\n" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "" @@ -4405,6 +4400,18 @@ 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 "To exit, please reset the board without " +#~ msgstr "Om te beëindigen, reset het bord zonder " + +#~ msgid "You requested starting safe mode by " +#~ msgstr "Je hebt aangeven de veilige modus te starten door " + +#~ msgid "pressing boot button at start up.\n" +#~ msgstr "druk bootknop in bij opstarten.\n" + +#~ msgid "pressing both buttons at start up.\n" +#~ msgstr "druk beide knoppen in bij opstarten.\n" + #~ msgid "Firmware image is invalid" #~ msgstr "Firmware image is ongeldig" diff --git a/locale/pl.po b/locale/pl.po index 197160d073..200a3eda99 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -590,6 +590,13 @@ msgstr "" msgid "Both RX and TX required for flow control" msgstr "Do kontroli przepływu wymagane są zarówno RX, jak i TX" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "Obie nóżki muszą wspierać przerwania sprzętowe" @@ -655,6 +662,11 @@ msgstr "" msgid "Bus pin %d is already in use" msgstr "Nóżka magistrali %d jest w użyciu" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "Bufor musi mieć 16 bajtów." @@ -1986,18 +1998,38 @@ msgstr "" msgid "Temperature read timed out" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" @@ -2058,8 +2090,8 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "By wyjść, proszę zresetować płytkę bez " +msgid "To exit, please reset the board without requesting safe mode." +msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample" @@ -2356,10 +2388,6 @@ 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 " -msgstr "Zażądano trybu bezpieczeństwa przez " - #: py/objtype.c msgid "__init__() should return None" msgstr "__init__() powinien zwracać None" @@ -2653,7 +2681,7 @@ msgstr "świeżo stworzony generator może tylko przyjąć None" msgid "can't set 512 block size" msgstr "" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "nie można ustawić atrybutu" @@ -3828,39 +3856,6 @@ msgstr "trzeci argument pow() nie może być 0" msgid "pow() with 3 arguments requires integers" msgstr "trzyargumentowe pow() wymaga liczb całkowitych" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "" @@ -4381,6 +4376,12 @@ msgstr "" msgid "zi must be of shape (n_section, 2)" msgstr "" +#~ msgid "To exit, please reset the board without " +#~ msgstr "By wyjść, proszę zresetować płytkę bez " + +#~ msgid "You requested starting safe mode by " +#~ msgstr "Zażądano trybu bezpieczeństwa przez " + #~ msgid "Stream missing readinto() or write() method." #~ msgstr "Strumień nie ma metod readinto() lub write()." diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 99780d894b..9aea2605f2 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: 2022-10-22 18:28+0000\n" +"PO-Revision-Date: 2022-10-29 22:00+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -603,6 +603,13 @@ msgstr "" msgid "Both RX and TX required for flow control" msgstr "Ambos os RX e TX são necessários para o controle do fluxo" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "Ambos os pinos devem suportar interrupções de hardware" @@ -668,6 +675,11 @@ msgstr "Os buffers devem ter o mesmo tamanho" msgid "Bus pin %d is already in use" msgstr "O pino bus %d já está em uso" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "O buffer deve ter 16 bytes." @@ -2031,6 +2043,10 @@ msgstr "A entrada no sistema deve ser gnss.SatelliteSystem" msgid "Temperature read timed out" msgstr "A leitura da temperatura expirou" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" @@ -2040,6 +2056,14 @@ msgstr "" "corrompido pois a pilha era muito pequena.\n" "Aumente o tamanho da pilha se souber como. Senão:" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " @@ -2048,6 +2072,14 @@ msgstr "" "O módulo `microcontrolador` foi utilizado para iniciar em modo seguro. " "Pressione reset para encerrar do modo de segurança." +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "O comprimento dos rgb_pins devem ser 6, 12, 18, 24, ou 30" @@ -2116,8 +2148,8 @@ msgstr "" "segundos" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Para sair, por favor, reinicie a placa sem " +msgid "To exit, please reset the board without requesting safe mode." +msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample" @@ -2428,10 +2460,6 @@ 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 " -msgstr "Você solicitou o início do modo de segurança através do " - #: py/objtype.c msgid "__init__() should return None" msgstr "O __init__() deve retornar Nenhum" @@ -2727,7 +2755,7 @@ msgstr "" msgid "can't set 512 block size" msgstr "não é possível definir o tamanho de 512 blocos" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "não é possível definir o atributo" @@ -3920,39 +3948,6 @@ msgstr "O terceiro argumento pow() não pode ser 0" msgid "pow() with 3 arguments requires integers" msgstr "o pow() com 3 argumentos requer números inteiros" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "pressionando o botão BOOT na inicialização.\n" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "pressionando o botão SW38 na inicialização.\n" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "pressionando o botão VOLUME na inicialização.\n" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "pressionando o botão de boot na inicialização.\n" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "pressionando ambos os botões durante a inicialização.\n" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "pressionando o botão esquerdo durante a inicialização\n" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "puxe as máscaras em conflito com as máscaras de direção" @@ -4473,6 +4468,36 @@ 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 "To exit, please reset the board without " +#~ msgstr "Para sair, por favor, reinicie a placa sem " + +#~ msgid "You requested starting safe mode by " +#~ msgstr "Você solicitou o início do modo de segurança através do " + +#~ msgid "pressing BOOT button at start up.\n" +#~ msgstr "pressionando o botão BOOT na inicialização.\n" + +#~ msgid "pressing SW38 button at start up.\n" +#~ msgstr "pressionando o botão SW38 na inicialização.\n" + +#~ msgid "pressing VOLUME button at start up.\n" +#~ msgstr "pressionando o botão VOLUME na inicialização.\n" + +#~ msgid "pressing boot button at start up.\n" +#~ msgstr "pressionando o botão de boot na inicialização.\n" + +#~ msgid "pressing both buttons at start up.\n" +#~ msgstr "pressionando ambos os botões durante a inicialização.\n" + +#~ msgid "pressing central button at start up.\n" +#~ msgstr "pressionando o botão central na inicialização.\n" + +#~ msgid "pressing button A at start up.\n" +#~ msgstr "pressionando o botão A na inicialização.\n" + +#~ msgid "pressing the left button at start up\n" +#~ msgstr "pressionando o botão esquerdo durante a inicialização\n" + #~ msgid "Only one TouchAlarm can be set in deep sleep." #~ msgstr "Apenas um TouchAlarm pode ser colocado em deep sleep." diff --git a/locale/ru.po b/locale/ru.po index 95584e73be..cb9f3616ec 100644 --- a/locale/ru.po +++ b/locale/ru.po @@ -597,6 +597,13 @@ msgstr "Загрузочное устройство должно быть пер msgid "Both RX and TX required for flow control" msgstr "Для управления потоком требуется как RX, так и TX" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "Оба пина должны поддерживать аппаратные прерывания" @@ -662,6 +669,11 @@ msgstr "Буферы должны быть одинакового размера msgid "Bus pin %d is already in use" msgstr "Пин шины %d уже используется" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "Буфер байтов должен быть размером 16 байтам." @@ -2022,18 +2034,38 @@ msgstr "" msgid "Temperature read timed out" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "Длина rgb_pins должна быть 6, 12, 18, 24 или 30" @@ -2096,7 +2128,7 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " +msgid "To exit, please reset the board without requesting safe mode." msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c @@ -2394,10 +2426,6 @@ 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 " -msgstr "" - #: py/objtype.c msgid "__init__() should return None" msgstr "" @@ -2691,7 +2719,7 @@ msgstr "" msgid "can't set 512 block size" msgstr "" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "" @@ -3864,39 +3892,6 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "" diff --git a/locale/sv.po b/locale/sv.po index 3d42373ca9..b1737876f1 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: 2022-10-22 18:28+0000\n" +"PO-Revision-Date: 2022-10-29 22:00+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -595,6 +595,13 @@ msgstr "Startenheten måste vara den första enheten (gränssnitt #0)." msgid "Both RX and TX required for flow control" msgstr "Både RX och TX krävs för handskakning" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "Båda pinnarna måste stödja maskinvaruavbrott" @@ -660,6 +667,11 @@ msgstr "Buffertarna måste ha samma storlek" msgid "Bus pin %d is already in use" msgstr "Busspinne %d används redan" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "Byte-buffert måste vara 16 byte." @@ -2010,6 +2022,10 @@ msgstr "Systeminträdet måste vara gnss. SatellitSystem" msgid "Temperature read timed out" msgstr "Temperaturavläsning tog för lång tid" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" @@ -2018,6 +2034,14 @@ msgstr "" "CircuitPython-heapen blev korrupt eftersom stacken är för liten.\n" "Öka stackstorleken om du vet hur, eller om inte:" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " @@ -2026,6 +2050,14 @@ 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." +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "Längden på rgb_pins vara 6, 12, 18, 24 eller 30" @@ -2092,8 +2124,8 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "Åtgärden tog för lång tid: Max väntetid är %d sekunder" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "För att avsluta, gör reset på kortet utan " +msgid "To exit, please reset the board without requesting safe mode." +msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample" @@ -2400,10 +2432,6 @@ 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 " -msgstr "Du begärt att starta i felsäkert läge genom att " - #: py/objtype.c msgid "__init__() should return None" msgstr "__init __() ska returnera None" @@ -2697,7 +2725,7 @@ msgstr "kan inte skicka icke-None värde till nystartad generator" msgid "can't set 512 block size" msgstr "kan inte sätta blockstorlek 512" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "kan inte att ange attribut" @@ -3881,39 +3909,6 @@ msgstr "pow() 3: e argument kan inte vara 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() med 3 argument kräver heltal" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "genom att trycka på BOOT-knappen vid start.\n" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "genom att trycka på SW38-knappen vid start.\n" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "genom att trycka på VOLUME-knappen vid start.\n" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "trycka på startknappen vid start.\n" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "trycka båda knapparna vid uppstart.\n" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "håll ner vänster knapp vid start\n" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "pull-mask är i konflikt med riktnings-mask" @@ -4434,6 +4429,36 @@ 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 "To exit, please reset the board without " +#~ msgstr "För att avsluta, gör reset på kortet utan " + +#~ msgid "You requested starting safe mode by " +#~ msgstr "Du begärt att starta i felsäkert läge genom att " + +#~ msgid "pressing BOOT button at start up.\n" +#~ msgstr "genom att trycka på BOOT-knappen vid start.\n" + +#~ msgid "pressing SW38 button at start up.\n" +#~ msgstr "genom att trycka på SW38-knappen vid start.\n" + +#~ msgid "pressing VOLUME button at start up.\n" +#~ msgstr "genom att trycka på VOLUME-knappen vid start.\n" + +#~ msgid "pressing boot button at start up.\n" +#~ msgstr "genom att trycka på startknappen vid start.\n" + +#~ msgid "pressing both buttons at start up.\n" +#~ msgstr "genom att trycka båda knapparna vid uppstart.\n" + +#~ msgid "pressing central button at start up.\n" +#~ msgstr "trycka på mittknappen vid start.\n" + +#~ msgid "pressing button A at start up.\n" +#~ msgstr "genom att tryck på knappen A vid start.\n" + +#~ msgid "pressing the left button at start up\n" +#~ msgstr "genom att håll ner vänster knapp vid start\n" + #~ msgid "Only one TouchAlarm can be set in deep sleep." #~ msgstr "Endast ett TouchAlarm kan ställas in för djupsömn." diff --git a/locale/tr.po b/locale/tr.po index 64fa3ba5b3..ae8844521d 100644 --- a/locale/tr.po +++ b/locale/tr.po @@ -599,6 +599,13 @@ msgstr "Önyükleme cihazı ilk cihaz olmalı (arayüz #0)." msgid "Both RX and TX required for flow control" msgstr "Hem RX hem de TX akış kontrolü için gerekli" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "" @@ -664,6 +671,11 @@ msgstr "Arabellek boyutları aynı olmalı" msgid "Bus pin %d is already in use" msgstr "Veriyolu pini %d kullanımda" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "Bit buffer'ı 16bit olmalı." @@ -1995,18 +2007,38 @@ msgstr "" msgid "Temperature read timed out" msgstr "" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" "Increase the stack size if you know how. If not:" msgstr "" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " "exit safe mode." msgstr "" +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "" @@ -2067,7 +2099,7 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " +msgid "To exit, please reset the board without requesting safe mode." msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c @@ -2365,10 +2397,6 @@ 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 " -msgstr "" - #: py/objtype.c msgid "__init__() should return None" msgstr "" @@ -2662,7 +2690,7 @@ msgstr "" msgid "can't set 512 block size" msgstr "" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "" @@ -3835,39 +3863,6 @@ msgstr "" msgid "pow() with 3 arguments requires integers" msgstr "" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 52c96b9c0b..6cf446c792 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -596,6 +596,13 @@ msgstr "yǐndǎo shèbèi bìxū shì dìyī tái shèbèi (interface #0)." msgid "Both RX and TX required for flow control" msgstr "RX hé TX dōu xū yào liúliàng kòngzhì" +#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h +msgid "Both buttons were pressed at start up.\n" +msgstr "" + #: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c msgid "Both pins must support hardware interrupts" msgstr "liǎnggè yǐnjiǎo dōu bìxū zhīchí yìngjiàn zhōngduàn" @@ -661,6 +668,11 @@ msgstr "huǎnchōng qū bìxū dàxiǎo xiāngtóng" msgid "Bus pin %d is already in use" msgstr "Zǒngxiàn yǐnjiǎo %d yǐjīng zài shǐyòng zhōng" +#: ports/espressif/boards/m5stack_core_basic/mpconfigboard.h +#: ports/espressif/boards/m5stack_core_fire/mpconfigboard.h +msgid "Button A was pressed at start up.\n" +msgstr "" + #: shared-bindings/_bleio/UUID.c msgid "Byte buffer must be 16 bytes." msgstr "Zìjié huǎnchōng qū bìxū shì 16 zìjié." @@ -2014,6 +2026,10 @@ msgstr "Xìtǒng tiáomù bìxū shì gnss.SatelliteSystem" msgid "Temperature read timed out" msgstr "Wēndù dòu qǔ chāoshí" +#: supervisor/shared/safe_mode.c +msgid "The BOOT button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The CircuitPython heap was corrupted because the stack was too small.\n" @@ -2022,6 +2038,14 @@ msgstr "" "diàn lù dàn duī bèi sǔn huài, yīn wéi duī zhàn tài xiǎo.\n" "rú guǒ nín zhī dào rú hé zēng jiā duī zhàn dà xiǎo. rú guǒ méi yǒu:" +#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +msgid "The SW38 button was pressed at start up.\n" +msgstr "" + +#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +msgid "The VOLUME button was pressed at start up.\n" +msgstr "" + #: supervisor/shared/safe_mode.c msgid "" "The `microcontroller` module was used to boot into safe mode. Press reset to " @@ -2030,6 +2054,14 @@ msgstr "" "`wēi kòng zhì qì` mó kuài yòng yú qǐ dòng dào ān quán mó shì. àn chóng zhì " "tuì chū ān quán mó shì." +#: ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h +msgid "The central button was pressed at start up.\n" +msgstr "" + +#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h +msgid "The left button was pressed at start up.\n" +msgstr "" + #: shared-bindings/rgbmatrix/RGBMatrix.c msgid "The length of rgb_pins must be 6, 12, 18, 24, or 30" msgstr "Rgb_pins de chángdù bìxū wèi 6,12,18,24 huò 30" @@ -2095,8 +2127,8 @@ msgid "Timeout is too long: Maximum timeout length is %d seconds" msgstr "Chāoshí shíjiān tài zhǎng: Zuìdà chāoshí shíjiān wèi%d miǎo" #: supervisor/shared/safe_mode.c -msgid "To exit, please reset the board without " -msgstr "Yào tuìchū, qǐng chóng zhì bǎnkuài ér bùyòng " +msgid "To exit, please reset the board without requesting safe mode." +msgstr "" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample" @@ -2403,10 +2435,6 @@ msgstr "" "zài qǐ dòng guò chéng zhōng, nín àn xià le chóng zhì àn niǔ. zài cì àn xià " "yǐ tuì chū ān quán mó shì." -#: supervisor/shared/safe_mode.c -msgid "You requested starting safe mode by " -msgstr "Nín qǐngqiú qǐdòng ānquán móshì " - #: py/objtype.c msgid "__init__() should return None" msgstr "__init__() fǎnhuí not" @@ -2700,7 +2728,7 @@ msgstr "wúfǎ xiàng gānggāng qǐdòng de shēngchéng qì fāsòng fēi zhí msgid "can't set 512 block size" msgstr "wúfǎ shèzhì 512 kuài dàxiǎo" -#: py/objnamedtuple.c +#: py/objexcept.c py/objnamedtuple.c msgid "can't set attribute" msgstr "wúfǎ shèzhì shǔxìng" @@ -3880,39 +3908,6 @@ msgstr "pow() 3 cān shǔ bùnéng wéi 0" msgid "pow() with 3 arguments requires integers" msgstr "pow() yǒu 3 cānshù xūyào zhěngshù" -#: ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h -msgid "pressing BOOT button at start up.\n" -msgstr "zài qǐdòng shí àn BOOT ànniǔ.\n" - -#: ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h -msgid "pressing SW38 button at start up.\n" -msgstr "zài qǐdòng shí àn SW38 ànniǔ.\n" - -#: ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h -msgid "pressing VOLUME button at start up.\n" -msgstr "zài qǐdòng shí àn SW38 ànniǔ.\n" - -#: ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h -#: ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h -#: ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h -#: ports/espressif/boards/lolin_c3_mini/mpconfigboard.h -#: ports/espressif/boards/microdev_micro_c3/mpconfigboard.h -#: supervisor/shared/safe_mode.c -msgid "pressing boot button at start up.\n" -msgstr "Zài qǐdòng shí àn qǐdòng ànniǔ.\n" - -#: ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h -#: ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h -#: ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h -#: ports/atmel-samd/boards/meowmeow/mpconfigboard.h -msgid "pressing both buttons at start up.\n" -msgstr "zài qǐdòng shí tóngshí àn xià liǎng gè ànniǔ.\n" - -#: ports/nrf/boards/aramcon2_badge/mpconfigboard.h -msgid "pressing the left button at start up\n" -msgstr "qǐ dòng shí àn xià zuǒ àn niǔ\n" - #: ports/raspberrypi/common-hal/rp2pio/StateMachine.c msgid "pull masks conflict with direction masks" msgstr "lā kǒu zhào yǔ fāng xiàng miàn mó chōng tū" @@ -4436,6 +4431,30 @@ 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 "To exit, please reset the board without " +#~ msgstr "Yào tuìchū, qǐng chóng zhì bǎnkuài ér bùyòng " + +#~ msgid "You requested starting safe mode by " +#~ msgstr "Nín qǐngqiú qǐdòng ānquán móshì " + +#~ msgid "pressing BOOT button at start up.\n" +#~ msgstr "zài qǐdòng shí àn BOOT ànniǔ.\n" + +#~ msgid "pressing SW38 button at start up.\n" +#~ msgstr "zài qǐdòng shí àn SW38 ànniǔ.\n" + +#~ msgid "pressing VOLUME button at start up.\n" +#~ msgstr "zài qǐdòng shí àn SW38 ànniǔ.\n" + +#~ msgid "pressing boot button at start up.\n" +#~ msgstr "Zài qǐdòng shí àn qǐdòng ànniǔ.\n" + +#~ msgid "pressing both buttons at start up.\n" +#~ msgstr "zài qǐdòng shí tóngshí àn xià liǎng gè ànniǔ.\n" + +#~ msgid "pressing the left button at start up\n" +#~ msgstr "qǐ dòng shí àn xià zuǒ àn niǔ\n" + #~ msgid "Only one TouchAlarm can be set in deep sleep." #~ msgstr "zhǐ yǒu yí gè chù mō bì kě yǐ shè zhì zài shēn dù shuì mián." diff --git a/main.c b/main.c index 06ca1ba93b..10fdc65224 100644 --- a/main.c +++ b/main.c @@ -132,7 +132,7 @@ static void reset_devices(void) { #endif } -STATIC void start_mp(supervisor_allocation *heap, bool first_run) { +STATIC void start_mp(supervisor_allocation *heap) { supervisor_workflow_reset(); // Stack limit should be less than real stack size, so we have a chance @@ -176,14 +176,6 @@ STATIC void start_mp(supervisor_allocation *heap, bool first_run) { mp_obj_list_append(mp_sys_path, MP_OBJ_NEW_QSTR(MP_QSTR__slash_lib)); mp_obj_list_init((mp_obj_list_t *)mp_sys_argv, 0); - - #if CIRCUITPY_ALARM - // Record which alarm woke us up, if any. An object may be created so the heap must be functional. - // There is no alarm if this is not the first time code.py or the REPL has been run. - shared_alarm_save_wake_alarm(first_run ? common_hal_alarm_create_wake_alarm() : mp_const_none); - // Reset alarm module only after we retrieved the wakeup alarm. - alarm_reset(); - #endif } STATIC void stop_mp(void) { @@ -373,7 +365,7 @@ STATIC void print_code_py_status_message(safe_mode_t safe_mode) { } } -STATIC bool run_code_py(safe_mode_t safe_mode, bool first_run, bool *simulate_reset) { +STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) { bool serial_connected_at_start = serial_connected(); bool printed_safe_mode_message = false; #if CIRCUITPY_AUTORELOAD_DELAY_MS > 0 @@ -409,8 +401,8 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool first_run, bool *simulate_re supervisor_allocation *heap = allocate_remaining_memory(); - // Prepare the VM state. Includes an alarm check/reset for sleep. - start_mp(heap, first_run); + // Prepare the VM state. + start_mp(heap); #if CIRCUITPY_USB usb_setup_with_vm(); @@ -755,8 +747,7 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) { supervisor_allocation *heap = allocate_remaining_memory(); - // true means this is the first set of VM's after a hard reset. - start_mp(heap, true); + start_mp(heap); #if CIRCUITPY_USB // Set up default USB values after boot.py VM starts but before running boot.py. @@ -853,12 +844,12 @@ STATIC void __attribute__ ((noinline)) run_boot_py(safe_mode_t safe_mode) { #endif } -STATIC int run_repl(bool first_run) { +STATIC int run_repl(void) { int exit_code = PYEXEC_FORCED_EXIT; stack_resize(); filesystem_flush(); supervisor_allocation *heap = allocate_remaining_memory(); - start_mp(heap, first_run); + start_mp(heap); #if CIRCUITPY_USB usb_setup_with_vm(); @@ -968,6 +959,15 @@ int __attribute__((used)) main(void) { safe_mode = NO_CIRCUITPY; } + #if CIRCUITPY_ALARM + // Record which alarm woke us up, if any. + // common_hal_alarm_record_wake_alarm() should return a static, non-heap object + shared_alarm_save_wake_alarm(common_hal_alarm_record_wake_alarm()); + // Then reset the alarm system. It's not reset in reset_port(), because that's also called + // on VM teardown, which would clear any alarm setup. + alarm_reset(); + #endif + // Reset everything and prep MicroPython to run boot.py. reset_port(); // Port-independent devices, like CIRCUITPY_BLEIO_HCI. @@ -1001,20 +1001,21 @@ int __attribute__((used)) main(void) { // Boot script is finished, so now go into REPL or run code.py. int exit_code = PYEXEC_FORCED_EXIT; bool skip_repl = true; - bool first_run = true; - bool simulate_reset; + bool simulate_reset = true; for (;;) { - simulate_reset = false; if (!skip_repl) { - exit_code = run_repl(first_run); + exit_code = run_repl(); supervisor_set_run_reason(RUN_REASON_REPL_RELOAD); } if (exit_code == PYEXEC_FORCED_EXIT) { - if (!first_run) { + if (!simulate_reset) { serial_write_compressed(translate("soft reboot\n")); } if (pyexec_mode_kind == PYEXEC_MODE_FRIENDLY_REPL) { - skip_repl = run_code_py(safe_mode, first_run, &simulate_reset); + // If code.py did a fake deep sleep, pretend that we + // are running code.py for the first time after a hard + // reset. This will preserve any alarm information. + skip_repl = run_code_py(safe_mode, &simulate_reset); } else { skip_repl = false; } @@ -1022,10 +1023,10 @@ int __attribute__((used)) main(void) { break; } - // Either the REPL or code.py has run and finished. - // If code.py did a fake deep sleep, pretend that we are running code.py for - // the first time after a hard reset. This will preserve any alarm information. - first_run = simulate_reset; + #if CIRCUITPY_ALARM + shared_alarm_save_wake_alarm(simulate_reset ? common_hal_alarm_record_wake_alarm() : mp_const_none); + alarm_reset(); + #endif } mp_deinit(); return 0; diff --git a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h index 9020c243b1..33910221a0 100644 --- a/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.h @@ -23,7 +23,7 @@ #define CALIBRATE_CRYSTALLESS 1 // Explanation of how a user got into safe mode. -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing both buttons at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("Both buttons were pressed at start up.\n") // Increase stack size slightly due to CPX library import nesting #define CIRCUITPY_DEFAULT_STACK_SIZE (4248) // divisible by 8 diff --git a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h index 5073c5e403..7f0e041f25 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express_crickit/mpconfigboard.h @@ -23,7 +23,7 @@ #define CALIBRATE_CRYSTALLESS 1 // Explanation of how a user got into safe mode. -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing both buttons at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("Both buttons were pressed at start up.\n") // Increase stack size slightly due to CPX library import nesting #define CIRCUITPY_DEFAULT_STACK_SIZE (4248) // divisible by 8 diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h index 20cfc617a2..12fd30e005 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.h @@ -23,7 +23,7 @@ #define CALIBRATE_CRYSTALLESS 1 // Explanation of how a user got into safe mode. -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing both buttons at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("Both buttons were pressed at start up.\n") // Increase stack size slightly due to CPX library import nesting. #define CIRCUITPY_DEFAULT_STACK_SIZE (4248) // divisible by 8 diff --git a/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h b/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h index bb99c412ae..1886f9e233 100644 --- a/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h +++ b/ports/atmel-samd/boards/escornabot_makech/mpconfigboard.h @@ -5,9 +5,6 @@ #define CALIBRATE_CRYSTALLESS 1 -// Explanation of how a user got into safe mode. -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing both buttons at start up.\n") - #define DEFAULT_I2C_BUS_SCL (&pin_PA08) #define DEFAULT_I2C_BUS_SDA (&pin_PA09) diff --git a/ports/atmel-samd/boards/meowmeow/mpconfigboard.h b/ports/atmel-samd/boards/meowmeow/mpconfigboard.h index 73853dab5d..ad6901230f 100644 --- a/ports/atmel-samd/boards/meowmeow/mpconfigboard.h +++ b/ports/atmel-samd/boards/meowmeow/mpconfigboard.h @@ -6,7 +6,7 @@ #define CALIBRATE_CRYSTALLESS 1 // Explanation of how a user got into safe mode. -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing both buttons at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("Both buttons were pressed at start up.\n") #define DEFAULT_I2C_BUS_SCL (&pin_PA01) #define DEFAULT_I2C_BUS_SDA (&pin_PA00) diff --git a/ports/atmel-samd/common-hal/alarm/SleepMemory.h b/ports/atmel-samd/common-hal/alarm/SleepMemory.h index 5fad5946e2..14848cd5a0 100644 --- a/ports/atmel-samd/common-hal/alarm/SleepMemory.h +++ b/ports/atmel-samd/common-hal/alarm/SleepMemory.h @@ -24,8 +24,7 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ALARM_SLEEPMEMORY_H -#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ALARM_SLEEPMEMORY_H +#pragma once #include "py/obj.h" @@ -34,5 +33,3 @@ typedef struct { } alarm_sleep_memory_obj_t; extern void alarm_sleep_memory_reset(void); - -#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ALARM_SLEEPMEMORY_H diff --git a/ports/atmel-samd/common-hal/alarm/__init__.c b/ports/atmel-samd/common-hal/alarm/__init__.c index 8f66b3a90c..96d6d9694a 100644 --- a/ports/atmel-samd/common-hal/alarm/__init__.c +++ b/ports/atmel-samd/common-hal/alarm/__init__.c @@ -48,6 +48,10 @@ const alarm_sleep_memory_obj_t alarm_sleep_memory_obj = { }, }; +// Non-heap alarm object recording alarm (if any) that woke up CircuitPython after light or deep sleep. +// This object lives across VM instantiations, so none of these objects can contain references to the heap. +alarm_wake_alarm_union_t alarm_wake_alarm; + void alarm_reset(void) { // Reset the alarm flag alarm_pin_pinalarm_reset(); @@ -57,7 +61,7 @@ void alarm_reset(void) { void alarm_get_wakeup_cause(void) { // Called from rtc_init, just before SWRST of RTC. It is called // at an early stage of main(), to save TAMPID from SWRST. Later, - // common_hal_alarm_create_wake_alarm is called to make a wakeup + // common_hal_alarm_record_wake_alarm is called to make a wakeup // alarm from the deep sleep. TAMPID = RTC->MODE0.TAMPID.reg; @@ -67,7 +71,7 @@ bool common_hal_alarm_woken_from_sleep(void) { return alarm_pin_pinalarm_woke_this_cycle() || alarm_time_timealarm_woke_this_cycle(); } -mp_obj_t common_hal_alarm_create_wake_alarm(void) { +mp_obj_t common_hal_alarm_record_wake_alarm(void) { // Called from main.c on the first start up, just before alarm_reset. // Return a copy of wakeup alarm from deep sleep / fake deep sleep. // In case of fake sleep, status should be left in TimeAlarm/PinAlarm. @@ -76,13 +80,13 @@ mp_obj_t common_hal_alarm_create_wake_alarm(void) { if (alarm_pin_pinalarm_woke_this_cycle()) { TAMPID = RTC->MODE0.TAMPID.reg; RTC->MODE0.TAMPID.reg = TAMPID; // clear register - return alarm_pin_pinalarm_create_wakeup_alarm(TAMPID); + return alarm_pin_pinalarm_record_wake_alarm(TAMPID); } if (alarm_time_timealarm_woke_this_cycle() || (true_deep && TAMPID == 0)) { - return alarm_time_timealarm_create_wakeup_alarm(); + return alarm_time_timealarm_record_wake_alarm(); } if (true_deep) { - return alarm_pin_pinalarm_create_wakeup_alarm(TAMPID); + return alarm_pin_pinalarm_record_wake_alarm(TAMPID); } return mp_const_none; } diff --git a/ports/atmel-samd/common-hal/alarm/__init__.h b/ports/atmel-samd/common-hal/alarm/__init__.h index 061775e568..3094811c27 100644 --- a/ports/atmel-samd/common-hal/alarm/__init__.h +++ b/ports/atmel-samd/common-hal/alarm/__init__.h @@ -24,10 +24,11 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ALARM__INIT__H -#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ALARM__INIT__H +#pragma once #include "common-hal/alarm/SleepMemory.h" +#include "common-hal/alarm/pin/PinAlarm.h" +#include "common-hal/alarm/time/TimeAlarm.h" extern const alarm_sleep_memory_obj_t alarm_sleep_memory_obj; @@ -53,8 +54,13 @@ typedef enum { SAMD_WAKEUP_RTC } samd_sleep_source_t; -extern void alarm_set_wakeup_reason(samd_sleep_source_t reason); -void alarm_get_wakeup_cause(void); -extern void alarm_reset(void); +typedef union { + alarm_pin_pinalarm_obj_t pin_alarm; + alarm_time_timealarm_obj_t time_alarm; +} alarm_wake_alarm_union_t; -#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ALARM__INIT__H +extern alarm_wake_alarm_union_t alarm_wake_alarm; + +extern void alarm_set_wakeup_reason(samd_sleep_source_t reason); +extern void alarm_get_wakeup_cause(void); +extern void alarm_reset(void); diff --git a/ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c b/ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c index 9289a66a87..dd2509b8c4 100644 --- a/ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c +++ b/ports/atmel-samd/common-hal/alarm/pin/PinAlarm.c @@ -31,9 +31,9 @@ #include "hal/include/hal_gpio.h" // #include +#include "shared-bindings/alarm/__init__.h" #include "shared-bindings/alarm/pin/PinAlarm.h" #include "shared-bindings/microcontroller/__init__.h" -#include "shared-bindings/microcontroller/Pin.h" #include "common-hal/alarm/__init__.h" // This variable stores whether a PinAlarm woke in light sleep or fake deep sleep @@ -128,12 +128,11 @@ mp_obj_t alarm_pin_pinalarm_find_triggered_alarm(size_t n_alarms, const mp_obj_t return mp_const_none; } -mp_obj_t alarm_pin_pinalarm_create_wakeup_alarm(uint32_t TAMPID) { - // Create tamper alarm that caused wakeup from deep sleep +mp_obj_t alarm_pin_pinalarm_record_wake_alarm(uint32_t TAMPID) { + alarm_pin_pinalarm_obj_t *const alarm = &alarm_wake_alarm.pin_alarm; for (samd_tamper_pin_t *t = TAMPER_PINS; t->n >= 0; t++) { if (TAMPID & (1 << t->n)) { - alarm_pin_pinalarm_obj_t *alarm = m_new_obj(alarm_pin_pinalarm_obj_t); alarm->base.type = &alarm_pin_pinalarm_type; alarm->pin = t->pin; return alarm; diff --git a/ports/atmel-samd/common-hal/alarm/pin/PinAlarm.h b/ports/atmel-samd/common-hal/alarm/pin/PinAlarm.h index 57dc7d6c65..ee9ea07b71 100644 --- a/ports/atmel-samd/common-hal/alarm/pin/PinAlarm.h +++ b/ports/atmel-samd/common-hal/alarm/pin/PinAlarm.h @@ -24,12 +24,13 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ALARM_PINALARM_H -#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ALARM_PINALARM_H +#pragma once #include "py/obj.h" #include "py/objtuple.h" +#include "shared-bindings/microcontroller/Pin.h" + typedef struct { mp_obj_base_t base; const mcu_pin_obj_t *pin; @@ -39,7 +40,7 @@ typedef struct { } alarm_pin_pinalarm_obj_t; mp_obj_t alarm_pin_pinalarm_find_triggered_alarm(size_t n_alarms, const mp_obj_t *alarms); -mp_obj_t alarm_pin_pinalarm_create_wakeup_alarm(uint32_t TAMPID); +mp_obj_t alarm_pin_pinalarm_record_wake_alarm(uint32_t TAMPID); void pin_alarm_callback(uint8_t num); void alarm_pin_pinalarm_reset(void); @@ -47,5 +48,3 @@ void alarm_pin_pinalarm_deinit_alarms(size_t n_alarms, const mp_obj_t *alarms); void alarm_pin_pinalarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms); void alarm_pin_pinalarm_prepare_for_deep_sleep(void); bool alarm_pin_pinalarm_woke_this_cycle(void); - -#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ALARM_PINALARM_H diff --git a/ports/atmel-samd/common-hal/alarm/time/TimeAlarm.c b/ports/atmel-samd/common-hal/alarm/time/TimeAlarm.c index 3f116f07e3..2ead87428b 100644 --- a/ports/atmel-samd/common-hal/alarm/time/TimeAlarm.c +++ b/ports/atmel-samd/common-hal/alarm/time/TimeAlarm.c @@ -27,9 +27,9 @@ #include "py/runtime.h" #include "hpl/pm/hpl_pm_base.h" +#include "shared-bindings/alarm/__init__.h" #include "shared-bindings/alarm/time/TimeAlarm.h" #include "shared-bindings/time/__init__.h" -#include "common-hal/alarm/__init__.h" #include "supervisor/port.h" STATIC volatile bool woke_up = false; @@ -58,13 +58,14 @@ mp_obj_t alarm_time_timealarm_find_triggered_alarm(size_t n_alarms, const mp_obj return mp_const_none; } -mp_obj_t alarm_time_timealarm_create_wakeup_alarm(void) { - alarm_time_timealarm_obj_t *timer = m_new_obj(alarm_time_timealarm_obj_t); - timer->base.type = &alarm_time_timealarm_type; +mp_obj_t alarm_time_timealarm_record_wake_alarm(void) { + alarm_time_timealarm_obj_t *const alarm = &alarm_wake_alarm.time_alarm; + + alarm->base.type = &alarm_time_timealarm_type; // TODO: Set monotonic_time based on the RTC state. // Or don't, most of the other ports don't have this either. - timer->monotonic_time = 0.0f; - return timer; + alarm->monotonic_time = 0.0f; + return alarm; } void time_alarm_callback(void) { diff --git a/ports/atmel-samd/common-hal/alarm/time/TimeAlarm.h b/ports/atmel-samd/common-hal/alarm/time/TimeAlarm.h index a6102dee6b..ee517e0236 100644 --- a/ports/atmel-samd/common-hal/alarm/time/TimeAlarm.h +++ b/ports/atmel-samd/common-hal/alarm/time/TimeAlarm.h @@ -24,8 +24,7 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ALARM_TIMEALARM_H -#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ALARM_TIMEALARM_H +#pragma once #include "py/obj.h" @@ -35,12 +34,10 @@ typedef struct { } alarm_time_timealarm_obj_t; mp_obj_t alarm_time_timealarm_find_triggered_alarm(size_t n_alarms, const mp_obj_t *alarms); -mp_obj_t alarm_time_timealarm_create_wakeup_alarm(void); +mp_obj_t alarm_time_timealarm_record_wake_alarm(void); void time_alarm_callback(void); bool alarm_time_timealarm_woke_this_cycle(void); void alarm_time_timealarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms); void alarm_time_timealarm_reset(void); void alarm_time_timealarm_prepare_for_deep_sleep(void); - -#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ALARM_TIMEALARM_H diff --git a/ports/atmel-samd/common-hal/alarm/touch/TouchAlarm.h b/ports/atmel-samd/common-hal/alarm/touch/TouchAlarm.h index d7f0f8cf1d..59f202c69d 100644 --- a/ports/atmel-samd/common-hal/alarm/touch/TouchAlarm.h +++ b/ports/atmel-samd/common-hal/alarm/touch/TouchAlarm.h @@ -24,12 +24,9 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ALARM_TOUCHALARM_H -#define MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ALARM_TOUCHALARM_H +#pragma once typedef struct { mp_obj_base_t base; const mcu_pin_obj_t *pin; } alarm_touch_touchalarm_obj_t; - -#endif // MICROPY_INCLUDED_ATMEL_SAMD_COMMON_HAL_ALARM_TOUCHALARM_H diff --git a/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h b/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h index fc478ef005..b7f2513217 100644 --- a/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_feather_esp32_v2/mpconfigboard.h @@ -47,7 +47,7 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO38) // Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing SW38 button at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("The SW38 button was pressed at start up.\n") // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) diff --git a/ports/espressif/boards/adafruit_metro_esp32s2/pins.c b/ports/espressif/boards/adafruit_metro_esp32s2/pins.c index 0d2777b204..1f024f6e8e 100644 --- a/ports/espressif/boards/adafruit_metro_esp32s2/pins.c +++ b/ports/espressif/boards/adafruit_metro_esp32s2/pins.c @@ -60,8 +60,8 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_OBJ_NEW_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO45) }, { MP_OBJ_NEW_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_RX), MP_ROM_PTR(&pin_GPIO38) }, - { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_TX), MP_ROM_PTR(&pin_GPIO37) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_OBJ_NEW_QSTR(MP_QSTR_DEBUG_TX), MP_ROM_PTR(&pin_GPIO43) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) }, diff --git a/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h b/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h index 42a575aa68..7f8288f17b 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_qtpy_esp32_pico/mpconfigboard.h @@ -41,9 +41,6 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) -// Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing BOOT button at start up.\n") - // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) diff --git a/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h b/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h index 0cc6509647..32b0940881 100644 --- a/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h +++ b/ports/espressif/boards/adafruit_qtpy_esp32c3/mpconfigboard.h @@ -44,7 +44,4 @@ // For entering safe mode #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9) -// Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") - #define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h b/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h index 3b1caff2e9..2cdf48fad3 100644 --- a/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h +++ b/ports/espressif/boards/beetle-esp32-c3/mpconfigboard.h @@ -41,7 +41,4 @@ #define CIRCUITPY_BOARD_UART (1) #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO21, .rx = &pin_GPIO20}} -// Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") - #define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h index 51fb60fe1a..4875dcc745 100644 --- a/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h +++ b/ports/espressif/boards/espressif_esp32s2_devkitc_1_n8r2/mpconfigboard.h @@ -35,5 +35,3 @@ #define DEFAULT_UART_BUS_RX (&pin_GPIO44) #define DEFAULT_UART_BUS_TX (&pin_GPIO43) - -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") diff --git a/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk index c635cdcb56..7ffb076348 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk +++ b/ports/espressif/boards/espressif_esp32s3_box/mpconfigboard.mk @@ -8,3 +8,5 @@ IDF_TARGET = esp32s3 CIRCUITPY_ESP_FLASH_MODE = dio CIRCUITPY_ESP_FLASH_FREQ = 40m CIRCUITPY_ESP_FLASH_SIZE = 16MB + +CIRCUITPY_ESP32_CAMERA = 0 diff --git a/ports/espressif/boards/espressif_esp32s3_box/sdkconfig b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig index 7fcf8ef297..ead0088da5 100644 --- a/ports/espressif/boards/espressif_esp32s3_box/sdkconfig +++ b/ports/espressif/boards/espressif_esp32s3_box/sdkconfig @@ -1,35 +1,11 @@ -CONFIG_ESP32S3_SPIRAM_SUPPORT=y -# -# SPI RAM config -# -# CONFIG_SPIRAM_MODE_QUAD is not set -CONFIG_SPIRAM_MODE_OCT=y -CONFIG_SPIRAM_TYPE_AUTO=y -# CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set -CONFIG_SPIRAM_SIZE=-1 -# end of SPI RAM config - -CONFIG_DEFAULT_PSRAM_CLK_IO=30 -# -# PSRAM Clock and CS IO for ESP32S3 -# -CONFIG_DEFAULT_PSRAM_CS_IO=26 -# end of PSRAM Clock and CS IO for ESP32S3 - -# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set -# CONFIG_SPIRAM_RODATA is not set -CONFIG_SPIRAM_SPEED_80M=y -# CONFIG_SPIRAM_SPEED_40M is not set CONFIG_SPIRAM=y +CONFIG_SPIRAM_MODE_OCT=y +CONFIG_SPIRAM_SPEED_80M=y +CONFIG_SPIRAM_TYPE_AUTO=y + CONFIG_SPIRAM_BOOT_INIT=y -# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set -# CONFIG_SPIRAM_USE_MEMMAP is not set -# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set -CONFIG_SPIRAM_USE_MALLOC=y -CONFIG_SPIRAM_MEMTEST=y -CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=16384 -# CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP is not set -CONFIG_SPIRAM_MALLOC_RESERVE_INTERNAL=32768 +CONFIG_SPIRAM_USE_MEMMAP=y + # # LWIP # diff --git a/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h b/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h index 423890f2e1..7de90b0ae8 100644 --- a/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h +++ b/ports/espressif/boards/hardkernel_odroid_go/mpconfigboard.h @@ -35,7 +35,7 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) // Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing VOLUME button at start up.\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("The VOLUME button was pressed at start up.\n") // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) diff --git a/ports/espressif/boards/lolin_c3_mini/mpconfigboard.h b/ports/espressif/boards/lolin_c3_mini/mpconfigboard.h index 03e4d5d436..2a90d91845 100644 --- a/ports/espressif/boards/lolin_c3_mini/mpconfigboard.h +++ b/ports/espressif/boards/lolin_c3_mini/mpconfigboard.h @@ -45,7 +45,4 @@ #define CIRCUITPY_BOARD_UART (1) #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO21, .rx = &pin_GPIO20}} -// Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") - #define CIRCUITPY_ESP_USB_SERIAL_JTAG (1) diff --git a/ports/espressif/boards/lolin_s3/pins.c b/ports/espressif/boards/lolin_s3/pins.c index cc88572b6e..4bde24788a 100644 --- a/ports/espressif/boards/lolin_s3/pins.c +++ b/ports/espressif/boards/lolin_s3/pins.c @@ -81,9 +81,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_A16), MP_ROM_PTR(&pin_GPIO17) }, { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, - { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO17) }, - { MP_ROM_QSTR(MP_QSTR_A17), MP_ROM_PTR(&pin_GPIO17) }, - { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_IO18), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_A17), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, { MP_ROM_QSTR(MP_QSTR_IO21), MP_ROM_PTR(&pin_GPIO21) }, { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, @@ -114,6 +114,10 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_D44), MP_ROM_PTR(&pin_GPIO44) }, { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO44) }, + { MP_ROM_QSTR(MP_QSTR_IO45), MP_ROM_PTR(&pin_GPIO45) }, + { MP_ROM_QSTR(MP_QSTR_IO46), MP_ROM_PTR(&pin_GPIO46) }, + { MP_ROM_QSTR(MP_QSTR_IO47), MP_ROM_PTR(&pin_GPIO47) }, + { MP_ROM_QSTR(MP_QSTR_IO48), MP_ROM_PTR(&pin_GPIO48) }, { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) }, diff --git a/ports/espressif/boards/m5stack_atom_lite/board.c b/ports/espressif/boards/m5stack_atom_lite/board.c new file mode 100644 index 0000000000..c0d9676d86 --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_lite/board.c @@ -0,0 +1,29 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 CDarius + * + * 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" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h b/ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h new file mode 100644 index 0000000000..dfa12b53b0 --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_lite/mpconfigboard.h @@ -0,0 +1,49 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 CDarius + * + * 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. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "M5Stack Atom Lite" +#define MICROPY_HW_MCU_NAME "ESP32" + +#define MICROPY_HW_NEOPIXEL (&pin_GPIO27) + +#define CIRCUITPY_BOARD_I2C (2) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO21, .sda = &pin_GPIO25}, \ + {.scl = &pin_GPIO32, .sda = &pin_GPIO26}} + +#define CIRCUITPY_BOARD_SPI (1) +#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO18, .mosi = &pin_GPIO23, .miso = &pin_GPIO19}} + +// For entering safe mode +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO39) + +// Explanation of how a user got into safe mode +#define BOARD_USER_SAFE_MODE_ACTION translate("The central button was pressed at start up.\n") + +// UART pins attached to the USB-serial converter chip +#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) +#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) diff --git a/ports/espressif/boards/m5stack_atom_lite/mpconfigboard.mk b/ports/espressif/boards/m5stack_atom_lite/mpconfigboard.mk new file mode 100644 index 0000000000..6adf65d2bc --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_lite/mpconfigboard.mk @@ -0,0 +1,10 @@ +CIRCUITPY_CREATOR_ID = 0x10151015 +CIRCUITPY_CREATION_ID = 0x00320003 + +IDF_TARGET = esp32 + +CIRCUITPY_ESP_FLASH_MODE = dio +CIRCUITPY_ESP_FLASH_FREQ = 40m +CIRCUITPY_ESP_FLASH_SIZE = 4MB + +CIRCUITPY_ESP32_CAMERA = 0 diff --git a/ports/espressif/boards/m5stack_atom_lite/pins.c b/ports/espressif/boards/m5stack_atom_lite/pins.c new file mode 100644 index 0000000000..495fb3a5a0 --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_lite/pins.c @@ -0,0 +1,49 @@ +#include "shared-bindings/board/__init__.h" +#include "shared-module/displayio/__init__.h" + +CIRCUITPY_BOARD_BUS_SINGLETON(porta_i2c, i2c, 1) + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + // External pins are in silkscreen order, from top to bottom, left side, then right side + + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO22) }, + + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO19) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_D33), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_A33), MP_ROM_PTR(&pin_GPIO33) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_A25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_DAC1), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_PORTA_SDA), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_DAC2), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_PORTA_SCL), MP_ROM_PTR(&pin_GPIO32) }, + { MP_ROM_QSTR(MP_QSTR_A32), MP_ROM_PTR(&pin_GPIO32) }, + { MP_ROM_QSTR(MP_QSTR_D32), MP_ROM_PTR(&pin_GPIO32) }, + + { MP_ROM_QSTR(MP_QSTR_NEOPIXEL), MP_ROM_PTR(&pin_GPIO27) }, + + { MP_ROM_QSTR(MP_QSTR_BTN), MP_ROM_PTR(&pin_GPIO39) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_PORTA_I2C), MP_ROM_PTR(&board_porta_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/m5stack_atom_lite/sdkconfig b/ports/espressif/boards/m5stack_atom_lite/sdkconfig new file mode 100644 index 0000000000..8a9fb07019 --- /dev/null +++ b/ports/espressif/boards/m5stack_atom_lite/sdkconfig @@ -0,0 +1,27 @@ +CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y +CONFIG_ESP32_SPIRAM_SUPPORT=n + +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskAtomLite" +# end of LWIP + +# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins +### # +### # ESP System Settings +### # +### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y +### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set +### CONFIG_ESP_CONSOLE_UART_CUSTOM=y +### CONFIG_ESP_CONSOLE_NONE is not set +### CONFIG_ESP_CONSOLE_UART=y +### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y +### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set +### CONFIG_ESP_CONSOLE_UART_NUM=0 +### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 +### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 +### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set +### # end of ESP System Settings diff --git a/ports/espressif/boards/m5stack_core_basic/board.c b/ports/espressif/boards/m5stack_core_basic/board.c new file mode 100644 index 0000000000..2736bc758b --- /dev/null +++ b/ports/espressif/boards/m5stack_core_basic/board.c @@ -0,0 +1,118 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 CDarius + * + * 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 "mpconfigboard.h" +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-module/displayio/__init__.h" +#include "shared-module/displayio/mipi_constants.h" +#include "shared-bindings/board/__init__.h" + +displayio_fourwire_obj_t board_display_obj; + + +// display init sequence according to M5Gfx +uint8_t display_init_sequence[] = { + 0x01,0x80,0x80, // Software reset then delay 0x80 (128ms) + 0xC8,0x03,0xFF,0x93,0x42, // Turn on the external command + 0xC0,0x02,0x12, 0x12, // Power Control 1 + 0xC1,0x01,0x03, // Power Control 2 + 0xC5,0x01,0xF2, // VCOM Control 1 + 0xB0,0x01,0xE0, // RGB Interface SYNC Mode + 0xF6,0x03,0x01, 0x00, 0x00, // Interface control + 0XE0,0x0F,0x00,0x0C,0x11,0x04,0x11,0x08,0x37,0x89,0x4C,0x06,0x0C,0x0A,0x2E,0x34,0x0F, // Positive Gamma Correction + 0xE1,0x0F,0x00,0x0B,0x11,0x05,0x13,0x09,0x33,0x67,0x48,0x07,0x0E,0x0B,0x2E,0x33,0x0F, // Negative Gamma Correction + 0xB6,0x04,0x08,0x82,0x1D,0x04, // Display Function Control + 0x3A,0x01,0x55, // COLMOD: Pixel Format Set 16 bit + 0x21,0x00, // Display inversion ON + 0x36,0x01,0x08, // Memory Access Control: RGB order + 0x11,0x80,0x78, // Exit Sleep then delay 0x78 (120ms) + 0x29,0x80,0x78, // Display on then delay 0x78 (120ms) +}; + +void board_init(void) { + busio_spi_obj_t *spi = common_hal_board_create_spi(0); + displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; + bus->base.type = &displayio_fourwire_type; + + common_hal_displayio_fourwire_construct( + bus, + spi, + &pin_GPIO27, // DC + &pin_GPIO14, // CS + &pin_GPIO33, // RST + 40000000, // baudrate + 0, // polarity + 0 // phase + ); + + displayio_display_obj_t *display = &displays[0].display; + display->base.type = &displayio_display_type; + + common_hal_displayio_display_construct( + display, + bus, + 320, // width (after rotation) + 240, // height (after rotation) + 0, // column start + 0, // row start + 0, // rotation + 16, // color depth + false, // grayscale + false, // pixels in a byte share a row. Only valid for depths < 8 + 1, // bytes per cell. Only valid for depths < 8 + false, // reverse_pixels_in_byte. Only valid for depths < 8 + true, // reverse_pixels_in_word + MIPI_COMMAND_SET_COLUMN_ADDRESS, // set column command + MIPI_COMMAND_SET_PAGE_ADDRESS, // set row command + MIPI_COMMAND_WRITE_MEMORY_START, // write memory command + display_init_sequence, + sizeof(display_init_sequence), + &pin_GPIO32, // backlight pin + NO_BRIGHTNESS_COMMAND, + 1.0f, // brightness + false, // single_byte_bounds + false, // data_as_commands + true, // auto_refresh + 61, // native_frames_per_second + true, // backlight_on_high + false, // SH1107_addressing + 50000 // backlight pwm frequency + ); + +} + +bool espressif_board_reset_pin_number(gpio_num_t pin_number) { + // Set speaker gpio to ground to prevent noise from the speaker + if (pin_number == 25) { + gpio_set_direction(pin_number, GPIO_MODE_DEF_OUTPUT); + gpio_set_level(pin_number, false); + return true; + } + return false; +} diff --git a/ports/espressif/boards/m5stack_core_basic/mpconfigboard.h b/ports/espressif/boards/m5stack_core_basic/mpconfigboard.h new file mode 100755 index 0000000000..c974c64874 --- /dev/null +++ b/ports/espressif/boards/m5stack_core_basic/mpconfigboard.h @@ -0,0 +1,49 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 CDarius + * + * 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. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "M5Stack Core Basic" +#define MICROPY_HW_MCU_NAME "ESP32" + +#define CIRCUITPY_BOARD_I2C (1) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO22, .sda = &pin_GPIO21}} + +#define CIRCUITPY_BOARD_SPI (1) +#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO18, .mosi = &pin_GPIO23, .miso = &pin_GPIO19}} + +#define CIRCUITPY_BOARD_UART (1) +#define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO17, .rx = &pin_GPIO16}} + +// For entering safe mode +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO39) + +// Explanation of how a user got into safe mode +#define BOARD_USER_SAFE_MODE_ACTION translate("Button A was pressed at start up.\n") + +// UART pins attached to the USB-serial converter chip +#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) +#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) diff --git a/ports/espressif/boards/m5stack_core_basic/mpconfigboard.mk b/ports/espressif/boards/m5stack_core_basic/mpconfigboard.mk new file mode 100644 index 0000000000..1abf68428c --- /dev/null +++ b/ports/espressif/boards/m5stack_core_basic/mpconfigboard.mk @@ -0,0 +1,9 @@ +CIRCUITPY_CREATOR_ID = 0x10151015 +CIRCUITPY_CREATION_ID = 0x00320002 + +IDF_TARGET = esp32 + +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 16MB +CIRCUITPY_ESP32_CAMERA = 0 diff --git a/ports/espressif/boards/m5stack_core_basic/pins.c b/ports/espressif/boards/m5stack_core_basic/pins.c new file mode 100644 index 0000000000..b985231bea --- /dev/null +++ b/ports/espressif/boards/m5stack_core_basic/pins.c @@ -0,0 +1,93 @@ +#include "shared-bindings/board/__init__.h" +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + // External pins are in silkscreen order, from top to bottom, left side, then right side + + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO19) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_RX2), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, + { MP_ROM_QSTR(MP_QSTR_PORTC_RX), MP_ROM_PTR(&pin_GPIO16) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_PORTA_SDA), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_ROM_QSTR(MP_QSTR_A12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_A15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_A35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, + + { MP_ROM_QSTR(MP_QSTR_A36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_PORTB_IN), MP_ROM_PTR(&pin_GPIO36) }, + + { MP_ROM_QSTR(MP_QSTR_A25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_A26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_PORTB_OUT), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + + { MP_ROM_QSTR(MP_QSTR_TX2), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, + { MP_ROM_QSTR(MP_QSTR_PORTC_TX), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_PORTA_SCL), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO22) }, + + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_A13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_A34), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_GPIO34) }, + + // buttons + { MP_ROM_QSTR(MP_QSTR_BTN_A), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_BTN_B), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_BTN_C), MP_ROM_PTR(&pin_GPIO37) }, + + // sd card + { MP_ROM_QSTR(MP_QSTR_SD_CS),MP_ROM_PTR(&pin_GPIO4) }, + + // tft + { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO32) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, + + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/m5stack_core_basic/sdkconfig b/ports/espressif/boards/m5stack_core_basic/sdkconfig new file mode 100644 index 0000000000..a4cedd8e81 --- /dev/null +++ b/ports/espressif/boards/m5stack_core_basic/sdkconfig @@ -0,0 +1,28 @@ +CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y +CONFIG_ESP32_SPIRAM_SUPPORT=n +CONFIG_ESP32_REV_MIN_3=y + +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskCoreBasic" +# end of LWIP + +# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins +### # +### # ESP System Settings +### # +### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y +### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set +### CONFIG_ESP_CONSOLE_UART_CUSTOM=y +### CONFIG_ESP_CONSOLE_NONE is not set +### CONFIG_ESP_CONSOLE_UART=y +### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y +### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set +### CONFIG_ESP_CONSOLE_UART_NUM=0 +### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 +### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 +### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set +### # end of ESP System Settings diff --git a/ports/espressif/boards/m5stack_core_fire/board.c b/ports/espressif/boards/m5stack_core_fire/board.c new file mode 100755 index 0000000000..2736bc758b --- /dev/null +++ b/ports/espressif/boards/m5stack_core_fire/board.c @@ -0,0 +1,118 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 CDarius + * + * 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 "mpconfigboard.h" +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/displayio/FourWire.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-module/displayio/__init__.h" +#include "shared-module/displayio/mipi_constants.h" +#include "shared-bindings/board/__init__.h" + +displayio_fourwire_obj_t board_display_obj; + + +// display init sequence according to M5Gfx +uint8_t display_init_sequence[] = { + 0x01,0x80,0x80, // Software reset then delay 0x80 (128ms) + 0xC8,0x03,0xFF,0x93,0x42, // Turn on the external command + 0xC0,0x02,0x12, 0x12, // Power Control 1 + 0xC1,0x01,0x03, // Power Control 2 + 0xC5,0x01,0xF2, // VCOM Control 1 + 0xB0,0x01,0xE0, // RGB Interface SYNC Mode + 0xF6,0x03,0x01, 0x00, 0x00, // Interface control + 0XE0,0x0F,0x00,0x0C,0x11,0x04,0x11,0x08,0x37,0x89,0x4C,0x06,0x0C,0x0A,0x2E,0x34,0x0F, // Positive Gamma Correction + 0xE1,0x0F,0x00,0x0B,0x11,0x05,0x13,0x09,0x33,0x67,0x48,0x07,0x0E,0x0B,0x2E,0x33,0x0F, // Negative Gamma Correction + 0xB6,0x04,0x08,0x82,0x1D,0x04, // Display Function Control + 0x3A,0x01,0x55, // COLMOD: Pixel Format Set 16 bit + 0x21,0x00, // Display inversion ON + 0x36,0x01,0x08, // Memory Access Control: RGB order + 0x11,0x80,0x78, // Exit Sleep then delay 0x78 (120ms) + 0x29,0x80,0x78, // Display on then delay 0x78 (120ms) +}; + +void board_init(void) { + busio_spi_obj_t *spi = common_hal_board_create_spi(0); + displayio_fourwire_obj_t *bus = &displays[0].fourwire_bus; + bus->base.type = &displayio_fourwire_type; + + common_hal_displayio_fourwire_construct( + bus, + spi, + &pin_GPIO27, // DC + &pin_GPIO14, // CS + &pin_GPIO33, // RST + 40000000, // baudrate + 0, // polarity + 0 // phase + ); + + displayio_display_obj_t *display = &displays[0].display; + display->base.type = &displayio_display_type; + + common_hal_displayio_display_construct( + display, + bus, + 320, // width (after rotation) + 240, // height (after rotation) + 0, // column start + 0, // row start + 0, // rotation + 16, // color depth + false, // grayscale + false, // pixels in a byte share a row. Only valid for depths < 8 + 1, // bytes per cell. Only valid for depths < 8 + false, // reverse_pixels_in_byte. Only valid for depths < 8 + true, // reverse_pixels_in_word + MIPI_COMMAND_SET_COLUMN_ADDRESS, // set column command + MIPI_COMMAND_SET_PAGE_ADDRESS, // set row command + MIPI_COMMAND_WRITE_MEMORY_START, // write memory command + display_init_sequence, + sizeof(display_init_sequence), + &pin_GPIO32, // backlight pin + NO_BRIGHTNESS_COMMAND, + 1.0f, // brightness + false, // single_byte_bounds + false, // data_as_commands + true, // auto_refresh + 61, // native_frames_per_second + true, // backlight_on_high + false, // SH1107_addressing + 50000 // backlight pwm frequency + ); + +} + +bool espressif_board_reset_pin_number(gpio_num_t pin_number) { + // Set speaker gpio to ground to prevent noise from the speaker + if (pin_number == 25) { + gpio_set_direction(pin_number, GPIO_MODE_DEF_OUTPUT); + gpio_set_level(pin_number, false); + return true; + } + return false; +} diff --git a/ports/espressif/boards/m5stack_core_fire/mpconfigboard.h b/ports/espressif/boards/m5stack_core_fire/mpconfigboard.h new file mode 100755 index 0000000000..f56a8fe901 --- /dev/null +++ b/ports/espressif/boards/m5stack_core_fire/mpconfigboard.h @@ -0,0 +1,50 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2022 CDarius + * + * 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. + */ + +// Micropython setup + +#define MICROPY_HW_BOARD_NAME "M5Stack Core Fire" +#define MICROPY_HW_MCU_NAME "ESP32" + +#define CIRCUITPY_BOARD_I2C (1) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO22, .sda = &pin_GPIO21}} + +#define CIRCUITPY_BOARD_SPI (1) +#define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO18, .mosi = &pin_GPIO23, .miso = &pin_GPIO19}} + +// GPIO16 & GPIO17 are used for PSRAM +// #define CIRCUITPY_BOARD_UART (1) +// #define CIRCUITPY_BOARD_UART_PIN {{.tx = &pin_GPIO17, .rx = &pin_GPIO16}} + +// For entering safe mode +#define CIRCUITPY_BOOT_BUTTON (&pin_GPIO39) + +// Explanation of how a user got into safe mode +#define BOARD_USER_SAFE_MODE_ACTION translate("Button A was pressed at start up.\n") + +// UART pins attached to the USB-serial converter chip +#define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) +#define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) diff --git a/ports/espressif/boards/m5stack_core_fire/mpconfigboard.mk b/ports/espressif/boards/m5stack_core_fire/mpconfigboard.mk new file mode 100644 index 0000000000..7a66a977b1 --- /dev/null +++ b/ports/espressif/boards/m5stack_core_fire/mpconfigboard.mk @@ -0,0 +1,9 @@ +CIRCUITPY_CREATOR_ID = 0x10151015 +CIRCUITPY_CREATION_ID = 0x00320001 + +IDF_TARGET = esp32 + +CIRCUITPY_ESP_FLASH_MODE = qio +CIRCUITPY_ESP_FLASH_FREQ = 80m +CIRCUITPY_ESP_FLASH_SIZE = 16MB +CIRCUITPY_ESP32_CAMERA = 0 diff --git a/ports/espressif/boards/m5stack_core_fire/pins.c b/ports/espressif/boards/m5stack_core_fire/pins.c new file mode 100644 index 0000000000..f26f96ac8e --- /dev/null +++ b/ports/espressif/boards/m5stack_core_fire/pins.c @@ -0,0 +1,94 @@ +#include "shared-bindings/board/__init__.h" +#include "shared-module/displayio/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + // External pins are in silkscreen order, from top to bottom, left side, then right side + + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO23) }, + + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO19) }, + { MP_ROM_QSTR(MP_QSTR_D19), MP_ROM_PTR(&pin_GPIO19) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO18) }, + { MP_ROM_QSTR(MP_QSTR_D18), MP_ROM_PTR(&pin_GPIO18) }, + + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + + // GPIO16 & GPIO17 are used for PSRAM + // { MP_ROM_QSTR(MP_QSTR_RX2), MP_ROM_PTR(&pin_GPIO16) }, + // { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_PORTA_SDA), MP_ROM_PTR(&pin_GPIO21) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + + { MP_ROM_QSTR(MP_QSTR_A12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) }, + + { MP_ROM_QSTR(MP_QSTR_A15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_LED_BAR), MP_ROM_PTR(&pin_GPIO15) }, + + { MP_ROM_QSTR(MP_QSTR_A35), MP_ROM_PTR(&pin_GPIO35) }, + { MP_ROM_QSTR(MP_QSTR_D35), MP_ROM_PTR(&pin_GPIO35) }, + + { MP_ROM_QSTR(MP_QSTR_A36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_D36), MP_ROM_PTR(&pin_GPIO36) }, + { MP_ROM_QSTR(MP_QSTR_PORTB_IN), MP_ROM_PTR(&pin_GPIO36) }, + + { MP_ROM_QSTR(MP_QSTR_A25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_D25), MP_ROM_PTR(&pin_GPIO25) }, + { MP_ROM_QSTR(MP_QSTR_SPEAKER), MP_ROM_PTR(&pin_GPIO25) }, + + { MP_ROM_QSTR(MP_QSTR_A26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_PORTB_OUT), MP_ROM_PTR(&pin_GPIO26) }, + + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + + // GPIO16 & GPIO17 are used for PSRAM + // { MP_ROM_QSTR(MP_QSTR_TX2), MP_ROM_PTR(&pin_GPIO17) }, + // { MP_ROM_QSTR(MP_QSTR_D17), MP_ROM_PTR(&pin_GPIO17) }, + + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_PORTA_SCL), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO22) }, + + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + + { MP_ROM_QSTR(MP_QSTR_A13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_A34), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_D34), MP_ROM_PTR(&pin_GPIO34) }, + { MP_ROM_QSTR(MP_QSTR_MIC), MP_ROM_PTR(&pin_GPIO34) }, + + // buttons + { MP_ROM_QSTR(MP_QSTR_BTN_A), MP_ROM_PTR(&pin_GPIO39) }, + { MP_ROM_QSTR(MP_QSTR_BTN_B), MP_ROM_PTR(&pin_GPIO38) }, + { MP_ROM_QSTR(MP_QSTR_BTN_C), MP_ROM_PTR(&pin_GPIO37) }, + + // sd card + { MP_ROM_QSTR(MP_QSTR_SD_CS),MP_ROM_PTR(&pin_GPIO4) }, + + // tft + { MP_ROM_QSTR(MP_QSTR_TFT_CS), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_TFT_DC), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_TFT_RESET), MP_ROM_PTR(&pin_GPIO33) }, + { MP_ROM_QSTR(MP_QSTR_TFT_BACKLIGHT), MP_ROM_PTR(&pin_GPIO32) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + + { MP_ROM_QSTR(MP_QSTR_DISPLAY), MP_ROM_PTR(&displays[0].display)} +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/espressif/boards/m5stack_core_fire/sdkconfig b/ports/espressif/boards/m5stack_core_fire/sdkconfig new file mode 100644 index 0000000000..d77fe64525 --- /dev/null +++ b/ports/espressif/boards/m5stack_core_fire/sdkconfig @@ -0,0 +1,58 @@ +CONFIG_ESP32_ECO3_CACHE_LOCK_FIX=y +CONFIG_ESP32_SPIRAM_SUPPORT=y +CONFIG_ESP32_REV_MIN_3=y + +# +# SPI RAM config +# +CONFIG_SPIRAM_TYPE_AUTO=y +# CONFIG_SPIRAM_TYPE_ESPPSRAM16 is not set +# CONFIG_SPIRAM_TYPE_ESPPSRAM32 is not set +#CONFIG_SPIRAM_TYPE_ESPPSRAM64 is not set +CONFIG_SPIRAM_SIZE=8388608 +# end of SPI RAM config + +# +# PSRAM clock and cs IO for ESP32 +# +CONFIG_D0WD_PSRAM_CLK_IO=17 +CONFIG_D0WD_PSRAM_CS_IO=16 +# end of PSRAM clock and cs IO for ESP32 + +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS is not set +# CONFIG_SPIRAM_RODATA is not set +CONFIG_SPIRAM_SPEED_80M=y +# CONFIG_SPIRAM_SPEED_40M is not set +# CONFIG_SPIRAM_SPEED_26M is not set +# CONFIG_SPIRAM_SPEED_20M is not set +CONFIG_SPIRAM=y +CONFIG_SPIRAM_BOOT_INIT=y +# CONFIG_SPIRAM_IGNORE_NOTFOUND is not set +CONFIG_SPIRAM_USE_MEMMAP=y +# CONFIG_SPIRAM_USE_CAPS_ALLOC is not set +# CONFIG_SPIRAM_USE_MALLOC is not set +CONFIG_SPIRAM_MEMTEST=y +# CONFIG_SPIRAM_ALLOW_BSS_SEG_EXTERNAL_MEMORY is not set +# +# LWIP +# +CONFIG_LWIP_LOCAL_HOSTNAME="M5StaskCoreFire" +# end of LWIP + +# Uncomment (remove ###) to send ESP_LOG output to TX/RX pins +### # +### # ESP System Settings +### # +### CONFIG_ESP_SYSTEM_PANIC_PRINT_HALT=y +### # CONFIG_ESP_SYSTEM_PANIC_SILENT_REBOOT is not set +### CONFIG_ESP_CONSOLE_UART_CUSTOM=y +### CONFIG_ESP_CONSOLE_NONE is not set +### CONFIG_ESP_CONSOLE_UART=y +### CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_0=y +### # CONFIG_ESP_CONSOLE_UART_CUSTOM_NUM_1 is not set +### CONFIG_ESP_CONSOLE_UART_NUM=0 +### CONFIG_ESP_CONSOLE_UART_TX_GPIO=17 +### CONFIG_ESP_CONSOLE_UART_RX_GPIO=16 +### CONFIG_ESP_CONSOLE_UART_BAUDRATE=115200 +### # CONFIG_ESP_SYSTEM_CHECK_INT_LEVEL_5 is not set +### # end of ESP System Settings diff --git a/ports/espressif/boards/microdev_micro_c3/mpconfigboard.h b/ports/espressif/boards/microdev_micro_c3/mpconfigboard.h index 97a18f3235..2153513306 100644 --- a/ports/espressif/boards/microdev_micro_c3/mpconfigboard.h +++ b/ports/espressif/boards/microdev_micro_c3/mpconfigboard.h @@ -50,6 +50,3 @@ // For entering safe mode #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO9) - -// Explanation of how a user got into safe mode -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing boot button at start up.\n") diff --git a/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.h b/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.h index a12ccb0c18..2db308f623 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.h +++ b/ports/espressif/boards/unexpectedmaker_tinypico/mpconfigboard.h @@ -33,11 +33,6 @@ #define CIRCUITPY_BOARD_SPI (1) #define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO18, .mosi = &pin_GPIO23, .miso = &pin_GPIO19}} -// #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) - -// Explanation of how a user got into safe mode -// #define BOARD_USER_SAFE_MODE_ACTION translate("pressing BOOT button at start up.\n") - // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) diff --git a/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.h b/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.h index 3cc64859ce..87c582b3bf 100644 --- a/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.h +++ b/ports/espressif/boards/unexpectedmaker_tinypico_nano/mpconfigboard.h @@ -33,11 +33,6 @@ #define CIRCUITPY_BOARD_SPI (1) #define CIRCUITPY_BOARD_SPI_PIN {{.clock = &pin_GPIO18, .mosi = &pin_GPIO23, .miso = &pin_GPIO19}} -// #define CIRCUITPY_BOOT_BUTTON (&pin_GPIO0) - -// Explanation of how a user got into safe mode -// #define BOARD_USER_SAFE_MODE_ACTION translate("pressing BOOT button at start up.\n") - // UART pins attached to the USB-serial converter chip #define CIRCUITPY_CONSOLE_UART_TX (&pin_GPIO1) #define CIRCUITPY_CONSOLE_UART_RX (&pin_GPIO3) diff --git a/ports/espressif/common-hal/alarm/SleepMemory.h b/ports/espressif/common-hal/alarm/SleepMemory.h index 37d6cd371f..626f748a67 100644 --- a/ports/espressif/common-hal/alarm/SleepMemory.h +++ b/ports/espressif/common-hal/alarm/SleepMemory.h @@ -24,8 +24,7 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM_SLEEPMEMORY_H -#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM_SLEEPMEMORY_H +#pragma once #include "py/obj.h" @@ -49,5 +48,3 @@ typedef struct { } alarm_sleep_memory_obj_t; extern void alarm_sleep_memory_reset(void); - -#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM_SLEEPMEMORY_H diff --git a/ports/espressif/common-hal/alarm/__init__.c b/ports/espressif/common-hal/alarm/__init__.c index 4183b7e61b..02ce3e1082 100644 --- a/ports/espressif/common-hal/alarm/__init__.c +++ b/ports/espressif/common-hal/alarm/__init__.c @@ -58,6 +58,10 @@ const alarm_sleep_memory_obj_t alarm_sleep_memory_obj = { }, }; +// Non-heap alarm object recording alarm (if any) that woke up CircuitPython after light or deep sleep. +// This object lives across VM instantiations, so none of these objects can contain references to the heap. +alarm_wake_alarm_union_t alarm_wake_alarm; + void alarm_reset(void) { alarm_sleep_memory_reset(); alarm_pin_pinalarm_reset(); @@ -90,27 +94,27 @@ bool common_hal_alarm_woken_from_sleep(void) { return _get_wakeup_cause() != ESP_SLEEP_WAKEUP_UNDEFINED; } -mp_obj_t common_hal_alarm_create_wake_alarm(void) { +mp_obj_t common_hal_alarm_record_wake_alarm(void) { // If woken from deep sleep, create a copy alarm similar to what would have // been passed in originally. Otherwise, just return none esp_sleep_wakeup_cause_t cause = _get_wakeup_cause(); switch (cause) { case ESP_SLEEP_WAKEUP_TIMER: { - return alarm_time_timealarm_create_wakeup_alarm(); + return alarm_time_timealarm_record_wake_alarm(); } case ESP_SLEEP_WAKEUP_GPIO: case ESP_SLEEP_WAKEUP_EXT0: case ESP_SLEEP_WAKEUP_EXT1: { - return alarm_pin_pinalarm_create_wakeup_alarm(); + return alarm_pin_pinalarm_record_wake_alarm(); } case ESP_SLEEP_WAKEUP_TOUCHPAD: { - return alarm_touch_touchalarm_create_wakeup_alarm(); + return alarm_touch_touchalarm_record_wake_alarm(); } case ESP_SLEEP_WAKEUP_ULP: { - return alarm_coproc_coprocalarm_create_wakeup_alarm(); + return alarm_coproc_coprocalarm_record_wake_alarm(); } case ESP_SLEEP_WAKEUP_UNDEFINED: diff --git a/ports/espressif/common-hal/alarm/__init__.h b/ports/espressif/common-hal/alarm/__init__.h index ae7286db76..9f762f9c00 100644 --- a/ports/espressif/common-hal/alarm/__init__.h +++ b/ports/espressif/common-hal/alarm/__init__.h @@ -24,13 +24,22 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM__INIT__H -#define MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM__INIT__H +#pragma once #include "common-hal/alarm/SleepMemory.h" +#include "common-hal/alarm/coproc/CoprocAlarm.h" +#include "common-hal/alarm/pin/PinAlarm.h" +#include "common-hal/alarm/time/TimeAlarm.h" +#include "common-hal/alarm/touch/TouchAlarm.h" -const alarm_sleep_memory_obj_t alarm_sleep_memory_obj; +typedef union { + alarm_coproc_coprocalarm_obj_t coproc_alarm; + alarm_pin_pinalarm_obj_t pin_alarm; + alarm_time_timealarm_obj_t time_alarm; + alarm_touch_touchalarm_obj_t touch_alarm; +} alarm_wake_alarm_union_t; + +extern alarm_wake_alarm_union_t alarm_wake_alarm; +extern const alarm_sleep_memory_obj_t alarm_sleep_memory_obj; extern void alarm_reset(void); - -#endif // MICROPY_INCLUDED_ESPRESSIF_COMMON_HAL_ALARM__INIT__H diff --git a/ports/espressif/common-hal/alarm/coproc/CoprocAlarm.c b/ports/espressif/common-hal/alarm/coproc/CoprocAlarm.c index aa49e13a2a..9ee187d27c 100644 --- a/ports/espressif/common-hal/alarm/coproc/CoprocAlarm.c +++ b/ports/espressif/common-hal/alarm/coproc/CoprocAlarm.c @@ -24,6 +24,7 @@ * THE SOFTWARE. */ +#include "shared-bindings/alarm/__init__.h" #include "shared-bindings/alarm/coproc/CoprocAlarm.h" #include "shared-bindings/coproc/__init__.h" @@ -47,9 +48,9 @@ mp_obj_t alarm_coproc_coprocalarm_find_triggered_alarm(const size_t n_alarms, co return mp_const_none; } -mp_obj_t alarm_coproc_coprocalarm_create_wakeup_alarm(void) { - // Create CoprocAlarm object. - alarm_coproc_coprocalarm_obj_t *alarm = m_new_obj(alarm_coproc_coprocalarm_obj_t); +mp_obj_t alarm_coproc_coprocalarm_record_wake_alarm(void) { + alarm_coproc_coprocalarm_obj_t *const alarm = &alarm_wake_alarm.coproc_alarm; + alarm->base.type = &alarm_coproc_coprocalarm_type; return alarm; } @@ -111,7 +112,7 @@ mp_obj_t alarm_coproc_coprocalarm_find_triggered_alarm(const size_t n_alarms, co return mp_const_none; } -mp_obj_t alarm_coproc_coprocalarm_create_wakeup_alarm(void) { +mp_obj_t alarm_coproc_coprocalarm_record_wake_alarm(void) { return mp_const_none; } diff --git a/ports/espressif/common-hal/alarm/coproc/CoprocAlarm.h b/ports/espressif/common-hal/alarm/coproc/CoprocAlarm.h index d70e90265d..57a9bcdbff 100644 --- a/ports/espressif/common-hal/alarm/coproc/CoprocAlarm.h +++ b/ports/espressif/common-hal/alarm/coproc/CoprocAlarm.h @@ -24,8 +24,7 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_COMMON_HAL_ALARM_COPROC_COPROCALARM_H -#define MICROPY_INCLUDED_COMMON_HAL_ALARM_COPROC_COPROCALARM_H +#pragma once #include "py/obj.h" #include "py/runtime.h" @@ -38,11 +37,9 @@ typedef struct { } alarm_coproc_coprocalarm_obj_t; mp_obj_t alarm_coproc_coprocalarm_find_triggered_alarm(const size_t n_alarms, const mp_obj_t *alarms); -mp_obj_t alarm_coproc_coprocalarm_create_wakeup_alarm(void); +mp_obj_t alarm_coproc_coprocalarm_record_wake_alarm(void); void alarm_coproc_coprocalarm_prepare_for_deep_sleep(void); void alarm_coproc_coprocalarm_reset(void); void alarm_coproc_coprocalarm_set_alarm(const bool deep_sleep, const size_t n_alarms, const mp_obj_t *alarms); bool alarm_coproc_coprocalarm_woke_this_cycle(void); - -#endif // MICROPY_INCLUDED_COMMON_HAL_ALARM_COPROC_COPROCALARM_H diff --git a/ports/espressif/common-hal/alarm/pin/PinAlarm.c b/ports/espressif/common-hal/alarm/pin/PinAlarm.c index 62496ec4c6..6db184a4dd 100644 --- a/ports/espressif/common-hal/alarm/pin/PinAlarm.c +++ b/ports/espressif/common-hal/alarm/pin/PinAlarm.c @@ -26,10 +26,10 @@ */ #include "py/runtime.h" - #include "supervisor/port.h" + +#include "common-hal/alarm/__init__.h" #include "shared-bindings/alarm/pin/PinAlarm.h" -#include "shared-bindings/microcontroller/Pin.h" #include "shared-bindings/microcontroller/__init__.h" #include "esp_sleep.h" @@ -111,7 +111,7 @@ mp_obj_t alarm_pin_pinalarm_find_triggered_alarm(size_t n_alarms, const mp_obj_t return mp_const_none; } -mp_obj_t alarm_pin_pinalarm_create_wakeup_alarm(void) { +mp_obj_t alarm_pin_pinalarm_record_wake_alarm(void) { esp_sleep_wakeup_cause_t cause = esp_sleep_get_wakeup_cause(); // Pin status will persist into a fake deep sleep @@ -135,7 +135,8 @@ mp_obj_t alarm_pin_pinalarm_create_wakeup_alarm(void) { } } - alarm_pin_pinalarm_obj_t *alarm = m_new_obj(alarm_pin_pinalarm_obj_t); + alarm_pin_pinalarm_obj_t *const alarm = &alarm_wake_alarm.pin_alarm; + alarm->base.type = &alarm_pin_pinalarm_type; alarm->pin = NULL; // Map the pin number back to a pin object. @@ -215,6 +216,7 @@ void alarm_pin_pinalarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_ob if (esp_sleep_enable_ext1_wakeup(high_alarms, ESP_EXT1_WAKEUP_ANY_HIGH) != ESP_OK) { mp_raise_ValueError(translate("Can only alarm on RTC IO from deep sleep.")); } + esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON); } size_t low_pins[2]; size_t j = 0; @@ -231,6 +233,7 @@ void alarm_pin_pinalarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_ob if (esp_sleep_enable_ext1_wakeup(1ull << low_pins[1], ESP_EXT1_WAKEUP_ALL_LOW) != ESP_OK) { mp_raise_ValueError(translate("Can only alarm on RTC IO from deep sleep.")); } + esp_sleep_pd_config(ESP_PD_DOMAIN_RTC_PERIPH, ESP_PD_OPTION_ON); } if (low_count > 0) { if (esp_sleep_enable_ext0_wakeup(low_pins[0], 0) != ESP_OK) { @@ -273,16 +276,14 @@ void alarm_pin_pinalarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_ob PIN_FUNC_SELECT(GPIO_PIN_MUX_REG[i], PIN_FUNC_GPIO); if (pull) { gpio_set_pull_mode(i, pull_mode); - size_t j = 0; - while (gpio_get_level(i) == false) { - j++; - } } never_reset_pin_number(i); // Sets interrupt type and wakeup bits. gpio_wakeup_enable(i, interrupt_mode); gpio_intr_enable(i); } + // Wait for any pulls to settle. + mp_hal_delay_ms(50); } diff --git a/ports/espressif/common-hal/alarm/pin/PinAlarm.h b/ports/espressif/common-hal/alarm/pin/PinAlarm.h index cbc20b996c..309b27c2e9 100644 --- a/ports/espressif/common-hal/alarm/pin/PinAlarm.h +++ b/ports/espressif/common-hal/alarm/pin/PinAlarm.h @@ -24,9 +24,13 @@ * THE SOFTWARE. */ +#pragma once + #include "py/obj.h" #include "py/objtuple.h" +#include "shared-bindings/microcontroller/Pin.h" + typedef struct { mp_obj_base_t base; const mcu_pin_obj_t *pin; @@ -35,7 +39,7 @@ typedef struct { } alarm_pin_pinalarm_obj_t; mp_obj_t alarm_pin_pinalarm_find_triggered_alarm(size_t n_alarms, const mp_obj_t *alarms); -mp_obj_t alarm_pin_pinalarm_create_wakeup_alarm(void); +mp_obj_t alarm_pin_pinalarm_record_wake_alarm(void); void alarm_pin_pinalarm_prepare_for_deep_sleep(void); void alarm_pin_pinalarm_reset(void); diff --git a/ports/espressif/common-hal/alarm/time/TimeAlarm.c b/ports/espressif/common-hal/alarm/time/TimeAlarm.c index 973da33c67..758e3c8f58 100644 --- a/ports/espressif/common-hal/alarm/time/TimeAlarm.c +++ b/ports/espressif/common-hal/alarm/time/TimeAlarm.c @@ -31,6 +31,7 @@ #include "components/esp_timer/include/esp_timer.h" +#include "shared-bindings/alarm/__init__.h" #include "shared-bindings/alarm/time/TimeAlarm.h" #include "shared-bindings/time/__init__.h" @@ -51,12 +52,13 @@ mp_obj_t alarm_time_timealarm_find_triggered_alarm(size_t n_alarms, const mp_obj return mp_const_none; } -mp_obj_t alarm_time_timealarm_create_wakeup_alarm(void) { - alarm_time_timealarm_obj_t *timer = m_new_obj(alarm_time_timealarm_obj_t); - timer->base.type = &alarm_time_timealarm_type; +mp_obj_t alarm_time_timealarm_record_wake_alarm(void) { + alarm_time_timealarm_obj_t *const alarm = &alarm_wake_alarm.time_alarm; + + alarm->base.type = &alarm_time_timealarm_type; // TODO: Set monotonic_time based on the RTC state. - timer->monotonic_time = 0.0f; - return timer; + alarm->monotonic_time = 0.0f; + return alarm; } esp_timer_handle_t pretend_sleep_timer; diff --git a/ports/espressif/common-hal/alarm/time/TimeAlarm.h b/ports/espressif/common-hal/alarm/time/TimeAlarm.h index 36986e06b2..c679c3cd9f 100644 --- a/ports/espressif/common-hal/alarm/time/TimeAlarm.h +++ b/ports/espressif/common-hal/alarm/time/TimeAlarm.h @@ -24,6 +24,7 @@ * THE SOFTWARE. */ +#pragma once #include "py/obj.h" @@ -33,7 +34,7 @@ typedef struct { } alarm_time_timealarm_obj_t; mp_obj_t alarm_time_timealarm_find_triggered_alarm(size_t n_alarms, const mp_obj_t *alarms); -mp_obj_t alarm_time_timealarm_create_wakeup_alarm(void); +mp_obj_t alarm_time_timealarm_record_wake_alarm(void); void alarm_time_timealarm_reset(void); void alarm_time_timealarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms); diff --git a/ports/espressif/common-hal/alarm/touch/TouchAlarm.c b/ports/espressif/common-hal/alarm/touch/TouchAlarm.c index ad55e1e056..232614ce32 100644 --- a/ports/espressif/common-hal/alarm/touch/TouchAlarm.c +++ b/ports/espressif/common-hal/alarm/touch/TouchAlarm.c @@ -24,6 +24,7 @@ * THE SOFTWARE. */ +#include "shared-bindings/alarm/__init__.h" #include "shared-bindings/alarm/touch/TouchAlarm.h" #include "shared-bindings/microcontroller/__init__.h" #include "shared-bindings/microcontroller/Pin.h" @@ -52,9 +53,9 @@ mp_obj_t alarm_touch_touchalarm_find_triggered_alarm(const size_t n_alarms, cons return mp_const_none; } -mp_obj_t alarm_touch_touchalarm_create_wakeup_alarm(void) { - // Create TouchAlarm object. - alarm_touch_touchalarm_obj_t *alarm = m_new_obj(alarm_touch_touchalarm_obj_t); +mp_obj_t alarm_touch_touchalarm_record_wake_alarm(void) { + alarm_touch_touchalarm_obj_t *const alarm = &alarm_wake_alarm.touch_alarm; + alarm->base.type = &alarm_touch_touchalarm_type; alarm->pin = NULL; diff --git a/ports/espressif/common-hal/alarm/touch/TouchAlarm.h b/ports/espressif/common-hal/alarm/touch/TouchAlarm.h index df2521c12a..0f35063ee4 100644 --- a/ports/espressif/common-hal/alarm/touch/TouchAlarm.h +++ b/ports/espressif/common-hal/alarm/touch/TouchAlarm.h @@ -24,8 +24,7 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_COMMON_HAL_ALARM_TOUCH_TOUCHALARM_H -#define MICROPY_INCLUDED_COMMON_HAL_ALARM_TOUCH_TOUCHALARM_H +#pragma once #include "py/obj.h" #include "common-hal/microcontroller/Pin.h" @@ -36,11 +35,9 @@ typedef struct { } alarm_touch_touchalarm_obj_t; mp_obj_t alarm_touch_touchalarm_find_triggered_alarm(const size_t n_alarms, const mp_obj_t *alarms); -mp_obj_t alarm_touch_touchalarm_create_wakeup_alarm(void); +mp_obj_t alarm_touch_touchalarm_record_wake_alarm(void); void alarm_touch_touchalarm_prepare_for_deep_sleep(void); void alarm_touch_touchalarm_reset(void); void alarm_touch_touchalarm_set_alarm(const bool deep_sleep, const size_t n_alarms, const mp_obj_t *alarms); bool alarm_touch_touchalarm_woke_this_cycle(void); - -#endif // MICROPY_INCLUDED_COMMON_HAL_ALARM_TOUCH_TOUCHALARM_H diff --git a/ports/espressif/common-hal/socketpool/Socket.c b/ports/espressif/common-hal/socketpool/Socket.c index f6025d329c..53db7ab393 100644 --- a/ports/espressif/common-hal/socketpool/Socket.c +++ b/ports/espressif/common-hal/socketpool/Socket.c @@ -483,7 +483,7 @@ int socketpool_socket_recv_into(socketpool_socket_obj_t *self, mp_uint_t common_hal_socketpool_socket_recv_into(socketpool_socket_obj_t *self, const uint8_t *buf, uint32_t len) { int received = socketpool_socket_recv_into(self, buf, len); if (received < 0) { - mp_raise_OSError(received); + mp_raise_OSError(-received); } return received; } diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk index 241cbcd0df..f1fa24a59b 100644 --- a/ports/espressif/mpconfigport.mk +++ b/ports/espressif/mpconfigport.mk @@ -25,6 +25,7 @@ CIRCUITPY_CANIO ?= 1 CIRCUITPY_COPROC ?= 1 CIRCUITPY_COUNTIO ?= 1 CIRCUITPY_DUALBANK ?= 1 +CIRCUITPY_ESP32_CAMERA ?= 1 CIRCUITPY_ESPIDF ?= 1 CIRCUITPY_FRAMEBUFFERIO ?= 1 CIRCUITPY_FREQUENCYIO ?= 1 diff --git a/ports/nrf/boards/aramcon2_badge/mpconfigboard.h b/ports/nrf/boards/aramcon2_badge/mpconfigboard.h index 517ad7324b..af8e3c3507 100644 --- a/ports/nrf/boards/aramcon2_badge/mpconfigboard.h +++ b/ports/nrf/boards/aramcon2_badge/mpconfigboard.h @@ -52,7 +52,7 @@ #define CIRCUITPY_BOOT_BUTTON (&pin_P0_29) -#define BOARD_USER_SAFE_MODE_ACTION translate("pressing the left button at start up\n") +#define BOARD_USER_SAFE_MODE_ACTION translate("The left button was pressed at start up.\n") #define CIRCUITPY_INTERNAL_NVM_SIZE (4096) diff --git a/ports/nrf/common-hal/alarm/SleepMemory.h b/ports/nrf/common-hal/alarm/SleepMemory.h index 8fd702ea83..bb50c36e89 100644 --- a/ports/nrf/common-hal/alarm/SleepMemory.h +++ b/ports/nrf/common-hal/alarm/SleepMemory.h @@ -24,8 +24,7 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_ALARM_SLEEPMEMORY_H -#define MICROPY_INCLUDED_NRF_COMMON_HAL_ALARM_SLEEPMEMORY_H +#pragma once #include "py/obj.h" @@ -37,5 +36,3 @@ typedef struct { extern void set_memory_retention(void); extern void alarm_sleep_memory_reset(void); - -#endif // MICROPY_INCLUDED_NRF_COMMON_HAL_ALARM_SLEEPMEMORY_H diff --git a/ports/nrf/common-hal/alarm/__init__.c b/ports/nrf/common-hal/alarm/__init__.c index 75f616c805..b3f9979ae0 100644 --- a/ports/nrf/common-hal/alarm/__init__.c +++ b/ports/nrf/common-hal/alarm/__init__.c @@ -56,6 +56,10 @@ const alarm_sleep_memory_obj_t alarm_sleep_memory_obj = { }, }; +// Non-heap alarm object recording alarm (if any) that woke up CircuitPython after light or deep sleep. +// This object lives across VM instantiations, so none of these objects can contain references to the heap. +alarm_wake_alarm_union_t alarm_wake_alarm; + void alarm_reset(void) { alarm_sleep_memory_reset(); alarm_pin_pinalarm_reset(); @@ -115,19 +119,19 @@ bool common_hal_alarm_woken_from_sleep(void) { || cause == NRF_SLEEP_WAKEUP_TOUCHPAD; } -mp_obj_t common_hal_alarm_create_wake_alarm(void) { +mp_obj_t common_hal_alarm_record_wake_alarm(void) { // If woken from deep sleep, create a copy alarm similar to what would have // been passed in originally. Otherwise, just return none nrf_sleep_source_t cause = _get_wakeup_cause(); switch (cause) { case NRF_SLEEP_WAKEUP_TIMER: { - return alarm_time_timealarm_create_wakeup_alarm(); + return alarm_time_timealarm_record_wake_alarm(); } case NRF_SLEEP_WAKEUP_TOUCHPAD: { - return alarm_touch_touchalarm_create_wakeup_alarm(); + return alarm_touch_touchalarm_record_wake_alarm(); } case NRF_SLEEP_WAKEUP_GPIO: { - return alarm_pin_pinalarm_create_wakeup_alarm(); + return alarm_pin_pinalarm_record_wake_alarm(); } default: break; diff --git a/ports/nrf/common-hal/alarm/__init__.h b/ports/nrf/common-hal/alarm/__init__.h index 47051dbd72..7c4634610d 100644 --- a/ports/nrf/common-hal/alarm/__init__.h +++ b/ports/nrf/common-hal/alarm/__init__.h @@ -25,10 +25,12 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_NRF_COMMON_HAL_ALARM__INIT__H -#define MICROPY_INCLUDED_NRF_COMMON_HAL_ALARM__INIT__H +#pragma once #include "common-hal/alarm/SleepMemory.h" +#include "common-hal/alarm/pin/PinAlarm.h" +#include "common-hal/alarm/time/TimeAlarm.h" +#include "common-hal/alarm/touch/TouchAlarm.h" typedef enum { NRF_SLEEP_WAKEUP_UNDEFINED, @@ -40,6 +42,13 @@ typedef enum { NRF_SLEEP_WAKEUP_ZZZ } nrf_sleep_source_t; +typedef union { + alarm_pin_pinalarm_obj_t pin_alarm; + alarm_time_timealarm_obj_t time_alarm; + alarm_touch_touchalarm_obj_t touch_alarm; +} alarm_wake_alarm_union_t; + +extern alarm_wake_alarm_union_t alarm_wake_alarm; extern const alarm_sleep_memory_obj_t alarm_sleep_memory_obj; enum { @@ -52,5 +61,3 @@ extern uint8_t sleepmem_wakeup_event; extern uint8_t sleepmem_wakeup_pin; extern void alarm_reset(void); - -#endif // MICROPY_INCLUDED_NRF_COMMON_HAL_ALARM__INIT__H diff --git a/ports/nrf/common-hal/alarm/pin/PinAlarm.c b/ports/nrf/common-hal/alarm/pin/PinAlarm.c index 9d0f8f4b88..5bef48773e 100644 --- a/ports/nrf/common-hal/alarm/pin/PinAlarm.c +++ b/ports/nrf/common-hal/alarm/pin/PinAlarm.c @@ -30,10 +30,9 @@ #include #include +#include "shared-bindings/alarm/__init__.h" #include "shared-bindings/alarm/pin/PinAlarm.h" #include "shared-bindings/microcontroller/__init__.h" -#include "shared-bindings/microcontroller/Pin.h" -#include "common-hal/alarm/__init__.h" #include "nrfx.h" #include "nrf_gpio.h" @@ -101,8 +100,9 @@ mp_obj_t alarm_pin_pinalarm_find_triggered_alarm(size_t n_alarms, const mp_obj_t return mp_const_none; } -mp_obj_t alarm_pin_pinalarm_create_wakeup_alarm(void) { - alarm_pin_pinalarm_obj_t *alarm = m_new_obj(alarm_pin_pinalarm_obj_t); +mp_obj_t alarm_pin_pinalarm_record_wake_alarm(void) { + alarm_pin_pinalarm_obj_t *const alarm = &alarm_wake_alarm.pin_alarm; + alarm->base.type = &alarm_pin_pinalarm_type; alarm->pin = NULL; // Map the pin number back to a pin object. diff --git a/ports/nrf/common-hal/alarm/pin/PinAlarm.h b/ports/nrf/common-hal/alarm/pin/PinAlarm.h index 87b7b9833c..9181cb6094 100644 --- a/ports/nrf/common-hal/alarm/pin/PinAlarm.h +++ b/ports/nrf/common-hal/alarm/pin/PinAlarm.h @@ -24,9 +24,13 @@ * THE SOFTWARE. */ +#pragma once + #include "py/obj.h" #include "py/objtuple.h" +#include "shared-bindings/microcontroller/Pin.h" + typedef struct { mp_obj_base_t base; const mcu_pin_obj_t *pin; @@ -35,7 +39,7 @@ typedef struct { } alarm_pin_pinalarm_obj_t; mp_obj_t alarm_pin_pinalarm_find_triggered_alarm(size_t n_alarms, const mp_obj_t *alarms); -mp_obj_t alarm_pin_pinalarm_create_wakeup_alarm(void); +mp_obj_t alarm_pin_pinalarm_record_wake_alarm(void); void alarm_pin_pinalarm_reset(void); void alarm_pin_pinalarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms); diff --git a/ports/nrf/common-hal/alarm/time/TimeAlarm.c b/ports/nrf/common-hal/alarm/time/TimeAlarm.c index 03b91068f9..a69e299bc2 100644 --- a/ports/nrf/common-hal/alarm/time/TimeAlarm.c +++ b/ports/nrf/common-hal/alarm/time/TimeAlarm.c @@ -28,7 +28,7 @@ #include "py/runtime.h" #include -#include "common-hal/alarm/__init__.h" +#include "shared-bindings/alarm/__init__.h" #include "shared-bindings/alarm/time/TimeAlarm.h" #include "shared-bindings/time/__init__.h" @@ -49,12 +49,13 @@ mp_obj_t alarm_time_timealarm_find_triggered_alarm(size_t n_alarms, const mp_obj return mp_const_none; } -mp_obj_t alarm_time_timealarm_create_wakeup_alarm(void) { - alarm_time_timealarm_obj_t *timer = m_new_obj(alarm_time_timealarm_obj_t); - timer->base.type = &alarm_time_timealarm_type; +mp_obj_t alarm_time_timealarm_record_wake_alarm(void) { + alarm_time_timealarm_obj_t *const alarm = &alarm_wake_alarm.time_alarm; + + alarm->base.type = &alarm_time_timealarm_type; // TODO: Set monotonic_time based on the RTC state. - timer->monotonic_time = 0.0f; - return timer; + alarm->monotonic_time = 0.0f; + return alarm; } bool alarm_time_timealarm_woke_this_cycle(void) { diff --git a/ports/nrf/common-hal/alarm/time/TimeAlarm.h b/ports/nrf/common-hal/alarm/time/TimeAlarm.h index 734feb1c87..c5f76c8003 100644 --- a/ports/nrf/common-hal/alarm/time/TimeAlarm.h +++ b/ports/nrf/common-hal/alarm/time/TimeAlarm.h @@ -24,6 +24,7 @@ * THE SOFTWARE. */ +#pragma once #include "py/obj.h" @@ -37,7 +38,7 @@ extern void port_disable_interrupt_after_ticks_ch(uint32_t channel); extern void port_interrupt_after_ticks_ch(uint32_t channel, uint32_t ticks); mp_obj_t alarm_time_timealarm_find_triggered_alarm(size_t n_alarms, const mp_obj_t *alarms); -mp_obj_t alarm_time_timealarm_create_wakeup_alarm(void); +mp_obj_t alarm_time_timealarm_record_wake_alarm(void); bool alarm_time_timealarm_woke_this_cycle(void); void alarm_time_timealarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms); diff --git a/ports/nrf/common-hal/alarm/touch/TouchAlarm.c b/ports/nrf/common-hal/alarm/touch/TouchAlarm.c index f8daf50f54..5c1d489262 100644 --- a/ports/nrf/common-hal/alarm/touch/TouchAlarm.c +++ b/ports/nrf/common-hal/alarm/touch/TouchAlarm.c @@ -25,6 +25,7 @@ */ #include "py/runtime.h" + #include "shared-bindings/alarm/touch/TouchAlarm.h" #include "shared-bindings/microcontroller/__init__.h" @@ -39,7 +40,7 @@ mp_obj_t alarm_touch_touchalarm_find_triggered_alarm(const size_t n_alarms, cons return mp_const_none; } -mp_obj_t alarm_touch_touchalarm_create_wakeup_alarm(void) { +mp_obj_t alarm_touch_touchalarm_record_wake_alarm(void) { return mp_const_none; } diff --git a/ports/nrf/common-hal/alarm/touch/TouchAlarm.h b/ports/nrf/common-hal/alarm/touch/TouchAlarm.h index 58ad8c20fe..31aa30117a 100644 --- a/ports/nrf/common-hal/alarm/touch/TouchAlarm.h +++ b/ports/nrf/common-hal/alarm/touch/TouchAlarm.h @@ -24,8 +24,7 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_COMMON_HAL_ALARM_TOUCH_TOUCHALARM_H -#define MICROPY_INCLUDED_COMMON_HAL_ALARM_TOUCH_TOUCHALARM_H +#pragma once #include "py/obj.h" #include "common-hal/microcontroller/Pin.h" @@ -37,11 +36,9 @@ typedef struct { // Find the alarm object that caused us to wake up or create an equivalent one. mp_obj_t alarm_touch_touchalarm_find_triggered_alarm(const size_t n_alarms, const mp_obj_t *alarms); -mp_obj_t alarm_touch_touchalarm_create_wakeup_alarm(void); +mp_obj_t alarm_touch_touchalarm_record_wake_alarm(void); // Check for the wake up alarm from pretend deep sleep. void alarm_touch_touchalarm_set_alarm(const bool deep_sleep, const size_t n_alarms, const mp_obj_t *alarms); void alarm_touch_touchalarm_prepare_for_deep_sleep(void); bool alarm_touch_touchalarm_woke_this_cycle(void); void alarm_touch_touchalarm_reset(void); - -#endif // MICROPY_INCLUDED_COMMON_HAL_ALARM_TOUCH_TOUCHALARM_H diff --git a/ports/nrf/supervisor/port.c b/ports/nrf/supervisor/port.c index 0ed1ecd547..e67f641900 100644 --- a/ports/nrf/supervisor/port.c +++ b/ports/nrf/supervisor/port.c @@ -64,11 +64,11 @@ #include "lib/tinyusb/src/device/usbd.h" -#ifdef CIRCUITPY_AUDIOBUSIO +#if CIRCUITPY_AUDIOBUSIO #include "common-hal/audiobusio/I2SOut.h" #endif -#ifdef CIRCUITPY_AUDIOPWMIO +#if CIRCUITPY_AUDIOPWMIO #include "common-hal/audiopwmio/PWMAudioOut.h" #endif diff --git a/ports/raspberrypi/boards/42keebs_frood/board.c b/ports/raspberrypi/boards/42keebs_frood/board.c new file mode 100644 index 0000000000..331653173e --- /dev/null +++ b/ports/raspberrypi/boards/42keebs_frood/board.c @@ -0,0 +1,29 @@ +/* + * 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" + +// Use the MP_WEAK supervisor/shared/board.c versions of routines not defined here. diff --git a/ports/raspberrypi/boards/42keebs_frood/mpconfigboard.h b/ports/raspberrypi/boards/42keebs_frood/mpconfigboard.h new file mode 100644 index 0000000000..7f8bcda931 --- /dev/null +++ b/ports/raspberrypi/boards/42keebs_frood/mpconfigboard.h @@ -0,0 +1,12 @@ +#define MICROPY_HW_BOARD_NAME "42. Keebs Frood" +#define MICROPY_HW_MCU_NAME "rp2040" + +#define DEFAULT_I2C_BUS_SCL (&pin_GPIO3) +#define DEFAULT_I2C_BUS_SDA (&pin_GPIO2) + +#define DEFAULT_SPI_BUS_SCK (&pin_GPIO22) +#define DEFAULT_SPI_BUS_MOSI (&pin_GPIO23) +#define DEFAULT_SPI_BUS_MISO (&pin_GPIO20) + +#define DEFAULT_UART_BUS_RX (&pin_GPIO1) +#define DEFAULT_UART_BUS_TX (&pin_GPIO0) diff --git a/ports/raspberrypi/boards/42keebs_frood/mpconfigboard.mk b/ports/raspberrypi/boards/42keebs_frood/mpconfigboard.mk new file mode 100644 index 0000000000..955d8d63f5 --- /dev/null +++ b/ports/raspberrypi/boards/42keebs_frood/mpconfigboard.mk @@ -0,0 +1,9 @@ +USB_VID = 0x1209 +USB_PID = 0x4203 +USB_PRODUCT = "Frood" +USB_MANUFACTURER = "42. Keebs" + +CHIP_VARIANT = RP2040 +CHIP_FAMILY = rp2 + +EXTERNAL_FLASH_DEVICES = "ZD25WQ16B" diff --git a/ports/raspberrypi/boards/42keebs_frood/pico-sdk-configboard.h b/ports/raspberrypi/boards/42keebs_frood/pico-sdk-configboard.h new file mode 100644 index 0000000000..36da55d457 --- /dev/null +++ b/ports/raspberrypi/boards/42keebs_frood/pico-sdk-configboard.h @@ -0,0 +1 @@ +// Put board-specific pico-sdk definitions here. This file must exist. diff --git a/ports/raspberrypi/boards/42keebs_frood/pins.c b/ports/raspberrypi/boards/42keebs_frood/pins.c new file mode 100644 index 0000000000..d5cf864768 --- /dev/null +++ b/ports/raspberrypi/boards/42keebs_frood/pins.c @@ -0,0 +1,50 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_module_globals_table[] = { + CIRCUITPYTHON_BOARD_DICT_STANDARD_ITEMS + + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_D26), MP_ROM_PTR(&pin_GPIO26) }, + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_D27), MP_ROM_PTR(&pin_GPIO27) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_D28), MP_ROM_PTR(&pin_GPIO28) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, + { MP_ROM_QSTR(MP_QSTR_D29), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_D22), MP_ROM_PTR(&pin_GPIO22) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_D23), MP_ROM_PTR(&pin_GPIO23) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_GPIO20) }, + { MP_ROM_QSTR(MP_QSTR_D20), MP_ROM_PTR(&pin_GPIO20) }, + + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_GPIO3) }, + + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_RX), MP_ROM_PTR(&pin_GPIO1) }, + { MP_ROM_QSTR(MP_QSTR_D0), MP_ROM_PTR(&pin_GPIO0) }, + { MP_ROM_QSTR(MP_QSTR_TX), MP_ROM_PTR(&pin_GPIO0) }, + + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_GPIO2) }, + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_GPIO3) }, + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_GPIO4) }, + { MP_ROM_QSTR(MP_QSTR_D5), MP_ROM_PTR(&pin_GPIO5) }, + { MP_ROM_QSTR(MP_QSTR_D6), MP_ROM_PTR(&pin_GPIO6) }, + { MP_ROM_QSTR(MP_QSTR_D7), MP_ROM_PTR(&pin_GPIO7) }, + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_GPIO8) }, + { MP_ROM_QSTR(MP_QSTR_D9), MP_ROM_PTR(&pin_GPIO9) }, + { MP_ROM_QSTR(MP_QSTR_D21), MP_ROM_PTR(&pin_GPIO21) }, + + { MP_ROM_QSTR(MP_QSTR_D12), MP_ROM_PTR(&pin_GPIO12) }, + { MP_ROM_QSTR(MP_QSTR_D13), MP_ROM_PTR(&pin_GPIO13) }, + { MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_GPIO14) }, + { MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_GPIO15) }, + { MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_GPIO16) }, + + { MP_ROM_QSTR(MP_QSTR_I2C), MP_ROM_PTR(&board_i2c_obj) }, + { MP_ROM_QSTR(MP_QSTR_SPI), MP_ROM_PTR(&board_spi_obj) }, + { MP_ROM_QSTR(MP_QSTR_UART), MP_ROM_PTR(&board_uart_obj) }, +}; +MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.h b/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.h index efb2fc3402..4714241999 100644 --- a/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.h +++ b/ports/raspberrypi/boards/raspberry_pi_pico/mpconfigboard.h @@ -1,2 +1,5 @@ #define MICROPY_HW_BOARD_NAME "Raspberry Pi Pico" #define MICROPY_HW_MCU_NAME "rp2040" + +#define CIRCUITPY_BOARD_I2C (1) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO5, .sda = &pin_GPIO4}} diff --git a/ports/raspberrypi/boards/raspberry_pi_pico/pins.c b/ports/raspberrypi/boards/raspberry_pi_pico/pins.c index 87ff27fa46..2d56b93757 100644 --- a/ports/raspberrypi/boards/raspberry_pi_pico/pins.c +++ b/ports/raspberrypi/boards/raspberry_pi_pico/pins.c @@ -50,5 +50,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_GPIO29) }, { MP_ROM_QSTR(MP_QSTR_VOLTAGE_MONITOR), MP_ROM_PTR(&pin_GPIO29) }, + + { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/boards/raspberry_pi_pico_w/mpconfigboard.h b/ports/raspberrypi/boards/raspberry_pi_pico_w/mpconfigboard.h index 58a291b18b..e5d8660b2b 100644 --- a/ports/raspberrypi/boards/raspberry_pi_pico_w/mpconfigboard.h +++ b/ports/raspberrypi/boards/raspberry_pi_pico_w/mpconfigboard.h @@ -3,3 +3,6 @@ #define CIRCUITPY_DIGITALIO_HAVE_INVALID_PULL (1) #define CIRCUITPY_DIGITALIO_HAVE_INVALID_DRIVE_MODE (1) + +#define CIRCUITPY_BOARD_I2C (1) +#define CIRCUITPY_BOARD_I2C_PIN {{.scl = &pin_GPIO5, .sda = &pin_GPIO4}} diff --git a/ports/raspberrypi/boards/raspberry_pi_pico_w/pins.c b/ports/raspberrypi/boards/raspberry_pi_pico_w/pins.c index b3c3c93d57..5a63e43a6d 100644 --- a/ports/raspberrypi/boards/raspberry_pi_pico_w/pins.c +++ b/ports/raspberrypi/boards/raspberry_pi_pico_w/pins.c @@ -44,5 +44,7 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_GP28_A2), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_GP28), MP_ROM_PTR(&pin_GPIO28) }, { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_GPIO28) }, + + { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_i2c_obj) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/raspberrypi/common-hal/alarm/SleepMemory.h b/ports/raspberrypi/common-hal/alarm/SleepMemory.h index 59d0429c3b..14848cd5a0 100644 --- a/ports/raspberrypi/common-hal/alarm/SleepMemory.h +++ b/ports/raspberrypi/common-hal/alarm/SleepMemory.h @@ -24,8 +24,7 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_ALARM_SLEEPMEMORY_H -#define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_ALARM_SLEEPMEMORY_H +#pragma once #include "py/obj.h" @@ -34,5 +33,3 @@ typedef struct { } alarm_sleep_memory_obj_t; extern void alarm_sleep_memory_reset(void); - -#endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_ALARM_SLEEPMEMORY_H diff --git a/ports/raspberrypi/common-hal/alarm/__init__.c b/ports/raspberrypi/common-hal/alarm/__init__.c index 9cfa390116..656d15af5a 100644 --- a/ports/raspberrypi/common-hal/alarm/__init__.c +++ b/ports/raspberrypi/common-hal/alarm/__init__.c @@ -96,6 +96,10 @@ const alarm_sleep_memory_obj_t alarm_sleep_memory_obj = { }, }; +// Non-heap alarm object recording alarm (if any) that woke up CircuitPython after light or deep sleep. +// This object lives across VM instantiations, so none of these objects can contain references to the heap. +alarm_wake_alarm_union_t alarm_wake_alarm; + void alarm_reset(void) { alarm_sleep_memory_reset(); alarm_pin_pinalarm_reset(); @@ -131,17 +135,17 @@ bool common_hal_alarm_woken_from_sleep(void) { return _get_wakeup_cause() != RP_SLEEP_WAKEUP_UNDEF; } -mp_obj_t common_hal_alarm_create_wake_alarm(void) { +mp_obj_t common_hal_alarm_record_wake_alarm(void) { // If woken from deep sleep, create a copy alarm similar to what would have // been passed in originally. Otherwise, just return none uint8_t cause = _get_wakeup_cause(); switch (cause) { case RP_SLEEP_WAKEUP_RTC: { - return alarm_time_timealarm_create_wakeup_alarm(); + return alarm_time_timealarm_record_wake_alarm(); } case RP_SLEEP_WAKEUP_GPIO: { - return alarm_pin_pinalarm_create_wakeup_alarm(); + return alarm_pin_pinalarm_record_wake_alarm(); } case RP_SLEEP_WAKEUP_UNDEF: diff --git a/ports/raspberrypi/common-hal/alarm/__init__.h b/ports/raspberrypi/common-hal/alarm/__init__.h index 3d5d86f8dc..284e3ddb4e 100644 --- a/ports/raspberrypi/common-hal/alarm/__init__.h +++ b/ports/raspberrypi/common-hal/alarm/__init__.h @@ -24,10 +24,11 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_ALARM__INIT__H -#define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_ALARM__INIT__H +#pragma once #include "common-hal/alarm/SleepMemory.h" +#include "common-hal/alarm/pin/PinAlarm.h" +#include "common-hal/alarm/time/TimeAlarm.h" #include "hardware/regs/clocks.h" @@ -35,8 +36,12 @@ #define RP_SLEEP_WAKEUP_GPIO 1 #define RP_SLEEP_WAKEUP_RTC 2 +typedef union { + alarm_pin_pinalarm_obj_t pin_alarm; + alarm_time_timealarm_obj_t time_alarm; +} alarm_wake_alarm_union_t; + +extern alarm_wake_alarm_union_t alarm_wake_alarm; extern const alarm_sleep_memory_obj_t alarm_sleep_memory_obj; extern void alarm_reset(void); - -#endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_ALARM__INIT__H diff --git a/ports/raspberrypi/common-hal/alarm/pin/PinAlarm.c b/ports/raspberrypi/common-hal/alarm/pin/PinAlarm.c index 28ea60d682..0af27cb44f 100644 --- a/ports/raspberrypi/common-hal/alarm/pin/PinAlarm.c +++ b/ports/raspberrypi/common-hal/alarm/pin/PinAlarm.c @@ -26,10 +26,10 @@ #include "py/runtime.h" +#include "shared-bindings/alarm/__init__.h" #include "shared-bindings/alarm/pin/PinAlarm.h" #include "shared-bindings/microcontroller/__init__.h" #include "common-hal/microcontroller/__init__.h" -#include "shared-bindings/microcontroller/Pin.h" #include "pico/stdlib.h" #include "hardware/gpio.h" @@ -94,10 +94,12 @@ mp_obj_t alarm_pin_pinalarm_find_triggered_alarm(size_t n_alarms, const mp_obj_t return mp_const_none; } -mp_obj_t alarm_pin_pinalarm_create_wakeup_alarm(void) { - alarm_pin_pinalarm_obj_t *alarm = m_new_obj(alarm_pin_pinalarm_obj_t); +mp_obj_t alarm_pin_pinalarm_record_wake_alarm(void) { + alarm_pin_pinalarm_obj_t *const alarm = &alarm_wake_alarm.pin_alarm; + alarm->base.type = &alarm_pin_pinalarm_type; // TODO: how to obtain the correct pin from memory? + alarm->pin = NULL; return alarm; } diff --git a/ports/raspberrypi/common-hal/alarm/pin/PinAlarm.h b/ports/raspberrypi/common-hal/alarm/pin/PinAlarm.h index d31ac6c878..9dcbf2b848 100644 --- a/ports/raspberrypi/common-hal/alarm/pin/PinAlarm.h +++ b/ports/raspberrypi/common-hal/alarm/pin/PinAlarm.h @@ -24,9 +24,13 @@ * THE SOFTWARE. */ +#pragma once + #include "py/obj.h" #include "py/objtuple.h" +#include "shared-bindings/microcontroller/Pin.h" + typedef struct { mp_obj_base_t base; const mcu_pin_obj_t *pin; @@ -36,7 +40,7 @@ typedef struct { } alarm_pin_pinalarm_obj_t; mp_obj_t alarm_pin_pinalarm_find_triggered_alarm(size_t n_alarms, const mp_obj_t *alarms); -mp_obj_t alarm_pin_pinalarm_create_wakeup_alarm(void); +mp_obj_t alarm_pin_pinalarm_record_wake_alarm(void); void alarm_pin_pinalarm_reset(void); void alarm_pin_pinalarm_light_reset(void); diff --git a/ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c b/ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c index 16ac8fc31e..9bfe5cf262 100644 --- a/ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c +++ b/ports/raspberrypi/common-hal/alarm/time/TimeAlarm.c @@ -26,6 +26,7 @@ #include "py/runtime.h" +#include "shared-bindings/alarm/__init__.h" #include "shared-bindings/alarm/time/TimeAlarm.h" #include "shared-bindings/time/__init__.h" @@ -58,12 +59,13 @@ mp_obj_t alarm_time_timealarm_find_triggered_alarm(size_t n_alarms, const mp_obj return mp_const_none; } -mp_obj_t alarm_time_timealarm_create_wakeup_alarm(void) { - alarm_time_timealarm_obj_t *timer = m_new_obj(alarm_time_timealarm_obj_t); - timer->base.type = &alarm_time_timealarm_type; +mp_obj_t alarm_time_timealarm_record_wake_alarm(void) { + alarm_time_timealarm_obj_t *const alarm = &alarm_wake_alarm.time_alarm; + + alarm->base.type = &alarm_time_timealarm_type; // TODO: Set monotonic_time based on the RTC state. - timer->monotonic_time = 0.0f; - return timer; + alarm->monotonic_time = 0.0f; + return alarm; } bool alarm_time_timealarm_woke_this_cycle(void) { diff --git a/ports/raspberrypi/common-hal/alarm/time/TimeAlarm.h b/ports/raspberrypi/common-hal/alarm/time/TimeAlarm.h index d5248551ae..0b4c8bce06 100644 --- a/ports/raspberrypi/common-hal/alarm/time/TimeAlarm.h +++ b/ports/raspberrypi/common-hal/alarm/time/TimeAlarm.h @@ -24,6 +24,7 @@ * THE SOFTWARE. */ +#pragma once #include "py/obj.h" @@ -33,7 +34,7 @@ typedef struct { } alarm_time_timealarm_obj_t; mp_obj_t alarm_time_timealarm_find_triggered_alarm(size_t n_alarms, const mp_obj_t *alarms); -mp_obj_t alarm_time_timealarm_create_wakeup_alarm(void); +mp_obj_t alarm_time_timealarm_record_wake_alarm(void); void alarm_time_timealarm_reset(void); void alarm_time_timealarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms); diff --git a/ports/raspberrypi/common-hal/alarm/touch/TouchAlarm.h b/ports/raspberrypi/common-hal/alarm/touch/TouchAlarm.h index f631293511..6badde145f 100644 --- a/ports/raspberrypi/common-hal/alarm/touch/TouchAlarm.h +++ b/ports/raspberrypi/common-hal/alarm/touch/TouchAlarm.h @@ -24,8 +24,7 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_ALARM_TOUCH_TOUCHALARM_H -#define MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_ALARM_TOUCH_TOUCHALARM_H +#pragma once #include "py/obj.h" #include "common-hal/microcontroller/Pin.h" @@ -34,5 +33,3 @@ typedef struct { mp_obj_base_t base; const mcu_pin_obj_t *pin; } alarm_touch_touchalarm_obj_t; - -#endif // MICROPY_INCLUDED_RASPBERRYPI_COMMON_HAL_ALARM_TOUCH_TOUCHALARM_H diff --git a/ports/raspberrypi/common-hal/socketpool/Socket.c b/ports/raspberrypi/common-hal/socketpool/Socket.c index 71a31379ad..a099ef9f79 100644 --- a/ports/raspberrypi/common-hal/socketpool/Socket.c +++ b/ports/raspberrypi/common-hal/socketpool/Socket.c @@ -852,6 +852,8 @@ bool common_hal_socketpool_socket_bind(socketpool_socket_obj_t *socket, mp_raise_OSError(EHOSTUNREACH); } + ip_set_option(socket->pcb.ip, SOF_REUSEADDR); + err_t err = ERR_ARG; switch (socket->type) { case MOD_NETWORK_SOCK_STREAM: { diff --git a/ports/raspberrypi/common-hal/socketpool/Socket.h b/ports/raspberrypi/common-hal/socketpool/Socket.h index f582b77a9b..6e26087674 100644 --- a/ports/raspberrypi/common-hal/socketpool/Socket.h +++ b/ports/raspberrypi/common-hal/socketpool/Socket.h @@ -37,6 +37,7 @@ typedef struct _lwip_socket_obj_t { mp_obj_base_t base; volatile union { + struct tcp_pcb *ip; struct tcp_pcb *tcp; struct udp_pcb *udp; struct raw_pcb *raw; diff --git a/ports/raspberrypi/common-hal/ssl/SSLSocket.c b/ports/raspberrypi/common-hal/ssl/SSLSocket.c index 1d42a4b710..21e2a95c90 100644 --- a/ports/raspberrypi/common-hal/ssl/SSLSocket.c +++ b/ports/raspberrypi/common-hal/ssl/SSLSocket.c @@ -284,7 +284,7 @@ mp_uint_t common_hal_ssl_sslsocket_send(ssl_sslsocket_obj_t *self, const uint8_t } bool common_hal_ssl_sslsocket_bind(ssl_sslsocket_obj_t *self, const char *host, size_t hostlen, uint32_t port) { - mp_raise_NotImplementedError(NULL); + return common_hal_socketpool_socket_bind(self->sock, host, hostlen, port); } void common_hal_ssl_sslsocket_close(ssl_sslsocket_obj_t *self) { @@ -349,11 +349,14 @@ bool common_hal_ssl_sslsocket_get_connected(ssl_sslsocket_obj_t *self) { } bool common_hal_ssl_sslsocket_listen(ssl_sslsocket_obj_t *self, int backlog) { - mp_raise_NotImplementedError(NULL); + return common_hal_socketpool_socket_listen(self->sock, backlog); } ssl_sslsocket_obj_t *common_hal_ssl_sslsocket_accept(ssl_sslsocket_obj_t *self, uint8_t *ip, uint32_t *port) { - mp_raise_NotImplementedError(NULL); + socketpool_socket_obj_t *sock = common_hal_socketpool_socket_accept(self->sock, ip, port); + ssl_sslsocket_obj_t *sslsock = common_hal_ssl_sslcontext_wrap_socket(self->ssl_context, sock, true, NULL); + do_handshake(sslsock); + return sslsock; } void common_hal_ssl_sslsocket_settimeout(ssl_sslsocket_obj_t *self, uint32_t timeout_ms) { diff --git a/ports/raspberrypi/lwip_inc/lwipopts.h b/ports/raspberrypi/lwip_inc/lwipopts.h index 936a141602..0d4ecd3707 100644 --- a/ports/raspberrypi/lwip_inc/lwipopts.h +++ b/ports/raspberrypi/lwip_inc/lwipopts.h @@ -52,6 +52,7 @@ #define LWIP_NETIF_TX_SINGLE_PBUF 1 #define DHCP_DOES_ARP_CHECK 0 #define LWIP_DHCP_DOES_ACD_CHECK 0 +#define SO_REUSE 1 #ifndef NDEBUG #define LWIP_DEBUG 1 diff --git a/ports/stm/common-hal/alarm/SleepMemory.h b/ports/stm/common-hal/alarm/SleepMemory.h index 0e9fc54904..14848cd5a0 100644 --- a/ports/stm/common-hal/alarm/SleepMemory.h +++ b/ports/stm/common-hal/alarm/SleepMemory.h @@ -24,8 +24,7 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_SLEEPMEMORY_H -#define MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_SLEEPMEMORY_H +#pragma once #include "py/obj.h" @@ -34,5 +33,3 @@ typedef struct { } alarm_sleep_memory_obj_t; extern void alarm_sleep_memory_reset(void); - -#endif // MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_SLEEPMEMORY_H diff --git a/ports/stm/common-hal/alarm/__init__.c b/ports/stm/common-hal/alarm/__init__.c index 26099b0503..78d50b41a8 100644 --- a/ports/stm/common-hal/alarm/__init__.c +++ b/ports/stm/common-hal/alarm/__init__.c @@ -47,6 +47,10 @@ const alarm_sleep_memory_obj_t alarm_sleep_memory_obj = { }, }; +// Non-heap alarm object recording alarm (if any) that woke up CircuitPython after light or deep sleep. +// This object lives across VM instantiations, so none of these objects can contain references to the heap. +alarm_wake_alarm_union_t alarm_wake_alarm; + STATIC stm_sleep_source_t true_deep_wake_reason; void alarm_reset(void) { @@ -81,16 +85,16 @@ bool common_hal_alarm_woken_from_sleep(void) { return alarm_get_wakeup_cause() != STM_WAKEUP_UNDEF; } -mp_obj_t common_hal_alarm_create_wake_alarm(void) { +mp_obj_t common_hal_alarm_record_wake_alarm(void) { // If woken from deep sleep, create a copy alarm similar to what would have // been passed in originally. Otherwise, just return none stm_sleep_source_t cause = alarm_get_wakeup_cause(); switch (cause) { case STM_WAKEUP_RTC: { - return alarm_time_timealarm_create_wakeup_alarm(); + return alarm_time_timealarm_record_wake_alarm(); } case STM_WAKEUP_GPIO: { - return alarm_pin_pinalarm_create_wakeup_alarm(); + return alarm_pin_pinalarm_record_wake_alarm(); } case STM_WAKEUP_UNDEF: default: diff --git a/ports/stm/common-hal/alarm/__init__.h b/ports/stm/common-hal/alarm/__init__.h index 6c72364fc3..c87cb3b1eb 100644 --- a/ports/stm/common-hal/alarm/__init__.h +++ b/ports/stm/common-hal/alarm/__init__.h @@ -24,10 +24,11 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM__INIT__H -#define MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM__INIT__H +#pragma once #include "common-hal/alarm/SleepMemory.h" +#include "common-hal/alarm/pin/PinAlarm.h" +#include "common-hal/alarm/time/TimeAlarm.h" extern const alarm_sleep_memory_obj_t alarm_sleep_memory_obj; @@ -37,10 +38,15 @@ typedef enum { STM_WAKEUP_RTC } stm_sleep_source_t; +typedef union { + alarm_pin_pinalarm_obj_t pin_alarm; + alarm_time_timealarm_obj_t time_alarm; +} alarm_wake_alarm_union_t; + +extern alarm_wake_alarm_union_t alarm_wake_alarm; + #define STM_ALARM_FLAG (RTC->BKP0R) extern void alarm_set_wakeup_reason(stm_sleep_source_t reason); -stm_sleep_source_t alarm_get_wakeup_cause(void); +extern stm_sleep_source_t alarm_get_wakeup_cause(void); extern void alarm_reset(void); - -#endif // MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM__INIT__H diff --git a/ports/stm/common-hal/alarm/pin/PinAlarm.c b/ports/stm/common-hal/alarm/pin/PinAlarm.c index 0e5fa9e94d..161bd9fea6 100644 --- a/ports/stm/common-hal/alarm/pin/PinAlarm.c +++ b/ports/stm/common-hal/alarm/pin/PinAlarm.c @@ -26,6 +26,7 @@ #include "py/runtime.h" +#include "shared-bindings/alarm/__init__.h" #include "shared-bindings/alarm/pin/PinAlarm.h" #include "peripherals/exti.h" @@ -100,8 +101,9 @@ mp_obj_t alarm_pin_pinalarm_find_triggered_alarm(size_t n_alarms, const mp_obj_t return mp_const_none; } -mp_obj_t alarm_pin_pinalarm_create_wakeup_alarm(void) { - alarm_pin_pinalarm_obj_t *alarm = m_new_obj(alarm_pin_pinalarm_obj_t); +mp_obj_t alarm_pin_pinalarm_record_wake_alarm(void) { + alarm_pin_pinalarm_obj_t *const alarm = &alarm_wake_alarm.pin_alarm; + alarm->base.type = &alarm_pin_pinalarm_type; // TODO: replace this if/when other WKUP pins are supported alarm->pin = &pin_PA00; diff --git a/ports/stm/common-hal/alarm/pin/PinAlarm.h b/ports/stm/common-hal/alarm/pin/PinAlarm.h index bc52849a53..77e0c6143e 100644 --- a/ports/stm/common-hal/alarm/pin/PinAlarm.h +++ b/ports/stm/common-hal/alarm/pin/PinAlarm.h @@ -24,12 +24,13 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_PINALARM_H -#define MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_PINALARM_H +#pragma once #include "py/obj.h" #include "py/objtuple.h" +#include "shared-bindings/microcontroller/Pin.h" + typedef struct { mp_obj_base_t base; const mcu_pin_obj_t *pin; @@ -38,11 +39,9 @@ typedef struct { } alarm_pin_pinalarm_obj_t; mp_obj_t alarm_pin_pinalarm_find_triggered_alarm(size_t n_alarms, const mp_obj_t *alarms); -mp_obj_t alarm_pin_pinalarm_create_wakeup_alarm(void); +mp_obj_t alarm_pin_pinalarm_record_wake_alarm(void); void alarm_pin_pinalarm_reset(void); void alarm_pin_pinalarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms); void alarm_pin_pinalarm_prepare_for_deep_sleep(void); bool alarm_pin_pinalarm_woke_this_cycle(void); - -#endif // MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_PINALARM_H diff --git a/ports/stm/common-hal/alarm/time/TimeAlarm.c b/ports/stm/common-hal/alarm/time/TimeAlarm.c index 6d508cd8cc..9ba6ed7658 100644 --- a/ports/stm/common-hal/alarm/time/TimeAlarm.c +++ b/ports/stm/common-hal/alarm/time/TimeAlarm.c @@ -26,6 +26,7 @@ #include "py/runtime.h" +#include "shared-bindings/alarm/__init__.h" #include "shared-bindings/alarm/time/TimeAlarm.h" #include "shared-bindings/time/__init__.h" #include "peripherals/rtc.h" @@ -53,12 +54,13 @@ mp_obj_t alarm_time_timealarm_find_triggered_alarm(size_t n_alarms, const mp_obj return mp_const_none; } -mp_obj_t alarm_time_timealarm_create_wakeup_alarm(void) { - alarm_time_timealarm_obj_t *timer = m_new_obj(alarm_time_timealarm_obj_t); - timer->base.type = &alarm_time_timealarm_type; +mp_obj_t alarm_time_timealarm_record_wake_alarm(void) { + alarm_time_timealarm_obj_t *const alarm = &alarm_wake_alarm.time_alarm; + + alarm->base.type = &alarm_time_timealarm_type; // TODO: Set monotonic_time based on the RTC state. - timer->monotonic_time = 0.0f; - return timer; + alarm->monotonic_time = 0.0f; + return alarm; } // This is run in the timer task. We use it to wake the main CircuitPython task. diff --git a/ports/stm/common-hal/alarm/time/TimeAlarm.h b/ports/stm/common-hal/alarm/time/TimeAlarm.h index 48531ebdf6..e3b9caadcd 100644 --- a/ports/stm/common-hal/alarm/time/TimeAlarm.h +++ b/ports/stm/common-hal/alarm/time/TimeAlarm.h @@ -24,8 +24,7 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_TIMEALARM_H -#define MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_TIMEALARM_H +#pragma once #include "py/obj.h" @@ -35,12 +34,10 @@ typedef struct { } alarm_time_timealarm_obj_t; mp_obj_t alarm_time_timealarm_find_triggered_alarm(size_t n_alarms, const mp_obj_t *alarms); -mp_obj_t alarm_time_timealarm_create_wakeup_alarm(void); +mp_obj_t alarm_time_timealarm_record_wake_alarm(void); bool alarm_time_timealarm_woke_this_cycle(void); void alarm_time_timealarm_set_alarms(bool deep_sleep, size_t n_alarms, const mp_obj_t *alarms); void alarm_time_timealarm_reset(void); void alarm_time_timealarm_prepare_for_deep_sleep(void); - -#endif // MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_TIMEALARM_H diff --git a/ports/stm/common-hal/alarm/touch/TouchAlarm.h b/ports/stm/common-hal/alarm/touch/TouchAlarm.h index 6c89353f93..59f202c69d 100644 --- a/ports/stm/common-hal/alarm/touch/TouchAlarm.h +++ b/ports/stm/common-hal/alarm/touch/TouchAlarm.h @@ -24,12 +24,9 @@ * THE SOFTWARE. */ -#ifndef MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_TOUCHALARM_H -#define MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_TOUCHALARM_H +#pragma once typedef struct { mp_obj_base_t base; const mcu_pin_obj_t *pin; } alarm_touch_touchalarm_obj_t; - -#endif // MICROPY_INCLUDED_STM32_COMMON_HAL_ALARM_TOUCHALARM_H diff --git a/shared-bindings/_bleio/Characteristic.c b/shared-bindings/_bleio/Characteristic.c index 8a93915a8f..e1c5fc3ad5 100644 --- a/shared-bindings/_bleio/Characteristic.c +++ b/shared-bindings/_bleio/Characteristic.c @@ -278,6 +278,7 @@ STATIC MP_DEFINE_CONST_FUN_OBJ_KW(bleio_characteristic_set_cccd_obj, 1, bleio_ch STATIC const mp_rom_map_elem_t bleio_characteristic_locals_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_add_to_service), MP_ROM_PTR(&bleio_characteristic_add_to_service_obj) }, + { MP_ROM_QSTR(MP_QSTR_descriptors), MP_ROM_PTR(&bleio_characteristic_descriptors_obj) }, { MP_ROM_QSTR(MP_QSTR_properties), MP_ROM_PTR(&bleio_characteristic_properties_obj) }, { MP_ROM_QSTR(MP_QSTR_uuid), MP_ROM_PTR(&bleio_characteristic_uuid_obj) }, { MP_ROM_QSTR(MP_QSTR_value), MP_ROM_PTR(&bleio_characteristic_value_obj) }, diff --git a/shared-bindings/alarm/__init__.h b/shared-bindings/alarm/__init__.h index ea86e44f2f..82bfae4286 100644 --- a/shared-bindings/alarm/__init__.h +++ b/shared-bindings/alarm/__init__.h @@ -55,7 +55,7 @@ extern void common_hal_alarm_pretending_deep_sleep(void); extern mp_obj_t shared_alarm_get_wake_alarm(void); // Creates a new alarm object after exiting deep sleep (real or fake) -extern mp_obj_t common_hal_alarm_create_wake_alarm(void); +extern mp_obj_t common_hal_alarm_record_wake_alarm(void); // Saves alarm to global array void shared_alarm_save_wake_alarm(mp_obj_t alarm); diff --git a/shared-bindings/analogio/AnalogOut.c b/shared-bindings/analogio/AnalogOut.c index c8a109aa23..de6811b5a3 100644 --- a/shared-bindings/analogio/AnalogOut.c +++ b/shared-bindings/analogio/AnalogOut.c @@ -39,6 +39,9 @@ //| class AnalogOut: //| """Output analog values (a specific voltage). //| +//| **Limitations:** Not available on nRF, RP2040, Spresense, as there is no on-chip DAC. +//| On Espressif, available only on ESP32 and ESP32-S2; other chips do not have a DAC. +//| //| Example usage:: //| //| import analogio @@ -52,8 +55,6 @@ //| //| :param ~microcontroller.Pin pin: the pin to output to //| -//| **Limitations:** Not available on nRF, RP2040, Spresense: there is no on-chip DAC. -//| Espressif: available only on ESP32 and ESP32-S2; other chips do not have a DAC. //| """ //| ... STATIC mp_obj_t analogio_analogout_make_new(const mp_obj_type_t *type, mp_uint_t n_args, size_t n_kw, const mp_obj_t *args) { diff --git a/shared-bindings/microcontroller/Processor.c b/shared-bindings/microcontroller/Processor.c index 16312c0c94..3b671d0c7b 100644 --- a/shared-bindings/microcontroller/Processor.c +++ b/shared-bindings/microcontroller/Processor.c @@ -107,7 +107,7 @@ MP_PROPERTY_GETTER(mcu_processor_reset_reason_obj, //| Is `None` if the temperature is not available. //| //| **Limitations:** Not available on ESP32 or ESP32-S3. On small SAMD21 builds without external flash, -//| the reported temperature has reduced accuracy and precision, to save code space. +//| the reported temperature has reduced accuracy and precision, to save code space. //| """ STATIC mp_obj_t mcu_processor_get_temperature(mp_obj_t self) { float temperature = common_hal_mcu_processor_get_temperature(); diff --git a/supervisor/shared/safe_mode.c b/supervisor/shared/safe_mode.c index aefae1e48b..d23b78d624 100644 --- a/supervisor/shared/safe_mode.c +++ b/supervisor/shared/safe_mode.c @@ -146,18 +146,17 @@ void print_safe_mode_message(safe_mode_t reason) { switch (reason) { case USER_SAFE_MODE: - #ifdef BOARD_USER_SAFE_MODE_ACTION + #if defined(BOARD_USER_SAFE_MODE_ACTION) message = BOARD_USER_SAFE_MODE_ACTION; #elif defined(CIRCUITPY_BOOT_BUTTON) - message = translate("pressing boot button at start up.\n"); + message = translate("The BOOT button was pressed at start up.\n"); + #endif + #if defined(BOARD_USER_SAFE_MODE_ACTION) || defined(CIRCUITPY_BOOT_BUTTON) + // Output a user safe mode string if it's set. + serial_write_compressed(message); + message = translate("To exit, please reset the board without requesting safe mode."); + // The final piece is printed below. #endif - if (message != NULL) { - // Output a user safe mode string if it's set. - serial_write_compressed(translate("You requested starting safe mode by ")); - serial_write_compressed(message); - serial_write_compressed(translate("To exit, please reset the board without ")); - // The final piece is printed below. - } break; case MANUAL_SAFE_MODE: message = translate("You pressed the reset button during boot. Press again to exit safe mode.");