Commit Graph

16036 Commits

Author SHA1 Message Date
Lucian Copeland 53fb699436 Add pin resetting across boards, fix array size detection issue 2020-05-27 11:45:15 -04:00
Lucian Copeland d95022f7bb Merge remote-tracking branch 'upstream/master' into mimxrt-busio-cleanup 2020-05-22 13:33:08 -04:00
Lucian Copeland 75b5142954 Minor style changes and translations 2020-05-22 11:31:52 -04:00
Scott Shawcroft eea01c32b8
Merge pull request #2868 from xobs/fix-usb-sleep-nrf
Fix usb sleep for NRF
2020-05-21 10:24:11 -07:00
Sean Cross 67cf005ee5 nrf: nvm: assume sd is not enabled if interrupts are off
If interrupts are disabled, then calling sd_* functions will hardfault.
Instead, assume that it's safe to write if interrupts are disabled.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-21 22:04:20 +08:00
Sean Cross fd4ef233c6 nrf: port: add memory barrier before wfi
ARM recommends issuing a DSB instruction propr to issuing WFI, as it is
required on many parts suchas Cortex-M7. This is effectively a no-op on
the Cortex-M4 used in most NRF parts, however it ensures that we won't
be surprised when new parts come out.

See
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dai0321a/BIHICBGB.html
for more information.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-21 21:46:37 +08:00
Sean Cross 77cf4dce8f nrf: disable interrupts before running wfi
In order to ensure we don't have any outstanding requests, disable
interrupts prior to issuing `WFI`.

As part of this process, check to see if there are any pending USB
requests, and only execute the `WFI` if there is no pending data.

This fixes #2855 on NRF.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-21 21:43:52 +08:00
Sean Cross d1a7fdd9d4 supervisor: support debugging tinyusb
Allow for passing `-DCFG_TUSB_DEBUG=1` or `-DCFG_TUSB_DEBUG=2` on the
command line to enable debugging tinyusb within circuitpython.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-21 21:35:30 +08:00
Sean Cross 5ed4e4d0ab lib: tinyusb: update to get tud_task_is_queue_empty
This update gives us access to a function we can run with interrupts
disabled to determine if the queue is empty.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-21 21:34:44 +08:00
Dan Halbert edc5d8938e
Merge pull request #2937 from jpecor/evo_m51
Add support for Alorium Technology Evo M51 board
2020-05-21 08:57:39 -04:00
jason 4f54514be4 Initial version 2020-05-20 21:11:06 -05:00
Jeff Epler 54a38fdf01
Merge pull request #2936 from dunkmann00/pixelbuf-slice-fix
Fix error when getting a pixelbuf slice
2020-05-20 19:15:10 -05:00
Jeff Epler 709d3230a5
Merge pull request #2935 from weblate/weblate-circuitpython-master
Translations update from Weblate
2020-05-20 19:12:08 -05:00
George Waters 02d0881fca
Fix error when getting a pixelbuf slice 2020-05-20 17:56:08 -04:00
Jonny Bergdahl cee4286637 Translated using Weblate (Swedish)
Currently translated at 100.0% (747 of 747 strings)

Translation: CircuitPython/master
Translate-URL: https://hosted.weblate.org/projects/circuitpython/master/sv/
2020-05-20 20:39:22 +02:00
Scott Shawcroft c32214ccc7
Merge pull request #2932 from simmel-project/nrf-rtc-reset
nrf: reset rtc as part of port_reset()
2020-05-20 11:39:16 -07:00
Scott Shawcroft 0af5dd59f2
Merge pull request #2898 from hierophect/mimxrt-claiming
MIMXRT: Implement pin claiming, pin reset, and pin protections
2020-05-20 11:32:22 -07:00
Lucian Copeland 42baf0061b translations 2020-05-20 13:28:17 -04:00
Lucian Copeland 66c09efae2 Add UART one-way instance search, fix bugs in stm32 implementation 2020-05-20 12:48:01 -04:00
Sean Cross 4cca455c9b nrf: reset rtc as part of port_reset()
On NRF, the `rtc_reset()` function is never called.  As a result,
calls to `time.time()` return a cryptic error>

```
>>> import time
>>> time.time()
'' object has no attribute 'datetime'
>>>
```

This is because `MP_STATE_VM(rtc_time_source)` is not initialized
due to `rtc_reset()` never being called.

