Commit graph

296 commits

Author SHA1 Message Date
Martí Bolívar ffd1abde66 include: devicetree.h: API for /chosen zephyr,foo
Add a devicetree/zephyr.h header, which is meant to contain
definitions for /chosen properties specific to Zephyr.

Currently, this just deals with zephyr,entropy.  We add a
DT_CHOSEN_ZEPHYR_ENTROPY_LABEL macro which expands to the label for the
node pointed to by zephyr,entropy.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-04-13 09:14:21 -05:00
Peter Bigot 8bd676ed38 sys: onoff: generalize and shorten API
The original API was misnamed, as the intent was to provide a manager
that decoupled state management from the service that needed to be
turned on or off.  Update all the names, shortening them where
appropriate removing unncessary internal components like _service.

Also remove some API that misled developers into believing that onoff
managers are normally expected to be exposed directly to consumers.
While this is a use case, in most situations there are service or
client-specific actions that need to be coupled to transition events.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-06 16:41:41 +02:00
Peter Bigot fadd98aad2 sys: add generic asynchronous notification infrastructure
k_poll() for a signal is often desired for notification of completion
of asynchronous operations, but there are APIs where it may be
necessary to invoke "asynchronous" operations from contexts where
sleep is disallowed, or before the kernel has been initialized.
Extract the general notification solution from the on-off service into
a utility that can be used for other APIs.

Also move documentation out to a resource management section.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-04-06 16:41:41 +02:00
Andrew Boie cc680a83dd doc: syscalls: expand docs on data copying
Show best practices when handling parameters passed to
system calls by reference.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-04-01 23:34:02 -04:00
Andrew Boie 68a2fe8262 doc: usermode: fix terminology
Handler functions are now referred to as verification functions,
update documentation to reflect this.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-04-01 23:34:02 -04:00
Alexander Wachter f020780ee3 doc: API stability: Change HWINFO from unstable to stable
Change the API status of the HWINFO API from unstable to stable.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2020-03-31 16:17:08 +02:00
Oleg Zhurakivskyy c408fa88a3 toolchain: common: Merge build assert macros
In order to de-duplicate 2 macros with the same use,
merge BUILD_ASSERT(), BUILD_ASSERT_MSG() into one macro.

Make BUILD_ASSERT_MSG() deprecated.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-03-31 07:18:06 +02:00
Martí Bolívar 413e16d7bf devicetree.h: sort sub-includes and API docs for them
Trivial cleanup: sort the devicetree/foo.h includes and the relevant
sections for them in the documentation.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-29 09:10:04 -05:00
Andrew Boie df2b1144da doc: clarify syscall Z_OOPS() policy
As described in #17735.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-26 09:47:48 -07:00
Martí Bolívar 6e57b42758 doc: dts: revisit documentation
This is joint work with Kumar Gala (see signed-off-by).

Document the changes to the generated node macros in macros.bnf,
moving the old file to legacy-macros.bnf and putting it in its own
section.

The actual generated macros are now a low-level detail, so rewrite the
foregoing sections as examples in terms of the new <devicetree.h> APIs.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2020-03-24 10:11:20 -05:00
Martí Bolívar 4ba332aca8 doc: rename reference/stability to reference/overview
This page has a lot more information about APIs than just stability,
and I believe it's currently our only exhaustive list of APIs.

Rename it to API Overview.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-03-23 15:40:12 +01:00
Ioannis Glaropoulos b61ba8df4a doc: reference: kernel: remove inconsistent comment for k_cpu_idle
k_cpu_idle() API does not need to be invoked with interrupts
unlocked; it is actually invoked with interrupts locked by
the kernel CPU idling mechanism. In most architectures, the
function is, actually, un-locking interrupts itself. We need
to remove this comment from the documentation of the CPU
idle API. We add a note about the un-locking of interrupts.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-03-20 11:53:14 +01:00
Carles Cufi cd38fb1610 Revert "toolchain: common: Merge build assert macros"
This reverts commit 974aa3add4.

Pull Request #23437 was merged by mistake with an invalid manifest.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-19 18:45:13 +01:00
Oleg Zhurakivskyy 974aa3add4 toolchain: common: Merge build assert macros
In order to de-duplicate 2 macros with the same use,
merge BUILD_ASSERT(), BUILD_ASSERT_MSG() into one macro.

