/*
 * Copyright (c) 2022 Yannis Damigos
 *
 * SPDX-License-Identifier: Apache-2.0
 */

#include <zephyr/drivers/gpio.h>

#define LED_B_PIN  DT_GPIO_PIN(DT_ALIAS(led0), gpios)

static int board_odroid_go_init(void)
{
	const struct device *gpio;

	gpio = DEVICE_DT_GET(DT_NODELABEL(gpio0));
	if (!device_is_ready(gpio)) {
		return -ENODEV;
	}

	/* turns blue LED off */
	gpio_pin_configure(gpio, LED_B_PIN, GPIO_OUTPUT);
	gpio_pin_set(gpio, LED_B_PIN, 0);

	return 0;
}

SYS_INIT(board_odroid_go_init, APPLICATION, CONFIG_GPIO_INIT_PRIORITY);
