Commit graph

625 commits

Author SHA1 Message Date
Bindu S 18e986029e samples: sensor: Enable bme280 sensor using I2C driver for alder_lake
Added overlay and conf to enable bme280 sensor
using i2c on intel_adl_crb board.

Signed-off-by: Bindu S <bindu.s@intel.com>
2023-09-01 12:10:16 -05:00
Benjamin Lemouzy d2e420029b drivers: sensor: add NXP TEMPMON driver
Add driver for the NXP TEMPMON to retrieve on-die operational
temperature.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
2023-08-30 10:18:27 +02:00
Nick Ward 2d65acca3a drivers: gpio: use gpio_is_ready_dt helper function
Update `struct gpio_dt_spec` use with gpio_is_ready_dt()

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-08-28 08:48:35 -05:00
Ole Sæther a7df4e5175 samples: Fixed typos
Fixed typos in various files under samples.

Signed-off-by: Ole Sæther <ole.saether@nordicsemi.no>
2023-08-24 15:44:33 +02:00
Daniel Leung a52abe157b samples: sensors: rename shadow variables
Rename shadow variables found by -Wshadow.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-08-22 11:39:58 +02:00
Julio Cesar 5e15e8cb48 boards: xtensa: Add support for YD-ESP32 board
Add `yd_esp32` board:

- Model name: YD-ESP32
- Manufacturer: VCC-GND® Studio
- Espressif module: ESP32-WROOM-32E

Signed-off-by: Julio Cesar <hi@jcsx.dev>
2023-08-15 11:15:39 +00:00
TOKITA Hiroshi b2b0901c0d samples: sensor: change to use the app.overlay file
The DTC_OVERLAY_FILE variable is specified on the command line.
It's not preferable to set it in CMakeLists.txt.
The app.overlay file is used as the default overlay file, so use it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-08-09 08:29:28 +00:00
Marek Matej 3776402f40 boards: xtensa: esp32 board split
Remove virtual esp32 board and replace it with the
real word boards:

- esp32_devkitc_wroom
- esp32_devkitc_wrover (with PSRAM option)

Signed-off-by: Marek Matej <marek.matej@espressif.com>
2023-07-25 18:12:33 +02:00
Hiroki Tada 33e0bca014 samples: Remove esp32_temp_sensor
- esp32_temp_sensor is removed as die_temp_polling is used instead of it.

Signed-off-by: Hiroki Tada <tada.hiroki@fujitsu.com>
2023-07-24 13:22:03 +00:00
Hiroki Tada 7e3f0ef407 samples: Add esp32s2_saola overlay
- Add overlay for the esp32s2_saola board to die_temp_polling sample.
- Add aliases for the die_temp_polling sample to esp32s2 dtsi.

Signed-off-by: Hiroki Tada <tada.hiroki@fujitsu.com>
2023-07-24 13:22:03 +00:00
Nerijus Bendžiūnas 397ed142ad doc: fix :zephyr-app: paths
During testing I've found one bad path and looked if
there is more.

I've used this oneliner to find more:

```
rg :zephyr-app: | awk '{ print $3 }' | while read dir
do
    test -d $dir || echo $dir
done | grep '^samples' | grep -v '<' | sort | uniq

```

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
2023-07-17 16:51:16 -04:00
Ryan McClelland 9603c0ce75 samples: sensor: lsm6dso: fix double promotion warning
fix double promotion warning when compiling with
-Wdouble-promotion

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-07-17 13:02:46 -05:00
Daniel DeGrasse 7993e7d1b0 samples: sensor: thermometer: add trigger support to sample
Add optional trigger support to sample. If the selected temperature
sensor supports triggering using the AMBIENT_TEMP channel, then
temperature thresholds will be set for +0.5 and +1.5 degrees celsius
above ambient temperature. Sample overlays are provided for the
FRDM_K22F board to demonstrate enabling this feature.

Signed-off-by: Daniel DeGrasse <daniel@degrasse.com>
2023-06-17 08:01:16 -04:00
Anas Nashif b835b02136 tests: cleanup metadata and filtering
- Add integration_platforms to avoid excessive filtering
- Make sure integration platforms are actually part of the filter
- Fix some tags and test meta data

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-13 09:38:27 -04:00
Benjamin Cabé 21f473aaec samples: doc: fix dead links
Fixed deadlinks reported by Sphinx linkchecker

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-06-07 04:40:47 -04:00
Anas Nashif 0064b6e8b6 tests: samples: cleanup test tags, add integration_platforms
Use integration platforms and sanitize tags.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-06-02 04:47:06 -04:00
Andrzej Głąbek e7fdb31a95 samples: sensor: qdec: Correct encoder emulation
Use phase shift between the emulated A and B signals equal to the half
of the used period instead of a fixed 1 millisecond, to not enforce
decoders to use relatively frequent sampling just to make use of this
emulation.
Add also a few missing `static` keywords.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-05-30 14:01:04 +02:00
Tristan Honscheid dc9bd3afe3 sensors: Create sensor trig subcommand
This PR relocates the sensor trigger sample application from the
`sensor_shell` sample to a subcommand in the actual sensor shell. The
subcommand has a UI for enabling a given trigger on a given sensor.
A built-in handler for the data_ready trigger is included that prints
the latest data to the log. Currently, only `SENSOR_TRIG_DATA_READY` is
supported but the groundwork is there to add others. Tested on a
`tdk_robokit1` board.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2023-05-27 05:33:11 -04:00
Yuval Peress ca5bf10143 sensor_shell: Update to new sensor_read API
Update the sensor shell logic to use the new sensor_read() APIs and
make triggers an option of the sensor_shell sample (this avoids the
trigger stealing the interrupt status from one-shot reads).