Make BUILD_ASSERT_MSG() deprecated.

Signed-off-by: Oleg Zhurakivskyy <oleg.zhurakivskyy@intel.com>
2020-03-19 15:47:53 +01:00
Carles Cufi 39930ca298 doc: reference: Add API Stability page
Add a page documenting the stability of Zephyr APIs.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Carles Cufi 4ffeb79ecd doc: reference: Add disk access API
Add the disk access API to the doc reference.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Carles Cufi 68bfb5c3f2 doc: reference: Add clock control API
Add the clock control API to the documentation reference.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Carles Cufi 22854d39c0 doc: reference: Add the LED and LED Strip APIs
Add the LED (regular and strip) APIs to the doc.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Carles Cufi 46f108519d doc: reference: Add hwinfo API
Add the hwinfo API to the reference documentation.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Carles Cufi 5690b1e69d doc: reference: Add pages for audio
Add reference pages for the following APIs:

- Audio Codec
- DMIC

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Carles Cufi ab03b538d4 doc: reference: Add GNA API entry
Add an entry for the GNA API.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Carles Cufi bf41dd943b doc: reference: Clean up and restructure a bit
Name all subsystem reference consistently with an '_api' postfix and
clean up naming and folder structure in some cases.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Carles Cufi bb01382c18 doc: reference: Move terminology to its own page
Move the terminology section to its own page in preparation for
additional sections to be addded later.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-03-18 11:47:24 +01:00
Andrew Boie 28be793cb6 kernel: delete separate logic for priv stacks
This never needed to be put in a separate gperf table.
Privilege mode stacks can be generated by the main
gen_kobject_list.py logic, which we do here.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-17 20:11:27 +02:00
Andrew Boie ae8acffaa6 doc: fix some missed renames
These were renamed to z_ prefix some time ago, but not updated
in these places.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-17 20:11:27 +02:00
Andrew Boie 2dc2ecfb60 kernel: rename struct _k_object
Private type, internal to the kernel, not directly associated
with any k_object_* APIs. Is the return value of z_object_find().
Rename to struct z_object.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-17 20:11:27 +02:00
Andrew Boie 4bad34e749 kernel: rename _k_thread_stack_element
Private data type, prefix with z_.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-17 20:11:27 +02:00
Andrew Boie f2734ab022 kernel: use a union for kobject data values
Rather than stuffing various values in a uintptr_t based on
type using casts, use a union for this instead.

No functional difference, but the semantics of the data member
are now much clearer to the casual observer since it is now
formally defined by this union.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-17 20:11:27 +02:00
Anas Nashif b12869a3f9 docs: crypto: crypto API documentation
Fix crypto API doxygen syntax and integrate into documentation as RST.

Fixes #21820

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-03-14 13:01:03 -04:00
Jose Alberto Meza 63d26c8b1d doc: reference: peripherals: Add PECI API documentation
Add PECI API documentation

Signed-off-by: Jose Alberto Meza <jose.a.meza.arellano@intel.com>
2020-03-13 18:53:04 +02:00
Andrew Boie 806c8af660 doc: add k_thread_join() to documentation
Added to the section covering thread termination.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-13 08:42:43 -04:00
Andrew Boie 81cfb08f52 random: remove rand32_timestamp.c
This is a copy of rand32_timer.c that uses
z_do_read_cpu_timestamp32() instead of k_cycle_get_32(),
with some logic to ensure different values when called in
rapid succession missing.

Like the other driver, its reported values are not random,
it's a testing generator only.

This appears to have no advantages over rand32_timer.c,
just remove it. In QEMU emulation, the reported TSC values
tend to have the lowest five bits zeroed.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2020-03-10 10:40:13 -04:00
Jacob Siverskog 09ade0191d doc/reference/runtime_conf: improve example snippet
Improve settings example snippet so that it builds and works as
expected. For usability purposes, add print of stored value.

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2020-03-10 15:11:27 +02:00
Andrzej Puzdrowski 208f15e521 doc/reference/runtime_conf/settings: reference missing API group
Added references to missing settings API groups so them
will be generated in documentation build.

