2018-05-06 21:58:06 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0+
|
2015-03-01 11:44:42 +00:00
|
|
|
/*
|
|
|
|
* (C) Copyright 2015
|
2015-11-29 10:50:53 +00:00
|
|
|
* Kamil Lulko, <kamil.lulko@gmail.com>
|
2015-03-01 11:44:42 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <common.h>
|
2019-11-14 19:57:11 +00:00
|
|
|
#include <status_led.h>
|
2015-03-01 11:44:42 +00:00
|
|
|
#include <asm-generic/gpio.h>
|
|
|
|
|
2022-03-30 22:07:19 +00:00
|
|
|
#define RED_LED 110
|
|
|
|
#define GREEN_LED 109
|
|
|
|
|
2015-03-01 11:44:42 +00:00
|
|
|
void coloured_LED_init(void)
|
|
|
|
{
|
2022-03-30 22:07:19 +00:00
|
|
|
gpio_request(RED_LED, "red led");
|
|
|
|
gpio_direction_output(RED_LED, 0);
|
|
|
|
gpio_request(GREEN_LED, "green led");
|
|
|
|
gpio_direction_output(GREEN_LED, 0);
|
2015-03-01 11:44:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void red_led_off(void)
|
|
|
|
{
|
2022-03-30 22:07:19 +00:00
|
|
|
gpio_set_value(RED_LED, 0);
|
2015-03-01 11:44:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void green_led_off(void)
|
|
|
|
{
|
2022-03-30 22:07:19 +00:00
|
|
|
gpio_set_value(GREEN_LED, 0);
|
2015-03-01 11:44:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void red_led_on(void)
|
|
|
|
{
|
2022-03-30 22:07:19 +00:00
|
|
|
gpio_set_value(RED_LED, 1);
|
2015-03-01 11:44:42 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void green_led_on(void)
|
|
|
|
{
|
2022-03-30 22:07:19 +00:00
|
|
|
gpio_set_value(GREEN_LED, 1);
|
2015-03-01 11:44:42 +00:00
|
|
|
}
|