Signed-off-by: Yuval Peress <peress@google.com>
2023-05-26 11:04:54 -05:00
Steffen Jahnke 39b50ee37c boards: shields: Adding a new amg88xx shield
Added the new amg88xx sensor shield with designation
amg88xx_grid_eye_eval_shield and updated the overlay, Kconfig and
documentation files accordingly.
The platforms that are compatible with new shield changed, so
sensor sample yaml file was extended for both available shields.

Signed-off-by: Steffen Jahnke <steffen.jahnke@eu.panasonic.com>
2023-05-25 13:31:29 +00:00
Kenneth J. Miller daa7b6dca1 samples: sensor: Remove redundant stm32_vbat_sensor
Remove stm32_vbat_sensor sample which has been made redundant by the new
generic soc_voltage sample.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-05-23 08:54:20 +02:00
Kenneth J. Miller 529bdf2f85 samples: sensor: Add generic voltage driver example
Add basic sample to demonstrate voltage driver measurements.

Signed-off-by: Kenneth J. Miller <ken@miller.ec>
2023-05-23 08:54:20 +02:00
Gerard Marull-Paretas dacb3dbfeb iterable_sections: move to specific header
Until now iterable sections APIs have been part of the toolchain
(common) headers. They are not strictly related to a toolchain, they
just rely on linker providing support for sections. Most files relied on
indirect includes to access the API, now, it is included as needed.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-22 10:42:30 +02:00
Sumit Batra 815b8fc664 board: Adds MIMXRT1062-FMURT6 board support package
Also enables all the usable CAN, Ethernet, I2C, PWM,

SPI, UARTs interfaces for this board

Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
2023-05-18 14:08:06 -05:00
Hisanori YAMAOKU 2ed97bc911 samples: die_temp_polling: Add nrf52840dk overlay
Adds overlay for the nrf52840dk.

Signed-off-by: Hisanori YAMAOKU <yamaoku.hisanor@fujitsu.com>
2023-05-12 10:47:20 -05:00
Mizuki Agawa 49fd55cae9 samples: die_temp_polling: Add nrf51dk overlay
Adds overlay for the nrf51dk.
Signed-off-by: Mizuki Agawa <agawa.mizuki@fujitsu.com>
2023-05-12 10:47:20 -05:00
Gerard Marull-Paretas 93b63df762 samples, tests: convert string-based twister lists to YAML lists
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-10 09:52:37 +02:00
Adam Wojasinski b96f6fd618 samples: sensor: qdec: Add overlays for Nordic Semiconductor boards
Add overlay for nrf52840dk_nrf52840 and nrf5340dk_nrf5340_cpuapp

Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
2023-05-05 11:47:53 +02:00
Andriy Gelman 77408116c3 samples: sensor: die_temp_polling: Adds xmc47_relax_kit overlay
Adds overlay to run the sample with the xmc47_relax_kit.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-05-02 12:34:55 +02:00
Keith Packard 1d5e644d12 samples, tests: Switch main return type from void to int
This applies the coccinelle script to another set of files:

   samples/bluetooth/bthome_sensor_template/src/main.c
   samples/boards/stm32/power_mgmt/standby_shutdown/src/main.c
   samples/drivers/smbus/src/main.c
   samples/drivers/virtualization/ivshmem/doorbell/src/ivshmem.c
   samples/fuel_gauge/max17048/src/main.c
   samples/hello_world/src/main.c
   samples/sensor/proximity_polling/src/main.c
   samples/subsys/logging/ble_backend/src/main.c
   tests/drivers/build_all/mfd/src/main.c

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
Keith Packard 0b90fd5adf samples, tests, boards: Switch main return type from void to int
As both C and C++ standards require applications running under an OS to
return 'int', adapt that for Zephyr to align with those standard. This also
eliminates errors when building with clang when not using -ffreestanding,
and reduces the need for compiler flags to silence warnings for both clang
and gcc.

Most of these changes were automated using coccinelle with the following
script:

@@
@@
- void
+ int
main(...) {
	...
-	return;
+	return 0;
	...
}

Approximately 40 files had to be edited by hand as coccinelle was unable to
fix them.

