Commit Graph

783 Commits

Author SHA1 Message Date
Benjamin Cabé
f7ad282504 boards: arduino: doc: Adopt Sphinx custom board directives
Adds zephyr:board and zephyr:board-supported-hw directives to the
Arduino docs in order to generate more of the boards' documentation
automatically.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-18 16:40:59 +01:00
Andreas Klinger
8286db1ae7 samples: sensor: veml6031: add attribution test application
- Test all attribute combinations of Vishay sensor VEML6031 which is an
  ambient light sensor.
- Print out saturation case of sensor.
- Idea is to be able to find a good combination of attributes for an
  optimal working area.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
2025-03-14 14:40:12 +01:00
Anas Nashif
322b358368 samples: sensors: bme280: fix filters
SPI scenario was not matching any filters, fix it.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-13 07:23:36 +01:00
Anas Nashif
616780bbc5 samples: sensors: lis2dh: fix filtering
Sample was not hitting any filters, make it build and fix filters.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-13 07:23:36 +01:00
Maureen Helm
a930faa151 samples: sensor: Refactor accelerometer sample configs
Refactors accelerometer polling and trigger sample.yaml to avoid
duplicating values shared between multiple configurations.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2025-03-12 02:28:09 +01:00
Alberto Escolar Piedras
cb53e40ff9 drivers uart_native_posix: rename to native_pty and support N instances
Rename the driver from uart_native_posix to uart_native_pty.
Including renaming the DTS compatible, and kconfig options, deprecating
the old ones.

And refactor the driver, generalizing it, so we can have any number of
instances.
Note that, unfortunately generalizing to N instances cannot be done
without a degree of backwards compatibility breakage: This driver was
born with all its configuration and selection of the instances based on
kconfig.
When the driver was made to use DT, it was done in a way that required
both DT and kconfig needing to manually coherently enable the 2nd UART.
This has now been fixed, which it means only DT is used to decide how
many instances are avaliable, and UART_NATIVE_POSIX_PORT_1_ENABLE is
just ignored.

Including:
* Deprecate UART_NATIVE_WAIT_PTS_READY_ENABLE: the options is always on
  now as it has no practical drawbacks.
* Deprecate UART_NATIVE_POSIX_PORT_1_ENABLE: DTS intanciation defines it
  being available now.
* Rename a few functions and in general shorten pseudo-tty/pseudo-
  terminal to PTY instead of PTTY.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-03-11 18:54:02 +01:00
Anas Nashif
895d91169e tests/samples: use integration platforms where possible
When possible, add integration_platforms to samples/tests.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-11 11:35:15 +01:00
Anas Nashif
91c012ca12 samples: co2: fix filtering and use integration_platforms
This sample was filtered out completely, use integration platforms and
removee wrong depends_on.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-11 11:35:15 +01:00
Nabil Elqatib
0cce3dc7bf samples: sensor: bmg160: Create README.rst file
Helps closing https://github.com/zephyrproject-rtos/zephyr/issues/27805

Signed-off-by: Nabil Elqatib <nabilelqatib@gmail.com>
2025-03-11 04:51:23 +01:00
Armando Visconti
6c5c3a5c66 samples/sensor: stream_fifo: add sensortile_box_pro board
Add sensortile_box_pro board overlay and config files.
This is good to verify lsm6dsv16x RTIO streaming over SPI bus.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-03-10 15:20:30 +01:00
TOKITA Hiroshi
70fc4a3e57 boards: pimoroni: pico_plus2: Add Pimoroni Pico Plus2 board
Pinoroni Pico Plus2 is an RP2350B based board that has
more rich I/O, RAM, and Flash than the original Raspberry Pi Pico2.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-03-10 11:20:30 +01:00
Anas Nashif
c82ad0dfbc sample: vl53l0x: make sample testable
No reason for this sample to be build_only, it can run and be verified
just fine on the right platforms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-07 19:41:04 +01:00
Benjamin Cabé
651db03c68 samples: sensor: accel_trig: add arduino_gpio req + platform_allow entry
sample.sensor.accel_trig.shield-tap has a DT overlay that expects the
presence of an arduino_header, so add the appropriate dependency to only
build the sample against supported boards.

