All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rix <Tom.Rix@windriver.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 06/10] LED Add documentation describing the status_led and colour led API.
Date: Tue, 14 Apr 2009 09:40:59 -0500	[thread overview]
Message-ID: <1239720063-20004-6-git-send-email-Tom.Rix@windriver.com> (raw)
In-Reply-To: <1239720063-20004-5-git-send-email-Tom.Rix@windriver.com>

This document describes the u-boot status LED API.
This allows common u-boot commands to use a board's leds to
provide status for activities like booting and downloading files.

Signed-off-by: Tom Rix <Tom.Rix@windriver.com>
---
 doc/README.LED |   78 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 78 insertions(+), 0 deletions(-)
 create mode 100644 doc/README.LED

diff --git a/doc/README.LED b/doc/README.LED
new file mode 100644
index 0000000..1221177
--- /dev/null
+++ b/doc/README.LED
@@ -0,0 +1,78 @@
+Status LED
+========================================
+
+This README describes the status LED API.
+
+The API is defined by the include file include/status_led.h
+
+The first step is to define CONFIG_STATUS_LED in the board config file.
+
+If the LED support is only for a single board, define CONFIG_BOARD_SPECIFIC_LED
+in the board config file.
+
+At a minimum, these macros must be defined at 
+STATUS_LED_BIT
+STATUS_LED_STATE
+STATUS_LED_PERIOD
+
+If there are multiple status LED's define
+STATUS_LED_BIT<n>
+STATUS_LED_STATE<n>
+STATUS_LED_PERIOD<n>
+
+Where <n> can a integer 1 through 3. 
+
+STATUS_LED_BIT is passed into the __led_* functions to identify which LED is
+being acted on.  As such, the value choose must be unique with with respect to
+the other STATUS_LED_BIT's.  Mapping the value to a physical LED is the
+reponsiblity of the __led_* function.
+
+STATUS_LED_STATE is the initial state of the LED. It should be set to one of
+these values: STATUS_LED_OFF or STATUS_LED_ON.
+
+STATUS_LED_PERIOD is how long is the LED blink period.  This usually set to
+(CONFIG_SYS_HZ / <N>) where <N> is the frequency of the blink. Typical values
+range from 2 to 10.
+
+Some other LED macros
+
+STATUS_LED_BOOT is the LED to light when the board is booting.  This must be a
+valid STATUS_LED_BIT value. 
+
+STATUS_LED_RED is the red LED.  It is used signal errors. This must be a valid
+STATUS_LED_BIT value. Other similar color LED's are STATUS_LED_YELLOW and
+STATUS_LED_BLUE.  
+
+These board must define these functions
+
+__led_init is called once to initialize the LED to STATUS_LED_STATE. One time
+start up code should be placed here.
+
+__led_set is called to change the state of the LED. 
+
+__led_toggle is called to toggle the current state of the LED.
+
+Colour LED
+========================================
+
+Colour LED's are at present only used by ARM. 
+
+The functions names explain their purpose.
+
+coloured_LED_init
+red_LED_on
+red_LED_off
+green_LED_on
+green_LED_off
+yellow_LED_on
+yellow_LED_off
+blue_LED_on
+blue_LED_off
+
+These are weakly defined in lib_arm/board.c to noops. Where applicable, define
+these functions in the board specific source.
+
+TBD : Describe older board dependent macros similar to what is done for
+CONFIG_TQM8xxL.
+
+TBD : Describe general support via asm/status_led.h
-- 
1.6.0.5

  reply	other threads:[~2009-04-14 14:40 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-14 14:40 [U-Boot] [PATCH 01/10] ZOOM2 Add initial support for Zoom2 Tom Rix
2009-04-14 14:40 ` [U-Boot] [PATCH 02/10] OMAP3 Port kernel omap gpio interface Tom Rix
2009-04-14 14:40   ` [U-Boot] [PATCH 03/10] ZOOM2 Add support for debug board detection Tom Rix
2009-04-14 14:40     ` [U-Boot] [PATCH 04/10] ZOOM2 Add serial support Tom Rix
2009-04-14 14:40       ` [U-Boot] [PATCH 05/10] ZOOM2: rename timer divisor Tom Rix
2009-04-14 14:40         ` Tom Rix [this message]
2009-04-14 14:41           ` [U-Boot] [PATCH 07/10] ARM Add blue colour LED to status_led Tom Rix
2009-04-14 14:41             ` [U-Boot] [PATCH 08/10] ZOOM2 Add led support Tom Rix
2009-04-14 14:41               ` [U-Boot] [PATCH 09/10] ZOOM1 Remove more legacy NAND defines Tom Rix
2009-04-14 14:41                 ` [U-Boot] [PATCH 10/10] OMAP Consolidate common u-boot.lds to cpu layer Tom Rix
2009-04-26 22:01                 ` [U-Boot] [PATCH 09/10] ZOOM1 Remove more legacy NAND defines Jean-Christophe PLAGNIOL-VILLARD
2009-04-24 21:35               ` [U-Boot] [PATCH 08/10] ZOOM2 Add led support Jean-Christophe PLAGNIOL-VILLARD
2009-04-26 22:02             ` [U-Boot] [PATCH 07/10] ARM Add blue colour LED to status_led Jean-Christophe PLAGNIOL-VILLARD
2009-04-28  1:30               ` Tom
2009-04-26 22:01           ` [U-Boot] [PATCH 06/10] LED Add documentation describing the status_led and colour led API Jean-Christophe PLAGNIOL-VILLARD
2009-04-24 21:31         ` [U-Boot] [PATCH 05/10] ZOOM2: rename timer divisor Jean-Christophe PLAGNIOL-VILLARD
2009-04-24 21:26 ` [U-Boot] [PATCH 01/10] ZOOM2 Add initial support for Zoom2 Jean-Christophe PLAGNIOL-VILLARD
2009-04-24 21:38   ` Jean-Christophe PLAGNIOL-VILLARD
2009-04-24 22:10     ` Wolfgang Denk
2009-04-26 22:05       ` Jean-Christophe PLAGNIOL-VILLARD

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1239720063-20004-6-git-send-email-Tom.Rix@windriver.com \
    --to=tom.rix@windriver.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.