If `CIRCUITPY_RTC` is enabled, call `rtc_reset()` as part of the
`reset_port()` call. This ensures that `time.time()` works as expected.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-20 16:44:18 +08:00
Scott Shawcroft 916ca9f8a6
Merge pull request #2910 from tannewt/esp32s2
Add initial ESP32S2 support
2020-05-19 12:53:23 -07:00
Lucian Copeland 38fd9c25f2 Re-add APA102 2020-05-19 15:33:34 -04:00
sommersoft bdc5a6b7c0
Merge pull request #2928 from tannewt/fix_rtd_autoapi
Fix ReadTheDocs after switching to stubs + autoapi.
2020-05-19 14:19:52 -05:00
Scott Shawcroft acf4b1bede
Remove reverse methods from per-board defs 2020-05-19 11:43:57 -07:00
Jeff Epler 09abd3d95d
Merge pull request #2927 from weblate/weblate-circuitpython-master
Translations update from Weblate
2020-05-19 13:27:03 -05:00
Lucian Copeland b310b04007 Remove pin/port distinction 2020-05-19 14:20:07 -04:00
Scott Shawcroft 9eb85a5feb
shrink Xinabox CS11 by turning off unused pins 2020-05-19 10:55:02 -07:00
Lucian Copeland 2acd173e14 Implement core requested changes 2020-05-19 13:54:47 -04:00
Hosted Weblate dbb304f4cf
Update translation files
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: CircuitPython/master
Translate-URL: https://hosted.weblate.org/projects/circuitpython/master/
2020-05-19 19:40:03 +02:00
Scott Shawcroft 1d77000c19
Update doc deps 2020-05-19 10:30:47 -07:00
Dustin Watts f874e21ad7 Translated using Weblate (Dutch)
Currently translated at 52.5% (392 of 746 strings)

Translation: CircuitPython/master
Translate-URL: https://hosted.weblate.org/projects/circuitpython/master/nl/
2020-05-19 19:08:30 +02:00
Dustin Watts bbe6ed5319 Translated using Weblate (Dutch)
Currently translated at 5.3% (40 of 746 strings)

Translation: CircuitPython/master
Translate-URL: https://hosted.weblate.org/projects/circuitpython/master/nl/
2020-05-19 19:08:30 +02:00
Dustin Watts ebea4d158d Translated using Weblate (Dutch)
Currently translated at 4.9% (37 of 746 strings)

Translation: CircuitPython/master
Translate-URL: https://hosted.weblate.org/projects/circuitpython/master/nl/
2020-05-19 19:08:30 +02:00
Jeff Epler 2f3a6773fc Added translation using Weblate (Dutch) 2020-05-19 19:08:30 +02:00
Scott Shawcroft 4e5df0e36d
Merge pull request #2919 from simmel-project/bleio-anonymous-advertising
_bleio: support anonymous advertising
2020-05-19 10:08:18 -07:00
Sean Cross c1bcc25b88 nrf: _bleio: clean up timeout calculation
The timeout value is calculated by the common-hal layer now, so we don't
need to be quite so clever about calculating it here.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-19 21:56:39 +08:00
Sean Cross f56188c261 locale: regenerate translations for new bleio msg
There is now an adapter timeout message.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-19 15:01:38 +08:00
Sean Cross 34f91f01c6 bleio: adapter: add advertising timeout and status
Add a field to allow specifying a timeout when initiating advertising.
As part of this, add a new property to determine if the device is still
advertising.

Additionally, have the `anonymous` property require a timeout, and set
the timeout to the maximum possible value if no timeout is specified.

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-19 15:01:19 +08:00
Sean Cross cfe65742a3 _bleio: support anonymous advertising
Add a new parameter to the `start_advertising()` function to enable
anonymous advertising.  This forces a call to `sd_ble_gap_privacy_set()`
with `privacy_mode` set to `BLE_GAP_PRIVACY_MODE_DEVICE_PRIVACY` and
`private_addr_type` set to
`BLE_GAP_ADDR_TYPE_RANDOM_PRIVATE_RESOLVABLE`.

With this, addresses will cycle at a predefined rate (currently once
every 15 minutes).

Signed-off-by: Sean Cross <sean@xobs.io>
2020-05-19 15:01:18 +08:00
Scott Shawcroft 2c2b53303d
Merge pull request #2837 from k0d/serial-debug
Add support for a debug console, such as ST-Link VCP.
2020-05-18 18:13:31 -07:00
Scott Shawcroft 03b6f7b87b
Add commend about FreeRTOS stack canary 2020-05-18 17:28:13 -07:00
Scott Shawcroft 164628282d
Update TinyUSB and shorten USB task delay 2020-05-18 17:27:49 -07:00
Mark Olsson 007c92ee6a Enable showing the console on a debug uart 2020-05-19 02:02:52 +02:00
Scott Shawcroft cf690bd390
Merge remote-tracking branch 'adafruit/master' into esp32s2 2020-05-18 16:46:41 -07:00
Scott Shawcroft 1e9436519b
Fix ReadTheDocs after switching to stubs + autoapi. 2020-05-18 16:29:15 -07:00
Scott Shawcroft 32617d5f2f
Merge pull request #2925 from arturo182/imx-spi
mimxrt1010: Increase max SPI speed
2020-05-18 15:22:42 -07:00
Scott Shawcroft ebfc1f2599
Merge pull request #2926 from arturo182/imx-temperature-fix
mimxrt10xx: Fix cpu.temperature crash
2020-05-18 15:20:21 -07:00
Scott Shawcroft 962c320adf
Merge pull request #2917 from jepler/weblate-readme
add weblate status badge in readme
2020-05-18 15:17:00 -07:00
Scott Shawcroft af68ddebef
Merge pull request #2924 from simmel-project/nrf-rtc-persist
NRF: Persist RTC offset across reboots
2020-05-18 15:06:42 -07:00
Scott Shawcroft 9811c1fe4b
Merge pull request #2896 from theacodes/add-bytearray-decode
Add bytearray.decode() for CPython compatibility
2020-05-18 14:38:45 -07:00