Browse Source

include: update documentation to use zephyr/ prefix

Issue #41543

Signed-off-by: Yuval Peress <peress@google.com>
pull/45024/head
Yuval Peress 3 years ago committed by Maureen Helm
parent
commit
41e7f30d0f
  1. 2
      doc/build/dts/api-usage.rst
  2. 2
      doc/build/dts/bindings.rst
  3. 2
      doc/build/dts/howtos.rst
  4. 6
      doc/connectivity/networking/api/8021Qav.rst
  5. 6
      doc/develop/test/ztest.rst
  6. 2
      doc/hardware/pinctrl/index.rst
  7. 2
      doc/kernel/data_structures/mpsc_pbuf.rst
  8. 4
      doc/kernel/drivers/index.rst
  9. 2
      doc/kernel/timing_functions/index.rst
  10. 2
      doc/kernel/usermode/memory_domain.rst
  11. 2
      doc/services/debugging/gdbstub.rst
  12. 12
      doc/services/logging/index.rst
  13. 8
      doc/services/settings/index.rst
  14. 4
      doc/services/smf/index.rst

2
doc/build/dts/api-usage.rst vendored

@ -349,7 +349,7 @@ compatible with less typing, like this: @@ -349,7 +349,7 @@ compatible with less typing, like this:
.. code-block:: c
#include <devicetree.h>
#include <zephyr/devicetree.h>
#define DT_DRV_COMPAT my_driver_compat

2
doc/build/dts/bindings.rst vendored

@ -1132,7 +1132,7 @@ gpio_dt_spec``, then use it like this: @@ -1132,7 +1132,7 @@ gpio_dt_spec``, then use it like this:
.. code-block:: C
#include <drivers/gpio.h>
#include <zephyr/drivers/gpio.h>
#define ZEPHYR_USER_NODE DT_PATH(zephyr_user)

2
doc/build/dts/howtos.rst vendored

