blob: ac4ef0a6baa1f20f30db7ecdc822336132b019fb [file] [log] [blame]
/*
* Copyright (c) 2022 Yannis Damigos
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <drivers/gpio.h>
#define LED_B_PIN DT_GPIO_PIN(DT_ALIAS(led0), gpios)
static int board_odroid_go_init(const struct device *dev)
{
ARG_UNUSED(dev);
const struct device *gpio;
gpio = device_get_binding(DT_LABEL(DT_NODELABEL(gpio0)));
if (!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, PRE_KERNEL_2, CONFIG_PINMUX_INIT_PRIORITY);