Skip to content

Commit cef6e08

Browse files
authored
Merge pull request #943 from rhooper/pixelbuf
Add pixelbuf for accelerating NeoPixel operations
2 parents f46ec02 + f43379c commit cef6e08

File tree

29 files changed

+1835
-187
lines changed

29 files changed

+1835
-187
lines changed

docs/library/builtins.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,12 @@ Not all of these functions and types are turned on in all CircuitPython ports, f
7878

7979
.. classmethod:: from_bytes(bytes, byteorder)
8080

81-
In CircuitPython, `byteorder` parameter must be positional (this is
81+
In CircuitPython, ``byteorder`` parameter must be positional (this is
8282
compatible with CPython).
8383

8484
.. method:: to_bytes(size, byteorder)
8585

86-
In CircuitPython, `byteorder` parameter must be positional (this is
86+
In CircuitPython, ``byteorder`` parameter must be positional (this is
8787
compatible with CPython).
8888

8989
.. function:: isinstance()

locale/ID.po

Lines changed: 63 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2019-01-21 21:50-0500\n"
11+
"POT-Creation-Date: 2019-01-22 14:00-0800\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -1963,7 +1963,7 @@ msgstr ""
19631963
msgid "argument should be a '%q' not a '%q'"
19641964
msgstr ""
19651965

1966-
#: py/runtime.c:1123 py/runtime.c:1197
1966+
#: py/runtime.c:1123 py/runtime.c:1197 shared-bindings/_pixelbuf/__init__.c:106
19671967
msgid "no such attribute"
19681968
msgstr ""
19691969

@@ -2042,6 +2042,54 @@ msgstr ""
20422042
msgid "byte code not implemented"
20432043
msgstr ""
20442044

2045+
#: shared-bindings/_pixelbuf/PixelBuf.c:99
2046+
#, c-format
2047+
msgid "byteorder is not an instance of ByteOrder (got a %s)"
2048+
msgstr ""
2049+
2050+
#: shared-bindings/_pixelbuf/PixelBuf.c:104
2051+
#, c-format
2052+
msgid "Can not use dotstar with %s"
2053+
msgstr ""
2054+
2055+
#: shared-bindings/_pixelbuf/PixelBuf.c:116
2056+
msgid "rawbuf is not the same size as buf"
2057+
msgstr ""
2058+
2059+
#: shared-bindings/_pixelbuf/PixelBuf.c:121
2060+
#, c-format
2061+
msgid "buf is too small. need %d bytes"
2062+
msgstr ""
2063+
2064+
#: shared-bindings/_pixelbuf/PixelBuf.c:127
2065+
msgid "write_args must be a list, tuple, or None"
2066+
msgstr ""
2067+
2068+
#: shared-bindings/_pixelbuf/PixelBuf.c:392
2069+
msgid "Only slices with step=1 (aka None) are supported"
2070+
msgstr ""
2071+
2072+
#: shared-bindings/_pixelbuf/PixelBuf.c:394
2073+
msgid "Range out of bounds"
2074+
msgstr ""
2075+
2076+
#: shared-bindings/_pixelbuf/PixelBuf.c:403
2077+
msgid "tuple/list required on RHS"
2078+
msgstr ""
2079+
2080+
#: shared-bindings/_pixelbuf/PixelBuf.c:419
2081+
#, c-format
2082+
msgid "Unmatched number of items on RHS (expected %d, got %d)."
2083+
msgstr ""
2084+
2085+
#: shared-bindings/_pixelbuf/PixelBuf.c:442
2086+
msgid "Pixel beyond bounds of buffer"
2087+
msgstr ""
2088+
2089+
#: shared-bindings/_pixelbuf/__init__.c:112
2090+
msgid "readonly attribute"
2091+
msgstr ""
2092+
20452093
#: shared-bindings/_stage/Layer.c:71
20462094
msgid "graphic must be 2048 bytes long"
20472095
msgstr ""
@@ -2535,6 +2583,11 @@ msgid ""
25352583
"Object has been deinitialized and can no longer be used. Create a new object."
25362584
msgstr ""
25372585

2586+
#: shared-module/_pixelbuf/PixelBuf.c:69
2587+
#, c-format
2588+
msgid "Expected tuple of length %d, got %d"
2589+
msgstr ""
2590+
25382591
#: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117
25392592
msgid "Couldn't allocate first buffer"
25402593
msgstr ""
@@ -2771,12 +2824,8 @@ msgstr ""
27712824
#~ msgstr ""
27722825
#~ "Silahkan taruh masalah disini dengan isi dari CIRCUITPY drive: anda \n"
27732826

2774-
#~ msgid "Invalid UUID parameter"
2775-
#~ msgstr "Parameter UUID tidak valid"
2776-
2777-
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
2778-
#~ msgstr ""
2779-
#~ "Sepertinya inti kode CircuitPython kita crash dengan sangat keras. Ups!\n"
2827+
#~ msgid "Invalid UUID string length"
2828+
#~ msgstr "Panjang string UUID tidak valid"
27802829

27812830
#~ msgid ""
27822831
#~ "enough power for the whole circuit and press reset (after ejecting "
@@ -2785,8 +2834,12 @@ msgstr ""
27852834
#~ "tegangan cukup untuk semua sirkuit dan tekan reset (setelah mencabut "
27862835
#~ "CIRCUITPY).\n"
27872836

2788-
#~ msgid "Invalid UUID string length"
2789-
#~ msgstr "Panjang string UUID tidak valid"
2837+
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
2838+
#~ msgstr ""
2839+
#~ "Sepertinya inti kode CircuitPython kita crash dengan sangat keras. Ups!\n"
2840+
2841+
#~ msgid "Invalid UUID parameter"
2842+
#~ msgstr "Parameter UUID tidak valid"
27902843

27912844
#, fuzzy
27922845
#~ msgid "unpack requires a buffer of %d bytes"

locale/circuitpython.pot

Lines changed: 55 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ msgid ""
88
msgstr ""
99
"Project-Id-Version: PACKAGE VERSION\n"
1010
"Report-Msgid-Bugs-To: \n"
11-
"POT-Creation-Date: 2019-01-21 21:50-0500\n"
11+
"POT-Creation-Date: 2019-01-22 14:00-0800\n"
1212
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
1313
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
1414
"Language-Team: LANGUAGE <[email protected]>\n"
@@ -1930,7 +1930,7 @@ msgstr ""
19301930
msgid "argument should be a '%q' not a '%q'"
19311931
msgstr ""
19321932

1933-
#: py/runtime.c:1123 py/runtime.c:1197
1933+
#: py/runtime.c:1123 py/runtime.c:1197 shared-bindings/_pixelbuf/__init__.c:106
19341934
msgid "no such attribute"
19351935
msgstr ""
19361936

@@ -2009,6 +2009,54 @@ msgstr ""
20092009
msgid "byte code not implemented"
20102010
msgstr ""
20112011

2012+
#: shared-bindings/_pixelbuf/PixelBuf.c:99
2013+
#, c-format
2014+
msgid "byteorder is not an instance of ByteOrder (got a %s)"
2015+
msgstr ""
2016+
2017+
#: shared-bindings/_pixelbuf/PixelBuf.c:104
2018+
#, c-format
2019+
msgid "Can not use dotstar with %s"
2020+
msgstr ""
2021+
2022+
#: shared-bindings/_pixelbuf/PixelBuf.c:116
2023+
msgid "rawbuf is not the same size as buf"
2024+
msgstr ""
2025+
2026+
#: shared-bindings/_pixelbuf/PixelBuf.c:121
2027+
#, c-format
2028+
msgid "buf is too small. need %d bytes"
2029+
msgstr ""
2030+
2031+
#: shared-bindings/_pixelbuf/PixelBuf.c:127
2032+
msgid "write_args must be a list, tuple, or None"
2033+
msgstr ""
2034+
2035+
#: shared-bindings/_pixelbuf/PixelBuf.c:392
2036+
msgid "Only slices with step=1 (aka None) are supported"
2037+
msgstr ""
2038+
2039+
#: shared-bindings/_pixelbuf/PixelBuf.c:394
2040+
msgid "Range out of bounds"
2041+
msgstr ""
2042+
2043+
#: shared-bindings/_pixelbuf/PixelBuf.c:403
2044+
msgid "tuple/list required on RHS"
2045+
msgstr ""
2046+
2047+
#: shared-bindings/_pixelbuf/PixelBuf.c:419
2048+
#, c-format
2049+
msgid "Unmatched number of items on RHS (expected %d, got %d)."
2050+
msgstr ""
2051+
2052+
#: shared-bindings/_pixelbuf/PixelBuf.c:442
2053+
msgid "Pixel beyond bounds of buffer"
2054+
msgstr ""
2055+
2056+
#: shared-bindings/_pixelbuf/__init__.c:112
2057+
msgid "readonly attribute"
2058+
msgstr ""
2059+
20122060
#: shared-bindings/_stage/Layer.c:71
20132061
msgid "graphic must be 2048 bytes long"
20142062
msgstr ""
@@ -2497,6 +2545,11 @@ msgid ""
24972545
"Object has been deinitialized and can no longer be used. Create a new object."
24982546
msgstr ""
24992547

2548+
#: shared-module/_pixelbuf/PixelBuf.c:69
2549+
#, c-format
2550+
msgid "Expected tuple of length %d, got %d"
2551+
msgstr ""
2552+
25002553
#: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117
25012554
msgid "Couldn't allocate first buffer"
25022555
msgstr ""

locale/de_DE.po

Lines changed: 79 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ msgid ""
77
msgstr ""
88
"Project-Id-Version: \n"
99
"Report-Msgid-Bugs-To: \n"
10-
"POT-Creation-Date: 2019-01-21 21:50-0500\n"
10+
"POT-Creation-Date: 2019-01-22 14:00-0800\n"
1111
"PO-Revision-Date: 2018-07-27 11:55-0700\n"
1212
"Last-Translator: Sebastian Plamauer\n"
1313
"Language-Team: \n"
@@ -1959,7 +1959,7 @@ msgstr ""
19591959
msgid "argument should be a '%q' not a '%q'"
19601960
msgstr ""
19611961

1962-
#: py/runtime.c:1123 py/runtime.c:1197
1962+
#: py/runtime.c:1123 py/runtime.c:1197 shared-bindings/_pixelbuf/__init__.c:106
19631963
msgid "no such attribute"
19641964
msgstr ""
19651965

@@ -2038,6 +2038,54 @@ msgstr ""
20382038
msgid "byte code not implemented"
20392039
msgstr ""
20402040

2041+
#: shared-bindings/_pixelbuf/PixelBuf.c:99
2042+
#, c-format
2043+
msgid "byteorder is not an instance of ByteOrder (got a %s)"
2044+
msgstr ""
2045+
2046+
#: shared-bindings/_pixelbuf/PixelBuf.c:104
2047+
#, c-format
2048+
msgid "Can not use dotstar with %s"
2049+
msgstr ""
2050+
2051+
#: shared-bindings/_pixelbuf/PixelBuf.c:116
2052+
msgid "rawbuf is not the same size as buf"
2053+
msgstr ""
2054+
2055+
#: shared-bindings/_pixelbuf/PixelBuf.c:121
2056+
#, c-format
2057+
msgid "buf is too small. need %d bytes"
2058+
msgstr ""
2059+
2060+
#: shared-bindings/_pixelbuf/PixelBuf.c:127
2061+
msgid "write_args must be a list, tuple, or None"
2062+
msgstr ""
2063+
2064+
#: shared-bindings/_pixelbuf/PixelBuf.c:392
2065+
msgid "Only slices with step=1 (aka None) are supported"
2066+
msgstr ""
2067+
2068+
#: shared-bindings/_pixelbuf/PixelBuf.c:394
2069+
msgid "Range out of bounds"
2070+
msgstr ""
2071+
2072+
#: shared-bindings/_pixelbuf/PixelBuf.c:403
2073+
msgid "tuple/list required on RHS"
2074+
msgstr ""
2075+
2076+
#: shared-bindings/_pixelbuf/PixelBuf.c:419
2077+
#, c-format
2078+
msgid "Unmatched number of items on RHS (expected %d, got %d)."
2079+
msgstr ""
2080+
2081+
#: shared-bindings/_pixelbuf/PixelBuf.c:442
2082+
msgid "Pixel beyond bounds of buffer"
2083+
msgstr ""
2084+
2085+
#: shared-bindings/_pixelbuf/__init__.c:112
2086+
msgid "readonly attribute"
2087+
msgstr ""
2088+
20412089
#: shared-bindings/_stage/Layer.c:71
20422090
msgid "graphic must be 2048 bytes long"
20432091
msgstr ""
@@ -2537,6 +2585,11 @@ msgid ""
25372585
"Object has been deinitialized and can no longer be used. Create a new object."
25382586
msgstr ""
25392587

2588+
#: shared-module/_pixelbuf/PixelBuf.c:69
2589+
#, c-format
2590+
msgid "Expected tuple of length %d, got %d"
2591+
msgstr ""
2592+
25402593
#: shared-module/audioio/Mixer.c:47 shared-module/audioio/WaveFile.c:117
25412594
msgid "Couldn't allocate first buffer"
25422595
msgstr ""
@@ -2767,19 +2820,35 @@ msgid ""
27672820
"exit safe mode.\n"
27682821
msgstr ""
27692822

2770-
#~ msgid "Invalid UUID string length"
2771-
#~ msgstr "Ungültige UUID-Stringlänge"
2772-
27732823
#~ msgid "Can encode UUID into the advertisement packet."
27742824
#~ msgstr "Kann UUID in das advertisement packet kodieren."
27752825

2826+
#~ msgid "Invalid UUID string length"
2827+
#~ msgstr "Ungültige UUID-Stringlänge"
2828+
27762829
#~ msgid ""
27772830
#~ "Please file an issue here with the contents of your CIRCUITPY drive:\n"
27782831
#~ msgstr ""
27792832
#~ "Bitte erstelle ein issue hier mit dem Inhalt deines CIRCUITPY-speichers:\n"
27802833

2781-
#~ msgid "Invalid UUID parameter"
2782-
#~ msgstr "Ungültiger UUID-Parameter"
2834+
#~ msgid "Can not add Characteristic."
2835+
#~ msgstr "Kann das Merkmal nicht hinzufügen."
2836+
2837+
#~ msgid "Cannot apply GAP parameters."
2838+
#~ msgstr "Kann GAP Parameter nicht anwenden."
2839+
2840+
#~ msgid "Can not encode UUID, to check length."
2841+
#~ msgstr "Kann UUID nicht kodieren, um die Länge zu überprüfen."
2842+
2843+
#~ msgid "Can not add Service."
2844+
#~ msgstr "Kann den Dienst nicht hinzufügen."
2845+
2846+
#~ msgid "Can not query for the device address."
2847+
#~ msgstr "Kann nicht nach der Geräteadresse suchen."
2848+
2849+
#, fuzzy
2850+
#~ msgid "unpack requires a buffer of %d bytes"
2851+
#~ msgstr "Konnte keine RX Buffer mit %d allozieren"
27832852

27842853
#~ msgid "Invalid Service type"
27852854
#~ msgstr "Ungültiger Diensttyp"
@@ -2791,30 +2860,14 @@ msgstr ""
27912860
#~ "genug Strom für den ganzen Schaltkreis liefert und drücke reset (nach dem "
27922861
#~ "sicheren Auswerfen von CIRCUITPY.)\n"
27932862

2863+
#~ msgid "Invalid UUID parameter"
2864+
#~ msgstr "Ungültiger UUID-Parameter"
2865+
27942866
#~ msgid "Can not apply device name in the stack."
27952867
#~ msgstr "Der Gerätename kann nicht im Stack verwendet werden."
27962868

2797-
#~ msgid "Can not query for the device address."
2798-
#~ msgstr "Kann nicht nach der Geräteadresse suchen."
2799-
2800-
#~ msgid "Can not encode UUID, to check length."
2801-
#~ msgstr "Kann UUID nicht kodieren, um die Länge zu überprüfen."
2802-
2803-
#~ msgid "Cannot apply GAP parameters."
2804-
#~ msgstr "Kann GAP Parameter nicht anwenden."
2805-
28062869
#~ msgid "Can not apply advertisement data. status: 0x%02x"
28072870
#~ msgstr "Kann advertisement data nicht anwenden. Status: 0x%02x"
28082871

28092872
#~ msgid "Looks like our core CircuitPython code crashed hard. Whoops!\n"
28102873
#~ msgstr "CircuitPython ist abgestürzt. Ups!\n"
2811-
2812-
#~ msgid "Can not add Service."
2813-
#~ msgstr "Kann den Dienst nicht hinzufügen."
2814-
2815-
#~ msgid "Can not add Characteristic."
2816-
#~ msgstr "Kann das Merkmal nicht hinzufügen."
2817-
2818-
#, fuzzy
2819-
#~ msgid "unpack requires a buffer of %d bytes"
2820-
#~ msgstr "Konnte keine RX Buffer mit %d allozieren"

0 commit comments

Comments
 (0)