| Age | Commit message (Collapse) | Author |
|
This can be enforced by pre-commit, but correct it separately to make it easier to review.
|
|
|
|
|
|
|
|
|
|
More efficient translation
|
|
* Fix flash writes that don't end on a sector boundary. Fixes #2944
* Fix enum incompatibility with IDF.
* Fix printf output so it goes out debug UART.
* Increase stack size to 8k.
* Fix sleep of less than a tick so it doesn't crash.
|
|
|
|
Length was stored as a 16-bit number always. Most translations have
a max length far less. For example, US English translation lengths
always fit in just 8 bits. probably all languages fit in 9 bits.
This also has the side effect of reducing the alignment of
compressed_string_t from 2 bytes to 1.
testing performed: ran in german and english on pyruler, printed messages
looked right.
Firmware size, en_US
Before: 3044 bytes free in flash
After: 3408 bytes free in flash
Firmware size, de_DE (with #2967 merged to restore translations)
Before: 1236 bytes free in flash
After: 1600 bytes free in flash
|
|
This reverts commit 561e7e619095869f58fc728d428f3ff20e8bfc40.
|
|
This refactors the WatchDogTimer API to use the format proposed in
https://github.com/adafruit/circuitpython/pull/2933#issuecomment-632268227
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This adds an exception to be raised when the WatchDogTimer times out.
Note that this currently causes a HardFault, and it's not clear why it's
not behaving properly.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This also places it under the `microcontroller` object.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
This adds shared bindings for a watchdog timer, based on the API
provided by micropython.
Signed-off-by: Sean Cross <sean@xobs.io>
|
|
|
|
|
|
Add bytearray.decode() for CPython compatibility
|
|
Basic blinky works but doesn't check pins.
|
|
|
|
CPython has a `decode()` method on `bytearray`. This adds that method using the code from `bytes.decode`.
Test program:
```python
byte_boi = bytes([0x6D, 0x65, 0x65, 0x70])
print(byte_boi) # b'meep'
byte_boi_str = byte_boi.decode("utf-8")
print(byte_boi_str) # meep
byte_array_boi = bytearray(byte_boi)
print(byte_array_boi) # bytearray(b'meep')
byte_array_boi_str = byte_array_boi.decode("utf-8")
print(byte_array_boi_str) # meep
print(byte_array_boi_str == byte_boi_str) # True
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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.
|
|
|
|
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
|
|
|
|
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ulab: actually update the submodule
|
|
|
|
PR#2802 missed the submodule update itself.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
This isn't perfect and needs a bit more testing.
|