Signed-off-by: Keith Packard <keithp@keithp.com>
2023-04-14 07:49:41 +09:00
Guillaume Gautier ce5de8557b samples: sensor: stm32_temp_sensor: remove stm32_temp_sensor sample
Now that there is a generic die_temp_polling sample, this specific STM32
sample is redundant and can be removed.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-04-13 09:15:27 -05:00
Nick Ward 51597cbc82 samples: sensor: thermometer: update sample
Update thermometer sample with  mcp970x temperature sensor.

Removing test with frdm_k64f integration platform as it doesn't
provide an ambient temperature sensor.

Removing the bbc_microbit board as it only seems to provide the
die temperature of the nRF51 SoC and not an ambient temperature
sensor.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-04-07 13:30:59 +02:00
Maciej Perkowski a13edec310 samples: sensors: Remove warp7_m4 from fxas21002 platform_allow list
The sample is overflowing flash on this platform

fixes: #56455

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-04-05 19:32:14 +02:00
Lucas Tamborrino 6a0b5346ef samples: sensor: qdec: add esp32s3 overlay
Add esp32s3 overlay to qdec sample to ilustrate
the use of PCNT in quadrature enconder mode.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2023-04-05 11:23:48 -05:00
Maciej Perkowski 835c6a679e sample: sensor: Change integration_platforms for fxas21002 sample
Builds on warp7_m4 were overflowing flash, hence the change to
the another platform from the allow_list, which is not causing
overflows.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2023-04-05 08:30:35 +02:00
Peter Fecher a95862bcdc samples: sensor: Add proximity sensor sample
Adds generic sample for proximity sensors.

Signed-off-by: Peter Fecher <p.fecher@phytec.de>
2023-03-31 09:20:36 +02:00
Anas Nashif e32f9c727a samples: max44009: remove reference to quark se
Remove reference to Quark SE and the README file and put description in
sample.yaml.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-03-29 10:26:56 -05:00
Alejandro Hidalgo Muñoz de Rivera 53082e8ce5 samples: Updated README for thermometer sample
Updated README.txt to .rst format.

Signed-off-by: Alejandro Hidalgo Muñoz de Rivera <ahmrivera@gmail.com>
2023-03-21 09:36:17 +01:00
Nick Ward c49a6a0b0c samples: sensor: bq274xx: add test for CONFIG_BQ274XX_PM=n
Adds a test for BQ274XX driver option CONFIG_BQ274XX_PM=n.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-03-16 21:40:18 -04:00
Andrei Emeltchenko 8a229732df samples: sensor_shell: Fix return code for sensor_shell
Fix return code from boolean (probably typo) to int.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-03-08 13:16:19 +01:00
Yuval Peress 8760829064 sample: add trigger support to sensor shell sample
Automatically add trigger callbacks to any sensor that supports the
data ready trigger. Use a window average in order to avoid too many
logs.

Signed-off-by: Yuval Peress <peress@google.com>
2023-03-06 10:44:52 -06:00
Hiroki Tada 01a44000e8 samples: die_temp_polling: Add esp32c3 overlay
- Add overlay for the esp32c3 board to die_temp_polling sample.
- Add aliases for the die_temp_polling sample to esp32c3 dtsi.

Testing Environment:
esp32c3-devkitC-02

Signed-off-by: Hiroki Tada <tada.hiroki@fujitsu.com>
2023-03-06 09:34:18 -06:00
Jamie McCrae af78cbdc99 samples and tests: Add REQUIRED to Zephyr find_package call
Adds REQUIRED to samples and tests for finding the zephyr package
to align all samples and tests with the same call and parameters.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-03-02 09:58:27 +01:00
Andriy Gelman 1e2111c9e5 samples: die_temp_polling: Add xmc45_relax_kit overlay
Adds overlay for the xmc45_relax_kit.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-02-20 11:14:15 +01:00
Guillaume Gautier 4635af398b dts: arm: st: Remove obsolete properties for all STM32 ADC from dts
In all STM32 dts, remove all reference to the following properties:
- has-temp-channel
- has-vref-channel
- has-vbat-channel

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-01-25 15:00:21 +00:00
Guillaume Gautier 009fcb9305 dts: arm: st: Add ADC temperature and Vref channels for all STM32
Now that we have a binding to define the channel number for temperature
and Vref measurement, update all dtsi to include the information.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2023-01-25 15:00:21 +00:00
Jeppe Odgaard 74b94b4dff boards: add rt1050 qdec pinmux and overlay
Add a qdec pinctrl definition for rt1050.
Add an overlay in the qdec sample to support rt1050.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-01-24 10:21:39 -06:00
Jeppe Odgaard 35d60dbd0e samples: sensor: add qdec emulation support
Add emulation option to the qdec sample.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-01-24 10:21:39 -06:00
TOKITA Hiroshi b70d399a34 samples: sensor: Add CPU temperature monitor sample
Add a polling sample for CPU temperature monitor.
This sample demonstrates how to data fetch and print to the console.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-01-19 15:32:41 -06:00