Commit Graph

15821 Commits

Author SHA1 Message Date
Thea Flowers 0876034adb Make decode only apply to bytearray and not array as well 2020-05-15 14:32:44 -07:00
Thea Flowers fe3e8ee02c Add bytearray.decode() for CPython compatibility
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-14 21:52:58 -07:00
Scott Shawcroft bd78ab3c28
Merge pull request #2895 from xobs/aesio-use-bufinfo
aesio: use bufinfo rather than mp_str_bytes
2020-05-14 20:05:21 -07:00
Sean Cross f9ed3acf6d aesio: specify writable buffers for destination buffers
When calling `AES.decrypt_into()` or `AES.encrypt_into()`, the
destination buffers may be any buffer kind.  However, we currently
aren't checking to make sure the destination buffer is actually
writable.

Specify `MP_BUFFER_WRITE` for the destination buffers of both of these
objects so we don't inadvertently write to immutable data.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-15 10:22:42 +08:00
Sean Cross aba36e4abf aesio: use bufinfo rather than mp_str_bytes
In order to accept both `bytes` objects and `bytearray` objects, use a
`bufinfo` construct to retrieve the data rather than
`mp_obj_str_get_data()`.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-15 10:16:00 +08:00
Jeff Epler 0f55f58652
Merge pull request #2892 from weblate/weblate-circuitpython-master
Translations update from Weblate
2020-05-14 09:04:10 -05:00
Jonny Bergdahl 09e740d6ea
Translated using Weblate (Swedish)
Currently translated at 3.7% (28 of 746 strings)

Translation: CircuitPython/master
Translate-URL: https://hosted.weblate.org/projects/circuitpython/master/sv/
2020-05-14 14:41:54 +02:00
Anonymous b446d3eee1
Translated using Weblate (Swedish)
Currently translated at 3.4% (26 of 746 strings)

Translation: CircuitPython/master
Translate-URL: https://hosted.weblate.org/projects/circuitpython/master/sv/
2020-05-14 14:23:15 +02:00
Jonny Bergdahl 3d6a23411f
Translated using Weblate (Swedish)
Currently translated at 3.4% (26 of 746 strings)