@ -415,7 +415,7 @@ device-specific configuration and data structures and API functions, like this: @@ -415,7 +415,7 @@ device-specific configuration and data structures and API functions, like this:
.. code-block:: c
/* my_driver.c */
#include <drivers/some_api.h>
#include <zephyr/drivers/some_api.h>
/* Define data (RAM) and configuration (ROM) structures: */
struct my_dev_data {

6
doc/connectivity/networking/api/8021Qav.rst

@ -42,9 +42,9 @@ The application can configure the credit-based shaper like this: @@ -42,9 +42,9 @@ The application can configure the credit-based shaper like this:
.. code-block:: c
#include <net/net_if.h>
#include <net/ethernet.h>
#include <net/ethernet_mgmt.h>
#include <zephyr/net/net_if.h>
#include <zephyr/net/ethernet.h>
#include <zephyr/net/ethernet_mgmt.h>
static void qav_set_status(struct net_if *iface,
int queue_id, bool enable)

6
doc/develop/test/ztest.rst

@ -196,7 +196,7 @@ Here is a generic template for a test showing the expected use of @@ -196,7 +196,7 @@ Here is a generic template for a test showing the expected use of
.. code-block:: C
#include <ztest.h>
#include <zephyr/ztest.h>
extern void test_sometest1(void);
extern void test_sometest2(void);
@ -227,7 +227,7 @@ Alternatively, it is possible to split tests across multiple files using @@ -227,7 +227,7 @@ Alternatively, it is possible to split tests across multiple files using
.. code-block:: C
#include <ztest.h>
#include <zephyr/ztest.h>
void test_sometest1(void) {
zassert_true(1, "true");
@ -251,7 +251,7 @@ state and different test suites need to run. This is achieved in the following: @@ -251,7 +251,7 @@ state and different test suites need to run. This is achieved in the following:
.. code-block:: C
#include <ztest.h>
#include <zephyr/ztest.h>
struct state {
bool is_hibernating;

2
doc/hardware/pinctrl/index.rst

@ -446,7 +446,7 @@ The example below contains a complete example of a device driver that uses the @@ -446,7 +446,7 @@ The example below contains a complete example of a device driver that uses the
#define DT_DRV_COMPAT mydev
...
#include <drivers/pinctrl.h>
#include <zephyr/drivers/pinctrl.h>
...
struct mydev_config {

2
doc/kernel/data_structures/mpsc_pbuf.rst

@ -90,7 +90,7 @@ User header structure must start with internal header: @@ -90,7 +90,7 @@ User header structure must start with internal header:
.. code-block:: c
#include <sys/mpsc_packet.h>
#include <zephyr/sys/mpsc_packet.h>
struct foo_header {
MPSC_PBUF_HDR;

4
doc/kernel/drivers/index.rst

@ -194,7 +194,7 @@ A device-specific API definition typically looks like this: @@ -194,7 +194,7 @@ A device-specific API definition typically looks like this:
.. code-block:: C
#include <drivers/subsystem.h>
#include <zephyr/drivers/subsystem.h>
/* When extensions need not be invoked from user mode threads */
int specific_do_that(const struct device *dev, int foo);
@ -235,7 +235,7 @@ implementation of both the subsystem API and the specific APIs: @@ -235,7 +235,7 @@ implementation of both the subsystem API and the specific APIs:
#ifdef CONFIG_USERSPACE
#include <syscall_handler.h>
#include <zephyr/syscall_handler.h>
int z_vrfy_specific_from_user(const struct device *dev, int bar)
{

2
doc/kernel/timing_functions/index.rst

@ -51,7 +51,7 @@ This shows an example on how to use the timing functions: @@ -51,7 +51,7 @@ This shows an example on how to use the timing functions:
.. code-block:: c
#include <timing/timing.h>
#include <zephyr/timing/timing.h>
void gather_timing(void)
{

2
doc/kernel/usermode/memory_domain.rst

@ -237,7 +237,7 @@ BSS. @@ -237,7 +237,7 @@ BSS.
.. code-block:: c
#include <app_memory/app_memdomain.h>
#include <zephyr/app_memory/app_memdomain.h>
/* Declare a k_mem_partition "my_partition" that is read-write to
* user mode. Note that we do not specify a base address or size.

2
doc/services/debugging/gdbstub.rst

@ -252,7 +252,7 @@ how GDB stub works. @@ -252,7 +252,7 @@ how GDB stub works.
test () at <ZEPHYR_BASE>/samples/subsys/debug/gdbstub/src/main.c:13
13 {
(gdb) list
8 #include <sys/printk.h>
8 #include <zephyr/sys/printk.h>
9
10 #define STACKSIZE 512
11

12
doc/services/logging/index.rst

@ -225,7 +225,7 @@ if custom log level is not provided. @@ -225,7 +225,7 @@ if custom log level is not provided.
.. code-block:: c
#include <logging/log.h>
#include <zephyr/logging/log.h>
LOG_MODULE_REGISTER(foo, CONFIG_FOO_LOG_LEVEL);
If the module consists of multiple files, then ``LOG_MODULE_REGISTER()`` should
@ -237,7 +237,7 @@ is used if custom log level is not provided. @@ -237,7 +237,7 @@ is used if custom log level is not provided.
.. code-block:: c
#include <logging/log.h>
#include <zephyr/logging/log.h>
/* In all files comprising the module but one */
LOG_MODULE_DECLARE(foo, CONFIG_FOO_LOG_LEVEL);
@ -250,7 +250,7 @@ provided. @@ -250,7 +250,7 @@ provided.
.. code-block:: c
#include <logging/log.h>
#include <zephyr/logging/log.h>
static inline void foo(void)
{
@ -286,7 +286,7 @@ In order to use instance level filtering following steps must be performed: @@ -286,7 +286,7 @@ In order to use instance level filtering following steps must be performed:
.. code-block:: c
#include <logging/log_instance.h>
#include <zephyr/logging/log_instance.h>
struct foo_object {
LOG_INSTANCE_PTR_DECLARE(log);
@ -345,7 +345,7 @@ Following snippet shows how logging can be processed in simple forever loop. @@ -345,7 +345,7 @@ Following snippet shows how logging can be processed in simple forever loop.
.. code-block:: c
#include <log_ctrl.h>
#include <zephyr/log_ctrl.h>
void main(void)
{
@ -613,7 +613,7 @@ to the pool. It is up to the backend how message is processed. @@ -613,7 +613,7 @@ to the pool. It is up to the backend how message is processed.
.. code-block:: c
#include <log_backend.h>
#include <zephyr/logging/log_backend.h>
void put(const struct log_backend *const backend,
struct log_msg *msg)

8
doc/services/settings/index.rst

@ -225,10 +225,10 @@ up from where it was before restart. @@ -225,10 +225,10 @@ up from where it was before restart.
.. code-block:: c
#include <zephyr.h>
#include <sys/reboot.h>
#include <settings/settings.h>
#include <sys/printk.h>
#include <zephyr/zephyr.h>
#include <zephyr/sys/reboot.h>
#include <zephyr/settings/settings.h>
#include <zephyr/sys/printk.h>
#include <inttypes.h>
#define DEFAULT_FOO_VAL_VALUE 0

4
doc/services/smf/index.rst

@ -122,7 +122,7 @@ the initial state is S0. @@ -122,7 +122,7 @@ the initial state is S0.
Code::
#include <smf.h>
#include <zephyr/smf.h>
/* Forward declaration of state table */
static const struct smf_state demo_states[];
@ -230,7 +230,7 @@ S0 and S1 share a parent state and S0 is the initial state. @@ -230,7 +230,7 @@ S0 and S1 share a parent state and S0 is the initial state.
Code::
#include <smf.h>
#include <zephyr/smf.h>
/* Forward declaration of state table */
static const struct smf_state demo_states[];

Loading…
Cancel
Save