Commit graph

10 commits

Author SHA1 Message Date
Ayke van Laethem
5d805a929c all: use Device instead of Address in SetConnectHandler
This makes it possible to discover services on a connected central while
in peripheral mode, for example.
2024-01-11 15:53:20 +01:00
Ayke van Laethem
6e0df0ec3c softdevice: add address of connecting device
I thought it wasn't available, but in fact it is. So let's make it
available in the connect handler.
2024-01-11 15:53:20 +01:00
Ayke van Laethem
735333aa1a softdevice: print connection parameters when debug is enabled
This is very useful for debugging, though we should probably expose this
in some way to users of the bluetooth package without changing a
constant.
2024-01-11 15:53:20 +01:00
Ayke van Laethem
01243181c3 sd: update to prepare for changes in the TinyGo CGo implementation
For details, see: https://github.com/tinygo-org/tinygo/pull/3927

I ran the smoke tests and the binaries are exactly identical to what
they were before, so this change cannot have had an effect on these
smoke tests (which is expected, as this is mostly just changing some
types without changing the machine data type).
2023-10-05 19:11:46 +02:00
Yurii Soldak
f9436906c1 all: go 1.18 and remove old-style build tags 2023-07-31 15:54:58 +02:00
Ayke van Laethem
74e8f86261 nrf: clean up code after CGo improvements
Make use of a few new features in TinyGo:

  * Functions and globals in header files are supported.
  * Static functions are supported.

This allows us to remove workarounds specifically used for the lack of
support for static functions.
2023-06-06 16:59:23 +02:00
Yurii Soldak
e5b9a898ad nrf528xx: handle BLE_GAP_EVT_PHY_UPDATE_REQUEST
and explicitly ignore some other events
2023-05-02 12:04:01 +02:00
Ayke van Laethem
b06d666dbf all: remove Addresser
Remove the Addresser type. It isn't really necessary (the Address type
can change between OSes) and makes it difficult to fix a heap allocation
in interrupts (on the Nordic SoftDevices).

This is a backwards incompatible change, but only programs that use
SetConnectHandler should notice this.
2023-04-26 23:37:36 +02:00
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
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