From 685df09bcecd9e6ceecc6162f0db2f20965831c6 Mon Sep 17 00:00:00 2001 From: KemoNine Date: Tue, 9 Mar 2021 04:51:59 +0000 Subject: [PATCH] Remove led code for bluehand as it doesn't work --- config/boards/shields/bluehand/CMakeLists.txt | 6 --- config/boards/shields/bluehand/pwr_led.c | 38 ------------------- 2 files changed, 44 deletions(-) delete mode 100644 config/boards/shields/bluehand/CMakeLists.txt delete mode 100644 config/boards/shields/bluehand/pwr_led.c diff --git a/config/boards/shields/bluehand/CMakeLists.txt b/config/boards/shields/bluehand/CMakeLists.txt deleted file mode 100644 index 7d8ba32..0000000 --- a/config/boards/shields/bluehand/CMakeLists.txt +++ /dev/null @@ -1,6 +0,0 @@ -# -# Copyright (c) 2021 Mike "KemoNine" Crosson -# SPDX-License-Identifier: MIT -# - -target_sources_ifdef(CONFIG_SHIELD_BLUEHAND_LEFT || CONFIG_SHIELD_BLUEHAND_RIGHT app PRIVATE pwr_led.c) diff --git a/config/boards/shields/bluehand/pwr_led.c b/config/boards/shields/bluehand/pwr_led.c deleted file mode 100644 index c44cd0e..0000000 --- a/config/boards/shields/bluehand/pwr_led.c +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2021 Mike "KemoNine" Crosson - * - * SPDX-License-Identifier: MIT - */ - -#include -#include -#include -#include - -#define PWR_LED_NODE DT_ALIAS(powerled) - -#if DT_NODE_HAS_STATUS(PWR_LED_NODE, okay) -#define PWR_LED DT_GPIO_LABEL(PWR_LED_NODE, gpios) -#define PWR_LED_PIN DT_GPIO_PIN(PWR_LED_NODE, gpios) -#else -/* A build error here means your board isn't set up to blink an LED. */ -#error "Unsupported board: pwr_led devicetree alias is not defined" -#define PWR_LED "" -#define PIN 0 -#define FLAGS 0 -#endif - -static int pwr_led_init(const struct device *dev) { - dev = device_get_binding(PWR_LED); - if (dev == NULL) { - return -EIO; - } - - if (gpio_pin_configure(dev, PWR_LED_PIN, GPIO_OUTPUT) < 0) { - return -EIO; - } - - return gpio_pin_set(dev, PIN, (int)true); -} - -SYS_INIT(pwr_led_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY);