diff --git a/samples/basic/disco/CMakeLists.txt b/samples/basic/disco/CMakeLists.txt deleted file mode 100644 index b1a146165b2..00000000000 --- a/samples/basic/disco/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 - -cmake_minimum_required(VERSION 3.13.1) -include($ENV{ZEPHYR_BASE}/cmake/app/boilerplate.cmake NO_POLICY_SCOPE) -project(disco) - -target_sources(app PRIVATE src/main.c) diff --git a/samples/basic/disco/README.rst b/samples/basic/disco/README.rst deleted file mode 100644 index 410e50267c4..00000000000 --- a/samples/basic/disco/README.rst +++ /dev/null @@ -1,32 +0,0 @@ -.. _disco-sample: - -Disco demo -########## - -Overview -******** - -A simple 'disco' demo. The demo assumes that 2 LEDs are connected to -GPIO outputs of the MCU/board. - - -Wiring -****** - -This sample should work on board with multiple built-in LEDs without any -changes, otherwise, the code may need some changes before running on various -board: set PORT, LED0 and LED1 according to the board's GPIO configuration. - -Building and Running -********************* - -After startup, the program looks up a predefined GPIO device defined by 'PORT', -and configures pins 'LED0' and 'LED1' in output mode. During each iteration of -the main loop, the state of GPIO lines will be changed so that one of the lines -is in high state, while the other is in low, thus switching the LEDs on and off -in an alternating pattern. - -This project does not output to the serial console, but instead causes two LEDs -connected to the GPIO device to blink in an alternating pattern. - -The sample can be found here: :zephyr_file:`samples/basic/disco`. diff --git a/samples/basic/disco/prj.conf b/samples/basic/disco/prj.conf deleted file mode 100644 index 91c3c15b37d..00000000000 --- a/samples/basic/disco/prj.conf +++ /dev/null @@ -1 +0,0 @@ -CONFIG_GPIO=y diff --git a/samples/basic/disco/sample.yaml b/samples/basic/disco/sample.yaml deleted file mode 100644 index 74f4cfde5a7..00000000000 --- a/samples/basic/disco/sample.yaml +++ /dev/null @@ -1,9 +0,0 @@ -sample: - name: Disco Lights -tests: - sample.disco: - filter: dt_compat_enabled_with_alias("gpio-leds", "led0") and - dt_compat_enabled_with_alias("gpio-leds", "led1") - tags: LED gpio - depends_on: gpio - harness: led diff --git a/samples/basic/disco/src/main.c b/samples/basic/disco/src/main.c deleted file mode 100644 index 7f58794936e..00000000000 --- a/samples/basic/disco/src/main.c +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2016 Open-RnD Sp. z o.o. - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include -#include - -#define PORT0 DT_ALIAS_LED0_GPIOS_CONTROLLER -#define PORT1 DT_ALIAS_LED1_GPIOS_CONTROLLER - -#define LED0 DT_ALIAS_LED0_GPIOS_PIN -#define LED1 DT_ALIAS_LED1_GPIOS_PIN - -#define SLEEP_TIME 500 - -void main(void) -{ - int cnt = 0; - struct device *gpio0, *gpio1; - - gpio0 = device_get_binding(PORT0); - gpio1 = device_get_binding(PORT1); - - gpio_pin_configure(gpio0, LED0, GPIO_DIR_OUT); - gpio_pin_configure(gpio1, LED1, GPIO_DIR_OUT); - - while (1) { - gpio_pin_write(gpio0, LED0, cnt % 2); - gpio_pin_write(gpio1, LED1, (cnt + 1) % 2); - k_sleep(SLEEP_TIME); - cnt++; - } -}