From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] at91: Add command to control GPIO LEDs from the console
Date: Sat, 23 May 2009 01:33:05 +0200 [thread overview]
Message-ID: <20090522233305.GD19891@game.jcrosoft.org> (raw)
In-Reply-To: <12422910832805-git-send-email-Daniel.Gorsulowski@esd.eu>
On 10:51 Thu 14 May , Daniel Gorsulowski wrote:
> This patch allows any at91 board implementing the GPIO LED API
> to control vendor specific LEDs from the console.
>
> Adding configuration items CONFIG_AT91_LED and CONFIG_CMD_LED
> enables the command.
> Moreover the GPIO Pins have to be defined by CONFIG_GPIO_LEDS
> See doc/README.LED for detailed information.
>
> Usage:
> led [LED_number] [on|off]
why create a new led API?
the best way will be to extent the current collor led api by using something
like this
why create a new led API?
the best way will be to extent the current collor led api by using something
like this
#define LED_RED 0
#define LED_GREEN 1
#define LED_YELLOW 2
#define LED_BLUE 3
.macro led_red_off
ldr r0, =LED_RED
mov r1, #0
bl led_on_off
.endm
.macro led_red_on
ldr r0, =LED_RED
mov r1, #1
bl led_on_off
.endm
.macro led_green_off
ldr r0, =LED_GREEN
mov r1, #0
bl led_on_off
.endm
.macro led_green_on
ldr r0, =LED_GREN
mov r1, #1
bl led_on_off
.endm
.macro led_yellow_off
ldr r0, =LED_YELLOW
mov r1, #0
bl led_on_off
.endm
.macro led_yellow_on
ldr r0, =LED_YELLOW
mov r1, #1
bl led_on_off
.endm
.macro led_blue_off
ldr r0, =LED_BLUE
mov r1, #0
bl led_on_off
.endm
.macro led_blue_on
ldr r0, =LED_BLUE
mov r1, #1
bl led_on_off
.endm
and we need to keep the coloured led name and number
and if needed extendit as done for the zoom2
and please do not do it only for at91
Best Regards,
J.
prev parent reply other threads:[~2009-05-22 23:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-14 8:51 [U-Boot] [PATCH] at91: Add command to control GPIO LEDs from the console Daniel Gorsulowski
2009-05-22 23:33 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
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=20090522233305.GD19891@game.jcrosoft.org \
--to=plagnioj@jcrosoft.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox