Commit Graph

703 Commits

Author SHA1 Message Date
Lucien Zhao c5dd2c2a84 samples: sensor: mcux_acmp: add case support for RT1180-EVK
Use gpio_ad_01_acmp1_in2 as ACMP1_IN2, test case can be captured
in J45-13.

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-09-04 21:27:28 +02:00
Benjamin Cabé ee77704715 samples: sensor: use zephyr:code-sample directive
Describe the samples using code-sample directive in preparation for
upcoming changes to the Zephyr documentation that will be leveraging
the provided description and metadata.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-09-04 21:26:50 +02:00
Benjamin Cabé 7cf124b4a9 samples: sensors: drop ti_hdc sample as a more generic one exists
This sample adds no value compared to generic dht
polling sample

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:50:32 -04:00
Benjamin Cabé 6a5428b751 samples: sensors: drop ens210 sample as a more generic one exists
This sample adds no value compared to generic dht
polling sample

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:50:32 -04:00
Benjamin Cabé e59c38fb6f samples: sensors: drop dps310 sample as a more generic one exists
This sample adds no value compared to e.g. sensor shell.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:50:32 -04:00
Benjamin Cabé 7147b344a6 samples: sensors: drop dht sample as a more generic one exists
This sample adds no value compared to generic_dht_polling or
sensor shell.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:50:32 -04:00
Benjamin Cabé 5f65b30117 samples: sensors: drop bme680 sample as a more generic one exists
This sample adds no value compared to e.g. sensor shell.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-31 06:50:32 -04:00
Fin Maaß 2293e6668a drivers: sensors: add jedec jc 42.4 compliant temperature sensor
This transforms the existing driver for the Microchip MCP9808
to be used as a generic driver to be used with  all
JEDEC JC 42.4 compliant temperature sensor chips.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-08-28 14:02:16 -04:00
Krystof Sadlik bc4eebfae7 Samples: Sensor: Added mimxrt1040 config, and fxls8974
Added mimxrt1040_evk to inregration platforms, so that fxls8974 is tested,
and added config for mimxrt1040_evk to sensor_shell

Signed-off-by: Krystof Sadlik <krystof.sadlik@nxp.com>
2024-08-19 10:00:34 -04:00
Raffael Rostagno a205fe9155 samples: esp32c3: Move config files from boards to socs
Move samples config files from 'boards' to 'socs' in order to
remove multiple files with the same configuration and render
available samples for new boards. Only changed sample files
which are not board or hardware specific.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-13 18:21:10 -04:00
Fabio Baltieri bb4af13da0 samples: fix adafruit_feather board name
This has been renamed in b6ed4ba761, the current entry is causing a CI
breakage for unrecognized platform.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-01 14:56:25 +02:00
Anke Xiao bd7a6b5d79 samples: sensor: mcux_acmp: add acmp configuration for ke17z
Add acmp pinctrl configuration to support ACMP driver for NXP frdm_ke17z
and frdm_ke17z512, tested 'sample.sensor.mcux_acmp' case.
Update the index.rst to add acmp description for ke17z.

Signed-off-by: Anke Xiao <anke.xiao@nxp.com>
2024-08-01 12:37:23 +02:00
Miguel Gazquez f6f03867d8 samples: accel_polling: set sampling frequency when necessary
The accel_polling sample uses various sensor, but doesn't set a sampling
rate. But some sensors (like st,lsm6dso) have a default sampling
frequency of 0. So, depending on the sensor, the sample may not always
work.

There are two ways to fix this: either all drivers must set a valid
sampling rate, or the sample shall at least try to set a value if there
is none.

We propose here the second approach, wich should allow the sample to
work on more sensors out of the box.

Signed-off-by: Miguel Gazquez <miguel.gazquez@bootlin.com>
2024-07-29 14:21:24 +02:00
Tom Burdick 9f85a70a04 doc: Revamp sensor docs
Docs now start at a high level, discussing sensors, attributes,
channels, and reading data from them.

Followed by more detailed usage guides in how to solve common problems
sensor users may run into.

Additionally renames the sensor_api sphinx tag to sensor

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-07-16 16:49:24 -04:00
Thomas Stranger 48e235445b samples: sensor: ds18b20: clearly indicate any errors
Any errors are clearly indicated and program execution
ended.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-07-09 15:37:58 -04:00
Jordan Yates 243eb36b18 everywhere: reindent `.overlay` files with tabs
`checkpatch.pl` requires that dts sources are indented with tabs,
fix all the spaces that slipped in while checkpatch wasn't watching.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-06-26 15:59:44 +02:00
David Leach 96aad48be0 samples: sensor: qdec: fix mimxrt1050_evk build failure.
Recent PR turned on test case for twister which revieled a bug
with building the test case for RT1050 EVK. The touch_controller
DTS node was removed a by commit 57ad325e and further deprecated
by bde07beb5 when the platform was converted to tread displays as
shields.

