From af1a266670d040d2f4083ff309d732d648afba2a Mon Sep 17 00:00:00 2001 From: Angelos Mouzakitis Date: Tue, 10 Oct 2023 14:33:42 +0000 Subject: Add submodule dependency files Change-Id: Iaf8d18082d3991dec7c0ebbea540f092188eb4ec --- roms/u-boot/board/st/stm32f429-discovery/led.c | 37 ++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 roms/u-boot/board/st/stm32f429-discovery/led.c (limited to 'roms/u-boot/board/st/stm32f429-discovery/led.c') diff --git a/roms/u-boot/board/st/stm32f429-discovery/led.c b/roms/u-boot/board/st/stm32f429-discovery/led.c new file mode 100644 index 000000000..539c139bb --- /dev/null +++ b/roms/u-boot/board/st/stm32f429-discovery/led.c @@ -0,0 +1,37 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * (C) Copyright 2015 + * Kamil Lulko, + */ + +#include +#include +#include + +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); +} -- cgit