Commit Graph

6 Commits

Author SHA1 Message Date
Ayke van Laethem
96a2be1571 Add //go:build lines for Go 1.18
This will be needed eventually, so add them now already.
2022-04-19 11:00:08 +02:00
Ayke van Laethem
4c0df2892d nrf: fix CGo errors after TinyGo update
For details, see: https://github.com/tinygo-org/tinygo/pull/2774
2022-04-13 18:59:12 +02:00
Ayke van Laethem
bb8767730c nrf: add support for S113 SoftDevice
This SoftDevice is used by default on the BBC micro:bit v2 so it's a
good idea to add support here.

Unfortunately this SoftDevice does not support scanning and connecting
to other devices. This means that I unfortunately had to duplicate the
event handler. I managed to refactor most other code to avoid
duplicating much more. (This is when macros would have been useful in
Go...)
2021-04-15 15:37:36 +02:00
Ron Evans
266de9824a
gattc/*: DeviceCharacteristic Read() implementation
Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-10-22 19:04:47 +02:00
Ron Evans
ef90e5d337
gattc: use GetUUID() to allow for bare metal use of short UUID. (#14)
* gattc: use UUID() to allow for bare metal to permit clean use of short UUIDs

Signed-off-by: deadprogram <ron@hybridgroup.com>

* gattc/macos: correct usage of UUID wrapper type alias

Signed-off-by: Ron Evans <ron@hybridgroup.com>

* gattc/sd: correct usage of UUID wrapper type alias

Signed-off-by: Ron Evans <ron@hybridgroup.com>

* gattc/sd, uuid/sd: changes intended to reduce memory allocations for service and characteristic discovery

Signed-off-by: deadprogram <ron@hybridgroup.com>

* gattc/sd: partial improvements to DiscoverServices/DiscoverCharacteristics

Signed-off-by: deadprogram <ron@hybridgroup.com>

* gattc/sd: mostly getting uuid back for services in DiscoverServices

Signed-off-by: deadprogram <ron@hybridgroup.com>

* uuid/sd: correct way to calculate UUID from shortUUID

Signed-off-by: deadprogram <ron@hybridgroup.com>

* gattc/sd: able to discover services and characteristics

Signed-off-by: deadprogram <ron@hybridgroup.com>

* examples: updated discover example that can run with OS or bare metal

Signed-off-by: deadprogram <ron@hybridgroup.com>

* gattc/sd: ensure safe casts for length of returned struct when converting short UUID

Signed-off-by: deadprogram <ron@hybridgroup.com>
2020-09-13 20:21:38 +02:00
Ayke van Laethem
15b3e8e3e2
nrf: add GATT client
This is not entirely complete (some errors are not handled properly) but
it's a start.
2020-06-28 00:21:40 +02:00