Commit graph

15409 commits

Author SHA1 Message Date
Rubin Gerritsen
2967bd847f Bluetooth: HCI: Expose bt_hci_conn_lookup_handle()
When implementing vendor specific HCI APIs and events,
we want to be able to convert between host objects,
handles and back again.

Exposing this API makes that possible

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-27 15:09:00 +03:00
Rubin Gerritsen
e28207d61b Bluetooth: HCI: Expose bt_hci_per_adv_sync_lookup_handle()
When implementing vendor specific HCI APIs and events,
we want to be able to convert between host objects,
handles and back again.

Exposing this API makes that possible.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-27 15:09:00 +03:00
Rubin Gerritsen
5b14748616 Bluetooth: HCI: Expose bt_hci_adv_lookup_handle()
When implementing vendor specific HCI APIs and events,
we want to be able to convert between host objects,
handles and back again.

Exposing this API makes that possible.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-27 15:09:00 +03:00
Fin Maaß
2fb983a427 net: l2: ethernet: add way to access phy
add a way to access the ethernet phy
device via the ethernet device.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-07-27 15:07:26 +03:00
Johann Fischer
28b2051bda usb: device_next: add support for configuration string descriptor
Change USBD_CONFIGURATION_DEFINE macro to take the address of a string
descriptor node as an argument. This is a breaking change for macro
users, but quite convenient and easy to implement.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-27 15:06:09 +03:00
Johann Fischer
18c624e8df include: usb: fix designator order in usbd.h header
Fix "designator order for field 'usbd_desc_node::ptr' does not match
declaration order in 'usbd_desc_node'" error when building applications
with CONFIG_CPP enabled.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-07-27 10:47:00 +03:00
Robert Lubos
35fe353ad6 net: lib: coap_client: Replace send_mutex with more generic lock
Introduce a more generic mutex for protecting coap_client structure.

This allows to avoid a certain race condition when sending consecutive
CoAP requests. The case was, that when a CoAP receive thread notified
the application that a complete response was received, and the
application wanted to send another request from the application thread,
the consecutive call to coap_client_req() might've failed if the
application thread has higher priority than the CoAP receive thread
because of the request context cleanup is done after calling the
application callback.
Having a mutex, which is locked while processing the response, and when
attempting to send a new request allows to synchronize threads as
expected.

As this new mutex seemed redundant with the more specialized send_mutex
already present in the coap_client, the latter was removed (i. e.
transmission is also protected with the new mutex).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 10:43:15 +03:00
Yong Cong Sin
79ed64909f arm: debug: gdbstub: fix header
`exc.h` should be `exception.h` now, fix  it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-07-27 10:42:59 +03:00
Fabian Pflug
ca53d2bf80 net: l2: ieee802154: mgmt: allow beacon payload
The standard does allow for a optional beacon payload, which gets lost
during scan, that could be interesting for the application to access
in the NET_EVENT_IEEE802154_SCAN_RESULT callback.

See section 7.3.1.6 in IEEE Std 802.15.4 for more information about
the beacon payload field. And section 7.3.1 and figure 7-5 about general
beacon frame format.

Signed-off-by: Fabian Pflug <fabian.pflug@grandcentrix.net>
2024-07-27 10:42:45 +03:00
Fabio Baltieri
a7c8ce52f5 lib: os: change __printk_get_hook return type to printk_hook_fn_t
Not sure why this was returning a void * but it seems to make sense to
return the correct type instead.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-27 10:41:01 +03:00
Fabio Baltieri
36768aa7ff lib: os: use a typedef for __printk_hook_install argument
Use a typedef for the printk hook function argument.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-27 10:41:01 +03:00
Fabio Baltieri
ef14c9b867 lib: os: add a header for printk hook functions
Add a zephyr/printk.h header for the __printk_hook functions, these are
currently manually declared by all console drivers for no good reason.

Move the documentation into the header and also unify the way that
console drivers call the function.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-07-27 10:41:01 +03:00
Robert Lubos
33d59f8148 include: zephyr: net: Add version information to public network APIs
Add \since and \version doxygen tags to the networking APIs, so that
they render correctly on the API overview page.

The version used for \since tag was determined, based on the commit that
introduced the header or in individual cases, when the API was
introduced as a part of a larger header (mostly apply for the oldest,
core network APIs).

