Commit Graph

3154 Commits

Author SHA1 Message Date
Scott Shawcroft a9419b5d46
Update ESP IDF 2020-05-28 15:38:48 -07:00
Scott Shawcroft 0db8b888d3
Merge pull request #2934 from hierophect/mimxrt-uart-oneway
mimxrt10xx: add one-directional UART
2020-05-27 10:38:00 -07:00
Lucian Copeland 9f5520135c translations 2020-05-27 11:54:52 -04:00
Lucian Copeland a25e10ed59 Merge branch 'mimxrt-uart-oneway' of https://github.com/hierophect/circuitpython into mimxrt-uart-oneway 2020-05-27 11:49:11 -04:00
Lucian Copeland 1e914ac2b0 Change exception text and type 2020-05-27 11:48:52 -04:00
Dan Halbert d06a7c4671
Correct HiiBot BlueFi USB_PID
Donated a PID set for HiiBot BlueFi.
2020-05-27 11:47:15 -04:00
arturo182 ad988013f0
Merge pull request #2961 from arturo182/i2c-exception
mimxrt10xx: Change exception type to match other ports
2020-05-27 11:24:46 +02:00
Dan Halbert 3574670226
Merge pull request #2931 from tannewt/esp32s2_digitalio
Finish digitalio and pin use tracking for ESP32S2
2020-05-26 19:18:45 -04:00
Scott Shawcroft c917270da7
Merge pull request #2956 from hathach/fix-samd-wfi
fix racing issue for SAMD when executing WFI
2020-05-26 14:54:24 -07:00
Scott Shawcroft ffe0e0edc3
Merge pull request #2938 from DavePutz/issue2894
Add an increment to tcc_refcount to allow deinit to work correctly
2020-05-26 14:39:59 -07:00
arturo182 d6c59c4de0 mimxrt10xx: Change exception type to match other ports 2020-05-26 22:36:30 +02:00
Scott Shawcroft 665fe7a839
Merge pull request #2945 from pewpew-game/fluff_m0
Add support for Fluff M0
2020-05-26 13:18:55 -07:00
Scott Shawcroft 2ffd70417d
Merge remote-tracking branch 'adafruit/master' into esp32s2_digitalio 2020-05-26 13:09:57 -07:00
Dan Halbert 19f0d82048
Merge pull request #2955 from BradChan/master
Add hiibot_bluefi board definitions
2020-05-26 15:37:35 -04:00
Radomir Dopieralski 4974c933b1 Fix swapped SCK and MISO in Fluff M0 2020-05-26 03:29:05 +02:00
Dan Halbert f1436410bd
Merge pull request #2951 from jepler/remove-modules-to-fit-translations
Remove modules to fit translations
2020-05-25 09:51:57 -04:00
hathach e79340601f fix racing issue for SAMD when executing WFI 2020-05-25 20:51:02 +07:00
Jeff Epler 5cffd7e88d trinket_m0_haxpress: disable RTC to make build fit with upcoming translations 2020-05-23 20:48:38 -05:00
Jeff Epler eb85304d04 escornabot: disable RTC to make build fit with upcoming translations 2020-05-23 20:48:38 -05:00
Jeff Epler 03866c0598 meowmeow: disable modules to make build fit with upcoming translations 2020-05-23 20:41:25 -05:00
Jeff Epler 2ed40075a5 pyruler: disable RTC to make build fit with upcoming translations 2020-05-23 20:36:33 -05:00
Radomir Dopieralski 4c01ddcbab Add support for Fluff M0 2020-05-22 18:51:12 +02:00
hierophect fe10a45533
Merge branch 'master' into mimxrt-uart-oneway 2020-05-22 11:32:41 -04:00
Lucian Copeland 75b5142954 Minor style changes and translations 2020-05-22 11:31:52 -04:00
jerryneedell 93df3b89e8 allow PORT specifcation for esp32s2 flashing 2020-05-22 09:54:29 -04:00
DavePutz 2e05f628f0
Add an increment to tcc_refcount to allow deinits to work properly 2020-05-21 11:08:26 -05:00
Scott Shawcroft 3bb6a32a20
Merge branch 'master' into esp32s2_digitalio 2020-05-21 08:52:39 -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
jason 4f54514be4 Initial version 2020-05-20 21:11:06 -05: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 a43876ad1e
Fix esp wrover 2020-05-20 11:37:29 -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
Scott Shawcroft ba724fffb4
Merge remote-tracking branch 'adafruit/master' into esp32s2_digitalio 2020-05-20 10:48:27 -07:00
Lucian Copeland 66c09efae2 Add UART one-way instance search, fix bugs in stm32 implementation 2020-05-20 12:48:01 -04:00
Scott Shawcroft fd0420d432
Update digitalio api for other ports 2020-05-20 09:23:42 -07: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 80517c4cf6
First try at critical section support 2020-05-19 17:49:17 -07:00
Scott Shawcroft 49090d1378
Fully implement digitalio and pin-in-use tracking.
Fixes #2901
2020-05-19 17:46:29 -07: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
Scott Shawcroft acf4b1bede
Remove reverse methods from per-board defs 2020-05-19 11:43:57 -07: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
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 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