zephyr/samples/drivers/mbox
Gerard Marull-Paretas 79e6b0e0f6 includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.

The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.

NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-05 16:31:47 +02:00
..
boards dts: nrf5340: Use dual compatible property for mbox nodes 2022-04-02 15:14:38 +02:00
remote includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
src includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h> 2022-09-05 16:31:47 +02:00
CMakeLists.txt cmake: Update messages mode using INFO to the correct mode STATUS 2021-12-15 14:58:05 -06:00
README.rst samples: Add missing READMEs 2022-07-25 15:17:48 +02:00
prj.conf
sample.yaml samples: Specify the remote harness 2022-07-25 15:17:48 +02:00

README.rst

.. _mbox-sample:

MBOX Interface
##############

Overview
********

This sample demonstrates how to use the :ref:`MBOX API <mbox_api>`.

Building and Running
********************

The sample can be built and executed on boards supporting MBOX.

Building the application for nrf5340dk_nrf5340_cpuapp
*****************************************************

.. zephyr-app-commands::
   :zephyr-app: samples/drivers/mbox/
   :board: nrf5340dk_nrf5340_cpuapp
   :goals: debug

Open a serial terminal (minicom, putty, etc.) and connect the board with the
following settings:

- Speed: 115200
- Data: 8 bits
- Parity: None
- Stop bits: 1

Reset the board and the following message will appear on the corresponding
serial port, one is the application (APP) core another is the network (NET)
core:

.. code-block:: console

   *** Booting Zephyr OS build zephyr-v3.1.0-2383-g147aee22f273  ***
   Hello from APP
   Pong (on channel 0)
   Ping (on channel 1)
   Pong (on channel 0)
   Ping (on channel 1)
   Ping (on channel 1)
   Pong (on channel 0)
   Ping (on channel 1)
   Pong (on channel 0)
   Ping (on channel 1)
   ...


.. code-block:: console

   *** Booting Zephyr OS build zephyr-v3.1.0-2383-g147aee22f273  ***
   Hello from NET
   Ping (on channel 0)
   Pong (on channel 1)
   Ping (on channel 0)
   Pong (on channel 1)