Jason Kridner
4086b51cb7
led: correct off/on locations in structure
...
Although the initialization should probably be done with names, the
existing implementation has these structures filled in the opposite
order.
Signed-off-by: Jason Kridner <jkridner@beagleboard.org >
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net >
Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com >
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com >
2011-09-04 11:36:22 +02:00
Jason Kridner
95492d784b
Corrected LED name match finding avoiding extraneous Usage printouts
...
Signed-off-by: Jason Kridner <jkridner@beagleboard.org >
Signed-off-by: Koen Kooi <koen@dominion.thruhere.net >
Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com >
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com >
2011-09-04 11:36:21 +02:00
Wolfgang Denk
cd6881b519
Minor coding style cleanup.
...
Signed-off-by: Wolfgang Denk <wd@denx.de >
2011-05-19 22:22:44 +02:00
Jason Kridner
b633f66f02
Add 'led' command
...
This patch allows any board implementing the coloured LED API
to control the LEDs from the console.
led [green | yellow | red | all ] [ on | off ]
or
led [ 1 | 2 | 3 | all ] [ on | off ]
Adds configuration item CONFIG_CMD_LED enabling the command.
Partially based on patch from Ulf Samuelsson:
http://www.mail-archive.com/u-boot@lists.denx.de/msg09593.html .
Updated based on feedback:
http://www.mail-archive.com/u-boot@lists.denx.de/msg41847.html
https://groups.google.com/d/topic/beagleboard/8Wf1HiK_QBo/discussion
* Fixed a handful of style issues.
* Significantly reduced the number of #ifdefs and redundant code
* Converted redundant code into loops test against a structure
* Made use of cmd_usage()
* Introduced a str_onoff() function, but haven't yet put it in common
* Eliminated trailing newline
Signed-off-by: Jason Kridner <jkridner@beagleboard.org >
Signed-off-by: Sandeep Paulraj <s-paulraj@ti.com >
2011-04-27 19:38:05 +02:00