rev13@wp.pl | 6b5e5a9 | 2015-03-01 12:44:42 +0100 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2015 |
Kamil Lulko | decd33b | 2015-11-29 11:50:53 +0100 | [diff] [blame] | 3 | * Kamil Lulko, <kamil.lulko@gmail.com> |
rev13@wp.pl | 6b5e5a9 | 2015-03-01 12:44:42 +0100 | [diff] [blame] | 4 | * |
| 5 | * SPDX-License-Identifier: GPL-2.0+ |
| 6 | */ |
| 7 | |
| 8 | #include <common.h> |
| 9 | #include <asm-generic/gpio.h> |
| 10 | |
| 11 | void coloured_LED_init(void) |
| 12 | { |
| 13 | gpio_direction_output(CONFIG_RED_LED, 0); |
| 14 | gpio_direction_output(CONFIG_GREEN_LED, 0); |
| 15 | } |
| 16 | |
| 17 | void red_led_off(void) |
| 18 | { |
| 19 | gpio_set_value(CONFIG_RED_LED, 0); |
| 20 | } |
| 21 | |
| 22 | void green_led_off(void) |
| 23 | { |
| 24 | gpio_set_value(CONFIG_GREEN_LED, 0); |
| 25 | } |
| 26 | |
| 27 | void red_led_on(void) |
| 28 | { |
| 29 | gpio_set_value(CONFIG_RED_LED, 1); |
| 30 | } |
| 31 | |
| 32 | void green_led_on(void) |
| 33 | { |
| 34 | gpio_set_value(CONFIG_GREEN_LED, 1); |
| 35 | } |