As per samples guidelines, use platform_allow to limit CI to run only on
a configuration that's actually been tested (and is documented in the
README)

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-03-05 09:59:36 +00:00
Maciej Perkowski
b85e4f1b00 samples: sensors: Add test criteria
Verify the output according to the description of the sample.
fixes: #84156

Signed-off-by: Maciej Perkowski <maciej.perkowski@nordicsemi.no>
2025-02-27 23:19:09 +00:00
Simone Orru
d1c383993b samples: sensor: die_temp_polling: add i.MX RT1064 EVK support
Add the overlay file for the i.MX RT1064 EVK board.
The sample can be run on the i.MX RT1064 EVK board out of the box.

Signed-off-by: Simone Orru <simone.orru@secomind.com>
2025-02-26 15:05:42 +01:00
Pierrick Curt
f63bb9cafa samples: sensor: accel_trig: fix twister tests
Add twister tests for tap detection feature

The overlay must be applied only if the shield x_nucleo_iks01a3
is enabled on board nrf52dk/nrf52832.

Signed-off-by: Pierrick Curt <pierrickcurt@gmail.com>
2025-02-24 20:19:12 +00:00
Benjamin Cabé
86eea62e0b samples: sensor: Use dedicated overlay for fake sensor in sensor_shell
Using an app.overlay file is inherently preventing the use of board
overlays. Switch to a dedicated overlay file so that e.g.
the vmu_rt1170/mimxrt1176/cm7 board target can pass this test where
before it would have failed due to its board-specific overlay "winning"
over the app.overlay file.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-24 10:49:52 +01:00
Benjamin Cabé
a2fffdc038 samples: sensor: rename fake sensor binding
Binding files must be name the same as their compatible.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-24 10:49:52 +01:00
Benjamin Cabé
ae4d217f36 samples: fix spelling of "below"
s/bellow/below/

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-19 18:51:13 +01:00
Declan Snyder
e76a5a8ed1 boards: mimxrt1050_evk: Fix test/sample conf names
Fix test/sample .conf names for this board, so they are actually pulled
into the build.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2025-02-18 18:38:51 +01:00
Pierrick Curt
104fa969c6 samples: sensor: accel_trig: add sample tap detection feature.
Add the tap detection trigger to the existing example.
For this example it uses lis2dw12 accelerometer to detect a double
tap. This feature can be enabled with CONFIG_SAMPLE_TAP_DETECTION option.

Signed-off-by: Pierrick Curt <pierrickcurt@gmail.com>
2025-02-14 03:15:54 +01:00
Hake Huang
9dcef722ac samples: magn_trig: fix the fixture name
the fixture name shall align with applications

also update dts to support trig mode

fixes: #85444

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2025-02-12 05:44:38 +01:00
Hake Huang
76a06086ae samples: accel_trig: add dts trigger mode for unsupport platform
mimxrt1040_evk and twr_ke18f need board rework for trigger mode
so dts need changed to add gpio trigger

fixes: #85444

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2025-02-12 05:44:38 +01:00
Andrej Butok
b10587f2d6 samples: mcux_acmp: allow for mimxrt1170_evk revA
Allow mcux_acmp sample for mimxrt1170-evk revA.
mimxrt1170-evkb does not support ACMP.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2025-02-08 04:06:42 +01:00
Aurelie Fontaine
1d3681dedc samples: sensor: tdk_apex: update naming
Rename ICM42670 define to ICM42X70 to be aligned with updated driver
to support icm42370-p

