Commit Graph

6 Commits

Author SHA1 Message Date
Scott Shawcroft ae30a1e5aa
Refine _bleio
This PR refines the _bleio API. It was originally motivated by
the addition of a new CircuitPython service that enables reading
and modifying files on the device. Moving the BLE lifecycle outside
of the VM motivated a number of changes to remove heap allocations
in some APIs.

It also motivated unifying connection initiation to the Adapter class
rather than the Central and Peripheral classes which have been removed.
Adapter now handles the GAP portion of BLE including advertising, which
has moved but is largely unchanged, and scanning, which has been enhanced
to return an iterator of filtered results.

Once a connection is created (either by us (aka Central) or a remote
device (aka Peripheral)) it is represented by a new Connection class.
This class knows the current connection state and can discover and
instantiate remote Services along with their Characteristics and
Descriptors.

Relates to #586
2019-10-21 18:57:03 -07:00
Dan Halbert 2459eabd66 flush flash filesystem once a second 2019-03-20 12:21:36 -04:00
Roy Hooper 06b6a10a5e switch autoreload to reloadexception 2018-05-14 17:44:50 -04:00
Roy Hooper 698912633f Rename reload_next_character to reload_requested to make it match it's intended use 2018-05-14 17:00:38 -04:00
Scott Shawcroft ecc47d5258 Create supervisor module.
It can control autoreload and the rgb status led.
2017-11-16 09:04:17 -08:00
Scott Shawcroft 6839fff313 Move to ASF4 and introduce SAMD51 support. (#258)
* atmel-samd: Remove ASF3. This will break builds.

* atmel-samd: Add ASF4 for the SAMD21 and SAMD51.

* Introduce the supervisor concept to facilitate porting.

The supervisor is the code which runs individual MicroPython VMs. By
splitting it out we make it more consistent and easier to find.

This also adds very basic SAMD21 and SAMD51 support using the
supervisor. Only the REPL currently works.

This begins the work for #178.
2017-09-22 21:05:51 -04:00