Commit Graph

15 Commits

Author SHA1 Message Date
microDev a52eb88031
run code formatting script 2021-03-15 19:27:36 +05:30
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
Dan Halbert 4abd5f1f7b increase max connections from 2 to 5 2020-01-31 14:58:23 -05:00
Dan Halbert fd03fd5e4f sd_flash_operation_status should be volatile 2019-12-12 00:19:03 -05:00
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 24ac1fdcab WIP: backup only; not compiled 2019-06-19 21:54:28 -04:00
Dan Halbert a1b5d800f3 Update copyrights; get ready for Central 2019-06-19 10:42:36 -04:00
Dan Halbert 1639354e5f Scanner working, but not very first time 2019-05-23 16:07:54 -04:00
Dan Halbert 9cceea0d68 nrf: fix internal flash writes 2019-03-18 09:11:40 -04:00
Dan Halbert 99da3b9646 Use critical section, not lock, in CharacteristicBuffer; use a root pointer for ble_drv list 2019-02-21 00:19:31 -05:00
Dan Halbert a345ef28f2 finish Makefile refactoring; nrf builds work 2019-02-15 18:55:10 -05:00
Dan Halbert f66f55b4ed add CharacteristicBuffer; UART seems to work! 2019-01-07 22:46:20 -05:00
Dan Halbert 4d1f0ec07b Add Broadcaster. Reset correctly on reload. 2018-12-28 23:34:23 -05:00
arturo182 c7b42d80b3 bleio: A bit of cleanup 2018-10-21 15:59:42 +02:00
arturo182 d5a71a4b8a nrf: Move bluetooth driver to the 'bluetooth' folder 2018-10-21 15:55:25 +02:00