summaryrefslogtreecommitdiff
path: root/shared-bindings
AgeCommit message (Collapse)Author
2020-05-11Merge pull request #2877 from rhooper/pixelbuf-doc-fixScott Shawcroft
Pixelbuf doc fix
2020-05-10ujson: do not eat trailing whitespacewarriorofwire
Ujson should only worry about whitespace before JSON. This becomes apparent when you are using MP stream protocol to read directly from input buffers. When you attempt to read(1) on a UART (and possibly other protocols) you have to wait for either the byte or the timeout. Fixes: - Waiting for a timeout after you have completed reading a correct and complete JSON off the input. - Raising an OSError after reading a correct and complete JSON off the input. - Eating more data than semantically owned off the input buffer. - Blocking to start parsing JSON until the entire JSON body has been loaded into a potentially large, contiguous Python object. Code you would write before: ``` line = board_busio_uart_port.read_line() json_dict = json.loads(line) ``` or reaching for fixed buffers and swapping them around in Python. Code that did not work before that does now: ``` json_dict = json.load(board_busio_uart_port) ``` - This removes the need for intermediate copies of data when reading JSON from micropython stream protocol inputs. - It also increases total application speed by parsing JSON concurrently with receiving on boards that read from UART via DMA. - It simplifies code that users write while improving their apps.
2020-05-10fix another doc error (pixelsx - thanks @theacodes)Roy Hooper
2020-05-10Fix docs some moreRoy Hooper
2020-05-10Minor fixes to _pixelbuf.PixelBuf docsRoy Hooper
2020-05-08Update wheel to colorwheel and fix RGB order.Kattni Rembor
2020-05-08Update colorwheel from GRB to RGB.Kattni Rembor
2020-05-06Fix type in RTC documentation.spkuehl
2020-05-06aesio: add basic AES encryption and decryptionSean Cross
This adds initial support for an AES module named aesio. This implementation supports only a subset of AES modes, namely ECB, CBC, and CTR modes. Example usage: ``` >>> import aesio >>> >>> key = b'Sixteen byte key' >>> cipher = aesio.AES(key, aesio.MODE_ECB) >>> output = bytearray(16) >>> cipher.encrypt_into(b'Circuit Python!!', output) >>> output bytearray(b'E\x14\x85\x18\x9a\x9c\r\x95>\xa7kV\xa2`\x8b\n') >>> ``` This key is 16-bytes, so it uses AES128. If your key is 24- or 32- bytes long, it will switch to AES192 or AES256 respectively. This has been tested with many of the official NIST test vectors, such as those used in `pycryptodome` at https://github.com/Legrandin/pycryptodome/tree/39626a5b01ce5c1cf51d022be166ad0aea722177/lib/Crypto/SelfTest/Cipher/test_vectors/AES CTR has not been tested as NIST does not provide test vectors for it. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-04trivial change to force rebuildDan Halbert
2020-05-04address review commentsDan Halbert
2020-05-04make translate againDan Halbert
2020-05-04add PacketBuffer .incoming_ and .outgoing_packet_lengthDan Halbert
2020-05-01Merge pull request #2838 from spkuehl/UART_sharedbinding_fixScott Shawcroft
Fix #2814 Corrected UART output.
2020-04-30Corrected UART output.spkuehl
2020-04-30PacketBuffer doc fixesDan Halbert
2020-04-29further cleanup and bug fixingDan Halbert
2020-04-29Merge remote-tracking branch 'adafruit/master' into ringbuf-fixesDan Halbert
2020-04-29back to '.packet_size' for compatiblityDan Halbert
2020-04-29rename and improve PacketBuffer packet length propertyDan Halbert
2020-04-27Merge remote-tracking branch 'adafruit/master' into lower_powerScott Shawcroft
2020-04-22ulab: Update from upstreamJeff Epler
Closes: #2787
2020-04-21merge from adafruitDan Halbert
2020-04-21further ringbuf cleanupDan Halbert
2020-04-21displayio: Fix "bus type" problem introduced at 8cba145c9029Jeff Epler
When allocate_display_bus_or_raise was factored out, the assignment of the bus's Python type was lost. Restore it. This would have affected displays of any type other than RGBMatrix, when they were created dynamically. Boards with displays configured in flash were unaffected. Closes: #2792
2020-04-20Merge remote-tracking branch 'adafruit/master' into lower_powerScott Shawcroft
This isn't perfect and needs a bit more testing.
2020-04-19RGBMatrix: nonessential change to kick ActionsJeff Epler
2020-04-17framebufferio: update copyright informationJeff Epler
2020-04-17RGBMatrix: this comment no longer describes the codeJeff Epler
... allocate_display_bus_or_raise() uses fixed storage, not heap storage.
2020-04-17RGBMatrix: documentation got behind the codeJeff Epler
2020-04-17RGBMatrix: finish renaming from ProtomatterJeff Epler
This gets all the purely internal references. Some uses of protomatter/Protomatter/PROTOMATTER remain, as they are references to symbols in the Protomatter C library itself.
2020-04-17RGBMatrix: remove unneeded propertiesJeff Epler
2020-04-17framebufferio: get width, etc., from protocol, not object propertyJeff Epler
2020-04-17Rename Protomatter -> RGBMatrixJeff Epler
This is a quick rename, it changes the user-facing names but not the internal names of things.
2020-04-17protomatter: move get_width/height to common_halJeff Epler
2020-04-17fix doc buildJeff Epler
2020-04-17framebufferio: get more properties direct from underlying framebufferJeff Epler
2020-04-17Rename _protomatter -> protomatterJeff Epler
I originally believed that there would be a wrapper library around it, like with _pixelbuf; but this proves not to be the case, as there's too little for the library to do.
2020-04-17framebufferio: get width, height from framebuffer propertiesJeff Epler
2020-04-17Protomatter: add width, height propertiesJeff Epler
2020-04-14Merge remote-tracking branch 'adafruit/master' into lower_powerScott Shawcroft
2020-04-14Protomatter: Make all arguments kw-only, add rgb count and optional height ↵Jeff Epler
checking They're not readily distinguishable by type. I also added the requested height optional parameter; this is checked against the computed one. It's not feasible to use this parameter to artificailly reduce the number of used rows, because changes in the underlying C protomatter library would be required. Finally, I added a better error message when the number of RGB pins was not what was expected.
2020-04-14protomatter: Respond to review commentsJeff Epler
- rename oe_pin -> output_enable_pin - improve and reorganize docstrings - rename swapbuffers->refresh - rename "paused" -> "brightness", change semantics slightly - common_hal several functions - clarify why the common_hal routines can't be used directly in the protocol's function pointers - whitespace cleanups - remove prototypes for nonexistent functions
2020-04-14protomatter: clarify by comment why these functions existJeff Epler
2020-04-14framebufferio: move backlight down to the underlying framebufferJeff Epler
2020-04-14protomatter: code styleJeff Epler
2020-04-14protomatter: validate pins to give better error messageJeff Epler
The numbered error from the underlying library is not helpful for beginning users
2020-04-14protomatter: improve an error messageJeff Epler
2020-04-14FramebufferDisplay: remove probably not needed constructor argumentsJeff Epler
2020-04-14protomatter: make docstring match implementationJeff Epler