Translation: CircuitPython/master
Translate-URL: https://hosted.weblate.org/projects/circuitpython/master/sv/
2020-05-14 14:23:15 +02:00
Scott Shawcroft db4dbe0752
Merge pull request #2889 from jepler/gamepad-tick
Gamepad, GamepadShift: Fix after lower-power by enabling supervisor tick
2020-05-13 11:53:23 -07:00
Jeff Epler adef45403b samd: audio dma: enable/disable supervisor tick as needed 2020-05-13 10:29:36 -05:00
Scott Shawcroft 82fdced180
Merge pull request #2827 from LearnWeaver/Optical-Encoder-Module
Countio
2020-05-13 08:22:57 -07:00
Jeff Epler 23ba58bbf5 Gamepad & GamepadShift: Initially allocate as long-lived
This makes less heap churn and decreases code size a tiny bit
2020-05-13 10:14:37 -05:00
Jeff Epler fbf052bb27 Gamepad & GamepadShift: Enable ticks while object exists
Otherwise, button presses might not be noticed.
2020-05-13 10:14:37 -05:00
Scott Shawcroft 4612270f98
Only enable COUNTIO in full builds 2020-05-12 19:00:51 -07:00
Scott Shawcroft 80129c5a21
Disable countio on trinket haxpress 2020-05-12 18:55:49 -07:00
Scott Shawcroft 277e8d528b
Merge branch 'master' into Optical-Encoder-Module 2020-05-12 18:22:57 -07:00
Scott Shawcroft 75f9969860
Merge pull request #2873 from WarriorOfWire/vectorio
Add vectorio: for drawing shapes
2020-05-12 17:24:35 -07:00
warriorofwire 5a80f5e606 nerf vectorio on a ton of m0 and overcommitted m4 boards due to translation text size 2020-05-12 15:23:00 -07:00
Kenny 8a9579c7a5
Merge pull request #1 from tannewt/vectorio
Merge in master
2020-05-12 12:33:57 -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 f7303e6bd0
Merge pull request #2754 from maholli/non-standard-nvm
Add non-standard nvm to QSPI for external flash support
2020-05-12 11:56:33 -07:00
warriorofwire fd94c08cf4 add performance measurement to VectorShape 2020-05-12 11:49:15 -07:00
warriorofwire 6aa9709d98 make Circle return explicit 2020-05-12 11:47:19 -07:00
warriorofwire 5af59cbabe Enable vectorio by default where displayio is enabled 2020-05-12 11:46:04 -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
Scott Shawcroft 6c5874c5a5
Merge pull request #2869 from simmel-project/simmel
NRF: Minor Simmel fixes
2020-05-12 11:37:06 -07:00
Daniel Pollard 62bdfb74e3 removed lib from catwan_usbstick - updated transalations overflowed 2020-05-12 16:40:23 +10:00
Daniel Pollard c00f81c0a3 changed branch on protomatter 2020-05-12 16:33:09 +10:00
Daniel Pollard 5e5461e77e removed countio from catwan_usbstick build 2020-05-12 16:32:35 +10: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
warriorofwire cfd0de9c11 set vectorio to FULL_BUILD and see what works 2020-05-11 21:08:58 -07:00
DavePutz 4712f9f104
Merge branch 'master' into Issue2812 2020-05-11 21:48:54 -05:00
DavePutz ebcda59e53
Adding message for reporting of no long integers
Adding a message for the fix of issue #2812
2020-05-11 21:40:25 -05:00
root f446f6c2ee Adding message 2020-05-11 21:27:49 -05:00
Sean Cross ffaeeda749 nrf: simmel: decrease flash filesystem size
The flash filesystem must be reduced in order to allow the current
build to fit.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-12 09:31:51 +08:00
Sean Cross f7fcd43516 nrf: simmel: disable SPIM3
Disable the SPIM3 controller to avoid needing to dedicate 8 kB to
the SPIM3 block.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-12 09:31:51 +08:00
Sean Cross 370fc7293a nrf: support disabling SPIM3
SPIM3 is faster than all other SPI blocks, and is capable of generating
a 32 MHz clock.  However, it cannot be used at the same time as the BLE
radio without dedicating an additional 8 kB of RAM to it.

Therefore, some boards may want to disable this.  Support pre-defining
NRFX_SPIM3_ENABLED on the command line to disable it on some bords.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-12 09:31:51 +08:00
Sean Cross 79c055f958 nrf: simmel: enable aesio
This adds AES support to simmel.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-12 09:31:51 +08:00
Sean Cross 235098efb8 nrf: simmel: correct CSn pin
The CSn pin is pin 6 on bank 1, not bank 0.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-12 09:31:51 +08:00
Scott Shawcroft 62b835ad76
Merge pull request #2833 from xiongyihui/pitaya-go
add nRF52840 based Makerdiary Pitaya Go
2020-05-11 16:34:27 -07:00
Scott Shawcroft 4937d5f1ca
Merge pull request #2866 from hierophect/stm32-lsetimeout
STM32: Fix LSE hang at startup
2020-05-11 16:23:09 -07:00
Scott Shawcroft 1b0c52c8ca
Merge pull request #2877 from rhooper/pixelbuf-doc-fix
Pixelbuf doc fix
2020-05-11 15:42:33 -07:00
Scott Shawcroft 55f78bfb70
Merge pull request #2878 from WarriorOfWire/ujson-stream-protocol
ujson: work with mp stream protocol for fast & easy read
2020-05-11 15:40:27 -07:00
Scott Shawcroft 801d9655e5
Merge pull request #2881 from DavePutz/Issue2872
Added call to rtc_reset() to fix Issue #2872
2020-05-11 15:30:32 -07:00
Lucian Copeland 94949fb46f Add recovery domain write access, adjust stack 2020-05-11 18:02:40 -04:00