]> git.ipfire.org Git - people/ms/u-boot.git/blame - arch/arm/cpu/arm926ejs/at91/led.c
at91: switch coloured LED to gpio API
[people/ms/u-boot.git] / arch / arm / cpu / arm926ejs / at91 / led.c
CommitLineData
a484b00b
JCPV
1/*
2 * (C) Copyright 2007-2008
c9e798d3 3 * Stelian Pop <stelian@popies.net>
a484b00b
JCPV
4 * Lead Tech Design <www.leadtechdesign.com>
5 *
1a459660 6 * SPDX-License-Identifier: GPL-2.0+
a484b00b
JCPV
7 */
8
9#include <common.h>
bcf9fe37 10#include <asm/gpio.h>
a484b00b 11#include <asm/arch/gpio.h>
a484b00b
JCPV
12
13#ifdef CONFIG_RED_LED
2d3be7c4 14void red_led_on(void)
a484b00b 15{
bcf9fe37 16 gpio_set_value(CONFIG_RED_LED, 1);
a484b00b
JCPV
17}
18
2d3be7c4 19void red_led_off(void)
a484b00b 20{
bcf9fe37 21 gpio_set_value(CONFIG_RED_LED, 0);
a484b00b
JCPV
22}
23#endif
24
25#ifdef CONFIG_GREEN_LED
2d3be7c4 26void green_led_on(void)
a484b00b 27{
bcf9fe37 28 gpio_set_value(CONFIG_GREEN_LED, 0);
a484b00b
JCPV
29}
30
2d3be7c4 31void green_led_off(void)
a484b00b 32{
bcf9fe37 33 gpio_set_value(CONFIG_GREEN_LED, 1);
a484b00b
JCPV
34}
35#endif
36
37#ifdef CONFIG_YELLOW_LED
2d3be7c4 38void yellow_led_on(void)
a484b00b 39{
bcf9fe37 40 gpio_set_value(CONFIG_YELLOW_LED, 0);
a484b00b
JCPV
41}
42
2d3be7c4 43void yellow_led_off(void)
a484b00b 44{
bcf9fe37 45 gpio_set_value(CONFIG_YELLOW_LED, 1);
a484b00b
JCPV
46}
47#endif