Skip to content

Conversation

@blemouzy
Copy link
Contributor

  • Add software blinking to GPIO LEDs
  • Add missing blink command to led shell

@blemouzy
Copy link
Contributor Author

Comments are welcomed:

  • Are k_timer the best choice to manage blinking delays?
  • Is it a good idea to add a workqueue to call gpio_pin_set_dt function?

@blemouzy blemouzy force-pushed the add-led-gpio-blink branch from f901ac5 to 399eefb Compare May 12, 2023 08:55
@blemouzy blemouzy marked this pull request as ready for review May 15, 2023 06:11
@blemouzy blemouzy requested a review from Mani-Sadhasivam as a code owner May 15, 2023 06:11
@zephyrbot zephyrbot added the area: LED Label to identify LED subsystem label May 15, 2023
@zephyrbot zephyrbot requested a review from simonguinot May 15, 2023 06:12
Copy link
Contributor

@simonguinot simonguinot left a comment

Choose a reason for hiding this comment

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

Hi @blemouzy,

Thanks for this PR but I can't agree with this.

The plan for software LED blinking is to implement a fallback at the LED core level. This way it will be available for ALL the LED drivers and not only led_gpio.

If a driver implements the blink API function (because the feature is supported by hardware) then it can be used directly else we can fall back on a software blinking mechanism (based on timer and/or workqueue).

For reference see the following discussions:

blemouzy added 2 commits June 22, 2023 14:35
Add blink command to led shell.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
Add new CONFIG_LED_GPIO_BLINK to add GPIO LEDs software blinking.

Signed-off-by: Benjamin Lemouzy <blemouzy@centralp.fr>
@blemouzy blemouzy force-pushed the add-led-gpio-blink branch from 399eefb to c81e21b Compare June 22, 2023 12:36
@github-actions
Copy link

This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: LED Label to identify LED subsystem Stale

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants