mirror of
https://github.com/zephyrproject-rtos/zephyr
synced 2025-09-01 12:32:44 +00:00
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 |
.. _sm351lt: SM351LT: Magnetoresistive Sensor Example ######################################## Overview ******** This sample application periodically polls an SM351LT magnetoresistive sensor and displays if a magnet near to the sensor, via the console. Requirements ************ This sample uses the Honeywell SM351LT sensor. References ********** For more information about the SM351LT magnetoresistive sensor see https://sensing.honeywell.com/SM351LT-low-power Building and Running ******************** The SM351LT (or compatible) sensors are available on the following boards: * :ref:`bt510` Building on bt510 ================== :ref:`bt510` includes a Honeywell SM351LT magnetoresistive sensor. .. zephyr-app-commands:: :zephyr-app: samples/sensor/sm351lt :board: bt510 :goals: build flash :compact: Sample Output ============= .. code-block:: console Polling at 0.5 Hz #1 @ 6 ms: 1 #2 @ 2007 ms: 0 #3 @ 4009 ms: 0 #4 @ 6010 ms: 1 #5 @ 8012 ms: 1