79e6b0e0f6
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> |
||
---|---|---|
.. | ||
src | ||
CMakeLists.txt | ||
prj.conf | ||
README.rst | ||
sample.yaml |
.. _x-nucleo-iks01a1-sample: X-NUCLEO-IKS01A1: MEMS inertial and environmental multi-sensor shield ##################################################################### Overview ******** This sample enables all sensors of a X-NUCLEO-IKS01A1 shield, and then periodically reads and displays data from the shield sensors: - HTS221: Temperature and humidity - LPS25HB: Atmospheric pressure - LIS3MDL: 3-axis Magnetic field intensity - LSM6DSL: 3-Axis Acceleration Requirements ************ This sample communicates over I2C with the X-NUCLEO-IKS01A1 shield stacked on a board with an Arduino connector. The board's I2C must be configured for the I2C Arduino connector (both for pin muxing and devicetree). Please note that this sample can't be used with boards already supporting one of the sensors available on the shield (such as disco_l475_iot1) as zephyr does not yet support sensors multiple instances. References ********** -X-NUCLEO-IKS01A1: http://www.st.com/en/ecosystems/x-nucleo-iks01a1.html Building and Running ******************** This sample runs with X-NUCLEO-IKS01A1 stacked on any board with a matching Arduino connector. For this example, we use a :ref:`nucleo_f429zi_board` board. .. zephyr-app-commands:: :zephyr-app: samples/shields/x_nucleo_iks01a1 :board: nucleo_f429zi :goals: build :compact: Sample Output ============= .. code-block:: console X-NUCLEO-IKS01A1 sensor dashboard HTS221: Temperature:29.1 C HTS221: Relative Humidity:46.0% LPS25HB: Pressure:100.0 kpa LIS3MDL: Magnetic field (gauss): x: 0.1, y: -0.4, z: 0.4 LSM6DS0: Acceleration (m.s-2): x: -0.0, y: -0.1, z: 9.7 <updated endlessly every 2 seconds>