2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
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>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2013-11-29 11:13:46 +00:00
|
|
|
#include <asm/gpio.h>
|
2009-03-21 20:08:00 +00:00
|
|
|
#include <asm/arch/gpio.h>
|
2014-10-08 20:57:53 +00:00
|
|
|
#include <status_led.h>
|
2009-03-21 20:08:00 +00:00
|
|
|
|
|
|
|
#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
|
|
|
{
|
2013-11-29 11:13:46 +00:00
|
|
|
gpio_set_value(CONFIG_RED_LED, 1);
|
2009-03-21 20:08:00 +00:00
|
|
|
}
|
|
|
|
|
2011-09-04 18:40:16 +00:00
|
|
|
void red_led_off(void)
|
2009-03-21 20:08:00 +00:00
|
|
|
{
|
2013-11-29 11:13:46 +00:00
|
|
|
gpio_set_value(CONFIG_RED_LED, 0);
|
2009-03-21 20:08:00 +00:00
|
|
|
}
|
|
|
|
#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
|
|
|
{
|
2013-11-29 11:13:46 +00:00
|
|
|
gpio_set_value(CONFIG_GREEN_LED, 0);
|
2009-03-21 20:08:00 +00:00
|
|
|
}
|
|
|
|
|
2011-09-04 18:40:16 +00:00
|
|
|
void green_led_off(void)
|
2009-03-21 20:08:00 +00:00
|
|
|
{
|
2013-11-29 11:13:46 +00:00
|
|
|
gpio_set_value(CONFIG_GREEN_LED, 1);
|
2009-03-21 20:08:00 +00:00
|
|
|
}
|
|
|
|
#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
|
|
|
{
|
2013-11-29 11:13:46 +00:00
|
|
|
gpio_set_value(CONFIG_YELLOW_LED, 0);
|
2009-03-21 20:08:00 +00:00
|
|
|
}
|
|
|
|
|
2011-09-04 18:40:16 +00:00
|
|
|
void yellow_led_off(void)
|
2009-03-21 20:08:00 +00:00
|
|
|
{
|
2013-11-29 11:13:46 +00:00
|
|
|
gpio_set_value(CONFIG_YELLOW_LED, 1);
|
2009-03-21 20:08:00 +00:00
|
|
|
}
|
|
|
|
#endif
|