Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

leds: move state notifier gpio to DTS #558

Merged

Conversation

RobertGalatNordic
Copy link
Collaborator

@RobertGalatNordic RobertGalatNordic commented May 9, 2024

CI parameters

Github_actions:
  #(branch, hash, pull/XXX/head)
  NRF_revision: main

  # Do not change after creating PR
  Create_NRF_PR: false
Jenkins:
  test-sdk-sidewalk: master

Description

JIRA ticket: KRKNWK-18781

Enable state notifier for all platforms.
Refactor the notifier code, to use DTS alias nodes instead of plain GPIO pins.
This allows for greater flexibility with configuration and helps visualize the used pins.

Self review

  • There is no commented code.
  • There are no TODO/FIXME comments without associated issue ticket.
  • Commits are properly organized.
  • Change has been tested.
  • Tests were updated (if applicable).

@github-actions github-actions bot added the source PR changing src files label May 9, 2024
Copy link

github-actions bot commented May 9, 2024

Sample diff used total
[email protected]/nrf54l15/cpuapp:sample.sidewalk.dut RAM 0 B 137.25 KB 256 KB
ROM 24 B 493.93 KB 730 KB
[email protected]/nrf54l15/cpuapp:sample.sidewalk.hello RAM 8 B 103.56 KB 256 KB
ROM 1016 B 431.09 KB 730 KB
[email protected]/nrf54l15/cpuapp:sample.sidewalk.hello.ble_only RAM 16 B 88.19 KB 256 KB
ROM 1.53 KB 351.64 KB 730 KB
[email protected]/nrf54l15/cpuapp:sample.sidewalk.hello.ble_only.release RAM 16 B 83.37 KB 256 KB
ROM 528 B 285.39 KB 730 KB
[email protected]/nrf54l15/cpuapp:sample.sidewalk.hello.release RAM 16 B 98.75 KB 256 KB
ROM 528 B 361.62 KB 730 KB
thingy53/nrf5340/cpuapp:sample.sidewalk.demo.ble_only RAM 0 B 102.34 KB 440 KB
ROM 12 B 392.08 KB 975.5 KB
nrf52840dk/nrf52840:sample.sidewalk.demo RAM 0 B 119.89 KB 256 KB
ROM 8 B 495.56 KB 983.5 KB
nrf52840dk/nrf52840:sample.sidewalk.demo.ble_only RAM 0 B 104.39 KB 256 KB
ROM 8 B 413.34 KB 983.5 KB
nrf52840dk/nrf52840:sample.sidewalk.dut RAM 0 B 143.27 KB 256 KB
ROM 8 B 553.99 KB 983.5 KB
nrf52840dk/nrf52840:sample.sidewalk.hello RAM 0 B 109.64 KB 256 KB
ROM 104 B 495.18 KB 983.5 KB
nrf52840dk/nrf52840:sample.sidewalk.hello.ble_only RAM 0 B 94.27 KB 256 KB
ROM 120 B 412.74 KB 983.5 KB
nrf52840dk/nrf52840:sample.sidewalk.hello.ble_only.release RAM 0 B 89.39 KB 256 KB
ROM 96 B 351.68 KB 983.5 KB
nrf52840dk/nrf52840:sample.sidewalk.hello.release RAM 0 B 104.89 KB 256 KB
ROM 96 B 430 KB 983.5 KB
nrf5340dk/nrf5340/cpuapp:sample.sidewalk.demo RAM 0 B 108.05 KB 440 KB
ROM 16 B 434.43 KB 975.5 KB
nrf5340dk/nrf5340/cpuapp:sample.sidewalk.demo.ble_only RAM 0 B 92.88 KB 440 KB
ROM 16 B 355.79 KB 975.5 KB
nrf5340dk/nrf5340/cpuapp:sample.sidewalk.dut RAM 0 B 131.53 KB 440 KB
ROM 12 B 492.91 KB 975.5 KB
nrf5340dk/nrf5340/cpuapp:sample.sidewalk.hello RAM 0 B 98.14 KB 440 KB
ROM 112 B 434.12 KB 975.5 KB
nrf5340dk/nrf5340/cpuapp:sample.sidewalk.hello.ble_only RAM 0 B 82.95 KB 440 KB
ROM 128 B 355.45 KB 975.5 KB
nrf5340dk/nrf5340/cpuapp:sample.sidewalk.hello.ble_only.release RAM 0 B 78.27 KB 440 KB
ROM 112 B 291.23 KB 975.5 KB
nrf5340dk/nrf5340/cpuapp:sample.sidewalk.hello.release RAM 0 B 93.45 KB 440 KB
ROM 112 B 366.64 KB 975.5 KB
[email protected]/nrf54l15/cpuapp:sample.sidewalk.demo RAM 16 B 113.51 KB 256 KB
ROM 924 B 431.52 KB 730 KB
[email protected]/nrf54l15/cpuapp:sample.sidewalk.demo.ble_only RAM 16 B 98.14 KB 256 KB
ROM 1.42 KB 352.27 KB 730 KB
.config diff