Signed-off-by: David Leach <david.leach@nxp.com>
2024-06-25 21:18:47 -04:00
Piotr Kosycarz 6898f93e48 samples: sensor: qdec: verify position value
At least for nrf boards, the emulation timer settings generate
reading around -60 degrees. Verify that value with some threshold.

Delay the first reading to prevent 0 at the beginning.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-24 12:43:25 -04:00
Piotr Kosycarz 456fed3bc3 samples: sensor: qdec: align pins for nrf boards
To match used loopbacks.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-24 12:43:25 -04:00
Katarzyna Giądła bf6ba17655 samples: sensor: sensor_shell: Extend timeout for pytest tests
The test `sample.sensor.shell.pytest` fails althought the output
is correct. Time to execution is not enough.
This change extend test execution timeout.

Signed-off-by: Katarzyna Giądła <katarzyna.giadla@nordicsemi.no>
2024-06-21 15:26:07 -04:00
Gerson Fernando Budke e6d8ed2e0d samples: sensor: qdec: Fix wrong harness
The #73619 which fixes the atmel,sam-tc-qdec sensor implementation
introduced agregression on the sample test removing the harness
console. That changed the test to use the default ztest behaviour
which is incompatible with the test outpout. This restore the
harness to the default console value.

Fixes: #74531

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-06-21 14:55:12 -04:00
Benjamin Cabé a8573a985c doc: fix incorrect bullet lists
ReStructuredText bullet lists should be preceded by an empty
line

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-06-20 14:07:32 -04:00
Gerson Fernando Budke 0561d74d31 drivers: counter: sam: Add qdec as tc special mode
The current atmel,sam-tc-qdec sensor implementation shared the timer
counter node. This create issues when users wants define both modes.
The current proposal changes the qdec dedinition to be a child of
tc and refactor all the chain of definitions.

Fixes #71312

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2024-06-17 17:47:42 -04:00
Francois Ramu 298bf49048 samples: sensor: dht_polling run sample on sensor present
Add a fixture to run the sample only when the DHT sensor
HX330x is present (shield) on the nucleo_f40re board
'fixture_i2c_hs300x'
The stm32f401 Nucleo board itself has no sensor mounted

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-06-14 14:01:41 -04:00
Piotr Kosycarz 1b3725e099 samples: sensor: accel_polling: Allow coverage calculation
Sample must end to dump coverage data.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-14 15:35:17 +02:00
Piotr Kosycarz e63c691a86 samples: sensor: bme680: Allow coverage calculation
Sample must end to dump coverage data.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-06-14 15:35:02 +02:00
Aksel Skauge Mellbye bc6c363bc9 boards: silabs: Consistently name dev kits
Rename all Silicon Labs dev kits to always use the official kit name
as board target name. Previous kit names used various naming schemes,
including putting part of the SoC name in the board name. With HWMv2,
SoC names (if needed) should go in the SoC board qualifier.

Use HWMv2 revisions for the two variants of SLTB010A.

Split the xG27 Dev Kit from the EFR32BG22 Thunderboard. This attempt
at deduplication is confusing due to the very different kit names
and use of different ICs (BG22 vs BG27), and was not continued with
the xG24 Dev Kit, meaning that it wasn't consistent.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2024-06-12 12:52:28 -04:00
Lauren Murphy 0a3f2f0397 sensors: bme280: update sample to new async api
Updates BME280 sample to new async sensor API.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-06-11 20:28:24 -05:00
Lauren Murphy 9ac63390db samples: sensor: update dht_polling to new API
Updates dht_polling sample to new sensor API.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-06-11 19:42:24 -04:00
Aurelien Jarno 460169df75 samples: sensors: nucleo_h7a3zi_q board added to die_temp_polling
Added board nucleo_h7a3zi_q overlay file to permit testing the STM32
Digital Temperature Sensor.

Also added the board as integration platform to the sample.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-06-04 16:37:19 +02:00
Zhaoxiang Jin 1425ae1af9 samples: sensor/mcux_lpcmp: Add LPCMP use case
Add LPCMP use case.
Enable LPCMP use case on NXP frdm_mcxn947 board.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2024-05-31 09:51:29 -05:00
Noah Pendleton 3b0a7dedb0 samples: sensors: nucleo_f756zg added to die_temp_polling
Added board overlay file to permit internal temperature sensor testing:

- `nucleo_f756zg`