Missing API are doxygen subgroup of already referenced doxygen group,
but subgroups aren't automatically extracted to the documentation
output.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-02-27 11:35:19 +02:00
Ulf Magnusson 47963cae3f doc: dts: Add lots of documentation for generated macros
Add detailed documentation for macros that get generated by
gen_defines.py. Covers properties, interrupts, phandle-arrays, clocks,
buses, flash partitions, SPI, etc.

Should be relatively complete now, though there might be overlooked
details.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Co-Authored-By: Kumar Gala <kumar.gala@linaro.org>
Co-Authored-By: Marti Bolivar <marti.bolivar@nordicsemi.no>
2020-02-18 15:24:59 -06:00
Jukka Rissanen 24abb19f41 doc: net: Add information about GSM modem support
General information about GSM modem added.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2020-02-18 18:52:43 +02:00
Alexander Wachter 10ed5d55d0 doc: networking: Add ISO-TP documentation
This commit adds the documentation for the ISO-TP library

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2020-02-06 10:16:29 +02:00
Jacob Siverskog 6c218ac2c6 doc/reference/runtime_conf: improve example snippets
Improve settings example snippets by ordering things so that they
actually compile.

Signed-off-by: Jacob Siverskog <jacob@teenage.engineering>
2020-02-05 20:32:52 -05:00
Robert Lubos bea1093e62 net: sockets: Remove socket offloading interface
Instead of using a custom offloading interface, users can use
`NET_SOCKET_REGISTER` macro to register custom socket API provider. This
solution removes a limitation, that only one offloaded interface can be
registered and that it cannot be used together with native IP stack.

The only exception remainig are DNS releated operations -
`getaddrinfo`/`freeaddrinfo`, which, when offloaded, have to be
registered specifically.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-01-31 11:36:02 -05:00
Andrzej Puzdrowski 42c09c99e9 samples/subsys/settings: add the readme doc
Added readme file for the sample

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-01-31 07:45:52 -05:00
Peter A. Bigot 1964bf08bb lib: os: onoff: add API for on-off service request and release management
There are various situations where it's necessary to support turning
devices on or off at runtime, includin power rails, clocks, other
peripherals, and binary device power management.  The complexity of
properly managing multiple consumers of a device in a multithreaded
system suggests that a shared implementation is desirable.  This
commit provides an API that supports managing on-off resources.

Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2020-01-29 14:08:46 +01:00
Peter Bigot 4fcf80d64f doc: reference: add discussion of terms that define API behavior
Define a minimal set of attributes that can be used to indicate the
allowed context for invoking specific Zephyr API and kernel functions,
and the effect of invoking them on thread and other behavior.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-27 16:05:07 +01:00
Peter Bigot 76995b61ac doc: scheduler: define reschedule point
This term needs to be defined to support documenting the effect of
various API calls on scheduler selection of the running thread.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-27 16:05:07 +01:00
Sebastian Bøe 56f6e35e47 cmake: Support passing syscall include directories through CMake
Introduce the CMake variable SYSCALL_INCLUDE_DIRS to support
out-of-tree syscall declarations.

Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
2020-01-22 09:26:12 -05:00
Andrzej Puzdrowski 68f51f66c6 doc: cleanup after NFFS removal
Patch introduce references to LittleFS instead of NFFS where it
was suitable. In other places NFFS mentions were removed

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2020-01-21 15:32:47 +01:00
Robert Lubos 665d195f3a net: sockets: tls: Add missing symbols for a few options
`TLS_PEER_VERIFY` and `TLS_DTLS_ROLE` options accept specific values,
yet no symbols were defined for them. In result, magic numbers were used
in several places, making the code less readable.

Fix this issue, by adding the missing symbols to the `socket.h` header,
and using them in places where related socket options are set.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2020-01-20 09:58:23 +02:00
Ioannis Glaropoulos c393f3f87a doc: interrupts: add documentation section for zero-latency IRQs
Add a simple documentation section for the Zero-Latency
IRQs feature supported by the kernel.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-01-08 19:57:56 -05:00
Ioannis Glaropoulos 0eb93c201b doc: list dynamic direct interrupts as ARM supported API
Document that the Dynamic Direct interrupts feature is
implemented and supported as an ARM-only API.

Signed-off-by: Ioannis Glaropoulos <Ioannis.Glaropoulos@nordicsemi.no>
2020-01-08 10:15:09 -08:00
Andrei Emeltchenko e8da2b80f9 doc: native_posix: Add mention about virtual USB
Add information and link to Virtual USB controller.

Fixes #13232.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2020-01-06 13:57:36 -05:00
Peter Bigot 74ef395332 kernel: move test of kernel startup state to more visible location
The original implementation left this function hidden in init.h which
prevented it from showing up in documentation.  Move it to kernel.h,
and document it consistent with the other functions that allow caller
customization based on context.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2020-01-06 13:55:31 -05:00
David B. Kinder 17299f0734 doc: document python build scripts
We have a collection of python scripts that are part of our build
system.  This PR collects docstring comments added to these scripts into
a summary document.  Previous references to just the script name in
other documentation are updated to point to this build tool
documentation.

Some of the scripts needed an update to be processed (via include
directives) consistently.

Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2020-01-02 17:09:29 -05:00
Carlo Caione aec9a8c4be arch: arm: Move ARM code to AArch32 sub-directory
Before introducing the code for ARM64 (AArch64) we need to relocate the
current ARM code to a new AArch32 sub-directory. For now we can assume
that no code is shared between ARM and ARM64.

There are no functional changes. The code is moved to the new location
and the file paths are fixed to reflect this change.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2019-12-20 11:40:59 -05:00
Andrei Stoica cc19e72497 docs: Bluetooth: HCI_VS: Updated docs on VS HCI commands
This commit complements documentation of Zephyr HCI VS
commands. In particular, it documents the newly introduced
commands

- BT_HCI_OP_VS_WRITE_TX_POWER_LEVEL
- BT_HCI_OP_VS_READ_TX_POWER_LEVEL

These provide HCI-level control over the Tx power of the
BLE radio on a per role/connection basis.

The functionality is enabled upon the Kconfig advanced configuration
triggered by

- BT_CTLR_TX_PWR_DYNAMIC_CONTROL

depending on the enablement of Zephyr HCI vendor-specific command
extensions.

Signed-off-by: Andrei Stoica <stoica.razvan.andrei@gmail.com>
2019-12-17 12:29:57 +01:00
Ulf Magnusson 984bfae831 global: Remove leading/trailing blank lines in files
Remove leading/trailing blank lines in .c, .h, .py, .rst, .yml, and
.yaml files.

Will avoid failures with the new CI test in
https://github.com/zephyrproject-rtos/ci-tools/pull/112, though it only
checks changed files.

Move the 'target-notes' target in boards/xtensa/odroid_go/doc/index.rst
to get rid of the trailing blank line there. It was probably misplaced.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2019-12-11 19:17:27 +01:00
Jukka Rissanen 38db500fe5 doc: net: Enhance 802.1Qav documentation
There was no examples how to set the Qav parameters from application.

Fixes #21074

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-12-03 14:07:32 -06:00
Trond Einar Snekvik deeb4f320d Bluetooth: Mesh: Restructure doc
Adds a deeper hierarchy to the Bluetooth Mesh documentation by moving
the modules in separate pages with a brief description of the concepts
in each module.

Adds the full list of specification defined Health model faults.

Signed-off-by: Trond Einar Snekvik <Trond.Einar.Snekvik@nordicsemi.no>
2019-11-27 13:32:45 -05:00
Peter Bigot 40ac3c4663 docs: kernel: standardize thread state capitalization
All states in the thread state diagram were initial-cap except
"suspended".  Make it Suspended for consistency.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-11-21 09:00:26 +01:00
Andrzej Puzdrowski 38510cec22 doc/reference/runtime_conf: fix example snippets
Removed some cut/paste from mynewt with references to os_callout,
os_event in example snippets.

code examples were also aligned to current settings handle API.