Signed-off-by: Aurelie Fontaine <aurelie.fontaine@tdk.com>
2025-02-08 00:31:43 +01:00
Aurelie Fontaine
cd2d6ae90e samples: sensor: 6dof_motion_drdy: update naming
Rename ICM42670 define to ICM42X70 to be aligned with updated driver
to support icm42370-p

Signed-off-by: Aurelie Fontaine <aurelie.fontaine@tdk.com>
2025-02-08 00:31:43 +01:00
Hake Huang
d40eed4395 samples: sensor: enable sensor trigger
1. enable sensor trigger.
2. add a fixture for cases, as some platform need
   special rework.

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2025-02-06 07:44:55 +01:00
Emilio Benavente
87f11d7efa samples: sensor: fxos8700: Remove Empty Sample.
PR #77335 intended to remove sensor
specific samples and missed a readme file.
This commit removes that file and empty directory.

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2025-01-30 09:27:15 +01:00
Benjamin Perseghetti
4dceb0b917 samples: sensor: sensor_shell: add vmu_rt1170.
Adds support for testing sensor shell streaming
on the vmu_rt1170 with RTIO.

Co-Authored-by: James Goppert <james.goppert@gmail.com>
Signed-off-by: Benjamin Perseghetti <bperseghetti@rudislabs.com>
2025-01-29 15:17:44 +01:00
Lucien Zhao
4716372277 boards: shields: add p3t1755dp_ard_i2c shield for RT700 cm33_cpu0
Support the shield on MIMXRT700 cm33_cpu0 by I2C way.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2025-01-28 09:47:32 +01:00
Michal Piekos
f6faecd008 samples: sensor: vl53l0x: Include private channels
Demonstrate usage of newly added private channels with
measurement metadata.

Signed-off-by: Michal Piekos <michal.piekos@wp.pl>
2025-01-17 23:07:54 +01:00
Mark Chen
f4da9b9705 drivers: sensor: Add sensor clock API support
This commit introduces a new Sensor Clock API, enabling the retrieval
of cycle counts and conversion to nanoseconds based on the system or
external clock. The API includes:

- `sensor_clock_get_cycles()` to get the current cycle count from the
  sensor clock.
- `sensor_clock_cycles_to_ns()` to convert cycles to nanoseconds using
  the clock's frequency.

The implementation supports both system clocks and external clocks
defined in the device tree, making the sensor clock integration more
flexible for various sensor use cases.

Signed-off-by: Mark Chen <mark.chen@cienet.com>
2025-01-15 19:03:13 +01:00
Gerson Fernando Budke
ac579a8f89 drivers: sensors: Add SENSOR_CHAN_FREQUENCY channel
Add new SENSOR_CHAN_FREQUENCY constant to allow implement sensors that
output frequency values in Hertz.

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
2025-01-14 17:58:41 +01:00
Raffael Rostagno
8048a6ab67 samples: esp32c3: Add USB variant
Add USB variant config files for esp32c3 boards.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-10 18:57:07 +01:00
Armando Visconti
7c1191c926 samples/sensor: Add sample to read from FIFO stream
Add sample to read from up to 10 FIFO streaming devices, using the
sensor_stream() API and the RTIO framework:
    https://docs.zephyrproject.org/latest/services/rtio/index.html

The devices has to be aliased as streamN (0 <= N <= 9) in DT, and
will be instantiated using SENSOR_DT_STREAM_IODEV() macro.

Currently the sample gets/prints data on SENSOR_TRIG_FIFO_WATERMARK
trigger basis for the following sensor channels:

    - SENSOR_CHAN_ACCEL_XYZ
    - SENSOR_CHAN_GYRO_XYZ
    - SENSOR_CHAN_DIE_TEMP
    - SENSOR_CHAN_GAME_ROTATION_VECTOR
    - SENSOR_CHAN_GRAVITY_VECTOR
    - SENSOR_CHAN_GBIAS_XYZ

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2025-01-09 11:50:58 +01:00
Luis Ubieda
1e64d7bea1 samples: sensor🐚 test all channels
Loop through all of the channels and make sure that each
channel has an output.