Signed-off-by: Noah Pendleton <noah.pendleton@gmail.com>
2024-05-27 08:15:53 -07:00
Johann Fischer 85bd852050 samples: sensor: remove fxos8700-hid
This sample uses the FXOS8700 compatible accelerometer to emulate
relative mouse movement. While this is an interesting example, it does
not provide anything unique in terms of sensor drivers or USB device
support. The example has no documentation and unsafe report buffer
handling. The example would need to be completely rewritten to make it
generic and use any accelerometer, e.g. with an accel0 alias. From a USB
perspective, there is no interest in maintaining this sample or porting
it to the new device support and new HID device API.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2024-05-27 03:27:06 -07:00
Yong Cong Sin e993e994ea sensors: add new channel `SENSOR_CHAN_POS_DXYZ`
Add new channel: `SENSOR_CHAN_POS_DXYZ`, so that it is
consistent with other 3-axis channels.

Updated pytest, `sensor_shell` & `fake_sensor` accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-24 07:49:27 -04:00
Yong Cong Sin c13105750d samples: sensor: sensor_shell: update pytest to validate fix
Update the pytest script to exercise the entire
`sensor_channel_name` table with `parse_named_int()`.

The `gauge_desired_charging_current` is selected because
it is the last one in the table before `all`, `all` is not
used because `sensor get sensor@0 all` doesn't return anything.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-24 07:49:27 -04:00
Yong Cong Sin 46ed467339 samples: sensor: sensor_shell: add pytest
Use pytest to test the shell commands.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-20 22:56:11 +03:00
Yong Cong Sin d462ed4d95 samples: sensor: sensor_shell: add fake sensor driver
Add a simple fake sensor driver so that the sample is more fun
for boards without real sensor.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-20 22:56:11 +03:00
Jeppe Odgaard 69065fa317 samples: sensors: add veaa_x_3 sample
Add sample for VEAA-X-3 sensor.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-18 15:56:09 +03:00
Sebastian Głąb f84e082f73 samples: sensor: qdec: Run sample on nrf54h20
Add overlay file that enables sample on nrf54h20 Application core.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-14 13:25:27 +02:00
Dinesh Kumar K 5e60656aeb samples: sensor: Modified Readme for grow_r502a
Modified readme for grow_r502a sample w.r.t
latest changes on driver like attributes and
LED controlling via zephyr LED subsystem APIs.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K 7ae0158e35 drivers: sensor: grow_r502a: add set/read system parameter
Add functionality for read and set system
parameter of sensor device.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K 3c8bd0bc2b drivers: sensor: grow_r502a: add built-in LED control
Add LED control attribute for sensor device's
built-in LED using zephyr's led driver APIs.

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Dinesh Kumar K e57c6f9d2b drivers: sensor: grow_r502a: move enroll, search, delete to application
Removed fps_enroll, fps_search and fps_delete from
driver code, since they did application usage inside
driver. add the following attributes to achieve the
above functionality from application.
1. SENSOR_ATTR_R502A_CAPTURE
2. SENSOR_ATTR_R502A_TEMPLATE_CREATE
3. SENSOR_ATTR_R502A_RECORD_ADD
4. SENSOR_ATTR_R502A_RECORD_LOAD
5. SENSOR_ATTR_R502A_COMPARE

Signed-off-by: Dinesh Kumar K <dinesh@linumiz.com>
2024-05-09 12:41:59 -04:00
Hake Huang d16b4ab103 test: mcux_acmp: remove hwv1 overlay which conflicts with hwv2
remove the hwv1 config and use hwv2 only

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-04-24 15:05:01 -04:00
Sylvio Alves 4a4d7584ff boards: rename and update esp32 related conf and overlay files
There are several esp32-based boards that its conf and overlay
files are missing proper renaming to match cpu cluster.

This also removes all _SOC_ name from files.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-04-23 15:36:13 +02:00
Sebastian Głąb 0fdfcad675 samples: sensor: qdec: Move console regex to each test
It seems that harness_config defined in the 'common' section
is discarded when test adds fixture to it's harness_config.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-04-10 15:55:49 +02:00
Sebastian Głąb ad33d007ea samples: sensor: qdec: Add nRF54L15 to platform allow
Add nRF54L15 to platform_allow and integration_platforms
in the sample.yaml.
Overlay file for that target already exists in the boards
directory.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-04-10 15:55:49 +02:00
Piotr Kosycarz 884e661cc9 samples: sensor: isl29035: Align sample definition
Add fixutre as external hw is required.
Add regex.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-04-10 15:55:40 +02:00
Piotr Kosycarz 8d4743d144 samples: sensor: qdec: Allow coverage calculation
Sample must end to dump coverage data.

Signed-off-by: Piotr Kosycarz <piotr.kosycarz@nordicsemi.no>
2024-04-10 07:42:01 -04:00
Torsten Rasmussen b9f3d68863 samples: tests: additional overlay and conf file adjustments
Adjustments of overlay and conf files to adjust for the MERGE removal.

The revert of MERGE requires specific overlay and conf files for boards
which relied on the MERGE feature.

Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
2024-04-09 23:35:54 +02:00