summaryrefslogtreecommitdiff
path: root/py
AgeCommit message (Collapse)Author
2020-06-26sdioio: Add shared-bindingsJeff Epler
There is no implementation yet.
2020-06-26sdcardio: implement new library for SD card I/OJeff Epler
Testing performed: That a card is successfully mounted on Pygamer with the built in SD card slot This module is enabled for most FULL_BUILD boards, but is disabled for samd21 ("M0"), litex, and pca10100 for various reasons.
2020-06-25I2CPeripheral: Rename class and its moduleJeff Epler
This is an incompatible change.
2020-06-24gnss: Implement new library for GNSSKamil Tomaszewski
2020-06-22circuitpy_defns.mk: Sort several lists of source filesJeff Epler
and regularize whitespace in one spot
2020-06-22_pew: move to common-halJeff Epler
I noticed that this code was referring to samd-specific functionality, and isn't enabled except in one samd board (pewpew10). Move it. There is incomplte support for _pew in mimxrt10xx which then caused build errors; adding a #if guard to check for _pew being enabled fixes it. The _pew module is not likely to be important on mimxrt but I'll leave the choice to remove it to someone else.
2020-06-03Fix up end of file and trailing whitespace.Diego Elio Pettenò
This can be enforced by pre-commit, but correct it separately to make it easier to review.
2020-06-01Merge remote-tracking branch 'adafruit/master' into wdt-nrfScott Shawcroft
2020-06-01py.mk: Assume we want all C source files in ulabJeff Epler
2020-06-01py.mk: Assume we want all C files from ulabJeff Epler
2020-05-29Merge remote-tracking branch 'adafruit/master' into wdt-nrfScott Shawcroft
2020-05-28Merge pull request #2968 from jepler/more-efficient-translationDan Halbert
More efficient translation
2020-05-28A number of small ESP32S2 fixes:Scott Shawcroft
* 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.
2020-05-28translations: document the compressed formatJeff Epler
2020-05-28string compression: save a few bits per stringJeff Epler
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
2020-05-27Revert "add WatchDogTimeout exception"Sean Cross
This reverts commit 561e7e619095869f58fc728d428f3ff20e8bfc40.
2020-05-27watchdogtimer: refactor to new apiSean Cross
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>
2020-05-27add WatchDogTimeout exceptionSean Cross
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>
2020-05-27watchdog: rename module from `wdt` and move to `microcontroller`Sean Cross
This also places it under the `microcontroller` object. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-27wdt: add watchdog supportSean Cross
This adds shared bindings for a watchdog timer, based on the API provided by micropython. Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-19Remove reverse methods from per-board defsScott Shawcroft
2020-05-18Merge remote-tracking branch 'adafruit/master' into esp32s2Scott Shawcroft
2020-05-18Merge pull request #2896 from theacodes/add-bytearray-decodeScott Shawcroft
Add bytearray.decode() for CPython compatibility
2020-05-15Initial ESP32S2 port.Scott Shawcroft
Basic blinky works but doesn't check pins.
2020-05-15Make decode only apply to bytearray and not array as wellThea Flowers
2020-05-14Add bytearray.decode() for CPython compatibilityThea Flowers
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 ```
2020-05-13Merge remote-tracking branch 'adafruit/master' into improve_verificationScott Shawcroft
2020-05-12Don't build in empty help.cScott Shawcroft
2020-05-12Only enable COUNTIO in full buildsScott Shawcroft
2020-05-12Merge branch 'master' into Optical-Encoder-ModuleScott Shawcroft
2020-05-12Enable vectorio by default where displayio is enabledwarriorofwire
2020-05-12merged masterDaniel Pollard
2020-05-11set vectorio to FULL_BUILD and see what workswarriorofwire
2020-05-09vectorio: fix mpconfig definition for disabled boardswarriorofwire
2020-05-09Add vectorio: for drawing shapeswarriorofwire
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-09removed duplicate build paramDaniel Pollard
2020-05-08Update py/circuitpy_mpconfig.mkDaniel Pollard
Co-authored-by: Scott Shawcroft <scott@tannewt.org>
2020-05-07updated descriptions and build variableDaniel Pollard
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-06changed build variables as per adviceDaniel Pollard
2020-05-05refactor countio based on feedbackDaniel Pollard
2020-05-04make translate againDan Halbert
2020-04-29change many ifndefs to ?=Dan Halbert
2020-04-29Merge remote-tracking branch 'adafruit/master' into ringbuf-fixesDan Halbert
2020-04-27Merge remote-tracking branch 'adafruit/master' into lower_powerScott Shawcroft
2020-04-27Merge pull request #2811 from jepler/update-ulabScott Shawcroft
ulab: actually update the submodule
2020-04-27Merge remote-tracking branch 'adafruit/master' into lower_powerScott Shawcroft
2020-04-26ulab: actually update the submoduleJeff Epler
PR#2802 missed the submodule update itself.
2020-04-23Minor redundancy fixLucian Copeland
2020-04-23Merge remote-tracking branch 'upstream/master' into stm32-docfixLucian Copeland