fixes #20743

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-11-19 10:21:37 +01:00
Andy Ross 52d6e5983f doc/kernel/smp: Add initialization diagram
Add a simple block diagram detailing the SMP initialization flow.  Not
pretty, but hopefully reasonable.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-11-14 19:13:27 -05:00
Anas Nashif 8b089d2699 doc: kernel: use kconfig documentation in main kernel doc
Documentation about scheduling options was burried in the Kconfig help.
It has better visibility as part of the scheduling section of the main
kernel reference pages.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-11-14 09:15:38 -05:00
Andrew Boie cb87cc8fd6 doc: add two diagrams to user mode documentation
One shows how globals are routed for automatic memory
domains. The other illustrates control flow when making
system calls.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-11-13 15:55:44 -08:00
Andrei Emeltchenko 19e434d777 doc: usb: Update USB documentation
Update documentation, removing outdated usb_set_config()
initialization method.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2019-11-12 15:44:55 +01:00
Henrik Brix Andersen 0ea5503ce3 doc: reference: peripherals: add EEPROM API documentation
Add documentation for the EEPROM API to the peripheral reference
section.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2019-11-09 08:59:28 -05:00
Andy Ross 8892406c1d kernel/sys_clock.h: Deprecate and convert uses of old conversions
Mark the old time conversion APIs deprecated, leave compatibility
macros in place, and replace all usage with the new API.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-11-08 11:08:58 +01:00
Andrew Boie 4f77c2ad53 kernel: rename z_arch_ to arch_
Promote the private z_arch_* namespace, which specifies
the interface between the core kernel and the
architecture code, to a new top-level namespace named
arch_*.

This allows our documentation generation to create
online documentation for this set of interfaces,
and this set of interfaces is worth treating in a
more formal way anyway.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-11-07 15:21:46 -08:00
Andrew Boie 800b35f598 kernel: use uintptr_t for syscall arguments
We need to pass system call args using a register-width
data type and not hard-code this to u32_t.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-11-06 09:04:16 -08:00
David Leach afdc63f320 subsys/random: Add cryptographically secure and bulk fill functions
1) Add cryptographically secure random functions to provide
FIPS 140-2 compliant random functions.

2) Add name to random function choice selectors to ease
selection in SOC .defconfig files

3) Add bulk fill random functions.

Signed-off-by: David Leach <david.leach@nxp.com>
2019-11-05 19:36:42 +01:00
Torsten Rasmussen 1f9723af19 cmake: app mem partion flexibility
This commit allows a more dynamic approach for specifying that a zephyr
library must be placed in a dedicated app memomory partition.
This is still done by defining the partition in code using
K_APPMEM_PARTITION_DEFINE, but now the zephyr library can be added to
the generation of partition table using zephyr_library_app_memory
instead of modifying the overall zephyr/CMakeLists.txt file.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2019-11-05 08:44:26 -08:00
Andrzej Puzdrowski af0abb2b8d doc/reference: move the settings doc higher
Settings documentation was placed under storage paragraph
in documentation tree, which suggested that it was another
storage solution. In fact settings uses storage modules as
its persistent storage back-end.

This patch creates dedicated run-time configuration paragraph
which aim to explain existence (and emphasize) of common run-time
configuration system in Zephyr-RTOS and rationale for using it.
The Settings paragraph is placed under this paragraph as it is only
sub-module which implements the solution.

Signed-off-by: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
2019-11-05 14:06:22 +01:00
François Delawarde 468a834af0 settings: fix custom backend example
Fix example of custom backend implementation

Fixes: #20163.

Signed-off-by: François Delawarde <fnde@oticon.com>
2019-10-31 08:16:09 +01:00
Jukka Rissanen 86bf182f55 doc: net: Add information about SOCKS5 proxy support
Describe how to use the SOCKS5 networking API.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-29 08:27:39 +02:00
Loic Poulain 32169886ca drivers: Add video API
This generic video API can be used to capture/output video frames.

Once a video buffer is enqueued to a video device endpoint, device owns
the buffer and can process to capture (camera), output (disk, display),
convert (hw encoder)... User can then call dequeue to retrieve
the processed buffer (video driver ensure cache coherency).

Once dequeued, video buffer is owned by user (e.g. for frame
processing, display buffer update, write to media, etc...).

For each video-buffer, user needs allocate the associated frame buffer
via video_buffer_alloc. Buffer format is defined by video device
endpoint configuration. Video device can be controlled (e.g. contrast,
brightness, flip...) via controls.

Signed-off-by: Loic Poulain <loic.poulain@linaro.org>
2019-10-25 15:13:53 -05:00
Jukka Rissanen 3cbf4a203d doc: net: Add Websocket API documentation
Add documentation for the Websocket API, also add information how
to use the Websocket as a transport for other high level protocols
like MQTT.

Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2019-10-25 14:03:25 +03:00
Francisco Munoz 60d5657c72 doc: peripherals: KSCAN API documentation
Append KSCAN API to the list of peripherals

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-10-16 13:29:21 -07:00
Christoph Reiter a92a35c2f3 doc: fix list formatting in ring_buffer
There is one level of spaces too much which leads to incorrect
formatting.

