• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..--

src/11-Mar-2024-180126

CMakeLists.txtD11-Mar-2024228 96

README.rstD11-Mar-20241.4 KiB5141

prj.confD11-Mar-2024219 109

sample.yamlD11-Mar-20241.1 KiB3332

README.rst

1.. zephyr:code-sample:: zbus-hello-world
2   :name: zbus Hello World
3   :relevant-api: zbus_apis
4
5   Make three threads talk to each other using zbus.
6
7Overview
8********
9This sample implements a simple hello world application using zbus to make the threads talk to each other.
10
11Building and Running
12********************
13
14This project outputs to the console.  It can be built and executed
15on QEMU as follows:
16
17.. zephyr-app-commands::
18   :zephyr-app: samples/subsys/zbus/hello_world
19   :host-os: unix
20   :board: qemu_x86
21   :goals: run
22
23Sample Output
24=============
25
26.. code-block:: console
27
28    D: Sensor sample started raw reading, version 0.1-2!
29    D: Channel list:
30    D: 0 - Channel acc_data:
31    D:       Message size: 12
32    D:       Observers:
33    D:       - my_listener
34    D:       - my_subscriber
35    D: 1 - Channel version:
36    D:       Message size: 4
37    D:       Observers:
38    D: Observers list:
39    D: 0 - Listener my_listener
40    D: 1 - Subscriber my_subscriber
41    D: START processing channel acc_data change
42    D: From listener -> Acc x=1, y=1, z=1
43    D: FINISH processing channel acc_data change
44    D: From subscriber -> Acc x=1, y=1, z=1
45    D: START processing channel acc_data change
46    D: From listener -> Acc x=2, y=2, z=2
47    D: FINISH processing channel acc_data change
48    D: From subscriber -> Acc x=2, y=2, z=2
49
50Exit QEMU by pressing :kbd:`CTRL+A` :kbd:`x`.
51