2009-03-21 20:08:00 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2007-2008
|
2011-10-31 23:00:39 +00:00
|
|
|
* Stelian Pop <stelian@popies.net>
|
2009-03-21 20:08:00 +00:00
|
|
|
* Lead Tech Design <www.leadtechdesign.com>
|
|
|
|
*
|
2013-07-08 07:37:19 +00:00
|
|
|
* SPDX-License-Identifier: GPL-2.0+
|
2009-03-21 20:08:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2010-11-07 12:26:14 +00:00
|
|
|
#include <asm/io.h>
|
2009-03-21 20:08:00 +00:00
|
|
|
#include <asm/arch/at91_pmc.h>
|
2010-02-03 21:46:58 +00:00
|
|
|
#include <asm/arch/at91_pio.h>
|
2009-03-21 20:08:00 +00:00
|
|
|
#include <asm/arch/gpio.h>
|
|
|
|
|
|
|
|
#ifdef CONFIG_RED_LED
|
2011-09-04 18:40:16 +00:00
|
|
|
void red_led_on(void)
|
2009-03-21 20:08:00 +00:00
|
|
|
{
|
|
|
|
at91_set_gpio_value(CONFIG_RED_LED, 1);
|
|
|
|
}
|
|
|
|
|
2011-09-04 18:40:16 +00:00
|
|
|
void red_led_off(void)
|
2009-03-21 20:08:00 +00:00
|
|
|
{
|
|
|
|
at91_set_gpio_value(CONFIG_RED_LED, 0);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_GREEN_LED
|
2011-09-04 18:40:16 +00:00
|
|
|
void green_led_on(void)
|
2009-03-21 20:08:00 +00:00
|
|
|
{
|
|
|
|
at91_set_gpio_value(CONFIG_GREEN_LED, 0);
|
|
|
|
}
|
|
|
|
|
2011-09-04 18:40:16 +00:00
|
|
|
void green_led_off(void)
|
2009-03-21 20:08:00 +00:00
|
|
|
{
|
|
|
|
at91_set_gpio_value(CONFIG_GREEN_LED, 1);
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef CONFIG_YELLOW_LED
|
2011-09-04 18:40:16 +00:00
|
|
|
void yellow_led_on(void)
|
2009-03-21 20:08:00 +00:00
|
|
|
{
|
|
|
|
at91_set_gpio_value(CONFIG_YELLOW_LED, 0);
|
|
|
|
}
|
|
|
|
|
2011-09-04 18:40:16 +00:00
|
|
|
void yellow_led_off(void)
|
2009-03-21 20:08:00 +00:00
|
|
|
{
|
|
|
|
at91_set_gpio_value(CONFIG_YELLOW_LED, 1);
|
|
|
|
}
|
|
|
|
#endif
|