Commit graph

110 commits

Author SHA1 Message Date
Anas Nashif 7f721bada2 doc: expand ZTEST macros in doxygen
This will allow expansion of various ZTEST macros to display the actual
test function rather than the ZTEST macro itself.

Inspired by a change in #71402 by @gmarull.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-04-23 21:46:38 +00:00
Lyle Zhu 40cf23daff Bluetooth: Rename BT_BREDR to BT_CLASSIC
Rename BT_BREDR to BT_CLASSIC
Rename CONFIG_BT_BREDR to CONFIG_BT_CLASSIC

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2024-03-07 11:26:45 +02:00
Anas Nashif 9183ceaf91 cache: introduce incoherent cache interface
Introduce a set of cache APIs used on architectures with cache incoherency.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-02-03 13:42:33 -05:00
Daniel Leung bd3c76c88d doc: force include interface header files first
Force include interface header files first before other files
under include. This is due to doxygen always using the first
found item during linking. Because of this, without forcing
the interface definitions first, almost all of these would
link to the same named items, for example, under ARC header
files instead. Hence the need to manually shuffle the items
so linking would actually link to the correct items.

Note that this only works with functions and macros that are
actually defined in the interface file. A simple doc section
with @def would not work as this is not an actual definition.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-01-11 21:06:03 -05:00
Daniel Leung 206e1d5b0e sys: atomic: move doxygen doc to atomic.h
This moves the doxygen doc from atomic_builtin.h to
atomic.h, as the doc should not have been inside
a particular implementation.

Also add an alias @atomic_api to replace the repetitive
wordings in the doc.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-01-11 21:06:03 -05:00
Flavio Ceolin 32d7b3645a toolchain: Add nonnull attribute
Add a new macro for __attribute__((nonnull))). This attribute
allows functions to declare which parameters shouldn't be null.
This helps to catch errors like:

void test(void *a, void *b, void *c) __attribute_nonnull(1, 3);

/zephyrproject/zephyr/samples/hello_world/src/main.c:28:9: warning:
argument 3 null where non-null expected [-Wnonnull]
   28 |         test(a, NULL, NULL);
      |         ^~~~

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-10-31 09:00:02 +01:00
Benjamin Cabé 9e0c46f81b doc: fix Doxygen light theme
As per Doxygen Awesome documentation:
"HTML_COLORSTYLE must be set to LIGHT since Doxygen 1.9.5!"

Fixes #64505

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-10-30 09:25:48 +01:00
Florian Grandel e63969521c doc: ieee802154: mgmt: improved docs
Hides types in the IEEE 802.15.4 net_mgmt sub-API that are of no public
interest and improves documentation of the remainder.

All constants that are not meant to be used by applications have been
hidden. Only the API actually being of relevance to application
developers is now publicly visible and documented.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2023-09-28 15:13:12 +02:00
Tom Burdick cbc6af0d09 spi: Cleanup and fix SPI docs build
Use the defined(__DOXYGEN__) more specifically in the header to better
match i2c.h and make things more explicit. Removes the define being
setup in zephyr.doxyfile.in.

Fixes some of the deprecation notes and what to look for instead. Fixes
some typos.

The async, signal, and rtio APIs for SPI are now shown in the built docs
as would be expected.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2023-09-19 08:46:16 -05:00
Fabio Baltieri 8bd49da316 doc: doxygen: define XEN_GUEST_HANDLE_64 as no-op
Doxygen gets confused by the macro expansion in
include/zephyr/xen/public/domctl.h as that is only defined if
CONFIG_ARM64=y, add a no-op expansion of that macro when building the
documention so it has something to work on.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-09-15 13:51:19 +01:00
Benjamin Cabé 986d0c9e89 doc: doxygen: Enable Doxygen autobrief
Enable Doxygen AUTOBRIEF feature for both Javadoc and Qt style
documentation blocks. This treats the first sentence of a documentation
block as a brief description even when no @brief tag is present. This makes
the overview sections of the generated documentation much more useful.