Changes in patch originally present in #72972.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Luis Ubieda <luisf@croxel.com>
2025-01-09 08:20:32 +01:00
Yishai Jaffe
4ad83e72e6 samples: dht_polling: fix print to match the docs
Added a percentage sign to match what's written in the README and
sample.yaml

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2025-01-08 19:11:45 +01:00
Neil Chen
5b001d32af samples: sensor: Add support for temperature sensor on FRDM_MCXN236
Add new test sample.sensor.thermometer_i3c, can't assign the same
platform with i2c, and i3c at the same time.
Support the shield on FRDM_MCXN236 board by I2C and I3C way.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2025-01-07 15:56:32 +01:00
Andrew Featherstone
d2c6164c71 samples: rpi_pico2: Add ADC-related samples for rpi_pico2
The Raspberry Pi Pico 2's device is compatible with the existing Pico 1.
The build system requires a `<board>.overlay` file, but these use the
pre-processing to #include the sibling rpi_pico.overlay files rather
than duplicating the contents as an attempt to keep things DRY.

Tested locally.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Declan Snyder
0cdb35d978 boards: mimxrt1050_evk: Switch to variants
Switch from using revisions for hyperflash/qspi to using variants, by
popular demand.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-12-20 22:59:59 +01:00
Gerard Marull-Paretas
123c00aa10 samples: fix zephyr/drivers/gpio.h usage
Only include the header if using any of the GPIO API calls/
struct/defines.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-12-18 18:15:15 +01:00
Gerard Marull-Paretas
caa61af2fd samples: add missing CONFIG_GPIO=y
All samples using the GPIO API must enable the CONFIG_GPIO Kconfig
option.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-12-18 18:15:15 +01:00
Parth Sanepara
de234b6742 doc: correct typo from 'date' to 'data' in README
Fixed a typo in this two files.
lsm6dso README and coap_server document file

Signed-off-by: Parth Sanepara <parthsanepara@gmail.com>
2024-12-18 10:16:39 +01:00
Aurelie Fontaine
26e2e1d1e1 samples: sensor: TDK APEX generic sample
It reports Advanced Pedometer and Event Detection features,
such as Pedometer, Tilt detection, Wake on Motion and
Significant Motion Detector. Device tree options.

Signed-off-by: Aurelie Fontaine <aurelie.fontaine@tdk.com>
2024-12-18 03:04:31 +01:00
Aurelie Fontaine
0b9b2fbb5e samples: sensor: 6DOF motion DRDY generic sample
It reports IMU 6-axis accelerometer and gyroscope data
using DRDY interrupt.

Signed-off-by: Aurelie Fontaine <aurelie.fontaine@tdk.com>
2024-12-18 03:04:31 +01:00
Lucien Zhao
96c15bac71 samples: sensor: thermometer: add shield description
add mimxrt1180-evk board support description
add shield parameter description for RT1180 board by i3c/i2c ways

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-12-18 01:01:37 +01:00
Neil Chen
f6490bf33d samples: sensor/mcux_lpcmp: Add LPCMP use case
Enable LPCMP use case on NXP frdm_mcxa156 board.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2024-12-10 16:22:55 +01:00
Gerard Marull-Paretas
d4a67e321b samples, tests: remove usage of space-separated lists
Convert them to native YAML lists. Support for space-separated
lists was deprecated in Twister a long time ago.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2024-12-04 14:14:53 -05:00
Pieter De Gendt
a553af738d drivers: sensor: Place API into iterable section
Add wrapper DEVICE_API macro to all sensor_driver_api instances.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-12-02 22:04:55 +00:00
Anas Nashif
d0bc95cf57 samples: sensors: add min_ram filter
override the default of 16k in this sample.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-11-30 18:33:10 +01:00