Skip to content

Commit

Permalink
samples: sensor: accel_polling: Extend upstream sample
Browse files Browse the repository at this point in the history
Add sample that reuses source code from "original" sample that
existing in the upstream Zephyr.

Extend sample with configurations that rely on internal
shields pca63565 and pca63566.

Remove Twister alt-config for upstream sample.

Signed-off-by: Sebastian Głąb <[email protected]>
  • Loading branch information
nordic-segl committed Feb 27, 2025
1 parent 95144b9 commit bab3121
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 7 deletions.
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,7 @@
/samples/nfc/ @nrfconnect/ncs-si-muffin
/samples/nrf5340/netboot/ @nrfconnect/ncs-pluto
/samples/nrf_rpc/ @nrfconnect/ncs-si-muffin
/samples/sensor/accel_polling/ @nrfconnect/ncs-low-level-test
/samples/sensor/bh1749/ @nrfconnect/ncs-cia
/samples/sensor/bme68x_iaq/ @nrfconnect/ncs-cia
/samples/sensor/qdec/ @nrfconnect/ncs-low-level-test
Expand Down
11 changes: 11 additions & 0 deletions samples/sensor/accel_polling/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

cmake_minimum_required(VERSION 3.20.0)
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
project(accel_polling)

target_sources(app PRIVATE ${ZEPHYR_BASE}/samples/sensor/accel_polling/src/main.c)
3 changes: 3 additions & 0 deletions samples/sensor/accel_polling/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
This sample extends the same-named Zephyr sample to verify it with Nordic development kits.

Source code and basic configuration files can be found in the corresponding folder structure in zephyr/samples/sensor/accel_polling.
3 changes: 3 additions & 0 deletions samples/sensor/accel_polling/prj.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
CONFIG_STDOUT_CONSOLE=y
CONFIG_SENSOR=y
CONFIG_CBPRINTF_FP_SUPPORT=y
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ common:
- drivers
- spi
- sensors
- ci_samples_sensor
harness: console

tests:
sample.sensor.accel_polling.nrf54h:
nrf.extended.sample.sensor.accel_polling.nrf54h:
filter: not CONFIG_COVERAGE
harness_config:
fixture: pca63566
Expand All @@ -24,7 +25,7 @@ tests:
- CONFIG_SENSOR_LOG_LEVEL_DBG=y
platform_allow: nrf54h20dk/nrf54h20/cpuapp

sample.sensor.accel_polling.nrf54h_cpuppr:
nrf.extended.sample.sensor.accel_polling.nrf54h_cpuppr:
filter: not CONFIG_COVERAGE
sysbuild: true
harness_config:
Expand All @@ -38,7 +39,7 @@ tests:
- vpr_launcher_SHIELD=pca63566_fwd
platform_allow: nrf54h20dk/nrf54h20/cpuppr

sample.sensor.accel_polling.nrf54h_coverage:
nrf.extended.sample.sensor.accel_polling.nrf54h_coverage:
filter: CONFIG_COVERAGE
harness_config:
fixture: pca63566
Expand All @@ -50,7 +51,7 @@ tests:
- SHIELD=pca63566;coverage_support
platform_allow: nrf54h20dk/nrf54h20/cpuapp

sample.sensor.accel_polling.nrf54l:
nrf.extended.sample.sensor.accel_polling.nrf54l:
filter: not CONFIG_COVERAGE
harness_config:
fixture: pca63565
Expand All @@ -65,7 +66,7 @@ tests:
- CONFIG_SENSOR_LOG_LEVEL_DBG=y
platform_allow: nrf54l15dk/nrf54l15/cpuapp

sample.sensor.accel_polling.nrf54l_coverage:
nrf.extended.sample.sensor.accel_polling.nrf54l_coverage:
filter: CONFIG_COVERAGE
harness_config:
fixture: pca63565
Expand All @@ -77,7 +78,7 @@ tests:
- SHIELD=pca63565;coverage_support
platform_allow: nrf54l15dk/nrf54l15/cpuapp

sample.sensor.accel_polling.nrf54l15_cpuflpr:
nrf.extended.sample.sensor.accel_polling.nrf54l15_cpuflpr:
filter: not CONFIG_COVERAGE
sysbuild: true
harness_config:
Expand All @@ -88,7 +89,7 @@ tests:
s*-?[0-9\\.]*,\\s*-?[0-9\\.]*\\)$"
extra_args:
- SHIELD=pca63565
- vpr_launcher_DTC_OVERLAY_FILE="../../../../nrf/boards/shields/pca63565/boards/nrf54l15dk_nrf54l15_vpr_launcher.overlay"
- vpr_launcher_DTC_OVERLAY_FILE="${ZEPHYR_NRF_MODULE_DIR}/boards/shields/pca63565/boards/nrf54l15dk_nrf54l15_vpr_launcher.overlay"
extra_configs:
- CONFIG_LOG=y
- CONFIG_SENSOR_LOG_LEVEL_DBG=y
Expand Down

0 comments on commit bab3121

Please sign in to comment.