See https://www.doxygen.nl/manual/config.html#cfg_javadoc_autobrief and
https://www.doxygen.nl/manual/config.html#cfg_qt_autobrief

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-13 09:20:51 +02:00
Aleksander Wasaznik 92fcd9ef40 Bluetooth: Host: Add L2CAP seg_recv API
This is an alternative API for the L2CAP receive functionality. It
allows an application the receive L2CAP segments directly and manage
credits explictly. The API is guarded by an experimental kconfig option.

Fixes: https://github.com/zephyrproject-rtos/zephyr/issues/57485

Signed-off-by: Aleksander Wasaznik <aleksander.wasaznik@nordicsemi.no>
2023-05-24 13:15:14 -04:00
Carlo Caione de90dfccbc syscall: Introduce __syscall_always_inline
Sometimes we want to force the inlining of a __syscall. Introduce a new
__syscall_always_inline symbol to do that.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-04-20 14:56:09 -04:00
Benjamin Cabé d497ca0089 doc: doxygen: Remove kernel tests
Remove kernel tests from Doxygen INPUT as they end up unnecessarily
included in the generated API documentation.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-04-20 08:17:06 -04:00
Gregory Shue 5623f54a35 fff: Add fff_extensions.h, RETURN_HANDLED_CONTEXT()
Add supplementary header <zephyr/fff_extensions.h>.  Add macro
to fff_extensions.h for simplifying definition of custom fake functions
needing call-unique information for producing desired output data.
When an array of custom fake context structures is defined and
the return field within the first structure instance is registered
with the standard SET_RETURN_SEQ() macro of FFF, the
RETURN_HANDLED_CONTEXT() macro provides the inverse logic to
recover the context structure for this called instance. The body of
the custom fake handler is provided to the RETURN_HANDLED_CONTEXT()
macro for appropriate execution and access to the custom fake
parameters.

A test suite is also provided to verify macro implementation and
illustrate usage. It is at:
zephyr/tests/subsys/testsuite/fff_fake_contexts/

This code was verified by:

1. (Pass) west build -p always \
            -b unit_testing tests/subsys/testsuite/fff_fake_contexts/ && \
         ./build/testbinary
2. (Pass) west build -p always \
            -b native_posix tests/subsys/testsuite/fff_fake_contexts/ && \
         ./build/zephyr/zephyr.exe
3. (Pass) ./scripts/twister -p unit_testing \
            -T tests/subsys/testsuite/fff_fake_contexts/
4. (Pass) ./scripts/twister -p native_posix \
            -T tests/subsys/testsuite/fff_fake_contexts/
5. (Pass) cd doc && build html-fast

Fix #55246

Signed-off-by: Gregory Shue <gregory.shue@legrand.com>
2023-03-16 13:43:33 -04:00
Gerard Marull-Paretas 481ae767cb doc: doxygen: update Doxyfile for 1.9.6
Update the Doxyfile using `doxygen -u doc/zephyr/doxyfile.in`.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-01-10 10:27:54 +01:00
Yuval Peress b38445eaa0 math: Introduce a DSP basicmath subsystem with a cmsis backend
Introduce an API mirroring the CMSIS-DSP's basicmath. If CMSIS_DSP is
enabled, then it will by default be used as a backend. Developers may
opt into a custom backend by setting CONFIG_DSP_BACKEND_CMSIS=n. If
done, the application must provide `zdsp_backend/dsp.h` and optionally
implement the functions in its own .c files.

Signed-off-by: Yuval Peress <peress@google.com>
2022-12-02 20:15:55 +01:00
Gerard Marull-Paretas 9c806440ba doc: doxygen: remove unused DT_DOXYGEN predefinition
The predefinition is no longer used, so remove it.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-11-11 11:00:26 +01:00
Gerard Marull-Paretas 01fa3b0a7d doc: doxyfile: update to 1.9.4
Even though we use Doxygen 1.9.4, config file was never updated for it.
Changed made by `doxygen -u doc/zephyr.doxyfile.in`.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-10-17 14:40:31 +09:00
Gerard Marull-Paretas 3e35110f22 doc: fix embedding of Kconfig links in rst
Kconfig links were not processed correctly in Doxygen content rendered
by breathe. Also remove obsolete @option{} (no longer used).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-27 07:18:15 -05:00
Gerard Marull-Paretas f1a8d0bcbb doc: doxygen: fix Kconfig alias when using HTML output
The kconfig Doxygen alias needs to work for both, HTML and XML output
(used later by Sphinx). This patch modifies the alias so that it outputs
plain HTML for the HTML output and Sphinx roles for the XML output.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-19 10:02:48 +00:00
Herman Berget f28194e38d doc: Bluetooth: Add ATT section in docs
There was no API reference for the ATT APIs.

