Commit graph

97 commits

Author SHA1 Message Date
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
Gerard Marull-Paretas aad84e702a doc: doxygen: do not use separate member pages
When this option is enabled some data structures have missing pages. Use
the default setting (NO).

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-19 06:21:53 -04:00
Gerard Marull-Paretas f69759d34a pm: rename CONFIG_PM_DEVICE_IDLE to CONFIG_PM_DEVICE_RUNTIME
Make naming clear on the purpose of this option.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-05-05 18:35:49 -04:00
Gerard Marull-Paretas 446432a9ac doc: doxygen: add support for function properties
Add aliases for setting function properties. A function may have 0, one
or more function properties. Example usage:

@funcprops \isr_ok, \async

These aliases will translate to API Terminology references when Doxygen
is rendered on Sphinx. On the Doxygen side they will just translate to
plain text.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-28 14:32:39 -04:00
Anas Nashif 3b3e858c50 portability: move cmsis api headers
Move cmsis OS api headers under include/portability. Those are not
libraries and only serve to provide a level of abstraction using the
CMSIS OS APIs to existing Zephyr interfaces.

Removed one level and put them directly under include/portability.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-20 08:45:05 -04:00
Anas Nashif e616a54d08 doc: enable doxygen for CONFIG_TIMING_FUNCTIONS
This was missed and APIs were not showing in final docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2021-04-15 14:04:05 -04:00
Gerard Marull-Paretas fad358c18e doc: predefine ATOMIC_DEFINE
Predefine ATOMIC_DEFINE in the Doxyfile so that documentation output is
generated correctly. In order to simplify the predefinition
ATOMIC_BITMAP_SIZE has been introduced.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-07 14:15:29 +02:00
Gerard Marull-Paretas faa74e68c2 doc: disable INLINE_SIMPLE_STRUCTS Doxygen option
This option prevents some structures to have missing pages on the
Doxygen HTML output.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-04-07 14:15:29 +02:00
Peter Bigot b706a5e999 kernel: remove old work queue implementation
Now that the old API has been reimplemented with the new API remove
the old implementation and its tests.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-03-03 20:06:00 -05:00
Peter Bigot d1affd9118 kernel: default to new work API implementation
Switch the default and clean up some test workarounds.  This will enable
final conversions necessary to transition to the new API.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-03-03 20:06:00 -05:00
Peter Bigot 44539ed645 kernel: select work queue implementation
Attempts to reimplement the existing work API using a new work
implementation failed, primarily due to heavy use of whitebox testing
in validating the original API.  Add a temporary Kconfig that will
select between the two implementations so we can use the same
identifiers but select which implementation they reference.

This commit just adds the selection infrastructure and uses it to
conditionalize the existing implementation in anticipation of the new
one in the next commit.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-03-03 20:06:00 -05:00
Peter Bigot 8528e45897 lib: cbprintf: add libc f/printf substitutes
This allows applications that may not use minimal libc avoid the cost
of a second printf-like formatting infrastructure by using printfcb()
instead of printf() for output.  It also helps make sure that the
formatting support (e.g. floats) is consistent between user-directed
output and the logging infrastructure.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-27 13:34:06 -05:00
Peter Bigot 8f682bf9ef doc: fix sorting of predefined
Put the PM-related defines together, in the correct position.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2021-01-27 13:34:06 -05:00
Henrik Brix Andersen 77b8440fd1 drivers: pwm: add API for capturing pwm pulse width and period
Extend the PWM API with optional API functions for capturing PWM pulse
width and period cycles.

Fixes #26026.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2021-01-12 19:43:06 +01:00