summaryrefslogtreecommitdiffstats
path: root/board/st/stm32f429-discovery/led.c
blob: 306e550a7c03c589597c1053da6fe2dc8ac0a25c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * (C) Copyright 2015
 * Kamil Lulko, <rev13@wp.pl>
 *
 * SPDX-License-Identifier:	GPL-2.0+
 */

#include <common.h>
#include <asm-generic/gpio.h>

void coloured_LED_init(void)
{
	gpio_direction_output(CONFIG_RED_LED, 0);
	gpio_direction_output(CONFIG_GREEN_LED, 0);
}

void red_led_off(void)
{
	gpio_set_value(CONFIG_RED_LED, 0);
}

void green_led_off(void)
{
	gpio_set_value(CONFIG_GREEN_LED, 0);
}

void red_led_on(void)
{
	gpio_set_value(CONFIG_RED_LED, 1);
}

void green_led_on(void)
{
	gpio_set_value(CONFIG_GREEN_LED, 1);
}
OpenPOWER on IntegriCloud