include: update documentation to use zephyr/ prefix

Issue #41543

Signed-off-by: Yuval Peress <peress@google.com>
This commit is contained in:
Yuval Peress 2022-04-20 22:03:05 -06:00 committed by Maureen Helm
commit 41e7f30d0f
14 changed files with 28 additions and 28 deletions

View file

@ -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

View file

@ -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)

View file

@ -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 {

View file

@ -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)

View file

@ -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
.. 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:
.. code-block:: C
#include <ztest.h>
#include <zephyr/ztest.h>
struct state {
bool is_hibernating;

View file

@ -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 {

View file

@ -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;

View file

@ -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:
#ifdef CONFIG_USERSPACE
#include <syscall_handler.h>
#include <zephyr/syscall_handler.h>
int z_vrfy_specific_from_user(const struct device *dev, int bar)
{

View file

@ -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)
{

View file

@ -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.

View file

@ -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

View file

@ -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.
.. 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.
.. 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:
.. 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.
.. 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.
.. 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)

View file

@ -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

View file

@ -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.
Code::
#include <smf.h>
#include <zephyr/smf.h>
/* Forward declaration of state table */
static const struct smf_state demo_states[];