The version of the API was set as follows:
* components that use EXPERIMENTAL Kconfig symbol were assigned with
  0.1.0
* The oldest, "core" networking APIs were marked as "stable" (1.0.0).
* Everything else ended up as "unstable" (0.8.0).

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 10:37:41 +03:00
Robert Lubos
1df711420f inlcude: zephyr: net: Fix copy-paste doxygen errors
Use proper description for the socket_can and socket_net_mgmt groups.

Additionally, socket_can group was defined twice, which is incorrect.
For socketcan_utils.h use @addtogroup instead to merge the API
documentation into the socket_can group defined in socketcan.h.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-07-27 10:37:41 +03:00
Jamie McCrae
2aa6b81b64 retention: Fix documentation issue
Fixes a minor issue with the return value in the documentation

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-07-25 09:25:21 +02:00
Dominik Ermel
65e679214e storage/stream_flash: Fix write_block_size too small
Fix for platforms with write-block-size >= 256 bytes.

Fixes #76029

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-07-18 12:32:35 -04:00
Gerard Marull-Paretas
ce8b99b9f0 net: dns_sd: fix incorrect usage of code/endcode
`@code` needs file extension
`@endcode` doesn't take any arguments

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
bd921a1ca9 debug: symtab: move to os_services doxygen group
Instead of being a top-level group.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
8a7fd88ed3 bindesc: add to os_services doxygen group
Instead of being a top-level group.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
284bf28169 dt-bindings: sensor: icm42688: move to sensor_interface doxygen group
Instead of showing up as a top-level Doxygen group.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
b792e63b0f debug: mipi_stp_decoder: move to os_services doxygen group
The API was placed under a non-existing group: coresight_apis. Place it
under os_services, as other debug/ APIs.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas
398dd4e505 drivers: tee: move interface to io_interfaces doxygen group
The TEE driver interface was put under a non-existing group: security.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Swift Tian
fe3b65e33e drivers: mspi: Mark MSPI API version 0.1.0
Mark MSPI API as experimental with version 0.1.0 for release 3.7

Signed-off-by: Swift Tian <swift.tian@ambiq.com>
2024-07-18 09:32:29 +02:00
Jordan Yates
3e059e7292 sd: sd_spec: update trailing doxygen comments
While doxygen comments on subsequent lines with the `/*<` is technically
valid, it is not standard. It also confuses at a minimum the `vscode`
intellisense provider, which assigns the comments to the wrong enum
values.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-17 16:19:07 -04:00
Jordan Yates
3615e69428 sd: sd_spec: fix voltage enum docs
Fix voltage enum docs as there was a repeated comment at
`SD_OCR_VDD30_31FLAG`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-07-17 16:19:07 -04:00
Tavish Naruka
ca02651f01 toolchain: gcc: fix SECTION_DATA_PROLOGUE for XIP
Current if CONFIG_XIP is enabled, then ALIGN_WITH_INPUT and the align
argument to SECTION_DATA_PROLOGUE are set together, and that is not a
valid option combination; if ALIGN_WITH_INPUT is present, then the
section's LMA alignment is inherited from the previous section, and that
cannot be combined with another alignment option.

The background for this line is in the following commit:
6b3c5e8bb2

Additionally, this is the documentation from ld:

(from https://sourceware.org/binutils/docs/ld/Forced-Output-Alignment.html)

> 3.6.8.3 Forced Output Alignment
>
> You can increase an output section’s alignment by using ALIGN. As an
> alternative you can enforce that the difference between the VMA and
> LMA remains intact throughout this output section with the
> ALIGN_WITH_INPUT attribute.

Signed-off-by: Tavish Naruka <t-naruka@ispace-inc.com>
2024-07-12 16:09:36 -04:00
Yong Cong Sin
269729a5db net: socket: fix sys/_timespec.h not found error
When building `native_sim` with CPP & POSIX enabled, the
POSIX's `unistd.h` header causes a compilation error as
`sys/_timespec.h` doesn't exist in host gcc lib.

Remove the 'zephyr/posix' prefix, and rely on
`CMakeLists.txt`s to do the routing accordingly:
- zephyr/lib/CMakeLists.txt:L11
- zephyr/lib/posix/options/CMakeLists.txt:L8

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-07-12 09:12:58 -04:00
Simon Hein
2479fdcac1 kernel: timer: Add missing parameter description
Add the missing parameter description for the timer API
function k_timer_remaining_ticks.

Signed-off-by: Simon Hein <Shein@baumer.com>
2024-07-12 09:12:03 -04:00
Emil Gydesen
eaa2bf0ab7 Bluetooth: VOCS: Add missing documentation in vocs.h
Add missing documentation for some defintions in vocs.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
e647773d01 Bluetooth: VCP: Add missing documentation in vcp.h
Add missing documentation for some defintions in vcp.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
14caa79c45 Bluetooth: TMAP: Add missing documentation in tmap.h
Add missing documentation for some defintions in tmap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
1751a7f190 Bluetooth: TBS: Add missing documentation in tbs.h
Add missing documentation for some defintions in tbs.h
Moved some internal definitions to tbs_internal.h

Removed invalid TBS technology BT_TBS_TECHNOLOGY_IP that
doesn't exist.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
e99d7a0002 Bluetooth: PBP: Add missing documentation in pbp.h
Add missing documentation for some defintions in pbp.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
5023c374e3 Bluetooth: PACS: Add missing documentation in pacs.h
Add missing documentation for some defintions in pacs.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
f711fd7f12 Bluetooth: MICP: Add missing documentation in micp.h
Add missing documentation for some defintions in micp.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
d2e6ed8e5c Bluetooth: Media Proxy: Add missing documentation in media_proxy.h
Add missing documentation for some defintions in media_proxy.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
b0f2d04743 Bluetooth: MCS: Add missing documentation in mcs.h
Add missing documentation for some defintions in mcs.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
8679dcd5ba Bluetooth: MCC: Add missing documentation in mcc.h
Add missing documentation for some defintions in mcc.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
909cb25c88 Bluetooth: LC3: Format documentation in lc3.h
Format documentation for some defintions in lc3.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
2f1d0529d0 Bluetooth: HAS: Add missing documentation in has.h
Add missing documentation for some defintions in has.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
032c5b69ef Bluetooth: GMAP: Add missing documentation in gmap.h
Add missing documentation for some defintions in gmap.h
Also added missing C++ guards, group and version.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
2d9cb00ba0 Bluetooth: GMAP: Add missing documentation in gmap_lc3_presets.h
Add missing documentation for some defintions in gmap_lc3_presets.h
Also added missing C++ guards, group and version.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
4926db6161 Bluetooth: CSIP: Add missing documentation in csip.h
Add missing documentation for some defintions in csip.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
f7930a2f7e Bluetooth: CAP: Add missing documentation in cap.h
Add missing documentation for some defintions in cap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
2d94be4656 Bluetooth: BAP: Add missing documentation in bap.h
Add missing documentation for some defintions in bap.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
1724ad2f08 Bluetooth: BAP: Add missing documentation in bap_lc3_presets.h
Add missing documentation for some defintions in bap_lc3_presets.h
Also added missing C++ guards, group and version.
Fixes some formatting.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
d92f79d3a1 Bluetooth: Audio: Add missing documentation in audio.h
Add missing documentation for some defintions in audio.h
Makes formatting and placement of @brief consistent.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Emil Gydesen
84f5d01bb0 Bluetooth: AICS: Add missing documentation in aics.h
Add missing documentation for some defintions in aics.h

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-07-12 06:24:39 -04:00
Ben Marsh
74c871dce2 build: Prefix missed generated syscall includes
PR #63973 namespaced generated headers with zephyr/, including generated
syscall headers.

Since then, some new generated syscall header includes have been added
without the zephyr/ prefix, breaking builds when
CONFIG_LEGACY_GENERATED_INCLUDE_PATH is disabled.

This commit adds the zephyr/ prefix to includes for generated syscall
headers where it has been missed.

Signed-off-by: Ben Marsh <ben.marsh@helvar.com>
2024-07-11 18:24:58 -04:00
Rubin Gerritsen
85eadcfddc Bluetooth: Mark bt_<type>_err_to_str() APIs experimental
It was pointed out in a future PR that they should have
a corresponding experimental Kconfig entry.

See PR #73795.

This updates the APIs added in PR #73826 and PR #74295.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-07-11 13:11:59 -04:00