Commit Graph

119 Commits

Author SHA1 Message Date
Gerard Marull-Paretas a258ab32d1 doc: doxygen: remove rst utilities
We no longer render Doxygen content in Sphinx after the removal of
breathe, so let's remove rst related aliases from Doxyfile. Also adjust
some headers that contained rst content.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-10-28 12:16:16 -07:00
Tomi Fontanilles 571e6019d7 doc: secure_storage: add documentation for the secure storage subsystem
It includes both the high-level documentation of the subsystem and
that of APIs defined in code (PSA Secure Storage and internal APIs of
the subsystem).

Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
2024-10-07 13:38:43 +02:00
Benjamin Cabé 83bdc7f1d9 doc: doxygen: add kconfig_dep alias
This new alias provides a handy shortcut for listing the Kconfig options
that are required for a given symbol to be available.

Fixes #76578

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-16 09:57:16 +02:00
Daniel Leung 8851891278 doc: clean ENABLED_SECTION option for doxygen
The ENABLED_SECTION option is not a YES/NO option but should
contain a list of section label to be processed. For example,
adding INTERNAL_HIDDEN will make doxygen to look through all
the blocks with "@cond INTERNAL_HIDDEN" and "@endcond". So
just remove the "YES" and leave it an empty list.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-08-24 07:15:07 -04:00
Gerard Marull-Paretas d1d6dea989 doc: doxygen: remove redundant footer file
It is not used.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-15 11:57:14 -04:00
Gerard Marull-Paretas e8a3304ba4 doc: doxygen: upgrade to 1.12.0
Update to latest Doxygen version.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-08-15 11:57:14 -04:00
Gerard Marull-Paretas 5bf395ba70 doc: doxygen: use full path for USE_MDFFILE_AS_MAINPAGE
Otherwise some recent Doxygen versions (1.11.0) generate a warning.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Gerard Marull-Paretas 941cc6d744 doc: doxygen: remove non-existing INPUT entry
sys/arch_interface.h does no longer exist.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-07-18 09:23:33 -04:00
Daniel Leung bd2fc8009b doc: doxygen: provide a way to override configs locally
This allows specifying the environment variable
ZEPHYR_DOXYGEN_OVERLAY pointing to a overlay file for
doxygen to override configs in the base zephyr.doxyfile.in
for local document builds.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-07-02 19:25:53 -04:00
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