Commit Graph

896 Commits

Author SHA1 Message Date
dherrada
c534a872a2
Merge branch 'master' into master 2020-05-12 12:26:02 -04:00
dherrada
6490137812
Did usb_hid, usb_midi, ustack, wiznet 2020-05-12 12:08:46 -04:00
dherrada
e4589543fb
Did time, touchio, uheap 2020-05-12 11:43:24 -04:00
dherrada
991045b9ce
Did struct, supervisor, terminalio 2020-05-12 11:28:33 -04:00
Scott Shawcroft
1b0c52c8ca
Merge pull request #2877 from rhooper/pixelbuf-doc-fix
Pixelbuf doc fix
2020-05-11 15:42:33 -07:00
dherrada
603df58f97
Did stage, socket, storage 2020-05-11 13:40:02 -04:00
dherrada
c7a9d49cba
Did rgbmatrix, rotaryio, and RTC 2020-05-11 13:00:19 -04:00
dherrada
838b6c5685
Did ps2io, pulseio, random 2020-05-11 10:48:11 -04:00
warriorofwire
eb3d5fa453 ujson: do not eat trailing whitespace
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-10 20:45:42 -07:00
Roy Hooper
09fedb3fd5 fix another doc error (pixelsx - thanks @theacodes) 2020-05-10 21:35:37 -04:00
Roy Hooper
70f2ef3f8e Fix docs some more 2020-05-10 19:50:10 -04:00
Roy Hooper
2f7c0ec8e4 Minor fixes to _pixelbuf.PixelBuf docs 2020-05-10 16:22:01 -04:00
dherrada
09530e5dc3
Did os, _pixelbuf, _pew 2020-05-08 16:03:39 -04:00
Kattni Rembor
a83d1d7b4b Update wheel to colorwheel and fix RGB order. 2020-05-08 14:44:41 -04:00
Kattni Rembor
37e5ff7757 Update colorwheel from GRB to RGB. 2020-05-08 13:25:52 -04:00
dherrada
d750096bef
Did neopixel, network, nvm 2020-05-07 18:40:46 -04:00
dherrada
e31e9eeaa1
Did math, microcontroller, and multiterminal 2020-05-07 15:59:52 -04:00
dherrada
4f33a20d17
Added gamepad, gamepadshift, and i2cslave 2020-05-07 15:10:44 -04:00
dherrada
a3d5adb43c
Did _eve, fontio, framebufferio, and frequencyio 2020-05-07 11:56:46 -04:00
dherrada
2ebe3035df
Did board, digitalio, displayio 2020-05-07 10:54:09 -04:00
spkuehl
af55af216a Fix type in RTC documentation. 2020-05-06 14:11:11 -05:00
Sean Cross
b168784fa0 aesio: add basic AES encryption and decryption
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
39626a5b01/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-06 17:40:06 +08:00
Dan Halbert
e1366d78b1 trivial change to force rebuild 2020-05-04 23:05:47 -04:00
Dan Halbert
b7836aeac6 address review comments 2020-05-04 19:51:08 -04:00
Dan Halbert
bae7a5e433 make translate again 2020-05-04 17:26:59 -04:00
Dan Halbert
d6c6f9f4f0 add PacketBuffer .incoming_ and .outgoing_packet_length 2020-05-04 15:59:45 -04:00
dherrada
0e465e63b9
Did audiopwmio, bitbangio, and _bleio 2020-05-01 18:23:27 -04:00
Scott Shawcroft
242063e1d0
Merge pull request #2838 from spkuehl/UART_sharedbinding_fix
Fix #2814 Corrected UART output.
2020-05-01 11:05:24 -07:00
spkuehl
a3a2dd0f70 Corrected UART output. 2020-04-30 19:14:51 -05:00
dherrada
d65e851044
Did audioio, audiomixer, audiomp3 2020-04-30 13:06:09 -04:00
Dan Halbert
46298ddcb4 PacketBuffer doc fixes 2020-04-30 00:36:01 -04:00
Dan Halbert
f3078511a6 further cleanup and bug fixing 2020-04-29 23:18:08 -04:00
Dan Halbert
180f5c6a94 Merge remote-tracking branch 'adafruit/master' into ringbuf-fixes 2020-04-29 22:11:22 -04:00
Dan Halbert
3d62f87e29 back to '.packet_size' for compatiblity 2020-04-29 22:10:56 -04:00
Dan Halbert
84cee1ab8d rename and improve PacketBuffer packet length property 2020-04-29 17:49:31 -04:00
dherrada
7ff9b9bc80
Did first 3 2020-04-29 17:36:28 -04:00
dherrada
a2a32fea1a
Added newlines after every ellipsis 2020-04-29 15:55:06 -04:00
dherrada
093461e816
Fixed indentation 2020-04-29 15:45:19 -04:00
dherrada
deccdcc1d6
Did the same for the rest of busio 2020-04-29 15:20:05 -04:00
dherrada
93d1e53c66
Hopefully fixed whitespace issues 2020-04-29 14:19:04 -04:00
dherrada
c7b721f4f1
Fixed some more whitespace 2020-04-28 19:22:03 -04:00
dherrada
aacca61598
Fixed whitespace on audiocore 2020-04-28 18:56:19 -04:00
dherrada
c3897d0add
Fixed whitespace in analogio 2020-04-28 18:43:40 -04:00
dherrada
724dcda3ec
Fixed whitespace in busio 2020-04-28 18:39:58 -04:00
Scott Shawcroft
755d404edf
Merge remote-tracking branch 'adafruit/master' into lower_power 2020-04-27 16:45:10 -07:00
dherrada
829da5c127
Added inline pyi to audiomp3 2020-04-27 17:29:50 -04:00
dherrada
8330471068
Added inline pyi to audiomixer 2020-04-27 17:20:40 -04:00
dherrada
1363e6e724
Added inline pyi to audiocore 2020-04-27 17:02:48 -04:00
dherrada
088b5b1785
Added inline pyi to audiocore 2020-04-27 16:49:12 -04:00
dherrada
e96235d0cf
Added inline pyi to audiobusio 2020-04-27 16:35:03 -04:00