Signed-off-by: Christoph Reiter <christoph.reiter@infineon.com>
2019-10-15 09:54:39 -07:00
Radoslaw Koppel bb9c453777 settings: doc: Update the backend documentation
This commit updates the settings backend documentation
to clearly state that it cannot provide old entities
before the final one.

Signed-off-by: Radoslaw Koppel <radoslaw.koppel@nordicsemi.no>
2019-10-14 12:05:42 +02:00
Håkon Øye Amundsen f20127c137 doc: use simpler words for describing scheduling
Use simple terms when possible.
'inhibit' -> 'prevent'
'supplanted' -> 'replaced'

Signed-off-by: Håkon Øye Amundsen <haakon.amundsen@nordicsemi.no>
2019-10-08 10:21:39 -07:00
Marti Bolivar 27e5dd131f doc: s/device tree/devicetree/
DTSpec writes this as a single word, presumably to make it easier to
grep for / more precise. Follow along in the rest of the docs now that
our main DT docs page agrees with this usage.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-10-08 11:53:40 +02:00
Marti Bolivar 2275aae291 doc: add a couple of ref targets
These will be needed later.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-10-08 11:53:40 +02:00
Andy Ross bb746e6ec4 doc/reference/kernel: Add SMP archtecture doc
SMP had API-level docs, but no architecture-level description.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2019-10-04 13:24:40 -07:00
Alexander Wachter 1c7892df3f include: drivers: CAN: changed return parameter description
Changed return parameter description from
"@retval filter id on success"  to
"@retval filter_id on success".
This change suppresses the doxy warnings.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-10-04 13:05:44 -04:00
Alexander Wachter 5b0a7d3523 doc: CAN: Extend CAN doc and moved it to networking
This commit adds a lot more documentation to the Controller Area
Netwok API. The documentation is move to the networking section.

Signed-off-by: Alexander Wachter <alexander.wachter@student.tugraz.at>
2019-10-04 13:05:44 -04:00
Piotr Zięcik 19d8349aa5 kernel: Introduce k_work_poll
This commit adds new k_work_poll interface. It allows to
submit given work to a workqueue automatically when one of the
watched pollable objects changes its state.

Signed-off-by: Piotr Zięcik <piotr.ziecik@nordicsemi.no>
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-10-04 17:15:17 +02:00
Wentong Wu 8f2da767ee doc: power_management: add diagrams illustrating power management
Add diagram showing the current system power management and the central
method of device power management.

The diagrams were made using draw.io and can be edit using draw.io.y

Signed-off-by: Wentong Wu <wentong.wu@intel.com>
2019-09-27 11:37:40 -04:00
Anas Nashif d803a534c0 docs: kernel: thread documentation enhancements and cleanup
Moving all thread docs into 1 page was a bit too much. Split the section
a bit and remove redundant and useless sections and move some thread
related documentation from the scheduling page to threads (thread states
and priorities).

Add a new figure for thread states.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-25 04:42:51 -04:00
Anas Nashif 25cd3f9f54 docs: kernel: K_FP_REGS is not x86 only
We have more architectures support float now.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2019-09-25 04:42:51 -04:00
Krzysztof Chruscinski cc5094b3bf logging: Add option to block in thread context
Added CONIFG_LOG_BLOCK_IN_THREAD option to block until buffer for
log message is available. When log message is called in the thread
and there is no buffer available in the pool, thread will block with
configurable timeout (CONFIG_LOG_BLOCK_IN_THREAD_TIMEOUT_MS). If
buffer cannot be allocated by that time, message will be dropped.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2019-09-23 22:04:42 -07:00
Andrew Boie 4ce988ab43 doc: provide error handling documentation
We don't really have docs on how fatal errors are induced
or handled. Provide some documentation that covers:

- Assertions (runtime and build)
- Kernel panic and oops conditions
- Stack overflows
- Other exceptions
- Exception handling policy

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-09-23 23:45:08 +02:00
Markus Fuchs c53755e5dd doc/reference/storage/sdhc: Document SDSC support
Add note about standard-capacity SD card support.