Signed-off-by: Herman Berget <herman.berget@nordicsemi.no>
2022-08-19 11:59:52 +02:00
Gerard Marull-Paretas d9707249da doc: doxygen: strip include/ from path
Include hints shown in the Doxygen documentation need to exclude
'include/' so that we have, e.g. <zephyr/sys/crc.h> and not
<include/zephyr/sys/crc.h>.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-06-30 13:02:51 +02:00
Robert Lubos 4ec098ac5a doc: net: Document POSIX wrappers for socket operations
Document POSIX wrappers for socket operations, by referencing a
corresponsding `zsock_*` function. The documentation will generate a
link where user can read the actual documentation on the socket
operation.

In order to include the POSIX wrappers in to the documentation however,
it's needed to add CONFIG_NET_SOCKETS_POSIX_NAMES to predefined symbol
list in zephyr.doxyfile.in.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2022-06-24 20:29:37 +02:00
Yuval Peress 1ec0c6f530 build: make non zephyr/ include prefix configurable
Add a Kconfig to disable non prefixed includes. By setting
`CONFIG_LEGACY_INCLUDE_PATH=n` developers can disable having
`include/zephyr` in the search path. This means that includes such
as `#include <kernel.h>` will no longer work.

Internally, every header should be updated to add the `zephyr/`
prefix to the headers. Only then, will developers be able to use
this config value for their applications.

Signed-off-by: Yuval Peress <peress@google.com>
2022-04-08 19:03:32 +02:00
Gerard Marull-Paretas 48ecf514cd drivers: pwm: improve some Doxygen aspects
- remove redundant @typedef
- remove redundant @a (function with () automatically resolves)
- use @see instead of "See..."

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-04-01 21:26:34 +02:00
Gerard Marull-Paretas 260deccb6e doc: use :kconfig:option: domain role
Kconfig options now belong to the Kconfig domain, therefore, the
:kconfig:option: role needs to be used.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-03-02 09:28:37 +01:00
Jordan Yates b527915738 doc: generate Doxygen tag file
Generate the Doxygen tag file to static html sources directory so that
external documentation can use it as a source for linking. See:
    https://www.doxygen.nl/manual/external.html

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2022-01-21 14:26:14 -05:00
Daniel Leung bdc812c15a doc: debug: expand documentation on gdbstub
This expands the documentation on GDB stub, and adding
hints on porting to new architectures.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2021-11-30 15:24:00 -05:00
Johan Hedberg 50adc4b903 doc: Add __must_check to PREDEFINED
This helps avoid unnecessary warning from function and function pointer
declarations.

Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
2021-11-09 22:21:23 +02:00
Gerard Marull-Paretas 9bea59a8c4 doc: doxygen: adjust titles
Adjust the project title and the home page to make the sidebar tree more
usable.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-08 11:17:37 +01:00
Gerard Marull-Paretas 96b2b931fe doc: doxygen: adjust Doxygen theme to match Sphinx better
Adjust the Doxygen theme (based on doxygen-awesome) to match the Sphinx
theme. While not perfect, the experience should now be more consistent.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-08 11:17:37 +01:00
Gerard Marull-Paretas 3b4515a6e9 doc: doxyfile: remove redundant predefinitions
PM related pre-definitions are not required, so remove them.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-04 16:49:08 +01:00
Gerard Marull-Paretas c8814f639e doc: doxygen: add group definition file
Add an external group definition file. It can be used to create high
level group for things like subsystems, as there is no header such as
"subsys.h" where these type of logical groups can be defined.

