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
..
2011-04-13 15:56:39 -04:00
2010-11-28 21:58:24 +01:00
2010-07-24 20:54:46 +02:00
2011-02-19 20:32:38 +01:00
2011-04-13 15:57:00 -04:00
2011-04-08 00:44:27 -04:00
2011-04-27 19:38:05 +02:00
2011-01-09 18:06:50 +01:00
2011-04-13 06:35:22 -05:00
2010-12-17 14:32:12 -06:00
2010-07-16 10:55:09 -05:00
2010-10-12 23:31:10 +02:00
2011-04-13 19:43:28 +10:00
2010-11-28 21:47:24 +01:00
2011-02-02 22:36:10 +01:00
2010-11-28 21:58:27 +01:00
2010-01-18 00:23:00 +01:00
2011-04-20 15:09:19 -05:00
2011-02-19 20:32:36 +01:00