Commit Graph

917 Commits

Author SHA1 Message Date
dherrada b477c4812d
Fixed minor indentation issue 2020-05-14 16:58:25 -04:00
Scott Shawcroft 3ffa5604fc
Update countio to python stub docs 2020-05-13 08:36:16 -07:00
Scott Shawcroft 7546d47f77
Merge remote-tracking branch 'adafruit/master' into improve_verification 2020-05-13 08:23:55 -07:00
Scott Shawcroft 4e646ee6e4
Move vectorio to stubs 2020-05-12 18:40:02 -07:00
Scott Shawcroft cde6651721
Merge remote-tracking branch 'adafruit/master' into improve_verification 2020-05-12 18:23:59 -07:00
Scott Shawcroft 277e8d528b
Merge branch 'master' into Optical-Encoder-Module 2020-05-12 18:22:57 -07:00
Scott Shawcroft 4e8de3c554
Swap sphinx to autoapi and the inline stubs 2020-05-12 17:28:24 -07:00
Scott Shawcroft d274074f01
Merge remote-tracking branch 'adafruit/master' into vectorio 2020-05-12 12:29:05 -07:00
Scott Shawcroft bc40034a08
Merge branch 'master' into Optical-Encoder-Module 2020-05-12 12:12:51 -07:00
Scott Shawcroft a1091bbfbb
Merge pull request #2871 from DavePutz/Issue2812
Throw a NotImplementedError for time functions on boards without long ints
2020-05-12 11:40:49 -07:00
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
Daniel Pollard 22bf99ccc4 Fixed underline in documentation 2020-05-12 14:52:48 +10:00
Daniel Pollard ee2cb703c8 merged master 2020-05-12 14:41:28 +10:00
warriorofwire 78444a1018 fix VectorShape on_dirty callback registration being set for the wrong type 2020-05-11 21:21:05 -07:00
warriorofwire 040beb0577 Clean up circle documentation 2020-05-11 21:15:40 -07:00
DavePutz 4712f9f104
Merge branch 'master' into Issue2812 2020-05-11 21:48:54 -05: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
warriorofwire 4086600b61 vectorio: switch per-shape transform to Display
Rather than maintain a transform per-shape, we'll just use whatever
  settings are on the Display.  Currently only transpose is done.
2020-05-09 22:15:51 -07:00
warriorofwire 206d0e598a Add vectorio: for drawing shapes
vectorio builds on m4 express feather

Concrete shapes are composed into a VectorShape which is put into a displayio Group for display.

VectorShape provides transpose and x/y positioning for shape implementations.

Included Shapes:

* Circle
  - A radius; Circle is positioned at its axis in the VectorShape.
  - You can freely modify the radius to grow and shrink the circle in-place.

* Polygon
  - An ordered list of points.
  - Beteween each successive point an edge is inferred.  A final edge closing the shape is inferred between the last
    point and the first point.
  - You can modify the points in a Polygon.  The points' coordinate system is relative to (0, 0) so if you'd like a
      top-center justified 10x20 rectangle you can do points [(-5, 0), (5, 0), (5, 20), (0, 20)] and your VectorShape
      x and y properties will position the rectangle relative to its top center point

* Rectangle
  A width and a height.
2020-05-09 15:38:22 -07:00
DavePutz e7fc806034
Throw a NotImplementedError for time functions on boards without long ints
Fix for Issue #2812. Instead of reporting a missing attribute for functions such as time.time() and time.mktime(); platforms that do not have long integer support will raise a NotImplementedError
2020-05-08 16:33:26 -05: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
Daniel Pollard 84c806a4be updated descriptions and build variable 2020-05-07 12:42:46 +10: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
Daniel Pollard 8961dd9fe7 changed build variables as per advice 2020-05-06 09:05:14 +10:00
Daniel Pollard bfa5cd9c13 refactor countio based on feedback 2020-05-05 15:23:38 +10: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