mirror of
				https://github.com/smaeul/u-boot.git
				synced 2025-11-04 05:50:17 +00:00 
			
		
		
		
	This fixes the following error message: U-Boot 2019.07-rc4-00103-g5eea874b5e (Jun 25 2019 - 15:09:31 +0200) DRAM: 8 MiB gpio@40021800: dir_output: error: gpio GPIOG14 not reserved gpio@40021800: dir_output: error: gpio GPIOG13 not reserved gpio@40021800: set_value: error: gpio GPIOG14 not reserved Flash: 2 MiB .... Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
		
			
				
	
	
		
			37 lines
		
	
	
		
			629 B
		
	
	
	
		
			C
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			629 B
		
	
	
	
		
			C
		
	
	
	
	
	
// SPDX-License-Identifier: GPL-2.0+
 | 
						|
/*
 | 
						|
 * (C) Copyright 2015
 | 
						|
 * Kamil Lulko, <kamil.lulko@gmail.com>
 | 
						|
 */
 | 
						|
 | 
						|
#include <common.h>
 | 
						|
#include <asm-generic/gpio.h>
 | 
						|
 | 
						|
void coloured_LED_init(void)
 | 
						|
{
 | 
						|
	gpio_request(CONFIG_RED_LED, "red led");
 | 
						|
	gpio_direction_output(CONFIG_RED_LED, 0);
 | 
						|
	gpio_request(CONFIG_GREEN_LED, "green led");
 | 
						|
	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);
 | 
						|
}
 |