-
Notifications
You must be signed in to change notification settings - Fork 7.7k
drivers: led: shell: add blink cmd #90342
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @yishai1999,
Thanks for this patch. Please see my comment below.
b028a6a
to
d9d39e1
Compare
@simonguinot What do you think? |
Hi @yishai1999, Please can you rebase on #91612 ? Sorry for the delay and the inconvenience. |
Sure. Just waiting for it to be merged. |
d9d39e1
to
2a2c992
Compare
Rebased |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @yishai1999,
Thanks for this PR. I tested the led blink
command successfully.
Please see my comments below.
4615734
to
fb78bfe
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks !
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel bad for requesting a change about that but I really think it would be nice if the delay_off argument would be optional, in which case it defaults to being the same a delay_on
Hopefully my comments/suggestions are close enough to achieving this, with minimal/no tweaking. Thank you!
fb78bfe
to
24409dc
Compare
Rebased off main |
24409dc
to
8509733
Compare
Applied suggestion |
drivers/led/led_shell.c
Outdated
@@ -353,6 +394,10 @@ SHELL_STATIC_SUBCMD_SET_CREATE( | |||
3, 0), | |||
SHELL_CMD_ARG(on, &dsub_device_name, SHELL_HELP("Turn on LED", "<device> <led>"), cmd_on, 3, | |||
0), | |||
SHELL_CMD_ARG(blink, &dsub_device_name, | |||
SHELL_HELP("Blink LED on and off", | |||
"<device> <led> <delay_on_in_ms> [delay_off_in_ms]"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thought I had suggested it this way, apologies if not! Not blocking, I guess
"<device> <led> <delay_on_in_ms> [delay_off_in_ms]"), | |
"<device> <led> <delay_on_in_ms> [<delay_off_in_ms>]"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're absolutely right. Done. BTW, just so you know, there are a bunch of places where it's written [param]
but I agree with you that it should be like this
Add blink command to led shell module Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
8509733
to
7d15f8a
Compare
Applied suggestion |
|
@simonguinot @kartben ping? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 of course, and thanks! But fwiw reviews on stuff that's now targetting 4.3 will likely be slower than usual for the next few weeks :)
Can this be merged for 4.2.0? |
It being a new feature (albeit a small and reasonably trivial one), probably not, unfortunately. |
Add blink command to led shell module