rev13@wp.pl | ed09a55 | 2015-03-01 12:44:42 +0100 | [diff] [blame^] | 1 | /* |
| 2 | * (C) Copyright 2015 |
| 3 | * Kamil Lulko, <rev13@wp.pl> |
| 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 | } |