Signed-off-by: Markus Fuchs <markus.fuchs@de.sauter-bc.com>
2019-09-19 09:49:07 -05:00
Francisco Munoz 2d8d4e0b1b doc: peripherals: PS/2 API documentation
Append PS/2 API to the list of available peripherals

Signed-off-by: Francisco Munoz <francisco.munoz.ruiz@intel.com>
2019-09-18 13:23:52 +08:00
Henrik Brix Andersen c2869c7e78 doc: reference: settings: list non-volatile storage backend
List the non-volatile storage (NVS) backend in the settings API
reference documentation.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2019-09-17 16:26:40 -05:00
Andrew Boie 714e37fb78 doc: add more details about memory domains
We now more throroughly discuss memory domains, thread
resource pools, and automatic memory domains.

Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2019-09-15 07:08:05 +08:00
Andy Ross 6564974bae userspace: Support for split 64 bit arguments
System call arguments, at the arch layer, are single words.  So
passing wider values requires splitting them into two registers at
call time.  This gets even more complicated for values (e.g
k_timeout_t) that may have different sizes depending on configuration.
This patch adds a feature to gen_syscalls.py to detect functions with
wide arguments and automatically generates code to split/unsplit them.

Unfortunately the current scheme of Z_SYSCALL_DECLARE_* macros won't
work with functions like this, because for N arguments (our current
maximum N is 10) there are 2^N possible configurations of argument
widths.  So this generates the complete functions for each handler and
wrapper, effectively doing in python what was originally done in the
preprocessor.

Another complexity is that traditional the z_hdlr_*() function for a
system call has taken the raw list of word arguments, which does not
work when some of those arguments must be 64 bit types.  So instead of
using a single Z_SYSCALL_HANDLER macro, this splits the job of
z_hdlr_*() into two steps: An automatically-generated unmarshalling
function, z_mrsh_*(), which then calls a user-supplied verification
function z_vrfy_*().  The verification function is typesafe, and is a
simple C function with exactly the same argument and return signature
as the syscall impl function.  It is also not responsible for
validating the pointers to the extra parameter array or a wide return
value, that code gets automatically generated.

This commit includes new vrfy/msrh handling for all syscalls invoked
during CI runs.  Future commits will port the less testable code.

Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
2019-09-12 11:31:50 +08:00
Daniel Leung 863548cf19 doc: mailbox: fix typos and clarify meaning of struct field
This fixes some typos. Also fix the meaning of a struct field
where the confusion caused by copy-and-paste from another
field.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-09-07 10:01:34 -04:00
Marti Bolivar 47f36afdb9 doc: change kernel reference toctree maxdepth to 1
This makes the index cleaner.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-30 13:55:38 +02:00
Marti Bolivar 1e34ea950c doc: add summary table for kernel data passing
Add a table summarizing the key characteristics of each
of the data passing objects.

It is useful for readers to have an overview they can skim without
having to read each section in detail.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-30 13:55:38 +02:00
Marti Bolivar e9c858abc8 doc: split kernel reference toctrees
Splitting these up by area helps make the sidebar a bit easier to
navigate, and will also let us insert additional overview information
about each area.

Signed-off-by: Marti Bolivar <marti.bolivar@nordicsemi.no>
2019-08-30 13:55:38 +02:00
Daniel Leung a358248ae0 doc: drivers: add diagram and clarify a note
Add a simple diagram on the device driver model.

Instead of saying "this device driver", spell out that the note
is for the random number generator driver, as the visual
presentation does not have clear distinction.

Also update some formatting.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2019-08-29 17:33:56 -04:00
Peter A. Bigot 24b67ef119 doc/reference/drivers: document device-specific API extensions
This PR updates the documentation to cover a technical solution to
providing a driver instance that extends the functionality of a
subsystem API.  The solution described was mooted in Zephyr PR #17072
and approved by the Technical Steering Committee during its 2019-08-07
meeting.

Relates-to: #11993
Signed-off-by: Peter A. Bigot <pab@pabigot.com>
2019-08-18 19:34:57 +02:00
Peter Bigot d0c2c4d329 doc/drivers: correct number of initialization levels
When init level hierarchy was reworked the documentation was switched to
describe the new levels, but the count of relevant levels was not
changed.

Signed-off-by: Peter Bigot <peter.bigot@nordicsemi.no>
2019-08-18 13:26:23 +02:00