diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index feb6a7f633..bf9c1623f9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -253,6 +253,7 @@ jobs: - "pca10100" - "pewpew10" - "pewpew_m4" + - "picoplanet" - "pirkey_m0" - "pitaya_go" - "pyb_nano_v2" diff --git a/.readthedocs.yml b/.readthedocs.yml index 4030bc3178..2a0640782f 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -8,6 +8,10 @@ version: 2 +submodules: + include: + - extmod/ulab + python: version: 3 install: diff --git a/lib/mp-readline/readline.c b/lib/mp-readline/readline.c index 432413d501..464916ca4e 100644 --- a/lib/mp-readline/readline.c +++ b/lib/mp-readline/readline.c @@ -58,6 +58,16 @@ STATIC char *str_dup_maybe(const char *str) { return s2; } +STATIC size_t count_cont_bytes(char *start, char *end) { + int count = 0; + for (char *pos = start; pos < end; pos++) { + if(UTF8_IS_CONT(*pos)) { + count++; + } + } + return count; +} + // By default assume terminal which implements VT100 commands... #ifndef MICROPY_HAL_HAS_VT100 #define MICROPY_HAL_HAS_VT100 (1) @@ -92,6 +102,7 @@ typedef struct _readline_t { int escape_seq; int hist_cur; size_t cursor_pos; + uint8_t utf8_cont_chars; char escape_seq_buf[1]; const char *prompt; } readline_t; @@ -99,7 +110,8 @@ typedef struct _readline_t { STATIC readline_t rl; int readline_process_char(int c) { - size_t last_line_len = rl.line->len; + size_t last_line_len = utf8_charlen((byte *)rl.line->buf, rl.line->len); + int cont_chars = 0; int redraw_step_back = 0; bool redraw_from_cursor = false; int redraw_step_forward = 0; @@ -178,6 +190,12 @@ int readline_process_char(int c) { int nspace = 1; #endif + // Check if we have moved into a UTF-8 continuation byte + while (UTF8_IS_CONT(rl.line->buf[rl.cursor_pos-nspace])) { + nspace++; + cont_chars++; + } + // do the backspace vstr_cut_out_bytes(rl.line, rl.cursor_pos - nspace, nspace); // set redraw parameters @@ -206,12 +224,27 @@ int readline_process_char(int c) { redraw_step_forward = compl_len; } #endif - } else if (32 <= c ) { + } else if (32 <= c) { // printable character - vstr_ins_char(rl.line, rl.cursor_pos, c); - // set redraw parameters - redraw_from_cursor = true; - redraw_step_forward = 1; + char lcp = rl.line->buf[rl.cursor_pos]; + uint8_t cont_need = 0; + if (!UTF8_IS_CONT(c)) { + // ASCII or Lead code point + rl.utf8_cont_chars = 0; + lcp = c; + }else { + rl.utf8_cont_chars += 1; + } + if (lcp >= 0xc0 && lcp < 0xf8) { + cont_need = (0xe5 >> ((lcp >> 3) & 0x6)) & 3; // From unicode.c L195 + } + vstr_ins_char(rl.line, rl.cursor_pos+rl.utf8_cont_chars, c); + // set redraw parameters if we have the entire character + if (rl.utf8_cont_chars == cont_need) { + redraw_from_cursor = true; + redraw_step_forward = rl.utf8_cont_chars+1; + cont_chars = rl.utf8_cont_chars; + } } } else if (rl.escape_seq == ESEQ_ESC) { switch (c) { @@ -237,6 +270,8 @@ up_arrow_key: #endif // up arrow if (rl.hist_cur + 1 < (int)READLINE_HIST_SIZE && MP_STATE_PORT(readline_hist)[rl.hist_cur + 1] != NULL) { + // Check for continuation characters + cont_chars = count_cont_bytes(rl.line->buf+rl.orig_line_len, rl.line->buf+rl.cursor_pos); // increase hist num rl.hist_cur += 1; // set line to history @@ -253,6 +288,8 @@ down_arrow_key: #endif // down arrow if (rl.hist_cur >= 0) { + // Check for continuation characters + cont_chars = count_cont_bytes(rl.line->buf+rl.orig_line_len, rl.line->buf+rl.cursor_pos); // decrease hist num rl.hist_cur -= 1; // set line to history @@ -272,6 +309,11 @@ right_arrow_key: // right arrow if (rl.cursor_pos < rl.line->len) { redraw_step_forward = 1; + // Check if we have moved into a UTF-8 continuation byte + while (UTF8_IS_CONT(rl.line->buf[rl.cursor_pos+redraw_step_forward]) && + rl.cursor_pos+redraw_step_forward < rl.line->len) { + redraw_step_forward++; + } } } else if (c == 'D') { #if MICROPY_REPL_EMACS_KEYS @@ -280,6 +322,11 @@ left_arrow_key: // left arrow if (rl.cursor_pos > rl.orig_line_len) { redraw_step_back = 1; + // Check if we have moved into a UTF-8 continuation byte + while (UTF8_IS_CONT(rl.line->buf[rl.cursor_pos-redraw_step_back])) { + redraw_step_back++; + cont_chars++; + } } } else if (c == 'H') { // home @@ -331,18 +378,20 @@ delete_key: // redraw command prompt, efficiently if (redraw_step_back > 0) { - mp_hal_move_cursor_back(redraw_step_back); + mp_hal_move_cursor_back(redraw_step_back-cont_chars); rl.cursor_pos -= redraw_step_back; } if (redraw_from_cursor) { - if (rl.line->len < last_line_len) { + if (utf8_charlen((byte *)rl.line->buf, rl.line->len) < last_line_len) { // erase old chars mp_hal_erase_line_from_cursor(last_line_len - rl.cursor_pos); } + // Check for continuation characters + cont_chars = count_cont_bytes(rl.line->buf+rl.cursor_pos+redraw_step_forward, rl.line->buf+rl.line->len); // draw new chars mp_hal_stdout_tx_strn(rl.line->buf + rl.cursor_pos, rl.line->len - rl.cursor_pos); // move cursor forward if needed (already moved forward by length of line, so move it back) - mp_hal_move_cursor_back(rl.line->len - (rl.cursor_pos + redraw_step_forward)); + mp_hal_move_cursor_back(rl.line->len - (rl.cursor_pos + redraw_step_forward) - cont_chars); rl.cursor_pos += redraw_step_forward; } else if (redraw_step_forward > 0) { // draw over old chars to move cursor forwards diff --git a/locale/ID.po b/locale/ID.po index 05999b9c8c..9a1d86d26f 100644 --- a/locale/ID.po +++ b/locale/ID.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-07-28 16:57-0500\n" "PO-Revision-Date: 2020-07-06 18:10+0000\n" "Last-Translator: oon arfiandwi \n" "Language-Team: LANGUAGE \n" @@ -882,10 +882,6 @@ msgstr "operasi I/O pada file tertutup" msgid "I2C Init Error" msgstr "Gagal Inisialisasi I2C" -#: shared-bindings/audiobusio/I2SOut.c -msgid "I2SOut not available" -msgstr "" - #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" diff --git a/locale/circuitpython.pot b/locale/circuitpython.pot index f1f6bec5bc..0a7def281f 100644 --- a/locale/circuitpython.pot +++ b/locale/circuitpython.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-08-08 18:40-0400\n" +"POT-Creation-Date: 2020-08-11 15:37-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -447,6 +447,10 @@ msgstr "" msgid "Buffer length must be a multiple of 512" msgstr "" +#: ports/stm/common-hal/sdioio/SDCard.c +msgid "Buffer must be a multiple of 512 bytes" +msgstr "" + #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" msgstr "" @@ -819,6 +823,11 @@ msgstr "" msgid "File exists" msgstr "" +#: shared-module/framebufferio/FramebufferDisplay.c +#, c-format +msgid "Framebuffer requires %d bytes" +msgstr "" + #: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c msgid "Frequency captured is above capability. Capture Paused." msgstr "" @@ -843,7 +852,7 @@ msgid "Group full" msgstr "" #: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c -#: ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/SPI.c ports/stm/common-hal/sdioio/SDCard.c msgid "Hardware busy, try alternative pins" msgstr "" @@ -908,6 +917,11 @@ msgstr "" msgid "Invalid %q pin" msgstr "" +#: ports/stm/common-hal/busio/I2C.c ports/stm/common-hal/busio/SPI.c +#: ports/stm/common-hal/busio/UART.c ports/stm/common-hal/sdioio/SDCard.c +msgid "Invalid %q pin selection" +msgstr "" + #: ports/stm/common-hal/analogio/AnalogIn.c msgid "Invalid ADC Unit value" msgstr "" @@ -920,24 +934,12 @@ msgstr "" msgid "Invalid DAC pin supplied" msgstr "" -#: ports/stm/common-hal/busio/I2C.c -msgid "Invalid I2C pin selection" -msgstr "" - #: ports/atmel-samd/common-hal/pulseio/PWMOut.c #: ports/cxd56/common-hal/pulseio/PWMOut.c #: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c msgid "Invalid PWM frequency" msgstr "" -#: ports/stm/common-hal/busio/SPI.c -msgid "Invalid SPI pin selection" -msgstr "" - -#: ports/stm/common-hal/busio/UART.c -msgid "Invalid UART pin selection" -msgstr "" - #: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c msgid "Invalid argument" msgstr "" @@ -1406,6 +1408,16 @@ msgstr "" msgid "SDA or SCL needs a pull up" msgstr "" +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO GetCardInfo Error %d" +msgstr "" + +#: ports/stm/common-hal/sdioio/SDCard.c +#, c-format +msgid "SDIO Init Error %d" +msgstr "" + #: ports/stm/common-hal/busio/SPI.c msgid "SPI Init Error" msgstr "" diff --git a/locale/cs.po b/locale/cs.po index 26c8dd4490..195968e207 100644 --- a/locale/cs.po +++ b/locale/cs.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-07-28 16:57-0500\n" "PO-Revision-Date: 2020-05-24 03:22+0000\n" "Last-Translator: dronecz \n" "Language-Team: LANGUAGE \n" @@ -44,11 +44,11 @@ msgstr "" #: py/obj.c msgid " File \"%q\"" -msgstr "  Soubor \"%q\"" +msgstr "  Soubor \"% q\"" #: py/obj.c msgid " File \"%q\", line %d" -msgstr "  Soubor \"%q\", řádek %d" +msgstr "  Soubor \"% q\", řádek% d" #: main.c msgid " output:\n" @@ -57,7 +57,7 @@ msgstr " výstup:\n" #: py/objstr.c #, c-format msgid "%%c requires int or char" -msgstr "%%c vyžaduje int nebo char" +msgstr "%% c vyžaduje int nebo char" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format @@ -78,11 +78,11 @@ msgstr "%q index je mimo rozsah" #: py/obj.c msgid "%q indices must be integers, not %s" -msgstr "Indexy %q musí být celá čísla, nikoli %s" +msgstr "Indexy% q musí být celá čísla, nikoli% s" #: shared-bindings/vectorio/Polygon.c msgid "%q list must be a list" -msgstr "Seznam %q musí být seznam" +msgstr "Seznam% q musí být seznam" #: shared-bindings/memorymonitor/AllocationAlarm.c msgid "%q must be >= 0" @@ -94,11 +94,11 @@ msgstr "" #: shared-bindings/memorymonitor/AllocationAlarm.c #: shared-bindings/vectorio/Circle.c shared-bindings/vectorio/Rectangle.c msgid "%q must be >= 1" -msgstr " %q musí být > = 1" +msgstr "% q musí být > = 1" #: shared-module/vectorio/Polygon.c msgid "%q must be a tuple of length 2" -msgstr " %q musí být n-tice délky 2" +msgstr "% q musí být n-tice délky 2" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q pin invalid" @@ -106,7 +106,7 @@ msgstr "" #: shared-bindings/fontio/BuiltinFont.c msgid "%q should be an int" -msgstr " %q by měl být int" +msgstr "% q by měl být int" #: py/bc.c py/objnamedtuple.c msgid "%q() takes %d positional arguments but %d were given" @@ -867,10 +867,6 @@ msgstr "" msgid "I2C Init Error" msgstr "" -#: shared-bindings/audiobusio/I2SOut.c -msgid "I2SOut not available" -msgstr "" - #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" diff --git a/locale/de_DE.po b/locale/de_DE.po index 30f970aeae..8ba5e4bd3b 100644 --- a/locale/de_DE.po +++ b/locale/de_DE.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-07-28 16:57-0500\n" "PO-Revision-Date: 2020-06-16 18:24+0000\n" "Last-Translator: Andreas Buchen \n" "Language: de_DE\n" @@ -882,10 +882,6 @@ msgstr "Lese/Schreibe-operation an geschlossener Datei" msgid "I2C Init Error" msgstr "I2C-Init-Fehler" -#: shared-bindings/audiobusio/I2SOut.c -msgid "I2SOut not available" -msgstr "" - #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" @@ -3487,12 +3483,12 @@ msgstr "" #~ msgid "'async for' or 'async with' outside async function" #~ msgstr "'async for' oder 'async with' außerhalb der asynchronen Funktion" -#~ msgid "PulseIn not supported on this chip" -#~ msgstr "PulseIn wird auf diesem Chip nicht unterstützt" - #~ msgid "PulseOut not supported on this chip" #~ msgstr "PulseOut wird auf diesem Chip nicht unterstützt" +#~ msgid "PulseIn not supported on this chip" +#~ msgstr "PulseIn wird auf diesem Chip nicht unterstützt" + #~ msgid "AP required" #~ msgstr "AP erforderlich" diff --git a/locale/es.po b/locale/es.po index 6ed41b4a89..1294473af7 100644 --- a/locale/es.po +++ b/locale/es.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" -"PO-Revision-Date: 2020-07-22 20:48+0000\n" +"POT-Creation-Date: 2020-07-28 16:57-0500\n" +"PO-Revision-Date: 2020-07-24 21:12+0000\n" "Last-Translator: Alvaro Figueroa \n" "Language-Team: \n" "Language: es\n" @@ -89,7 +89,7 @@ msgstr "%q lista debe ser una lista" #: shared-bindings/memorymonitor/AllocationAlarm.c msgid "%q must be >= 0" -msgstr "" +msgstr "%q debe ser >= 0" #: shared-bindings/_bleio/CharacteristicBuffer.c #: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c @@ -241,7 +241,7 @@ msgstr "'continue' fuera de un bucle" #: py/objgenerator.c msgid "'coroutine' object is not an iterator" -msgstr "" +msgstr "el objeto 'coroutine' no es un iterador" #: py/compile.c msgid "'data' requires at least 2 arguments" @@ -338,7 +338,7 @@ msgstr "Ya se encuentra publicando." #: shared-module/memorymonitor/AllocationAlarm.c #: shared-module/memorymonitor/AllocationSize.c msgid "Already running" -msgstr "" +msgstr "Ya está en ejecución" #: ports/cxd56/common-hal/analogio/AnalogIn.c msgid "AnalogIn not supported on given pin" @@ -378,7 +378,7 @@ msgstr "Como máximo %d %q se puede especificar (no %d)" #: shared-module/memorymonitor/AllocationAlarm.c #, c-format msgid "Attempt to allocate %d blocks" -msgstr "" +msgstr "Tratando de localizar %d bloques" #: supervisor/shared/safe_mode.c msgid "Attempted heap allocation when MicroPython VM not running." @@ -883,10 +883,6 @@ msgstr "Operación I/O en archivo cerrado" msgid "I2C Init Error" msgstr "Error de inicio de I2C" -#: shared-bindings/audiobusio/I2SOut.c -msgid "I2SOut not available" -msgstr "" - #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" @@ -1591,6 +1587,8 @@ msgstr "" msgid "" "Timer was reserved for internal use - declare PWM pins earlier in the program" msgstr "" +"El temporizador es utilizado para uso interno - declare los pines para PWM " +"más temprano en el programa" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c msgid "Too many channels in sample." @@ -3470,12 +3468,12 @@ msgstr "zi debe ser una forma (n_section,2)" #~ msgid "'async for' or 'async with' outside async function" #~ msgstr "'async for' o 'async with' fuera de la función async" -#~ msgid "PulseIn not supported on this chip" -#~ msgstr "PulseIn no es compatible con este chip" - #~ msgid "PulseOut not supported on this chip" #~ msgstr "PulseOut no es compatible con este chip" +#~ msgid "PulseIn not supported on this chip" +#~ msgstr "PulseIn no es compatible con este chip" + #~ msgid "AP required" #~ msgstr "AP requerido" @@ -3719,8 +3717,8 @@ msgstr "zi debe ser una forma (n_section,2)" #~ "Only monochrome, indexed 8bpp, and 16bpp or greater BMPs supported: %d " #~ "bpp given" #~ msgstr "" -#~ "Solo se admiten BMP monocromos, indexados de 8bpp y 16bpp o superiores:%d " -#~ "bppdado" +#~ "Solo se admiten BMP monocromos, indexados de 8bpp y 16bpp o superiores:% " +#~ "d bppdado" #, fuzzy #~ msgid "Only slices with step=1 (aka None) are supported" diff --git a/locale/fil.po b/locale/fil.po index ecffec523f..07c8d270e0 100644 --- a/locale/fil.po +++ b/locale/fil.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-07-28 16:57-0500\n" "PO-Revision-Date: 2018-12-20 22:15-0800\n" "Last-Translator: Timothy \n" "Language-Team: fil\n" @@ -873,10 +873,6 @@ msgstr "I/O operasyon sa saradong file" msgid "I2C Init Error" msgstr "" -#: shared-bindings/audiobusio/I2SOut.c -msgid "I2SOut not available" -msgstr "" - #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" @@ -2055,7 +2051,7 @@ msgstr "hindi puede ang maraming *x" #: py/emitnative.c msgid "can't implicitly convert '%q' to 'bool'" -msgstr "hindi maaaring ma-convert ang ' %q' sa 'bool'" +msgstr "hindi maaaring ma-convert ang '% qt' sa 'bool'" #: py/emitnative.c msgid "can't load from '%q'" diff --git a/locale/fr.po b/locale/fr.po index 40e6bbfcee..f164501055 100644 --- a/locale/fr.po +++ b/locale/fr.po @@ -7,15 +7,15 @@ msgid "" msgstr "" "Project-Id-Version: 0.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" -"PO-Revision-Date: 2020-06-05 17:29+0000\n" -"Last-Translator: aberwag \n" +"POT-Creation-Date: 2020-07-28 16:57-0500\n" +"PO-Revision-Date: 2020-07-27 21:27+0000\n" +"Last-Translator: Nathan \n" "Language: fr\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n > 1;\n" -"X-Generator: Weblate 4.1-dev\n" +"X-Generator: Weblate 4.2-dev\n" #: main.c msgid "" @@ -70,7 +70,7 @@ msgstr "" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q failure: %d" -msgstr "" +msgstr "Échec de %q : %d" #: shared-bindings/microcontroller/Pin.c msgid "%q in use" @@ -90,7 +90,7 @@ msgstr "La liste %q doit être une liste" #: shared-bindings/memorymonitor/AllocationAlarm.c msgid "%q must be >= 0" -msgstr "" +msgstr "%q doit être >= 0" #: shared-bindings/_bleio/CharacteristicBuffer.c #: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c @@ -106,7 +106,7 @@ msgstr "%q doit être un tuple de longueur 2" #: ports/atmel-samd/common-hal/sdioio/SDCard.c msgid "%q pin invalid" -msgstr "" +msgstr "PIN %q invalide" #: shared-bindings/fontio/BuiltinFont.c msgid "%q should be an int" @@ -242,7 +242,7 @@ msgstr "'continue' en dehors d'une boucle" #: py/objgenerator.c msgid "'coroutine' object is not an iterator" -msgstr "" +msgstr "L'objet « coroutine » n'est pas un itérateur" #: py/compile.c msgid "'data' requires at least 2 arguments" @@ -337,7 +337,7 @@ msgstr "S'annonce déjà." #: shared-module/memorymonitor/AllocationAlarm.c #: shared-module/memorymonitor/AllocationSize.c msgid "Already running" -msgstr "" +msgstr "Déjà en cours d'exécution" #: ports/cxd56/common-hal/analogio/AnalogIn.c msgid "AnalogIn not supported on given pin" @@ -378,7 +378,7 @@ msgstr "Au plus %d %q peut être spécifié (pas %d)" #: shared-module/memorymonitor/AllocationAlarm.c #, c-format msgid "Attempt to allocate %d blocks" -msgstr "" +msgstr "Tentative d'allocation de %d blocs" #: supervisor/shared/safe_mode.c msgid "Attempted heap allocation when MicroPython VM not running." @@ -462,7 +462,7 @@ msgstr "La longueur du tampon %d est trop grande. Il doit être inférieur à %d #: ports/atmel-samd/common-hal/sdioio/SDCard.c #: ports/cxd56/common-hal/sdioio/SDCard.c shared-module/sdcardio/SDCard.c msgid "Buffer length must be a multiple of 512" -msgstr "" +msgstr "La longueur de la mémoire tampon doit être un multiple de 512" #: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c msgid "Buffer must be at least length 1" @@ -633,11 +633,11 @@ msgstr "Code brut corrompu" #: ports/cxd56/common-hal/gnss/GNSS.c msgid "Could not initialize GNSS" -msgstr "" +msgstr "Impossible d'initialiser GNSS" #: ports/cxd56/common-hal/sdioio/SDCard.c msgid "Could not initialize SDCard" -msgstr "" +msgstr "Impossible d'initialiser la carte SD" #: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c msgid "Could not initialize UART" @@ -887,10 +887,6 @@ msgstr "opération d'E/S sur un fichier fermé" msgid "I2C Init Error" msgstr "Erreur d'initialisation I2C" -#: shared-bindings/audiobusio/I2SOut.c -msgid "I2SOut not available" -msgstr "" - #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" @@ -931,7 +927,7 @@ msgstr "Erreur interne #%d" #: shared-bindings/sdioio/SDCard.c msgid "Invalid %q" -msgstr "" +msgstr "%q invalide" #: ports/atmel-samd/common-hal/audiobusio/I2SOut.c #: ports/atmel-samd/common-hal/audiobusio/PDMIn.c @@ -1147,7 +1143,7 @@ msgstr "Doit fournir une broche MISO ou MOSI" #: ports/stm/common-hal/busio/SPI.c msgid "Must provide SCK pin" -msgstr "" +msgstr "Vous devez fournir un code PIN SCK" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format @@ -1446,7 +1442,7 @@ msgstr "Mode sans-échec ! Le code sauvegardé n'est pas éxecuté.\n" #: shared-module/sdcardio/SDCard.c msgid "SD card CSD format not supported" -msgstr "" +msgstr "Le format de carte SD CSD n'est pas pris en charge" #: ports/atmel-samd/common-hal/busio/I2C.c #: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c @@ -1520,7 +1516,7 @@ msgstr "Fournissez au moins une broche UART" #: shared-bindings/gnss/GNSS.c msgid "System entry must be gnss.SatelliteSystem" -msgstr "" +msgstr "L'entrée du système doit être gnss.SatelliteSystem" #: ports/stm/common-hal/microcontroller/Processor.c msgid "Temperature read timed out" @@ -2113,7 +2109,7 @@ msgstr "" #: shared-module/sdcardio/SDCard.c msgid "can't set 512 block size" -msgstr "" +msgstr "impossible de définir une taille de bloc de 512" #: py/objnamedtuple.c msgid "can't set attribute" @@ -2250,7 +2246,7 @@ msgstr "n'a pas pu inverser la matrice Vandermonde" #: shared-module/sdcardio/SDCard.c msgid "couldn't determine SD card version" -msgstr "" +msgstr "impossible de déterminer la version de la carte SD" #: extmod/ulab/code/approx/approx.c msgid "data must be iterable" @@ -2821,7 +2817,7 @@ msgstr "compte de décalage négatif" #: shared-module/sdcardio/SDCard.c msgid "no SD card" -msgstr "" +msgstr "pas de carte SD" #: py/vm.c msgid "no active exception to reraise" @@ -2846,7 +2842,7 @@ msgstr "pas de broche de réinitialisation disponible" #: shared-module/sdcardio/SDCard.c msgid "no response from SD card" -msgstr "" +msgstr "pas de réponse de la carte SD" #: py/runtime.c msgid "no such attribute" @@ -3490,12 +3486,12 @@ msgstr "" #~ msgid "'async for' or 'async with' outside async function" #~ msgstr "'async for' ou 'async with' sans fonction asynchrone extérieure" -#~ msgid "PulseIn not supported on this chip" -#~ msgstr "PulseIn non pris en charge sur cette puce" - #~ msgid "PulseOut not supported on this chip" #~ msgstr "PulseOut non pris en charge sur cette puce" +#~ msgid "PulseIn not supported on this chip" +#~ msgstr "PulseIn non pris en charge sur cette puce" + #~ msgid "AP required" #~ msgstr "'AP' requis" diff --git a/locale/hi.po b/locale/hi.po index 003f9a9ec6..79b9748036 100644 --- a/locale/hi.po +++ b/locale/hi.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-07-28 16:57-0500\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -860,10 +860,6 @@ msgstr "" msgid "I2C Init Error" msgstr "" -#: shared-bindings/audiobusio/I2SOut.c -msgid "I2SOut not available" -msgstr "" - #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" diff --git a/locale/it_IT.po b/locale/it_IT.po index c0f826e8f1..3862d382f2 100644 --- a/locale/it_IT.po +++ b/locale/it_IT.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-07-28 16:57-0500\n" "PO-Revision-Date: 2018-10-02 16:27+0200\n" "Last-Translator: Enrico Paganin \n" "Language-Team: \n" @@ -873,10 +873,6 @@ msgstr "operazione I/O su file chiuso" msgid "I2C Init Error" msgstr "" -#: shared-bindings/audiobusio/I2SOut.c -msgid "I2SOut not available" -msgstr "" - #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" diff --git a/locale/ja.po b/locale/ja.po new file mode 100644 index 0000000000..9c027fc5ab --- /dev/null +++ b/locale/ja.po @@ -0,0 +1,3346 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2020-08-04 18:42-0500\n" +"PO-Revision-Date: 2020-08-10 16:59+0000\n" +"Last-Translator: Taku Fukada \n" +"Language-Team: none\n" +"Language: ja\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=1; plural=0;\n" +"X-Generator: Weblate 4.2-dev\n" + +#: main.c +msgid "" +"\n" +"Code done running. Waiting for reload.\n" +msgstr "" +"\n" +"コードの実行が完了しました。リロードを待っています。\n" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"Please file an issue with the contents of your CIRCUITPY drive at \n" +"https://github.com/adafruit/circuitpython/issues\n" +msgstr "" +"\n" +"CIRCUITPYドライブの内容を添えて問題を以下で報告してください:\n" +"https://github.com/adafruit/circuitpython/issues\n" + +#: supervisor/shared/safe_mode.c +msgid "" +"\n" +"To exit, please reset the board without " +msgstr "" +"\n" +"終了するには、次の操作なしにリセットしてください: " + +#: py/obj.c +msgid " File \"%q\"" +msgstr " ファイル \"%q\"" + +#: py/obj.c +msgid " File \"%q\", line %d" +msgstr " ファイル \"%q\", 行 %d" + +#: main.c +msgid " output:\n" +msgstr " 出力:\n" + +#: py/objstr.c +#, c-format +msgid "%%c requires int or char" +msgstr "%%c にはintまたはcharが必要です" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "%d address pins and %d rgb pins indicate a height of %d, not %d" +msgstr "" + +#: ports/atmel-samd/common-hal/sdioio/SDCard.c +msgid "%q failure: %d" +msgstr "" + +#: shared-bindings/microcontroller/Pin.c +msgid "%q in use" +msgstr "%q は使用中です" + +#: extmod/moductypes.c ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/obj.c py/objstr.c +#: py/objstrunicode.c +msgid "%q index out of range" +msgstr "%q インデックスは範囲外です" + +#: py/obj.c +msgid "%q indices must be integers, not %q" +msgstr "%q インデクスは、%qでなく整数でなければなりません" + +#: shared-bindings/vectorio/Polygon.c +msgid "%q list must be a list" +msgstr "%q のリストはリスト型でなければなりません" + +#: shared-bindings/memorymonitor/AllocationAlarm.c +msgid "%q must be >= 0" +msgstr "%qは0以上でなければなりません" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +#: shared-bindings/_bleio/PacketBuffer.c shared-bindings/displayio/Group.c +#: shared-bindings/displayio/Shape.c +#: shared-bindings/memorymonitor/AllocationAlarm.c +#: shared-bindings/vectorio/Circle.c shared-bindings/vectorio/Rectangle.c +msgid "%q must be >= 1" +msgstr "%qは1以上でなければなりません" + +#: shared-module/vectorio/Polygon.c +msgid "%q must be a tuple of length 2" +msgstr "%qは長さ2のタプルでなければなりません" + +#: ports/atmel-samd/common-hal/sdioio/SDCard.c +msgid "%q pin invalid" +msgstr "%q ピンは無効です" + +#: shared-bindings/fontio/BuiltinFont.c +msgid "%q should be an int" +msgstr "%qはint型でなければなりません" + +#: py/bc.c py/objnamedtuple.c +#, fuzzy +msgid "%q() takes %d positional arguments but %d were given" +msgstr "%q() は %d個の位置引数 (positional arguments) を受け取りますが、%d 個しか与えられていません" + +#: py/argcheck.c +msgid "'%q' argument required" +msgstr "引数 '%q' が必要です" + +#: py/runtime.c +msgid "'%q' object cannot assign attribute '%q'" +msgstr "オブジェクト '%q' には属性 '%q' を割り当てられません" + +#: py/proto.c +msgid "'%q' object does not support '%q'" +msgstr "オブジェクト '%q' は '%q' をサポートしていません" + +#: py/obj.c +msgid "'%q' object does not support item assignment" +msgstr "オブジェクト '%q' は要素の代入をサポートしていません" + +#: py/obj.c +msgid "'%q' object does not support item deletion" +msgstr "オブジェクト '%q' は要素の削除をサポートしていません" + +#: py/runtime.c +msgid "'%q' object has no attribute '%q'" +msgstr "オブジェクト '%q' は属性 '%q' を持ちません" + +#: py/runtime.c +msgid "'%q' object is not an iterator" +msgstr "オブジェクト '%q' はイテレータではありません" + +#: py/objtype.c py/runtime.c +msgid "'%q' object is not callable" +msgstr "オブジェクト '%q' は呼び出し可能ではありません" + +#: py/runtime.c +msgid "'%q' object is not iterable" +msgstr "オブジェクト '%q' はイテレート可能ではありません" + +#: py/obj.c +msgid "'%q' object is not subscriptable" +msgstr "オブジェクト '%q' は要素の取得ができません" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +#, c-format +msgid "'%s' expects a label" +msgstr "" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +#, c-format +msgid "'%s' expects a register" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects a special register" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects an FPU register" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects an address of the form [a, b]" +msgstr "" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +#, c-format +msgid "'%s' expects an integer" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects at most r%d" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' expects {r0, r1, ...}" +msgstr "" + +#: py/emitinlinextensa.c +#, c-format +msgid "'%s' integer %d is not within range %d..%d" +msgstr "" + +#: py/emitinlinethumb.c +#, c-format +msgid "'%s' integer 0x%x does not fit in mask 0x%x" +msgstr "" + +#: py/objstr.c +msgid "'=' alignment not allowed in string format specifier" +msgstr "" + +#: shared-module/struct/__init__.c +msgid "'S' and 'O' are not supported format types" +msgstr "" + +#: py/compile.c +msgid "'align' requires 1 argument" +msgstr "" + +#: py/compile.c +msgid "'await' outside function" +msgstr "関数外での 'await'" + +#: py/compile.c +msgid "'await', 'async for' or 'async with' outside async function" +msgstr "async関数外での 'await', 'async for', 'async with'" + +#: py/compile.c +msgid "'break' outside loop" +msgstr "ループ外での 'break'" + +#: py/compile.c +msgid "'continue' outside loop" +msgstr "ループ外での 'continue'" + +#: py/objgenerator.c +msgid "'coroutine' object is not an iterator" +msgstr "'coroutine' オブジェクトはイテレータではありません" + +#: py/compile.c +msgid "'data' requires at least 2 arguments" +msgstr "" + +#: py/compile.c +msgid "'data' requires integer arguments" +msgstr "" + +#: py/compile.c +msgid "'label' requires 1 argument" +msgstr "" + +#: py/compile.c +msgid "'return' outside function" +msgstr "関数外での 'return'" + +#: py/compile.c +msgid "'yield' outside function" +msgstr "関数外での 'yield'" + +#: py/compile.c +msgid "*x must be assignment target" +msgstr "" + +#: py/obj.c +msgid ", in %q\n" +msgstr "" + +#: py/objcomplex.c +msgid "0.0 to a complex power" +msgstr "" + +#: py/modbuiltins.c +msgid "3-arg pow() not supported" +msgstr "引数3つの pow() はサポートされていません" + +#: ports/atmel-samd/common-hal/countio/Counter.c +#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c +msgid "A hardware interrupt channel is already in use" +msgstr "ハードウェア割り込みチャネルは使用中です" + +#: shared-bindings/_bleio/Address.c +#, c-format +msgid "Address must be %d bytes long" +msgstr "アドレスの長さは %d バイトでなければなりません" + +#: shared-bindings/_bleio/Address.c +msgid "Address type out of range" +msgstr "" + +#: ports/nrf/common-hal/busio/I2C.c +msgid "All I2C peripherals are in use" +msgstr "すべてのI2C周辺機器が使用中です" + +#: ports/nrf/common-hal/busio/SPI.c +msgid "All SPI peripherals are in use" +msgstr "すべてのSPI周辺機器が使用中です" + +#: ports/nrf/common-hal/busio/UART.c +msgid "All UART peripherals are in use" +msgstr "すべてのUART周辺機器が使用中です" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "All event channels in use" +msgstr "すべてのイベントチャネルが使用中です" + +#: ports/atmel-samd/audio_dma.c ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "All sync event channels in use" +msgstr "すべての同期イベントチャネルが使用中です" + +#: shared-bindings/pulseio/PWMOut.c +msgid "All timers for this pin are in use" +msgstr "このピン用のすべてのタイマが使用中です" + +#: ports/atmel-samd/common-hal/_pew/PewPew.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/atmel-samd/common-hal/pulseio/PulseOut.c +#: ports/cxd56/common-hal/pulseio/PulseOut.c +#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#: ports/nrf/common-hal/pulseio/PulseIn.c ports/nrf/peripherals/nrf/timers.c +#: ports/stm/peripherals/timers.c shared-bindings/pulseio/PWMOut.c +msgid "All timers in use" +msgstr "すべてのタイマーが使用中です" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Already advertising." +msgstr "すでにアドバータイズ中です。" + +#: shared-module/memorymonitor/AllocationAlarm.c +#: shared-module/memorymonitor/AllocationSize.c +msgid "Already running" +msgstr "すでに実行中です" + +#: ports/cxd56/common-hal/analogio/AnalogIn.c +msgid "AnalogIn not supported on given pin" +msgstr "指定のピンはAnalogInに対応していません" + +#: ports/cxd56/common-hal/analogio/AnalogOut.c +#: ports/mimxrt10xx/common-hal/analogio/AnalogOut.c +#: ports/nrf/common-hal/analogio/AnalogOut.c +msgid "AnalogOut functionality not supported" +msgstr "AnalogOut機能はサポートされていません" + +#: shared-bindings/analogio/AnalogOut.c +msgid "AnalogOut is only 16 bits. Value must be less than 65536." +msgstr "AnalogOutは16ビットです。値は 65536 以下でなければなりません。" + +#: ports/atmel-samd/common-hal/analogio/AnalogOut.c +msgid "AnalogOut not supported on given pin" +msgstr "指定のピンはAnalogOutをサポートしていません" + +#: ports/atmel-samd/common-hal/pulseio/PulseOut.c +#: ports/cxd56/common-hal/pulseio/PulseOut.c +msgid "Another send is already active" +msgstr "他のsendがすでにアクティブです" + +#: shared-bindings/pulseio/PulseOut.c +msgid "Array must contain halfwords (type 'H')" +msgstr "array のタイプは16ビット ('H') でなければなりません" + +#: shared-bindings/nvm/ByteArray.c +msgid "Array values should be single bytes." +msgstr "Arrayの各値は1バイトでなければなりません。" + +#: shared-bindings/microcontroller/Pin.c +msgid "At most %d %q may be specified (not %d)" +msgstr "最大で %d 個の %q が指定できます(%d個でなく)" + +#: shared-module/memorymonitor/AllocationAlarm.c +#, c-format +msgid "Attempt to allocate %d blocks" +msgstr "%d 個のブロックの確保を試みました" + +#: supervisor/shared/safe_mode.c +msgid "Attempted heap allocation when MicroPython VM not running." +msgstr "MicroPython VMの非実行時にヒープの確保を試みました。" + +#: main.c +msgid "Auto-reload is off.\n" +msgstr "オートリロードはオフです。\n" + +#: main.c +msgid "" +"Auto-reload is on. Simply save files over USB to run them or enter REPL to " +"disable.\n" +msgstr "オートリロードが有効です。ファイルをUSB経由で保存するだけで実行できます。REPLに入ると無効化します。\n" + +#: shared-module/displayio/Display.c +#: shared-module/framebufferio/FramebufferDisplay.c +msgid "Below minimum frame rate" +msgstr "最低のフレームレート未満です" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +msgid "Bit clock and word select must share a clock unit" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Bit depth must be multiple of 8." +msgstr "ビット深度は8の倍数でなければなりません。" + +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Both RX and TX required for flow control" +msgstr "RXとTXの両方がフロー制御のために必要です" + +#: ports/atmel-samd/common-hal/rotaryio/IncrementalEncoder.c +msgid "Both pins must support hardware interrupts" +msgstr "両方のピンがハードウェア割り込みをサポートしなければなりません" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +#: shared-bindings/rgbmatrix/RGBMatrix.c +msgid "Brightness must be 0-1.0" +msgstr "Brightnessは0から1.0まででなければなりません" + +#: shared-bindings/supervisor/__init__.c +msgid "Brightness must be between 0 and 255" +msgstr "Brightnessは0から255の間でなければなりません" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Brightness not adjustable" +msgstr "Brightnessは調整可能ではありません" + +#: shared-bindings/_bleio/UUID.c +#, c-format +msgid "Buffer + offset too small %d %d %d" +msgstr "" + +#: shared-module/usb_hid/Device.c +#, c-format +msgid "Buffer incorrect size. Should be %d bytes." +msgstr "バッファサイズが正しくありません。%dバイトでなければなりません。" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Buffer is not a bytearray." +msgstr "バッファが bytearray ではありません。" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Buffer is too small" +msgstr "バッファが小さすぎます" + +#: ports/nrf/common-hal/audiopwmio/PWMAudioOut.c +#, c-format +msgid "Buffer length %d too big. It must be less than %d" +msgstr "バッファ長 %d は大きすぎます。%d 以下でなければなりません" + +#: ports/atmel-samd/common-hal/sdioio/SDCard.c +#: ports/cxd56/common-hal/sdioio/SDCard.c shared-module/sdcardio/SDCard.c +msgid "Buffer length must be a multiple of 512" +msgstr "バッファ長は512の倍数でなければなりません" + +#: shared-bindings/bitbangio/I2C.c shared-bindings/busio/I2C.c +msgid "Buffer must be at least length 1" +msgstr "バッファ長は少なくとも1以上でなければなりません" + +#: ports/nrf/common-hal/_bleio/PacketBuffer.c +msgid "Buffer too large and unable to allocate" +msgstr "バッファが大きすぎて確保できません" + +#: shared-bindings/_bleio/PacketBuffer.c +#, c-format +msgid "Buffer too short by %d bytes" +msgstr "" + +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c +#: ports/nrf/common-hal/displayio/ParallelBus.c +#, c-format +msgid "Bus pin %d is already in use" +msgstr "Busピン %d はすでに使用中です" + +#: shared-bindings/_bleio/UUID.c +msgid "Byte buffer must be 16 bytes." +msgstr "バイトバッファは16バイトでなければなりません。" + +#: shared-bindings/nvm/ByteArray.c +msgid "Bytes must be between 0 and 255." +msgstr "バイト値は0から255の間でなければなりません。" + +#: shared-bindings/aesio/aes.c +msgid "CBC blocks must be multiples of 16 bytes" +msgstr "CBCブロックは16バイトの整数倍でなければなりません" + +#: py/objtype.c +msgid "Call super().__init__() before accessing native object." +msgstr "ネイティブオブジェクトにアクセスする前に super().__init__() を呼び出してください。" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +msgid "Can't set CCCD on local Characteristic" +msgstr "ローカルのCharacteristicにはCCCDを設定できません" + +#: shared-bindings/displayio/Bitmap.c +#: shared-bindings/memorymonitor/AllocationSize.c +#: shared-bindings/pulseio/PulseIn.c +msgid "Cannot delete values" +msgstr "値を削除できません" + +#: ports/atmel-samd/common-hal/digitalio/DigitalInOut.c +#: ports/mimxrt10xx/common-hal/digitalio/DigitalInOut.c +#: ports/nrf/common-hal/digitalio/DigitalInOut.c +msgid "Cannot get pull while in output mode" +msgstr "出力モード時はpullを取得できません" + +#: ports/nrf/common-hal/microcontroller/Processor.c +msgid "Cannot get temperature" +msgstr "温度を取得できません" + +#: shared-bindings/_bleio/Adapter.c +msgid "Cannot have scan responses for extended, connectable advertisements." +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Cannot output both channels on the same pin" +msgstr "同じピン上の両方のチャネルに出力できません" + +#: shared-module/bitbangio/SPI.c +msgid "Cannot read without MISO pin." +msgstr "MISOピンなしで読み込みはできません。" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Cannot record to a file" +msgstr "ファイルへ記録できません" + +#: shared-module/storage/__init__.c +msgid "Cannot remount '/' when USB is active." +msgstr "USBがアクティブな時に '/' を再マウントできません。" + +#: ports/atmel-samd/common-hal/microcontroller/__init__.c +#: ports/cxd56/common-hal/microcontroller/__init__.c +#: ports/mimxrt10xx/common-hal/microcontroller/__init__.c +msgid "Cannot reset into bootloader because no bootloader is present." +msgstr "ブートローダが存在しないためブートローダへとリセットできません。" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Cannot set value when direction is input." +msgstr "方向がINPUTのときは値を設定できません。" + +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Cannot specify RTS or CTS in RS485 mode" +msgstr "RS485モードにRTSまたはCTSを指定できません" + +#: py/objslice.c +msgid "Cannot subclass slice" +msgstr "sliceをサブクラス化することはできません" + +#: shared-module/bitbangio/SPI.c +msgid "Cannot transfer without MOSI and MISO pins." +msgstr "MOSIピンとMISOピンがなければ転送できません。" + +#: extmod/moductypes.c +msgid "Cannot unambiguously get sizeof scalar" +msgstr "スカラのサイズを曖昧さなしに取得できません" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Cannot vary frequency on a timer that is already in use" +msgstr "使用中のタイマー上で周波数を変えられません" + +#: shared-module/bitbangio/SPI.c +msgid "Cannot write without MOSI pin." +msgstr "MOSIピンなしに書き込みできません。" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +msgid "CharacteristicBuffer writing not provided" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "CircuitPython core code crashed hard. Whoops!\n" +msgstr "CircuitPythonのコアコードが激しくクラッシュしました。おっと!\n" + +#: supervisor/shared/safe_mode.c +msgid "" +"CircuitPython is in safe mode because you pressed the reset button during " +"boot. Press again to exit safe mode.\n" +msgstr "起動中にリセットボタンを押したためCircuitPythonはセーフモードにいます。もう一度押すとセーフモードを終了します。\n" + +#: shared-module/bitbangio/SPI.c +msgid "Clock pin init failed." +msgstr "クロックピンの初期化に失敗しました。" + +#: shared-module/bitbangio/I2C.c +msgid "Clock stretch too long" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +msgid "Clock unit in use" +msgstr "クロックユニットが使用中です" + +#: shared-bindings/_pew/PewPew.c +msgid "Column entry must be digitalio.DigitalInOut" +msgstr "Columnの要素は digitalio.DigitalInOut でなければなりません" + +#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/displayio/ParallelBus.c +msgid "Command must be an int between 0 and 255" +msgstr "commandは0から255の間の整数でなければなりません" + +#: shared-bindings/_bleio/Connection.c +msgid "" +"Connection has been disconnected and can no longer be used. Create a new " +"connection." +msgstr "接続は切断済みのためもう使えません。新たな接続を作成してください。" + +#: py/persistentcode.c +msgid "Corrupt .mpy file" +msgstr "破損した .mpy ファイル" + +#: py/emitglue.c +msgid "Corrupt raw code" +msgstr "破損した raw code" + +#: ports/cxd56/common-hal/gnss/GNSS.c +msgid "Could not initialize GNSS" +msgstr "GNSSを初期化できませんでした" + +#: ports/cxd56/common-hal/sdioio/SDCard.c +msgid "Could not initialize SDCard" +msgstr "SDカードを初期化できませんでした" + +#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c +msgid "Could not initialize UART" +msgstr "UARTを初期化できませんでした" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Could not initialize channel" +msgstr "チャネルを初期化できませんでした" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Could not initialize timer" +msgstr "タイマーを初期化できませんでした" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Could not re-init channel" +msgstr "チャネルを再初期化できませんでした" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Could not re-init timer" +msgstr "タイマーを再初期化できませんでした" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Could not restart PWM" +msgstr "PWMを再スタートできませんでした" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Could not start PWM" +msgstr "PWMをスタートできませんでした" + +#: ports/stm/common-hal/busio/UART.c +msgid "Could not start interrupt, RX busy" +msgstr "割り込みをスタートできませんでした。RXビジー" + +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate decoder" +msgstr "デコーダを確保できませんでした" + +#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate first buffer" +msgstr "1つ目のバッファを確保できませんでした" + +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate input buffer" +msgstr "入力バッファを確保できませんでした" + +#: shared-module/audiocore/WaveFile.c shared-module/audiomixer/Mixer.c +#: shared-module/audiomp3/MP3Decoder.c +msgid "Couldn't allocate second buffer" +msgstr "2つ目のバッファを確保できませんでした" + +#: supervisor/shared/safe_mode.c +msgid "Crash into the HardFault_Handler." +msgstr "クラッシュして HardFault_Handler に入りました。" + +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "DAC Channel Init Error" +msgstr "DACチャネル初期化エラー" + +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "DAC Device Init Error" +msgstr "DACデバイス初期化エラー" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "DAC already in use" +msgstr "DACはすでに使用中です" + +#: ports/atmel-samd/common-hal/displayio/ParallelBus.c +#: ports/nrf/common-hal/displayio/ParallelBus.c +msgid "Data 0 pin must be byte aligned" +msgstr "Data 0 ピンは、バイト整列されていなければなりません" + +#: shared-module/audiocore/WaveFile.c +msgid "Data chunk must follow fmt chunk" +msgstr "fmtチャンクの後にdataチャンクが続かなければなりません" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Data too large for advertisement packet" +msgstr "データが、アドバタイズメントパケットには大きすぎます" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Destination capacity is smaller than destination_length." +msgstr "" + +#: ports/nrf/common-hal/audiobusio/I2SOut.c +msgid "Device in use" +msgstr "デバイス使用中" + +#: ports/cxd56/common-hal/digitalio/DigitalInOut.c +msgid "DigitalInOut not supported on given pin" +msgstr "指定されたピンはDigitalInOutをサポートしていません" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Display must have a 16 bit colorspace." +msgstr "ディスプレイは16ビット色空間を持たなければなりません。" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/displayio/EPaperDisplay.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Display rotation must be in 90 degree increments" +msgstr "ディスプレイの回転は90度の整数倍でなければなりません" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Drive mode not used when direction is input." +msgstr "方向がINPUTのときドライブモードは使われません。" + +#: shared-bindings/aesio/aes.c +msgid "ECB only operates on 16 bytes at a time" +msgstr "ECBは一度に16バイトの演算のみを行います" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/atmel-samd/common-hal/ps2io/Ps2.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +msgid "EXTINT channel already in use" +msgstr "EXTINTチャネルはすでに使用されています" + +#: extmod/modure.c +msgid "Error in regex" +msgstr "正規表現にエラーがあります" + +#: shared-bindings/aesio/aes.c shared-bindings/busio/SPI.c +#: shared-bindings/microcontroller/Pin.c +#: shared-bindings/neopixel_write/__init__.c shared-bindings/pulseio/PulseOut.c +#: shared-bindings/terminalio/Terminal.c +msgid "Expected a %q" +msgstr "" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +#: shared-bindings/_bleio/Descriptor.c shared-bindings/_bleio/PacketBuffer.c +msgid "Expected a Characteristic" +msgstr "" + +#: shared-bindings/_bleio/Characteristic.c +msgid "Expected a Service" +msgstr "" + +#: shared-bindings/_bleio/Characteristic.c shared-bindings/_bleio/Descriptor.c +#: shared-bindings/_bleio/Service.c +msgid "Expected a UUID" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "Expected an Address" +msgstr "" + +#: shared-module/_pixelbuf/PixelBuf.c +#, c-format +msgid "Expected tuple of length %d, got %d" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Extended advertisements with scan response not supported." +msgstr "" + +#: extmod/ulab/code/fft/fft.c +msgid "FFT is defined for ndarrays only" +msgstr "FFTは ndarray に対してのみ定義されています" + +#: shared-bindings/ps2io/Ps2.c +msgid "Failed sending command." +msgstr "コマンドの送信に失敗しました。" + +#: ports/nrf/sd_mutex.c +#, c-format +msgid "Failed to acquire mutex, err 0x%04x" +msgstr "ミューテックスの取得に失敗しました。エラー 0x%04x" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +msgid "Failed to allocate RX buffer" +msgstr "RXバッファの確保に失敗しました" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c +#, c-format +msgid "Failed to allocate RX buffer of %d bytes" +msgstr "%d バイトのRXバッファの確保に失敗しました" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Failed to connect: internal error" +msgstr "接続失敗: 内部エラー" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Failed to connect: timeout" +msgstr "接続失敗: タイムアウト" + +#: shared-module/audiomp3/MP3Decoder.c +msgid "Failed to parse MP3 file" +msgstr "MP3ファイルのパーズに失敗しました" + +#: ports/nrf/sd_mutex.c +#, c-format +msgid "Failed to release mutex, err 0x%04x" +msgstr "ミューテックスの開放に失敗しました。エラー 0x%04x" + +#: supervisor/shared/safe_mode.c +msgid "Failed to write internal flash." +msgstr "内部フラッシュの書き込みに失敗しました。" + +#: py/moduerrno.c +msgid "File exists" +msgstr "ファイルが存在します。" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +msgid "Frequency captured is above capability. Capture Paused." +msgstr "" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Frequency must match existing PWMOut using this timer" +msgstr "周波数は、このタイマーを使っている既存のPWMOutと一致しなければなりません" + +#: shared-bindings/bitbangio/I2C.c shared-bindings/bitbangio/SPI.c +#: shared-bindings/busio/I2C.c shared-bindings/busio/SPI.c +msgid "Function requires lock" +msgstr "" + +#: shared-bindings/displayio/Display.c +#: shared-bindings/displayio/EPaperDisplay.c +#: shared-bindings/framebufferio/FramebufferDisplay.c +msgid "Group already used" +msgstr "グループは既に使われています" + +#: shared-module/displayio/Group.c +msgid "Group full" +msgstr "グループが一杯です" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/SPI.c +msgid "Hardware busy, try alternative pins" +msgstr "ハードウェアビジー。代替のピンを試してください" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "Hardware in use, try alternative pins" +msgstr "ハードウェア使用中。代替のピンを試してください" + +#: extmod/vfs_posix_file.c py/objstringio.c +msgid "I/O operation on closed file" +msgstr "閉じられたファイルに対するI/O操作" + +#: ports/stm/common-hal/busio/I2C.c +msgid "I2C Init Error" +msgstr "I2C初期化エラー" + +#: shared-bindings/audiobusio/I2SOut.c +msgid "I2SOut not available" +msgstr "I2SOutが利用できません" + +#: shared-bindings/aesio/aes.c +#, c-format +msgid "IV must be %d bytes long" +msgstr "IV の長さは %d バイトでなければなりません" + +#: py/persistentcode.c +msgid "" +"Incompatible .mpy file. Please update all .mpy files. See http://adafru.it/" +"mpy-update for more info." +msgstr "" +"非互換の .mpy ファイルです。すべての .mpy ファイルをアップデートしてください。詳細は http://adafru.it/mpy-update " +"を参照。" + +#: shared-bindings/_pew/PewPew.c +msgid "Incorrect buffer size" +msgstr "バッファサイズが正しくありません" + +#: py/moduerrno.c +msgid "Input/output error" +msgstr "入力/出力エラー" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Insufficient authentication" +msgstr "認証が不十分です" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "Insufficient encryption" +msgstr "暗号化が不十分です" + +#: ports/stm/common-hal/busio/UART.c +msgid "Internal define error" +msgstr "内部定義エラー" + +#: shared-module/rgbmatrix/RGBMatrix.c +#, c-format +msgid "Internal error #%d" +msgstr "内部エラー #%d" + +#: shared-bindings/sdioio/SDCard.c +msgid "Invalid %q" +msgstr "不正な %q" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "Invalid %q pin" +msgstr "不正な %q ピン" + +#: ports/stm/common-hal/analogio/AnalogIn.c +msgid "Invalid ADC Unit value" +msgstr "不正なADCユニット値" + +#: shared-module/displayio/OnDiskBitmap.c +msgid "Invalid BMP file" +msgstr "不正なBMPファイル" + +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "Invalid DAC pin supplied" +msgstr "無効なDACピンが与えられました" + +#: ports/stm/common-hal/busio/I2C.c +msgid "Invalid I2C pin selection" +msgstr "I2Cピンの選択が不正です" + +#: ports/atmel-samd/common-hal/pulseio/PWMOut.c +#: ports/cxd56/common-hal/pulseio/PWMOut.c +#: ports/nrf/common-hal/pulseio/PWMOut.c shared-bindings/pulseio/PWMOut.c +msgid "Invalid PWM frequency" +msgstr "無効なPWM周波数です" + +#: ports/stm/common-hal/busio/SPI.c +msgid "Invalid SPI pin selection" +msgstr "SPIピンの選択が不正です" + +#: ports/stm/common-hal/busio/UART.c +msgid "Invalid UART pin selection" +msgstr "UARTピンの選択が不正です" + +#: py/moduerrno.c shared-module/rgbmatrix/RGBMatrix.c +msgid "Invalid argument" +msgstr "不正な引数" + +#: shared-module/displayio/Bitmap.c +msgid "Invalid bits per value" +msgstr "値ごとのビット数が不正です" + +#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "Invalid buffer size" +msgstr "不正なバッファサイズ" + +#: shared-bindings/_pixelbuf/PixelBuf.c +msgid "Invalid byteorder string" +msgstr "不正なバイトオーダー文字列" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +msgid "Invalid capture period. Valid range: 1 - 500" +msgstr "不正なキャプチャ周期。有効な周期: 1 - 500" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Invalid channel count" +msgstr "不正なチャンネル数" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Invalid direction." +msgstr "不正な方向。" + +#: shared-module/audiocore/WaveFile.c +msgid "Invalid file" +msgstr "不正なファイル" + +#: shared-module/audiocore/WaveFile.c +msgid "Invalid format chunk size" +msgstr "フォーマットチャンクのサイズが不正です" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Invalid frequency supplied" +msgstr "不正な周波数が与えられました" + +#: supervisor/shared/safe_mode.c +msgid "Invalid memory access." +msgstr "不正なメモリアクセスです。" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +msgid "Invalid number of bits" +msgstr "不正なビット数" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +#: shared-bindings/displayio/FourWire.c +msgid "Invalid phase" +msgstr "" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#: ports/atmel-samd/common-hal/touchio/TouchIn.c +#: shared-bindings/pulseio/PWMOut.c shared-module/rgbmatrix/RGBMatrix.c +msgid "Invalid pin" +msgstr "不正なピン" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Invalid pin for left channel" +msgstr "左チャネルのピンが不正です" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Invalid pin for right channel" +msgstr "右チャネルのピンが不正です" + +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/atmel-samd/common-hal/busio/SPI.c +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/atmel-samd/common-hal/i2cperipheral/I2CPeripheral.c +#: ports/cxd56/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/SPI.c +#: ports/cxd56/common-hal/busio/UART.c ports/cxd56/common-hal/sdioio/SDCard.c +#: ports/mimxrt10xx/common-hal/busio/I2C.c +#: ports/mimxrt10xx/common-hal/busio/SPI.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/I2C.c +msgid "Invalid pins" +msgstr "ピンが不正です" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "Invalid pins for PWMOut" +msgstr "PWMOutのピンが不正です" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +#: shared-bindings/displayio/FourWire.c +msgid "Invalid polarity" +msgstr "不正な極性" + +#: shared-bindings/_bleio/Characteristic.c +msgid "Invalid properties" +msgstr "不正なプロパティ" + +#: shared-bindings/microcontroller/__init__.c +msgid "Invalid run mode." +msgstr "不正な Run Mode" + +#: shared-module/_bleio/Attribute.c +msgid "Invalid security_mode" +msgstr "不正な security_mode" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Invalid voice" +msgstr "不正なボイス" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Invalid voice count" +msgstr "不正なボイス数" + +#: shared-module/audiocore/WaveFile.c +msgid "Invalid wave file" +msgstr "不正なWaveファイルです" + +#: ports/stm/common-hal/busio/UART.c +msgid "Invalid word/bit length" +msgstr "不正なワード/ビット長" + +#: shared-bindings/aesio/aes.c +msgid "Key must be 16, 24, or 32 bytes long" +msgstr "Keyの長さは、16, 24, 32バイトのいずれかでなければなりません" + +#: py/compile.c +msgid "LHS of keyword arg must be an id" +msgstr "キーワード引数の左辺はidです" + +#: shared-module/displayio/Group.c +msgid "Layer already in a group." +msgstr "レイヤーはすでにグループに含まれています。" + +#: shared-module/displayio/Group.c +msgid "Layer must be a Group or TileGrid subclass." +msgstr "レイヤーはGroupかTileGridのサブクラスでなければなりません。" + +#: py/objslice.c +msgid "Length must be an int" +msgstr "Lengthはint型でなければなりません" + +#: py/objslice.c +msgid "Length must be non-negative" +msgstr "Lengthは非負数でなければなりません" + +#: shared-module/bitbangio/SPI.c +msgid "MISO pin init failed." +msgstr "MISOピンの初期化に失敗しました。" + +#: shared-module/bitbangio/SPI.c +msgid "MOSI pin init failed." +msgstr "MOSIピンの初期化に失敗しました。" + +#: shared-module/displayio/Shape.c +#, c-format +msgid "Maximum x value when mirrored is %d" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "MicroPython NLR jump failed. Likely memory corruption." +msgstr "MicroPythonのNLRジャンプに失敗しました。メモリ破壊かもしれません。" + +#: supervisor/shared/safe_mode.c +msgid "MicroPython fatal error." +msgstr "MicroPythonの致命的エラーです。" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Microphone startup delay must be in range 0.0 to 1.0" +msgstr "マイクのスタートアップディレイは 0.0 から 1.0 の間でなければなりません" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c +msgid "Missing MISO or MOSI Pin" +msgstr "MISOまたはMOSIピンがありません" + +#: shared-bindings/displayio/Group.c +msgid "Must be a %q subclass." +msgstr "%q のサブクラスでなければなりません。" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c +msgid "Must provide MISO or MOSI pin" +msgstr "MISOピンまたはMOSIピンが必要です" + +#: ports/stm/common-hal/busio/SPI.c +msgid "Must provide SCK pin" +msgstr "SCKピンが必要です" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "Must use a multiple of 6 rgb pins, not %d" +msgstr "%d個でなく、6の倍数個のrgbピンを使わなければなりません" + +#: py/parse.c +msgid "Name too long" +msgstr "名前が長すぎます" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +msgid "No CCCD for this Characteristic" +msgstr "" + +#: ports/atmel-samd/common-hal/analogio/AnalogOut.c +#: ports/stm/common-hal/analogio/AnalogOut.c +msgid "No DAC on chip" +msgstr "チップにDACがありません" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "No DMA channel found" +msgstr "DMAチャネルが見つかりません" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c +msgid "No MISO Pin" +msgstr "MISOピンがありません" + +#: ports/mimxrt10xx/common-hal/busio/SPI.c ports/stm/common-hal/busio/SPI.c +msgid "No MOSI Pin" +msgstr "MOSIピンがありません" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/stm/common-hal/busio/UART.c +msgid "No RX pin" +msgstr "RXピンがありません" + +#: ports/atmel-samd/common-hal/busio/UART.c +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: ports/stm/common-hal/busio/UART.c +msgid "No TX pin" +msgstr "TXピンがありません" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +msgid "No available clocks" +msgstr "利用できるクロックがありません" + +#: shared-bindings/_bleio/PacketBuffer.c +msgid "No connection: length cannot be determined" +msgstr "接続なし: 長さが決定できません" + +#: shared-bindings/board/__init__.c +msgid "No default %q bus" +msgstr "デフォルトの %q バスがありません" + +#: ports/atmel-samd/common-hal/touchio/TouchIn.c +msgid "No free GCLKs" +msgstr "使われていないGCLKがありません" + +#: shared-bindings/os/__init__.c +msgid "No hardware random available" +msgstr "ハードウェア乱数が利用できません" + +#: ports/atmel-samd/common-hal/ps2io/Ps2.c +msgid "No hardware support on clk pin" +msgstr "clkピン上のハードウェアサポートがありません" + +#: ports/atmel-samd/common-hal/frequencyio/FrequencyIn.c +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +msgid "No hardware support on pin" +msgstr "ピン上のハードウェアサポートがありません" + +#: shared-bindings/aesio/aes.c +msgid "No key was specified" +msgstr "キーが指定されていません" + +#: shared-bindings/time/__init__.c +msgid "No long integer support" +msgstr "long integer はサポートされていません" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "No more timers available on this pin." +msgstr "このピンには利用可能なタイマーがもうありません。" + +#: shared-module/touchio/TouchIn.c +msgid "No pulldown on pin; 1Mohm recommended" +msgstr "ピンにプルダウンがありません。1Mオーム推奨" + +#: py/moduerrno.c +msgid "No space left on device" +msgstr "デバイスに空き容量が残っていません" + +#: py/moduerrno.c +msgid "No such file/directory" +msgstr "指定されたファイル/ディレクトリはありません" + +#: shared-module/rgbmatrix/RGBMatrix.c +msgid "No timer available" +msgstr "タイマーが利用できません" + +#: supervisor/shared/safe_mode.c +msgid "Nordic Soft Device failure assertion." +msgstr "" + +#: ports/nrf/common-hal/_bleio/__init__.c +#: shared-bindings/_bleio/CharacteristicBuffer.c +msgid "Not connected" +msgstr "接続されていません" + +#: shared-bindings/audiobusio/I2SOut.c shared-bindings/audioio/AudioOut.c +#: shared-bindings/audiopwmio/PWMAudioOut.c +msgid "Not playing" +msgstr "再生中ではありません" + +#: main.c +msgid "Not running saved code.\n" +msgstr "保存されたコードは実行していません。\n" + +#: shared-bindings/util.c +msgid "" +"Object has been deinitialized and can no longer be used. Create a new object." +msgstr "オブジェクトは解体済みでもう使われていません。新たなオブジェクトを作成してください。" + +#: ports/nrf/common-hal/busio/UART.c +msgid "Odd parity is not supported" +msgstr "奇数パリティはサポートされていません" + +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "Only 8 or 16 bit mono with " +msgstr "8または16ビットの " + +#: shared-module/displayio/OnDiskBitmap.c +#, c-format +msgid "" +"Only Windows format, uncompressed BMP supported: given header size is %d" +msgstr "" + +#: shared-module/displayio/OnDiskBitmap.c +#, c-format +msgid "" +"Only monochrome, indexed 4bpp or 8bpp, and 16bpp or greater BMPs supported: " +"%d bpp given" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "Oversample must be multiple of 8." +msgstr "オーバーサンプルは8の倍数でなければなりません。" + +#: shared-bindings/pulseio/PWMOut.c +msgid "" +"PWM duty_cycle must be between 0 and 65535 inclusive (16 bit resolution)" +msgstr "PWMの duty_cycle 値は 0 から 65535 の間でなければなりません(16ビット解像度)" + +#: shared-bindings/pulseio/PWMOut.c +msgid "" +"PWM frequency not writable when variable_frequency is False on construction." +msgstr "PWM周波数は、生成時の variable_frequency が False の場合、書き換えられません。" + +#: ports/mimxrt10xx/common-hal/displayio/ParallelBus.c +#: ports/stm/common-hal/displayio/ParallelBus.c +msgid "ParallelBus not yet supported" +msgstr "ParallelBusはまだサポートされていません" + +#: py/moduerrno.c +msgid "Permission denied" +msgstr "パーミッション拒否" + +#: ports/atmel-samd/common-hal/analogio/AnalogIn.c +#: ports/cxd56/common-hal/analogio/AnalogIn.c +#: ports/mimxrt10xx/common-hal/analogio/AnalogIn.c +#: ports/nrf/common-hal/analogio/AnalogIn.c +#: ports/stm/common-hal/analogio/AnalogIn.c +msgid "Pin does not have ADC capabilities" +msgstr "ピンにADCの能力がありません" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Pin is input only" +msgstr "ピンは入力専用です" + +#: ports/atmel-samd/common-hal/countio/Counter.c +msgid "Pin must support hardware interrupts" +msgstr "ピンはハードウェア割り込みをサポートしていなければなりません" + +#: ports/stm/common-hal/pulseio/PulseIn.c +msgid "Pin number already reserved by EXTI" +msgstr "ピン番号はすでにEXTIによって予約されています" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "" +"Pinout uses %d bytes per element, which consumes more than the ideal %d " +"bytes. If this cannot be avoided, pass allow_inefficient=True to the " +"constructor" +msgstr "" + +#: py/builtinhelp.c +msgid "Plus any modules on the filesystem\n" +msgstr "" + +#: shared-module/vectorio/Polygon.c +msgid "Polygon needs at least 3 points" +msgstr "ポリゴンには少なくとも3つの点が必要です" + +#: shared-bindings/_bleio/Adapter.c +msgid "Prefix buffer must be on the heap" +msgstr "Prefixバッファはヒープ上になければなりません" + +#: main.c +#, fuzzy +msgid "Press any key to enter the REPL. Use CTRL-D to reload." +msgstr "何らかのキーを押すとREPLに入ります。CTRL-Dでリロードします。" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Pull not used when direction is output." +msgstr "出力方向がOutputのときPullは使われません。" + +#: ports/stm/common-hal/os/__init__.c +msgid "RNG DeInit Error" +msgstr "乱数生成器の解体エラー" + +#: ports/stm/common-hal/os/__init__.c +msgid "RNG Init Error" +msgstr "乱数生成器の初期化エラー" + +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "RS485 inversion specified when not in RS485 mode" +msgstr "" + +#: ports/cxd56/common-hal/rtc/RTC.c ports/mimxrt10xx/common-hal/rtc/RTC.c +#: ports/nrf/common-hal/rtc/RTC.c +msgid "RTC calibration is not supported on this board" +msgstr "RTCのキャリブレーションはこのボードではサポートされていません" + +#: shared-bindings/time/__init__.c +msgid "RTC is not supported on this board" +msgstr "このボードではRTCがサポートされていません" + +#: ports/atmel-samd/common-hal/busio/UART.c ports/cxd56/common-hal/busio/UART.c +#: ports/nrf/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "RTS/CTS/RS485 Not yet supported on this device" +msgstr "RTS/CTS/RS485 はまだこのデバイスでサポートされていません" + +#: ports/stm/common-hal/os/__init__.c +msgid "Random number generation error" +msgstr "乱数生成エラー" + +#: shared-bindings/memorymonitor/AllocationSize.c +#: shared-bindings/pulseio/PulseIn.c +msgid "Read-only" +msgstr "読み込み専用" + +#: extmod/vfs_fat.c py/moduerrno.c +msgid "Read-only filesystem" +msgstr "読み込み専用のファイルシステム" + +#: shared-module/displayio/Bitmap.c +msgid "Read-only object" +msgstr "読み込み専用のオブジェクト" + +#: shared-bindings/displayio/EPaperDisplay.c +msgid "Refresh too soon" +msgstr "リフレッシュが早すぎです" + +#: shared-bindings/aesio/aes.c +msgid "Requested AES mode is unsupported" +msgstr "要求されたAESモードはサポートされていません" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Right channel unsupported" +msgstr "右チャネルはサポートされていません" + +#: shared-bindings/_pew/PewPew.c +msgid "Row entry must be digitalio.DigitalInOut" +msgstr "Rowの各要素は digitalio.DigitalInOut でなければなりません" + +#: main.c +msgid "Running in safe mode! " +msgstr "セーフモードで実行中です! " + +#: shared-module/sdcardio/SDCard.c +msgid "SD card CSD format not supported" +msgstr "SDカードのCSDフォーマットはサポートされていません" + +#: ports/atmel-samd/common-hal/busio/I2C.c +#: ports/mimxrt10xx/common-hal/busio/I2C.c ports/nrf/common-hal/busio/I2C.c +msgid "SDA or SCL needs a pull up" +msgstr "SDAとSCLはプルアップが必要です" + +#: ports/stm/common-hal/busio/SPI.c +msgid "SPI Init Error" +msgstr "SPI初期化エラー" + +#: ports/stm/common-hal/busio/SPI.c +msgid "SPI Re-initialization error" +msgstr "SPI再初期化エラー" + +#: shared-bindings/audiomixer/Mixer.c +msgid "Sample rate must be positive" +msgstr "サンプルレートは正数でなければなりません" + +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +#, c-format +msgid "Sample rate too high. It must be less than %d" +msgstr "サンプルレートが高すぎです。%d 以下でなければなりません" + +#: ports/nrf/common-hal/_bleio/Adapter.c +msgid "Scan already in progess. Stop with stop_scan." +msgstr "スキャンがすでに進行中です。stop_scanで停止してください。" + +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Selected CTS pin not valid" +msgstr "選択されたCTSピンが正しくありません" + +#: ports/mimxrt10xx/common-hal/busio/UART.c +msgid "Selected RTS pin not valid" +msgstr "選択されたRTSピンが正しくありません" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "Serializer in use" +msgstr "シリアライザは使用中です" + +#: shared-bindings/nvm/ByteArray.c +msgid "Slice and value different lengths." +msgstr "スライスと値の長さが一致しません。" + +#: shared-bindings/displayio/Bitmap.c shared-bindings/displayio/Group.c +#: shared-bindings/displayio/TileGrid.c +#: shared-bindings/memorymonitor/AllocationSize.c +#: shared-bindings/pulseio/PulseIn.c +msgid "Slices not supported" +msgstr "スライスはサポートされていません" + +#: shared-bindings/aesio/aes.c +msgid "Source and destination buffers must be the same length" +msgstr "" + +#: extmod/modure.c +msgid "Splitting with sub-captures" +msgstr "" + +#: shared-bindings/supervisor/__init__.c +msgid "Stack size must be at least 256" +msgstr "スタックサイズは少なくとも256以上でなければなりません" + +#: shared-bindings/multiterminal/__init__.c +msgid "Stream missing readinto() or write() method." +msgstr "" + +#: ports/mimxrt10xx/common-hal/busio/UART.c ports/stm/common-hal/busio/UART.c +msgid "Supply at least one UART pin" +msgstr "少なくとも1つのUARTピンが必要です" + +#: shared-bindings/gnss/GNSS.c +msgid "System entry must be gnss.SatelliteSystem" +msgstr "" + +#: ports/stm/common-hal/microcontroller/Processor.c +msgid "Temperature read timed out" +msgstr "温度読み取りがタイムアウトしました" + +#: supervisor/shared/safe_mode.c +msgid "" +"The CircuitPython heap was corrupted because the stack was too small.\n" +"Please increase the stack size if you know how, or if not:" +msgstr "" +"スタックが小さすぎたことによりCircuitPythonのヒープが破損しました。\n" +"スタックサイズを上げるか、その方法が分からなければ:" + +#: supervisor/shared/safe_mode.c +msgid "" +"The `microcontroller` module was used to boot into safe mode. Press reset to " +"exit safe mode.\n" +msgstr "`microcontroller` モジュールが使われてセーフモードで起動しました。セーフモードを抜けるにはリセットを押します。\n" + +#: supervisor/shared/safe_mode.c +#, fuzzy +msgid "" +"The microcontroller's power dipped. Make sure your power supply provides\n" +"enough power for the whole circuit and press reset (after ejecting " +"CIRCUITPY).\n" +msgstr "" +"マイクロコントローラの電力が降下しました。電源が回路全体が求める十分な電力を供給できることを確認してリセットを押してください(CIRCUITPYを取り出し" +"た後)。\n" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's bits_per_sample does not match the mixer's" +msgstr "サンプルのビット数/サンプルがミキサーのそれと一致しません" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's channel count does not match the mixer's" +msgstr "" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's sample rate does not match the mixer's" +msgstr "" + +#: shared-module/audiomixer/MixerVoice.c +msgid "The sample's signedness does not match the mixer's" +msgstr "サンプルの符号の有無がミキサーのそれと一致しません" + +#: shared-bindings/displayio/TileGrid.c +msgid "Tile height must exactly divide bitmap height" +msgstr "タイルの高さはビットマップの高さを割り切れる値でなければなりません" + +#: shared-bindings/displayio/TileGrid.c shared-module/displayio/TileGrid.c +msgid "Tile index out of bounds" +msgstr "タイルのインデクスが範囲外です" + +#: shared-bindings/displayio/TileGrid.c +msgid "Tile value out of bounds" +msgstr "タイルの値が範囲外です" + +#: shared-bindings/displayio/TileGrid.c +msgid "Tile width must exactly divide bitmap width" +msgstr "タイルの幅はビットマップの幅を割り切れる値でなければなりません" + +#: ports/nrf/common-hal/_bleio/Adapter.c +#, c-format +msgid "Timeout is too long: Maximum timeout length is %d seconds" +msgstr "タイムアウトが長すぎます。最大のタイムアウト長は %d 秒です" + +#: ports/stm/common-hal/pulseio/PWMOut.c +msgid "" +"Timer was reserved for internal use - declare PWM pins earlier in the program" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +msgid "Too many channels in sample." +msgstr "サンプル中のチャンネル数が多すぎます。" + +#: shared-module/displayio/__init__.c +msgid "Too many display busses" +msgstr "" + +#: shared-module/displayio/__init__.c +msgid "Too many displays" +msgstr "" + +#: ports/nrf/common-hal/_bleio/PacketBuffer.c +msgid "Total data to write is larger than outgoing_packet_length" +msgstr "" + +#: py/obj.c +msgid "Traceback (most recent call last):\n" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "Tuple or struct_time argument required" +msgstr "" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART Buffer allocation error" +msgstr "UARTバッファの確保エラー" + +#: ports/stm/common-hal/busio/UART.c +#, fuzzy +msgid "UART De-init error" +msgstr "UARTの解体エラー" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART Init Error" +msgstr "UARTの初期化エラー" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART Re-init error" +msgstr "UARTの再初期化エラー" + +#: ports/stm/common-hal/busio/UART.c +msgid "UART write error" +msgstr "UART書き込みエラー" + +#: shared-module/usb_hid/Device.c +msgid "USB Busy" +msgstr "USBビジー" + +#: shared-module/usb_hid/Device.c +msgid "USB Error" +msgstr "USBエラー" + +#: shared-bindings/_bleio/UUID.c +msgid "UUID integer value must be 0-0xffff" +msgstr "UUIDの整数値は0から0xffffの間でなければなりません" + +#: shared-bindings/_bleio/UUID.c +msgid "UUID string not 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'" +msgstr "UUID文字列が 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' の形式になっていません" + +#: shared-bindings/_bleio/UUID.c +msgid "UUID value is not str, int or byte buffer" +msgstr "UUIDの値が str, int, buffer のいずれでもありません" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audioio/AudioOut.c +msgid "Unable to allocate buffers for signed conversion" +msgstr "" + +#: shared-module/displayio/I2CDisplay.c +#, c-format +msgid "Unable to find I2C Display at %x" +msgstr "" + +#: ports/atmel-samd/common-hal/audiobusio/I2SOut.c +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "Unable to find free GCLK" +msgstr "" + +#: py/parse.c +msgid "Unable to init parser" +msgstr "パーザを初期化できません" + +#: shared-module/displayio/OnDiskBitmap.c +msgid "Unable to read color palette data" +msgstr "カラーパレットのデータを読み込めません" + +#: shared-bindings/nvm/ByteArray.c +msgid "Unable to write to nvm." +msgstr "nvm に書き込みできません。" + +#: ports/nrf/common-hal/_bleio/UUID.c +msgid "Unexpected nrfx uuid type" +msgstr "想定されていない nrfx UUID 型" + +#: ports/nrf/common-hal/_bleio/__init__.c +#, c-format +msgid "Unknown gatt error: 0x%04x" +msgstr "不明なGATTエラー: 0x%04x" + +#: supervisor/shared/safe_mode.c +msgid "Unknown reason." +msgstr "理由不明。" + +#: ports/nrf/common-hal/_bleio/__init__.c +#, c-format +msgid "Unknown security error: 0x%04x" +msgstr "不明なセキュリティエラー: 0x%04x" + +#: ports/nrf/common-hal/_bleio/__init__.c +#, c-format +msgid "Unknown soft device error: %04x" +msgstr "不明なソフトデバイスエラー: %04x" + +#: shared-bindings/_pixelbuf/PixelBuf.c +#, c-format +msgid "Unmatched number of items on RHS (expected %d, got %d)." +msgstr "右辺の要素数が一致しません (expected %d, got %d)" + +#: ports/nrf/common-hal/_bleio/__init__.c +msgid "" +"Unspecified issue. Can be that the pairing prompt on the other device was " +"declined or ignored." +msgstr "" + +#: ports/atmel-samd/common-hal/busio/I2C.c ports/cxd56/common-hal/busio/I2C.c +#: ports/stm/common-hal/busio/I2C.c +msgid "Unsupported baudrate" +msgstr "" + +#: shared-module/displayio/display_core.c +msgid "Unsupported display bus type" +msgstr "" + +#: shared-module/audiocore/WaveFile.c +msgid "Unsupported format" +msgstr "" + +#: py/moduerrno.c +msgid "Unsupported operation" +msgstr "" + +#: shared-bindings/digitalio/DigitalInOut.c +msgid "Unsupported pull value." +msgstr "サポートされていない pull 値です。" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +#: ports/nrf/common-hal/_bleio/Descriptor.c +msgid "Value length != required fixed length" +msgstr "" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +#: ports/nrf/common-hal/_bleio/Descriptor.c +msgid "Value length > max_length" +msgstr "" + +#: py/emitnative.c +msgid "Viper functions don't currently support more than 4 arguments" +msgstr "" + +#: ports/stm/common-hal/microcontroller/Processor.c +msgid "Voltage read timed out" +msgstr "" + +#: main.c +msgid "WARNING: Your code filename has two extensions\n" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer cannot be deinitialized once mode is set to RESET" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer is not currently running" +msgstr "WatchDogTimerは現在動作していません" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer.mode cannot be changed once set to WatchDogMode.RESET" +msgstr "WatchDogTimer.mode は一度 WatchDogMode.RESET に設定されると変更できません" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "WatchDogTimer.timeout must be greater than 0" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "Watchdog timer expired." +msgstr "" + +#: py/builtinhelp.c +#, c-format +msgid "" +"Welcome to Adafruit CircuitPython %s!\n" +"\n" +"Please visit learn.adafruit.com/category/circuitpython for project guides.\n" +"\n" +"To list built-in modules please do `help(\"modules\")`.\n" +msgstr "" + +#: ports/nrf/common-hal/_bleio/PacketBuffer.c +msgid "Writes not supported on Characteristic" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "You are in safe mode: something unanticipated happened.\n" +msgstr "" + +#: supervisor/shared/safe_mode.c +msgid "You requested starting safe mode by " +msgstr "" + +#: py/objtype.c +msgid "__init__() should return None" +msgstr "" + +#: py/objtype.c +msgid "__init__() should return None, not '%q'" +msgstr "" + +#: py/objobject.c +msgid "__new__ arg must be a user-type" +msgstr "" + +#: extmod/modubinascii.c extmod/moduhashlib.c py/objarray.c +msgid "a bytes-like object is required" +msgstr "" + +#: lib/embed/abort_.c +msgid "abort() called" +msgstr "" + +#: extmod/machine_mem.c +#, c-format +msgid "address %08x is not aligned to %d bytes" +msgstr "" + +#: shared-bindings/i2cperipheral/I2CPeripheral.c +msgid "address out of bounds" +msgstr "" + +#: shared-bindings/i2cperipheral/I2CPeripheral.c +msgid "addresses is empty" +msgstr "" + +#: extmod/ulab/code/vector/vectorise.c +msgid "arctan2 is implemented for scalars and ndarrays only" +msgstr "" + +#: py/modbuiltins.c +msgid "arg is an empty sequence" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "argsort argument must be an ndarray" +msgstr "" + +#: py/runtime.c +msgid "argument has wrong type" +msgstr "" + +#: extmod/ulab/code/linalg/linalg.c +msgid "argument must be ndarray" +msgstr "" + +#: py/argcheck.c shared-bindings/_stage/__init__.c +#: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c +msgid "argument num/types mismatch" +msgstr "" + +#: py/runtime.c +msgid "argument should be a '%q' not a '%q'" +msgstr "" + +#: extmod/ulab/code/linalg/linalg.c +msgid "arguments must be ndarrays" +msgstr "" + +#: py/objarray.c shared-bindings/nvm/ByteArray.c +msgid "array/bytes required on right side" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "attempt to get argmin/argmax of an empty sequence" +msgstr "" + +#: py/objstr.c +msgid "attributes not supported yet" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "axis must be -1, 0, None, or 1" +msgstr "axisは -1, 0, 1, None のいずれかでなければなりません" + +#: extmod/ulab/code/numerical/numerical.c +msgid "axis must be -1, 0, or 1" +msgstr "axisは -1, 0, 1 のいずれかでなければなりません" + +#: extmod/ulab/code/numerical/numerical.c +msgid "axis must be None, 0, or 1" +msgstr "axisは None, 0, 1 のいずれかでなければなりません" + +#: py/builtinevex.c +msgid "bad compile mode" +msgstr "" + +#: py/objstr.c +msgid "bad conversion specifier" +msgstr "" + +#: py/objstr.c +msgid "bad format string" +msgstr "" + +#: py/binary.c +msgid "bad typecode" +msgstr "typecodeが正しくありません" + +#: py/emitnative.c +msgid "binary op %q not implemented" +msgstr "" + +#: shared-bindings/busio/UART.c +msgid "bits must be 7, 8 or 9" +msgstr "" + +#: shared-bindings/audiomixer/Mixer.c +msgid "bits_per_sample must be 8 or 16" +msgstr "" + +#: py/emitinlinethumb.c +msgid "branch not in range" +msgstr "" + +#: shared-bindings/audiocore/RawSample.c +msgid "buffer must be a bytes-like object" +msgstr "" + +#: shared-module/struct/__init__.c +msgid "buffer size must match format" +msgstr "" + +#: shared-bindings/bitbangio/SPI.c shared-bindings/busio/SPI.c +msgid "buffer slices must be of equal length" +msgstr "" + +#: py/modstruct.c shared-bindings/struct/__init__.c +#: shared-module/struct/__init__.c +msgid "buffer too small" +msgstr "" + +#: shared-bindings/_pew/PewPew.c +msgid "buttons must be digitalio.DigitalInOut" +msgstr "" + +#: py/vm.c +msgid "byte code not implemented" +msgstr "" + +#: shared-bindings/_pixelbuf/PixelBuf.c +msgid "byteorder is not a string" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c +msgid "bytes > 8 bits not supported" +msgstr "" + +#: py/objstr.c +msgid "bytes value out of range" +msgstr "" + +#: ports/atmel-samd/bindings/samd/Clock.c ports/atmel-samd/common-hal/rtc/RTC.c +msgid "calibration is out of range" +msgstr "" + +#: ports/atmel-samd/bindings/samd/Clock.c +msgid "calibration is read only" +msgstr "" + +#: ports/atmel-samd/common-hal/rtc/RTC.c +msgid "calibration value out of range +/-127" +msgstr "" + +#: py/emitinlinethumb.c +msgid "can only have up to 4 parameters to Thumb assembly" +msgstr "" + +#: py/emitinlinextensa.c +msgid "can only have up to 4 parameters to Xtensa assembly" +msgstr "" + +#: py/persistentcode.c +msgid "can only save bytecode" +msgstr "" + +#: py/objtype.c +msgid "can't add special method to already-subclassed class" +msgstr "" + +#: py/compile.c +msgid "can't assign to expression" +msgstr "" + +#: py/obj.c py/objint.c shared-bindings/i2cperipheral/I2CPeripheral.c +msgid "can't convert %q to %q" +msgstr "" + +#: py/objstr.c +msgid "can't convert '%q' object to %q implicitly" +msgstr "" + +#: py/obj.c +msgid "can't convert to %q" +msgstr "" + +#: py/objstr.c +msgid "can't convert to str implicitly" +msgstr "" + +#: py/compile.c +msgid "can't declare nonlocal in outer code" +msgstr "" + +#: py/compile.c +msgid "can't delete expression" +msgstr "" + +#: py/emitnative.c +msgid "can't do binary op between '%q' and '%q'" +msgstr "" + +#: py/objcomplex.c +msgid "can't do truncated division of a complex number" +msgstr "" + +#: py/compile.c +msgid "can't have multiple **x" +msgstr "" + +#: py/compile.c +msgid "can't have multiple *x" +msgstr "" + +#: py/emitnative.c +msgid "can't implicitly convert '%q' to 'bool'" +msgstr "" + +#: py/emitnative.c +msgid "can't load from '%q'" +msgstr "" + +#: py/emitnative.c +msgid "can't load with '%q' index" +msgstr "" + +#: py/objgenerator.c +msgid "can't pend throw to just-started generator" +msgstr "" + +#: py/objgenerator.c +msgid "can't send non-None value to a just-started generator" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "can't set 512 block size" +msgstr "" + +#: py/objnamedtuple.c +msgid "can't set attribute" +msgstr "" + +#: py/emitnative.c +msgid "can't store '%q'" +msgstr "" + +#: py/emitnative.c +msgid "can't store to '%q'" +msgstr "" + +#: py/emitnative.c +msgid "can't store with '%q' index" +msgstr "" + +#: py/objstr.c +msgid "" +"can't switch from automatic field numbering to manual field specification" +msgstr "" + +#: py/objstr.c +msgid "" +"can't switch from manual field specification to automatic field numbering" +msgstr "" + +#: py/objtype.c +msgid "cannot create '%q' instances" +msgstr "" + +#: py/objtype.c +msgid "cannot create instance" +msgstr "" + +#: py/runtime.c +msgid "cannot import name %q" +msgstr "" + +#: py/builtinimport.c +msgid "cannot perform relative import" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "cannot reshape array (incompatible input/output shape)" +msgstr "" + +#: py/emitnative.c +msgid "casting" +msgstr "" + +#: shared-bindings/_stage/Text.c +msgid "chars buffer too small" +msgstr "" + +#: py/modbuiltins.c +msgid "chr() arg not in range(0x110000)" +msgstr "" + +#: py/modbuiltins.c +msgid "chr() arg not in range(256)" +msgstr "" + +#: shared-module/vectorio/Circle.c +msgid "circle can only be registered in one parent" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color buffer must be 3 bytes (RGB) or 4 bytes (RGB + pad byte)" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color buffer must be a buffer, tuple, list, or int" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color buffer must be a bytearray or array of type 'b' or 'B'" +msgstr "" + +#: shared-bindings/displayio/Palette.c +msgid "color must be between 0x000000 and 0xffffff" +msgstr "" + +#: shared-bindings/displayio/ColorConverter.c +msgid "color should be an int" +msgstr "" + +#: py/objcomplex.c +msgid "complex division by zero" +msgstr "" + +#: py/objfloat.c py/parsenum.c +msgid "complex values not supported" +msgstr "" + +#: extmod/moduzlib.c +msgid "compression header" +msgstr "" + +#: py/parse.c +msgid "constant must be an integer" +msgstr "" + +#: py/emitnative.c +msgid "conversion to object" +msgstr "" + +#: extmod/ulab/code/filter/filter.c +msgid "convolve arguments must be linear arrays" +msgstr "" + +#: extmod/ulab/code/filter/filter.c +msgid "convolve arguments must be ndarrays" +msgstr "" + +#: extmod/ulab/code/filter/filter.c +msgid "convolve arguments must not be empty" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "could not broadast input array from shape" +msgstr "" + +#: extmod/ulab/code/poly/poly.c +msgid "could not invert Vandermonde matrix" +msgstr "" + +#: shared-module/sdcardio/SDCard.c +msgid "couldn't determine SD card version" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "data must be iterable" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "data must be of equal length" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "ddof must be smaller than length of data set" +msgstr "" + +#: py/parsenum.c +msgid "decimal numbers not supported" +msgstr "" + +#: py/compile.c +msgid "default 'except' must be last" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "" +"destination buffer must be a bytearray or array of type 'B' for bit_depth = 8" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "destination buffer must be an array of type 'H' for bit_depth = 16" +msgstr "" + +#: shared-bindings/audiobusio/PDMIn.c +msgid "destination_length must be an int >= 0" +msgstr "" + +#: py/objdict.c +msgid "dict update sequence has wrong length" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "diff argument must be an ndarray" +msgstr "" + +#: py/modmath.c py/objfloat.c py/objint_longlong.c py/objint_mpz.c py/runtime.c +#: shared-bindings/math/__init__.c +msgid "division by zero" +msgstr "ゼロ除算 (division by zero)" + +#: py/objdeque.c +msgid "empty" +msgstr "" + +#: extmod/moduheapq.c extmod/modutimeq.c +msgid "empty heap" +msgstr "" + +#: py/objstr.c +msgid "empty separator" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "empty sequence" +msgstr "" + +#: py/objstr.c +msgid "end of format while looking for conversion specifier" +msgstr "" + +#: shared-bindings/displayio/Shape.c +msgid "end_x should be an int" +msgstr "end_x は int でなければなりません" + +#: ports/nrf/common-hal/busio/UART.c +#, c-format +msgid "error = 0x%08lX" +msgstr "error = 0x1%08lX" + +#: py/runtime.c +msgid "exceptions must derive from BaseException" +msgstr "例外はBaseExceptionから派生していなければなりません" + +#: py/objstr.c +msgid "expected ':' after format specifier" +msgstr "書式化指定子の後に ':' が必要です" + +#: py/obj.c +msgid "expected tuple/list" +msgstr "タプルまたはリストが必要です" + +#: py/modthread.c +msgid "expecting a dict for keyword args" +msgstr "" + +#: py/compile.c +msgid "expecting an assembler instruction" +msgstr "アセンブラ命令が必要です" + +#: py/compile.c +msgid "expecting just a value for set" +msgstr "" + +#: py/compile.c +msgid "expecting key:value for dict" +msgstr "dictには key:value が必要です" + +#: py/argcheck.c +msgid "extra keyword arguments given" +msgstr "余計なキーワード引数が与えられました" + +#: py/argcheck.c +msgid "extra positional arguments given" +msgstr "余分な位置引数 (positional arguments) が与えられました" + +#: py/parse.c +msgid "f-string expression part cannot include a '#'" +msgstr "" + +#: py/parse.c +msgid "f-string expression part cannot include a backslash" +msgstr "" + +#: py/parse.c +msgid "f-string: empty expression not allowed" +msgstr "" + +#: py/parse.c +msgid "f-string: expecting '}'" +msgstr "f-string: '}' が必要です" + +#: py/parse.c +msgid "f-string: single '}' is not allowed" +msgstr "f-string: 1つだけの '}' は許されません" + +#: shared-bindings/audiocore/WaveFile.c shared-bindings/audiomp3/MP3Decoder.c +#: shared-bindings/displayio/OnDiskBitmap.c +msgid "file must be a file opened in byte mode" +msgstr "fileはバイトモードで開かれたファイルでなければなりません" + +#: shared-bindings/storage/__init__.c +msgid "filesystem must provide mount method" +msgstr "" + +#: extmod/ulab/code/vector/vectorise.c +msgid "first argument must be a callable" +msgstr "1つ目の引数は呼び出し可能でなければなりません" + +#: extmod/ulab/code/approx/approx.c +msgid "first argument must be a function" +msgstr "1つ目の引数は関数でなければなりません" + +#: extmod/ulab/code/ndarray.c +msgid "first argument must be an iterable" +msgstr "1つ目の引数はイテレート可能でなければなりません" + +#: extmod/ulab/code/vector/vectorise.c +msgid "first argument must be an ndarray" +msgstr "1つ目の引数は ndarray でなければなりません" + +#: py/objtype.c +msgid "first argument to super() must be type" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "flattening order must be either 'C', or 'F'" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "flip argument must be an ndarray" +msgstr "flipの引数はndarrayでなければなりません" + +#: py/objint.c +msgid "float too big" +msgstr "floatの値が大きすぎます" + +#: shared-bindings/_stage/Text.c +msgid "font must be 2048 bytes long" +msgstr "" + +#: py/objstr.c +msgid "format requires a dict" +msgstr "" + +#: py/objdeque.c +msgid "full" +msgstr "" + +#: py/argcheck.c +msgid "function does not take keyword arguments" +msgstr "" + +#: py/argcheck.c +#, c-format +msgid "function expected at most %d arguments, got %d" +msgstr "" + +#: py/bc.c py/objnamedtuple.c +msgid "function got multiple values for argument '%q'" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "function has the same sign at the ends of interval" +msgstr "" + +#: extmod/ulab/code/compare/compare.c +msgid "function is implemented for scalars and ndarrays only" +msgstr "" + +#: py/argcheck.c +#, c-format +msgid "function missing %d required positional arguments" +msgstr "" + +#: py/bc.c +#, fuzzy +msgid "function missing keyword-only argument" +msgstr "キーワード専用引数が不足しています" + +#: py/bc.c +msgid "function missing required keyword argument '%q'" +msgstr "必須のキーワード引数 '%q' が与えられていません" + +#: py/bc.c +#, c-format +msgid "function missing required positional argument #%d" +msgstr "" + +#: py/argcheck.c py/bc.c py/objnamedtuple.c shared-bindings/time/__init__.c +#, c-format +msgid "function takes %d positional arguments but %d were given" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "function takes exactly 9 arguments" +msgstr "この関数はちょうど9個の引数をとります" + +#: py/objgenerator.c +msgid "generator already executing" +msgstr "" + +#: py/objgenerator.c +msgid "generator ignored GeneratorExit" +msgstr "" + +#: shared-bindings/_stage/Layer.c +msgid "graphic must be 2048 bytes long" +msgstr "" + +#: extmod/moduheapq.c +msgid "heap must be a list" +msgstr "" + +#: py/compile.c +msgid "identifier redefined as global" +msgstr "" + +#: py/compile.c +msgid "identifier redefined as nonlocal" +msgstr "" + +#: py/objstr.c +msgid "incomplete format" +msgstr "" + +#: py/objstr.c +msgid "incomplete format key" +msgstr "" + +#: extmod/modubinascii.c +msgid "incorrect padding" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "index is out of bounds" +msgstr "" + +#: py/obj.c +msgid "index out of range" +msgstr "インデクスが範囲外です" + +#: py/obj.c +msgid "indices must be integers" +msgstr "インデクスは整数でなければなりません" + +#: extmod/ulab/code/ndarray.c +msgid "indices must be integers, slices, or Boolean lists" +msgstr "インデクスは、整数、スライス、boolのリストのいずれかでなければなりません" + +#: extmod/ulab/code/approx/approx.c +msgid "initial values must be iterable" +msgstr "" + +#: py/compile.c +msgid "inline assembler must be a function" +msgstr "" + +#: extmod/ulab/code/ulab_create.c +msgid "input argument must be an integer or a 2-tuple" +msgstr "" + +#: extmod/ulab/code/fft/fft.c +msgid "input array length must be power of 2" +msgstr "入力 array の長さは2の累乗でなければなりません" + +#: extmod/ulab/code/poly/poly.c +msgid "input data must be an iterable" +msgstr "" + +#: extmod/ulab/code/linalg/linalg.c +msgid "input matrix is asymmetric" +msgstr "入力行列は非対称です" + +#: extmod/ulab/code/linalg/linalg.c +msgid "input matrix is singular" +msgstr "" + +#: extmod/ulab/code/linalg/linalg.c +msgid "input must be square matrix" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "input must be tuple, list, range, or ndarray" +msgstr "" + +#: extmod/ulab/code/poly/poly.c +msgid "input vectors must be of equal length" +msgstr "" + +#: py/parsenum.c +msgid "int() arg 2 must be >= 2 and <= 36" +msgstr "int() の2番目の引数は 2 以上 36 以下でなければなりません" + +#: py/objstr.c +msgid "integer required" +msgstr "整数が必要です" + +#: extmod/ulab/code/approx/approx.c +msgid "interp is defined for 1D arrays of equal length" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +#, c-format +msgid "interval must be in range %s-%s" +msgstr "" + +#: lib/netutils/netutils.c +msgid "invalid arguments" +msgstr "不正な引数" + +#: extmod/modussl_axtls.c +msgid "invalid cert" +msgstr "不正な証明書" + +#: extmod/uos_dupterm.c +msgid "invalid dupterm index" +msgstr "不正なduptermインデクス" + +#: extmod/modframebuf.c +msgid "invalid format" +msgstr "" + +#: py/objstr.c +msgid "invalid format specifier" +msgstr "" + +#: extmod/modussl_axtls.c +msgid "invalid key" +msgstr "不正な鍵" + +#: py/compile.c +msgid "invalid micropython decorator" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "invalid step" +msgstr "不正なステップ" + +#: py/compile.c py/parse.c +msgid "invalid syntax" +msgstr "不正な構文" + +#: py/parsenum.c +msgid "invalid syntax for integer" +msgstr "整数の構文が不正です" + +#: py/parsenum.c +#, c-format +msgid "invalid syntax for integer with base %d" +msgstr "" + +#: py/parsenum.c +msgid "invalid syntax for number" +msgstr "数字として不正な構文です" + +#: py/objtype.c +msgid "issubclass() arg 1 must be a class" +msgstr "issubclass() の1つ目の引数はクラスでなければなりません" + +#: py/objtype.c +msgid "issubclass() arg 2 must be a class or a tuple of classes" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "iterables are not of the same length" +msgstr "イテレート可能なオブジェクトが同じ長さではありません" + +#: extmod/ulab/code/linalg/linalg.c +msgid "iterations did not converge" +msgstr "" + +#: py/objstr.c +msgid "join expects a list of str/bytes objects consistent with self object" +msgstr "" + +#: py/argcheck.c +msgid "keyword argument(s) not yet implemented - use normal args instead" +msgstr "" + +#: py/bc.c +msgid "keywords must be strings" +msgstr "キーワードは文字列でなければなりません" + +#: py/emitinlinethumb.c py/emitinlinextensa.c +msgid "label '%q' not defined" +msgstr "" + +#: py/compile.c +msgid "label redefined" +msgstr "ラベルが再定義されました" + +#: py/stream.c +msgid "length argument not allowed for this type" +msgstr "" + +#: shared-bindings/audiomixer/MixerVoice.c +msgid "level must be between 0 and 1" +msgstr "levelは0から1の間でなければなりません" + +#: py/objarray.c +msgid "lhs and rhs should be compatible" +msgstr "左辺と右辺が互換でなければなりません" + +#: py/emitnative.c +msgid "local '%q' has type '%q' but source is '%q'" +msgstr "" + +#: py/emitnative.c +msgid "local '%q' used before type known" +msgstr "" + +#: py/vm.c +msgid "local variable referenced before assignment" +msgstr "" + +#: py/objint.c +msgid "long int not supported in this build" +msgstr "long int はこのビルドではサポートされていません" + +#: py/parse.c +msgid "malformed f-string" +msgstr "不正な形式のf-stringです" + +#: shared-bindings/_stage/Layer.c +msgid "map buffer too small" +msgstr "" + +#: py/modmath.c shared-bindings/math/__init__.c +msgid "math domain error" +msgstr "定義域エラー" + +#: extmod/ulab/code/linalg/linalg.c +msgid "matrix dimensions do not match" +msgstr "行列の次元が一致しません" + +#: extmod/ulab/code/linalg/linalg.c +msgid "matrix is not positive definite" +msgstr "行列が正定値行列ではありません" + +#: ports/nrf/common-hal/_bleio/Characteristic.c +#: ports/nrf/common-hal/_bleio/Descriptor.c +#, c-format +msgid "max_length must be 0-%d when fixed_length is %s" +msgstr "" + +#: py/runtime.c +msgid "maximum recursion depth exceeded" +msgstr "最大の再帰深度を超えました" + +#: py/runtime.c +#, c-format +msgid "memory allocation failed, allocating %u bytes" +msgstr "" + +#: py/runtime.c +msgid "memory allocation failed, heap is locked" +msgstr "メモリ確保に失敗。ヒープがロックされています" + +#: py/builtinimport.c +msgid "module not found" +msgstr "モジュールが見つかりません" + +#: extmod/ulab/code/poly/poly.c +msgid "more degrees of freedom than data points" +msgstr "" + +#: py/compile.c +msgid "multiple *x in assignment" +msgstr "" + +#: py/objtype.c +msgid "multiple bases have instance lay-out conflict" +msgstr "" + +#: py/objtype.c +msgid "multiple inheritance not supported" +msgstr "複数継承はサポートされていません" + +#: py/emitnative.c +msgid "must raise an object" +msgstr "" + +#: py/modbuiltins.c +msgid "must use keyword argument for key function" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "n must be between 0, and 9" +msgstr "nは0から9の間でなければなりません" + +#: py/runtime.c +msgid "name '%q' is not defined" +msgstr "名前 '%q' は定義されていません" + +#: py/runtime.c +msgid "name not defined" +msgstr "名前が定義されていません" + +#: py/compile.c +msgid "name reused for argument" +msgstr "名前が引数で再利用されています" + +#: py/emitnative.c +msgid "native yield" +msgstr "" + +#: py/runtime.c +#, c-format +msgid "need more than %d values to unpack" +msgstr "" + +#: py/objint_longlong.c py/objint_mpz.c py/runtime.c +msgid "negative power with no float support" +msgstr "" + +#: py/objint_mpz.c py/runtime.c +msgid "negative shift count" +msgstr "シフトカウントが負数です" + +#: shared-module/sdcardio/SDCard.c +msgid "no SD card" +msgstr "SDカードがありません" + +#: py/vm.c +msgid "no active exception to reraise" +msgstr "" + +#: shared-bindings/socket/__init__.c shared-module/network/__init__.c +msgid "no available NIC" +msgstr "利用可能なNICがありません" + +#: py/compile.c +msgid "no binding for nonlocal found" +msgstr "" + +#: py/builtinimport.c +msgid "no module named '%q'" +msgstr "'%q' という名前のモジュールはありません" + +#: shared-bindings/displayio/FourWire.c shared-bindings/displayio/I2CDisplay.c +#: shared-bindings/displayio/ParallelBus.c +msgid "no reset pin available" +msgstr "利用可能なリセットピンがありません" + +#: shared-module/sdcardio/SDCard.c +msgid "no response from SD card" +msgstr "SDカードからの応答がありません" + +#: py/runtime.c +msgid "no such attribute" +msgstr "そのような属性はありません" + +#: ports/nrf/common-hal/_bleio/Connection.c +msgid "non-UUID found in service_uuids_whitelist" +msgstr "" + +#: py/compile.c +msgid "non-default argument follows default argument" +msgstr "" + +#: extmod/modubinascii.c +msgid "non-hex digit found" +msgstr "16進数以外の桁があります" + +#: py/compile.c +msgid "non-keyword arg after */**" +msgstr "*/** の後に非キーワード引数は置けません" + +#: py/compile.c +msgid "non-keyword arg after keyword arg" +msgstr "キーワード引数の後に非キーワード引数は置けません" + +#: shared-bindings/_bleio/UUID.c +msgid "not a 128-bit UUID" +msgstr "128ビットのUUIDではありません" + +#: py/objstr.c +msgid "not all arguments converted during string formatting" +msgstr "" + +#: py/objstr.c +msgid "not enough arguments for format string" +msgstr "" + +#: extmod/ulab/code/poly/poly.c +msgid "number of arguments must be 2, or 3" +msgstr "引数の数は2個または3個でなければなりません" + +#: extmod/ulab/code/ulab_create.c +msgid "number of points must be at least 2" +msgstr "" + +#: py/obj.c +msgid "object '%q' is not a tuple or list" +msgstr "オブジェクト '%q' がタプルでもリストでもありません" + +#: py/obj.c +msgid "object does not support item assignment" +msgstr "オブジェクトは要素の代入をサポートしていません" + +#: py/obj.c +msgid "object does not support item deletion" +msgstr "オブジェクトは要素の削除をサポートしていません" + +#: py/obj.c +msgid "object has no len" +msgstr "オブジェクトがlenを持っていません" + +#: py/obj.c +msgid "object is not subscriptable" +msgstr "オブジェクトは要素の取得をサポートしていません" + +#: py/runtime.c +msgid "object not an iterator" +msgstr "オブジェクトはイテレータではありません" + +#: py/objtype.c py/runtime.c +msgid "object not callable" +msgstr "オブジェクトは呼び出し可能ではありません" + +#: py/sequence.c shared-bindings/displayio/Group.c +msgid "object not in sequence" +msgstr "" + +#: py/runtime.c +msgid "object not iterable" +msgstr "" + +#: py/obj.c +msgid "object of type '%q' has no len()" +msgstr "" + +#: py/obj.c +msgid "object with buffer protocol required" +msgstr "" + +#: extmod/modubinascii.c +msgid "odd-length string" +msgstr "奇数長の文字列です" + +#: py/objstr.c py/objstrunicode.c +msgid "offset out of bounds" +msgstr "" + +#: ports/nrf/common-hal/audiobusio/PDMIn.c +msgid "only bit_depth=16 is supported" +msgstr "" + +#: ports/nrf/common-hal/audiobusio/PDMIn.c +msgid "only sample_rate=16000 is supported" +msgstr "" + +#: py/objarray.c py/objstr.c py/objstrunicode.c py/objtuple.c +#: shared-bindings/nvm/ByteArray.c +msgid "only slices with step=1 (aka None) are supported" +msgstr "" + +#: extmod/ulab/code/compare/compare.c extmod/ulab/code/ndarray.c +#: extmod/ulab/code/vector/vectorise.c +msgid "operands could not be broadcast together" +msgstr "" + +#: extmod/ulab/code/numerical/numerical.c +msgid "operation is not implemented on ndarrays" +msgstr "この演算はndarray上で実装されていません" + +#: extmod/ulab/code/ndarray.c +msgid "operation is not supported for given type" +msgstr "この演算は与えられた型をサポートしていません" + +#: py/modbuiltins.c +msgid "ord expects a character" +msgstr "ord() は1文字を受け取ります" + +#: py/modbuiltins.c +#, c-format +msgid "ord() expected a character, but string of length %d found" +msgstr "ord() は1文字を要求しますが、長さ %d の文字列が与えられました" + +#: py/objint_mpz.c +msgid "overflow converting long int to machine word" +msgstr "long int をマシンの word に変換する際にオーバーフローしました" + +#: shared-bindings/_stage/Layer.c shared-bindings/_stage/Text.c +msgid "palette must be 32 bytes long" +msgstr "パレットの長さは32バイトでなければなりません" + +#: shared-bindings/displayio/Palette.c +msgid "palette_index should be an int" +msgstr "palette_index は int でなければなりません" + +#: py/compile.c +msgid "parameter annotation must be an identifier" +msgstr "引数アノテーションは識別子でなければなりません" + +#: py/emitinlinextensa.c +msgid "parameters must be registers in sequence a2 to a5" +msgstr "" + +#: py/emitinlinethumb.c +msgid "parameters must be registers in sequence r0 to r3" +msgstr "" + +#: shared-bindings/displayio/Bitmap.c +msgid "pixel coordinates out of bounds" +msgstr "" + +#: shared-bindings/displayio/Bitmap.c +msgid "pixel value requires too many bits" +msgstr "" + +#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c +msgid "pixel_shader must be displayio.Palette or displayio.ColorConverter" +msgstr "" + +#: shared-module/vectorio/Polygon.c +msgid "polygon can only be registered in one parent" +msgstr "" + +#: ports/atmel-samd/common-hal/pulseio/PulseIn.c +#: ports/cxd56/common-hal/pulseio/PulseIn.c +#: ports/nrf/common-hal/pulseio/PulseIn.c +#: ports/stm/common-hal/pulseio/PulseIn.c py/objdict.c py/objlist.c py/objset.c +#: shared-bindings/ps2io/Ps2.c +msgid "pop from empty %q" +msgstr "" + +#: py/objint_mpz.c +msgid "pow() 3rd argument cannot be 0" +msgstr "pow() の3番目の引数は0にはできません" + +#: py/objint_mpz.c +msgid "pow() with 3 arguments requires integers" +msgstr "pow() の3番目の引数には整数が必要です" + +#: extmod/modutimeq.c +msgid "queue overflow" +msgstr "キューがオーバーフローしました" + +#: py/parse.c +msgid "raw f-strings are not implemented" +msgstr "" + +#: extmod/ulab/code/fft/fft.c +msgid "real and imaginary parts must be of equal length" +msgstr "実数部と虚数部は同じ長さでなければなりません" + +#: py/builtinimport.c +msgid "relative import" +msgstr "相対インポート" + +#: py/obj.c +#, c-format +msgid "requested length %d but object has length %d" +msgstr "長さ %d が要求されていますがオブジェクトの長さは %d です" + +#: py/compile.c +msgid "return annotation must be an identifier" +msgstr "戻り値のアノテーションは識別子でなければなりません" + +#: py/emitnative.c +msgid "return expected '%q' but got '%q'" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "rgb_pins[%d] duplicates another pin assignment" +msgstr "" + +#: shared-bindings/rgbmatrix/RGBMatrix.c +#, c-format +msgid "rgb_pins[%d] is not on the same port as clock" +msgstr "rgb_pins[%d] はクロックと同じポートではありません" + +#: extmod/ulab/code/ndarray.c +msgid "right hand side must be an ndarray, or a scalar" +msgstr "右辺は ndarray またはスカラ値でなければなりません" + +#: py/objstr.c +msgid "rsplit(None,n)" +msgstr "rsplit(None,n)" + +#: shared-bindings/audiocore/RawSample.c +msgid "" +"sample_source buffer must be a bytearray or array of type 'h', 'H', 'b' or " +"'B'" +msgstr "sample_source バッファは、bytearray または 'h', 'H', 'b', 'B'型のarrayでなければなりません" + +#: ports/atmel-samd/common-hal/audiobusio/PDMIn.c +msgid "sampling rate out of range" +msgstr "サンプリングレートが範囲外です" + +#: py/modmicropython.c +msgid "schedule stack full" +msgstr "スケジュールスタックが一杯です" + +#: lib/utils/pyexec.c py/builtinimport.c +msgid "script compilation not supported" +msgstr "スクリプトのコンパイルはサポートされていません" + +#: extmod/ulab/code/ndarray.c +msgid "shape must be a 2-tuple" +msgstr "shapeは 2値のタプルでなければなりません" + +#: py/objstr.c +msgid "sign not allowed in string format specifier" +msgstr "文字列フォーマット指定子で符号は使えません" + +#: py/objstr.c +msgid "sign not allowed with integer format specifier 'c'" +msgstr "整数フォーマット指定子 'c' と共に符号は使えません" + +#: py/objstr.c +msgid "single '}' encountered in format string" +msgstr "文字列フォーマット中に孤立した '}' があります" + +#: extmod/ulab/code/linalg/linalg.c +msgid "size is defined for ndarrays only" +msgstr "" + +#: shared-bindings/time/__init__.c +msgid "sleep length must be non-negative" +msgstr "sleepの長さは非負数でなければなりません" + +#: extmod/ulab/code/ndarray.c +msgid "slice step can't be zero" +msgstr "スライスのステップは0にできません" + +#: py/objslice.c py/sequence.c +msgid "slice step cannot be zero" +msgstr "" + +#: py/objint.c py/sequence.c +msgid "small int overflow" +msgstr "small int オーバーフロー" + +#: main.c +msgid "soft reboot\n" +msgstr "ソフトリブート\n" + +#: extmod/ulab/code/numerical/numerical.c +msgid "sort argument must be an ndarray" +msgstr "" + +#: extmod/ulab/code/filter/filter.c +msgid "sos array must be of shape (n_section, 6)" +msgstr "" + +#: extmod/ulab/code/filter/filter.c +msgid "sos[:, 3] should be all ones" +msgstr "" + +#: extmod/ulab/code/filter/filter.c +msgid "sosfilt requires iterable arguments" +msgstr "" + +#: py/objstr.c +msgid "start/end indices" +msgstr "" + +#: shared-bindings/displayio/Shape.c +msgid "start_x should be an int" +msgstr "" + +#: shared-bindings/random/__init__.c +msgid "step must be non-zero" +msgstr "" + +#: shared-bindings/busio/UART.c +msgid "stop must be 1 or 2" +msgstr "stop は1または2でなければなりません" + +#: shared-bindings/random/__init__.c +msgid "stop not reachable from start" +msgstr "" + +#: py/stream.c +msgid "stream operation not supported" +msgstr "ストリーム操作がサポートされていません" + +#: py/objstrunicode.c +msgid "string indices must be integers, not %q" +msgstr "" + +#: py/stream.c +msgid "string not supported; use bytes or bytearray" +msgstr "" + +#: extmod/moductypes.c +msgid "struct: cannot index" +msgstr "" + +#: extmod/moductypes.c +msgid "struct: no fields" +msgstr "" + +#: py/objarray.c py/objstr.c +msgid "substring not found" +msgstr "部分文字列が見つかりません" + +#: py/compile.c +msgid "super() can't find self" +msgstr "" + +#: extmod/modujson.c +msgid "syntax error in JSON" +msgstr "JSONに構文エラーがあります" + +#: extmod/moductypes.c +msgid "syntax error in uctypes descriptor" +msgstr "uctypedディスクリプタの構文エラー" + +#: shared-bindings/touchio/TouchIn.c +msgid "threshold must be in the range 0-65536" +msgstr "threshould は 0 から 65536 の範囲になければなりません" + +#: shared-bindings/time/__init__.c +msgid "time.struct_time() takes a 9-sequence" +msgstr "time.struct_time() は 要素9個のシーケンスを受け取ります" + +#: ports/nrf/common-hal/watchdog/WatchDogTimer.c +msgid "timeout duration exceeded the maximum supported value" +msgstr "" + +#: shared-bindings/busio/UART.c +msgid "timeout must be 0.0-100.0 seconds" +msgstr "" + +#: shared-bindings/_bleio/CharacteristicBuffer.c +msgid "timeout must be >= 0.0" +msgstr "timeout は 0.0 以上でなければなりません" + +#: shared-module/sdcardio/SDCard.c +msgid "timeout waiting for v1 card" +msgstr "v1カードの待機がタイムアウトしました" + +#: shared-module/sdcardio/SDCard.c +msgid "timeout waiting for v2 card" +msgstr "v2カードの待機がタイムアウトしました" + +#: shared-bindings/time/__init__.c +msgid "timestamp out of range for platform time_t" +msgstr "" + +#: shared-module/struct/__init__.c +msgid "too many arguments provided with the given format" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "too many indices" +msgstr "インデクスが多すぎです" + +#: py/runtime.c +#, c-format +msgid "too many values to unpack (expected %d)" +msgstr "" + +#: extmod/ulab/code/approx/approx.c +msgid "trapz is defined for 1D arrays of equal length" +msgstr "" + +#: extmod/ulab/code/linalg/linalg.c +msgid "tuple index out of range" +msgstr "" + +#: py/obj.c +msgid "tuple/list has wrong length" +msgstr "タプル/リストの長さが正しくありません" + +#: shared-bindings/_pixelbuf/PixelBuf.c +msgid "tuple/list required on RHS" +msgstr "" + +#: ports/atmel-samd/common-hal/busio/UART.c ports/nrf/common-hal/busio/UART.c +#: shared-bindings/busio/UART.c +msgid "tx and rx cannot both be None" +msgstr "tx と rx の両方を None にすることはできません" + +#: py/objtype.c +msgid "type '%q' is not an acceptable base type" +msgstr "型 '%q' はベース型として認められません" + +#: py/objtype.c +msgid "type is not an acceptable base type" +msgstr "" + +#: py/runtime.c +msgid "type object '%q' has no attribute '%q'" +msgstr "" + +#: py/objtype.c +msgid "type takes 1 or 3 arguments" +msgstr "typeは1つまたは3つの引数をとります" + +#: py/objint_longlong.c +msgid "ulonglong too large" +msgstr "" + +#: py/emitnative.c +msgid "unary op %q not implemented" +msgstr "単項演算子 %q は実装されていません" + +#: py/parse.c +msgid "unexpected indent" +msgstr "" + +#: py/bc.c +msgid "unexpected keyword argument" +msgstr "" + +#: py/bc.c py/objnamedtuple.c +msgid "unexpected keyword argument '%q'" +msgstr "キーワード引数 '%q' は使えません" + +#: py/lexer.c +msgid "unicode name escapes" +msgstr "" + +#: py/parse.c +msgid "unindent does not match any outer indentation level" +msgstr "インデントの解除が、外側のどのインデントレベルにも一致しません" + +#: py/objstr.c +#, c-format +msgid "unknown conversion specifier %c" +msgstr "" + +#: py/objstr.c +msgid "unknown format code '%c' for object of type '%q'" +msgstr "" + +#: py/compile.c +msgid "unknown type" +msgstr "不明な型" + +#: py/emitnative.c +msgid "unknown type '%q'" +msgstr "不明な型 '%q'" + +#: py/objstr.c +msgid "unmatched '{' in format" +msgstr "書式中にマッチしない '{' があります" + +#: py/objtype.c py/runtime.c +msgid "unreadable attribute" +msgstr "読み込み不可能な属性" + +#: shared-bindings/displayio/TileGrid.c shared-bindings/vectorio/VectorShape.c +#: shared-module/vectorio/Polygon.c +msgid "unsupported %q type" +msgstr "サポートされない型 %q" + +#: py/emitinlinethumb.c +#, c-format +msgid "unsupported Thumb instruction '%s' with %d arguments" +msgstr "" + +#: py/emitinlinextensa.c +#, c-format +msgid "unsupported Xtensa instruction '%s' with %d arguments" +msgstr "" + +#: py/objstr.c +#, c-format +msgid "unsupported format character '%c' (0x%x) at index %d" +msgstr "" + +#: py/runtime.c +msgid "unsupported type for %q: '%q'" +msgstr "%q がサポートしていない型: '%q'" + +#: py/runtime.c +msgid "unsupported type for operator" +msgstr "演算子がサポートしていない型" + +#: py/runtime.c +msgid "unsupported types for %q: '%q', '%q'" +msgstr "" + +#: py/objint.c +#, c-format +msgid "value must fit in %d byte(s)" +msgstr "値は %d バイトに収まらなければなりません" + +#: shared-bindings/displayio/Bitmap.c +msgid "value_count must be > 0" +msgstr "" + +#: extmod/ulab/code/linalg/linalg.c +msgid "vectors must have same lengths" +msgstr "" + +#: shared-bindings/watchdog/WatchDogTimer.c +msgid "watchdog timeout must be greater than 0" +msgstr "" + +#: shared-bindings/_bleio/Adapter.c +msgid "window must be <= interval" +msgstr "" + +#: extmod/ulab/code/linalg/linalg.c +msgid "wrong argument type" +msgstr "引数の型が正しくありません" + +#: extmod/ulab/code/ndarray.c +msgid "wrong index type" +msgstr "インデクスの型が正しくありません" + +#: extmod/ulab/code/vector/vectorise.c +msgid "wrong input type" +msgstr "" + +#: extmod/ulab/code/ulab_create.c py/objstr.c +msgid "wrong number of arguments" +msgstr "" + +#: py/runtime.c +msgid "wrong number of values to unpack" +msgstr "" + +#: extmod/ulab/code/ndarray.c +msgid "wrong operand type" +msgstr "" + +#: extmod/ulab/code/vector/vectorise.c +msgid "wrong output type" +msgstr "" + +#: shared-module/displayio/Shape.c +msgid "x value out of bounds" +msgstr "" + +#: shared-bindings/displayio/Shape.c +msgid "y should be an int" +msgstr "yは整数でなければなりません" + +#: shared-module/displayio/Shape.c +msgid "y value out of bounds" +msgstr "" + +#: py/objrange.c +msgid "zero step" +msgstr "" + +#: extmod/ulab/code/filter/filter.c +msgid "zi must be an ndarray" +msgstr "zi はndarrayでなければなりません" + +#: extmod/ulab/code/filter/filter.c +msgid "zi must be of float type" +msgstr "zi はfloat型でなければなりません" + +#: extmod/ulab/code/filter/filter.c +msgid "zi must be of shape (n_section, 2)" +msgstr "" diff --git a/locale/ko.po b/locale/ko.po index 0d5e53ba0e..51a5237861 100644 --- a/locale/ko.po +++ b/locale/ko.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-07-28 16:57-0500\n" "PO-Revision-Date: 2019-05-06 14:22-0700\n" "Last-Translator: \n" "Language-Team: LANGUAGE \n" @@ -863,10 +863,6 @@ msgstr "" msgid "I2C Init Error" msgstr "" -#: shared-bindings/audiobusio/I2SOut.c -msgid "I2SOut not available" -msgstr "" - #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" diff --git a/locale/nl.po b/locale/nl.po index 33cb3702de..6240fce1b5 100644 --- a/locale/nl.po +++ b/locale/nl.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" -"PO-Revision-Date: 2020-08-02 20:41+0000\n" +"POT-Creation-Date: 2020-07-28 16:57-0500\n" +"PO-Revision-Date: 2020-07-27 21:27+0000\n" "Last-Translator: _fonzlate \n" "Language-Team: none\n" "Language: nl\n" @@ -226,7 +226,7 @@ msgstr "'await' buiten de functie" #: py/compile.c msgid "'await', 'async for' or 'async with' outside async function" -msgstr "'await', 'async for' of 'async with' buiten async functie" +msgstr "" #: py/compile.c msgid "'break' outside loop" @@ -877,10 +877,6 @@ msgstr "I/O actie op gesloten bestand" msgid "I2C Init Error" msgstr "I2C Init Fout" -#: shared-bindings/audiobusio/I2SOut.c -msgid "I2SOut not available" -msgstr "I2SOut is niet beschikbaar" - #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" @@ -1861,7 +1857,7 @@ msgstr "argument heeft onjuist type" #: extmod/ulab/code/linalg/linalg.c msgid "argument must be ndarray" -msgstr "argument moet ndarray zijn" +msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c @@ -2568,7 +2564,7 @@ msgstr "integer vereist" #: extmod/ulab/code/approx/approx.c msgid "interp is defined for 1D arrays of equal length" -msgstr "interp is gedefinieerd voor eendimensionale arrays van gelijke lengte" +msgstr "interp is gedefinieerd for eendimensionale arrays van gelijke lengte" #: shared-bindings/_bleio/Adapter.c #, c-format @@ -3256,7 +3252,7 @@ msgstr "te veel waarden om uit te pakken (%d verwacht)" #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" -msgstr "trapz is gedefinieerd voor eendimensionale arrays van gelijke lengte" +msgstr "" #: extmod/ulab/code/linalg/linalg.c py/objstr.c msgid "tuple index out of range" @@ -3388,7 +3384,7 @@ msgstr "value_count moet groter dan 0 zijn" #: extmod/ulab/code/linalg/linalg.c msgid "vectors must have same lengths" -msgstr "vectoren moeten van gelijke lengte zijn" +msgstr "" #: shared-bindings/watchdog/WatchDogTimer.c msgid "watchdog timeout must be greater than 0" @@ -3454,15 +3450,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 "'%q' object is not bytes-like" +#~ msgstr "'%q' object is niet bytes-achtig" + #~ msgid "'async for' or 'async with' outside async function" #~ msgstr "'async for' of 'async with' buiten async functie" -#~ msgid "PulseIn not supported on this chip" -#~ msgstr "PusleIn niet ondersteund door deze chip" - #~ msgid "PulseOut not supported on this chip" #~ msgstr "PulseOut niet ondersteund door deze chip" +#~ msgid "PulseIn not supported on this chip" +#~ msgstr "PusleIn niet ondersteund door deze chip" + #~ msgid "I2C operation not supported" #~ msgstr "I2C actie niet ondersteund" diff --git a/locale/pl.po b/locale/pl.po index 09571db1eb..fdb3749187 100644 --- a/locale/pl.po +++ b/locale/pl.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-07-28 16:57-0500\n" "PO-Revision-Date: 2019-03-19 18:37-0700\n" "Last-Translator: Radomir Dopieralski \n" "Language-Team: pl\n" @@ -863,10 +863,6 @@ msgstr "Operacja I/O na zamkniętym pliku" msgid "I2C Init Error" msgstr "" -#: shared-bindings/audiobusio/I2SOut.c -msgid "I2SOut not available" -msgstr "" - #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" diff --git a/locale/pt_BR.po b/locale/pt_BR.po index 3cae15510e..3ecca12dff 100644 --- a/locale/pt_BR.po +++ b/locale/pt_BR.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" -"PO-Revision-Date: 2020-07-31 14:41+0000\n" +"POT-Creation-Date: 2020-07-28 16:57-0500\n" +"PO-Revision-Date: 2020-07-28 15:41+0000\n" "Last-Translator: Wellington Terumi Uemura \n" "Language-Team: \n" "Language: pt_BR\n" @@ -886,10 +886,6 @@ msgstr "Operação I/O no arquivo fechado" msgid "I2C Init Error" msgstr "Erro de inicialização do I2C" -#: shared-bindings/audiobusio/I2SOut.c -msgid "I2SOut not available" -msgstr "O I2SOut não está disponível" - #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" @@ -1876,7 +1872,7 @@ msgstr "argumento tem tipo errado" #: extmod/ulab/code/linalg/linalg.c msgid "argument must be ndarray" -msgstr "o argumento deve ser um ndarray" +msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c @@ -3074,7 +3070,7 @@ msgstr "a anotação do retorno deve ser um identificador" #: py/emitnative.c msgid "return expected '%q' but got '%q'" -msgstr "o retorno esperado era '%q', porém obteve '%q'" +msgstr "o retorno esperado era '%q', porém obteve '% q'" #: shared-bindings/rgbmatrix/RGBMatrix.c #, c-format @@ -3282,7 +3278,7 @@ msgstr "valores demais para descompactar (esperado %d)" #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" -msgstr "o trapz está definido para 1D arrays de igual tamanho" +msgstr "" #: extmod/ulab/code/linalg/linalg.c py/objstr.c msgid "tuple index out of range" @@ -3414,7 +3410,7 @@ msgstr "o value_count deve ser > 0" #: extmod/ulab/code/linalg/linalg.c msgid "vectors must have same lengths" -msgstr "os vetores devem ter os mesmos comprimentos" +msgstr "" #: shared-bindings/watchdog/WatchDogTimer.c msgid "watchdog timeout must be greater than 0" @@ -3486,12 +3482,12 @@ msgstr "zi deve estar na forma (n_section, 2)" #~ msgid "'async for' or 'async with' outside async function" #~ msgstr "'assíncrono para' ou 'assíncrono com' função assíncrona externa" -#~ msgid "PulseIn not supported on this chip" -#~ msgstr "O PulseIn não é compatível neste CI" - #~ msgid "PulseOut not supported on this chip" #~ msgstr "O PulseOut não é compatível neste CI" +#~ msgid "PulseIn not supported on this chip" +#~ msgstr "O PulseIn não é compatível neste CI" + #~ msgid "AP required" #~ msgstr "AP requerido" diff --git a/locale/sv.po b/locale/sv.po index 26c4263915..0210094a9b 100644 --- a/locale/sv.po +++ b/locale/sv.po @@ -5,8 +5,8 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" -"PO-Revision-Date: 2020-08-05 20:32+0000\n" +"POT-Creation-Date: 2020-07-28 16:57-0500\n" +"PO-Revision-Date: 2020-07-25 20:58+0000\n" "Last-Translator: Jonny Bergdahl \n" "Language-Team: LANGUAGE \n" "Language: sv\n" @@ -226,7 +226,7 @@ msgstr "'await' utanför funktion" #: py/compile.c msgid "'await', 'async for' or 'async with' outside async function" -msgstr "'await', 'async for' eller 'async with' utanför async-funktion" +msgstr "" #: py/compile.c msgid "'break' outside loop" @@ -875,10 +875,6 @@ msgstr "I/O-operation på stängd fil" msgid "I2C Init Error" msgstr "I2C init-fel" -#: shared-bindings/audiobusio/I2SOut.c -msgid "I2SOut not available" -msgstr "I2SOut är inte tillgängligt" - #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" @@ -1854,7 +1850,7 @@ msgstr "argumentet har fel typ" #: extmod/ulab/code/linalg/linalg.c msgid "argument must be ndarray" -msgstr "argumentet måste vara ndarray" +msgstr "" #: py/argcheck.c shared-bindings/_stage/__init__.c #: shared-bindings/digitalio/DigitalInOut.c shared-bindings/gamepad/GamePad.c @@ -2119,7 +2115,7 @@ msgstr "" #: py/objtype.c msgid "cannot create '%q' instances" -msgstr "kan inte skapa instanser av '%q'" +msgstr "kan inte skapa instanser av '% q'" #: py/objtype.c msgid "cannot create instance" @@ -3249,7 +3245,7 @@ msgstr "för många värden att packa upp (förväntat %d)" #: extmod/ulab/code/approx/approx.c msgid "trapz is defined for 1D arrays of equal length" -msgstr "interp är definierad för 1D-matriser med samma längd" +msgstr "" #: extmod/ulab/code/linalg/linalg.c py/objstr.c msgid "tuple index out of range" @@ -3381,7 +3377,7 @@ msgstr "value_count måste vara > 0" #: extmod/ulab/code/linalg/linalg.c msgid "vectors must have same lengths" -msgstr "vektorer måste ha samma längd" +msgstr "" #: shared-bindings/watchdog/WatchDogTimer.c msgid "watchdog timeout must be greater than 0" @@ -3447,13 +3443,16 @@ 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 "'%q' object is not bytes-like" +#~ msgstr "%q-objektet är inte byte-lik" + #~ msgid "'async for' or 'async with' outside async function" #~ msgstr "'async for' eller 'async with' utanför async-funktion" -#~ msgid "PulseIn not supported on this chip" +#~ msgid "PulseOut not supported on this chip" #~ msgstr "PulseIn stöds inte av detta chip" -#~ msgid "PulseOut not supported on this chip" +#~ msgid "PulseIn not supported on this chip" #~ msgstr "PulseIn stöds inte av detta chip" #~ msgid "I2C operation not supported" diff --git a/locale/zh_Latn_pinyin.po b/locale/zh_Latn_pinyin.po index 7558fbb674..32928976d0 100644 --- a/locale/zh_Latn_pinyin.po +++ b/locale/zh_Latn_pinyin.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: circuitpython-cn\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-07-30 07:23-0500\n" +"POT-Creation-Date: 2020-07-28 16:57-0500\n" "PO-Revision-Date: 2019-04-13 10:10-0700\n" "Last-Translator: hexthat\n" "Language-Team: Chinese Hanyu Pinyin\n" @@ -871,10 +871,6 @@ msgstr "Wénjiàn shàng de I/ O cāozuò" msgid "I2C Init Error" msgstr "I2C chūshǐhuà cuòwù" -#: shared-bindings/audiobusio/I2SOut.c -msgid "I2SOut not available" -msgstr "" - #: shared-bindings/aesio/aes.c #, c-format msgid "IV must be %d bytes long" diff --git a/main.c b/main.c index d206d4f160..fb73b09b1f 100755 --- a/main.c +++ b/main.c @@ -282,7 +282,7 @@ bool run_code_py(safe_mode_t safe_mode) { } } - // Wait for connection or character. + // Display a different completion message if the user has no USB attached (cannot save files) if (!serial_connected_at_start) { serial_write_compressed(translate("\nCode done running. Waiting for reload.\n")); } diff --git a/ports/atmel-samd/Makefile b/ports/atmel-samd/Makefile index 25ab2c4aa7..65542354e6 100644 --- a/ports/atmel-samd/Makefile +++ b/ports/atmel-samd/Makefile @@ -361,7 +361,7 @@ OBJ += $(addprefix $(BUILD)/, $(SRC_S:.s=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o)) SRC_QSTR += $(HEADER_BUILD)/sdiodata.h -$(HEADER_BUILD)/sdiodata.h: $(TOP)/tools/mksdiodata.py | $(HEADER_BUILD) +$(HEADER_BUILD)/sdiodata.h: tools/mksdiodata.py | $(HEADER_BUILD) $(Q)$(PYTHON3) $< > $@ SRC_QSTR += $(SRC_C) $(SRC_SUPERVISOR) $(SRC_COMMON_HAL_EXPANDED) $(SRC_SHARED_MODULE_EXPANDED) diff --git a/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk b/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk index 619b7d6944..5656d4cb86 100755 --- a/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitbrains_basic_m0/mpconfigboard.mk @@ -16,3 +16,20 @@ CIRCUITPY_COUNTIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_VECTORIO = 0 + +SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk index 863b97d315..3a43093a98 100644 --- a/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk +++ b/ports/atmel-samd/boards/circuitplayground_express_displayio/mpconfigboard.mk @@ -13,9 +13,11 @@ EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" # Turn off features and optimizations for Crickit build to make room for additional frozen libs. LONGINT_IMPL = NONE CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_COUNTIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_PIXELBUF = 0 +CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 0 # So not all of displayio, sorry! CIRCUITPY_VECTORIO = 0 @@ -29,3 +31,18 @@ FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_CircuitPlayground FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_Thermistor + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 15 +endif +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk index cec87f2bf9..dc02e1f60d 100644 --- a/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_express/mpconfigboard.mk @@ -13,8 +13,24 @@ LONGINT_IMPL = MPZ CIRCUITPY_BITBANGIO = 0 CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_COUNTIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_VECTORIO = 0 CFLAGS_INLINE_LIMIT = 60 SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk index 8bd4b818df..6f7f2d8b67 100644 --- a/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_m0_supersized/mpconfigboard.mk @@ -13,9 +13,25 @@ LONGINT_IMPL = MPZ CIRCUITPY_BITBANGIO = 0 CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_COUNTIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 # supersized, not ultra-supersized CIRCUITPY_VECTORIO = 0 CFLAGS_INLINE_LIMIT = 60 SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk index e9d94638af..754594f346 100755 --- a/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk +++ b/ports/atmel-samd/boards/feather_radiofruit_zigbee/mpconfigboard.mk @@ -15,6 +15,25 @@ LONGINT_IMPL = MPZ CIRCUITPY_AUDIOBUSIO = 0 # No DAC on SAMR21G CIRCUITPY_AUDIOIO = 0 +CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_COUNTIO = 0 +CIRCUITPY_RTC = 0 +CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_I2CPERIPHERAL = 0 -# Too much flash for Korean translations -CIRCUITPY_VECTORIO = 0 +SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk index 15c5ad817c..1931ceb9a8 100644 --- a/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/hallowing_m0_express/mpconfigboard.mk @@ -9,11 +9,12 @@ CHIP_FAMILY = samd21 SPI_FLASH_FILESYSTEM = 1 EXTERNAL_FLASH_DEVICE_COUNT = 2 EXTERNAL_FLASH_DEVICES = "W25Q64JV_IQ, GD25Q64C" -LONGINT_IMPL = MPZ +LONGINT_IMPL = NONE # To keep the build small CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_COUNTIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_GAMEPAD = 0 CIRCUITPY_I2CPERIPHERAL = 0 @@ -29,3 +30,18 @@ SUPEROPT_GC = 0 FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_LIS3DH FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_NeoPixel + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk index 09420ed3da..0c0d6053e4 100644 --- a/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/itsybitsy_m0_express/mpconfigboard.mk @@ -13,7 +13,10 @@ LONGINT_IMPL = MPZ CIRCUITPY_BITBANG_APA102 = 1 +CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_COUNTIO = 0 +CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_GAMEPAD = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_RTC = 0 @@ -22,3 +25,18 @@ CIRCUITPY_VECTORIO = 0 CFLAGS_INLINE_LIMIT = 60 SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk index e3948565d1..7dd9650003 100644 --- a/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/metro_m0_express/mpconfigboard.mk @@ -12,8 +12,24 @@ EXTERNAL_FLASH_DEVICES = "S25FL216K, GD25Q16C" LONGINT_IMPL = MPZ CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_COUNTIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_VECTORIO = 0 CFLAGS_INLINE_LIMIT = 60 SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/picoplanet/board.c b/ports/atmel-samd/boards/picoplanet/board.c new file mode 100644 index 0000000000..d7e856d611 --- /dev/null +++ b/ports/atmel-samd/boards/picoplanet/board.c @@ -0,0 +1,37 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2017 Scott Shawcroft for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#include "boards/board.h" + +void board_init(void) { +} + +bool board_requests_safe_mode(void) { + return false; +} + +void reset_board(void) { +} diff --git a/ports/atmel-samd/boards/picoplanet/mpconfigboard.h b/ports/atmel-samd/boards/picoplanet/mpconfigboard.h new file mode 100644 index 0000000000..61430e06c2 --- /dev/null +++ b/ports/atmel-samd/boards/picoplanet/mpconfigboard.h @@ -0,0 +1,42 @@ +#define MICROPY_HW_BOARD_NAME "PicoPlanet" +#define MICROPY_HW_MCU_NAME "samd21e18" + +#define MICROPY_PORT_A (PORT_PA00 | PORT_PA01) +#define MICROPY_PORT_B (0) +#define MICROPY_PORT_C (0) + +#define IGNORE_PIN_PA00 1 +#define IGNORE_PIN_PA01 1 +#define IGNORE_PIN_PA10 1 +#define IGNORE_PIN_PA11 1 +#define IGNORE_PIN_PA12 1 +#define IGNORE_PIN_PA13 1 +#define IGNORE_PIN_PA14 1 +#define IGNORE_PIN_PA15 1 +#define IGNORE_PIN_PA18 1 +#define IGNORE_PIN_PA19 1 +#define IGNORE_PIN_PA20 1 +#define IGNORE_PIN_PA21 1 +#define IGNORE_PIN_PA22 1 +#define IGNORE_PIN_PA23 1 +// USB is always used internally so skip the pin objects for it. +#define IGNORE_PIN_PA24 1 +#define IGNORE_PIN_PA25 1 +#define IGNORE_PIN_PA27 1 +#define IGNORE_PIN_PA28 1 +#define IGNORE_PIN_PA31 1 + +#define DEFAULT_I2C_BUS_SCL (&pin_PA09) +#define DEFAULT_I2C_BUS_SDA (&pin_PA08) + +#define DEFAULT_SPI_BUS_MISO (&pin_PA30) +#define DEFAULT_SPI_BUS_SCK (&pin_PA17) +#define DEFAULT_SPI_BUS_MOSI (&pin_PA16) + +//#define CP_RGB_STATUS_R (&pin_PA06) +//#define CP_RGB_STATUS_G (&pin_PA05) +//#define CP_RGB_STATUS_B (&pin_PA07) +//#define CP_RGB_STATUS_INVERTED_PWM +//#define CP_RGB_STATUS_LED + +#define MICROPY_HW_LED_STATUS (&pin_PA06) diff --git a/ports/atmel-samd/boards/picoplanet/mpconfigboard.mk b/ports/atmel-samd/boards/picoplanet/mpconfigboard.mk new file mode 100644 index 0000000000..da97b90cc2 --- /dev/null +++ b/ports/atmel-samd/boards/picoplanet/mpconfigboard.mk @@ -0,0 +1,24 @@ +USB_VID = 0x239A +USB_PID = 0x80C2 +USB_PRODUCT = "PicoPlanet" +USB_MANUFACTURER = "bleeptrack" + +CHIP_VARIANT = SAMD21E18A +CHIP_FAMILY = samd21 + +INTERNAL_FLASH_FILESYSTEM = 1 +LONGINT_IMPL = NONE +CIRCUITPY_FULL_BUILD = 0 + +SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/picoplanet/pins.c b/ports/atmel-samd/boards/picoplanet/pins.c new file mode 100644 index 0000000000..4c9b11e3d5 --- /dev/null +++ b/ports/atmel-samd/boards/picoplanet/pins.c @@ -0,0 +1,32 @@ +#include "shared-bindings/board/__init__.h" + +STATIC const mp_rom_map_elem_t board_global_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA02) }, + { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA03) }, + { MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PA04) }, + + { MP_ROM_QSTR(MP_QSTR_D5),MP_ROM_PTR(&pin_PA05) }, + { MP_ROM_QSTR(MP_QSTR_D6),MP_ROM_PTR(&pin_PA06) }, + { MP_ROM_QSTR(MP_QSTR_D7),MP_ROM_PTR(&pin_PA07) }, + + { MP_ROM_QSTR(MP_QSTR_D1), MP_ROM_PTR(&pin_PA08) }, + { MP_ROM_QSTR(MP_QSTR_A3), MP_ROM_PTR(&pin_PA08) }, + { MP_ROM_QSTR(MP_QSTR_SDA), MP_ROM_PTR(&pin_PA08) }, + + { MP_ROM_QSTR(MP_QSTR_D2), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_A4), MP_ROM_PTR(&pin_PA09) }, + { MP_ROM_QSTR(MP_QSTR_SCL), MP_ROM_PTR(&pin_PA09) }, + + { MP_ROM_QSTR(MP_QSTR_D3), MP_ROM_PTR(&pin_PA16) }, + { MP_ROM_QSTR(MP_QSTR_MOSI), MP_ROM_PTR(&pin_PA16) }, + + { MP_ROM_QSTR(MP_QSTR_D4), MP_ROM_PTR(&pin_PA17) }, + { MP_ROM_QSTR(MP_QSTR_SCK), MP_ROM_PTR(&pin_PA17) }, + + { MP_ROM_QSTR(MP_QSTR_D8), MP_ROM_PTR(&pin_PA30) }, + { MP_ROM_QSTR(MP_QSTR_MISO), MP_ROM_PTR(&pin_PA30) }, + + { 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_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/atmel-samd/boards/serpente/mpconfigboard.mk b/ports/atmel-samd/boards/serpente/mpconfigboard.mk index a5adb17a1e..6e953adf72 100644 --- a/ports/atmel-samd/boards/serpente/mpconfigboard.mk +++ b/ports/atmel-samd/boards/serpente/mpconfigboard.mk @@ -14,3 +14,20 @@ LONGINT_IMPL = NONE CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_GAMEPAD = 0 + +SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/snekboard/mpconfigboard.mk b/ports/atmel-samd/boards/snekboard/mpconfigboard.mk index eae50d70bf..e0262b6b22 100644 --- a/ports/atmel-samd/boards/snekboard/mpconfigboard.mk +++ b/ports/atmel-samd/boards/snekboard/mpconfigboard.mk @@ -17,4 +17,20 @@ CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_VECTORIO = 0 CFLAGS_INLINE_LIMIT = 60 + SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk b/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk index c17600fc75..5170f8a233 100755 --- a/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk +++ b/ports/atmel-samd/boards/sparkfun_redboard_turbo/mpconfigboard.mk @@ -12,8 +12,25 @@ EXTERNAL_FLASH_DEVICES = "W25Q32FV" LONGINT_IMPL = MPZ CIRCUITPY_BITBANGIO = 0 +CIRCUITPY_COUNTIO = 0 +CIRCUITPY_GAMEPAD = 0 CIRCUITPY_I2CPERIPHERAL = 0 CIRCUITPY_VECTORIO = 0 CFLAGS_INLINE_LIMIT = 60 SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk b/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk index 6f3febfe56..68031e4a18 100644 --- a/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk +++ b/ports/atmel-samd/boards/stringcar_m0_express/mpconfigboard.mk @@ -14,6 +14,7 @@ LONGINT_IMPL = MPZ CIRCUITPY_BITBANG_APA102 = 1 +CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_BITBANGIO = 0 CIRCUITPY_GAMEPAD = 0 CIRCUITPY_I2CPERIPHERAL = 0 @@ -22,3 +23,18 @@ CIRCUITPY_VECTORIO = 0 CFLAGS_INLINE_LIMIT = 60 SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk index 9e0621810c..402db7ebc0 100644 --- a/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk +++ b/ports/atmel-samd/boards/trinket_m0_haxpress/mpconfigboard.mk @@ -11,6 +11,7 @@ EXTERNAL_FLASH_DEVICE_COUNT = 1 EXTERNAL_FLASH_DEVICES = W25Q32BV LONGINT_IMPL = MPZ +CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_BITBANGIO = 0 CIRCUITPY_COUNTIO = 0 CIRCUITPY_RTC = 0 @@ -18,3 +19,18 @@ CIRCUITPY_FREQUENCYIO = 0 CIRCUITPY_I2CPERIPHERAL = 0 SUPEROPT_GC = 0 + +CFLAGS_BOARD = --param max-inline-insns-auto=15 +ifeq ($(TRANSLATION), zh_Latn_pinyin) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), ja) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +endif +ifeq ($(TRANSLATION), de_DE) +RELEASE_NEEDS_CLEAN_BUILD = 1 +CFLAGS_INLINE_LIMIT = 35 +SUPEROPT_VM = 0 +endif diff --git a/ports/atmel-samd/mpconfigport.mk b/ports/atmel-samd/mpconfigport.mk index e4cf9ca833..5788a160b1 100644 --- a/ports/atmel-samd/mpconfigport.mk +++ b/ports/atmel-samd/mpconfigport.mk @@ -39,6 +39,9 @@ endif CIRCUITPY_SDCARDIO ?= 0 +# Not enough RAM for framebuffers +CIRCUITPY_FRAMEBUFFERIO ?= 0 + # SAMD21 needs separate endpoint pairs for MSC BULK IN and BULK OUT, otherwise it's erratic. USB_MSC_EP_NUM_OUT = 1 diff --git a/tools/mksdiodata.py b/ports/atmel-samd/tools/mksdiodata.py similarity index 100% rename from tools/mksdiodata.py rename to ports/atmel-samd/tools/mksdiodata.py diff --git a/ports/esp32s2/Makefile b/ports/esp32s2/Makefile index 55db73604c..19b89a13a1 100644 --- a/ports/esp32s2/Makefile +++ b/ports/esp32s2/Makefile @@ -171,6 +171,7 @@ SRC_C += \ lib/utils/stdout_helpers.c \ lib/utils/sys_stdio_mphal.c \ peripherals/pins.c \ + peripherals/rmt.c \ supervisor/shared/memory.c ifneq ($(USB),FALSE) diff --git a/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h b/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h index 78652e215b..a94f10ea49 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h +++ b/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.h @@ -29,4 +29,6 @@ #define MICROPY_HW_BOARD_NAME "Saola 1 w/Wroom" #define MICROPY_HW_MCU_NAME "ESP32S2" +#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) + #define AUTORESET_DELAY_MS 500 diff --git a/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.mk b/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.mk index 6e76272659..9c9ca61694 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.mk +++ b/ports/esp32s2/boards/espressif_saola_1_wroom/mpconfigboard.mk @@ -10,8 +10,6 @@ LONGINT_IMPL = MPZ # so increase it to 32. CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 -CIRCUITPY_NEOPIXEL_WRITE = 0 - CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=40m CIRCUITPY_ESP_FLASH_SIZE=4MB diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h b/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h index 7d08ccf7f1..338186dc52 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h +++ b/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.h @@ -29,4 +29,6 @@ #define MICROPY_HW_BOARD_NAME "Saola 1 w/Wrover" #define MICROPY_HW_MCU_NAME "ESP32S2" +#define MICROPY_HW_NEOPIXEL (&pin_GPIO18) + #define AUTORESET_DELAY_MS 500 diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk b/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk index 1437df7f4b..d5ff1c5ac8 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk +++ b/ports/esp32s2/boards/espressif_saola_1_wrover/mpconfigboard.mk @@ -10,8 +10,6 @@ LONGINT_IMPL = MPZ # so increase it to 32. CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 -CIRCUITPY_NEOPIXEL_WRITE = 0 - CIRCUITPY_ESP_FLASH_MODE=dio CIRCUITPY_ESP_FLASH_FREQ=40m CIRCUITPY_ESP_FLASH_SIZE=4MB diff --git a/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c b/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c index 1d4e2c4eba..0562d9331f 100644 --- a/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c +++ b/ports/esp32s2/boards/espressif_saola_1_wrover/pins.c @@ -42,5 +42,7 @@ STATIC const mp_rom_map_elem_t board_global_dict_table[] = { { MP_ROM_QSTR(MP_QSTR_IO44), 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_NEOPIXEL), MP_ROM_PTR(&pin_GPIO18) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_global_dict_table); diff --git a/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.mk b/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.mk index ea3484d2fa..294736d17c 100644 --- a/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.mk +++ b/ports/esp32s2/boards/unexpectedmaker_feathers2/mpconfigboard.mk @@ -4,7 +4,6 @@ USB_PRODUCT = "FeatherS2" USB_MANUFACTURER = "UnexpectedMaker" USB_DEVICES = "CDC,MSC,HID" - INTERNAL_FLASH_FILESYSTEM = 1 LONGINT_IMPL = MPZ @@ -12,8 +11,6 @@ LONGINT_IMPL = MPZ # so increase it to 32. CFLAGS += -DCFG_TUD_TASK_QUEUE_SZ=32 -CIRCUITPY_NEOPIXEL_WRITE = 0 - CIRCUITPY_ESP_FLASH_MODE=qio CIRCUITPY_ESP_FLASH_FREQ=40m CIRCUITPY_ESP_FLASH_SIZE=16MB diff --git a/ports/esp32s2/common-hal/microcontroller/Pin.c b/ports/esp32s2/common-hal/microcontroller/Pin.c index 5a059f0bbc..03a83cfe67 100644 --- a/ports/esp32s2/common-hal/microcontroller/Pin.c +++ b/ports/esp32s2/common-hal/microcontroller/Pin.c @@ -26,12 +26,18 @@ */ #include "shared-bindings/microcontroller/Pin.h" +#include "shared-bindings/digitalio/DigitalInOut.h" +#include "supervisor/shared/rgb_led_status.h" #include "py/mphal.h" #include "esp-idf/components/driver/include/driver/gpio.h" #include "esp-idf/components/soc/include/hal/gpio_hal.h" +#ifdef MICROPY_HW_NEOPIXEL +bool neopixel_in_use; +#endif + STATIC uint32_t never_reset_pins[2]; STATIC uint32_t in_use[2]; @@ -50,6 +56,14 @@ void common_hal_never_reset_pin(const mcu_pin_obj_t* pin) { void reset_pin_number(gpio_num_t pin_number) { never_reset_pins[pin_number / 32] &= ~(1 << pin_number % 32); in_use[pin_number / 32] &= ~(1 << pin_number % 32); + + #ifdef MICROPY_HW_NEOPIXEL + if (pin_number == MICROPY_HW_NEOPIXEL->number) { + neopixel_in_use = false; + rgb_led_status_init(); + return; + } + #endif } void common_hal_reset_pin(const mcu_pin_obj_t* pin) { @@ -69,13 +83,32 @@ void reset_all_pins(void) { } in_use[0] = 0; in_use[1] = 0; + + #ifdef MICROPY_HW_NEOPIXEL + neopixel_in_use = false; + #endif } void claim_pin(const mcu_pin_obj_t* pin) { in_use[pin->number / 32] |= (1 << pin->number % 32); + #ifdef MICROPY_HW_NEOPIXEL + if (pin == MICROPY_HW_NEOPIXEL) { + neopixel_in_use = true; + } + #endif +} + +void common_hal_mcu_pin_claim(const mcu_pin_obj_t* pin) { + claim_pin(pin); } bool pin_number_is_free(gpio_num_t pin_number) { + #ifdef MICROPY_HW_NEOPIXEL + if (pin_number == MICROPY_HW_NEOPIXEL->number) { + return !neopixel_in_use; + } + #endif + uint8_t offset = pin_number / 32; uint8_t mask = 1 << pin_number % 32; return (never_reset_pins[offset] & mask) == 0 && (in_use[offset] & mask) == 0; diff --git a/ports/esp32s2/common-hal/microcontroller/Pin.h b/ports/esp32s2/common-hal/microcontroller/Pin.h index 19985bda6f..f6c0087031 100644 --- a/ports/esp32s2/common-hal/microcontroller/Pin.h +++ b/ports/esp32s2/common-hal/microcontroller/Pin.h @@ -34,6 +34,10 @@ extern bool apa102_mosi_in_use; extern bool apa102_sck_in_use; +#ifdef MICROPY_HW_NEOPIXEL +extern bool neopixel_in_use; +#endif + void reset_all_pins(void); // reset_pin_number takes the pin number instead of the pointer so that objects don't // need to store a full pointer. diff --git a/ports/esp32s2/common-hal/neopixel_write/__init__.c b/ports/esp32s2/common-hal/neopixel_write/__init__.c index a9b42fc96a..1fc976ec36 100644 --- a/ports/esp32s2/common-hal/neopixel_write/__init__.c +++ b/ports/esp32s2/common-hal/neopixel_write/__init__.c @@ -3,7 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2018 hathach for Adafruit Industries + * Copyright (c) 2020 Lucian Copeland 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 @@ -24,10 +24,102 @@ * THE SOFTWARE. */ +/* Uses code from Espressif RGB LED Strip demo and drivers + * Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + #include "py/mphal.h" +#include "py/runtime.h" #include "shared-bindings/neopixel_write/__init__.h" +#include "driver/rmt.h" +#include "rmt.h" + +#define WS2812_T0H_NS (350) +#define WS2812_T0L_NS (1000) +#define WS2812_T1H_NS (1000) +#define WS2812_T1L_NS (350) +#define WS2812_RESET_US (280) + +static uint32_t ws2812_t0h_ticks = 0; +static uint32_t ws2812_t1h_ticks = 0; +static uint32_t ws2812_t0l_ticks = 0; +static uint32_t ws2812_t1l_ticks = 0; + +static void IRAM_ATTR ws2812_rmt_adapter(const void *src, rmt_item32_t *dest, size_t src_size, + size_t wanted_num, size_t *translated_size, size_t *item_num) +{ + if (src == NULL || dest == NULL) { + *translated_size = 0; + *item_num = 0; + return; + } + const rmt_item32_t bit0 = {{{ ws2812_t0h_ticks, 1, ws2812_t0l_ticks, 0 }}}; //Logical 0 + const rmt_item32_t bit1 = {{{ ws2812_t1h_ticks, 1, ws2812_t1l_ticks, 0 }}}; //Logical 1 + size_t size = 0; + size_t num = 0; + uint8_t *psrc = (uint8_t *)src; + rmt_item32_t *pdest = dest; + while (size < src_size && num < wanted_num) { + for (int i = 0; i < 8; i++) { + // MSB first + if (*psrc & (1 << (7 - i))) { + pdest->val = bit1.val; + } else { + pdest->val = bit0.val; + } + num++; + pdest++; + } + size++; + psrc++; + } + *translated_size = size; + *item_num = num; +} void common_hal_neopixel_write (const digitalio_digitalinout_obj_t* digitalinout, uint8_t *pixels, uint32_t numBytes) { - (void)digitalinout; - (void)numBytes; + // Reserve channel + uint8_t number = digitalinout->pin->number; + rmt_channel_t channel = esp32s2_peripherals_find_and_reserve_rmt(); + + // Configure Channel + rmt_config_t config = RMT_DEFAULT_CONFIG_TX(number, channel); + config.clk_div = 2; // set counter clock to 40MHz + rmt_config(&config); + rmt_driver_install(config.channel, 0, 0); + + // Convert NS timings to ticks + uint32_t counter_clk_hz = 0; + if (rmt_get_counter_clock(config.channel, &counter_clk_hz) != ESP_OK) { + mp_raise_RuntimeError(translate("Could not retrieve clock")); + } + float ratio = (float)counter_clk_hz / 1e9; + ws2812_t0h_ticks = (uint32_t)(ratio * WS2812_T0H_NS); + ws2812_t0l_ticks = (uint32_t)(ratio * WS2812_T0L_NS); + ws2812_t1h_ticks = (uint32_t)(ratio * WS2812_T1H_NS); + ws2812_t1l_ticks = (uint32_t)(ratio * WS2812_T1L_NS); + + // Initialize automatic timing translator + rmt_translator_init(config.channel, ws2812_rmt_adapter); + + // Write and wait to finish + if(rmt_write_sample(config.channel, pixels, (size_t)numBytes, true) != ESP_OK) { + mp_raise_RuntimeError(translate("Input/output error")); + } + rmt_wait_tx_done(config.channel, pdMS_TO_TICKS(100)); + + // Free channel again + esp32s2_peripherals_free_rmt(config.channel); } diff --git a/ports/esp32s2/common-hal/pulseio/PWMOut.c b/ports/esp32s2/common-hal/pulseio/PWMOut.c index c4f5e18dd4..0ac42852ae 100644 --- a/ports/esp32s2/common-hal/pulseio/PWMOut.c +++ b/ports/esp32s2/common-hal/pulseio/PWMOut.c @@ -3,8 +3,7 @@ * * The MIT License (MIT) * - * Copyright (c) 2019 Lucian Copeland for Adafruit Industries - * Uses code from Micropython, Copyright (c) 2013-2016 Damien P. George + * Copyright (c) 2020 Lucian Copeland 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 @@ -33,6 +32,7 @@ #define INDEX_EMPTY 0xFF +STATIC bool not_first_reset = false; STATIC uint32_t reserved_timer_freq[LEDC_TIMER_MAX]; STATIC uint8_t reserved_channels[LEDC_CHANNEL_MAX]; STATIC bool never_reset_tim[LEDC_TIMER_MAX]; @@ -40,17 +40,22 @@ STATIC bool never_reset_chan[LEDC_CHANNEL_MAX]; void pwmout_reset(void) { for (size_t i = 0; i < LEDC_CHANNEL_MAX; i++ ) { - ledc_stop(LEDC_LOW_SPEED_MODE, i, 0); + if (reserved_channels[i] != INDEX_EMPTY && not_first_reset) { + ledc_stop(LEDC_LOW_SPEED_MODE, i, 0); + } if (!never_reset_chan[i]) { reserved_channels[i] = INDEX_EMPTY; } } for (size_t i = 0; i < LEDC_TIMER_MAX; i++ ) { - ledc_timer_rst(LEDC_LOW_SPEED_MODE, i); + if (reserved_timer_freq[i]) { + ledc_timer_rst(LEDC_LOW_SPEED_MODE, i); + } if (!never_reset_tim[i]) { reserved_timer_freq[i] = 0; } } + not_first_reset = true; } pwmout_result_t common_hal_pulseio_pwmout_construct(pulseio_pwmout_obj_t* self, @@ -158,7 +163,10 @@ void common_hal_pulseio_pwmout_deinit(pulseio_pwmout_obj_t* self) { if (common_hal_pulseio_pwmout_deinited(self)) { return; } - ledc_stop(LEDC_LOW_SPEED_MODE, self->chan_handle.channel, 0); + + if (reserved_channels[self->chan_handle.channel] != INDEX_EMPTY) { + ledc_stop(LEDC_LOW_SPEED_MODE, self->chan_handle.channel, 0); + } // Search if any other channel is using the timer bool taken = false; for (size_t i =0; i < LEDC_CHANNEL_MAX; i++) { @@ -168,7 +176,9 @@ void common_hal_pulseio_pwmout_deinit(pulseio_pwmout_obj_t* self) { } // Variable frequency means there's only one channel on the timer if (!taken || self->variable_frequency) { - ledc_timer_rst(LEDC_LOW_SPEED_MODE, self->tim_handle.timer_num); + if (reserved_timer_freq[self->tim_handle.timer_num] != 0) { + ledc_timer_rst(LEDC_LOW_SPEED_MODE, self->tim_handle.timer_num); + } reserved_timer_freq[self->tim_handle.timer_num] = 0; } reset_pin_number(self->pin_number); diff --git a/ports/esp32s2/mpconfigport.mk b/ports/esp32s2/mpconfigport.mk index c2d21e0841..a7873aa468 100644 --- a/ports/esp32s2/mpconfigport.mk +++ b/ports/esp32s2/mpconfigport.mk @@ -12,26 +12,21 @@ USB_SERIAL_NUMBER_LENGTH = 12 # Longints can be implemented as mpz, as longlong, or not LONGINT_IMPL = MPZ -CIRCUITPY_FULL_BUILD = 0 +# These modules are implemented in ports//common-hal: CIRCUITPY_ANALOGIO = 0 +CIRCUITPY_NVM = 0 CIRCUITPY_AUDIOBUSIO = 0 CIRCUITPY_AUDIOIO = 0 -CIRCUITPY_BITBANGIO = 1 -CIRCUITPY_BOARD = 1 -CIRCUITPY_DIGITALIO = 1 -CIRCUITPY_BUSIO = 1 -CIRCUITPY_DISPLAYIO = 1 -CIRCUITPY_FREQUENCYIO = 0 -CIRCUITPY_I2CPERIPHERAL = 0 -CIRCUITPY_MICROCONTROLLER = 1 -CIRCUITPY_NVM = 0 -CIRCUITPY_PULSEIO = 1 CIRCUITPY_ROTARYIO = 0 CIRCUITPY_RTC = 0 -CIRCUITPY_TOUCHIO = 0 +CIRCUITPY_FREQUENCYIO = 0 +CIRCUITPY_I2CPERIPHERAL = 0 +CIRCUITPY_COUNTIO = 0 -# Enable USB HID support -CIRCUITPY_USB_HID = 1 -CIRCUITPY_USB_MIDI = 0 +# These modules are implemented in shared-module/ - they can be included in +# any port once their prerequisites in common-hal are complete. +CIRCUITPY_RANDOM = 0 # Requires OS +CIRCUITPY_USB_MIDI = 0 # Requires USB +CIRCUITPY_ULAB = 0 # No requirements, but takes extra flash CIRCUITPY_MODULE ?= none diff --git a/ports/esp32s2/peripherals/rmt.c b/ports/esp32s2/peripherals/rmt.c new file mode 100644 index 0000000000..f17957c1c4 --- /dev/null +++ b/ports/esp32s2/peripherals/rmt.c @@ -0,0 +1,46 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Lucian Copeland 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 "rmt.h" +#include "py/runtime.h" + +bool rmt_reserved_channels[RMT_CHANNEL_MAX]; + +rmt_channel_t esp32s2_peripherals_find_and_reserve_rmt(void) { + for (size_t i = 0; i < RMT_CHANNEL_MAX; i++) { + if (!rmt_reserved_channels[i]) { + rmt_reserved_channels[i] = true; + return i; + } + } + mp_raise_RuntimeError(translate("All timers in use")); + return false; +} + +void esp32s2_peripherals_free_rmt(rmt_channel_t chan) { + rmt_reserved_channels[chan] = false; + rmt_driver_uninstall(chan); +} diff --git a/ports/esp32s2/peripherals/rmt.h b/ports/esp32s2/peripherals/rmt.h new file mode 100644 index 0000000000..4741a5bc59 --- /dev/null +++ b/ports/esp32s2/peripherals/rmt.h @@ -0,0 +1,37 @@ +/* + * This file is part of the Micro Python project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Lucian Copeland for Adafruit Industries + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to deal + * in the Software without restriction, including without limitation the rights + * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + * copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + * THE SOFTWARE. + */ + +#ifndef MICROPY_INCLUDED_ESP32S2_PERIPHERALS_RMT_H +#define MICROPY_INCLUDED_ESP32S2_PERIPHERALS_RMT_H + +#include "py/mphal.h" +#include "driver/rmt.h" +#include + +rmt_channel_t esp32s2_peripherals_find_and_reserve_rmt(void); +void esp32s2_peripherals_free_rmt(rmt_channel_t chan); + +#endif diff --git a/ports/esp32s2/supervisor/internal_flash.c b/ports/esp32s2/supervisor/internal_flash.c index 26774efac8..4b216a095a 100644 --- a/ports/esp32s2/supervisor/internal_flash.c +++ b/ports/esp32s2/supervisor/internal_flash.c @@ -43,6 +43,11 @@ STATIC const esp_partition_t * _partition; +// TODO: Split the caching out of supervisor/shared/external_flash so we can use it. +#define SECTOR_SIZE 4096 +STATIC uint8_t _cache[SECTOR_SIZE]; +STATIC uint32_t _cache_lba = 0xffffffff; + void supervisor_flash_init(void) { _partition = esp_partition_find_first(ESP_PARTITION_TYPE_DATA, ESP_PARTITION_SUBTYPE_DATA_FAT, @@ -61,11 +66,6 @@ void port_internal_flash_flush(void) { } -// TODO: Split the caching out of supervisor/shared/external_flash so we can use it. -#define SECTOR_SIZE 4096 -STATIC uint8_t _cache[SECTOR_SIZE]; -STATIC uint32_t _cache_lba; - mp_uint_t supervisor_flash_read_blocks(uint8_t *dest, uint32_t block, uint32_t num_blocks) { esp_partition_read(_partition, block * FILESYSTEM_BLOCK_SIZE, diff --git a/ports/nrf/Makefile b/ports/nrf/Makefile index 13a148df3b..3fef68e88e 100755 --- a/ports/nrf/Makefile +++ b/ports/nrf/Makefile @@ -73,11 +73,11 @@ INC += -I$(BUILD) INC += -I$(BUILD)/genhdr INC += -I./../../lib/cmsis/inc INC += -I./boards/$(BOARD) -INC += -I./nrfx -INC += -I./nrfx/hal -INC += -I./nrfx/mdk -INC += -I./nrfx/drivers/include -INC += -I./nrfx/drivers/src +INC += -isystem ./nrfx +INC += -isystem ./nrfx/hal +INC += -isystem ./nrfx/mdk +INC += -isystem ./nrfx/drivers/include +INC += -isystem ./nrfx/drivers/src INC += -I./bluetooth INC += -I./peripherals INC += -I../../lib/mp-readline @@ -100,8 +100,6 @@ CFLAGS += $(OPTIMIZATION_FLAGS) CFLAGS += $(INC) -Wall -Werror -std=gnu11 -nostdlib -fshort-enums $(BASE_CFLAGS) $(CFLAGS_MOD) $(COPT) # Undo some warnings. -# nrfx uses undefined preprocessor variables quite casually, so we can't do warning checks for these. -CFLAGS += -Wno-undef # nrfx does casts that increase alignment requirements. CFLAGS += -Wno-cast-align @@ -240,6 +238,11 @@ endif OBJ += $(addprefix $(BUILD)/, $(SRC_S:.s=.o)) OBJ += $(addprefix $(BUILD)/, $(SRC_MOD:.c=.o)) +# nrfx uses undefined preprocessor variables quite casually, so we can't do +# warning checks for these. Happily, we've confined the offenders to the NRFX +# source files themselves. +$(addprefix $(BUILD)/, $(SRC_NRFX:.c=.o)): CFLAGS += -Wno-undef + $(BUILD)/$(FATFS_DIR)/ff.o: COPT += -Os $(filter $(PY_BUILD)/../extmod/vfs_fat_%.o, $(PY_O)): COPT += -Os diff --git a/ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.h b/ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.h index 086718089a..4fb6049c5f 100644 --- a/ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.h +++ b/ports/nrf/boards/makerdiary_m60_keyboard/mpconfigboard.h @@ -30,9 +30,10 @@ #define MICROPY_HW_BOARD_NAME "Makerdiary M60 Keyboard" #define MICROPY_HW_MCU_NAME "nRF52840" -#define CP_RGB_STATUS_R (&pin_P0_30) -#define CP_RGB_STATUS_G (&pin_P0_29) -#define CP_RGB_STATUS_B (&pin_P0_31) +// RGB LEDs use PWM peripheral, avoid using them to save energy +// #define CP_RGB_STATUS_R (&pin_P0_30) +// #define CP_RGB_STATUS_G (&pin_P0_29) +// #define CP_RGB_STATUS_B (&pin_P0_31) #define MICROPY_QSPI_DATA0 NRF_GPIO_PIN_MAP(1, 10) #define MICROPY_QSPI_DATA1 NRF_GPIO_PIN_MAP(1, 14) diff --git a/ports/nrf/common-hal/busio/SPI.c b/ports/nrf/common-hal/busio/SPI.c index f27f0e267b..fdfe61811b 100644 --- a/ports/nrf/common-hal/busio/SPI.c +++ b/ports/nrf/common-hal/busio/SPI.c @@ -34,6 +34,22 @@ #include "nrfx_spim.h" #include "nrf_gpio.h" +#ifndef NRFX_SPIM3_ENABLED +#define NRFX_SPIM3_ENABLED (0) +#endif + +#ifndef NRFX_SPIM2_ENABLED +#define NRFX_SPIM2_ENABLED (0) +#endif + +#ifndef NRFX_SPIM1_ENABLED +#define NRFX_SPIM1_ENABLED (0) +#endif + +#ifndef NRFX_SPIM0_ENABLED +#define NRFX_SPIM0_ENABLED (0) +#endif + // These are in order from highest available frequency to lowest (32MHz first, then 8MHz). STATIC spim_peripheral_t spim_peripherals[] = { #if NRFX_CHECK(NRFX_SPIM3_ENABLED) diff --git a/ports/nrf/common-hal/microcontroller/Pin.c b/ports/nrf/common-hal/microcontroller/Pin.c index 3132c76318..d294c1dd5d 100644 --- a/ports/nrf/common-hal/microcontroller/Pin.c +++ b/ports/nrf/common-hal/microcontroller/Pin.c @@ -93,6 +93,7 @@ void reset_pin_number(uint8_t pin_number) { // Clear claimed bit. claimed_pins[nrf_pin_port(pin_number)] &= ~(1 << nrf_relative_pin_number(pin_number)); + never_reset_pins[nrf_pin_port(pin_number)] &= ~(1 << nrf_relative_pin_number(pin_number)); #ifdef MICROPY_HW_NEOPIXEL if (pin_number == MICROPY_HW_NEOPIXEL->number) { diff --git a/ports/nrf/supervisor/port.c b/ports/nrf/supervisor/port.c index e681e6825f..87a4d7396f 100644 --- a/ports/nrf/supervisor/port.c +++ b/ports/nrf/supervisor/port.c @@ -65,6 +65,10 @@ #include "common-hal/audiopwmio/PWMAudioOut.h" #endif +#if defined(MICROPY_QSPI_CS) +extern void qspi_disable(void); +#endif + static void power_warning_handler(void) { reset_into_safe_mode(BROWNOUT); } @@ -295,6 +299,10 @@ void port_interrupt_after_ticks(uint32_t ticks) { } void port_sleep_until_interrupt(void) { +#if defined(MICROPY_QSPI_CS) + qspi_disable(); +#endif + // Clear the FPU interrupt because it can prevent us from sleeping. if (NVIC_GetPendingIRQ(FPU_IRQn)) { __set_FPSCR(__get_FPSCR() & ~(0x9f)); diff --git a/ports/nrf/supervisor/qspi_flash.c b/ports/nrf/supervisor/qspi_flash.c index 90260b0912..7ca27d56c4 100644 --- a/ports/nrf/supervisor/qspi_flash.c +++ b/ports/nrf/supervisor/qspi_flash.c @@ -38,7 +38,44 @@ #include "supervisor/shared/external_flash/common_commands.h" #include "supervisor/shared/external_flash/qspi_flash.h" +// When USB is disconnected, disable QSPI in sleep mode to save energy +void qspi_disable(void) +{ + // If VBUS is detected, no need to disable QSPI + if (NRF_QSPI->ENABLE && !(NRF_POWER->USBREGSTATUS & POWER_USBREGSTATUS_VBUSDETECT_Msk)) { + // Keep CS high when QSPI is diabled + nrf_gpio_cfg_output(MICROPY_QSPI_CS); + nrf_gpio_pin_write(MICROPY_QSPI_CS, 1); + + // Workaround to disable QSPI according to nRF52840 Revision 1 Errata V1.4 - 3.8 + NRF_QSPI->TASKS_DEACTIVATE = 1; + *(volatile uint32_t *)0x40029054 = 1; + NRF_QSPI->ENABLE = 0; + } +} + +void qspi_enable(void) +{ + if (NRF_QSPI->ENABLE) { + return; + } + + nrf_qspi_enable(NRF_QSPI); + + nrf_qspi_event_clear(NRF_QSPI, NRF_QSPI_EVENT_READY); + nrf_qspi_task_trigger(NRF_QSPI, NRF_QSPI_TASK_ACTIVATE); + + uint32_t remaining_attempts = 100; + do { + if (nrf_qspi_event_check(NRF_QSPI, NRF_QSPI_EVENT_READY)) { + break; + } + NRFX_DELAY_US(10); + } while (--remaining_attempts); +} + bool spi_flash_command(uint8_t command) { + qspi_enable(); nrf_qspi_cinstr_conf_t cinstr_cfg = { .opcode = command, .length = 1, @@ -51,6 +88,7 @@ bool spi_flash_command(uint8_t command) { } bool spi_flash_read_command(uint8_t command, uint8_t* response, uint32_t length) { + qspi_enable(); nrf_qspi_cinstr_conf_t cinstr_cfg = { .opcode = command, .length = length + 1, @@ -64,6 +102,7 @@ bool spi_flash_read_command(uint8_t command, uint8_t* response, uint32_t length) } bool spi_flash_write_command(uint8_t command, uint8_t* data, uint32_t length) { + qspi_enable(); nrf_qspi_cinstr_conf_t cinstr_cfg = { .opcode = command, .length = length + 1, @@ -76,6 +115,7 @@ bool spi_flash_write_command(uint8_t command, uint8_t* data, uint32_t length) { } bool spi_flash_sector_command(uint8_t command, uint32_t address) { + qspi_enable(); if (command != CMD_SECTOR_ERASE) { return false; } @@ -83,6 +123,7 @@ bool spi_flash_sector_command(uint8_t command, uint32_t address) { } bool spi_flash_write_data(uint32_t address, uint8_t* data, uint32_t length) { + qspi_enable(); // TODO: In theory, this also needs to handle unaligned data and // non-multiple-of-4 length. (in practice, I don't think the fat layer // generates such writes) @@ -90,6 +131,7 @@ bool spi_flash_write_data(uint32_t address, uint8_t* data, uint32_t length) { } bool spi_flash_read_data(uint32_t address, uint8_t* data, uint32_t length) { + qspi_enable(); int misaligned = ((intptr_t)data) & 3; // If the data is misaligned, we need to read 4 bytes // into an aligned buffer, and then copy 1, 2, or 3 bytes from the aligned @@ -159,7 +201,7 @@ void spi_flash_init(void) { .irq_priority = 7, }; -#if EXTERNAL_FLASH_QSPI_DUAL +#if defined(EXTERNAL_FLASH_QSPI_DUAL) qspi_cfg.pins.io1_pin = MICROPY_QSPI_DATA1; qspi_cfg.prot_if.readoc = NRF_QSPI_READOC_READ2O; qspi_cfg.prot_if.writeoc = NRF_QSPI_WRITEOC_PP2O; diff --git a/ports/stm/boards/feather_stm32f405_express/pins.c b/ports/stm/boards/feather_stm32f405_express/pins.c index ebc8fa337e..571076c339 100644 --- a/ports/stm/boards/feather_stm32f405_express/pins.c +++ b/ports/stm/boards/feather_stm32f405_express/pins.c @@ -1,5 +1,17 @@ +#include "py/objtuple.h" #include "shared-bindings/board/__init__.h" +STATIC const mp_rom_obj_tuple_t sdio_data_tuple = { + {&mp_type_tuple}, + 4, + { + MP_ROM_PTR(&pin_PC08), + MP_ROM_PTR(&pin_PC09), + MP_ROM_PTR(&pin_PC10), + MP_ROM_PTR(&pin_PC11), + } +}; + STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA04) }, { MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) }, @@ -31,5 +43,9 @@ STATIC const mp_rom_map_elem_t board_module_globals_table[] = { { 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_SDIO_CLOCK), MP_ROM_PTR(&pin_PC12) }, + { MP_ROM_QSTR(MP_QSTR_SDIO_COMMAND), MP_ROM_PTR(&pin_PD02) }, + { MP_ROM_QSTR(MP_QSTR_SDIO_DATA), MP_ROM_PTR(&sdio_data_tuple) }, }; MP_DEFINE_CONST_DICT(board_module_globals, board_module_globals_table); diff --git a/ports/stm/boards/meowbit_v121/mpconfigboard.mk b/ports/stm/boards/meowbit_v121/mpconfigboard.mk index 127cdb60e2..852836ef8f 100644 --- a/ports/stm/boards/meowbit_v121/mpconfigboard.mk +++ b/ports/stm/boards/meowbit_v121/mpconfigboard.mk @@ -14,6 +14,8 @@ MCU_SERIES = F4 MCU_VARIANT = STM32F401xE MCU_PACKAGE = LQFP64 +OPTIMIZATION_FLAGS = -Os + LD_COMMON = boards/common_default.ld LD_FILE = boards/STM32F401xe_boot.ld # LD_FILE = boards/STM32F401xe_fs.ld # use for internal flash diff --git a/ports/stm/common-hal/busio/I2C.c b/ports/stm/common-hal/busio/I2C.c index b05d28c852..de69da211a 100644 --- a/ports/stm/common-hal/busio/I2C.c +++ b/ports/stm/common-hal/busio/I2C.c @@ -112,7 +112,7 @@ void common_hal_busio_i2c_construct(busio_i2c_obj_t *self, if (i2c_taken) { mp_raise_ValueError(translate("Hardware busy, try alternative pins")); } else { - mp_raise_ValueError(translate("Invalid I2C pin selection")); + mp_raise_ValueError_varg(translate("Invalid %q pin selection"), MP_QSTR_I2C); } } diff --git a/ports/stm/common-hal/busio/SPI.c b/ports/stm/common-hal/busio/SPI.c index 15c746b62a..0354d64ad3 100644 --- a/ports/stm/common-hal/busio/SPI.c +++ b/ports/stm/common-hal/busio/SPI.c @@ -169,7 +169,7 @@ STATIC int check_pins(busio_spi_obj_t *self, if (spi_taken) { mp_raise_ValueError(translate("Hardware busy, try alternative pins")); } else { - mp_raise_ValueError(translate("Invalid SPI pin selection")); + mp_raise_ValueError_varg(translate("Invalid %q pin selection"), MP_QSTR_SPI); } } diff --git a/ports/stm/common-hal/busio/UART.c b/ports/stm/common-hal/busio/UART.c index 08dae7e425..0cd9061819 100644 --- a/ports/stm/common-hal/busio/UART.c +++ b/ports/stm/common-hal/busio/UART.c @@ -58,7 +58,7 @@ STATIC USART_TypeDef * assign_uart_or_throw(busio_uart_obj_t* self, bool pin_eva if (uart_taken) { mp_raise_ValueError(translate("Hardware in use, try alternative pins")); } else { - mp_raise_ValueError(translate("Invalid UART pin selection")); + mp_raise_ValueError_varg(translate("Invalid %q pin selection"), MP_QSTR_UART); } } } diff --git a/ports/stm/common-hal/sdioio/SDCard.c b/ports/stm/common-hal/sdioio/SDCard.c new file mode 100644 index 0000000000..5f6010f01a --- /dev/null +++ b/ports/stm/common-hal/sdioio/SDCard.c @@ -0,0 +1,327 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler 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 + +#include "shared-bindings/sdioio/SDCard.h" +#include "py/mperrno.h" +#include "py/runtime.h" + +#include "shared-bindings/microcontroller/__init__.h" +#include "shared-bindings/util.h" +#include "boards/board.h" +#include "supervisor/shared/translate.h" +#include "common-hal/microcontroller/Pin.h" +#include "shared-bindings/microcontroller/Pin.h" + +STATIC bool reserved_sdio[MP_ARRAY_SIZE(mcu_sdio_banks)]; +STATIC bool never_reset_sdio[MP_ARRAY_SIZE(mcu_sdio_banks)]; + +STATIC const mcu_periph_obj_t *find_pin_function(const mcu_periph_obj_t *table, size_t sz, const mcu_pin_obj_t *pin, int periph_index) { + for(size_t i = 0; iperiph_index && pin == table->pin ) { + return table; + } + } + return NULL; +} + +//match pins to SDIO objects +STATIC int check_pins(sdioio_sdcard_obj_t *self, + const mcu_pin_obj_t * clock, const mcu_pin_obj_t * command, + uint8_t num_data, mcu_pin_obj_t ** data) { + bool sdio_taken = false; + + const uint8_t sdio_clock_len = MP_ARRAY_SIZE(mcu_sdio_clock_list); + const uint8_t sdio_command_len = MP_ARRAY_SIZE(mcu_sdio_command_list); + const uint8_t sdio_data0_len = MP_ARRAY_SIZE(mcu_sdio_data0_list); + const uint8_t sdio_data1_len = MP_ARRAY_SIZE(mcu_sdio_data1_list); + const uint8_t sdio_data2_len = MP_ARRAY_SIZE(mcu_sdio_data2_list); + const uint8_t sdio_data3_len = MP_ARRAY_SIZE(mcu_sdio_data3_list); + + + // Loop over each possibility for clock. Check whether all other pins can + // be used on the same peripheral + for (uint i = 0; i < sdio_clock_len; i++) { + const mcu_periph_obj_t *mcu_sdio_clock = &mcu_sdio_clock_list[i]; + if (mcu_sdio_clock->pin != clock) { + continue; + } + + int periph_index = mcu_sdio_clock->periph_index; + + const mcu_periph_obj_t *mcu_sdio_command = NULL; + if (!(mcu_sdio_command = find_pin_function(mcu_sdio_command_list, sdio_command_len, command, periph_index))) { + continue; + } + + const mcu_periph_obj_t *mcu_sdio_data0 = NULL; + if(!(mcu_sdio_data0 = find_pin_function(mcu_sdio_data0_list, sdio_data0_len, data[0], periph_index))) { + continue; + } + + const mcu_periph_obj_t *mcu_sdio_data1 = NULL; + if(num_data > 1 && !(mcu_sdio_data1 = find_pin_function(mcu_sdio_data1_list, sdio_data1_len, data[1], periph_index))) { + continue; + } + + const mcu_periph_obj_t *mcu_sdio_data2 = NULL; + if(num_data > 2 && !(mcu_sdio_data2 = find_pin_function(mcu_sdio_data2_list, sdio_data2_len, data[2], periph_index))) { + continue; + } + + const mcu_periph_obj_t *mcu_sdio_data3 = NULL; + if(num_data > 3 && !(mcu_sdio_data3 = find_pin_function(mcu_sdio_data3_list, sdio_data3_len, data[3], periph_index))) { + continue; + } + + if (reserved_sdio[periph_index-1]) { + sdio_taken = true; + continue; + } + + self->clock = mcu_sdio_clock; + self->command = mcu_sdio_command; + self->data[0] = mcu_sdio_data0; + self->data[1] = mcu_sdio_data1; + self->data[2] = mcu_sdio_data2; + self->data[3] = mcu_sdio_data3; + + return periph_index; + } + + if (sdio_taken) { + mp_raise_ValueError(translate("Hardware busy, try alternative pins")); + } else { + mp_raise_ValueError_varg(translate("Invalid %q pin selection"), MP_QSTR_SDIO); + } +} + + +void common_hal_sdioio_sdcard_construct(sdioio_sdcard_obj_t *self, + const mcu_pin_obj_t * clock, const mcu_pin_obj_t * command, + uint8_t num_data, mcu_pin_obj_t ** data, uint32_t frequency) { + + int periph_index = check_pins(self, clock, command, num_data, data); + SDIO_TypeDef * SDIOx = mcu_sdio_banks[periph_index - 1]; + + GPIO_InitTypeDef GPIO_InitStruct = {0}; + + /* Configure data pins */ + for (int i=0; inumber); + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_PULLUP; + GPIO_InitStruct.Alternate = self->data[i]->altfn_index; + HAL_GPIO_Init(pin_port(data[i]->port), &GPIO_InitStruct); + } + + /* Configure command pin */ + GPIO_InitStruct.Alternate = self->command->altfn_index; + GPIO_InitStruct.Pin = pin_mask(command->number); + HAL_GPIO_Init(pin_port(command->port), &GPIO_InitStruct); + + /* Configure clock */ + GPIO_InitStruct.Alternate = self->clock->altfn_index; + GPIO_InitStruct.Pin = pin_mask(clock->number); + HAL_GPIO_Init(pin_port(clock->port), &GPIO_InitStruct); + + __HAL_RCC_SDIO_CLK_ENABLE(); + + self->handle.Init.ClockDiv = SDIO_TRANSFER_CLK_DIV; + self->handle.Init.ClockEdge = SDIO_CLOCK_EDGE_RISING; + self->handle.Init.ClockBypass = SDIO_CLOCK_BYPASS_DISABLE; + self->handle.Init.ClockPowerSave = SDIO_CLOCK_POWER_SAVE_DISABLE; + self->handle.Init.BusWide = SDIO_BUS_WIDE_1B; + self->handle.Init.HardwareFlowControl = SDIO_HARDWARE_FLOW_CONTROL_DISABLE; + self->handle.Instance = SDIOx; + + HAL_StatusTypeDef r = HAL_SD_Init(&self->handle); + if (r != HAL_OK) { + mp_raise_ValueError_varg(translate("SDIO Init Error %d"), (int)r); + } + + HAL_SD_CardInfoTypeDef info; + r = HAL_SD_GetCardInfo(&self->handle, &info); + if (r != HAL_OK) { + mp_raise_ValueError_varg(translate("SDIO GetCardInfo Error %d"), (int)r); + } + + self->num_data = 1; + if (num_data == 4) { + if ((r = HAL_SD_ConfigWideBusOperation(&self->handle, SDIO_BUS_WIDE_4B)) == HAL_SD_ERROR_NONE) { + self->handle.Init.BusWide = SDIO_BUS_WIDE_4B; + self->num_data = 4; + } else { + } + } + + self->capacity = info.BlockNbr * (info.BlockSize / 512); + self->frequency = 25000000; + + reserved_sdio[periph_index - 1] = true; + + common_hal_mcu_pin_claim(clock); + common_hal_mcu_pin_claim(command); + for (int i=0; icapacity; +} + +uint32_t common_hal_sdioio_sdcard_get_frequency(sdioio_sdcard_obj_t *self) { + return self->frequency; +} + +uint8_t common_hal_sdioio_sdcard_get_width(sdioio_sdcard_obj_t *self) { + return self->num_data; +} + +STATIC void check_whole_block(mp_buffer_info_t *bufinfo) { + if (bufinfo->len % 512) { + mp_raise_ValueError(translate("Buffer must be a multiple of 512 bytes")); + } +} + +STATIC void wait_write_complete(sdioio_sdcard_obj_t *self) { + if (self->state_programming) { + HAL_SD_CardStateTypedef st = HAL_SD_CARD_PROGRAMMING; + // This waits up to 60s for programming to complete. This seems like + // an extremely long time, but this is the timeout that micropython's + // implementation uses + for (int i=0; i < 60000 && st == HAL_SD_CARD_PROGRAMMING; i++) { + st = HAL_SD_GetCardState(&self->handle); + HAL_Delay(1); + }; + self->state_programming = false; + } +} + +STATIC void check_for_deinit(sdioio_sdcard_obj_t *self) { + if (common_hal_sdioio_sdcard_deinited(self)) { + raise_deinited_error(); + } +} + +int common_hal_sdioio_sdcard_writeblocks(sdioio_sdcard_obj_t *self, uint32_t start_block, mp_buffer_info_t *bufinfo) { + check_for_deinit(self); + check_whole_block(bufinfo); + wait_write_complete(self); + self->state_programming = true; + common_hal_mcu_disable_interrupts(); + HAL_StatusTypeDef r = HAL_SD_WriteBlocks(&self->handle, bufinfo->buf, start_block, bufinfo->len / 512, 1000); + common_hal_mcu_enable_interrupts(); + if (r != HAL_OK) { + return -EIO; + } + return 0; +} + +int common_hal_sdioio_sdcard_readblocks(sdioio_sdcard_obj_t *self, uint32_t start_block, mp_buffer_info_t *bufinfo) { + check_for_deinit(self); + check_whole_block(bufinfo); + wait_write_complete(self); + common_hal_mcu_disable_interrupts(); + HAL_StatusTypeDef r = HAL_SD_ReadBlocks(&self->handle, bufinfo->buf, start_block, bufinfo->len / 512, 1000); + common_hal_mcu_enable_interrupts(); + if (r != HAL_OK) { + return -EIO; + } + return 0; +} + +bool common_hal_sdioio_sdcard_configure(sdioio_sdcard_obj_t *self, uint32_t frequency, uint8_t bits) { + check_for_deinit(self); + return true; +} + +bool common_hal_sdioio_sdcard_deinited(sdioio_sdcard_obj_t *self) { + return self->command == NULL; +} + +STATIC void never_reset_mcu_periph(const mcu_periph_obj_t *periph) { + if (periph) { + never_reset_pin_number(periph->pin->port,periph->pin->number); + } +} + +STATIC void reset_mcu_periph(const mcu_periph_obj_t *periph) { + if (periph) { + reset_pin_number(periph->pin->port,periph->pin->number); + } +} + +void common_hal_sdioio_sdcard_deinit(sdioio_sdcard_obj_t *self) { + if (common_hal_sdioio_sdcard_deinited(self)) { + return; + } + + reserved_sdio[self->command->periph_index - 1] = false; + never_reset_sdio[self->command->periph_index - 1] = false; + + reset_mcu_periph(self->command); + self->command = NULL; + + reset_mcu_periph(self->clock); + self->command = NULL; + + for (size_t i=0; idata); i++) { + reset_mcu_periph(self->data[i]); + self->data[i] = NULL; + } +} + +void common_hal_sdioio_sdcard_never_reset(sdioio_sdcard_obj_t *self) { + if (common_hal_sdioio_sdcard_deinited(self)) { + return; + } + + if (never_reset_sdio[self->command->periph_index] - 1) { + return; + } + + never_reset_sdio[self->command->periph_index - 1] = true; + + never_reset_mcu_periph(self->command); + never_reset_mcu_periph(self->clock); + + for (size_t i=0; idata); i++) { + never_reset_mcu_periph(self->data[i]); + } +} + +void sdioio_reset() { + for (size_t i=0; itotal_prev_len) { pool = pool->prev; } + assert(q - pool->total_prev_len < pool->len); return pool->qstrs[q - pool->total_prev_len]; } diff --git a/shared-bindings/rgbmatrix/RGBMatrix.c b/shared-bindings/rgbmatrix/RGBMatrix.c index d6b79f5ebb..9cfc0d4095 100644 --- a/shared-bindings/rgbmatrix/RGBMatrix.c +++ b/shared-bindings/rgbmatrix/RGBMatrix.c @@ -352,7 +352,8 @@ STATIC void rgbmatrix_rgbmatrix_get_bufinfo(mp_obj_t self_in, mp_buffer_info_t * // These version exists so that the prototype matches the protocol, // avoiding a type cast that can hide errors -STATIC void rgbmatrix_rgbmatrix_swapbuffers(mp_obj_t self_in) { +STATIC void rgbmatrix_rgbmatrix_swapbuffers(mp_obj_t self_in, uint8_t *dirty_row_bitmap) { + (void)dirty_row_bitmap; common_hal_rgbmatrix_rgbmatrix_refresh(self_in); } diff --git a/shared-bindings/sharpdisplay/SharpMemoryFramebuffer.c b/shared-bindings/sharpdisplay/SharpMemoryFramebuffer.c new file mode 100644 index 0000000000..e8f4e970a2 --- /dev/null +++ b/shared-bindings/sharpdisplay/SharpMemoryFramebuffer.c @@ -0,0 +1,92 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler 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 "py/objarray.h" +#include "py/runtime.h" + +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h" +#include "shared-module/displayio/__init__.h" +#include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" + +STATIC mp_obj_t sharpdisplay_framebuffer_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args) { + enum { ARG_spi_bus, ARG_chip_select, ARG_width, ARG_height, ARG_baudrate, NUM_ARGS }; + static const mp_arg_t allowed_args[] = { + { MP_QSTR_spi_bus, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_obj = MP_OBJ_NULL} }, + { MP_QSTR_chip_select, MP_ARG_OBJ | MP_ARG_REQUIRED, {.u_obj = MP_OBJ_NULL} }, + { MP_QSTR_width, MP_ARG_INT | MP_ARG_REQUIRED, {.u_int = 0} }, + { MP_QSTR_height, MP_ARG_INT | MP_ARG_REQUIRED, {.u_int = 0} }, + { MP_QSTR_baudrate, MP_ARG_INT, {.u_int = 2000000} }, + }; + mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)]; + MP_STATIC_ASSERT( MP_ARRAY_SIZE(allowed_args) == NUM_ARGS ); + + mp_arg_parse_all(n_args, pos_args, kw_args, MP_ARRAY_SIZE(allowed_args), allowed_args, args); + + mcu_pin_obj_t *chip_select = validate_obj_is_free_pin(args[ARG_chip_select].u_obj); + busio_spi_obj_t *spi = validate_obj_is_spi_bus(args[ARG_spi_bus].u_obj); + + sharpdisplay_framebuffer_obj_t* self = &allocate_display_bus_or_raise()->sharpdisplay; + self->base.type = &sharpdisplay_framebuffer_type; + + common_hal_sharpdisplay_framebuffer_construct(self, spi, chip_select, args[ARG_baudrate].u_int, args[ARG_width].u_int, args[ARG_height].u_int); + + return MP_OBJ_FROM_PTR(self); +} + + +STATIC mp_int_t sharpdisplay_framebuffer_get_buffer(mp_obj_t self_in, mp_buffer_info_t *bufinfo, mp_uint_t flags) { + sharpdisplay_framebuffer_obj_t *self = (sharpdisplay_framebuffer_obj_t*)self_in; + // a readonly framebuffer would be unusual but not impossible + if ((flags & MP_BUFFER_WRITE) && !(self->bufinfo.typecode & MP_OBJ_ARRAY_TYPECODE_FLAG_RW)) { + return 1; + } + *bufinfo = self->bufinfo; + return 0; +} + +STATIC mp_obj_t sharpdisplay_framebuffer_deinit(mp_obj_t self_in) { + sharpdisplay_framebuffer_obj_t *self = (sharpdisplay_framebuffer_obj_t*)self_in; + common_hal_sharpdisplay_framebuffer_deinit(self); + + return mp_const_none; +} +STATIC MP_DEFINE_CONST_FUN_OBJ_1(sharpdisplay_framebuffer_deinit_obj, sharpdisplay_framebuffer_deinit); + +STATIC const mp_rom_map_elem_t sharpdisplay_framebuffer_locals_dict_table[] = { + { MP_ROM_QSTR(MP_QSTR_deinit), MP_ROM_PTR(&sharpdisplay_framebuffer_deinit_obj) }, +}; +STATIC MP_DEFINE_CONST_DICT(sharpdisplay_framebuffer_locals_dict, sharpdisplay_framebuffer_locals_dict_table); + +const mp_obj_type_t sharpdisplay_framebuffer_type = { + { &mp_type_type }, + .name = MP_QSTR_SharpMemoryFramebuffer, + .buffer_p = { .get_buffer = sharpdisplay_framebuffer_get_buffer, }, + .make_new = sharpdisplay_framebuffer_make_new, + .protocol = &sharpdisplay_framebuffer_proto, + .locals_dict = (mp_obj_dict_t*)&sharpdisplay_framebuffer_locals_dict, +}; diff --git a/shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h b/shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h new file mode 100644 index 0000000000..30f1b867b1 --- /dev/null +++ b/shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h @@ -0,0 +1,34 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler 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. + */ + +#pragma once + +// #include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" +// #include "shared-module/framebufferio/FramebufferDisplay.h" + +#include "py/objtype.h" + +extern const mp_obj_type_t sharpdisplay_framebuffer_type; diff --git a/shared-bindings/sharpdisplay/__init__.c b/shared-bindings/sharpdisplay/__init__.c new file mode 100644 index 0000000000..d1f728c61b --- /dev/null +++ b/shared-bindings/sharpdisplay/__init__.c @@ -0,0 +1,47 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler 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 + +#include "py/obj.h" +#include "py/runtime.h" + +#include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h" + +//| """Support for Sharp Memory Display framebuffers""" +//| + +STATIC const mp_rom_map_elem_t sharpdisplay_module_globals_table[] = { + { MP_ROM_QSTR(MP_QSTR___name__), MP_ROM_QSTR(MP_QSTR_sharpdisplay) }, + { MP_ROM_QSTR(MP_QSTR_SharpMemoryFramebuffer), MP_ROM_PTR(&sharpdisplay_framebuffer_type) }, +}; + +STATIC MP_DEFINE_CONST_DICT(sharpdisplay_module_globals, sharpdisplay_module_globals_table); + +const mp_obj_module_t sharpdisplay_module = { + .base = { &mp_type_module }, + .globals = (mp_obj_dict_t*)&sharpdisplay_module_globals, +}; diff --git a/shared-bindings/sharpdisplay/__init__.h b/shared-bindings/sharpdisplay/__init__.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/shared-bindings/support_matrix.rst b/shared-bindings/support_matrix.rst index 124f3a8104..1b75e02567 100644 --- a/shared-bindings/support_matrix.rst +++ b/shared-bindings/support_matrix.rst @@ -6,11 +6,16 @@ Support Matrix The following table lists the available built-in modules for each CircuitPython capable board. -.. csv-table:: +.. list-table:: :header-rows: 1 :widths: 7, 50 - "Board", "Modules Available" - {% for key, value in support_matrix|dictsort -%} - "{{ key }}", "{{ '`' ~ value|join("`, `") ~ '`' }}" - {% endfor -%} + * - Board + - Modules Available + + {% for key, value in support_matrix|dictsort %} + {{ '.. _' ~ key|replace(" ", "-") ~ ':' }} + * - {{ key }} + - {{ '`' ~ value|join("`, `") ~ '`' }} + + {% endfor %} diff --git a/shared-module/displayio/__init__.c b/shared-module/displayio/__init__.c index efc28470fb..5afcba35ec 100644 --- a/shared-module/displayio/__init__.c +++ b/shared-module/displayio/__init__.c @@ -19,14 +19,19 @@ #include "supervisor/spi_flash_api.h" #include "py/mpconfig.h" +#if CIRCUITPY_SHARPDISPLAY +#include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h" +#include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" +#endif + primary_display_t displays[CIRCUITPY_DISPLAY_LIMIT]; -#if CIRCUITPY_RGBMATRIX -STATIC bool any_display_uses_this_rgbmatrix(rgbmatrix_rgbmatrix_obj_t* pm) { +#if CIRCUITPY_RGBMATRIX || CIRCUITPY_SHARPDISPLAY +STATIC bool any_display_uses_this_framebuffer(mp_obj_base_t *obj) { for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - if (displays[i].framebuffer_display.base.type == &framebufferio_framebufferdisplay_type) { + if (displays[i].display_base.type == &framebufferio_framebufferdisplay_type) { framebufferio_framebufferdisplay_obj_t* display = &displays[i].framebuffer_display; - if (display->framebuffer == pm) { + if (display->framebuffer == obj) { return true; } } @@ -102,9 +107,13 @@ void common_hal_displayio_release_displays(void) { common_hal_displayio_i2cdisplay_deinit(&displays[i].i2cdisplay_bus); } else if (bus_type == &displayio_parallelbus_type) { common_hal_displayio_parallelbus_deinit(&displays[i].parallel_bus); -#if CIRCUITPY_FRAMEBUFFERIO +#if CIRCUITPY_RGBMATRIX } else if (bus_type == &rgbmatrix_RGBMatrix_type) { common_hal_rgbmatrix_rgbmatrix_deinit(&displays[i].rgbmatrix); +#endif +#if CIRCUITPY_SHARPDISPLAY + } else if (displays[i].bus_base.type == &sharpdisplay_framebuffer_type) { + common_hal_sharpdisplay_framebuffer_deinit(&displays[i].sharpdisplay); #endif } displays[i].fourwire_bus.base.type = &mp_type_NoneType; @@ -170,9 +179,18 @@ void reset_displays(void) { #if CIRCUITPY_RGBMATRIX } else if (displays[i].rgbmatrix.base.type == &rgbmatrix_RGBMatrix_type) { rgbmatrix_rgbmatrix_obj_t * pm = &displays[i].rgbmatrix; - if(!any_display_uses_this_rgbmatrix(pm)) { + if(!any_display_uses_this_framebuffer(&pm->base)) { common_hal_rgbmatrix_rgbmatrix_deinit(pm); } +#endif +#if CIRCUITPY_SHARPDISPLAY + } else if (displays[i].bus_base.type == &sharpdisplay_framebuffer_type) { + sharpdisplay_framebuffer_obj_t * sharp = &displays[i].sharpdisplay; + if(any_display_uses_this_framebuffer(&sharp->base)) { + common_hal_sharpdisplay_framebuffer_reset(sharp); + } else { + common_hal_sharpdisplay_framebuffer_deinit(sharp); + } #endif } else { // Not an active display bus. @@ -203,6 +221,11 @@ void displayio_gc_collect(void) { rgbmatrix_rgbmatrix_collect_ptrs(&displays[i].rgbmatrix); } #endif +#if CIRCUITPY_SHARPDISPLAY + if (displays[i].bus_base.type == &sharpdisplay_framebuffer_type) { + common_hal_sharpdisplay_framebuffer_collect_ptrs(&displays[i].sharpdisplay); + } +#endif if (displays[i].display.base.type == NULL) { continue; diff --git a/shared-module/displayio/__init__.h b/shared-module/displayio/__init__.h index 9eb10c28b2..44ad5a9a98 100644 --- a/shared-module/displayio/__init__.h +++ b/shared-module/displayio/__init__.h @@ -36,18 +36,28 @@ #include "shared-bindings/displayio/Group.h" #include "shared-bindings/displayio/I2CDisplay.h" #include "shared-bindings/displayio/ParallelBus.h" +#if CIRCUITPY_RGBMATRIX #include "shared-bindings/rgbmatrix/RGBMatrix.h" +#endif +#if CIRCUITPY_SHARPDISPLAY +#include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" +#endif typedef struct { union { + mp_obj_base_t bus_base; displayio_fourwire_obj_t fourwire_bus; displayio_i2cdisplay_obj_t i2cdisplay_bus; displayio_parallelbus_obj_t parallel_bus; #if CIRCUITPY_RGBMATRIX rgbmatrix_rgbmatrix_obj_t rgbmatrix; +#endif +#if CIRCUITPY_SHARPDISPLAY + sharpdisplay_framebuffer_obj_t sharpdisplay; #endif }; union { + mp_obj_base_t display_base; displayio_display_obj_t display; displayio_epaperdisplay_obj_t epaper_display; #if CIRCUITPY_FRAMEBUFFERIO diff --git a/shared-module/framebufferio/FramebufferDisplay.c b/shared-module/framebufferio/FramebufferDisplay.c index 2a90fa0d4a..6b5346877c 100644 --- a/shared-module/framebufferio/FramebufferDisplay.c +++ b/shared-module/framebufferio/FramebufferDisplay.c @@ -40,6 +40,11 @@ #include #include +#define fb_getter_default(method, default_value) \ + (self->framebuffer_protocol->method \ + ? self->framebuffer_protocol->method(self->framebuffer) \ + : (default_value)) + void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebufferdisplay_obj_t* self, mp_obj_t framebuffer, uint16_t rotation, @@ -51,7 +56,7 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu uint16_t ram_width = 0x100; uint16_t ram_height = 0x100; - + uint16_t depth = fb_getter_default(get_color_depth, 16); displayio_display_core_construct( &self->core, NULL, @@ -62,16 +67,29 @@ void common_hal_framebufferio_framebufferdisplay_construct(framebufferio_framebu 0, 0, rotation, - self->framebuffer_protocol->get_color_depth(self->framebuffer), - false, - false, - self->framebuffer_protocol->get_bytes_per_cell(self->framebuffer), - false, - false); + depth, + fb_getter_default(get_grayscale, (depth < 8)), + fb_getter_default(get_pixels_in_byte_share_row, false), + fb_getter_default(get_bytes_per_cell, 2), + fb_getter_default(get_reverse_pixels_in_byte, false), + fb_getter_default(get_reverse_pixels_in_word, false) + ); + + self->first_pixel_offset = fb_getter_default(get_first_pixel_offset, 0); + self->row_stride = fb_getter_default(get_row_stride, 0); + if (self->row_stride == 0) { + self->row_stride = self->core.width * self->core.colorspace.depth/8; + } + + self->framebuffer_protocol->get_bufinfo(self->framebuffer, &self->bufinfo); + size_t framebuffer_size = self->first_pixel_offset + self->row_stride * self->core.height; + if (self->bufinfo.len < framebuffer_size) { + mp_raise_IndexError_varg(translate("Framebuffer requires %d bytes"), framebuffer_size); + } self->first_manual_refresh = !auto_refresh; - self->native_frames_per_second = self->framebuffer_protocol->get_native_frames_per_second(self->framebuffer); + self->native_frames_per_second = fb_getter_default(get_native_frames_per_second, 60); self->native_ms_per_frame = 1000 / self->native_frames_per_second; supervisor_start_terminal(self->core.width, self->core.height); @@ -109,7 +127,7 @@ bool common_hal_framebufferio_framebufferdisplay_set_auto_brightness(framebuffer } mp_float_t common_hal_framebufferio_framebufferdisplay_get_brightness(framebufferio_framebufferdisplay_obj_t* self) { - if (self->framebuffer_protocol->set_brightness) { + if (self->framebuffer_protocol->get_brightness) { return self->framebuffer_protocol->get_brightness(self->framebuffer); } return -1; @@ -138,7 +156,8 @@ STATIC const displayio_area_t* _get_refresh_areas(framebufferio_framebufferdispl return NULL; } -STATIC bool _refresh_area(framebufferio_framebufferdisplay_obj_t* self, const displayio_area_t* area) { +#define MARK_ROW_DIRTY(r) (dirty_row_bitmask[r/8] |= (1 << (r & 7))) +STATIC bool _refresh_area(framebufferio_framebufferdisplay_obj_t* self, const displayio_area_t* area, uint8_t *dirty_row_bitmask) { uint16_t buffer_size = 128; // In uint32_ts displayio_area_t clipped; @@ -147,6 +166,14 @@ STATIC bool _refresh_area(framebufferio_framebufferdisplay_obj_t* self, const di return true; } uint16_t subrectangles = 1; + + // If pixels are packed by row then rows are on byte boundaries + if (self->core.colorspace.depth < 8 && self->core.colorspace.pixels_in_byte_share_row) { + int div = 8 / self->core.colorspace.depth; + clipped.x1 = (clipped.x1 / div) * div; + clipped.x2 = ((clipped.x2 + div - 1) / div) * div; + } + uint16_t rows_per_buffer = displayio_area_height(&clipped); uint8_t pixels_per_word = (sizeof(uint32_t) * 8) / self->core.colorspace.depth; uint16_t pixels_per_buffer = displayio_area_size(&clipped); @@ -187,6 +214,7 @@ STATIC bool _refresh_area(framebufferio_framebufferdisplay_obj_t* self, const di .x2 = clipped.x2, .y2 = clipped.y1 + rows_per_buffer * (j + 1) }; + if (remaining_rows < rows_per_buffer) { subrectangle.y2 = subrectangle.y1 + remaining_rows; } @@ -197,12 +225,18 @@ STATIC bool _refresh_area(framebufferio_framebufferdisplay_obj_t* self, const di displayio_display_core_fill_area(&self->core, &subrectangle, mask, buffer); - // COULDDO: this arithmetic only supports multiple-of-8 bpp - uint8_t *dest = self->bufinfo.buf + (subrectangle.y1 * self->core.width + subrectangle.x1) * (self->core.colorspace.depth / 8); + uint8_t *buf = (uint8_t *)self->bufinfo.buf, *endbuf = buf + self->bufinfo.len; + (void)endbuf; // Hint to compiler that endbuf is "used" even if NDEBUG + buf += self->first_pixel_offset; + + size_t rowstride = self->row_stride; + uint8_t *dest = buf + subrectangle.y1 * rowstride + subrectangle.x1 * self->core.colorspace.depth / 8; uint8_t *src = (uint8_t*)buffer; - size_t rowsize = (subrectangle.x2 - subrectangle.x1) * (self->core.colorspace.depth / 8); - size_t rowstride = self->core.width * (self->core.colorspace.depth/8); + size_t rowsize = (subrectangle.x2 - subrectangle.x1) * self->core.colorspace.depth / 8; + for (uint16_t i = subrectangle.y1; i < subrectangle.y2; i++) { + assert(dest >= buf && dest < endbuf && dest+rowsize <= endbuf); + MARK_ROW_DIRTY(i); memcpy(dest, src, rowsize); dest += rowstride; src += rowsize; @@ -216,15 +250,23 @@ STATIC bool _refresh_area(framebufferio_framebufferdisplay_obj_t* self, const di } STATIC void _refresh_display(framebufferio_framebufferdisplay_obj_t* self) { - displayio_display_core_start_refresh(&self->core); self->framebuffer_protocol->get_bufinfo(self->framebuffer, &self->bufinfo); + if(!self->bufinfo.buf) { + return; + } + displayio_display_core_start_refresh(&self->core); const displayio_area_t* current_area = _get_refresh_areas(self); - while (current_area != NULL) { - _refresh_area(self, current_area); - current_area = current_area->next; + if (current_area) { + uint8_t dirty_row_bitmask[(self->core.height + 7) / 8]; + memset(dirty_row_bitmask, 0, sizeof(dirty_row_bitmask)); + self->framebuffer_protocol->get_bufinfo(self->framebuffer, &self->bufinfo); + while (current_area != NULL) { + _refresh_area(self, current_area, dirty_row_bitmask); + current_area = current_area->next; + } + self->framebuffer_protocol->swapbuffers(self->framebuffer, dirty_row_bitmask); } displayio_display_core_finish_refresh(&self->core); - self->framebuffer_protocol->swapbuffers(self->framebuffer); } void common_hal_framebufferio_framebufferdisplay_set_rotation(framebufferio_framebufferdisplay_obj_t* self, int rotation){ @@ -307,11 +349,7 @@ void release_framebufferdisplay(framebufferio_framebufferdisplay_obj_t* self) { common_hal_framebufferio_framebufferdisplay_set_auto_refresh(self, false); release_display_core(&self->core); self->framebuffer_protocol->deinit(self->framebuffer); -} - -void reset_framebufferdisplay(framebufferio_framebufferdisplay_obj_t* self) { - common_hal_framebufferio_framebufferdisplay_set_auto_refresh(self, true); - common_hal_framebufferio_framebufferdisplay_show(self, NULL); + self->base.type = &mp_type_NoneType; } void framebufferio_framebufferdisplay_collect_ptrs(framebufferio_framebufferdisplay_obj_t* self) { @@ -320,6 +358,12 @@ void framebufferio_framebufferdisplay_collect_ptrs(framebufferio_framebufferdisp } void framebufferio_framebufferdisplay_reset(framebufferio_framebufferdisplay_obj_t* self) { - common_hal_framebufferio_framebufferdisplay_set_auto_refresh(self, true); - common_hal_framebufferio_framebufferdisplay_show(self, NULL); + mp_obj_type_t *fb_type = mp_obj_get_type(self->framebuffer); + if(fb_type != NULL && fb_type != &mp_type_NoneType) { + common_hal_framebufferio_framebufferdisplay_set_auto_refresh(self, true); + common_hal_framebufferio_framebufferdisplay_show(self, NULL); + self->core.full_refresh = true; + } else { + release_framebufferdisplay(self); + } } diff --git a/shared-module/framebufferio/FramebufferDisplay.h b/shared-module/framebufferio/FramebufferDisplay.h index ca1ab984a3..89df0d27c1 100644 --- a/shared-module/framebufferio/FramebufferDisplay.h +++ b/shared-module/framebufferio/FramebufferDisplay.h @@ -48,44 +48,65 @@ typedef struct { uint64_t last_refresh_call; uint16_t native_frames_per_second; uint16_t native_ms_per_frame; + uint16_t first_pixel_offset; + uint16_t row_stride; bool auto_refresh; bool first_manual_refresh; } framebufferio_framebufferdisplay_obj_t; void framebufferio_framebufferdisplay_background(framebufferio_framebufferdisplay_obj_t* self); void release_framebufferdisplay(framebufferio_framebufferdisplay_obj_t* self); -void reset_framebufferdisplay(framebufferio_framebufferdisplay_obj_t* self); void framebufferio_framebufferdisplay_reset(framebufferio_framebufferdisplay_obj_t* self); void framebufferio_framebufferdisplay_collect_ptrs(framebufferio_framebufferdisplay_obj_t* self); mp_obj_t common_hal_framebufferio_framebufferdisplay_get_framebuffer(framebufferio_framebufferdisplay_obj_t* self); -typedef void (*framebuffer_get_bufinfo_fun)(mp_obj_t, mp_buffer_info_t *bufinfo); -typedef void (*framebuffer_swapbuffers_fun)(mp_obj_t); -typedef void (*framebuffer_deinit_fun)(mp_obj_t); -typedef bool (*framebuffer_set_brightness_fun)(mp_obj_t, mp_float_t); -typedef mp_float_t (*framebuffer_get_brightness_fun)(mp_obj_t); -typedef bool (*framebuffer_set_auto_brightness_fun)(mp_obj_t, bool); typedef bool (*framebuffer_get_auto_brightness_fun)(mp_obj_t); -typedef int (*framebuffer_get_width_fun)(mp_obj_t); -typedef int (*framebuffer_get_height_fun)(mp_obj_t); -typedef int (*framebuffer_get_color_depth_fun)(mp_obj_t); +typedef bool (*framebuffer_get_reverse_pixels_in_byte_fun)(mp_obj_t); +typedef bool (*framebuffer_get_reverse_pixels_in_word_fun)(mp_obj_t); +typedef bool (*framebuffer_set_auto_brightness_fun)(mp_obj_t, bool); +typedef bool (*framebuffer_set_brightness_fun)(mp_obj_t, mp_float_t); typedef int (*framebuffer_get_bytes_per_cell_fun)(mp_obj_t); +typedef int (*framebuffer_get_color_depth_fun)(mp_obj_t); +typedef int (*framebuffer_get_first_pixel_offset_fun)(mp_obj_t); +typedef int (*framebuffer_get_grayscale_fun)(mp_obj_t); +typedef int (*framebuffer_get_height_fun)(mp_obj_t); typedef int (*framebuffer_get_native_frames_per_second_fun)(mp_obj_t); +typedef bool (*framebuffer_get_pixels_in_byte_share_row_fun)(mp_obj_t); +typedef int (*framebuffer_get_row_stride_fun)(mp_obj_t); +typedef int (*framebuffer_get_width_fun)(mp_obj_t); +typedef mp_float_t (*framebuffer_get_brightness_fun)(mp_obj_t); +typedef void (*framebuffer_deinit_fun)(mp_obj_t); +typedef void (*framebuffer_get_bufinfo_fun)(mp_obj_t, mp_buffer_info_t *bufinfo); +typedef void (*framebuffer_swapbuffers_fun)(mp_obj_t, uint8_t *dirty_row_bitmask); typedef struct _framebuffer_p_t { MP_PROTOCOL_HEAD // MP_QSTR_protocol_framebuffer + + // Mandatory framebuffer_get_bufinfo_fun get_bufinfo; framebuffer_swapbuffers_fun swapbuffers; framebuffer_deinit_fun deinit; framebuffer_get_width_fun get_width; framebuffer_get_height_fun get_height; - framebuffer_get_color_depth_fun get_color_depth; - framebuffer_get_bytes_per_cell_fun get_bytes_per_cell; - framebuffer_get_native_frames_per_second_fun get_native_frames_per_second; + + // Optional getters + framebuffer_get_bytes_per_cell_fun get_bytes_per_cell; // default: 2 + framebuffer_get_color_depth_fun get_color_depth; // default: 16 + framebuffer_get_first_pixel_offset_fun get_first_pixel_offset; // default: 0 + framebuffer_get_grayscale_fun get_grayscale; // default: grayscale if depth < 8 + framebuffer_get_native_frames_per_second_fun get_native_frames_per_second; // default: 60 + framebuffer_get_pixels_in_byte_share_row_fun get_pixels_in_byte_share_row; // default: false + framebuffer_get_reverse_pixels_in_byte_fun get_reverse_pixels_in_byte; // default: false + framebuffer_get_reverse_pixels_in_word_fun get_reverse_pixels_in_word; // default: false + framebuffer_get_row_stride_fun get_row_stride; // default: 0 (no extra row padding) + + // Optional -- default is no brightness control framebuffer_get_brightness_fun get_brightness; framebuffer_set_brightness_fun set_brightness; + + // Optional -- default is no automatic brightness control framebuffer_get_auto_brightness_fun get_auto_brightness; framebuffer_set_auto_brightness_fun set_auto_brightness; } framebuffer_p_t; diff --git a/shared-module/sharpdisplay/SharpMemoryFramebuffer.c b/shared-module/sharpdisplay/SharpMemoryFramebuffer.c new file mode 100644 index 0000000000..71e00d7f01 --- /dev/null +++ b/shared-module/sharpdisplay/SharpMemoryFramebuffer.c @@ -0,0 +1,277 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler 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 + +#include "py/gc.h" + +#include "shared-bindings/board/__init__.h" +#include "shared-bindings/microcontroller/Pin.h" +#include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h" +#include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" + +#include "supervisor/memory.h" + +#define SHARPMEM_BIT_WRITECMD_LSB (0x80) +#define SHARPMEM_BIT_VCOM_LSB (0x40) + +static inline void *hybrid_alloc(size_t sz) { + if (gc_alloc_possible()) { + return m_malloc(sz + sizeof(void*), true); + } else { + supervisor_allocation *allocation = allocate_memory(align32_size(sz), false); + if (!allocation) { + return NULL; + } + memset(allocation->ptr, 0, sz); + return allocation->ptr; + } +} + +static inline void hybrid_free(void *ptr_in) { + supervisor_allocation *allocation = allocation_from_ptr(ptr_in); + + if (allocation) { + free_memory(allocation); + } +} + +STATIC uint8_t bitrev(uint8_t n) { + uint8_t r = 0; + for(int i=0;i<8;i++) r |= ((n>>i) & 1)<<(7-i); + return r; +} + +int common_hal_sharpdisplay_framebuffer_get_width(sharpdisplay_framebuffer_obj_t *self) { + return self->width; +} + +int common_hal_sharpdisplay_framebuffer_get_height(sharpdisplay_framebuffer_obj_t *self) { + return self->height; +} + +int common_hal_sharpdisplay_framebuffer_get_row_stride(sharpdisplay_framebuffer_obj_t *self) { + return (self->width + 7) / 8 + 2; +} + +int common_hal_sharpdisplay_framebuffer_get_first_pixel_offset(sharpdisplay_framebuffer_obj_t *self) { + return 2; +} + +bool common_hal_sharpdisplay_framebuffer_get_reverse_pixels_in_byte(sharpdisplay_framebuffer_obj_t *self) { + return true; +} + +bool common_hal_sharpdisplay_framebuffer_get_pixels_in_byte_share_row(sharpdisplay_framebuffer_obj_t *self) { + return true; +} + +void common_hal_sharpdisplay_framebuffer_reset(sharpdisplay_framebuffer_obj_t *self) { + if (!allocation_from_ptr(self->bufinfo.buf)) { + self->bufinfo.buf = NULL; + } + + if (self->bus != &self->inline_bus +#if BOARD_SPI + && self->bus != common_hal_board_get_spi() +#endif + ) { + memcpy(&self->inline_bus, self->bus, sizeof(busio_spi_obj_t)); + self->bus = &self->inline_bus; + } +} + +void common_hal_sharpdisplay_framebuffer_reconstruct(sharpdisplay_framebuffer_obj_t *self) { + +} + +void common_hal_sharpdisplay_framebuffer_get_bufinfo(sharpdisplay_framebuffer_obj_t *self, mp_buffer_info_t *bufinfo) { + if (!self->bufinfo.buf) { + int row_stride = common_hal_sharpdisplay_framebuffer_get_row_stride(self); + int height = common_hal_sharpdisplay_framebuffer_get_height(self); + self->bufinfo.len = row_stride * height + 2; + self->bufinfo.buf = hybrid_alloc(self->bufinfo.len); + + uint8_t *data = self->bufinfo.buf; + *data++ = SHARPMEM_BIT_WRITECMD_LSB; + + for(int y=0; yfull_refresh = true; + } + *bufinfo = self->bufinfo; +} + +void common_hal_sharpdisplay_framebuffer_deinit(sharpdisplay_framebuffer_obj_t *self) { + if (self->base.type != &sharpdisplay_framebuffer_type) { + return; + } + + if (self->bus == &self->inline_bus) { + common_hal_busio_spi_deinit(self->bus); + } + + common_hal_reset_pin(self->chip_select.pin); + + hybrid_free(self->bufinfo.buf); + + memset(self, 0, sizeof(*self)); +} + +void common_hal_sharpdisplay_framebuffer_construct(sharpdisplay_framebuffer_obj_t *self, busio_spi_obj_t *spi, mcu_pin_obj_t *chip_select, int baudrate, int width, int height) { + common_hal_digitalio_digitalinout_construct(&self->chip_select, chip_select); + common_hal_digitalio_digitalinout_switch_to_output(&self->chip_select, true, DRIVE_MODE_PUSH_PULL); + common_hal_never_reset_pin(chip_select); + + self->bus = spi; + common_hal_busio_spi_never_reset(self->bus); + + self->width = width; + self->height = height; + self->baudrate = baudrate; + + int row_stride = common_hal_sharpdisplay_framebuffer_get_row_stride(self); + self->bufinfo.len = row_stride * height + 2; + self->bufinfo.buf = gc_alloc(self->bufinfo.len, false, true); + + uint8_t *data = self->bufinfo.buf; + *data++ = SHARPMEM_BIT_WRITECMD_LSB; + + for(int y=0; yheight; y++) { + *data = bitrev(y+1); + data += row_stride; + } + self->full_refresh = true; +} + +void common_hal_sharpdisplay_framebuffer_swapbuffers(sharpdisplay_framebuffer_obj_t *self, uint8_t *dirty_row_bitmask) { + // claim SPI bus + if (!common_hal_busio_spi_try_lock(self->bus)) { + return; + } + common_hal_busio_spi_configure(self->bus, self->baudrate, 0, 0, 8); + + // set chip select high + common_hal_digitalio_digitalinout_set_value(&self->chip_select, true); + + // output the toggling signal + uint8_t *data = self->bufinfo.buf; + data[0] ^= SHARPMEM_BIT_VCOM_LSB; + + common_hal_busio_spi_write(self->bus, data++, 1); + + // output each changed row + size_t row_stride = common_hal_sharpdisplay_framebuffer_get_row_stride(self); + for(int y=0; yheight; y++) { + if(self->full_refresh || (dirty_row_bitmask[y/8] & (1 << (y & 7)))) { + common_hal_busio_spi_write(self->bus, data, row_stride); + } + data += row_stride; + } + + // output a trailing zero + common_hal_busio_spi_write(self->bus, data, 1); + + // set chip select low + common_hal_digitalio_digitalinout_set_value(&self->chip_select, false); + + // release SPI bus + common_hal_busio_spi_unlock(self->bus); + + self->full_refresh = false; +} + +STATIC void sharpdisplay_framebuffer_deinit(mp_obj_t self_in) { + sharpdisplay_framebuffer_obj_t *self = self_in; + common_hal_sharpdisplay_framebuffer_deinit(self); +} + +STATIC void sharpdisplay_framebuffer_get_bufinfo(mp_obj_t self_in, mp_buffer_info_t *bufinfo) { + sharpdisplay_framebuffer_obj_t *self = self_in; + common_hal_sharpdisplay_framebuffer_get_bufinfo(self, bufinfo); +} + +STATIC int sharpdisplay_framebuffer_get_color_depth(mp_obj_t self_in) { + return 1; +} + +STATIC int sharpdisplay_framebuffer_get_height(mp_obj_t self_in) { + sharpdisplay_framebuffer_obj_t *self = self_in; + return common_hal_sharpdisplay_framebuffer_get_height(self); +} + +STATIC int sharpdisplay_framebuffer_get_width(mp_obj_t self_in) { + sharpdisplay_framebuffer_obj_t *self = self_in; + return common_hal_sharpdisplay_framebuffer_get_width(self); +} + +STATIC int sharpdisplay_framebuffer_get_first_pixel_offset(mp_obj_t self_in) { + sharpdisplay_framebuffer_obj_t *self = self_in; + return common_hal_sharpdisplay_framebuffer_get_first_pixel_offset(self); +} + +STATIC bool sharpdisplay_framebuffer_get_pixels_in_byte_share_row(mp_obj_t self_in) { + sharpdisplay_framebuffer_obj_t *self = self_in; + return common_hal_sharpdisplay_framebuffer_get_pixels_in_byte_share_row(self); +} + +STATIC bool sharpdisplay_framebuffer_get_reverse_pixels_in_byte(mp_obj_t self_in) { + sharpdisplay_framebuffer_obj_t *self = self_in; + return common_hal_sharpdisplay_framebuffer_get_reverse_pixels_in_byte(self); +} + +STATIC int sharpdisplay_framebuffer_get_row_stride(mp_obj_t self_in) { + sharpdisplay_framebuffer_obj_t *self = self_in; + return common_hal_sharpdisplay_framebuffer_get_row_stride(self); +} + +STATIC void sharpdisplay_framebuffer_swapbuffers(mp_obj_t self_in, uint8_t *dirty_row_bitmask) { + sharpdisplay_framebuffer_obj_t *self = self_in; + common_hal_sharpdisplay_framebuffer_swapbuffers(self, dirty_row_bitmask); +} + +const framebuffer_p_t sharpdisplay_framebuffer_proto = { + MP_PROTO_IMPLEMENT(MP_QSTR_protocol_framebuffer) + .deinit = sharpdisplay_framebuffer_deinit, + .get_bufinfo = sharpdisplay_framebuffer_get_bufinfo, + .get_color_depth = sharpdisplay_framebuffer_get_color_depth, + .get_height = sharpdisplay_framebuffer_get_height, + .get_width = sharpdisplay_framebuffer_get_width, + .swapbuffers = sharpdisplay_framebuffer_swapbuffers, + + .get_first_pixel_offset = sharpdisplay_framebuffer_get_first_pixel_offset, + .get_pixels_in_byte_share_row = sharpdisplay_framebuffer_get_pixels_in_byte_share_row, + .get_reverse_pixels_in_byte = sharpdisplay_framebuffer_get_reverse_pixels_in_byte, + .get_row_stride = sharpdisplay_framebuffer_get_row_stride, +}; + +void common_hal_sharpdisplay_framebuffer_collect_ptrs(sharpdisplay_framebuffer_obj_t *self) { + gc_collect_ptr(self->framebuffer); + gc_collect_ptr(self->bus); + gc_collect_ptr(self->bufinfo.buf); +} diff --git a/shared-module/sharpdisplay/SharpMemoryFramebuffer.h b/shared-module/sharpdisplay/SharpMemoryFramebuffer.h new file mode 100644 index 0000000000..8acacc94e1 --- /dev/null +++ b/shared-module/sharpdisplay/SharpMemoryFramebuffer.h @@ -0,0 +1,60 @@ +/* + * This file is part of the MicroPython project, http://micropython.org/ + * + * The MIT License (MIT) + * + * Copyright (c) 2020 Jeff Epler 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. + */ + +#pragma once + +#include "py/obj.h" +#include "shared-bindings/busio/SPI.h" +#include "shared-bindings/digitalio/DigitalInOut.h" +#include "shared-module/framebufferio/FramebufferDisplay.h" + +typedef struct { + mp_obj_base_t base; + mp_obj_t framebuffer; + busio_spi_obj_t* bus; + busio_spi_obj_t inline_bus; + digitalio_digitalinout_obj_t chip_select; + mp_buffer_info_t bufinfo; + + uint16_t width, height; + uint32_t baudrate; + + bool full_refresh:1; +} sharpdisplay_framebuffer_obj_t; + +void common_hal_sharpdisplay_framebuffer_construct(sharpdisplay_framebuffer_obj_t *self, busio_spi_obj_t *spi, mcu_pin_obj_t *chip_select, int baudrate, int width, int height); +void common_hal_sharpdisplay_framebuffer_swap_buffers(sharpdisplay_framebuffer_obj_t *self, uint8_t *dirty_row_bitmask); +void common_hal_sharpdisplay_framebuffer_deinit(sharpdisplay_framebuffer_obj_t *self); +void common_hal_sharpdisplay_framebuffer_get_bufinfo(sharpdisplay_framebuffer_obj_t *self, mp_buffer_info_t *bufinfo); +int common_hal_sharpdisplay_framebuffer_get_height(sharpdisplay_framebuffer_obj_t *self); +int common_hal_sharpdisplay_framebuffer_get_width(sharpdisplay_framebuffer_obj_t *self); +void common_hal_sharpdisplay_framebuffer_swap_buffers(sharpdisplay_framebuffer_obj_t *self, uint8_t *dirty_row_bitmask); +void common_hal_sharpdisplay_framebuffer_reset(sharpdisplay_framebuffer_obj_t *self); +void common_hal_sharpdisplay_framebuffer_reconstruct(sharpdisplay_framebuffer_obj_t *self); + +extern const framebuffer_p_t sharpdisplay_framebuffer_proto; + +void common_hal_sharpdisplay_framebuffer_collect_ptrs(sharpdisplay_framebuffer_obj_t*); diff --git a/shared-module/sharpdisplay/__init__.c b/shared-module/sharpdisplay/__init__.c new file mode 100644 index 0000000000..e69de29bb2 diff --git a/shared-module/sharpdisplay/__init__.h b/shared-module/sharpdisplay/__init__.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/supervisor/shared/display.c b/supervisor/shared/display.c index 9c074209b8..08dd71404b 100644 --- a/supervisor/shared/display.c +++ b/supervisor/shared/display.c @@ -38,6 +38,12 @@ #include "shared-module/displayio/__init__.h" #endif +#if CIRCUITPY_SHARPDISPLAY +#include "shared-module/displayio/__init__.h" +#include "shared-bindings/sharpdisplay/SharpMemoryFramebuffer.h" +#include "shared-module/sharpdisplay/SharpMemoryFramebuffer.h" +#endif + extern size_t blinka_bitmap_data[]; extern displayio_bitmap_t blinka_bitmap; extern displayio_group_t circuitpython_splash; @@ -116,15 +122,21 @@ void supervisor_display_move_memory(void) { grid->inline_tiles = false; } MP_STATE_VM(terminal_tilegrid_tiles) = NULL; - #if CIRCUITPY_RGBMATRIX for (uint8_t i = 0; i < CIRCUITPY_DISPLAY_LIMIT; i++) { - if (displays[i].rgbmatrix.base.type == &rgbmatrix_RGBMatrix_type) { - rgbmatrix_rgbmatrix_obj_t * pm = &displays[i].rgbmatrix; + #if CIRCUITPY_RGBMATRIX + if (displays[i].rgbmatrix.base.type == &rgbmatrix_RGBMatrix_type) { + rgbmatrix_rgbmatrix_obj_t * pm = &displays[i].rgbmatrix; common_hal_rgbmatrix_rgbmatrix_reconstruct(pm, NULL); - } + } + #endif + #if CIRCUITPY_SHARPDISPLAY + if (displays[i].bus_base.type == &sharpdisplay_framebuffer_type) { + sharpdisplay_framebuffer_obj_t * sharp = &displays[i].sharpdisplay; + common_hal_sharpdisplay_framebuffer_reconstruct(sharp); + } + #endif } #endif - #endif } size_t blinka_bitmap_data[32] = { diff --git a/supervisor/shared/rgb_led_status.c b/supervisor/shared/rgb_led_status.c index f3c2106471..2f23e31258 100644 --- a/supervisor/shared/rgb_led_status.c +++ b/supervisor/shared/rgb_led_status.c @@ -28,6 +28,7 @@ #include "shared-bindings/microcontroller/Pin.h" #include "rgb_led_status.h" #include "supervisor/shared/tick.h" +#include "py/obj.h" #ifdef MICROPY_HW_NEOPIXEL uint8_t rgb_status_brightness = 63; @@ -365,6 +366,11 @@ void prep_rgb_status_animation(const pyexec_result_t* result, status->safe_mode = safe_mode; status->found_main = found_main; status->total_exception_cycle = 0; + status->ok = result->return_code != PYEXEC_EXCEPTION; + if (status->ok) { + // If this isn't an exception, skip exception sorting and handling + return; + } status->ones = result->exception_line % 10; status->ones += status->ones > 0 ? 1 : 0; status->tens = (result->exception_line / 10) % 10; @@ -382,11 +388,12 @@ void prep_rgb_status_animation(const pyexec_result_t* result, } line /= 10; } - status->ok = result->return_code != PYEXEC_EXCEPTION; if (!status->ok) { status->total_exception_cycle = EXCEPTION_TYPE_LENGTH_MS * 3 + LINE_NUMBER_TOGGLE_LENGTH * status->digit_sum + LINE_NUMBER_TOGGLE_LENGTH * num_places; } - if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_IndentationError)) { + if (!result->exception_type) { + status->exception_color = OTHER_ERROR; + } else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_IndentationError)) { status->exception_color = INDENTATION_ERROR; } else if (mp_obj_is_subclass_fast(result->exception_type, &mp_type_SyntaxError)) { status->exception_color = SYNTAX_ERROR; diff --git a/tools/extract_pyi.py b/tools/extract_pyi.py index 4d82e9e5d3..651216e11a 100644 --- a/tools/extract_pyi.py +++ b/tools/extract_pyi.py @@ -45,7 +45,10 @@ def find_stub_issues(tree): if isinstance(node.value, ast.Constant) and node.value.value == Ellipsis: yield ("WARN", f"Unnecessary Ellipsis assignment (= ...) on line {node.lineno}.") elif isinstance(node, ast.arguments): - for arg_node in (node.args + node.posonlyargs + node.kwonlyargs): + allargs = list(node.args + node.kwonlyargs) + if sys.version_info >= (3, 8): + allargs.extend(node.posonlyargs) + for arg_node in allargs: if not is_typed(arg_node.annotation) and (arg_node.arg != "self" and arg_node.arg != "cls"): yield ("WARN", f"Missing argument type: {arg_node.arg} on line {arg_node.lineno}") if node.vararg and not is_typed(node.vararg.annotation, allow_any=True):