Move the network buffer header file from zephyr/net/buf.h to
zephyr/net_buf.h as the implementation now lives outside of the networking
subsystem.
Add (deprecated) zephyr/net/buf.h header to maintain compatibility with old
file path.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
Adds, removes and modifies includes in all LE audio
files.
Fixes any found spelling mistakes as well.
Fixes a few places where incorrect types were used.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
The LE Audio implementations do not really support bonding yet,
and removing subs on disconnect is the most effective (and correct)
way of ensuring that we do not subscribe more than once when we
re-discover after reconnection.
The broadcast assistant and the media control client does not
support multiple connections as of this commit, so they needed
special treatment. In the case that we do discovery on multiple
ACL connections, it is important that the existing subscriptions
are removed correctly by calling bt_gatt_unsubscribe.
In order to implement this change properly on some of the clients,
thet had no proper connection references or support
for clearing the data on disconnects, they had to be updated
as well.
The csip_notify.sh test has been disabled, as that expected a
notification in the client, but since this commit removes that
(until bonding is properly supported in the clients), then the
test will fail.
Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
This moves bt_has_client instance structure to has_internal.h header
file to be able to access to the instance members in tests.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
This starts using CONTAINER_OF macro instead of inst_by_conn function
wherever possible. It's better approach as the client instance is
a container for parameters passed to the callbacks.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
The `bluetooth/common/log.h` and `bluetooth/common/log.c` files have been
removed. Files that were using them have been updated to use
`zephyr/logging/log.h` instead.
Those replacement have been done consequently:
- `/BT_DBG/LOG_DBG/`
- `/BT_ERR/LOG_ERR/`
- `/BT_WARN/LOG_WRN/`
- `/BT_INFO/LOG_INF/`
- `/BT_HEXDUMP_DBG/LOG_HEXDUMP_DBG/`
- `/BT_DBG_OBJ_ID/LOG_DBG_OBJ_ID/`
Also, some files were relying on the `common/log.h` include to include
`zephyr/bluetooth/hci.h`, in those cases the include of `hci.h` has
been added.
For files that were including `common/log.h` but not using any logs,
the include has been removed and not replaced.
Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.
The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.
NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This adds client support for switching the active preset along with bsim
tests implementation.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
Update the users of the "write" callback in the
bt_gatt_subscribe_params to use the new "subscribe" callback instead.
Signed-off-by: Asbjørn Sæbø <asbjorn.sabo@nordicsemi.no>
This extends client implementation with Read Presets Request operation
support.
The implementation can maintain up to BT_L2CAP_TX_BUF_COUNT control
point requests so that user could perform/queue another Control Point
Operation if one is ongoing. E.g. preset can be selected from Read Preset
Response notification context or perform multiple operations if EATT
enabled.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
In order to bring consistency in-tree, migrate all subsystems code to
the new prefix <zephyr/...>. Note that the conversion has been scripted,
refer to zephyrproject-rtos#45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This adds initial support for Hearing Access Service client. The client
performs GATT discovery to find and read HAS related characteristics and
subscribe for characteristic value notifications/indications.
Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>