This approach is followed by projects such as pipewire to organize
Doxygen modules.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-04 16:49:08 +01:00
Gerard Marull-Paretas 03b470c74e doc: doxyfile: update to 1.9.2
File updated automatically by running `doxygen -u zephyr.doxyfile.in`.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-11-04 09:57:01 +01:00
Gerard Marull-Paretas 5c616910d5 doc: doxygen: add Doxygen predefined macro
A pre-defined Doxygen macro allows for better control of what is
included in the final documentation than maintaining a long list of
CONFIG_* entries.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-25 15:26:47 -05:00
Gerard Marull-Paretas a42ee8bd04 doc: doxygen: add version and shorten brief
Render Zephyr version in both, standalone Doxygen build and Sphinx
controlled build. In standalone mode, the package version given by
find_package(Zephyr...) is used, while in Sphinx build the conf.py
version is used.

The project brief has been shortened to make project title more compact
while still containing relevant information.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-07 11:54:23 -04:00
Gerard Marull-Paretas 77fc2458a0 doc: doxygen: use Zephyr branding colors
Use Zephyr branding colors for the doxygen-awesome theme.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-07 11:54:23 -04:00
Gerard Marull-Paretas c78dda8d7b doc: doxygen: use doxygen-awesome theme
Use the doxygen-awesome theme to improve the look and feel of the
Doxygen API documentation.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-07 11:54:23 -04:00
Gerard Marull-Paretas 5c5f7bb7d2 doc: doxyfile: upgrade to 1.9.1
Doxyfile has been upgraded using `doxygen -u doc/zephyr.doxyfile.in`.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-10-07 11:54:23 -04:00
Fabio Baltieri 4dfe7d24fe doc: doxygen: predefine _LINKER
Linker APIs are defined in a "#ifdef _LINKER" block. Adding _LINKER to
the Doxygen PREDEFINED list so that they get picked up when generating
the documentation.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2021-08-03 19:02:43 -04:00
Gerard Marull-Paretas d625db0aa5 doc: doxygen: move logo to Doxygen assets folder
Move the logo used by Doxygen into the Doxygen assets folder.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-19 20:06:00 -04:00
Gerard Marull-Paretas 24f3170976 doc: doxygen: prefix Doxygen utils dir with underscore
The same convention is used for Sphinx files.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-19 20:06:00 -04:00
Gerard Marull-Paretas 85a0e1325c doc: extensions: doxyrunner: process Doxygen output
This change will process Doxygen output and will map it to the Sphinx
logger. Things like errors and warnings will be mapped to actual Sphinx
logger error and warnings. In practice this means that when Doxygen
throws a warning and Sphinx is run in "-W" (warning as error) mode, the
build will fail. It also has some other advantages such as the
possibility of filtering issues using the warnings_filter extension.

It is also expected that CI errors not being displayed issue is fixed
with this change.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-07-13 17:36:15 +02:00
Gerard Marull-Paretas 72ab6b29bf doc: doxygen: replace option alias with kconfig
Similar to Sphinx, @kconfig{} alias should be used in Doxygen docstring
in order to reference a Kconfig option. @option{} is still kept for
compatibility reasons.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-06-29 10:26:28 -04:00
Gerard Marull-Paretas 9dfbdf1997 doc: use kconfig role and directive
Stop using :option: for Kconfig options.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-06-29 10:26:28 -04:00
Kumar Gala 6d51863e0d toolchain: remove deprecated BUILD_ASSERT_MSG macro
The macros have been deprecated for 2 releases so remove the code
associated with them.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-11 16:35:19 -05:00
Martí Bolívar 69ce55a78d doc: zephyr.doxyfile.in: remove obsolete variable
From Doxygen 1.9.1 when running 'make htmldocs':

warning: Tag 'COLS_IN_ALPHA_INDEX' at line 1028 of file
'/tmp/tmpkbj62jo0' has become obsolete.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-05-28 07:00:52 -05:00
Gerard Marull-Paretas 5e06397269 doc: doxygen: treat warnings as errors
Treat warnings as errors. Since we already disable warnings for
undocumented members (the major source of warnings), reported warnings
are in all cases real problems that should be fixed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-21 12:17:04 -04:00
Gerard Marull-Paretas 1100326f0f doc: doxygen: make relative paths absolute
Some paths in the Doxyfile were relative, make them absolute.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-19 08:10:52 -05:00