./sample-artifacts-meta/twister-out/[email protected]_nrf54l15_cpuapp/sid_end_device/sample.sidewalk.hello.release/zephyr/.config
old                                                           | new
CONFIG_DK_LIBRARY_BUTTON_NO_ISR=y			      |	CONFIG_DK_LIBRARY_BUTTON_SCAN_INTERVAL=10
CONFIG_DK_LIBRARY_BUTTON_SCAN_INTERVAL=50		      <
CONFIG_SOC_FLASH_NRF_TIMEOUT_MULTIPLIER=100		      |	CONFIG_SOC_FLASH_NRF_TIMEOUT_MULTIPLIER=1

./sample-artifacts-meta/twister-out/[email protected]_nrf54l15_cpuapp/sid_end_device/sample.sidewalk.hello.ble_only.release/zephyr/.config
old                                                           | new
CONFIG_DK_LIBRARY_BUTTON_NO_ISR=y			      |	CONFIG_DK_LIBRARY_BUTTON_SCAN_INTERVAL=10
CONFIG_DK_LIBRARY_BUTTON_SCAN_INTERVAL=50		      <
CONFIG_SOC_FLASH_NRF_TIMEOUT_MULTIPLIER=100		      |	CONFIG_SOC_FLASH_NRF_TIMEOUT_MULTIPLIER=1

./sample-artifacts-meta/twister-out/[email protected]_nrf54l15_cpuapp/sid_end_device/sample.sidewalk.demo.ble_only/zephyr/.config
old                                                           | new
CONFIG_DK_LIBRARY_BUTTON_NO_ISR=y			      |	CONFIG_DK_LIBRARY_BUTTON_SCAN_INTERVAL=10
CONFIG_DK_LIBRARY_BUTTON_SCAN_INTERVAL=50		      <

./sample-artifacts-meta/twister-out/[email protected]_nrf54l15_cpuapp/sid_end_device/sample.sidewalk.dut/zephyr/.config
old                                                           | new
CONFIG_DK_LIBRARY_BUTTON_NO_ISR=y			      |	CONFIG_DK_LIBRARY_BUTTON_SCAN_INTERVAL=10
CONFIG_DK_LIBRARY_BUTTON_SCAN_INTERVAL=50		      <

./sample-artifacts-meta/twister-out/[email protected]_nrf54l15_cpuapp/sid_end_device/sample.sidewalk.hello.ble_only/zephyr/.config
old                                                           | new
CONFIG_DK_LIBRARY_BUTTON_NO_ISR=y			      |	CONFIG_DK_LIBRARY_BUTTON_SCAN_INTERVAL=10
CONFIG_DK_LIBRARY_BUTTON_SCAN_INTERVAL=50		      <

./sample-artifacts-meta/twister-out/[email protected]_nrf54l15_cpuapp/sid_end_device/sample.sidewalk.hello/zephyr/.config
old                                                           | new
CONFIG_DK_LIBRARY_BUTTON_NO_ISR=y			      |	CONFIG_DK_LIBRARY_BUTTON_SCAN_INTERVAL=10
CONFIG_DK_LIBRARY_BUTTON_SCAN_INTERVAL=50		      <

./sample-artifacts-meta/twister-out/[email protected]_nrf54l15_cpuapp/sid_end_device/sample.sidewalk.demo/zephyr/.config
old                                                           | new
CONFIG_DK_LIBRARY_BUTTON_NO_ISR=y			      |	CONFIG_DK_LIBRARY_BUTTON_SCAN_INTERVAL=10
CONFIG_DK_LIBRARY_BUTTON_SCAN_INTERVAL=50		      <

@RobertGalatNordic RobertGalatNordic force-pushed the state_notifier_in_dts branch 6 times, most recently from e686083 to 66d06ab Compare May 10, 2024 07:43
Copy link
Contributor

@totyz totyz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm.
LEDs are working on nrf52, nrf53, nrf54l

Copy link
Contributor

@ktaborowski ktaborowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great change, now the code is more self-explaining

use DTS alias for gpios to connect with state notifier GPIO backend

Signed-off-by: Robert Gałat <[email protected]>
@RobertGalatNordic RobertGalatNordic merged commit dbd958b into nrfconnect:main May 10, 2024
56 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source PR changing src files
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants