In order to bring consistency in-tree, migrate all samples to the use
the new prefix <zephyr/...>. Note that the conversion has been scripted:
```python
from pathlib import Path
import re
EXTENSIONS = ("c", "h", "cpp", "rst")
for p in Path(".").glob("samples/**/*"):
if not p.is_file() or p.suffix and p.suffix[1:] not in EXTENSIONS:
continue
content = ""
with open(p) as f:
for line in f:
m = re.match(r"^(.*)#include <(.*)>(.*)$", line)
if (m and
not m.group(2).startswith("zephyr/") and
(Path(".") / "include" / "zephyr" / m.group(2)).exists()):
content += (
m.group(1) +
"#include <zephyr/" + m.group(2) +">" +
m.group(3) + "\n"
)
else:
content += line
with open(p, "w") as f:
f.write(content)
```
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
|
||
|---|---|---|
| .. | ||
| src | ||
| CMakeLists.txt | ||
| prj.conf | ||
| README.rst | ||
| sample.yaml | ||
.. _fxas21002: FXAS21002 Gyroscope Sensor ########################## Overview ******** A sensor application that demonstrates how to use the fxas21002 data ready interrupt to read gyroscope data synchronously. Building and Running ******************** This project outputs sensor data to the console. It requires an fxas21002 sensor, which is present on the :ref:`hexiwear_k64` board. It does not work on QEMU. .. zephyr-app-commands:: :zephyr-app: samples/sensor/fxas21002 :board: hexiwear_k64 :goals: build :compact: Sample Output ============= .. code-block:: console X= -2.063 Y= 0.813 Z= 0.188 X= -1.750 Y= 1.063 Z= 0.063 X= -2.000 Y= 0.625 Z= 0.063 X= -2.188 Y= 0.625 Z= 0.188 X= -2.125 Y= 1.313 Z= -0.063 X= -2.188 Y= 1.188 Z= 0.313 <repeats endlessly>